Your IP : 216.73.217.143


Current Path : /home/ereika83/www/wp-content/plugins/microthemer/js-min/
Upload File :
Current File : /home/ereika83/www/wp-content/plugins/microthemer/js-min/mt-block.js

if(!window.name&&window.parent){let t=window.parent;for(let e=0;e<t.frames.length;e++)if("editor-canvas"===t.frames[e].name){window.MTiframeShouldBail=!0;break}}window.MTiframeShouldBail||(window.MTblock=function(){function t(e){return e.replace("&canvas=edit","")}let m,n,r,h={context:null,isEditor:null,hasBlocks:null,blocksContainer:null,editorHasBlocks:null,isIframe:null,isPreviewIframe:null,containerClass:"is-root-container",MTDynFrontData:null,DOMContentLoaded:0,shared:{editorPanelsReady:null,editor:null,cache:{view:{}}},observer:{},uniqueClassPattern:/\bmctr-[0-9a-z]{6}\b/,setVars:function(){var e;h.MTDynFrontData=window.MTDynFrontData,h.isIframe?(e=window.parent,m=e.wp,r=e.MTblock,h.shared=r.shared,n=h,h.iframe.win=window,h.iframe.doc=document,r.signalIframeReady(h)):(m=window.wp,r=h,e=document.getElementById("site-editor")?"fse":"regular",h.shared.TvrMT=window.TvrMT,h.shared.editor={win:window,doc:document,userInteraction:!1,context:e})},ensureTrailingSlash:function(e){return e.endsWith("/")?e:e+"/"},fetch:function(e,o){fetch(e,o.requestOptions).then(e=>e.json()).then(t=>{if(h.log("We fetched some data",t,o),o.cb){let e=o.cb.args||[];e.unshift(t),h.log("Running fetch callback"),o.cb.item.apply(this,e)}}).catch(e=>{console.error("Error:",e)})},checkFrontData:function(e,t){return(t=t||h.MTDynFrontData)?t[e]:null},add_block_classes_all:function(){return h.checkFrontData("add_block_classes_all")},signalIframeReady:function(e){n=e,h.log("iframe is ready",h)},isInsideMT:function(){var e=h.shared.TvrMT;return!(!e||!e.mod.MTint)&&e.mod.MTint.builderUnq.gutenberg},signalBlocksReady:function(n,a){if(n){h.blocksReady=!0,h.prevBlocksList=h.getBlockList(!0),h.log("Blocks are ready",n,a,h.prevBlocksList);let o=h.isInsideMT();if(h.shared.editor.selectorForBlockOnlyCSS&&h.adjustBlockOnlyStyles(h.shared.editor.selectorForBlockOnlyCSS,"enable",a),o){let e=TvrMT.mod.MTF,t=TvrMT.mod.MTint;var s;o.integrationSkippedOnEditor&&t.builderUnq.gutenberg.mt_frontend_setup_vars_and_init&&!h.isIframe&&(o.editorHasBlocks=!0,t.check_integrations(n,e,n.MTblock&&n.MTblock.isEditor),t.builderUnq.gutenberg.mt_frontend_setup_vars_and_init(),o.adjustLogicForBlockContent(o.mainWindow.MTDynFrontData,o.mainWindow,o.mainWindow)),h.shared.cache.view.data&&(h.MTDynFrontData=h.shared.cache.view.data,h.log("We fetch MTDynFrontData from view cache",h.MTDynFrontData)),h.shared.cache.view.pendingMTUpdate&&(s=h.shared.cache.view.pendingMTUpdate,h.log("Apply pending MT UI update",h.MTDynFrontData),o.updateMTForPageOrContentChange(o,h.MTDynFrontData,s,a,n,!0,r),r.editor.maybeResumeObservations(a),delete h.shared.cache.view.pendingMTUpdate),n.TvrMT?(h.log("MT loaded initially, before blocks were initiated",h.MTDynFrontData),h.log("MTblock.shared.cache.view.data",h.shared.cache.view.data),h.signalBlocksReadyAndMTLoaded(a)):(h.log("We need to load MT on frontend dynamically",o),o.manualFrontInit(n,a,h.MTDynFrontData,h))}else h.log("We are not inside MT"),r.shared.cache.view.pendingStylesheetReplace&&(h.log("Apply pending stylesheet replace"),h.replaceStylesheets(a,h.shared.cache.view.stylesheets),h.log("Replace pending stylesheets:"),h.log(h.shared.cache.view.stylesheets),h.editor.maybeResumeObservations(a))}},signalBlocksReadyAndMTLoaded:function(e){let t=e.querySelectorAll('link[href*="\\/micro-themes\\/"], style[id^="microthemer"]');h.log("signal Blocks Ready And MT Loaded - remove static MT assets",t,e),h.log("blocks ready, get template",h.getCurrentTemplate()),t.forEach(e=>{e.remove()})},log:function(){},uniqueClass:function(){return"mctr-"+h.randomAlphaNumString(6)},alreadyHasUniqueClass:function(e){if(e){e=e.match(h.uniqueClassPattern);if(e)return e[0]}return!1},randomAlphaNumString:function(e,t){t=void 0===t?0:t;let o=Math.random().toString(36),n=o.slice(3,3+e);return n.length!==e&&t<=10?h.randomAlphaNumString(e,++t):n},observeTarget:function(t,o){o.observerConfig=o.observerConfig||{};var e=new MutationObserver(function(e){e.forEach(function(e){o.item.apply(this,[t,e].concat(o.args||[]))})});e.observe(t,o.observerConfig),h.observer[o.name]=e},disconnect:function(e){h.observer[e]&&(h.observer[e].disconnect(),h.log("Disconnected the observer",e))},checkNodes:function(o,n){let a;if(n.length)for(let e=0;e<n.length;e++){let e=n[0],t=e.classList;if(3!==e.nodeType&&("iframeAdded"===o.context&&e.tagName&&"iframe"===e.tagName.toLowerCase()||"loaderEnded"===o.context&&t&&t.contains("edit-site-canvas-loader")||"stylesAdded"===o.context&&"mt-placeholder-inline-css"===e.id||"blockRootAdded"===o.context&&t&&(t.contains(h.containerClass)||t.contains("edit-post-layout"))||("blockAdded"===o.context||"blockRemoved"===o.context)&&t&&t.contains("wp-block"))){a=e;break}}return a},observeDomChange:function(e,t,n){t=t||document;let o=(n=n||{}).el||t.querySelector(e),a={};n.subtree&&(a.subtree=n.subtree),n.childList&&(a.childList=n.childList),n.attributes&&(a.attributes=n.attributes),n.attributeFilter&&(a.attributeFilter=n.attributeFilter),n.attributeOldValue&&(a.attributeOldValue=n.attributeOldValue),o?o.dataset.mtblockobserver!==n.name?(o.dataset.mtblockobserver=n.name,h.log("We set up observeDomChange on",o,n.name),h.observeTarget(o,{name:n.name,observerConfig:a,item:function(e,t){var o=n.checkNodeType||"addedNodes",o=h.checkNodes(n,t[o]);if(o&&n.cb){let e=n.cb.args||[];n.doNotPrependMutation||e.unshift(o,t),n.cb.item.apply(this,e)}}})):h.log("We are already observing for the change on this el",n,o):h.log("We have no el to observe",n)},blocksReadyMaybeObserve:function(e){var t=(e=e||document).defaultView;h.log("blocksReadyMaybeObserve objects",t,e),h.doBlockChecks(e),h.blocksContainer?(h.signalBlocksReady(t,e),h.disconnect("blocksContainer"),h.startObservingBlocks(t,e)):h.log("the block editor is NOT ready")},doBlockChecks:function(e){e=e.getElementsByClassName(h.containerClass);h.blocksContainer=e?e[0]:null,h.hasBlocks=!!h.blocksContainer,h.editorHasBlocks=h.hasBlocks&&h.isEditor,h.iframeHasBlocks=h.hasBlocks&&h.isIframe,h.log("doBlockChecks",e,h)},checkForLoaderEnd:function(){var e=document.querySelector(".edit-site-resizable-frame__inner-content");h.log("check For LoaderEnd"),h.observeDomChange(null,document,{el:e,name:"loaderEnded",context:"loaderEnded",checkNodeType:"removedNodes",subtree:!0,childList:!0,cb:{item:function(e){h.log("loader removed",e),h.disconnect("loaderEnded"),n||h.blocksReadyMaybeObserve(h.editor.getIframeRefs().doc)}}})},checkForIframe:function(){let o=h.shared.editor.context;h.log("Observe for iframe loading",o),h.observeDomChange("#editor, #site-editor",document,{name:"iframeAdded",context:"iframeAdded",subtree:!0,childList:!0,cb:{item:function(t,e){h.log("iframe added",o),h.disconnect("blocksContainer"),"fse"===o?h.checkForLoaderEnd():t.onload=function(){h.log("iframe loaded");var e=t.contentWindow.document;n?(h.log("Abort parent blocksReadyMaybeObserve as we have MTFblock",n),window.TvrMT&&h.signalBlocksReadyAndMTLoaded(e)):h.blocksReadyMaybeObserve(e)}},args:[]}})},checkForBlocksContainer:function(e){h.log("Observe for blocks container"),h.observeDomChange("#wpbody-content",e,{name:"blocksContainer",context:"blockRootAdded",subtree:!0,childList:!0,doNotPrependMutation:!0,cb:{item:h.blocksReadyMaybeObserve}})},startObservingBlocks:function(e,t){h.blocksContainer&&(h.blocksContainer.dataset.mtblockobserver?h.log("Block checks have already been set up"):(h.blocksContainer.dataset.mtblockobserver=1,h.log("startObservingBlocks",e),h.add_block_classes_all()&&h.addClassesToExistingBlocks(),h.checkForNewBlocks(t),h.checkForRemovedBlocks(t)))},checkForNewBlocks:function(e){h.observeDomChange("div."+h.containerClass,e,{name:"newBlocks",context:"blockAdded",subtree:!0,childList:!0,cb:{item:h.blockAdded,args:[]}})},checkForRemovedBlocks:function(e){h.observeDomChange("div."+h.containerClass,e,{checkNodeType:"removedNodes",name:"removedBlocks",context:"blockRemoved",subtree:!0,childList:!0,cb:{item:h.blockRemoved,args:[]}})},blockAdded:function(e,t){h.add_block_classes_all()&&h.maybeAddClassToBlock(e,t,"new",!0),h.maybeAdjustMTLoadingForBlockChange("added")},blockRemoved:function(e,t){h.maybeAdjustMTLoadingForBlockChange("removed")},getLiveData:function(t,o){if(t){let e={live_post_content:t.refsHtml};return o&&(e.live_template=r.getCurrentTemplate()),e}return null},maybeAdjustMTLoadingForBlockChange:function(e){h.actionAfterTimeout("blocksAddedOrRemoved",250,{item:function(){var e,t;h.prevBlocksList&&(e=h.getBlockList(!0),t=h.checkBlockListChange(h.prevBlocksList,e),h.log("The change",t),(t.removed.length||t.added.length)&&(h.prevBlocksList=e,h.editor.remoteQueryAssetLoading(h.shared.editor.doc.location.href,h.getLiveData(e,!0))))},args:[]})},timer:{},prevReusableBlocks:null,getSourceFromBlockName:function(e){let t=e;switch(e){case"core/block":case"core/pattern":t="wp_pattern";break;case"core/navigation":t="wp_navigation";break;case"core/template-part":t="wp_template_part"}return t},iterateBlockList:function(a,s,r){if(a){var i=Object.keys(a);for(let n=0;n<i.length;n++){let t=a[i[n]],o;if(r){let e=r.args||[];e.push(t,i[n],a,s),o=r.item.apply(this,e)}if("continue"!==o){if("break"===o)break;t.innerBlocks&&h.iterateBlockList(t.innerBlocks,s,r)}}}},checkBlockListChange:function(e,t){let n={older:{list:e.list,refs:e.refs},newer:{list:t.list,refs:t.refs},added:[],removed:[]};return["older","newer"].forEach(o=>{let e=Object.keys(n[o].refs);e.forEach(e=>{var t={ref:e,name:n[o].refs[e]};"older"===o?n.newer.refs[e]||n.removed.push(t):"newer"===o&&(n.older.refs[e]||n.added.push(t))})}),n},actionAfterTimeout:function(e,t,o){h.timer[e]&&(clearTimeout(h.timer[e]),delete h.timer[e]),h.timer[e]=setTimeout(function(){o.item.apply(this,o.args)},t)},addClassesToExistingBlocks:function(){var t=h.blocksContainer.getElementsByClassName("wp-block"),o=h.add_block_classes_all();for(let e=0;e<t.length;e++)h.maybeAddClassToBlock(t[e],null,"existing",o)},maybeAddClassToBlock:function(e,t,o,n,a){if(e){var s=e.dataset.block;if("existing"!==o&&h.log("maybeAddClassToBlock",o,s,e),s)return h.addUniqueClass(e,s,o,n,a)}return!1},handleClassExceptions:function(e,t,o){let n={},a=e.classList;return a&&(a.contains("wp-block-kadence-singlebtn")&&(h.log("Kadence button exception, skip class",t,e),n.skip=!0),(a.contains("wp-block-freeform")||a.contains("block-library-html__edit"))&&(h.log("Gutenberg exception",t,e),n.skip=!0)),n},addUniqueClass:function(t,e,o,n,a){let s,r,i=!1;if(!h.blocksSupportsCustomClass(e))return h.log("Block cannot receive a custom class",e,t),!1;if(h.log("Block is eligible for a custom class",e,t),e){const{select:d,dispatch:u}=m.data;var l=h.getBlockAttributes(e);if(r=h.uniqueClass(),s=r,h.log("Current attributes",l,e,t.classList),h.handleClassExceptions(t,e,l.className).skip&&(i=!0),i||l&&l.className&&(h.alreadyHasUniqueClass(l.className)?(i=!0,h.log("Unique class has already been added",l.className,e)):(r+=" "+l.className,h.log("Combine MT class with existing",r,e))),i||(a&&(a[s]=1),"selection"===o&&t.classList.add(s),u("core/block-editor").updateBlockAttributes(e,{className:r}),"existing"!==o&&h.log("Unique class added to the editor",r,e)),n){var c=d("core/block-editor").getClientIdsOfDescendants(e);for(let e=0;e<c.length;e++)h.addUniqueClass(t,c[e],o,n,a)}}return!i&&r},removeUniqueClass:function(e,t){const{dispatch:o}=m.data;var n=e.dataset.block,a=h.getBlockAttributes(n);if(h.log("maybe removeUniqueClass",a," on ",e),a){const s=a.className,r=h.alreadyHasUniqueClass(s);s&&r&&(a=s.split(/\s+/).filter(e=>e!==r).join(" "),"selection"===t&&e.classList.remove(r),o("core/block-editor").updateBlockAttributes(n,{className:a}),h.log("className was cleaned from",s,"to",a," on ",e))}},blocksSupportsCustomClass:function(e){return!0},getBlockOptions:function(e){const{select:t}=m.data;e=t("core/block-editor").getBlock(e);return{block:e,blockOptions:e?t("core/blocks").getBlockType(e.name):null}},subscribe:function(o){const{select:n,subscribe:e,dispatch:a}=m.data;return h.log("Setup subscribe for ",o.name,o),e(()=>{let e=o.cb,t=e.args||[];t.push(n,a,o),e.args=t,e&&(o.timeout?h.actionAfterTimeout(o.name,o.timeout,e):e.item.apply(this,e.args))})},setDeviceType:function(e){const{dispatch:t}=m.data;t("core/editor").setDeviceType(e)},getCurrentTemplate:function(){const{select:e}=m.data;return e("core/editor").getEditedPostAttribute("template")},getCurrentScreenTitle:function(){const{select:e}=m.data,t=e("core/editor");return t.getEditedPostAttribute("title")||""},selectorForBlockOnlyCSS:"",adjustBlockOnlyStyles:function(e,t,o){let n,a=window.MTblock,s=a&&a.isEditor;return a.log("adjustBlockOnlyStyles",t,window.TvrMT),e&&o&&o.head&&(n=o.head.querySelectorAll(e),a.log("adjustBlockOnlyStyles styles",t,n),n.forEach(e=>{"disable"===t?e.setAttribute("media","not all"):s&&"microthemer-css"===e.id||e.setAttribute("media","all")})),n},disableBlockOnlyStyles:function(){let t=h.MTDynFrontData.folderLoading,o=Object.keys(t),n="style#microthemer-sectionSlug-inline-css, link#microthemer-sectionSlug-css",a=["#microthemer-css"];for(let e=0;e<o.length;e++){var s=o[e];"blocksOnly"===t[s]&&a.push(n.replace(/sectionSlug/g,s))}a.length&&(h.shared.editor.selectorForBlockOnlyCSS=a.join(", "),h.shared.editor.disabledEditorStyles=h.adjustBlockOnlyStyles(h.shared.editor.selectorForBlockOnlyCSS,"disable",document)),h.log("disableBlockOnlyStyles",a,h.shared.editor.selectorForBlockOnlyCSS)},replaceMTAssets:function(e,t,n,o){t=t+(-1<t.indexOf("?")?"&":"?")+"test_logic=1&test_all&get_simple_stylesheets=1";n.log("replaceMTAssets origStyles",t,o);let a=new FormData;o&&(a.append("live_post_content",o.live_post_content),a.append("live_template",o.live_template)),n.fetch(t,{requestOptions:o?{method:"POST",body:a}:null,cb:{item:function(e){var t=r.editor.getIframeRefs().doc,o=t&&t.head&&t.head.childElementCount;n.shared.cache.view.stylesheets=e.stylesheets,o?(n.replaceStylesheets(t,e.stylesheets),n.log("Replace stylesheets:"),n.log(e.stylesheets),n.editor.maybeResumeObservations(t)):(n.log("No blocks document available in the current view, cache",e.stylesheets),r.shared.cache.view.pendingStylesheetReplace=!0)}}})},replaceStylesheets:function(e,t){let o=e.getElementById("mt-placeholder-inline-css"),n=e.querySelectorAll('link[href*="\\/micro-themes\\/"], style[id^="microthemer"]');t&&o.insertAdjacentHTML("afterend",t),n.forEach(e=>{e.remove()})},extractBlockRefs:function(o,n){var a=n.attributes;if(a){var s=a.ref,r=a.slug,i=a.theme,l=s||(i&&r?i+"//"+r:!("core/pattern"!==n.name||!r)&&r);if(l){s=h.getSourceFromBlockName(n.name);o.refs[l]=s;let e="",t=isNaN(l)?'"'+l+'"':l;switch(s){case"wp_template_part":e='\x3c!-- wp:template-part {"slug":"'+r+'","theme":"'+i+'","tagName":"'+a.tagName+'"} /--\x3e';break;case"wp_pattern":e="core/pattern"===n.name?'\x3c!-- wp:pattern {"slug":"'+r+'"} /--\x3e':'\x3c!-- wp:block {"ref":'+t+"} /--\x3e";break;case"wp_navigation":e='\x3c!-- wp:navigation {"ref":'+t+"} /--\x3e"}o.refsHtml+=e+"\n"}}},getBlockList:function(e,t){let o=m.data.select("core/block-editor").getBlocks(),n={updated:{},refs:{},refsHtml:"",refsHtmlParts:{root:""}};return e&&(o=structuredClone(o)),t||h.iterateBlockList(o,n,{item:function(o,e,t){if(!n.updated[o.clientId])switch(o.name){case"core/post-content":case"core/template-part":case"core/block":case"core/navigation":if(!("core/block"!==o.name&&"core/navigation"!==o.name||o.attributes&&o.attributes.ref))return;h.extractBlockRefs(n,o);let{select:t}=m.data,e=t("core/block-editor").getClientIdsOfDescendants(o.clientId);e.length&&!o.innerBlocks.length&&(o.innerBlocks=[],e.forEach(e=>{e=t("core/block-editor").getBlock(e);t("core/block-editor").getBlockParents(e.clientId,!0)[0]===o.clientId&&o.innerBlocks.push(e)}),n.updated[o.clientId]=1)}}}),h.log("getBlockList",o,n),{refs:n.refs,refsHtml:n.refsHtml,list:o}},getPostContent:function(t){const{select:e}=m.data;if("fse"!==h.shared.editor.context)return e("core/editor").getEditedPostContent();{let n="",a=m.blocks.getSaveContent,e={};return h.iterateBlockList(t,e,{item:function(e,t,o){e=a(e.name,e.attributes,e.innerBlocks);n+=e}}),n}},getPostTitle:function(){const{select:e}=m.data;return e("core/editor").getEditedPostAttribute("title")},getSelectedBlockClientId:function(e){const{select:t}=m.data;return t("core/block-editor").getSelectedBlockClientId()},selectBlock:function(e){const{dispatch:t}=m.data;t("core/block-editor").selectBlock(e)},getBlockAttributes:function(e){const{select:t}=m.data;return t("core/block-editor").getBlockAttributes(e)},getClientId:function(e){return e.dataset.block},getClosestBlock:function(e){return e.closest(".wp-block")},getUserDefinedClass:function(t,o){t=h.getClientId(t);if(t){let e=h.getBlockAttributes(t);if(e&&e.className)return o?e.className.split(/\s+/):e.className}return!1},getUserDefinedId:function(e){e=h.getClientId(e);if(e){e=h.getBlockAttributes(e);if(e&&e.anchor)return e.anchor}return!1},savePost:function(e){m.data.dispatch("core/editor").savePost(),e.unsavedMTClasses={}},updateAllDataStores:function(t,o,e){e&&(e[t]=o),[h,r,n].forEach(e=>{e&&(e.MTDynFrontData[t]=o)})},editor:{init:function(){h.log("We run editor init",h),h.disableBlockOnlyStyles(),h.editor.handleAddressBarChange(),h.editor.handleClicks(),h.editorHasBlocks?h.blocksReadyMaybeObserve():(h.checkForIframe(),h.checkForBlocksContainer())},userInteractionHappened:function(){h.shared.editor.userInteraction=!0,h.log("userInteractionHappened",h.context)},getIframeRefs:function(){var e=window.frames["editor-canvas"];return{win:e,doc:e?e.document:void 0}},prevBrowserUrl:t(document.location.href),setupCustomLocationChangeEvent:function(){let t=history.pushState;history.pushState=function(){var e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let o=history.replaceState;history.replaceState=function(){var e=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("locationchange"))})},handleAddressBarChange:function(){h.log("set up handleAddressBarChange",window),h.editor.setupCustomLocationChangeEvent(),window.addEventListener("locationchange",function(){var e=t(document.location.href);h.log("currentBrowserUrl, MTblock.editor.prevBrowserUrl",e,h.editor.prevBrowserUrl),e!==h.editor.prevBrowserUrl&&h.editor.handleViewChange(e)})},handleClicks:function(){document.addEventListener("click",e=>{let t=e.target,o=(t.tagName.toLowerCase(),t.getAttribute("class"));o&&o.split(/\s+/)})},remoteQueryAssetLoading:function(t,o){h.shared.cache.view={};let e=new URL(t).searchParams,n=t;if("fse"!==h.shared.editor.context||e.get("postId")||(n=h.ensureTrailingSlash(h.MTDynFrontData.home_url)),h.log("effectiveTestUrl",n,t),h.shared.TvrMT){let e=h.shared.TvrMT.mod.MTint.builderUnq.gutenberg;e.simulatePageOrContentChange(e,t,n,r,o)}else h.replaceMTAssets(t,n,r,o)},maybeResumeObservations:function(e){h.log("Is the container still connected",h.blocksContainer&&h.blocksContainer.isConnected),h.blocksContainer&&h.blocksContainer.isConnected||(h.log("No, we need to resume observations"),h.blocksReadyMaybeObserve(e))},handleViewChange:function(e){h.log("handleViewChange from ",h.editor.prevBrowserUrl," to ",e),h.editor.prevBrowserUrl=e,h.updateAllDataStores("iframe-url",e),h.editor.remoteQueryAssetLoading(e)}},iframe:{win:null,doc:null,userInteraction:null,init:function(){h.log("We run iframe init"),h.MTDynFrontData.hasBlocks=!0;let e=h.isInsideMT();e&&e.adjustLogicForBlockContent(h.MTDynFrontData,window,window.parent),h.iframeHasBlocks&&h.blocksReadyMaybeObserve()},userInteractionHappened:function(){h.iframe.userInteraction=!0,h.log("userInteractionHappened",h.context)},isPreviewThumb:function(){}}};return document.addEventListener("DOMContentLoaded",e=>{h.DOMContentLoaded++;let t=document.body.classList,o=document.documentElement.classList,n="block-editor-block-preview__content-iframe";h.isEditor=t.contains("block-editor-page"),h.isIframe=t.contains("block-editor-iframe__body"),h.isPreviewIframe=t.contains(n)||o.contains(n),h.doBlockChecks(document),h.isPreviewIframe?h.log("Do not run any code when iframe is loaded as a thumbnail preview","/wp-admin/site-editor.php?path=%2Fpatterns"):(h.context=h.isIframe?"iframe":"editor",h.setVars(),h[h.context].init())},{once:!0}),h}());