/*! YOOtheme Pro v5.0.29 | https://yootheme.com */

(function(){"use strict";function g(t,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",i==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}var y=".tm-editor{align-items:center;background:#fff;border:1px solid #ddd;display:flex;flex-direction:column;height:300px;justify-content:center;margin-top:20px;text-align:center;width:100%}.tm-link{color:#888;display:inline-block;font-size:13px;margin:20px 0 0;text-decoration:none}.tm-button{-webkit-font-smoothing:antialiased;background:linear-gradient(140deg,#fe67d4,#4956e3);border-radius:2px;box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5);box-sizing:border-box;color:#fff!important;display:block;font-size:18px;line-height:10px;max-width:100%;padding:20px 30px;text-align:center;text-decoration:none!important;width:280px}.tm-button.tm-disabled{background:#fafafa;color:#444!important}.tm-button.tm-disabled>*{vertical-align:middle}#page-builder-dialog{display:none}#page-builder-dialog .notification-dialog{background:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);box-sizing:border-box;left:50%;line-height:1.5;margin:0;max-height:90%;overflow-y:auto;padding:25px;position:fixed;top:50%;transform:translate(-50%,-50%);width:500px;z-index:1000005}@media only screen and (max-height:480px),screen and (max-width:450px){#page-builder-dialog .notification-dialog{height:100%;left:0;max-height:100%;top:0;transform:none;width:100%}}[hidden]{display:none!important}";g(y);function x(t,{button:e,overlay:i},n=document.body){n.insertAdjacentHTML("beforeend",`<div id="page-builder-dialog" class="notification-dialog-wrap">
            <div class="notification-dialog-background"></div>
            <div class="notification-dialog">
                <div class="page-builder-message">
                    <p>${i}</p>
                </div>
                <p>
                    <a class="button button-primary" href="${t}">${"Edit in YOOtheme"}</a>
                    <button class="button" type="button">${e}</button>
                </p>
            </div>
        </div>`);const o=n.lastElementChild;return o.querySelector(".notification-dialog-background").addEventListener("click",()=>o.style.display="none"),o}function E(t){return t}function v(t){return!!t?.match(/<!--\s?{/)}const{name:w}=window,d=w==="editor-canvas",s=d?window.parent:window,u=".is-root-container > .wp-block-freeform > * > p:last-of-type",k={overlay:"This post was previously edited in YOOtheme. You can continue in the Block Editor, but you will lose all formatting.",button:"Continue in Block Editor"};let a;document.addEventListener("click",t=>{t.target.closest(".tm-link")&&(t.preventDefault(),a??=x(document.querySelector(".tm-button").href,k,s.document.body),a.style.display="block",a.querySelector("button").addEventListener("click",()=>{document.querySelector(u).remove(),a.style.display="none",p()}))}),d||m(".edit-post-header-toolbar__left,.edit-post-header-toolbar-left,.editor-document-tools__left","#editor",t=>{const e=f().querySelector(".tm-button:not(.tm-disabled)");e&&t.insertAdjacentHTML("beforeend",`<a href="${e.href}" class="components-button is-primary tm-button-switch">${"YOOtheme"}</a>`)}),m(u,d?"html":"#wpwrap",async t=>p(v(t.parentElement.innerHTML)));function p(t=!1){const e=f();document.querySelector(".edit-post-visual-editor__post-title-wrapper").append(e),e.hidden=!t,d&&e.querySelector(".tm-button:not(.tm-disabled)")?.addEventListener("click",i=>s.location.href=i.target.href),document.querySelector(".is-root-container.wp-block-post-content").hidden=t}function f(){return document.querySelector(".tm-editor")||s.document.querySelector(".tm-editor")}function m(t,e,i){const n=document.querySelector(e);if(!n||!window.MutationObserver)return;const o=(l,r)=>r.matches(l)?r:r.querySelector(l),b=o(t,n);if(b){i(b);return}new MutationObserver(l=>{for(const{addedNodes:r}of l)for(const c of r)if(c.nodeType===c.ELEMENT_NODE){const h=o(t,c);h&&i(h)}}).observe(n,{subtree:!0,childList:!0})}})();
