(()=>{"use strict";const t=window.wp.data;!function(){const e=window.onepressEditorContentWidth;if(!e||!e.postType)return;let n=null,o=!1;(0,t.subscribe)(function(){const s=(0,t.select)("core/editor");if(!s||!s.getEditedPostAttribute)return;const i=s.getEditedPostAttribute("template")||"";var r;o&&i===n||(n=i,o=!0,function(t){const e=document.querySelector('iframe[name="editor-canvas"]');e&&e.contentDocument&&e.contentDocument.documentElement.style.setProperty("--wp--style--global--content-size",t)}((r=function(t){return"page"===e.postType&&t&&e.templateMap[t]?e.templateMap[t]:"post"===e.postType&&e.singleLayout&&"default"!==e.singleLayout?e.singleLayout:e.siteLayout||"right-sidebar"}(i),"stretched"===r?"100vw":"post"===e.postType&&e.singleContentWidth>0?e.singleContentWidth+"px":("left-sidebar"===r||"right-sidebar"===r?e.sidebarBase:e.noSidebarBase)+"px")))})}()})();