7 lines
105 KiB
JavaScript
7 lines
105 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.editSite=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="IqXm")}({"1ZqX":function(e,t){e.exports=window.wp.data},"1iEr":function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=a},"2gm7":function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=a},"51Zz":function(e,t){e.exports=window.wp.dataControls},"6aBm":function(e,t){e.exports=window.wp.mediaUtils},B9Az:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");var a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=a},Cg8A:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=a},Civd:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},IqXm:function(e,t,n){"use strict";n.r(t),n.d(t,"reinitializeEditor",(function(){return Ir})),n.d(t,"initialize",(function(){return Cr})),n.d(t,"__experimentalMainDashboardButton",(function(){return dt})),n.d(t,"__experimentalNavigationToggle",(function(){return wr})),n.d(t,"PluginSidebar",(function(){return xr})),n.d(t,"PluginSidebarMoreMenuItem",(function(){return Tr})),n.d(t,"PluginMoreMenuItem",(function(){return kr}));var r={};n.r(r),n.d(r,"toggleFeature",(function(){return G})),n.d(r,"__experimentalSetPreviewDeviceType",(function(){return z})),n.d(r,"setTemplate",(function(){return U})),n.d(r,"addTemplate",(function(){return H})),n.d(r,"removeTemplate",(function(){return q})),n.d(r,"setTemplatePart",(function(){return W})),n.d(r,"pushTemplatePart",(function(){return $})),n.d(r,"setHomeTemplateId",(function(){return X})),n.d(r,"setPage",(function(){return Y})),n.d(r,"goBack",(function(){return K})),n.d(r,"showHomepage",(function(){return Q})),n.d(r,"setNavigationPanelActiveMenu",(function(){return Z})),n.d(r,"openNavigationPanelToMenu",(function(){return J})),n.d(r,"setIsNavigationPanelOpened",(function(){return ee})),n.d(r,"setIsInserterOpened",(function(){return te})),n.d(r,"updateSettings",(function(){return ne})),n.d(r,"setIsListViewOpened",(function(){return re})),n.d(r,"revertTemplate",(function(){return ce})),n.d(r,"openGeneralSidebar",(function(){return ae})),n.d(r,"closeGeneralSidebar",(function(){return le}));var c={};n.r(c),n.d(c,"isFeatureActive",(function(){return ue})),n.d(c,"__experimentalGetPreviewDeviceType",(function(){return de})),n.d(c,"getCanUserCreateMedia",(function(){return me})),n.d(c,"getSettings",(function(){return be})),n.d(c,"getHomeTemplateId",(function(){return pe})),n.d(c,"getEditedPostType",(function(){return je})),n.d(c,"getEditedPostId",(function(){return ge})),n.d(c,"getPreviousEditedPostType",(function(){return Ee})),n.d(c,"getPreviousEditedPostId",(function(){return fe})),n.d(c,"getPage",(function(){return he})),n.d(c,"getNavigationPanelActiveMenu",(function(){return ve})),n.d(c,"getCurrentTemplateNavigationPanelSubMenu",(function(){return ye})),n.d(c,"isNavigationOpened",(function(){return Se})),n.d(c,"isInserterOpened",(function(){return we})),n.d(c,"__experimentalGetInsertionPoint",(function(){return xe})),n.d(c,"isListViewOpened",(function(){return Te})),n.d(c,"getCurrentTemplateTemplateParts",(function(){return ke}));var a=n("GRId"),l=n("HSyU"),o=n("QyPg"),i=n("1ZqX"),s=n("jZUy"),u=n("rrFr"),d=n.n(u),m=n("tI+e"),b=n("l3Sj"),p=n("TvNi"),O=n("ywyh"),_=n.n(O),j=n("Tqx9");var g=Object(a.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(j.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})),E=n("YLtl");const{Fill:f,Slot:h}=Object(m.createSlotFill)("EditSiteToolsMoreMenuGroup");f.Slot=e=>{let{fillProps:t}=e;return Object(a.createElement)(h,{fillProps:t},e=>!Object(E.isEmpty)(e)&&Object(a.createElement)(m.MenuGroup,{label:Object(b.__)("Tools")},e))};var v=f;Object(p.registerPlugin)("edit-site",{render:()=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v,null,Object(a.createElement)(m.MenuItem,{role:"menuitem",icon:g,onClick:()=>_()({path:"/__experimental/edit-site/v1/export",parse:!1}).then(e=>e.blob()).then(e=>d()(e,"edit-site-export.zip","application/zip")),info:Object(b.__)("Download your templates and template parts.")},Object(b.__)("Export"))))});var y=n("g56x"),S=n("6aBm");Object(y.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",()=>S.MediaUpload);var w=n("51Zz");const x={features:{}},T="core/edit-site",k={header:Object(b.__)("Header"),footer:Object(b.__)("Footer"),sidebar:Object(b.__)("Sidebar"),uncategorized:Object(b.__)("General")},I=["index","singular","archive","single","page","home","404","search","author","category","taxonomy","date","tag","attachment","single-post","front-page"],C=["page-home"],P=["post-","author-","single-post-","tag-"],N=["page-"],R={singular:["single","page"],index:["archive","404","search","singular","home"],home:["front-page"]},M=[{area:"header",menu:"template-parts-headers",title:Object(b.__)("headers")},{area:"footer",menu:"template-parts-footers",title:Object(b.__)("footers")},{area:"sidebar",menu:"template-parts-sidebars",title:Object(b.__)("sidebars")},{area:"uncategorized",menu:"template-parts-general",title:Object(b.__)("general")}],A=Object(i.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x.features,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_FEATURE":return{...e,[t.feature]:!e[t.feature]};default:return e}}});var B=Object(i.combineReducers)({preferences:A,deviceType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},editedPost:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE":case"SET_PAGE":return[{type:"wp_template",id:t.templateId,page:t.page}];case"SET_TEMPLATE_PART":return[{type:"wp_template_part",id:t.templatePartId}];case"PUSH_TEMPLATE_PART":return[...e,{type:"wp_template_part",id:t.templatePartId}];case"GO_BACK":return e.slice(0,-1)}return e},homeTemplateId:function(e,t){switch(t.type){case"SET_HOME_TEMPLATE":return t.homeTemplateId}return e},navigationPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{menu:"root",isOpen:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NAVIGATION_PANEL_ACTIVE_MENU":return{...e,menu:t.menu};case"OPEN_NAVIGATION_PANEL_TO_MENU":return{...e,isOpen:!0,menu:t.menu};case"SET_IS_NAVIGATION_PANEL_OPENED":return{...e,menu:t.isOpen?e.menu:"root",isOpen:t.isOpen};case"SET_IS_LIST_VIEW_OPENED":return{...e,menu:e.isOpen&&t.isOpen?"root":e.menu,isOpen:!t.isOpen&&e.isOpen};case"SET_IS_INSERTER_OPENED":return{...e,menu:e.isOpen&&t.value?"root":e.menu,isOpen:!t.value&&e.isOpen}}return e},blockInserterPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}}),L=n("Mmq9"),D=n("onLe"),F=n("U60i");function V(e){return!!e&&("custom"===(null==e?void 0:e.source)&&(null==e?void 0:e.has_theme_file))}function G(e){return{type:"TOGGLE_FEATURE",feature:e}}function z(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function*U(e,t){const n={templateSlug:t};if(!t){const t=yield i.controls.resolveSelect(s.store,"getEntityRecord","postType","wp_template",e);n.templateSlug=null==t?void 0:t.slug}return{type:"SET_TEMPLATE",templateId:e,page:{context:n}}}function*H(e){const t=yield i.controls.dispatch(s.store,"saveEntityRecord","postType","wp_template",e);return e.content&&(yield i.controls.dispatch(s.store,"editEntityRecord","postType","wp_template",t.id,{blocks:Object(l.parse)(e.content)},{undoIgnore:!0})),{type:"SET_TEMPLATE",templateId:t.id,page:{context:{templateSlug:t.slug}}}}function*q(e){yield Object(w.apiFetch)({path:"/wp/v2/templates/"+e,method:"DELETE"});const t=yield i.controls.select(T,"getPage");yield i.controls.dispatch(T,"setPage",t)}function W(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function $(e){return{type:"PUSH_TEMPLATE_PART",templatePartId:e}}function X(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}function*Y(e){var t;if(!e.path&&null!==(t=e.context)&&void 0!==t&&t.postId){const t=yield i.controls.resolveSelect(s.store,"getEntityRecord","postType",e.context.postType||"post",e.context.postId);e.path=Object(L.getPathAndQueryString)(t.link)}const{id:n,slug:r}=yield i.controls.resolveSelect(s.store,"__experimentalGetTemplateForLink",e.path);return yield{type:"SET_PAGE",page:r?{...e,context:{...e.context,templateSlug:r}}:e,templateId:n},n}function K(){return{type:"GO_BACK"}}function*Q(){const{show_on_front:e,page_on_front:t}=yield i.controls.resolveSelect(s.store,"getEntityRecord","root","site"),{siteUrl:n}=yield i.controls.select(T,"getSettings"),r={path:n,context:"page"===e?{postType:"page",postId:t}:{}},c=yield*Y(r);yield X(c)}function Z(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function J(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function ee(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function te(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function ne(e){return{type:"UPDATE_SETTINGS",settings:e}}function re(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function*ce(e){if(V(e))try{var t;const n=yield i.controls.select(s.store,"getEntity","postType",e.type);if(!n)return void(yield i.controls.dispatch(D.store,"createErrorNotice",Object(b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const r=Object(L.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:"theme"}),c=yield Object(w.apiFetch)({path:r});if(!c)return void(yield i.controls.dispatch(D.store,"createErrorNotice",Object(b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const a=e=>{let{blocks:t=[]}=e;return Object(l.__unstableSerializeAndClean)(t)},o=yield i.controls.select(s.store,"getEditedEntityRecord","postType",e.type,e.id);yield i.controls.dispatch(s.store,"editEntityRecord","postType",e.type,e.id,{content:a,blocks:o.blocks,source:"custom"},{undoIgnore:!0});const u=Object(l.parse)(null==c||null===(t=c.content)||void 0===t?void 0:t.raw);yield i.controls.dispatch(s.store,"editEntityRecord","postType",e.type,c.id,{content:a,blocks:u,source:"theme"});const d=async()=>{await Object(i.dispatch)(s.store).editEntityRecord("postType",e.type,o.id,{content:a,blocks:o.blocks,source:"custom"})};yield i.controls.dispatch(D.store,"createSuccessNotice",Object(b.__)("Template reverted."),{type:"snackbar",actions:[{label:Object(b.__)("Undo"),onClick:d}]})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(b.__)("Template revert failed. Please reload.");yield i.controls.dispatch(D.store,"createErrorNotice",t,{type:"snackbar"})}else yield i.controls.dispatch(D.store,"createErrorNotice",Object(b.__)("This template is not revertable."),{type:"snackbar"})}function*ae(e){yield i.controls.dispatch(F.i,"enableComplementaryArea",T,e)}function*le(){yield i.controls.dispatch(F.i,"disableComplementaryArea",T)}var oe=n("pPDe");function ie(e,t,n){return!!R[e]&&("home"===e&&"posts"!==n||R[e].every(e=>t.includes(e)||ie(e,t,n)))}function se(e){if(I.includes(e))return"templates";if(C.includes(e))return"templates-general";if(P.some(t=>e.startsWith(t)))return"templates-posts";return N.some(t=>e.startsWith(t))?"templates-pages":"templates-general"}function ue(e,t){return Object(E.get)(e.preferences.features,[t],!1)}function de(e){return e.deviceType}const me=Object(i.createRegistrySelector)(e=>()=>e(s.store).canUser("create","media")),be=Object(oe.a)((e,t)=>{const n={...e.settings,outlineMode:!0,focusMode:ue(e,"focusMode"),hasFixedToolbar:ue(e,"fixedToolbar"),__experimentalSetIsInserterOpened:t};return me(e)?(n.mediaUpload=t=>{let{onError:n,...r}=t;Object(S.uploadMedia)({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:e=>{let{message:t}=e;return n(t)},...r})},n):n},e=>[me(e),e.settings,ue(e,"focusMode"),ue(e,"fixedToolbar")]);function pe(e){return e.homeTemplateId}function Oe(e){return e.editedPost[e.editedPost.length-1]||{}}function _e(e){return e.editedPost[e.editedPost.length-2]||{}}function je(e){return Oe(e).type}function ge(e){return Oe(e).id}function Ee(e){return _e(e).type}function fe(e){return _e(e).id}function he(e){return Oe(e).page}function ve(e){return e.navigationPanel.menu}const ye=Object(i.createRegistrySelector)(e=>t=>{const n=je(t),r=ge(t),c=r?e(s.store).getEntityRecord("postType",n,r):null;if(!c)return"root";var a;if("wp_template_part"===n)return(null===(a=M.find(e=>e.area===(null==c?void 0:c.area)))||void 0===a?void 0:a.menu)||"template-parts";const l=e(s.store).getEntityRecords("postType","wp_template"),o=e(s.store).getEditedEntityRecord("root","site").show_on_front;return ie(c.slug,Object(E.map)(l,"slug"),o)?"templates-unused":se(c.slug)});function Se(e){return e.navigationPanel.isOpen}function we(e){return!!e.blockInserterPanel}function xe(e){const{rootClientId:t,insertionIndex:n,filterValue:r}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n,filterValue:r}}function Te(e){return e.listViewPanel}const ke=Object(i.createRegistrySelector)(e=>t=>{var n;const r=je(t),c=ge(t),a=e(s.store).getEditedEntityRecord("postType",r,c),o=e(s.store).getEntityRecords("postType","wp_template_part"),i=Object(E.keyBy)(o,e=>e.id);return(null!==(n=a.blocks)&&void 0!==n?n:[]).filter(e=>Object(l.isTemplatePart)(e)).map(e=>{const{attributes:{theme:t,slug:n}}=e;return{templatePart:i[`${t}//${n}`],block:e}}).filter(e=>{let{templatePart:t}=e;return!!t})}),Ie={reducer:B,actions:r,selectors:c,controls:w.controls,persist:["preferences"]},Ce=Object(i.createReduxStore)(T,Ie);Object(i.registerStore)(T,Ie);var Pe=n("axFQ"),Ne=n("jSdM"),Re=n("hF7m"),Me=n("K9lf"),Ae=n("Q4Sy"),Be=n("OzlF"),Le=n("wduq");var De=function(e){let{icon:t}=e;const{isRequestingSiteIcon:n,siteIconUrl:r}=Object(i.useSelect)(e=>{const{getEntityRecord:t,isResolving:n}=e(s.store),r=t("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:n("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.site_icon_url}},[]),c=Object(Me.useReducedMotion)();let l=Object(a.createElement)(m.Icon,{size:"36px",icon:Le.a});const o={expand:{scale:1.7,borderRadius:0,transition:{type:"tween",duration:"0.2"}}};return r?l=Object(a.createElement)(m.__unstableMotion.img,{variants:!c&&o,alt:Object(b.__)("Site Icon"),className:"edit-site-navigation-link__site-icon",src:r}):n?l=null:t&&(l=Object(a.createElement)(m.Icon,{size:"36px",icon:t})),Object(a.createElement)(m.__unstableMotion.div,{className:"edit-site-navigation-link",whileHover:"expand"},Object(a.createElement)(m.Button,{className:"edit-site-navigation-link__button has-icon",label:Object(b.__)("Dashboard"),href:"index.php"},l))},Fe=n("VKE3"),Ve=n("RMJe"),Ge=n("gdqT");function ze(e){let{feature:t,label:n,info:r,messageActivated:c,messageDeactivated:l}=e;const o=Object(i.useSelect)(e=>e(Ce).isFeatureActive(t),[]),{toggleFeature:s}=Object(i.useDispatch)(Ce);return Object(a.createElement)(m.MenuItem,{icon:o&&Ve.a,isSelected:o,onClick:Object(E.flow)(s.bind(null,t),()=>{o?Object(Ge.speak)(l||Object(b.__)("Feature deactivated")):Object(Ge.speak)(c||Object(b.__)("Feature activated"))}),role:"menuitemcheckbox",info:r},n)}const Ue={className:"edit-site-more-menu__content",position:"bottom left"},He={tooltipPosition:"bottom"};var qe=()=>Object(a.createElement)(m.DropdownMenu,{className:"edit-site-more-menu",icon:Fe.a,label:Object(b.__)("More tools & options"),popoverProps:Ue,toggleProps:He},e=>{let{onClose:t}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(b._x)("View","noun")},Object(a.createElement)(ze,{feature:"fixedToolbar",label:Object(b.__)("Top toolbar"),info:Object(b.__)("Access all block and document tools in a single place"),messageActivated:Object(b.__)("Top toolbar activated"),messageDeactivated:Object(b.__)("Top toolbar deactivated")}),Object(a.createElement)(ze,{feature:"focusMode",label:Object(b.__)("Spotlight mode"),info:Object(b.__)("Focus on one block at a time"),messageActivated:Object(b.__)("Spotlight mode activated"),messageDeactivated:Object(b.__)("Spotlight mode deactivated")}),Object(a.createElement)(F.a.Slot,{name:"core/edit-site/plugin-more-menu",label:Object(b.__)("Plugins"),as:m.MenuGroup,fillProps:{onClick:t}})),Object(a.createElement)(v.Slot,{fillProps:{onClose:t}}))});function We(e){let{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}=e;const{isDirty:r,isSaving:c}=Object(i.useSelect)(e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(s.store),r=t();return{isDirty:r.length>0,isSaving:Object(E.some)(r,e=>n(e.kind,e.name,e.key))}},[]),l=!r||c;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.Button,{variant:"primary",className:"edit-site-save-button__button","aria-disabled":l,"aria-expanded":n,disabled:l,isBusy:c,onClick:l?void 0:t},Object(b.__)("Save")))}var $e=n("Ntru"),Xe=n("K2cm"),Ye=n("RxS6");function Ke(){const e=Object(i.useSelect)(e=>e(s.store).hasUndo(),[]),{undo:t}=Object(i.useDispatch)(s.store);return Object(a.createElement)(m.Button,{icon:Object(b.isRTL)()?Xe.a:$e.a,label:Object(b.__)("Undo"),shortcut:Ye.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}function Qe(){const e=Object(i.useSelect)(e=>e(s.store).hasRedo(),[]),{redo:t}=Object(i.useDispatch)(s.store);return Object(a.createElement)(m.Button,{icon:Object(b.isRTL)()?$e.a:Xe.a,label:Object(b.__)("Redo"),shortcut:Ye.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var Ze=n("TSYQ"),Je=n.n(Ze),et=n("NWDH");function tt(e){if(e){const t=Object(l.getBlockType)(e.name);return t?Object(l.__experimentalGetBlockLabel)(t,e.attributes):null}return null}function nt(e){let{entityTitle:t,entityLabel:n,isLoaded:r,children:c}=e;const{label:l}=function(){const{getBlock:e}=Object(i.useSelect)(Pe.store),t=Object(i.useSelect)(e=>e(Pe.store).__experimentalGetActiveBlockIdByBlockNames(["core/template-part"]),[]);return t?{label:tt(e(t)),isActive:!0}:{}}(),o=Object(a.useRef)();return r?t?Object(a.createElement)("div",{className:Je()("edit-site-document-actions",{"has-secondary-label":!!l})},Object(a.createElement)("div",{ref:o,className:"edit-site-document-actions__title-wrapper"},Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-document-actions__title-prefix"},Object(a.createElement)(m.VisuallyHidden,{as:"span"},Object(b.sprintf)(Object(b.__)("Editing %s:"),n))),Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-document-actions__title",as:"h1"},t),Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-document-actions__secondary-item"},null!=l?l:""),c&&Object(a.createElement)(m.Dropdown,{popoverProps:{anchorRef:o.current},position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:r}=e;return Object(a.createElement)(m.Button,{className:"edit-site-document-actions__get-info",icon:et.a,"aria-expanded":t,"aria-haspopup":"true",onClick:r,label:Object(b.sprintf)(Object(b.__)("Show %s details"),n)})},contentClassName:"edit-site-document-actions__info-dropdown",renderContent:c}))):Object(a.createElement)("div",{className:"edit-site-document-actions"},Object(b.__)("Template not found")):Object(a.createElement)("div",{className:"edit-site-document-actions"},Object(b.__)("Loading…"))}function rt(e){var t;let{onClose:n,templatePart:r,closeTemplateDetailsDropdown:c}=e;const{pushTemplatePart:l,revertTemplate:o}=Object(i.useDispatch)(Ce);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,null,Object(a.createElement)(m.MenuItem,{onClick:function(){l(r.id),n(),c()}},Object(b.sprintf)(Object(b.__)("Edit %s"),null===(t=r.title)||void 0===t?void 0:t.rendered))),V(r)&&Object(a.createElement)(m.MenuGroup,null,Object(a.createElement)(m.MenuItem,{info:Object(b.__)("Restore template to theme default"),onClick:function(){o(r),n(),c()}},Object(b.__)("Clear customizations"))))}function ct(e){let{templatePart:t,clientId:n,closeTemplateDetailsDropdown:r}=e;const{selectBlock:c,toggleBlockHighlight:l}=Object(i.useDispatch)(Pe.store),o=()=>l(n,!0),s=()=>l(n,!1);return Object(a.createElement)("div",{role:"menuitem",className:"edit-site-template-details__template-areas-item"},Object(a.createElement)(m.MenuItem,{role:"button",icon:Object(Ne.getTemplatePartIcon)(t.area),iconPosition:"left",onClick:()=>{c(n)},onMouseOver:o,onMouseLeave:s,onFocus:o,onBlur:s},k[t.area]),Object(a.createElement)(m.DropdownMenu,{icon:Fe.a,label:Object(b.__)("More options"),className:"edit-site-template-details__template-areas-item-more"},e=>{let{onClose:n}=e;return Object(a.createElement)(rt,{onClose:n,templatePart:t,closeTemplateDetailsDropdown:r})}))}function at(e){let{closeTemplateDetailsDropdown:t}=e;const n=Object(i.useSelect)(e=>e(Ce).getCurrentTemplateTemplateParts(),[]);return n.length?Object(a.createElement)(m.MenuGroup,{label:Object(b.__)("Areas"),className:"edit-site-template-details__group edit-site-template-details__template-areas"},n.map(e=>{let{templatePart:n,block:r}=e;return Object(a.createElement)(ct,{key:n.slug,clientId:r.clientId,templatePart:n,closeTemplateDetailsDropdown:t})})):null}function lt(e){let{template:t,onClose:n}=e;const{title:r,description:c}=Object(i.useSelect)(e=>e(Ne.store).__experimentalGetTemplateInfo(t),[]),{revertTemplate:l}=Object(i.useDispatch)(Ce),o=Object(a.useMemo)(()=>"wp_template"===(null==t?void 0:t.type)?{title:Object(b.__)("templates"),menu:"templates"}:M.find(e=>{let{area:n}=e;return n===(null==t?void 0:t.area)}),[t]);if(!t)return null;return Object(a.createElement)("div",{className:"edit-site-template-details"},Object(a.createElement)("div",{className:"edit-site-template-details__group"},Object(a.createElement)(m.__experimentalHeading,{level:4,weight:600,className:"edit-site-template-details__title"},r),c&&Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-template-details__description",as:"p"},c)),Object(a.createElement)(at,{closeTemplateDetailsDropdown:n}),V(t)&&Object(a.createElement)(m.MenuGroup,{className:"edit-site-template-details__group edit-site-template-details__revert"},Object(a.createElement)(m.MenuItem,{className:"edit-site-template-details__revert-button",info:Object(b.__)("Restore template to theme default"),onClick:()=>{l(t),n()}},Object(b.__)("Clear customizations"))),Object(a.createElement)(m.Button,{className:"edit-site-template-details__show-all-button",href:Object(L.addQueryArgs)("edit.php",{post_type:t.type})},Object(b.sprintf)(Object(b.__)("Browse all %s"),o.title)))}const ot="__experimentalMainDashboardButton",{Fill:it,Slot:st}=Object(m.createSlotFill)(ot),ut=it;ut.Slot=e=>{let{children:t}=e;const n=Object(m.__experimentalUseSlot)(ot);return Boolean(n.fills&&n.fills.length)?Object(a.createElement)(st,{bubblesVirtually:!0}):t};var dt=ut;const mt=e=>{e.preventDefault()};function bt(e){let{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}=e;const r=Object(a.useRef)(),{deviceType:c,entityTitle:l,template:o,templateType:u,isInserterOpen:d,isListViewOpen:p,listViewShortcut:O,isLoaded:_}=Object(i.useSelect)(e=>{const{__experimentalGetPreviewDeviceType:t,getEditedPostType:n,getEditedPostId:r,isInserterOpened:c,isListViewOpened:a}=e(Ce),{getEditedEntityRecord:l}=e(s.store),{__experimentalGetTemplateInfo:o}=e(Ne.store),{getShortcutRepresentation:i}=e(Re.store),u=n(),d=r(),m=l("postType",u,d),b=!!d;return{deviceType:t(),entityTitle:o(m).title,isLoaded:b,template:m,templateType:u,isInserterOpen:c(),isListViewOpen:a(),listViewShortcut:i("core/edit-site/toggle-list-view")}},[]),{__experimentalSetPreviewDeviceType:j,setIsInserterOpened:g,setIsListViewOpened:E}=Object(i.useDispatch)(Ce),f=Object(Me.useViewportMatch)("medium"),h=Object(a.useCallback)(()=>{d?r.current.focus():g(!0)},[d,g]),v=Object(a.useCallback)(()=>E(!p),[E,p]),y="wp_template_part"===u;return Object(a.createElement)("div",{className:"edit-site-header"},Object(a.createElement)("div",{className:"edit-site-header_start"},Object(a.createElement)(dt.Slot,null,Object(a.createElement)(De,null)),Object(a.createElement)("div",{className:"edit-site-header__toolbar"},Object(a.createElement)(m.Button,{ref:r,variant:"primary",isPressed:d,className:"edit-site-header-toolbar__inserter-toggle",onMouseDown:mt,onClick:h,icon:Ae.a,label:Object(b._x)("Toggle block inserter","Generic label for block inserter button")}),f&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Pe.ToolSelector,null),Object(a.createElement)(Ke,null),Object(a.createElement)(Qe,null),Object(a.createElement)(m.Button,{className:"edit-site-header-toolbar__list-view-toggle",icon:Be.a,isPressed:p,label:Object(b.__)("List View"),onClick:v,shortcut:O})))),Object(a.createElement)("div",{className:"edit-site-header_center"},Object(a.createElement)(nt,{entityTitle:l,entityLabel:"wp_template_part"===u?"template part":"template",isLoaded:_},e=>{let{onClose:t}=e;return Object(a.createElement)(lt,{template:o,onClose:t})})),Object(a.createElement)("div",{className:"edit-site-header_end"},Object(a.createElement)("div",{className:"edit-site-header__actions"},!y&&Object(a.createElement)(Pe.__experimentalPreviewOptions,{deviceType:c,setDeviceType:j}),Object(a.createElement)(We,{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}),Object(a.createElement)(F.h.Slot,{scope:"core/edit-site"}),Object(a.createElement)(qe,null))))}var pt=n("Cg8A");function Ot(e){let{className:t,identifier:n,title:r,icon:c,children:l,closeLabel:o,header:i,headerClassName:s}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(F.b,{className:t,scope:"core/edit-site",identifier:n,title:r,icon:c,closeLabel:o,header:i,headerClassName:s},l),Object(a.createElement)(F.c,{scope:"core/edit-site",identifier:n,icon:c},r))}var _t=Object(a.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(j.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const jt=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["typography","fontSizes"],valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]}],gt={"color.background":"color","color.text":"color","elements.link.color.text":"color","color.gradient":"gradient","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Et(e,t,n,r,c){const a=[Object(E.get)(e,["blocks",t,...n]),Object(E.get)(e,n)];for(const l of a)if(l){const a=["user","theme","core"];for(const o of a){const a=l[o];if(a){const l=Object(E.find)(a,e=>e[r]===c);if(l){if("slug"===r)return l;return Et(e,t,n,"slug",l.slug)[r]===l[r]?l:void 0}}}}}function ft(e,t,n,r){if(!r)return r;const c=gt[n],a=Object(E.find)(jt,["cssVarInfix",c]);if(!a)return r;const{valueKey:l,path:o}=a,i=Et(e,t,o,l,r);return i?`var:preset|${c}|${i.slug}`:r}function ht(e,t,n){if(!n||!Object(E.isString)(n))return n;let r;if(n.startsWith("var:"))r=n.slice("var:".length).split("|");else{if(!n.startsWith("var(--wp--")||!n.endsWith(")"))return n;r=n.slice("var(--wp--".length,-")".length).split("--")}const[c,...a]=r;return"preset"===c?function(e,t,n,r){let[c,a]=r;const l=Object(E.find)(jt,["cssVarInfix",c]);if(!l)return n;const o=Et(e,t,l.path,"slug",a);if(o){const{valueKey:n}=l;return ht(e,t,o[n])}return n}(e,t,n,a):"custom"===c?function(e,t,n,r){var c;const a=null!==(c=Object(E.get)(e,["blocks",t,"custom",...r]))&&void 0!==c?c:Object(E.get)(e,["custom",...r]);return a?ht(e,t,a):n}(e,t,n,a):n}const vt=Object(a.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),yt={isGlobalStylesUserThemeJSON:!0,version:1};function St(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:c,base:o,user:i,setUserConfig:s}=Object(a.useContext)(vt),u=t?`settings.blocks.${t}.${e}`:"settings."+e,d=t=>{s(n=>{const r=Object(E.cloneDeep)(n),c=l.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?u+".user":u;return Object(E.set)(r,c,t),r})},m=t=>{const n=t?`settings.blocks.${t}.${e}`:"settings."+e,a=t=>{const r=Object(E.get)(t,n);var c,a;return l.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?null!==(c=null!==(a=null==r?void 0:r.user)&&void 0!==a?a:null==r?void 0:r.theme)&&void 0!==c?c:null==r?void 0:r.core:r};let s;switch(r){case"all":s=a(c);break;case"user":s=a(i);break;case"base":s=a(o);break;default:throw"Unsupported source"}return s},b=null!==(n=m(t))&&void 0!==n?n:m();return[b,d]}function wt(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:c,base:l,user:o,setUserConfig:i}=Object(a.useContext)(vt),s=t?`styles.blocks.${t}.${e}`:"styles."+e,u=n=>{i(r=>{const a=Object(E.cloneDeep)(r);return Object(E.set)(a,s,ft(c.settings,t,e,n)),a})};let d;switch(r){case"all":d=ht(c.settings,t,null!==(n=Object(E.get)(o,s))&&void 0!==n?n:Object(E.get)(l,s));break;case"user":d=ht(c.settings,t,Object(E.get)(o,s));break;case"base":d=ht(l.settings,t,Object(E.get)(l,s));break;default:throw"Unsupported source"}return[d,u]}const xt=["background","backgroundColor","color","linkColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textDecoration","textTransform","padding"];function Tt(e){if(!e)return xt;const t=Object(l.getBlockType)(e);if(!t)return[];const n=[];return Object.keys(l.__EXPERIMENTAL_STYLE_PROPERTY).forEach(e=>{if(l.__EXPERIMENTAL_STYLE_PROPERTY[e].support)return l.__EXPERIMENTAL_STYLE_PROPERTY[e].requiresOptOut&&Object(E.has)(t.supports,l.__EXPERIMENTAL_STYLE_PROPERTY[e].support[0])&&!1!==Object(E.get)(t.supports,l.__EXPERIMENTAL_STYLE_PROPERTY[e].support)||Object(E.get)(t.supports,l.__EXPERIMENTAL_STYLE_PROPERTY[e].support,!1)?n.push(e):void 0}),n}function kt(e){const[t]=St("color.palette.user",e),[n]=St("color.palette.theme",e),[r]=St("color.palette.core",e);return Object(a.useMemo)(()=>{const e=[];return r&&r.length&&e.push({name:Object(b.__)("Core"),colors:r}),n&&n.length&&e.push({name:Object(b.__)("Theme"),colors:n}),t&&t.length&&e.push({name:Object(b.__)("User"),colors:t}),e},[t,n,r])}var It=()=>{const[e="serif"]=wt("typography.fontFamily"),[t="black"]=wt("color.text"),[n="blue"]=wt("elements.link.color.text"),[r="white"]=wt("color.background"),[c]=wt("color.gradient");return Object(a.createElement)(m.Card,{className:"edit-site-global-styles-preview",style:{background:null!=c?c:r}},Object(a.createElement)(m.__experimentalHStack,{spacing:5},Object(a.createElement)("div",{style:{fontFamily:e,fontSize:"80px",color:t}},"Aa"),Object(a.createElement)(m.__experimentalVStack,{spacing:2},Object(a.createElement)(m.ColorIndicator,{colorValue:t}),Object(a.createElement)(m.ColorIndicator,{colorValue:n}))))},Ct=n("wx14"),Pt=n("iClF");var Nt=function(e){let{path:t,icon:n,children:r,isBack:c=!1,...l}=e;const o=Object(m.__experimentalUseNavigator)();return Object(a.createElement)(m.__experimentalItem,Object(Ct.a)({onClick:()=>o.push(t,{isBack:c})},l),n&&Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(Pt.a,{icon:n,size:24})),Object(a.createElement)(m.FlexItem,null,r)),!n&&r)};var Rt=Object(a.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(j.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"}));var Mt=Object(a.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(j.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})),At=n("Civd");const Bt=[];function Lt(e){return[Dt(e),Ft(e),Vt(e),Gt(e)].some(Boolean)}function Dt(e){const t=Tt(e);return St("border.color",e)[0]&&t.includes("borderColor")}function Ft(e){const t=Tt(e);return St("border.radius",e)[0]&&t.includes("borderRadius")}function Vt(e){const t=Tt(e);return St("border.style",e)[0]&&t.includes("borderStyle")}function Gt(e){const t=Tt(e);return St("border.width",e)[0]&&t.includes("borderWidth")}function zt(e){let{name:t}=e;const n=Object(m.__experimentalUseCustomUnits)({availableUnits:St("spacing.units")[0]||["px","em","rem"]}),r=Gt(t),[c,l]=wt("border.width",t),o=Vt(t),[i,s]=wt("border.style",t),[u=Bt]=St("color.palette"),d=!St("color.custom")[0],p=!St("color.customGradient")[0],O=Dt(t),[_,j]=wt("border.color",t),g=Ft(t),[E,f]=wt("border.radius",t);return Object(a.createElement)(m.PanelBody,{title:Object(b.__)("Border"),initialOpen:!0},(r||o)&&Object(a.createElement)("div",{className:"edit-site-global-styles-sidebar__border-controls-row"},r&&Object(a.createElement)(m.__experimentalUnitControl,{value:c,label:Object(b.__)("Width"),min:0,onChange:e=>{l(e||void 0)},units:n}),o&&Object(a.createElement)(Pe.__experimentalBorderStyleControl,{value:i,onChange:s})),O&&Object(a.createElement)(Pe.__experimentalColorGradientControl,{label:Object(b.__)("Color"),colorValue:_,colors:u,gradients:void 0,disableCustomColors:d,disableCustomGradients:p,onColorChange:j}),g&&Object(a.createElement)(Pe.__experimentalBorderRadiusControl,{values:E,onChange:f}))}function Ut(e){const t=Tt(e);return t.includes("color")||t.includes("backgroundColor")||t.includes("background")||t.includes("linkColor")}const Ht=["horizontal","vertical"];function qt(e){const t=Wt(e),n=$t(e),r=Xt(e);return t||n||r}function Wt(e){const t=Tt(e),[n]=St("spacing.padding",e);return n&&t.includes("padding")}function $t(e){const t=Tt(e),[n]=St("spacing.margin",e);return n&&t.includes("margin")}function Xt(e){const t=Tt(e),[n]=St("spacing.blockGap",e);return n&&t.includes("--wp--style--block-gap")}function Yt(e,t){if(!t)return e;const n={};return t.forEach(t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e[t]}),n}function Kt(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Qt(e){let{name:t}=e;const n=Wt(t),r=$t(t),c=Xt(t),l=Object(m.__experimentalUseCustomUnits)({availableUnits:St("spacing.units",t)[0]||["%","px","em","rem","vw"]}),[o,i]=wt("spacing.padding",t),s=Kt(o),u=Object(Pe.__experimentalUseCustomSides)(t,"padding"),d=u&&u.some(e=>Ht.includes(e)),p=e=>{const t=Yt(e,u);i(t)},O=()=>p({}),[_,j]=wt("spacing.margin",t),g=Kt(_),E=Object(Pe.__experimentalUseCustomSides)(t,"margin"),f=E&&E.some(e=>Ht.includes(e)),h=e=>{const t=Yt(e,E);j(t)},v=()=>h({}),[y,S]=wt("spacing.blockGap",t),w=()=>S(void 0);return Object(a.createElement)(m.__experimentalToolsPanel,{label:Object(b.__)("Dimensions"),resetAll:()=>{O(),v(),w()}},n&&Object(a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!s&&Object.keys(s).length,label:Object(b.__)("Padding"),onDeselect:O,isShownByDefault:!0},Object(a.createElement)(m.__experimentalBoxControl,{values:s,onChange:p,label:Object(b.__)("Padding"),sides:u,units:l,allowReset:!1,splitOnAxis:d})),r&&Object(a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!g&&Object.keys(g).length,label:Object(b.__)("Margin"),onDeselect:v,isShownByDefault:!0},Object(a.createElement)(m.__experimentalBoxControl,{values:g,onChange:h,label:Object(b.__)("Margin"),sides:E,units:l,allowReset:!1,splitOnAxis:f})),c&&Object(a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!y,label:Object(b.__)("Block spacing"),onDeselect:w,isShownByDefault:!0},Object(a.createElement)(m.__experimentalUnitControl,{label:Object(b.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:S,units:l,value:y})))}function Zt(e){const t=Jt(e),n=en(e),r=tn(e),c=Tt(e);return t||n||r||c.includes("fontSize")}function Jt(e){const t=Tt(e);return St("typography.lineHeight",e)[0]&&t.includes("lineHeight")}function en(e){const t=Tt(e),n=St("typography.fontStyle",e)[0]&&t.includes("fontStyle"),r=St("typography.fontWeight",e)[0]&&t.includes("fontWeight");return n||r}function tn(e){const t=Tt(e);return St("typography.letterSpacing",e)[0]&&t.includes("letterSpacing")}function nn(e){let{name:t}=e;const n=Tt(t),[r]=St("typography.fontSizes",t),c=!St("typography.customFontSize",t)[0],[l]=St("typography.fontFamilies",t),o=St("typography.fontStyle",t)[0]&&n.includes("fontStyle"),i=St("typography.fontWeight",t)[0]&&n.includes("fontWeight"),s=Jt(t),u=en(t),d=tn(t),[b,p]=wt("typography.fontFamily",t),[O,_]=wt("typography.fontSize",t),[j,g]=wt("typography.fontStyle",t),[E,f]=wt("typography.fontWeight",t),[h,v]=wt("typography.lineHeight",t),[y,S]=wt("typography.letterSpacing",t);return Object(a.createElement)(m.PanelBody,{className:"edit-site-typography-panel",initialOpen:!0},n.includes("fontFamily")&&Object(a.createElement)(Pe.__experimentalFontFamilyControl,{fontFamilies:l,value:b,onChange:p}),n.includes("fontSize")&&Object(a.createElement)(m.FontSizePicker,{value:O,onChange:_,fontSizes:r,disableCustomFontSizes:c}),s&&Object(a.createElement)(Pe.LineHeightControl,{value:h,onChange:v}),u&&Object(a.createElement)(Pe.__experimentalFontAppearanceControl,{value:{fontStyle:j,fontWeight:E},onChange:e=>{let{fontStyle:t,fontWeight:n}=e;g(t),f(n)},hasFontStyles:o,hasFontWeights:i}),d&&Object(a.createElement)(Pe.__experimentalLetterSpacingControl,{value:y,onChange:S}))}var rn=function(e){let{name:t,parentMenu:n=""}=e;const r=Zt(t),c=Ut(t),l=Lt(t),o=qt(t),i=l||o;return Object(a.createElement)(m.__experimentalItemGroup,null,r&&Object(a.createElement)(Nt,{icon:Rt,path:n+"/typography"},Object(b.__)("Typography")),c&&Object(a.createElement)(Nt,{icon:Mt,path:n+"/colors"},Object(b.__)("Colors")),i&&Object(a.createElement)(Nt,{icon:At.a,path:n+"/layout"},Object(b.__)("Layout")))};var cn=function(){return Object(a.createElement)(m.Card,{size:"small"},Object(a.createElement)(m.CardBody,null,Object(a.createElement)(It,null)),Object(a.createElement)(m.CardBody,null,Object(a.createElement)(rn,null)),Object(a.createElement)(m.CardDivider,null),Object(a.createElement)(m.CardBody,null,Object(a.createElement)(m.__experimentalItemGroup,null,Object(a.createElement)(m.__experimentalItem,null,Object(a.createElement)("p",null,Object(b.__)("Customize the appearance of specific blocks for the whole site."))),Object(a.createElement)(Nt,{path:"/blocks"},Object(b.__)("Blocks")))))},an=n("1iEr"),ln=n("2gm7");var on=function(e){let{back:t,title:n,description:r}=e;return Object(a.createElement)(m.__experimentalVStack,{spacing:2},Object(a.createElement)(m.__experimentalHStack,{spacing:2},Object(a.createElement)(m.__experimentalView,null,Object(a.createElement)(Nt,{path:t,icon:Object(a.createElement)(Pt.a,{icon:Object(b.isRTL)()?an.a:ln.a,variant:"muted"}),size:"small",isBack:!0,"aria-label":Object(b.__)("Navigate to the previous view")})),Object(a.createElement)(m.__experimentalSpacer,null,Object(a.createElement)(m.__experimentalHeading,{level:5},n))),r&&Object(a.createElement)("p",{className:"edit-site-global-styles-header__description"},r))};function sn(e){let{block:t}=e;const n=Zt(t.name),r=Ut(t.name),c=Lt(t.name),l=qt(t.name);return n||r||(c||l)?Object(a.createElement)(Nt,{path:"/blocks/"+t.name},t.title):null}var un=function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:"/",title:Object(b.__)("Blocks"),description:Object(b.__)("Customize the appearance of specific blocks and for the whole site.")}),Object(l.getBlockTypes)().map(e=>Object(a.createElement)(sn,{block:e,key:"menu-itemblock-"+e.name})))};var dn=function(e){let{name:t}=e;const n=Object(l.getBlockType)(t);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:"/blocks",title:n.title}),Object(a.createElement)(rn,{parentMenu:"/blocks/"+t,name:t}))};var mn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n||"/",title:Object(b.__)("Typography"),description:Object(b.__)("Manage the fonts used on the website and the default aspect of different global elements.")}),Object(a.createElement)(nn,{name:t}))};var bn=function(e){let{children:t}=e;return Object(a.createElement)(m.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:2},t)};const pn=[];var On=function(e){let{name:t}=e;const[n]=St("color.palette.user",t),r=n||pn,c=t?"/blocks/"+t+"/colors/palette":"/colors/palette";return Object(a.createElement)(m.__experimentalVStack,{spacing:3},Object(a.createElement)(bn,null,Object(b.__)("Palette")),Object(a.createElement)(m.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(Nt,{path:c},Object(a.createElement)(m.__experimentalHStack,null,Object(a.createElement)(m.FlexBlock,null,Object(a.createElement)(m.__experimentalZStack,{isLayered:!1,offset:-8},r.slice(0,5).map(e=>{let{color:t}=e;return Object(a.createElement)(m.ColorIndicator,{key:t,colorValue:t})}))),Object(a.createElement)(m.FlexItem,null,Object(b.sprintf)(Object(b._n)("%d color","%d colors",r.length),r.length))))))};function _n(e){let{name:t,parentMenu:n}=e;const r=Tt(t),c=r.includes("backgroundColor")||r.includes("background"),[l]=wt("color.background",t),[o]=wt("color.gradient",t);return c?Object(a.createElement)(Nt,{path:n+"/colors/background"},Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.ColorIndicator,{colorValue:null!=o?o:l})),Object(a.createElement)(m.FlexItem,null,Object(b.__)("Background")))):null}function jn(e){let{name:t,parentMenu:n}=e;const r=Tt(t).includes("color"),[c]=wt("color.text",t);return r?Object(a.createElement)(Nt,{path:n+"/colors/text"},Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.ColorIndicator,{colorValue:c})),Object(a.createElement)(m.FlexItem,null,Object(b.__)("Text")))):null}function gn(e){let{name:t,parentMenu:n}=e;const r=Tt(t).includes("linkColor"),[c]=wt("elements.link.color.text",t);return r?Object(a.createElement)(Nt,{path:n+"/colors/link"},Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.ColorIndicator,{colorValue:c})),Object(a.createElement)(m.FlexItem,null,Object(b.__)("Links")))):null}var En=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n||"/",title:Object(b.__)("Colors"),description:Object(b.__)("Manage palettes and the default color of different global elements on the website.")}),Object(a.createElement)("div",{className:"edit-site-global-styles-screen-colors"},Object(a.createElement)(m.__experimentalVStack,{spacing:10},Object(a.createElement)(On,{name:t}),Object(a.createElement)(m.__experimentalVStack,{spacing:3},Object(a.createElement)(bn,null,Object(b.__)("Elements")),Object(a.createElement)(m.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(_n,{name:t,parentMenu:n}),Object(a.createElement)(jn,{name:t,parentMenu:n}),Object(a.createElement)(gn,{name:t,parentMenu:n}))))))};function fn(e){let{name:t}=e;const[n,r]=St("color.palette",t,"user");return Object(a.createElement)("div",{className:"edit-site-global-styles-color-palette-panel"},Object(a.createElement)(m.__experimentalColorEdit,{colors:n,onChange:r}))}var hn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n+"/colors",title:Object(b.__)("Color Palette"),description:Object(b.__)("Color palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),Object(a.createElement)(fn,{name:t}))};var vn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,r=Tt(t),[c]=St("color.palette",t),[l]=St("color.gradients",t),[o]=St("color.custom",t),[i]=St("color.customGradient",t),s=kt(t),u=function(e){const[t]=St("color.gradients.user",e),[n]=St("color.gradients.theme",e),[r]=St("color.gradients.core",e);return Object(a.useMemo)(()=>{const e=[];return r&&r.length&&e.push({name:Object(b.__)("Core"),gradients:r}),n&&n.length&&e.push({name:Object(b.__)("Theme"),gradients:n}),t&&t.length&&e.push({name:Object(b.__)("User"),gradients:t}),e},[t,n,r])}(t),[d]=St("color.background",t),m=r.includes("backgroundColor")&&d&&(c.length>0||o),p=r.includes("background")&&(l.length>0||i),[O,_]=wt("color.background",t),[j]=wt("color.background",t,"user"),[g,E]=wt("color.gradient",t),[f]=wt("color.gradient",t,"user");if(!m&&!p)return null;const h=[];let v={};m&&(v={colorValue:O,onColorChange:_},O&&(v.clearable=O===j));let y={};return p&&(y={gradientValue:g,onGradientChange:E},g&&(y.clearable=g===f)),h.push({...v,...y,label:Object(b.__)("Background color")}),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n+"/colors",title:Object(b.__)("Background"),description:Object(b.__)("Set a background color or gradient for the whole website.")}),Object(a.createElement)(Pe.__experimentalPanelColorGradientSettings,{title:Object(b.__)("Color"),settings:h,colors:s,gradients:u,disableCustomColors:!o,disableCustomGradients:!i,__experimentalHasMultipleOrigins:!0,showTitle:!1}))};var yn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,r=Tt(t),[c]=St("color.palette",t),[l]=St("color.custom",t),[o]=St("color.text",t),i=kt(t),s=r.includes("color")&&o&&(c.length>0||l),[u,d]=wt("color.text",t),[m]=wt("color.text",t,"user");if(!s)return null;const p=[{colorValue:u,onColorChange:d,label:Object(b.__)("Text color"),clearable:u===m}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n+"/colors",title:Object(b.__)("Text"),description:Object(b.__)("Set the default color used for text across the site.")}),Object(a.createElement)(Pe.__experimentalPanelColorGradientSettings,{title:Object(b.__)("Color"),settings:p,colors:i,disableCustomColors:!l,__experimentalHasMultipleOrigins:!0,showTitle:!1}))};var Sn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,r=Tt(t),[c]=St("color.palette",t),[l]=St("color.custom",t),o=kt(t),[i]=St("color.link",t),s=r.includes("linkColor")&&i&&(c.length>0||l),[u,d]=wt("elements.link.color.text",t),[m]=wt("elements.link.color.text",t,"user");if(!s)return null;const p=[{colorValue:u,onColorChange:d,label:Object(b.__)("Link color"),clearable:u===m}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n+"/colors",title:Object(b.__)("Links"),description:Object(b.__)("Set the default color used for links across the site.")}),Object(a.createElement)(Pe.__experimentalPanelColorGradientSettings,{title:Object(b.__)("Color"),settings:p,colors:o,disableCustomColors:!l,__experimentalHasMultipleOrigins:!0,showTitle:!1}))};var wn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,r=Lt(t),c=qt(t);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(on,{back:n||"/",title:Object(b.__)("Layout")}),c&&Object(a.createElement)(Qt,{name:t}),r&&Object(a.createElement)(zt,{name:t}))};function xn(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/typography"},Object(a.createElement)(mn,{name:t})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/colors"},Object(a.createElement)(En,{name:t})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/colors/palette"},Object(a.createElement)(hn,{name:t})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/colors/background"},Object(a.createElement)(vn,{name:t})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/colors/text"},Object(a.createElement)(yn,{name:t})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/colors/link"},Object(a.createElement)(Sn,{name:t})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:n+"/layout"},Object(a.createElement)(wn,{name:t})))}var Tn=function(){const e=Object(l.getBlockTypes)();return Object(a.createElement)(m.__experimentalNavigatorProvider,{initialPath:"/"},Object(a.createElement)(m.__experimentalNavigatorScreen,{path:"/"},Object(a.createElement)(cn,null)),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:"/blocks"},Object(a.createElement)(un,null)),e.map(e=>Object(a.createElement)(m.__experimentalNavigatorScreen,{key:"menu-block-"+e.name,path:"/blocks/"+e.name},Object(a.createElement)(dn,{name:e.name}))),Object(a.createElement)(xn,null),e.map(e=>Object(a.createElement)(xn,{key:"screens-block-"+e.name,name:e.name})))};function kn(e){if(Object(E.startsWith)(e,"var:")){return`var(--wp--${e.slice("var:".length).split("|").join("--")})`}return e}const In=(e,t)=>{var n,r;const c=[];if(null==e||!e.settings)return c;const a=e=>{const t={};return jt.forEach(n=>{let{path:r}=n;const c=Object(E.get)(e,r,!1);!1!==c&&Object(E.set)(t,r,c)}),t},l=a(e.settings),o=null===(n=e.settings)||void 0===n?void 0:n.custom;return Object(E.isEmpty)(l)&&!o||c.push({presets:l,custom:o,selector:"body"}),Object(E.forEach)(null===(r=e.settings)||void 0===r?void 0:r.blocks,(e,n)=>{const r=a(e),l=e.custom;Object(E.isEmpty)(r)&&!l||c.push({presets:r,custom:l,selector:t[n].selector})}),c},Cn=(e,t)=>{const n=In(e,t);let r="";return n.forEach(e=>{let{presets:t,custom:n,selector:c}=e;const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(E.reduce)(jt,(t,n)=>{let{path:r,valueKey:c,cssVarInfix:a}=n;const l=Object(E.get)(e,r,[]);return["core","theme","user"].forEach(e=>{l[e]&&l[e].forEach(e=>{t.push(`--wp--preset--${a}--${Object(E.kebabCase)(e.slug)}: ${e[c]}`)})}),t},[])}(t),l=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,c=[];return Object.keys(t).forEach(a=>{const l=n+Object(E.kebabCase)(a.replace("/","-")),o=t[a];if(o instanceof Object){const t=l+r;c=[...c,...e(o,t,r)]}else c.push(`${l}: ${o}`)}),c}(n,"--wp--custom--","--");l.length>0&&a.push(...l),a.length>0&&(r+=`${c}{${a.join(";")};}`)}),r},Pn=(e,t)=>{const n=((e,t)=>{var n,r;const c=[];if(null==e||!e.styles)return c;const a=e=>Object(E.pickBy)(e,(e,t)=>["border","color","spacing","typography"].includes(t)),o=a(e.styles);return o&&c.push({styles:o,selector:"body"}),Object(E.forEach)(null===(n=e.styles)||void 0===n?void 0:n.elements,(e,t)=>{e&&l.__EXPERIMENTAL_ELEMENTS[t]&&c.push({styles:e,selector:l.__EXPERIMENTAL_ELEMENTS[t]})}),Object(E.forEach)(null===(r=e.styles)||void 0===r?void 0:r.blocks,(e,n)=>{var r;const o=a(e);o&&null!=t&&null!==(r=t[n])&&void 0!==r&&r.selector&&c.push({styles:o,selector:t[n].selector}),Object(E.forEach)(null==e?void 0:e.elements,(e,r)=>{e&&null!=t&&t[n]&&null!==l.__EXPERIMENTAL_ELEMENTS&&void 0!==l.__EXPERIMENTAL_ELEMENTS&&l.__EXPERIMENTAL_ELEMENTS[r]&&c.push({styles:e,selector:t[n].selector.split(",").map(e=>e+" "+l.__EXPERIMENTAL_ELEMENTS[r]).join(",")})})}),c})(e,t),r=In(e,t);let c=".wp-site-blocks > * { margin-top: 0; margin-bottom: 0; }.wp-site-blocks > * + * { margin-top: var( --wp--style--block-gap ); }";return n.forEach(e=>{let{selector:t,styles:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(E.reduce)(l.__EXPERIMENTAL_STYLE_PROPERTY,(t,n,r)=>{let{value:c,properties:a}=n;const l=c;if("elements"===Object(E.first)(l))return t;const o=Object(E.get)(e,l);if(a&&!Object(E.isString)(o))Object.entries(a).forEach(e=>{const[n,r]=e;if(!Object(E.get)(o,[r],!1))return;const c=Object(E.kebabCase)(n);t.push(`${c}: ${kn(Object(E.get)(o,[r]))}`)});else if(Object(E.get)(e,l,!1)){const n=r.startsWith("--")?r:Object(E.kebabCase)(r);t.push(`${n}: ${kn(Object(E.get)(e,l))}`)}return t},[])}(n);0!==r.length&&(c+=`${t}{${r.join(";")};}`)}),r.forEach(e=>{let{selector:t,presets:n}=e;"body"===t&&(t="");const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(E.reduce)(jt,(n,r)=>{let{path:c,cssVarInfix:a,classes:l}=r;if(!l)return n;const o=Object(E.get)(t,c,[]);return["core","theme","user"].forEach(t=>{o[t]&&o[t].forEach(t=>{let{slug:r}=t;l.forEach(t=>{let{classSuffix:c,propertyName:l}=t;const o=`.has-${Object(E.kebabCase)(r)}-${c}`,i=e.split(",").map(e=>`${e}${o}`).join(","),s=`var(--wp--preset--${a}--${Object(E.kebabCase)(r)})`;n+=`${i}{${l}: ${s} !important;}`})})}),n},"")}(t,n);Object(E.isEmpty)(r)||(c+=r)}),c};function Nn(){const[e,t]=(()=>{const{user:e,setUserConfig:t}=Object(a.useContext)(vt);return[!!e&&!Object(E.isEqual)(e,yt),Object(a.useCallback)(()=>t(()=>yt),[t])]})();return Object(a.createElement)(Ot,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:Object(b.__)("Styles"),icon:_t,closeLabel:Object(b.__)("Close global styles sidebar"),header:Object(a.createElement)(m.Flex,null,Object(a.createElement)(m.FlexBlock,null,Object(a.createElement)("strong",null,Object(b.__)("Styles")),Object(a.createElement)("span",{className:"edit-site-global-styles-sidebar__beta"},Object(b.__)("Beta"))),Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.DropdownMenu,{icon:Fe.a,label:Object(b.__)("More Global Styles Actions"),toggleProps:{disabled:!e},controls:[{title:Object(b.__)("Reset to defaults"),onClick:t}]})))},Object(a.createElement)(Tn,null))}const Rn="edit-site/template",Mn="edit-site/block-inspector";var An=e=>{let{sidebarName:t}=e;const{enableComplementaryArea:n}=Object(i.useDispatch)(F.i),[r,c]=t===Rn?[Object(b.__)("Template (selected)"),"is-active"]:[Object(b.__)("Template"),""],[l,o]=t===Mn?[Object(b.__)("Block (selected)"),"is-active"]:[Object(b.__)("Block"),""];return Object(a.createElement)("ul",null,Object(a.createElement)("li",null,Object(a.createElement)(m.Button,{onClick:()=>n(T,Rn),className:"edit-site-sidebar__panel-tab "+c,"aria-label":r,"data-label":Object(b.__)("Template")},Object(b.__)("Template"))),Object(a.createElement)("li",null,Object(a.createElement)(m.Button,{onClick:()=>n(T,Mn),className:"edit-site-sidebar__panel-tab "+o,"aria-label":l,"data-label":Object(b.__)("Block")},Object(b.__)("Block"))))};function Bn(e){let{area:t,clientId:n}=e;const{selectBlock:r,toggleBlockHighlight:c}=Object(i.useDispatch)(Pe.store),l=()=>c(n,!0),o=()=>c(n,!1);return Object(a.createElement)(m.Button,{className:"edit-site-template-card__template-areas-item",icon:Object(Ne.getTemplatePartIcon)(t),onMouseOver:l,onMouseLeave:o,onFocus:l,onBlur:o,onClick:()=>{r(n)}},k[t])}function Ln(){const e=Object(i.useSelect)(e=>e(Ce).getCurrentTemplateTemplateParts(),[]);return e.length?Object(a.createElement)("section",{className:"edit-site-template-card__template-areas"},Object(a.createElement)(m.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},Object(b.__)("Areas")),Object(a.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map(e=>{let{templatePart:t,block:n}=e;return Object(a.createElement)("li",{key:t.slug},Object(a.createElement)(Bn,{area:t.area,clientId:n.clientId}))}))):null}function Dn(){const{title:e,description:t,icon:n}=Object(i.useSelect)(e=>{const{getEditedPostType:t,getEditedPostId:n}=e(Ce),{getEntityRecord:r}=e(s.store),{__experimentalGetTemplateInfo:c}=e(Ne.store),a=r("postType",t(),n());return a?c(a):{}},[]);return e||t?Object(a.createElement)("div",{className:"edit-site-template-card"},Object(a.createElement)(m.Icon,{className:"edit-site-template-card__icon",icon:n}),Object(a.createElement)("div",{className:"edit-site-template-card__content"},Object(a.createElement)("h2",{className:"edit-site-template-card__title"},e),Object(a.createElement)("div",{className:"edit-site-template-card__description"},t),Object(a.createElement)(Ln,null))):null}const{Slot:Fn,Fill:Vn}=Object(m.createSlotFill)("EditSiteSidebarInspector"),Gn=Vn;function zn(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n}=Object(i.useSelect)(e=>{const t=e(F.i).getActiveComplementaryArea(T);return{sidebar:t,isEditorSidebarOpened:[Mn,Rn].includes(t),hasBlockSelection:!!e(Pe.store).getBlockSelectionStart()}},[]),{enableComplementaryArea:r}=Object(i.useDispatch)(F.i);Object(a.useEffect)(()=>{t&&r(T,n?Mn:Rn)},[n,t]);let c=e;return t||(c=n?Mn:Rn),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ot,{identifier:c,title:Object(b.__)("Settings"),icon:pt.a,closeLabel:Object(b.__)("Close settings sidebar"),header:Object(a.createElement)(An,{sidebarName:c}),headerClassName:"edit-site-sidebar__panel-tabs"},c===Rn&&Object(a.createElement)(m.PanelBody,null,Object(a.createElement)(Dn,null)),c===Mn&&Object(a.createElement)(Fn,{bubblesVirtually:!0})),Object(a.createElement)(Nn,null))}function Un(e){let{clientId:t}=e;const{getBlocks:n}=Object(i.useSelect)(Pe.store),{replaceBlocks:r}=Object(i.useDispatch)(Pe.store);return Object(a.createElement)(Pe.BlockSettingsMenuControls,null,e=>{let{onClose:c}=e;return Object(a.createElement)(m.MenuItem,{onClick:()=>{r(t,n(t)),c()}},Object(b.__)("Detach blocks from template part"))})}function Hn(e){let{clientIds:t,blocks:n}=e;const r=Object(Me.useInstanceId)(Hn),[c,o]=Object(a.useState)(!1),[u,d]=Object(a.useState)(""),{replaceBlocks:p}=Object(i.useDispatch)(Pe.store),{saveEntityRecord:O}=Object(i.useDispatch)(s.store),{createSuccessNotice:_}=Object(i.useDispatch)(D.store),[j,g]=Object(a.useState)("uncategorized"),f=Object(i.useSelect)(e=>e(Ne.store).__experimentalGetDefaultTemplatePartAreas(),[]);return Object(a.createElement)(Pe.BlockSettingsMenuControls,null,e=>{let{onClose:i}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuItem,{onClick:()=>{o(!0)}},Object(b.__)("Make template part")),c&&Object(a.createElement)(m.Modal,{title:Object(b.__)("Create a template part"),closeLabel:Object(b.__)("Close"),onRequestClose:()=>{o(!1),d("")},overlayClassName:"edit-site-template-part-converter__modal"},Object(a.createElement)("form",{onSubmit:e=>{e.preventDefault(),(async e=>{const r=Object(b.__)("Untitled Template Part"),c=await O("postType","wp_template_part",{slug:Object(E.kebabCase)(e||r),title:e||r,content:Object(l.serialize)(n),area:j});p(t,Object(l.createBlock)("core/template-part",{slug:c.slug,theme:c.theme})),_(Object(b.__)("Template part created."),{type:"snackbar"})})(u),o(!1),d(""),i()}},Object(a.createElement)(m.TextControl,{label:Object(b.__)("Name"),value:u,onChange:d}),Object(a.createElement)(m.BaseControl,{label:Object(b.__)("Area"),id:"edit-site-template-part-converter__area-selection-"+r,className:"edit-site-template-part-converter__area-base-control"},Object(a.createElement)(m.__experimentalRadioGroup,{label:Object(b.__)("Area"),className:"edit-site-template-part-converter__area-radio-group",id:"edit-site-template-part-converter__area-selection-"+r,onChange:g,checked:j},f.map(e=>{let{icon:t,label:n,area:r,description:c}=e;return Object(a.createElement)(m.__experimentalRadio,{key:n,value:r,className:"edit-site-template-part-converter__area-radio"},Object(a.createElement)(m.Flex,{align:"start",justify:"start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.Icon,{icon:t})),Object(a.createElement)(m.FlexBlock,{className:"edit-site-template-part-converter__option-label"},n,Object(a.createElement)("div",null,c)),Object(a.createElement)(m.FlexItem,{className:"edit-site-template-part-converter__checkbox"},j===r&&Object(a.createElement)(m.Icon,{icon:Ve.a}))))}))),Object(a.createElement)(m.Flex,{className:"edit-site-template-part-converter__convert-modal-actions",justify:"flex-end"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.Button,{variant:"secondary",onClick:()=>{o(!1),d("")}},Object(b.__)("Cancel"))),Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.Button,{variant:"primary",type:"submit"},Object(b.__)("Create")))))))})}function qn(){var e;const{clientIds:t,blocks:n}=Object(i.useSelect)(e=>{const{getSelectedBlockClientIds:t,getBlocksByClientId:n}=e(Pe.store),r=t();return{clientIds:r,blocks:n(r)}},[]);return 1===n.length&&"core/template-part"===(null===(e=n[0])||void 0===e?void 0:e.name)?Object(a.createElement)(Un,{clientId:t[0]}):Object(a.createElement)(Hn,{clientIds:t,blocks:n})}var Wn=n("B9Az");function $n(e){let{type:t,id:n,activePage:r,onActivePageChange:c}=e;const l=Object(i.useSelect)(e=>t&&n&&"URL"!==t&&e(s.store).getEntityRecord("postType",t,n),[t,n]),o=Object(a.useMemo)(()=>{if(null==l||!l.link)return null;const e=Object(L.getPathAndQueryString)(l.link);return e===(null==r?void 0:r.path)?null:()=>c({type:t,slug:l.slug,path:e,context:{postType:l.type,postId:l.id}})},[l,null==r?void 0:r.path,c]);return o&&Object(a.createElement)(m.Button,{icon:Wn.a,label:Object(b.__)("Edit Page Template"),onClick:o})}function Xn(e){let{onClick:t=(()=>{})}=e;const{shortcut:n,isBlockInspectorOpen:r}=Object(i.useSelect)(e=>({shortcut:e(Re.store).getShortcutRepresentation("core/edit-site/toggle-block-settings-sidebar"),isBlockInspectorOpen:e(F.i).getActiveComplementaryArea(Ce.name)===Mn}),[]),{enableComplementaryArea:c,disableComplementaryArea:l}=Object(i.useDispatch)(F.i),o=r?Object(b.__)("Hide more settings"):Object(b.__)("Show more settings");return Object(a.createElement)(m.MenuItem,{onClick:()=>{r?(l(T),Object(Ge.speak)(Object(b.__)("Block settings closed"))):(c(T,Mn),Object(Ge.speak)(Object(b.__)("Additional settings are now available in the Editor block settings sidebar"))),t()},shortcut:n},o)}function Yn(){return Object(a.createElement)(Pe.BlockSettingsMenuControls,null,e=>{let{selectedClientIds:t,onClose:n}=e;return Object(a.createElement)(Kn,{selectedClientId:t[0],onClose:n})})}function Kn(e){let{selectedClientId:t,onClose:n}=e;const r=Object(i.useSelect)(e=>{const n=e(Pe.store).getBlock(t);if(n&&Object(l.isTemplatePart)(n)){const{theme:t,slug:r}=n.attributes;return e(s.store).getEntityRecord("postType","wp_template_part",`${t}//${r}`)}},[t]),{pushTemplatePart:c}=Object(i.useDispatch)(Ce);return r?Object(a.createElement)(m.MenuItem,{onClick:()=>{c(r.id),n()}},Object(b.sprintf)(Object(b.__)("Edit %s"),r.slug)):null}var Qn=n("cjQ8");var Zn=function(){const{isTemplatePart:e,previousTemplateId:t}=Object(i.useSelect)(e=>{const{getEditedPostType:t,getPreviousEditedPostId:n}=e(Ce);return{isTemplatePart:"wp_template_part"===t(),previousTemplateId:n()}},[]),{goBack:n}=Object(i.useDispatch)(Ce);return e&&t?Object(a.createElement)(m.Button,{className:"edit-site-visual-editor__back-button",icon:Qn.a,onClick:()=>{n()}},Object(b.__)("Back")):null};function Jn(e){let{direction:t,resizeWidthBy:n}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("button",{className:"resizable-editor__drag-handle is-"+t,"aria-label":Object(b.__)("Drag to resize"),"aria-describedby":"resizable-editor__resize-help-"+t,onKeyDown:function(e){const{keyCode:r}=e;"left"===t&&r===Ye.LEFT||"right"===t&&r===Ye.RIGHT?n(20):("left"===t&&r===Ye.RIGHT||"right"===t&&r===Ye.LEFT)&&n(-20)}}),Object(a.createElement)(m.VisuallyHidden,{id:"resizable-editor__resize-help-"+t},Object(b.__)("Use left and right arrow keys to resize the canvas.")))}const er="100%",tr="100%",nr={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};var rr=function(e){let{enableResizing:t,settings:n,...r}=e;const c=Object(i.useSelect)(e=>e(Ce).__experimentalGetPreviewDeviceType(),[]),l=Object(Pe.__experimentalUseResizeCanvas)(c),[o,s]=Object(a.useState)(er),[u,d]=Object(a.useState)(tr),b=Object(a.useRef)(),p=Object(Pe.__unstableUseMouseMoveTypingReset)(),O=Object(Me.useMergeRefs)([b,p]);Object(a.useEffect)((function(){const e=b.current;if(!e||!t)return;const n=new e.contentWindow.ResizeObserver(()=>{d(e.contentDocument.querySelector(".edit-site-block-editor__block-list").offsetHeight)});return n.observe(e.contentDocument.documentElement),()=>{n.disconnect()}}),[t]);const _=Object(a.useCallback)(e=>{b.current&&s(b.current.offsetWidth+e)},[]);return Object(a.createElement)(m.ResizableBox,{size:{width:o,height:u},onResizeStop:(e,t,n)=>{s(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{right:t,left:t},showHandle:t,resizeRatio:2,handleComponent:{left:Object(a.createElement)(Jn,{direction:"left",resizeWidthBy:_}),right:Object(a.createElement)(Jn,{direction:"right",resizeWidthBy:_})},handleClasses:void 0,handleStyles:{left:nr,right:nr}},Object(a.createElement)(Pe.__unstableIframe,Object(Ct.a)({style:t?void 0:l,head:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Pe.__unstableEditorStyles,{styles:n.styles}),Object(a.createElement)("style",null,".edit-site-block-editor__block-list { display: flow-root; }")),ref:O,name:"editor-canvas",className:"edit-site-visual-editor__editor-canvas"},r)))};const cr={type:"default",alignments:[]};function ar(e){let{setIsInserterOpen:t}=e;const{settings:n,templateType:r,templateId:c,page:l}=Object(i.useSelect)(e=>{const{getSettings:n,getEditedPostType:r,getEditedPostId:c,getPage:a}=e(Ce);return{settings:n(t),templateType:r(),templateId:c(),page:a()}},[t]),[o,u,d]=Object(s.useEntityBlockEditor)("postType",r),{setPage:m}=Object(i.useDispatch)(Ce),b=Object(a.useRef)(),p=Object(Me.useMergeRefs)([b,Object(Pe.__unstableUseTypingObserver)()]),O=Object(Me.useViewportMatch)("small","<"),{clearSelectedBlock:_}=Object(i.useDispatch)(Pe.store),j="wp_template_part"===r;return Object(a.createElement)(Pe.BlockEditorProvider,{settings:n,value:o,onInput:u,onChange:d,useSubRegistry:!1},Object(a.createElement)(Yn,null),Object(a.createElement)(qn,null),Object(a.createElement)(Pe.__experimentalLinkControl.ViewerFill,null,Object(a.useCallback)(e=>Object(a.createElement)($n,Object(Ct.a)({},e,{activePage:l,onActivePageChange:m})),[l])),Object(a.createElement)(Gn,null,Object(a.createElement)(Pe.BlockInspector,null)),Object(a.createElement)(Pe.BlockTools,{className:Je()("edit-site-visual-editor",{"is-focus-mode":j}),__unstableContentRef:b,onClick:e=>{e.target===e.currentTarget&&_()}},Object(a.createElement)(Zn,null),Object(a.createElement)(rr,{key:c,enableResizing:j&&!O,settings:n,contentRef:p},Object(a.createElement)(Pe.BlockList,{className:"edit-site-block-editor__block-list wp-site-blocks",__experimentalLayout:cr})),Object(a.createElement)(Pe.__unstableBlockSettingsMenuFirstItem,null,e=>{let{onClose:t}=e;return Object(a.createElement)(Xn,{onClick:t})})))}function lr(e){let{openEntitiesSavedStates:t}=e;const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:r}=Object(i.useSelect)(s.store),c=Object(i.useSelect)(e=>e(Ce).isListViewOpened(),[]),a=Object(i.useSelect)(e=>e(F.i).getActiveComplementaryArea(Ce.name)===Mn,[]),{redo:l,undo:o}=Object(i.useDispatch)(s.store),{setIsListViewOpened:u}=Object(i.useDispatch)(Ce),{enableComplementaryArea:d,disableComplementaryArea:m}=Object(i.useDispatch)(F.i);return Object(Re.useShortcut)("core/edit-site/save",e=>{e.preventDefault();const c=n(),a=!!c.length;!c.some(e=>r(e.kind,e.name,e.key))&&a&&t()}),Object(Re.useShortcut)("core/edit-site/undo",e=>{o(),e.preventDefault()}),Object(Re.useShortcut)("core/edit-site/redo",e=>{l(),e.preventDefault()}),Object(Re.useShortcut)("core/edit-site/toggle-list-view",()=>{u(!c)}),Object(Re.useShortcut)("core/edit-site/toggle-block-settings-sidebar",e=>{e.preventDefault(),a?m(T):d(T,Mn)}),null}lr.Register=function(){const{registerShortcut:e}=Object(i.useDispatch)(Re.store);return Object(a.useEffect)(()=>{e({name:"core/edit-site/save",category:"global",description:Object(b.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/undo",category:"global",description:Object(b.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-site/redo",category:"global",description:Object(b.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/edit-site/toggle-list-view",category:"global",description:Object(b.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:Object(b.__)("Show or hide the block settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}})},[e]),null};var or=lr;function ir(){const{setTemplate:e,setTemplatePart:t,showHomepage:n,setPage:r}=Object(i.useDispatch)(Ce);Object(a.useEffect)(()=>{const c=window.location.href,a=Object(L.getQueryArg)(c,"postId");if(!a)return void n();const l=Object(L.getQueryArg)(c,"postType");"page"===l||"post"===l?r({context:{postType:l,postId:a}}):"wp_template"===l?e(a):"wp_template_part"===l?t(a):n()},[]);const c=Object(i.useSelect)(e=>{var t,n;const{getEditedPostType:r,getEditedPostId:c,getPage:a}=e(Ce),l=a();let o=c(),i=r();return null!=l&&null!==(t=l.context)&&void 0!==t&&t.postId&&null!=l&&null!==(n=l.context)&&void 0!==n&&n.postType&&(o=l.context.postId,i=l.context.postType),o&&i?{postId:o,postType:i}:null},[]);return Object(a.useEffect)(()=>{const e=c?Object(L.addQueryArgs)(window.location.href,c):Object(L.removeQueryArgs)(window.location.href,"postType","postId");window.history.replaceState({},"",e)},[c]),null}var sr=n("w95h");function ur(){const{setIsInserterOpened:e}=Object(i.useDispatch)(Ce),t=Object(i.useSelect)(e=>e(Ce).__experimentalGetInsertionPoint(),[]),n=Object(Me.useViewportMatch)("medium","<"),[r,c]=Object(Me.__experimentalUseDialog)({onClose:()=>e(!1)});return Object(a.createElement)("div",Object(Ct.a)({ref:r},c,{className:"edit-site-editor__inserter-panel"}),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-header"},Object(a.createElement)(m.Button,{icon:sr.a,onClick:()=>e(!1)})),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-content"},Object(a.createElement)(Pe.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:n,rootClientId:t.rootClientId,__experimentalInsertionIndex:t.insertionIndex,__experimentalFilterValue:t.filterValue})))}var dr=n("bWcr");function mr(){const{setIsListViewOpened:e}=Object(i.useDispatch)(Ce),{clearSelectedBlock:t,selectBlock:n}=Object(i.useDispatch)(Pe.store);const r=Object(Me.useFocusOnMount)("firstElement"),c=Object(Me.useFocusReturn)();const l="edit-site-editor__list-view-panel-label-"+Object(Me.useInstanceId)(mr);return Object(a.createElement)("div",{"aria-labelledby":l,className:"edit-site-editor__list-view-panel",onKeyDown:function(t){t.keyCode!==Ye.ESCAPE||t.defaultPrevented||e(!1)}},Object(a.createElement)("div",{className:"edit-site-editor__list-view-panel-header"},Object(a.createElement)("strong",{id:l},Object(b.__)("List view")),Object(a.createElement)(m.Button,{icon:dr.a,label:Object(b.__)("Close list view sidebar"),onClick:()=>e(!1)})),Object(a.createElement)("div",{className:"edit-site-editor__list-view-panel-content",ref:Object(Me.useMergeRefs)([c,r])},Object(a.createElement)(Pe.__experimentalListView,{onSelect:async function(e){await t(),n(e,-1)},showNestedBlocks:!0,__experimentalFeatures:!0,__experimentalPersistentListViewFeatures:!0})))}function br(e){let{text:t,children:n}=e;const r=Object(Me.useCopyToClipboard)(t);return Object(a.createElement)(m.Button,{variant:"secondary",ref:r},n)}class pr extends a.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}reboot(){this.props.onError()}render(){const{error:e}=this.state;return e?Object(a.createElement)(Pe.Warning,{className:"editor-error-boundary",actions:[Object(a.createElement)(m.Button,{key:"recovery",onClick:this.reboot,variant:"secondary"},Object(b.__)("Attempt Recovery")),Object(a.createElement)(br,{key:"copy-error",text:e.stack},Object(b.__)("Copy Error"))]},Object(b.__)("The editor has encountered an unexpected error.")):this.props.children}}function Or(){const[e,t]=function(){const[e,t]=Object(a.useState)([]),[n,r]=Object(a.useState)({}),{merged:c}=Object(a.useContext)(vt);return Object(a.useEffect)(()=>{if(null==c||!c.styles||null==c||!c.settings)return;const e=(e=>{const t={};return e.forEach(e=>{var n,r;const c=e.name,a=null!==(n=null==e||null===(r=e.supports)||void 0===r?void 0:r.__experimentalSelector)&&void 0!==n?n:".wp-block-"+c.replace("core/","").replace("/","-");t[c]={name:c,selector:a}}),t})(Object(l.getBlockTypes)()),n=Cn(c,e),a=Pn(c,e);t([{css:n,isGlobalStyles:!0,__experimentalNoWrapper:!0},{css:a,isGlobalStyles:!0}]),r(c.settings)},[c]),[e,n]}(),{getSettings:n}=Object(i.useSelect)(Ce),{updateSettings:r}=Object(i.useDispatch)(Ce);Object(a.useEffect)(()=>{var c;if(!e||!t)return;const a=n(),l=null==a||null===(c=a.styles)||void 0===c?void 0:c.filter(e=>!e.isGlobalStyles);r({...a,styles:[...l,...e],__experimentalFeatures:t})},[e,t])}function _r(){return Or(),null}function jr(e,t){if(Array.isArray(t))return t}function gr(e){const t=Object(E.cloneDeep)(e);return jt.forEach(e=>{let{path:n}=e;const r=Object(E.get)(t,n);r&&Object(E.set)(t,n,{user:r})}),t}function Er(e){const t=Object(E.cloneDeep)(e);return jt.forEach(e=>{let{path:n}=e;const r=Object(E.get)(t,n);r&&Object(E.set)(t,n,(null!=r?r:{}).user)}),t}const fr=e=>{if(!Object(E.isObject)(e)||Array.isArray(e))return e;const t=Object(E.pickBy)(Object(E.mapValues)(e,fr),E.identity);return Object(E.isEmpty)(t)?void 0:t};function hr(){const[e,t,n]=function(){const{globalStylesId:e,settings:t,styles:n}=Object(i.useSelect)(e=>{const t=e(s.store).__experimentalGetCurrentGlobalStylesId(),n=t?e(s.store).getEditedEntityRecord("root","globalStyles",t):void 0;return{globalStylesId:t,settings:null==n?void 0:n.settings,styles:null==n?void 0:n.styles}},[]),{getEditedEntityRecord:r}=Object(i.useSelect)(s.store),{editEntityRecord:c}=Object(i.useDispatch)(s.store),l=Object(a.useMemo)(()=>({settings:gr(null!=t?t:{}),styles:null!=n?n:{}}),[t,n]),o=Object(a.useCallback)(t=>{var n,a;const l=r("root","globalStyles",e),o=t({styles:null!==(n=null==l?void 0:l.styles)&&void 0!==n?n:{},settings:gr(null!==(a=null==l?void 0:l.settings)&&void 0!==a?a:{})});c("root","globalStyles",e,{styles:fr(o.styles)||{},settings:fr(Er(o.settings))||{}})},[e]);return[!!t||!!n,l,o]}(),r=Object(i.useSelect)(e=>e(s.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]),c=Object(a.useMemo)(()=>{return r&&t?(e=r,n=t,Object(E.mergeWith)({},e,n,jr)):{};var e,n},[t,r]);return Object(a.useMemo)(()=>({isReady:e,user:t,base:r,merged:c,setUserConfig:n}),[c,t,r,n,e])}function vr(e){let{children:t}=e;const n=hr();return n.isReady?Object(a.createElement)(vt.Provider,{value:n},t):null}const yr={secondarySidebar:Object(b.__)("Block Library")};var Sr=function(e){let{initialSettings:t,onError:n}=e;const{isInserterOpen:r,isListViewOpen:c,sidebarIsOpened:l,settings:o,entityId:u,templateType:d,page:O,template:_,templateResolved:j,isNavigationOpen:g}=Object(i.useSelect)(e=>{const{isInserterOpened:t,isListViewOpened:n,getSettings:r,getEditedPostType:c,getEditedPostId:a,getPage:l,isNavigationOpened:o}=e(Ce),{hasFinishedResolution:i,getEntityRecord:u}=e(s.store),d=c(),m=a();return{isInserterOpen:t(),isListViewOpen:n(),sidebarIsOpened:!!e(F.i).getActiveComplementaryArea(Ce.name),settings:r(),templateType:d,page:l(),template:m?u("postType",d,m):null,templateResolved:!!m&&i("getEntityRecord",["postType",d,m]),entityId:m,isNavigationOpen:o()}},[]),{updateEditorSettings:E}=Object(i.useDispatch)(Ne.store),{setPage:f,setIsInserterOpened:h,updateSettings:v}=Object(i.useDispatch)(Ce),{enableComplementaryArea:y}=Object(i.useDispatch)(F.i);Object(a.useEffect)(()=>{v(t)},[]);const{defaultTemplateTypes:S,defaultTemplatePartAreas:w}=o;Object(a.useEffect)(()=>{E({defaultTemplateTypes:S,defaultTemplatePartAreas:w})},[S,w]);const[x,T]=Object(a.useState)(!1),k=Object(a.useCallback)(()=>T(!0),[]),I=Object(a.useCallback)(()=>{T(!1)},[]),C=Object(a.useMemo)(()=>({...null==O?void 0:O.context,queryContext:[(null==O?void 0:O.context.queryContext)||{page:1},e=>f({...O,context:{...null==O?void 0:O.context,queryContext:{...null==O?void 0:O.context.queryContext,...e}}})]}),[null==O?void 0:O.context]);Object(a.useEffect)(()=>{g?document.body.classList.add("is-navigation-sidebar-open"):document.body.classList.remove("is-navigation-sidebar-open")},[g]),Object(a.useEffect)((function(){"open"===new URLSearchParams(window.location.search).get("styles")&&y("core/edit-site","edit-site/global-styles")}),[y]);const P=(null==o?void 0:o.siteUrl)&&void 0!==d&&void 0!==u;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(ir,null),P&&Object(a.createElement)(Re.ShortcutProvider,null,Object(a.createElement)(m.SlotFillProvider,null,Object(a.createElement)(s.EntityProvider,{kind:"root",type:"site"},Object(a.createElement)(s.EntityProvider,{kind:"postType",type:d,id:u},Object(a.createElement)(vr,null,Object(a.createElement)(Pe.BlockContextProvider,{value:C},Object(a.createElement)(_r,null),Object(a.createElement)(pr,{onError:n},Object(a.createElement)(F.d,{isActive:!0}),Object(a.createElement)(Ne.UnsavedChangesWarning,null),Object(a.createElement)(or.Register,null),Object(a.createElement)(zn,null),Object(a.createElement)(F.e,{labels:yr,secondarySidebar:r?Object(a.createElement)(ur,null):c?Object(a.createElement)(mr,null):null,sidebar:l&&Object(a.createElement)(F.b.Slot,{scope:"core/edit-site"}),header:Object(a.createElement)(bt,{openEntitiesSavedStates:k}),notices:Object(a.createElement)(Ne.EditorSnackbars,null),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ne.EditorNotices,null),_&&Object(a.createElement)(ar,{setIsInserterOpen:h}),j&&!_&&(null==o?void 0:o.siteUrl)&&u&&Object(a.createElement)(m.Notice,{status:"warning",isDismissible:!1},Object(b.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),Object(a.createElement)(or,{openEntitiesSavedStates:k})),actions:Object(a.createElement)(a.Fragment,null,x?Object(a.createElement)(Ne.EntitiesSavedStates,{close:I}):Object(a.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},Object(a.createElement)(m.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:k,"aria-expanded":!1},Object(b.__)("Open save panel")))),footer:Object(a.createElement)(Pe.BlockBreadcrumb,null)}),Object(a.createElement)(m.Popover.Slot,null),Object(a.createElement)(p.PluginArea,null)))))))))};var wr=function(e){let{icon:t,isOpen:n}=e;const{isRequestingSiteIcon:r,navigationPanelMenu:c,siteIconUrl:l}=Object(i.useSelect)(e=>{const{getCurrentTemplateNavigationPanelSubMenu:t}=e(Ce),{getEntityRecord:n,isResolving:r}=e(s.store),c=n("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:r("core","getEntityRecord",["root","__unstableBase",void 0]),navigationPanelMenu:t(),siteIconUrl:c.site_icon_url}},[]),{openNavigationPanelToMenu:o,setIsNavigationPanelOpened:u}=Object(i.useDispatch)(Ce),d=Object(Me.useReducedMotion)();let p=Object(a.createElement)(m.Icon,{size:"36px",icon:Le.a});const O={expand:{scale:1.7,borderRadius:0,transition:{type:"tween",duration:"0.2"}}};return l?p=Object(a.createElement)(m.__unstableMotion.img,{variants:!d&&O,alt:Object(b.__)("Site Icon"),className:"edit-site-navigation-toggle__site-icon",src:l}):r?p=null:t&&(p=Object(a.createElement)(m.Icon,{size:"36px",icon:t})),Object(a.createElement)(m.__unstableMotion.div,{className:"edit-site-navigation-toggle"+(n?" is-open":""),whileHover:"expand"},Object(a.createElement)(m.Button,{className:"edit-site-navigation-toggle__button has-icon",label:Object(b.__)("Toggle navigation"),onClick:()=>{n?u(!1):o(c)},showTooltip:!0},p))};function xr(e){let{className:t,...n}=e;return Object(a.createElement)(F.b,Object(Ct.a)({panelClassName:t,className:"edit-site-sidebar",scope:"core/edit-site"},n))}function Tr(e){return Object(a.createElement)(F.c,Object(Ct.a)({__unstableExplicitMenuItem:!0,scope:"core/edit-site"},e))}var kr=Object(Me.compose)(Object(p.withPluginContext)((e,t)=>({icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"})))(F.a);function Ir(e,t){Object(a.unmountComponentAtNode)(e);const n=Ir.bind(null,e,t);Object(a.render)(Object(a.createElement)(Sr,{initialSettings:t,onError:n}),e)}function Cr(e,t){t.__experimentalFetchLinkSuggestions=(e,n)=>Object(s.__experimentalFetchLinkSuggestions)(e,n,t),t.__experimentalFetchRichUrlData=s.__experimentalFetchUrlData,t.__experimentalSpotlightEntityBlocks=["core/template-part"];const n=document.getElementById(e),r=Ir.bind(null,n,t);Object(i.dispatch)(l.store).__experimentalReapplyBlockTypeFilters(),Object(o.registerCoreBlocks)(),Object(a.render)(Object(a.createElement)(Sr,{initialSettings:t,onError:r}),n)}},K2cm:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));t.a=a},K9lf:function(e,t){e.exports=window.wp.compose},KEfo:function(e,t){e.exports=window.wp.viewport},Mmq9:function(e,t){e.exports=window.wp.url},NWDH:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(c.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=a},Ntru:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));t.a=a},OzlF:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(c.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));t.a=a},Q4Sy:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=a},QyPg:function(e,t){e.exports=window.wp.blockLibrary},RMJe:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.a=a},RxS6:function(e,t){e.exports=window.wp.keycodes},TSYQ:function(e,t,n){var r;
|
|
/*!
|
|
Copyright (c) 2018 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var l=c.apply(null,r);l&&e.push(l)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var o in r)n.call(r,o)&&r[o]&&e.push(o);else e.push(r.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},U60i:function(e,t,n){"use strict";n.d(t,"b",(function(){return $})),n.d(t,"c",(function(){return z})),n.d(t,"d",(function(){return X})),n.d(t,"e",(function(){return K})),n.d(t,"h",(function(){return H})),n.d(t,"f",(function(){return Z})),n.d(t,"g",(function(){return ee})),n.d(t,"a",(function(){return V})),n.d(t,"i",(function(){return M}));var r={};n.r(r),n.d(r,"enableComplementaryArea",(function(){return y})),n.d(r,"disableComplementaryArea",(function(){return S})),n.d(r,"pinItem",(function(){return x})),n.d(r,"unpinItem",(function(){return T})),n.d(r,"toggleFeature",(function(){return k})),n.d(r,"setFeatureValue",(function(){return I})),n.d(r,"setFeatureDefaults",(function(){return C}));var c={};n.r(c),n.d(c,"getActiveComplementaryArea",(function(){return P})),n.d(c,"isItemPinned",(function(){return N})),n.d(c,"isFeatureActive",(function(){return R}));var a=n("wx14"),l=n("GRId"),o=n("TSYQ"),i=n.n(o),s=n("tI+e"),u=n("1ZqX"),d=n("l3Sj"),m=n("RMJe"),b=n("URob"),p=n("Xxwi"),O=n("KEfo"),_=n("bWcr"),j=n("YLtl");const g=Object(u.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:r}=t;return{...e,[n]:{...e[n],...r}}}return e}}),E=Object(u.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_VALUE"===t.type){const{scope:n,featureName:r,value:c}=t;return{...e,[n]:{...e[n],[r]:c}}}return e}}),f=Object(u.combineReducers)({singleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:c}=arguments.length>1?arguments[1]:void 0;return"SET_SINGLE_ENABLE_ITEM"===t&&n&&r?{...e,[n]:{...e[n],[r]:c||null}}:e},multipleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:c,isEnable:a}=arguments.length>1?arguments[1]:void 0;if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!r||!c||Object(j.get)(e,[n,r,c])===a)return e;const l=e[n]||{},o=l[r]||{};return{...e,[n]:{...l,[r]:{...o,[c]:a||!1}}}}});var h=Object(u.combineReducers)({enableItems:f,preferenceDefaults:g,preferences:E});function v(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function y(e,t){return v("complementaryArea",e,t)}function S(e){return v("complementaryArea",e,void 0)}function w(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function x(e,t){return w("pinnedItems",e,t,!0)}function T(e,t){return w("pinnedItems",e,t,!1)}function k(e,t){return function(n){let{select:r,dispatch:c}=n;const a=r.isFeatureActive(e,t);c.setFeatureValue(e,t,!a)}}function I(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function C(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function P(e,t){return function(e,t,n){return Object(j.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function N(e,t,n){return!1!==function(e,t,n,r){return Object(j.get)(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}function R(e,t,n){var r,c;const a=null===(r=e.preferences.features[t])||void 0===r?void 0:r[n];return!!(void 0!==a?a:null===(c=e.preferenceDefaults.features[t])||void 0===c?void 0:c[n])}const M=Object(u.createReduxStore)("core/interface",{reducer:h,actions:r,selectors:c,persist:["enableItems","preferences"],__experimentalUseThunks:!0});Object(u.registerStore)("core/interface",{reducer:h,actions:r,selectors:c,persist:["enableItems","preferences"],__experimentalUseThunks:!0});var A=n("TvNi"),B=Object(A.withPluginContext)((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var L=B((function(e){let{as:t=s.Button,scope:n,identifier:r,icon:c,selectedIcon:o,...i}=e;const d=t,m=Object(u.useSelect)(e=>e(M).getActiveComplementaryArea(n)===r,[r]),{enableComplementaryArea:b,disableComplementaryArea:p}=Object(u.useDispatch)(M);return Object(l.createElement)(d,Object(a.a)({icon:o&&m?o:c,onClick:()=>{m?p(n):b(n,r)}},Object(j.omit)(i,["name"])))}));var D=e=>{let{smallScreenTitle:t,children:n,className:r,toggleButtonProps:c}=e;const o=Object(l.createElement)(L,Object(a.a)({icon:_.a},c));return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(l.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),o),Object(l.createElement)("div",{className:i()("components-panel__header","interface-complementary-area-header",r),tabIndex:-1},n,o))};function F(e){let{name:t,as:n=s.Button,onClick:r,...c}=e;return Object(l.createElement)(s.Fill,{name:t},e=>{let{onClick:t}=e;return Object(l.createElement)(n,Object(a.a)({onClick:r||t?function(){(r||j.noop)(...arguments),(t||j.noop)(...arguments)}:void 0},c))})}F.Slot=function(e){let{name:t,as:n=s.ButtonGroup,fillProps:r={},bubblesVirtually:c,...a}=e;return Object(l.createElement)(s.Slot,{name:t,bubblesVirtually:c,fillProps:r},e=>{if(Object(j.isEmpty)(l.Children.toArray(e)))return null;const t=[];l.Children.forEach(e,e=>{let{props:{__unstableExplicitMenuItem:n,__unstableTarget:r}}=e;r&&n&&t.push(r)});const r=l.Children.map(e,e=>!e.props.__unstableExplicitMenuItem&&t.includes(e.props.__unstableTarget)?null:e);return Object(l.createElement)(n,a,r)})};var V=F;const G=e=>Object(l.createElement)(s.MenuItem,Object(j.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]));function z(e){let{scope:t,target:n,__unstableExplicitMenuItem:r,...c}=e;return Object(l.createElement)(L,Object(a.a)({as:e=>Object(l.createElement)(V,Object(a.a)({__unstableExplicitMenuItem:r,__unstableTarget:`${t}/${n}`,as:G,name:t+"/plugin-more-menu"},e)),role:"menuitemcheckbox",selectedIcon:m.a,name:n,scope:t},c))}function U(e){let{scope:t,...n}=e;return Object(l.createElement)(s.Fill,Object(a.a)({name:"PinnedItems/"+t},n))}U.Slot=function(e){let{scope:t,className:n,...r}=e;return Object(l.createElement)(s.Slot,Object(a.a)({name:"PinnedItems/"+t},r),e=>!Object(j.isEmpty)(e)&&Object(l.createElement)("div",{className:i()(n,"interface-pinned-items")},e))};var H=U;function q(e){let{scope:t,children:n,className:r}=e;return Object(l.createElement)(s.Fill,{name:"ComplementaryArea/"+t},Object(l.createElement)("div",{className:r},n))}const W=B((function(e){let{children:t,className:n,closeLabel:r=Object(d.__)("Close plugin"),identifier:c,header:a,headerClassName:o,icon:_,isPinnable:j=!0,panelClassName:g,scope:E,name:f,smallScreenTitle:h,title:v,toggleShortcut:y,isActiveByDefault:S,showIconLabels:w=!1}=e;const{isActive:x,isPinned:T,activeArea:k,isSmall:I,isLarge:C}=Object(u.useSelect)(e=>{const{getActiveComplementaryArea:t,isItemPinned:n}=e(M),r=t(E);return{isActive:r===c,isPinned:n(E,c),activeArea:r,isSmall:e(O.store).isViewportMatch("< medium"),isLarge:e(O.store).isViewportMatch("large")}},[c,E]);!function(e,t,n,r,c){const a=Object(l.useRef)(!1),o=Object(l.useRef)(!1),{enableComplementaryArea:i,disableComplementaryArea:s}=Object(u.useDispatch)(M);Object(l.useEffect)(()=>{r&&c&&!a.current?(s(e),o.current=!0):o.current&&!c&&a.current?(o.current=!1,i(e,t)):o.current&&n&&n!==t&&(o.current=!1),c!==a.current&&(a.current=c)},[r,c,e,t,n])}(E,c,k,x,I);const{enableComplementaryArea:P,disableComplementaryArea:N,pinItem:R,unpinItem:A}=Object(u.useDispatch)(M);return Object(l.useEffect)(()=>{S&&void 0===k&&!I&&P(E,c)},[k,S,E,c,I]),Object(l.createElement)(l.Fragment,null,j&&Object(l.createElement)(H,{scope:E},T&&Object(l.createElement)(L,{scope:E,identifier:c,isPressed:x&&(!w||C),"aria-expanded":x,label:v,icon:w?m.a:_,showTooltip:!w,variant:w?"tertiary":void 0})),f&&j&&Object(l.createElement)(z,{target:f,scope:E,icon:_},v),x&&Object(l.createElement)(q,{className:i()("interface-complementary-area",n),scope:E},Object(l.createElement)(D,{className:o,closeLabel:r,onClose:()=>N(E),smallScreenTitle:h,toggleButtonProps:{label:r,shortcut:y,scope:E,identifier:c}},a||Object(l.createElement)(l.Fragment,null,Object(l.createElement)("strong",null,v),j&&Object(l.createElement)(s.Button,{className:"interface-complementary-area__pin-unpin-item",icon:T?b.a:p.a,label:T?Object(d.__)("Unpin from toolbar"):Object(d.__)("Pin to toolbar"),onClick:()=>(T?A:R)(E,c),isPressed:T,"aria-expanded":T}))),Object(l.createElement)(s.Panel,{className:g},t)))}));W.Slot=function(e){let{scope:t,...n}=e;return Object(l.createElement)(s.Slot,Object(a.a)({name:"ComplementaryArea/"+t},n))};var $=W;var X=e=>{let{isActive:t}=e;return Object(l.useEffect)(()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}},[]),Object(l.useEffect)(()=>(t?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{t&&document.body.classList.remove("is-fullscreen-mode")}),[t]),null},Y=n("K9lf");var K=Object(l.forwardRef)((function(e,t){let{footer:n,header:r,sidebar:c,secondarySidebar:o,notices:u,content:m,drawer:b,actions:p,labels:O,className:_,shortcuts:j}=e;const g=Object(s.__unstableUseNavigateRegions)(j);!function(e){Object(l.useEffect)(()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}("interface-interface-skeleton__html-container");const E={...{drawer:Object(d.__)("Drawer"),header:Object(d.__)("Header"),body:Object(d.__)("Content"),secondarySidebar:Object(d.__)("Block Library"),sidebar:Object(d.__)("Settings"),actions:Object(d.__)("Publish"),footer:Object(d.__)("Footer")},...O};return Object(l.createElement)("div",Object(a.a)({},g,{ref:Object(Y.useMergeRefs)([t,g.ref]),className:i()(_,"interface-interface-skeleton",g.className,!!n&&"has-footer")}),!!b&&Object(l.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":E.drawer},b),Object(l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!r&&Object(l.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":E.header,tabIndex:"-1"},r),Object(l.createElement)("div",{className:"interface-interface-skeleton__body"},!!o&&Object(l.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":E.secondarySidebar,tabIndex:"-1"},o),!!u&&Object(l.createElement)("div",{className:"interface-interface-skeleton__notices"},u),Object(l.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":E.body,tabIndex:"-1"},m),!!c&&Object(l.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":E.sidebar,tabIndex:"-1"},c),!!p&&Object(l.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":E.actions,tabIndex:"-1"},p))),!!n&&Object(l.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":E.footer,tabIndex:"-1"},n))})),Q=n("VKE3");function Z(e){let{as:t=s.DropdownMenu,className:n,label:r=Object(d.__)("Options"),popoverProps:c,toggleProps:a,children:o}=e;return Object(l.createElement)(t,{className:i()("interface-more-menu-dropdown",n),icon:Q.a,label:r,popoverProps:{position:"bottom left",...c,className:i()("interface-more-menu-dropdown__content",null==c?void 0:c.className)},toggleProps:{tooltipPosition:"bottom",...a}},e=>o(e))}var J=n("gdqT");function ee(e){let{scope:t,label:n,info:r,messageActivated:c,messageDeactivated:a,shortcut:o,feature:i}=e;const b=Object(u.useSelect)(e=>e(M).isFeatureActive(t,i),[i]),{toggleFeature:p}=Object(u.useDispatch)(M);return Object(l.createElement)(s.MenuItem,{icon:b&&m.a,isSelected:b,onClick:()=>{p(t,i),b?Object(J.speak)(a||Object(d.__)("Feature deactivated")):Object(J.speak)(c||Object(d.__)("Feature activated"))},role:"menuitemcheckbox",info:r,shortcut:o},n)}},URob:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=a},VKE3:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=a},Xxwi:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=a},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},bWcr:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=a},cjQ8:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));t.a=a},g56x:function(e,t){e.exports=window.wp.hooks},gdqT:function(e,t){e.exports=window.wp.a11y},hF7m:function(e,t){e.exports=window.wp.keyboardShortcuts},iClF:function(e,t,n){"use strict";var r=n("GRId");t.a=function(e){let{icon:t,size:n=24,...c}=e;return Object(r.cloneElement)(t,{width:n,height:n,...c})}},jSdM:function(e,t){e.exports=window.wp.editor},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},pPDe:function(e,t,n){"use strict";var r,c;function a(e){return[e]}function l(){var e={clear:function(){e.head=null}};return e}function o(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var n,i;function s(){n=c?new WeakMap:l()}function u(){var n,r,c,a,l,s=arguments.length;for(a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];for(l=t.apply(null,a),(n=i(l)).isUniqueByDependants||(n.lastDependants&&!o(l,n.lastDependants,0)&&n.clear(),n.lastDependants=l),r=n.head;r;){if(o(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=a),i=c?function(e){var t,c,a,o,i,s=n,u=!0;for(t=0;t<e.length;t++){if(c=e[t],!(i=c)||"object"!=typeof i){u=!1;break}s.has(c)?s=s.get(c):(a=new WeakMap,s.set(c,a),s=a)}return s.has(r)||((o=l()).isUniqueByDependants=u,s.set(r,o)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},rrFr:function(e,t,n){var r,c,a;c=[],void 0===(a="function"==typeof(r=function(){return function e(t,n,r){var c,a,l=window,o="application/octet-stream",i=r||o,s=t,u=!n&&!r&&s,d=document.createElement("a"),m=function(e){return String(e)},b=l.Blob||l.MozBlob||l.WebKitBlob||m,p=n||"download";if(b=b.call?b.bind(l):Blob,"true"===String(this)&&(i=(s=[s,i])[0],s=s[1]),u&&u.length<2048&&(p=u.split("/").pop().split("?")[0],d.href=u,-1!==d.href.indexOf(u))){var O=new XMLHttpRequest;return O.open("GET",u,!0),O.responseType="blob",O.onload=function(t){e(t.target.response,p,o)},setTimeout((function(){O.send()}),0),O}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(s)){if(!(s.length>2096103.424&&b!==m))return navigator.msSaveBlob?navigator.msSaveBlob(E(s),p):f(s);i=(s=E(s)).type||o}else if(/([\x80-\xff])/.test(s)){for(var _=0,j=new Uint8Array(s.length),g=j.length;_<g;++_)j[_]=s.charCodeAt(_);s=new b([j],{type:i})}function E(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),c=r.length,a=0,l=new Uint8Array(c);a<c;++a)l[a]=r.charCodeAt(a);return new b([l],{type:n})}function f(e,t){if("download"in d)return d.href=e,d.setAttribute("download",p),d.className="download-js-link",d.innerHTML="downloading...",d.style.display="none",document.body.appendChild(d),setTimeout((function(){d.click(),document.body.removeChild(d),!0===t&&setTimeout((function(){l.URL.revokeObjectURL(d.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,o)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,o)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(c=s instanceof b?s:new b([s],{type:i}),navigator.msSaveBlob)return navigator.msSaveBlob(c,p);if(l.URL)f(l.URL.createObjectURL(c),!0);else{if("string"==typeof c||c.constructor===m)try{return f("data:"+i+";base64,"+l.btoa(c))}catch(e){return f("data:"+i+","+encodeURIComponent(c))}(a=new FileReader).onload=function(e){f(this.result)},a.readAsDataURL(c)}return!0}})?r.apply(t,c):r)||(e.exports=a)},"tI+e":function(e,t){e.exports=window.wp.components},w95h:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=a},wduq:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));t.a=a},wx14:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},ywyh:function(e,t){e.exports=window.wp.apiFetch}}); |