/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.editSite=function(e){var t={};function n(c){if(t[c])return t[c].exports;var r=t[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,c){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},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 c=Object.create(null);if(n.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(c,r,function(t){return e[t]}.bind(null,r));return c},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")}({"0Ene":function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));t.a=a},"1ZqX":function(e,t){e.exports=window.wp.data},"1iEr":function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");var a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 Mr})),n.d(t,"initializeEditor",(function(){return Ar})),n.d(t,"__experimentalMainDashboardButton",(function(){return dc})),n.d(t,"__experimentalNavigationToggle",(function(){return _c})),n.d(t,"PluginSidebar",(function(){return Nr})),n.d(t,"PluginSidebarMoreMenuItem",(function(){return Pr})),n.d(t,"PluginMoreMenuItem",(function(){return Rr}));var c={};n.r(c),n.d(c,"toggleFeature",(function(){return G})),n.d(c,"__experimentalSetPreviewDeviceType",(function(){return z})),n.d(c,"setTemplate",(function(){return U})),n.d(c,"addTemplate",(function(){return H})),n.d(c,"removeTemplate",(function(){return W})),n.d(c,"setTemplatePart",(function(){return q})),n.d(c,"setHomeTemplateId",(function(){return $})),n.d(c,"setPage",(function(){return K})),n.d(c,"showHomepage",(function(){return Y})),n.d(c,"setNavigationPanelActiveMenu",(function(){return X})),n.d(c,"openNavigationPanelToMenu",(function(){return Q})),n.d(c,"setIsNavigationPanelOpened",(function(){return Z})),n.d(c,"setIsInserterOpened",(function(){return J})),n.d(c,"updateSettings",(function(){return ee})),n.d(c,"setIsListViewOpened",(function(){return te})),n.d(c,"revertTemplate",(function(){return ne})),n.d(c,"openGeneralSidebar",(function(){return ce})),n.d(c,"closeGeneralSidebar",(function(){return re}));var r={};n.r(r),n.d(r,"isFeatureActive",(function(){return se})),n.d(r,"__experimentalGetPreviewDeviceType",(function(){return ue})),n.d(r,"getCanUserCreateMedia",(function(){return me})),n.d(r,"getReusableBlocks",(function(){return de})),n.d(r,"getSettings",(function(){return pe})),n.d(r,"getHomeTemplateId",(function(){return be})),n.d(r,"getEditedPostType",(function(){return je})),n.d(r,"getEditedPostId",(function(){return _e})),n.d(r,"getPage",(function(){return ge})),n.d(r,"getNavigationPanelActiveMenu",(function(){return Ee})),n.d(r,"getCurrentTemplateNavigationPanelSubMenu",(function(){return fe})),n.d(r,"isNavigationOpened",(function(){return he})),n.d(r,"isInserterOpened",(function(){return ve})),n.d(r,"__experimentalGetInsertionPoint",(function(){return ye})),n.d(r,"isListViewOpened",(function(){return we})),n.d(r,"getCurrentTemplateTemplateParts",(function(){return Se}));var a=n("GRId"),l=n("HSyU"),o=n("QyPg"),i=n("1ZqX"),s=n("jZUy"),u=n("jSdM"),m=n("KEfo"),d=n("Mmq9"),p=n("TvNi"),b=n("YLtl"),O=n("tI+e"),j=n("l3Sj");const{Fill:_,Slot:g}=Object(O.createSlotFill)("EditSiteToolsMoreMenuGroup");_.Slot=e=>{let{fillProps:t}=e;return Object(a.createElement)(g,{fillProps:t},e=>!Object(b.isEmpty)(e)&&Object(a.createElement)(O.MenuGroup,{label:Object(j.__)("Tools")},e))};var E=_,f=n("rrFr"),h=n.n(f),v=n("ywyh"),y=n.n(v),w=n("Tqx9");var S=Object(a.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(w.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"})),x=n("onLe");function k(){const{createErrorNotice:e}=Object(i.useDispatch)(x.store);return Object(a.createElement)(O.MenuItem,{role:"menuitem",icon:S,onClick:async function(){try{const e=await y()({path:"/wp-block-editor/v1/export",parse:!1}),t=await e.blob();h()(t,"edit-site-export.zip","application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const c=n.message&&"unknown_error"!==n.code?n.message:Object(j.__)("An error occurred while creating the site export.");e(c,{type:"snackbar"})}},info:Object(j.__)("Download your templates and template parts.")},Object(j._x)("Export","site exporter menu item"))}var T=n("51Zz");const C={features:{welcomeGuide:!0,welcomeGuideStyles:!0}},I="core/edit-site",N=["index","singular","archive","single","page","home","404","search","author","category","taxonomy","date","tag","attachment","single-post","front-page"],P=["page-home"],R=["post-","author-","single-post-","tag-"],M=["page-"],A={singular:["single","page"],index:["archive","404","search","singular","home"],home:["front-page"]},L=[{area:"header",menu:"template-parts-headers",title:Object(j.__)("headers")},{area:"footer",menu:"template-parts-footers",title:Object(j.__)("footers")},{area:"sidebar",menu:"template-parts-sidebars",title:Object(j.__)("sidebars")},{area:"uncategorized",menu:"template-parts-general",title:Object(j.__)("general")}],B=Object(i.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.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 D=Object(i.combineReducers)({preferences:B,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}}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}}),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*W(e){try{yield i.controls.dispatch(s.store,"deleteEntityRecord","postType",e.type,e.id,{force:!0});const t=yield i.controls.select(s.store,"getLastEntityDeleteError","postType",e.type,e.id);if(t)throw t;yield i.controls.dispatch(x.store,"createSuccessNotice",Object(j.sprintf)(Object(j.__)('"%s" removed.'),e.title.rendered),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(j.__)("An error occurred while deleting the template.");yield i.controls.dispatch(x.store,"createErrorNotice",t,{type:"snackbar"})}}function q(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function $(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}function*K(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(d.getPathAndQueryString)(t.link)}const{id:n,slug:c}=yield i.controls.resolveSelect(s.store,"__experimentalGetTemplateForLink",e.path);return yield{type:"SET_PAGE",page:c?{...e,context:{...e.context,templateSlug:c}}:e,templateId:n},n}function*Y(){const{show_on_front:e,page_on_front:t}=yield i.controls.resolveSelect(s.store,"getEntityRecord","root","site"),{siteUrl:n}=yield i.controls.select(I,"getSettings"),c={path:n,context:"page"===e?{postType:"page",postId:t}:{}},r=yield*K(c);yield $(r)}function X(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function Q(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function Z(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function J(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function ee(e){return{type:"UPDATE_SETTINGS",settings:e}}function te(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function*ne(e){let{allowUndo:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(V(e))try{var n;const c=yield i.controls.select(s.store,"getEntity","postType",e.type);if(!c)return void(yield i.controls.dispatch(x.store,"createErrorNotice",Object(j.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const r=Object(d.addQueryArgs)(`${c.baseURL}/${e.id}`,{context:"edit",source:"theme"}),a=yield Object(T.apiFetch)({path:r});if(!a)return void(yield i.controls.dispatch(x.store,"createErrorNotice",Object(j.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const o=e=>{let{blocks:t=[]}=e;return Object(l.__unstableSerializeAndClean)(t)},u=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:o,blocks:u.blocks,source:"custom"},{undoIgnore:!0});const m=Object(l.parse)(null==a||null===(n=a.content)||void 0===n?void 0:n.raw);if(yield i.controls.dispatch(s.store,"editEntityRecord","postType",e.type,a.id,{content:o,blocks:m,source:"theme"}),t){const t=async()=>{await Object(i.dispatch)(s.store).editEntityRecord("postType",e.type,u.id,{content:o,blocks:u.blocks,source:"custom"})};yield i.controls.dispatch(x.store,"createSuccessNotice",Object(j.__)("Template reverted."),{type:"snackbar",actions:[{label:Object(j.__)("Undo"),onClick:t}]})}else yield i.controls.dispatch(x.store,"createSuccessNotice",Object(j.__)("Template reverted."))}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(j.__)("Template revert failed. Please reload.");yield i.controls.dispatch(x.store,"createErrorNotice",t,{type:"snackbar"})}else yield i.controls.dispatch(x.store,"createErrorNotice",Object(j.__)("This template is not revertable."),{type:"snackbar"})}function*ce(e){yield i.controls.dispatch(F.i,"enableComplementaryArea",I,e)}function*re(){yield i.controls.dispatch(F.i,"disableComplementaryArea",I)}var ae=n("pPDe"),le=n("6aBm");function oe(e,t,n){return!!A[e]&&("home"===e&&"posts"!==n||A[e].every(e=>t.includes(e)||oe(e,t,n)))}function ie(e){if(N.includes(e))return"templates";if(P.includes(e))return"templates-general";if(R.some(t=>e.startsWith(t)))return"templates-posts";return M.some(t=>e.startsWith(t))?"templates-pages":"templates-general"}function se(e,t){return Object(b.get)(e.preferences.features,[t],!1)}function ue(e){return e.deviceType}const me=Object(i.createRegistrySelector)(e=>()=>e(s.store).canUser("create","media")),de=Object(i.createRegistrySelector)(e=>()=>"web"===a.Platform.OS?e(s.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]),pe=Object(ae.a)((e,t)=>{const n={...e.settings,outlineMode:!0,focusMode:se(e,"focusMode"),hasFixedToolbar:se(e,"fixedToolbar"),__experimentalSetIsInserterOpened:t,__experimentalReusableBlocks:de(e)};return me(e)?(n.mediaUpload=t=>{let{onError:n,...c}=t;Object(le.uploadMedia)({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:e=>{let{message:t}=e;return n(t)},...c})},n):n},e=>[me(e),e.settings,se(e,"focusMode"),se(e,"fixedToolbar"),de(e)]);function be(e){return e.homeTemplateId}function Oe(e){return e.editedPost}function je(e){return Oe(e).type}function _e(e){return Oe(e).id}function ge(e){return Oe(e).page}function Ee(e){return e.navigationPanel.menu}const fe=Object(i.createRegistrySelector)(e=>t=>{const n=je(t),c=_e(t),r=c?e(s.store).getEntityRecord("postType",n,c):null;if(!r)return"root";var a;if("wp_template_part"===n)return(null===(a=L.find(e=>e.area===(null==r?void 0:r.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 oe(r.slug,Object(b.map)(l,"slug"),o)?"templates-unused":ie(r.slug)});function he(e){return e.navigationPanel.isOpen}function ve(e){return!!e.blockInserterPanel}function ye(e){const{rootClientId:t,insertionIndex:n,filterValue:c}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n,filterValue:c}}function we(e){return e.listViewPanel}const Se=Object(i.createRegistrySelector)(e=>t=>{var n;const c=je(t),r=_e(t),a=e(s.store).getEditedEntityRecord("postType",c,r),o=e(s.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),i=Object(b.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})}),xe={reducer:D,actions:c,selectors:r,controls:T.controls,persist:["preferences"]},ke=Object(i.createReduxStore)(I,xe);function Te(){const{toggleFeature:e}=Object(i.useDispatch)(ke);return Object(a.createElement)(O.MenuItem,{onClick:()=>e("welcomeGuide")},Object(j.__)("Welcome Guide"))}Object(i.registerStore)(I,xe),Object(p.registerPlugin)("edit-site",{render:()=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)(E,null,Object(a.createElement)(k,null),Object(a.createElement)(Te,null)))});var Ce=n("g56x");Object(Ce.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",()=>le.MediaUpload);var Ie,Ne=n("wx14"),Pe=Ie||(Ie={});Pe.Pop="POP",Pe.Push="PUSH",Pe.Replace="REPLACE";var Re=function(e){return e};function Me(e){e.preventDefault(),e.returnValue=""}function Ae(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function Le(){return Math.random().toString(36).substr(2,8)}function Be(e){var t=e.pathname;t=void 0===t?"/":t;var n=e.search;return n=void 0===n?"":n,e=void 0===(e=e.hash)?"":e,n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),e&&"#"!==e&&(t+="#"===e.charAt(0)?e:"#"+e),t}function De(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}const Fe=function(e){function t(){var e=l.location,t=o.state||{};return[t.idx,Re({pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"})]}function n(e){return"string"==typeof e?e:Be(e)}function c(e,t){return void 0===t&&(t=null),Re(Object(Ne.a)({pathname:m.pathname,hash:"",search:""},"string"==typeof e?De(e):e,{state:t,key:Le()}))}function r(e){s=e,e=t(),u=e[0],m=e[1],d.call({action:s,location:m})}function a(e){o.go(e)}void 0===e&&(e={});var l=void 0===(e=e.window)?document.defaultView:e,o=l.history,i=null;l.addEventListener("popstate",(function(){if(i)p.call(i),i=null;else{var e=Ie.Pop,n=t(),c=n[0];if(n=n[1],p.length){if(null!=c){var l=u-c;l&&(i={action:e,location:n,retry:function(){a(-1*l)}},a(l))}}else r(e)}}));var s=Ie.Pop,u=(e=t())[0],m=e[1],d=Ae(),p=Ae();return null==u&&(u=0,o.replaceState(Object(Ne.a)({},o.state,{idx:u}),"")),{get action(){return s},get location(){return m},createHref:n,push:function e(t,a){var i=Ie.Push,s=c(t,a);if(!p.length||(p.call({action:i,location:s,retry:function(){e(t,a)}}),0)){var m=[{usr:s.state,key:s.key,idx:u+1},n(s)];s=m[0],m=m[1];try{o.pushState(s,"",m)}catch(e){l.location.assign(m)}r(i)}},replace:function e(t,a){var l=Ie.Replace,i=c(t,a);p.length&&(p.call({action:l,location:i,retry:function(){e(t,a)}}),1)||(i=[{usr:i.state,key:i.key,idx:u},n(i)],o.replaceState(i[0],"",i[1]),r(l))},go:a,back:function(){a(-1)},forward:function(){a(1)},listen:function(e){return d.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&l.addEventListener("beforeunload",Me),function(){t(),p.length||l.removeEventListener("beforeunload",Me)}}}}(),Ve=Fe.push,Ge=Fe.replace;Fe.push=function(e,t){return Ve.call(Fe,Object(d.addQueryArgs)(window.location.href,e),t)},Fe.replace=function(e,t){return Ge.call(Fe,Object(d.addQueryArgs)(window.location.href,e),t)};var ze=Fe;const Ue=Object(a.createContext)(),He=Object(a.createContext)();function We(){return Object(a.useContext)(Ue)}function qe(){return Object(a.useContext)(He)}function $e(e){const t=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(t.entries())}}function Ke(e){let{children:t}=e;const[n,c]=Object(a.useState)(()=>$e(ze.location));return Object(a.useEffect)(()=>ze.listen(e=>{let{location:t}=e;c($e(t))}),[]),Object(a.createElement)(He.Provider,{value:ze},Object(a.createElement)(Ue.Provider,{value:n},t(n)))}var Ye=n("axFQ"),Xe=n("hF7m"),Qe=n("K9lf"),Ze=n("Q4Sy"),Je=n("OzlF"),et=n("VKE3"),tt=n("RMJe"),nt=n("gdqT");function ct(e){let{feature:t,label:n,info:c,messageActivated:r,messageDeactivated:l}=e;const o=Object(i.useSelect)(e=>e(ke).isFeatureActive(t),[]),{toggleFeature:s}=Object(i.useDispatch)(ke);return Object(a.createElement)(O.MenuItem,{icon:o&&tt.a,isSelected:o,onClick:Object(b.flow)(s.bind(null,t),()=>{o?Object(nt.speak)(l||Object(j.__)("Feature deactivated")):Object(nt.speak)(r||Object(j.__)("Feature activated"))}),role:"menuitemcheckbox",info:c},n)}const rt={className:"edit-site-more-menu__content",position:"bottom left"},at={tooltipPosition:"bottom"};var lt=()=>Object(a.createElement)(O.DropdownMenu,{className:"edit-site-more-menu",icon:et.a,label:Object(j.__)("More tools & options"),popoverProps:rt,toggleProps:at},e=>{let{onClose:t}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.MenuGroup,{label:Object(j._x)("View","noun")},Object(a.createElement)(ct,{feature:"fixedToolbar",label:Object(j.__)("Top toolbar"),info:Object(j.__)("Access all block and document tools in a single place"),messageActivated:Object(j.__)("Top toolbar activated"),messageDeactivated:Object(j.__)("Top toolbar deactivated")}),Object(a.createElement)(ct,{feature:"focusMode",label:Object(j.__)("Spotlight mode"),info:Object(j.__)("Focus on one block at a time"),messageActivated:Object(j.__)("Spotlight mode activated"),messageDeactivated:Object(j.__)("Spotlight mode deactivated")}),Object(a.createElement)(F.a.Slot,{name:"core/edit-site/plugin-more-menu",label:Object(j.__)("Plugins"),as:O.MenuGroup,fillProps:{onClick:t}})),Object(a.createElement)(E.Slot,{fillProps:{onClose:t}}))});function ot(e){let{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}=e;const{isDirty:c,isSaving:r}=Object(i.useSelect)(e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(s.store),c=t();return{isDirty:c.length>0,isSaving:Object(b.some)(c,e=>n(e.kind,e.name,e.key))}},[]),l=!c||r;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.Button,{variant:"primary",className:"edit-site-save-button__button","aria-disabled":l,"aria-expanded":n,disabled:l,isBusy:r,onClick:l?void 0:t},Object(j.__)("Save")))}var it=n("Ntru"),st=n("K2cm"),ut=n("RxS6");function mt(){const e=Object(i.useSelect)(e=>e(s.store).hasUndo(),[]),{undo:t}=Object(i.useDispatch)(s.store);return Object(a.createElement)(O.Button,{icon:Object(j.isRTL)()?st.a:it.a,label:Object(j.__)("Undo"),shortcut:ut.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}function dt(){const e=Object(i.useSelect)(e=>e(s.store).hasRedo(),[]),{redo:t}=Object(i.useDispatch)(s.store);return Object(a.createElement)(O.Button,{icon:Object(j.isRTL)()?it.a:st.a,label:Object(j.__)("Redo"),shortcut:ut.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var pt=n("TSYQ"),bt=n.n(pt),Ot=n("NWDH");function jt(e){if(e){const t=Object(l.getBlockType)(e.name);return t?Object(l.__experimentalGetBlockLabel)(t,e.attributes):null}return null}function _t(e){let{entityTitle:t,entityLabel:n,isLoaded:c,children:r}=e;const{label:l}=function(){const{getBlock:e}=Object(i.useSelect)(Ye.store),t=Object(i.useSelect)(e=>e(Ye.store).__experimentalGetActiveBlockIdByBlockNames(["core/template-part"]),[]);return t?{label:jt(e(t)),isActive:!0}:{}}(),o=Object(a.useRef)();return c?t?Object(a.createElement)("div",{className:bt()("edit-site-document-actions",{"has-secondary-label":!!l})},Object(a.createElement)("div",{ref:o,className:"edit-site-document-actions__title-wrapper"},Object(a.createElement)(O.__experimentalText,{size:"body",className:"edit-site-document-actions__title",as:"h1"},Object(a.createElement)(O.VisuallyHidden,{as:"span"},Object(j.sprintf)(Object(j.__)("Editing %s: "),n)),t),Object(a.createElement)(O.__experimentalText,{size:"body",className:"edit-site-document-actions__secondary-item"},null!=l?l:""),r&&Object(a.createElement)(O.Dropdown,{popoverProps:{anchorRef:o.current},position:"bottom center",renderToggle:e=>{let{isOpen:t,onToggle:c}=e;return Object(a.createElement)(O.Button,{className:"edit-site-document-actions__get-info",icon:Ot.a,"aria-expanded":t,"aria-haspopup":"true",onClick:c,label:Object(j.sprintf)(Object(j.__)("Show %s details"),n)})},contentClassName:"edit-site-document-actions__info-dropdown",renderContent:r}))):Object(a.createElement)("div",{className:"edit-site-document-actions"},Object(j.__)("Template not found")):Object(a.createElement)("div",{className:"edit-site-document-actions"},Object(j.__)("Loading…"))}function gt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const c=qe();function r(r){r.preventDefault(),n?c.replace(e,t):c.push(e,t)}return{href:Object(d.addQueryArgs)(window.location.href,e),onClick:r}}function Et(e){let{params:t={},state:n,replace:c=!1,children:r,...l}=e;const{href:o,onClick:i}=gt(t,n,c);return Object(a.createElement)("a",Object(Ne.a)({href:o,onClick:i},l),r)}function ft(e){var t;let{onClose:n,templatePart:c,closeTemplateDetailsDropdown:r}=e;const{revertTemplate:l}=Object(i.useDispatch)(ke),{params:o}=We(),s=gt({postId:c.id,postType:c.type},{fromTemplateId:o.postId});return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.MenuGroup,null,Object(a.createElement)(O.MenuItem,Object(Ne.a)({},s,{onClick:function(e){s.onClick(e),n(),r()}}),Object(j.sprintf)(Object(j.__)("Edit %s"),null===(t=c.title)||void 0===t?void 0:t.rendered))),V(c)&&Object(a.createElement)(O.MenuGroup,null,Object(a.createElement)(O.MenuItem,{info:Object(j.__)("Restore template to default state"),onClick:function(){l(c),n(),r()}},Object(j.__)("Clear customizations"))))}function ht(e){let{templatePart:t,clientId:n,closeTemplateDetailsDropdown:c}=e;const{selectBlock:r,toggleBlockHighlight:l}=Object(i.useDispatch)(Ye.store),o=Object(i.useSelect)(e=>e(u.store).__experimentalGetDefaultTemplatePartAreas().find(e=>e.area===t.area),[t.area]),s=()=>l(n,!0),m=()=>l(n,!1);return Object(a.createElement)("div",{role:"menuitem",className:"edit-site-template-details__template-areas-item"},Object(a.createElement)(O.MenuItem,{role:"button",icon:null==o?void 0:o.icon,iconPosition:"left",onClick:()=>{r(n)},onMouseOver:s,onMouseLeave:m,onFocus:s,onBlur:m},null==o?void 0:o.label),Object(a.createElement)(O.DropdownMenu,{icon:et.a,label:Object(j.__)("More options"),className:"edit-site-template-details__template-areas-item-more"},e=>{let{onClose:n}=e;return Object(a.createElement)(ft,{onClose:n,templatePart:t,closeTemplateDetailsDropdown:c})}))}function vt(e){let{closeTemplateDetailsDropdown:t}=e;const n=Object(i.useSelect)(e=>e(ke).getCurrentTemplateTemplateParts(),[]);return n.length?Object(a.createElement)(O.MenuGroup,{label:Object(j.__)("Areas"),className:"edit-site-template-details__group edit-site-template-details__template-areas"},n.map(e=>{let{templatePart:n,block:c}=e;return Object(a.createElement)(ht,{key:n.slug,clientId:c.clientId,templatePart:n,closeTemplateDetailsDropdown:t})})):null}function yt(e){let{template:t}=e;const[n,c]=Object(s.useEntityProp)("postType",t.type,"title",t.id);return Object(a.createElement)(O.TextControl,{label:Object(j.__)("Title"),value:n,help:Object(j.__)('Give the template a title that indicates its purpose, e.g. "Full Width".'),onChange:e=>{c(e||t.slug)}})}function wt(e){let{template:t,onClose:n}=e;const{title:c,description:r}=Object(i.useSelect)(e=>e(u.store).__experimentalGetTemplateInfo(t),[]),{revertTemplate:l}=Object(i.useDispatch)(ke),o=Object(a.useMemo)(()=>"wp_template"===(null==t?void 0:t.type)?{title:Object(j.__)("templates"),menu:"templates"}:L.find(e=>{let{area:n}=e;return n===(null==t?void 0:t.area)}),[t]),s=gt({postType:t.type,postId:void 0});if(!t)return null;return Object(a.createElement)("div",{className:"edit-site-template-details"},Object(a.createElement)("div",{className:"edit-site-template-details__group"},t.is_custom?Object(a.createElement)(yt,{template:t}):Object(a.createElement)(O.__experimentalHeading,{level:4,weight:600,className:"edit-site-template-details__title"},c),r&&Object(a.createElement)(O.__experimentalText,{size:"body",className:"edit-site-template-details__description",as:"p"},r)),Object(a.createElement)(vt,{closeTemplateDetailsDropdown:n}),V(t)&&Object(a.createElement)(O.MenuGroup,{className:"edit-site-template-details__group edit-site-template-details__revert"},Object(a.createElement)(O.MenuItem,{className:"edit-site-template-details__revert-button",info:Object(j.__)("Restore template to default state"),onClick:()=>{l(t),n()}},Object(j.__)("Clear customizations"))),Object(a.createElement)(O.Button,Object(Ne.a)({className:"edit-site-template-details__show-all-button"},s),Object(j.sprintf)(Object(j.__)("Browse all %s"),o.title)))}const St=e=>{e.preventDefault()};function xt(e){let{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}=e;const c=Object(a.useRef)(),{deviceType:r,entityTitle:l,template:o,templateType:m,isInserterOpen:d,isListViewOpen:p,listViewShortcut:b,isLoaded:_}=Object(i.useSelect)(e=>{const{__experimentalGetPreviewDeviceType:t,getEditedPostType:n,getEditedPostId:c,isInserterOpened:r,isListViewOpened:a}=e(ke),{getEditedEntityRecord:l}=e(s.store),{__experimentalGetTemplateInfo:o}=e(u.store),{getShortcutRepresentation:i}=e(Xe.store),m=n(),d=c(),p=l("postType",m,d),b=!!d;return{deviceType:t(),entityTitle:o(p).title,isLoaded:b,template:p,templateType:m,isInserterOpen:r(),isListViewOpen:a(),listViewShortcut:i("core/edit-site/toggle-list-view")}},[]),{__experimentalSetPreviewDeviceType:g,setIsInserterOpened:E,setIsListViewOpened:f}=Object(i.useDispatch)(ke),h=Object(Qe.useViewportMatch)("medium"),v=Object(a.useCallback)(()=>{d?c.current.focus():E(!0)},[d,E]),y=Object(a.useCallback)(()=>f(!p),[f,p]),w="wp_template_part"===m;return Object(a.createElement)("div",{className:"edit-site-header"},Object(a.createElement)("div",{className:"edit-site-header_start"},Object(a.createElement)("div",{className:"edit-site-header__toolbar"},Object(a.createElement)(O.Button,{ref:c,variant:"primary",isPressed:d,className:"edit-site-header-toolbar__inserter-toggle",onMouseDown:St,onClick:v,icon:Ze.a,label:Object(j._x)("Toggle block inserter","Generic label for block inserter button")}),h&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ye.ToolSelector,null),Object(a.createElement)(mt,null),Object(a.createElement)(dt,null),Object(a.createElement)(O.Button,{className:"edit-site-header-toolbar__list-view-toggle",icon:Je.a,isPressed:p,label:Object(j.__)("List View"),onClick:y,shortcut:b})))),Object(a.createElement)("div",{className:"edit-site-header_center"},Object(a.createElement)(_t,{entityTitle:l,entityLabel:"wp_template_part"===m?"template part":"template",isLoaded:_},e=>{let{onClose:t}=e;return Object(a.createElement)(wt,{template:o,onClose:t})})),Object(a.createElement)("div",{className:"edit-site-header_end"},Object(a.createElement)("div",{className:"edit-site-header__actions"},!w&&Object(a.createElement)(Ye.__experimentalPreviewOptions,{deviceType:r,setDeviceType:g}),Object(a.createElement)(ot,{openEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}),Object(a.createElement)(F.h.Slot,{scope:"core/edit-site"}),Object(a.createElement)(lt,null))))}var kt=n("Cg8A");function Tt(e){let{className:t,identifier:n,title:c,icon:r,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:c,icon:r,closeLabel:o,header:i,headerClassName:s},l),Object(a.createElement)(F.c,{scope:"core/edit-site",identifier:n,icon:r},c))}var Ct=Object(a.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(w.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"})),It=n("iClF"),Nt=n("2gm7"),Pt=n("1iEr");const Rt=[{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"}]}],Mt={"color.background":"color","color.text":"color","elements.link.color.text":"color","color.gradient":"gradient","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function At(e,t,n,c,r){const a=[Object(b.get)(e,["blocks",t,...n]),Object(b.get)(e,n)];for(const l of a)if(l){const a=["custom","theme","default"];for(const o of a){const a=l[o];if(a){const l=Object(b.find)(a,e=>e[c]===r);if(l){if("slug"===c)return l;return At(e,t,n,"slug",l.slug)[c]===l[c]?l:void 0}}}}}function Lt(e,t,n,c){if(!c)return c;const r=Mt[n],a=Object(b.find)(Rt,["cssVarInfix",r]);if(!a)return c;const{valueKey:l,path:o}=a,i=At(e,t,o,l,c);return i?`var:preset|${r}|${i.slug}`:c}function Bt(e,t,n){if(!n||!Object(b.isString)(n))return n;let c;if(n.startsWith("var:"))c=n.slice("var:".length).split("|");else{if(!n.startsWith("var(--wp--")||!n.endsWith(")"))return n;c=n.slice("var(--wp--".length,-")".length).split("--")}const[r,...a]=c;return"preset"===r?function(e,t,n,c){let[r,a]=c;const l=Object(b.find)(Rt,["cssVarInfix",r]);if(!l)return n;const o=At(e,t,l.path,"slug",a);if(o){const{valueKey:n}=l;return Bt(e,t,o[n])}return n}(e,t,n,a):"custom"===r?function(e,t,n,c){var r;const a=null!==(r=Object(b.get)(e,["blocks",t,"custom",...c]))&&void 0!==r?r:Object(b.get)(e,["custom",...c]);return a?Bt(e,t,a):n}(e,t,n,a):n}const Dt=Object(a.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),Ft={isGlobalStylesUserThemeJSON:!0,version:1};function Vt(e,t){var n;let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:o,user:i,setUserConfig:s}=Object(a.useContext)(Dt),u=t?`settings.blocks.${t}.${e}`:"settings."+e,m=t=>{s(n=>{const c=Object(b.cloneDeep)(n),r=l.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?u+".custom":u;return Object(b.set)(c,r,t),c})},d=t=>{const n=t?`settings.blocks.${t}.${e}`:"settings."+e,a=t=>{const c=Object(b.get)(t,n);var r,a;return l.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?null!==(r=null!==(a=null==c?void 0:c.custom)&&void 0!==a?a:null==c?void 0:c.theme)&&void 0!==r?r:null==c?void 0:c.default:c};let s;switch(c){case"all":s=a(r);break;case"user":s=a(i);break;case"base":s=a(o);break;default:throw"Unsupported source"}return s},p=null!==(n=d(t))&&void 0!==n?n:d();return[p,m]}function Gt(e,t){var n;let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all";const{merged:r,base:l,user:o,setUserConfig:i}=Object(a.useContext)(Dt),s=t?`styles.blocks.${t}.${e}`:"styles."+e,u=n=>{i(c=>{const a=Object(b.cloneDeep)(c);return Object(b.set)(a,s,Lt(r.settings,t,e,n)),a})};let m;switch(c){case"all":m=Bt(r.settings,t,null!==(n=Object(b.get)(o,s))&&void 0!==n?n:Object(b.get)(l,s));break;case"user":m=Bt(r.settings,t,Object(b.get)(o,s));break;case"base":m=Bt(l.settings,t,Object(b.get)(l,s));break;default:throw"Unsupported source"}return[m,u]}const zt=["background","backgroundColor","color","linkColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textDecoration","textTransform","padding"];function Ut(e){if(!e)return zt;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(b.has)(t.supports,l.__EXPERIMENTAL_STYLE_PROPERTY[e].support[0])&&!1!==Object(b.get)(t.supports,l.__EXPERIMENTAL_STYLE_PROPERTY[e].support)||Object(b.get)(t.supports,l.__EXPERIMENTAL_STYLE_PROPERTY[e].support,!1)?n.push(e):void 0}),n}function Ht(e){const[t]=Vt("color.palette.custom",e),[n]=Vt("color.palette.theme",e),[c]=Vt("color.palette.default",e),[r]=Vt("color.defaultPalette");return Object(a.useMemo)(()=>{const e=[];return n&&n.length&&e.push({name:Object(j._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&c&&c.length&&e.push({name:Object(j._x)("Default","Indicates this palette comes from WordPress."),colors:c}),t&&t.length&&e.push({name:Object(j._x)("Custom","Indicates this palette is created by the user."),colors:t}),e},[t,n,c])}var Wt=()=>{const[e="serif"]=Gt("typography.fontFamily"),[t="black"]=Gt("color.text"),[n="blue"]=Gt("elements.link.color.text"),[c="white"]=Gt("color.background"),[r]=Gt("color.gradient");return Object(a.createElement)(O.Card,{className:"edit-site-global-styles-preview",style:{background:null!=r?r:c}},Object(a.createElement)(O.__experimentalHStack,{spacing:5},Object(a.createElement)("div",{style:{fontFamily:e,fontSize:"80px",color:t}},"Aa"),Object(a.createElement)(O.__experimentalVStack,{spacing:2},Object(a.createElement)(O.ColorIndicator,{colorValue:t}),Object(a.createElement)(O.ColorIndicator,{colorValue:n}))))};var qt=function(e){let{path:t,icon:n,children:c,isBack:r=!1,...l}=e;const o=Object(O.__experimentalUseNavigator)();return Object(a.createElement)(O.__experimentalItem,Object(Ne.a)({onClick:()=>o.push(t,{isBack:r})},l),n&&Object(a.createElement)(O.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(It.a,{icon:n,size:24})),Object(a.createElement)(O.FlexItem,null,c)),!n&&c)};var $t=Object(a.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(w.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 Kt=Object(a.createElement)(w.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(w.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"})),Yt=n("Civd");const Xt=[];function Qt(e){return[Zt(e),Jt(e),en(e),tn(e)].some(Boolean)}function Zt(e){const t=Ut(e);return Vt("border.color",e)[0]&&t.includes("borderColor")}function Jt(e){const t=Ut(e);return Vt("border.radius",e)[0]&&t.includes("borderRadius")}function en(e){const t=Ut(e);return Vt("border.style",e)[0]&&t.includes("borderStyle")}function tn(e){const t=Ut(e);return Vt("border.width",e)[0]&&t.includes("borderWidth")}function nn(e){let{name:t}=e;const n=Object(O.__experimentalUseCustomUnits)({availableUnits:Vt("spacing.units")[0]||["px","em","rem"]}),c=tn(t),[r,l]=Gt("border.width",t),o=en(t),[i,s]=Gt("border.style",t),[u=Xt]=Vt("color.palette"),m=!Vt("color.custom")[0],d=!Vt("color.customGradient")[0],p=Zt(t),[b,_]=Gt("border.color",t),g=Jt(t),[E,f]=Gt("border.radius",t);return Object(a.createElement)(O.PanelBody,{title:Object(j.__)("Border"),initialOpen:!0},(c||o)&&Object(a.createElement)("div",{className:"edit-site-global-styles-sidebar__border-controls-row"},c&&Object(a.createElement)(O.__experimentalUnitControl,{value:r,label:Object(j.__)("Width"),min:0,onChange:e=>{l(e||void 0)},units:n}),o&&Object(a.createElement)(Ye.__experimentalBorderStyleControl,{value:i,onChange:s})),p&&Object(a.createElement)(Ye.__experimentalColorGradientControl,{label:Object(j.__)("Color"),colorValue:b,colors:u,gradients:void 0,disableCustomColors:m,disableCustomGradients:d,onColorChange:_}),g&&Object(a.createElement)(Ye.__experimentalBorderRadiusControl,{values:E,onChange:f}))}function cn(e){const t=Ut(e);return t.includes("color")||t.includes("backgroundColor")||t.includes("background")||t.includes("linkColor")}const rn=["horizontal","vertical"];function an(e){const t=ln(e),n=on(e),c=sn(e);return t||n||c}function ln(e){const t=Ut(e),[n]=Vt("spacing.padding",e);return n&&t.includes("padding")}function on(e){const t=Ut(e),[n]=Vt("spacing.margin",e);return n&&t.includes("margin")}function sn(e){const t=Ut(e),[n]=Vt("spacing.blockGap",e);return n&&t.includes("--wp--style--block-gap")}function un(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 mn(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function dn(e){let{name:t}=e;const n=ln(t),c=on(t),r=sn(t),l=Object(O.__experimentalUseCustomUnits)({availableUnits:Vt("spacing.units",t)[0]||["%","px","em","rem","vw"]}),[o,i]=Gt("spacing.padding",t),s=mn(o),u=Object(Ye.__experimentalUseCustomSides)(t,"padding"),m=u&&u.some(e=>rn.includes(e)),d=e=>{const t=un(e,u);i(t)},p=()=>d({}),[b,_]=Gt("spacing.margin",t),g=mn(b),E=Object(Ye.__experimentalUseCustomSides)(t,"margin"),f=E&&E.some(e=>rn.includes(e)),h=e=>{const t=un(e,E);_(t)},v=()=>h({}),[y,w]=Gt("spacing.blockGap",t),S=()=>w(void 0);return Object(a.createElement)(O.__experimentalToolsPanel,{label:Object(j.__)("Dimensions"),resetAll:()=>{p(),v(),S()}},n&&Object(a.createElement)(O.__experimentalToolsPanelItem,{hasValue:()=>!!s&&Object.keys(s).length,label:Object(j.__)("Padding"),onDeselect:p,isShownByDefault:!0},Object(a.createElement)(O.__experimentalBoxControl,{values:s,onChange:d,label:Object(j.__)("Padding"),sides:u,units:l,allowReset:!1,splitOnAxis:m})),c&&Object(a.createElement)(O.__experimentalToolsPanelItem,{hasValue:()=>!!g&&Object.keys(g).length,label:Object(j.__)("Margin"),onDeselect:v,isShownByDefault:!0},Object(a.createElement)(O.__experimentalBoxControl,{values:g,onChange:h,label:Object(j.__)("Margin"),sides:E,units:l,allowReset:!1,splitOnAxis:f})),r&&Object(a.createElement)(O.__experimentalToolsPanelItem,{hasValue:()=>!!y,label:Object(j.__)("Block spacing"),onDeselect:S,isShownByDefault:!0},Object(a.createElement)(O.__experimentalUnitControl,{label:Object(j.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:w,units:l,value:y})))}function pn(e){const t=bn(e),n=On(e),c=jn(e),r=Ut(e);return t||n||c||r.includes("fontSize")}function bn(e){const t=Ut(e);return Vt("typography.lineHeight",e)[0]&&t.includes("lineHeight")}function On(e){const t=Ut(e),n=Vt("typography.fontStyle",e)[0]&&t.includes("fontStyle"),c=Vt("typography.fontWeight",e)[0]&&t.includes("fontWeight");return n||c}function jn(e){const t=Ut(e);return Vt("typography.letterSpacing",e)[0]&&t.includes("letterSpacing")}function _n(e){let{name:t,element:n}=e;const c=Ut(t),r="text"!==n&&n?`elements.${n}.`:"",[l]=Vt("typography.fontSizes",t),o=!Vt("typography.customFontSize",t)[0],[i]=Vt("typography.fontFamilies",t),s=Vt("typography.fontStyle",t)[0]&&c.includes("fontStyle"),u=Vt("typography.fontWeight",t)[0]&&c.includes("fontWeight"),m=bn(t),d=On(t),p=jn(t),[b,j]=Gt(r+"typography.fontFamily",t),[_,g]=Gt(r+"typography.fontSize",t),[E,f]=Gt(r+"typography.fontStyle",t),[h,v]=Gt(r+"typography.fontWeight",t),[y,w]=Gt(r+"typography.lineHeight",t),[S,x]=Gt(r+"typography.letterSpacing",t),[k]=Gt(r+"color.background",t),[T]=Gt(r+"color.gradient",t),[C]=Gt(r+"color.text",t),I="link"===n?{textDecoration:"underline"}:{};return Object(a.createElement)(O.PanelBody,{className:"edit-site-typography-panel",initialOpen:!0},Object(a.createElement)("div",{className:"edit-site-typography-panel__preview",style:{fontFamily:null!=b?b:"serif",background:null!=T?T:k,color:C,fontSize:_,fontStyle:E,fontWeight:h,letterSpacing:S,...I}},"Aa"),c.includes("fontFamily")&&Object(a.createElement)(Ye.__experimentalFontFamilyControl,{fontFamilies:i,value:b,onChange:j}),c.includes("fontSize")&&Object(a.createElement)(O.FontSizePicker,{value:_,onChange:g,fontSizes:l,disableCustomFontSizes:o}),m&&Object(a.createElement)(Ye.LineHeightControl,{value:y,onChange:w}),d&&Object(a.createElement)(Ye.__experimentalFontAppearanceControl,{value:{fontStyle:E,fontWeight:h},onChange:e=>{let{fontStyle:t,fontWeight:n}=e;f(t),v(n)},hasFontStyles:s,hasFontWeights:u}),p&&Object(a.createElement)(Ye.__experimentalLetterSpacingControl,{value:S,onChange:x}))}var gn=function(e){let{name:t,parentMenu:n=""}=e;const c=pn(t),r=cn(t),l=Qt(t),o=an(t),i=l||o;return Object(a.createElement)(O.__experimentalItemGroup,null,c&&Object(a.createElement)(qt,{icon:$t,path:n+"/typography"},Object(j.__)("Typography")),r&&Object(a.createElement)(qt,{icon:Kt,path:n+"/colors"},Object(j.__)("Colors")),i&&Object(a.createElement)(qt,{icon:Yt.a,path:n+"/layout"},Object(j.__)("Layout")))};var En=function(){return Object(a.createElement)(O.Card,{size:"small"},Object(a.createElement)(O.CardBody,null,Object(a.createElement)(Wt,null)),Object(a.createElement)(O.CardBody,null,Object(a.createElement)(gn,null)),Object(a.createElement)(O.CardDivider,null),Object(a.createElement)(O.CardBody,null,Object(a.createElement)(O.__experimentalItemGroup,null,Object(a.createElement)(O.__experimentalItem,null,Object(j.__)("Customize the appearance of specific blocks for the whole site.")),Object(a.createElement)(qt,{path:"/blocks"},Object(a.createElement)(O.__experimentalHStack,{justify:"space-between"},Object(a.createElement)(O.FlexItem,null,Object(j.__)("Blocks")),Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(It.a,{icon:Object(j.isRTL)()?Nt.a:Pt.a})))))))};var fn=function(e){let{back:t,title:n,description:c}=e;return Object(a.createElement)(O.__experimentalVStack,{spacing:2},Object(a.createElement)(O.__experimentalHStack,{spacing:2},Object(a.createElement)(O.__experimentalView,null,Object(a.createElement)(qt,{path:t,icon:Object(a.createElement)(It.a,{icon:Object(j.isRTL)()?Pt.a:Nt.a,variant:"muted"}),size:"small",isBack:!0,"aria-label":Object(j.__)("Navigate to the previous view")})),Object(a.createElement)(O.__experimentalSpacer,null,Object(a.createElement)(O.__experimentalHeading,{level:5},n))),c&&Object(a.createElement)("p",{className:"edit-site-global-styles-header__description"},c))};function hn(e){let{block:t}=e;const n=pn(t.name),c=cn(t.name),r=Qt(t.name),l=an(t.name);return n||c||(r||l)?Object(a.createElement)(qt,{path:"/blocks/"+t.name},Object(a.createElement)(O.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(Ye.BlockIcon,{icon:t.icon})),Object(a.createElement)(O.FlexItem,null,t.title))):null}var vn=function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:"/",title:Object(j.__)("Blocks"),description:Object(j.__)("Customize the appearance of specific blocks and for the whole site.")}),Object(l.getBlockTypes)().map(e=>Object(a.createElement)(hn,{block:e,key:"menu-itemblock-"+e.name})))};var yn=function(e){let{name:t}=e;const n=Object(l.getBlockType)(t);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:"/blocks",title:n.title}),Object(a.createElement)(gn,{parentMenu:"/blocks/"+t,name:t}))};var wn=function(e){let{children:t}=e;return Object(a.createElement)(O.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:2},t)};function Sn(e){let{name:t,parentMenu:n,element:c,label:r}=e;const l=!t,o="text"!==c&&c?`elements.${c}.`:"",i="link"===c?{textDecoration:"underline"}:{},[s]=Gt(o+"typography.fontFamily",t),[u]=Gt(o+"typography.fontStyle",t),[m]=Gt(o+"typography.fontWeight",t),[d]=Gt(o+"typography.letterSpacing",t),[p]=Gt(o+"color.background",t),[b]=Gt(o+"color.gradient",t),[_]=Gt(o+"color.text",t);return l?Object(a.createElement)(qt,{path:n+"/typography/"+c},Object(a.createElement)(O.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(O.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=s?s:"serif",background:null!=b?b:p,color:_,fontStyle:u,fontWeight:m,letterSpacing:d,...i}},Object(j.__)("Aa")),Object(a.createElement)(O.FlexItem,null,r))):null}var xn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:n||"/",title:Object(j.__)("Typography"),description:Object(j.__)("Manage the typography settings for different elements.")}),!t&&Object(a.createElement)("div",{className:"edit-site-global-styles-screen-typography"},Object(a.createElement)(O.__experimentalVStack,{spacing:3},Object(a.createElement)(wn,null,Object(j.__)("Elements")),Object(a.createElement)(O.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(Sn,{name:t,parentMenu:n,element:"text",label:Object(j.__)("Text")}),Object(a.createElement)(Sn,{name:t,parentMenu:n,element:"link",label:Object(j.__)("Links")})))),!!t&&Object(a.createElement)(_n,{name:t,element:"text"}))};const kn={text:{description:Object(j.__)("Manage the fonts used on the site."),title:Object(j.__)("Text")},link:{description:Object(j.__)("Manage the fonts and typography used on the links."),title:Object(j.__)("Links")}};var Tn=function(e){let{name:t,element:n}=e;const c=void 0===t?"/typography":"/blocks/"+t+"/typography";return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:c,title:kn[n].title,description:kn[n].description}),Object(a.createElement)(_n,{name:t,element:n}))};const Cn=[];var In=function(e){let{name:t}=e;const[n]=Vt("color.palette.custom"),[c]=Vt("color.palette.theme"),[r]=Vt("color.palette.default"),[l]=Vt("color.defaultPalette",t),o=Object(a.useMemo)(()=>[...n||Cn,...c||Cn,...r&&l?r:Cn],[n,c,r,l]),i=t?"/blocks/"+t+"/colors/palette":"/colors/palette",s=o.length>0?Object(j.sprintf)(Object(j._n)("%d color","%d colors",o.length),o.length):Object(j.__)("Add custom colors");return Object(a.createElement)(O.__experimentalVStack,{spacing:3},Object(a.createElement)(wn,null,Object(j.__)("Palette")),Object(a.createElement)(O.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(qt,{path:i},Object(a.createElement)(O.__experimentalHStack,{isReversed:0===o.length},Object(a.createElement)(O.FlexBlock,null,Object(a.createElement)(O.__experimentalZStack,{isLayered:!1,offset:-8},o.slice(0,5).map(e=>{let{color:t}=e;return Object(a.createElement)(O.ColorIndicator,{key:t,colorValue:t})}))),Object(a.createElement)(O.FlexItem,null,s)))))};function Nn(e){let{name:t,parentMenu:n}=e;const c=Ut(t),r=c.includes("backgroundColor")||c.includes("background"),[l]=Gt("color.background",t),[o]=Gt("color.gradient",t);return r?Object(a.createElement)(qt,{path:n+"/colors/background"},Object(a.createElement)(O.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.ColorIndicator,{colorValue:null!=o?o:l})),Object(a.createElement)(O.FlexItem,null,Object(j.__)("Background")))):null}function Pn(e){let{name:t,parentMenu:n}=e;const c=Ut(t).includes("color"),[r]=Gt("color.text",t);return c?Object(a.createElement)(qt,{path:n+"/colors/text"},Object(a.createElement)(O.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.ColorIndicator,{colorValue:r})),Object(a.createElement)(O.FlexItem,null,Object(j.__)("Text")))):null}function Rn(e){let{name:t,parentMenu:n}=e;const c=Ut(t).includes("linkColor"),[r]=Gt("elements.link.color.text",t);return c?Object(a.createElement)(qt,{path:n+"/colors/link"},Object(a.createElement)(O.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.ColorIndicator,{colorValue:r})),Object(a.createElement)(O.FlexItem,null,Object(j.__)("Links")))):null}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)(fn,{back:n||"/",title:Object(j.__)("Colors"),description:Object(j.__)("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)(O.__experimentalVStack,{spacing:10},Object(a.createElement)(In,{name:t}),Object(a.createElement)(O.__experimentalVStack,{spacing:3},Object(a.createElement)(wn,null,Object(j.__)("Elements")),Object(a.createElement)(O.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(Nn,{name:t,parentMenu:n}),Object(a.createElement)(Pn,{name:t,parentMenu:n}),Object(a.createElement)(Rn,{name:t,parentMenu:n}))))))};function An(e){let{name:t}=e;const[n,c]=Vt("color.palette.theme",t),[r]=Vt("color.palette.theme",t,"base"),[l,o]=Vt("color.palette.default",t),[i]=Vt("color.palette.default",t,"base"),[s,u]=Vt("color.palette.custom",t),[m]=Vt("color.defaultPalette",t);return Object(a.createElement)(O.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:10},!!n&&!!n.length&&Object(a.createElement)(O.__experimentalPaletteEdit,{canReset:n!==r,canOnlyChangeValues:!0,colors:n,onChange:c,paletteLabel:Object(j.__)("Theme")}),!!l&&!!l.length&&!!m&&Object(a.createElement)(O.__experimentalPaletteEdit,{canReset:l!==i,canOnlyChangeValues:!0,colors:l,onChange:o,paletteLabel:Object(j.__)("Default")}),Object(a.createElement)(O.__experimentalPaletteEdit,{colors:s,onChange:u,paletteLabel:Object(j.__)("Custom"),emptyMessage:Object(j.__)("Custom colors are empty! Add some colors to create your own color palette."),slugPrefix:"custom-"}))}function Ln(e){let{name:t}=e;const[n,c]=Vt("color.gradients.theme",t),[r]=Vt("color.gradients.theme",t,"base"),[l,o]=Vt("color.gradients.default",t),[i]=Vt("color.gradients.default",t,"base"),[s,u]=Vt("color.gradients.custom",t),[m]=Vt("color.defaultGradients",t),[d]=Vt("color.duotone")||[];return Object(a.createElement)(O.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:10},!!n&&!!n.length&&Object(a.createElement)(O.__experimentalPaletteEdit,{canReset:n!==r,canOnlyChangeValues:!0,gradients:n,onChange:c,paletteLabel:Object(j.__)("Theme")}),!!l&&!!l.length&&!!m&&Object(a.createElement)(O.__experimentalPaletteEdit,{canReset:l!==i,canOnlyChangeValues:!0,gradients:l,onChange:o,paletteLabel:Object(j.__)("Default")}),Object(a.createElement)(O.__experimentalPaletteEdit,{gradients:s,onChange:u,paletteLabel:Object(j.__)("Custom"),emptyMessage:Object(j.__)("Custom gradients are empty! Add some gradients to create your own palette."),slugPrefix:"custom-"}),Object(a.createElement)("div",null,Object(a.createElement)(wn,null,Object(j.__)("Duotone")),Object(a.createElement)(O.__experimentalSpacer,{margin:3}),Object(a.createElement)(O.DuotonePicker,{duotonePalette:d,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:b.noop})))}var Bn=function(e){let{name:t}=e;const[n,c]=Object(a.useState)("solid"),r=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:r+"/colors",title:Object(j.__)("Palette"),description:Object(j.__)("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)(O.__experimentalToggleGroupControl,{className:"edit-site-screen-color-palette-toggle",value:n,onChange:c,label:Object(j.__)("Select palette type"),hideLabelFromVision:!0,isBlock:!0},Object(a.createElement)(O.__experimentalToggleGroupControlOption,{value:"solid",label:Object(j.__)("Solid")}),Object(a.createElement)(O.__experimentalToggleGroupControlOption,{value:"gradient",label:Object(j.__)("Gradient")})),"solid"===n&&Object(a.createElement)(An,{name:t}),"gradient"===n&&Object(a.createElement)(Ln,{name:t}))};var Dn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,c=Ut(t),[r]=Vt("color.palette",t),[l]=Vt("color.gradients",t),[o]=Vt("color.custom",t),[i]=Vt("color.customGradient",t),s=Ht(t),u=function(e){const[t]=Vt("color.gradients.custom",e),[n]=Vt("color.gradients.theme",e),[c]=Vt("color.gradients.default",e),[r]=Vt("color.defaultGradients");return Object(a.useMemo)(()=>{const e=[];return n&&n.length&&e.push({name:Object(j._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&c&&c.length&&e.push({name:Object(j._x)("Default","Indicates this palette comes from WordPress."),gradients:c}),t&&t.length&&e.push({name:Object(j._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e},[t,n,c])}(t),[m]=Vt("color.background",t),d=c.includes("backgroundColor")&&m&&(r.length>0||o),p=c.includes("background")&&(l.length>0||i),[b,O]=Gt("color.background",t),[_]=Gt("color.background",t,"user"),[g,E]=Gt("color.gradient",t),[f]=Gt("color.gradient",t,"user");if(!d&&!p)return null;const h=[];let v={};d&&(v={colorValue:b,onColorChange:O},b&&(v.clearable=b===_));let y={};return p&&(y={gradientValue:g,onGradientChange:E},g&&(y.clearable=g===f)),h.push({...v,...y,label:Object(j.__)("Background color")}),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:n+"/colors",title:Object(j.__)("Background"),description:Object(j.__)("Set a background color or gradient for the whole website.")}),Object(a.createElement)(Ye.__experimentalPanelColorGradientSettings,{title:Object(j.__)("Color"),settings:h,colors:s,gradients:u,disableCustomColors:!o,disableCustomGradients:!i,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0}))};var Fn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,c=Ut(t),[r]=Vt("color.palette",t),[l]=Vt("color.custom",t),[o]=Vt("color.text",t),i=Ht(t),s=c.includes("color")&&o&&(r.length>0||l),[u,m]=Gt("color.text",t),[d]=Gt("color.text",t,"user");if(!s)return null;const p=[{colorValue:u,onColorChange:m,label:Object(j.__)("Text color"),clearable:u===d}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:n+"/colors",title:Object(j.__)("Text"),description:Object(j.__)("Set the default color used for text across the site.")}),Object(a.createElement)(Ye.__experimentalPanelColorGradientSettings,{title:Object(j.__)("Color"),settings:p,colors:i,disableCustomColors:!l,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0}))};var Vn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,c=Ut(t),[r]=Vt("color.palette",t),[l]=Vt("color.custom",t),o=Ht(t),[i]=Vt("color.link",t),s=c.includes("linkColor")&&i&&(r.length>0||l),[u,m]=Gt("elements.link.color.text",t),[d]=Gt("elements.link.color.text",t,"user");if(!s)return null;const p=[{colorValue:u,onColorChange:m,label:Object(j.__)("Link color"),clearable:u===d}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:n+"/colors",title:Object(j.__)("Links"),description:Object(j.__)("Set the default color used for links across the site.")}),Object(a.createElement)(Ye.__experimentalPanelColorGradientSettings,{title:Object(j.__)("Color"),settings:p,colors:o,disableCustomColors:!l,__experimentalHasMultipleOrigins:!0,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0}))};var Gn=function(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t,c=Qt(t),r=an(t);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(fn,{back:n||"/",title:Object(j.__)("Layout")}),r&&Object(a.createElement)(dn,{name:t}),c&&Object(a.createElement)(nn,{name:t}))};function zn(e){let{name:t}=e;const n=void 0===t?"":"/blocks/"+t;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/typography"},Object(a.createElement)(xn,{name:t})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/typography/text"},Object(a.createElement)(Tn,{name:t,element:"text"})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/typography/link"},Object(a.createElement)(Tn,{name:t,element:"link"})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/colors"},Object(a.createElement)(Mn,{name:t})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/colors/palette"},Object(a.createElement)(Bn,{name:t})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/colors/background"},Object(a.createElement)(Dn,{name:t})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/colors/text"},Object(a.createElement)(Fn,{name:t})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/colors/link"},Object(a.createElement)(Vn,{name:t})),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:n+"/layout"},Object(a.createElement)(Gn,{name:t})))}var Un=function(){const e=Object(l.getBlockTypes)();return Object(a.createElement)(O.__experimentalNavigatorProvider,{initialPath:"/"},Object(a.createElement)(O.__experimentalNavigatorScreen,{path:"/"},Object(a.createElement)(En,null)),Object(a.createElement)(O.__experimentalNavigatorScreen,{path:"/blocks"},Object(a.createElement)(vn,null)),e.map(e=>Object(a.createElement)(O.__experimentalNavigatorScreen,{key:"menu-block-"+e.name,path:"/blocks/"+e.name},Object(a.createElement)(yn,{name:e.name}))),Object(a.createElement)(zn,null),e.map(e=>Object(a.createElement)(zn,{key:"screens-block-"+e.name,name:e.name})))};function Hn(e){if(Object(b.startsWith)(e,"var:")){return`var(--wp--${e.slice("var:".length).split("|").join("--")})`}return e}const Wn=(e,t)=>{var n,c;const r=[];if(null==e||!e.settings)return r;const a=e=>{const t={};return Rt.forEach(n=>{let{path:c}=n;const r=Object(b.get)(e,c,!1);!1!==r&&Object(b.set)(t,c,r)}),t},l=a(e.settings),o=null===(n=e.settings)||void 0===n?void 0:n.custom;return Object(b.isEmpty)(l)&&!o||r.push({presets:l,custom:o,selector:"body"}),Object(b.forEach)(null===(c=e.settings)||void 0===c?void 0:c.blocks,(e,n)=>{const c=a(e),l=e.custom;Object(b.isEmpty)(c)&&!l||r.push({presets:c,custom:l,selector:t[n].selector})}),r},qn=(e,t)=>{const n=Wn(e,t);let c="";return n.forEach(e=>{let{presets:t,custom:n,selector:r}=e;const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(b.reduce)(Rt,(t,n)=>{let{path:c,valueKey:r,cssVarInfix:a}=n;const l=Object(b.get)(e,c,[]);return["default","theme","custom"].forEach(e=>{l[e]&&l[e].forEach(e=>{t.push(`--wp--preset--${a}--${Object(b.kebabCase)(e.slug)}: ${e[r]}`)})}),t},[])}(t),l=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,c=arguments.length>2?arguments[2]:void 0,r=[];return Object.keys(t).forEach(a=>{const l=n+Object(b.kebabCase)(a.replace("/","-")),o=t[a];if(o instanceof Object){const t=l+c;r=[...r,...e(o,t,c)]}else r.push(`${l}: ${o}`)}),r}(n,"--wp--custom--","--");l.length>0&&a.push(...l),a.length>0&&(c+=`${r}{${a.join(";")};}`)}),c},$n=(e,t)=>{const n=((e,t)=>{var n,c;const r=[];if(null==e||!e.styles)return r;const a=e=>Object(b.pickBy)(e,(e,t)=>["border","color","spacing","typography"].includes(t)),o=a(e.styles);return o&&r.push({styles:o,selector:"body"}),Object(b.forEach)(null===(n=e.styles)||void 0===n?void 0:n.elements,(e,t)=>{e&&l.__EXPERIMENTAL_ELEMENTS[t]&&r.push({styles:e,selector:l.__EXPERIMENTAL_ELEMENTS[t]})}),Object(b.forEach)(null===(c=e.styles)||void 0===c?void 0:c.blocks,(e,n)=>{var c;const o=a(e);o&&null!=t&&null!==(c=t[n])&&void 0!==c&&c.selector&&r.push({styles:o,selector:t[n].selector}),Object(b.forEach)(null==e?void 0:e.elements,(e,c)=>{e&&null!=t&&t[n]&&null!==l.__EXPERIMENTAL_ELEMENTS&&void 0!==l.__EXPERIMENTAL_ELEMENTS&&l.__EXPERIMENTAL_ELEMENTS[c]&&r.push({styles:e,selector:t[n].selector.split(",").map(e=>e+" "+l.__EXPERIMENTAL_ELEMENTS[c]).join(",")})})}),r})(e,t),c=Wn(e,t);let r=".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 c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(b.reduce)(l.__EXPERIMENTAL_STYLE_PROPERTY,(t,n,c)=>{let{value:r,properties:a}=n;const l=r;if("elements"===Object(b.first)(l))return t;const o=Object(b.get)(e,l);if(a&&!Object(b.isString)(o))Object.entries(a).forEach(e=>{const[n,c]=e;if(!Object(b.get)(o,[c],!1))return;const r=Object(b.kebabCase)(n);t.push(`${r}: ${Hn(Object(b.get)(o,[c]))}`)});else if(Object(b.get)(e,l,!1)){const n=c.startsWith("--")?c:Object(b.kebabCase)(c);t.push(`${n}: ${Hn(Object(b.get)(e,l))}`)}return t},[])}(n);0!==c.length&&(r+=`${t}{${c.join(";")};}`)}),c.forEach(e=>{let{selector:t,presets:n}=e;"body"===t&&(t="");const c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(b.reduce)(Rt,(n,c)=>{let{path:r,cssVarInfix:a,classes:l}=c;if(!l)return n;const o=Object(b.get)(t,r,[]);return["default","theme","custom"].forEach(t=>{o[t]&&o[t].forEach(t=>{let{slug:c}=t;l.forEach(t=>{let{classSuffix:r,propertyName:l}=t;const o=`.has-${Object(b.kebabCase)(c)}-${r}`,i=e.split(",").map(e=>`${e}${o}`).join(","),s=`var(--wp--preset--${a}--${Object(b.kebabCase)(c)})`;n+=`${i}{${l}: ${s} !important;}`})})}),n},"")}(t,n);Object(b.isEmpty)(c)||(r+=c)}),r};function Kn(){const[e,t]=(()=>{const{user:e,setUserConfig:t}=Object(a.useContext)(Dt);return[!!e&&!Object(b.isEqual)(e,Ft),Object(a.useCallback)(()=>t(()=>Ft),[t])]})(),{toggleFeature:n}=Object(i.useDispatch)(ke);return Object(a.createElement)(Tt,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:Object(j.__)("Styles"),icon:Ct,closeLabel:Object(j.__)("Close global styles sidebar"),header:Object(a.createElement)(O.Flex,null,Object(a.createElement)(O.FlexBlock,null,Object(a.createElement)("strong",null,Object(j.__)("Styles")),Object(a.createElement)("span",{className:"edit-site-global-styles-sidebar__beta"},Object(j.__)("Beta"))),Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.DropdownMenu,{icon:et.a,label:Object(j.__)("More Global Styles Actions"),toggleProps:{disabled:!e},controls:[{title:Object(j.__)("Reset to defaults"),onClick:t},{title:Object(j.__)("Welcome Guide"),onClick:()=>n("welcomeGuideStyles")}]})))},Object(a.createElement)(Un,null))}const Yn="edit-site/template",Xn="edit-site/block-inspector";var Qn=e=>{let{sidebarName:t}=e;const{enableComplementaryArea:n}=Object(i.useDispatch)(F.i),[c,r]=t===Yn?[Object(j.__)("Template (selected)"),"is-active"]:[Object(j.__)("Template"),""],[l,o]=t===Xn?[Object(j.__)("Block (selected)"),"is-active"]:[Object(j.__)("Block"),""];return Object(a.createElement)("ul",null,Object(a.createElement)("li",null,Object(a.createElement)(O.Button,{onClick:()=>n(I,Yn),className:"edit-site-sidebar__panel-tab "+r,"aria-label":c,"data-label":Object(j.__)("Template")},Object(j.__)("Template"))),Object(a.createElement)("li",null,Object(a.createElement)(O.Button,{onClick:()=>n(I,Xn),className:"edit-site-sidebar__panel-tab "+o,"aria-label":l,"data-label":Object(j.__)("Block")},Object(j.__)("Block"))))};function Zn(e){let{area:t,clientId:n}=e;const{selectBlock:c,toggleBlockHighlight:r}=Object(i.useDispatch)(Ye.store),l=Object(i.useSelect)(e=>e(u.store).__experimentalGetDefaultTemplatePartAreas().find(e=>e.area===t),[t]),o=()=>r(n,!0),s=()=>r(n,!1);return Object(a.createElement)(O.Button,{className:"edit-site-template-card__template-areas-item",icon:null==l?void 0:l.icon,onMouseOver:o,onMouseLeave:s,onFocus:o,onBlur:s,onClick:()=>{c(n)}},null==l?void 0:l.label)}function Jn(){const e=Object(i.useSelect)(e=>e(ke).getCurrentTemplateTemplateParts(),[]);return e.length?Object(a.createElement)("section",{className:"edit-site-template-card__template-areas"},Object(a.createElement)(O.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},Object(j.__)("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)(Zn,{area:t.area,clientId:n.clientId}))}))):null}function ec(){const{title:e,description:t,icon:n}=Object(i.useSelect)(e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ke),{getEntityRecord:c}=e(s.store),{__experimentalGetTemplateInfo:r}=e(u.store),a=c("postType",t(),n());return a?r(a):{}},[]);return e||t?Object(a.createElement)("div",{className:"edit-site-template-card"},Object(a.createElement)(O.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)(Jn,null))):null}const{Slot:tc,Fill:nc}=Object(O.createSlotFill)("EditSiteSidebarInspector"),cc=nc;function rc(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n}=Object(i.useSelect)(e=>{const t=e(F.i).getActiveComplementaryArea(I);return{sidebar:t,isEditorSidebarOpened:[Xn,Yn].includes(t),hasBlockSelection:!!e(Ye.store).getBlockSelectionStart()}},[]),{enableComplementaryArea:c}=Object(i.useDispatch)(F.i);Object(a.useEffect)(()=>{t&&c(I,n?Xn:Yn)},[n,t]);let r=e;return t||(r=n?Xn:Yn),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Tt,{identifier:r,title:Object(j.__)("Settings"),icon:kt.a,closeLabel:Object(j.__)("Close settings sidebar"),header:Object(a.createElement)(Qn,{sidebarName:r}),headerClassName:"edit-site-sidebar__panel-tabs"},r===Yn&&Object(a.createElement)(O.PanelBody,null,Object(a.createElement)(ec,null)),r===Xn&&Object(a.createElement)(tc,{bubblesVirtually:!0})),Object(a.createElement)(Kn,null))}var ac=n("rmEH");var lc=Object(a.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(w.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),oc=n("OE6V");const ic="__experimentalMainDashboardButton",{Fill:sc,Slot:uc}=Object(O.createSlotFill)(ic),mc=sc;mc.Slot=e=>{let{children:t}=e;const n=Object(O.__experimentalUseSlot)(ic);return Boolean(n.fills&&n.fills.length)?Object(a.createElement)(uc,{bubblesVirtually:!0}):t};var dc=mc;const pc="site-editor";function bc(e){let{params:t,replace:n,...c}=e;const r=gt(t,n);return Object(a.createElement)(O.__experimentalNavigationItem,Object(Ne.a)({},r,c))}var Oc=e=>{let{activeItem:t=pc}=e;const{isNavigationOpen:n,siteTitle:c}=Object(i.useSelect)(e=>{const{getEntityRecord:t}=e(s.store);return{siteTitle:(t("root","__unstableBase",void 0)||{}).name,isNavigationOpen:e(ke).isNavigationOpened()}},[]),{setIsNavigationPanelOpened:r}=Object(i.useDispatch)(ke);return Object(a.createElement)("div",{className:bt()("edit-site-navigation-panel",{"is-open":n}),onKeyDown:e=>{e.keyCode!==ut.ESCAPE||e.defaultPrevented||(e.preventDefault(),r(!1))}},Object(a.createElement)("div",{className:"edit-site-navigation-panel__inner"},Object(a.createElement)("div",{className:"edit-site-navigation-panel__site-title-container"},Object(a.createElement)("div",{className:"edit-site-navigation-panel__site-title"},Object(ac.decodeEntities)(c))),Object(a.createElement)("div",{className:"edit-site-navigation-panel__scroll-container"},Object(a.createElement)(O.__experimentalNavigation,{activeItem:t},Object(a.createElement)(dc.Slot,null,Object(a.createElement)(O.__experimentalNavigationBackButton,{backButtonLabel:Object(j.__)("Dashboard"),className:"edit-site-navigation-panel__back-to-dashboard",href:"index.php"})),Object(a.createElement)(O.__experimentalNavigationMenu,null,Object(a.createElement)(O.__experimentalNavigationGroup,{title:Object(j.__)("Editor")},Object(a.createElement)(bc,{icon:lc,title:Object(j.__)("Site"),item:pc,params:{postId:void 0,postType:void 0}}),Object(a.createElement)(bc,{icon:Yt.a,title:Object(j.__)("Templates"),item:"wp_template",params:{postId:void 0,postType:"wp_template"}}),Object(a.createElement)(bc,{icon:oc.a,title:Object(j.__)("Template Parts"),item:"wp_template_part",params:{postId:void 0,postType:"wp_template_part"}})))))))},jc=n("wduq");var _c=function(e){let{icon:t}=e;const{isNavigationOpen:n,isRequestingSiteIcon:c,siteIconUrl:r}=Object(i.useSelect)(e=>{const{getEntityRecord:t,isResolving:n}=e(s.store),c=t("root","__unstableBase",void 0)||{};return{isNavigationOpen:e(ke).isNavigationOpened(),isRequestingSiteIcon:n("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:c.site_icon_url}},[]),{setIsNavigationPanelOpened:l}=Object(i.useDispatch)(ke),o=Object(Qe.useReducedMotion)(),u=Object(a.useRef)();Object(a.useEffect)(()=>{n||u.current.focus()},[n]);let m=Object(a.createElement)(O.Icon,{size:"36px",icon:jc.a});const d={expand:{scale:1.7,borderRadius:0,transition:{type:"tween",duration:"0.2"}}};return r?m=Object(a.createElement)(O.__unstableMotion.img,{variants:!o&&d,alt:Object(j.__)("Site Icon"),className:"edit-site-navigation-toggle__site-icon",src:r}):c?m=null:t&&(m=Object(a.createElement)(O.Icon,{size:"36px",icon:t})),Object(a.createElement)(O.__unstableMotion.div,{className:"edit-site-navigation-toggle"+(n?" is-open":""),whileHover:"expand"},Object(a.createElement)(O.Button,{className:"edit-site-navigation-toggle__button has-icon",label:Object(j.__)("Toggle navigation"),ref:u,"aria-pressed":n,onClick:()=>l(!n),showTooltip:!0},m))};const{Fill:gc,Slot:Ec}=Object(O.createSlotFill)("EditSiteNavigationPanelPreview"),{Fill:fc,Slot:hc}=Object(O.createSlotFill)("EditSiteNavigationSidebar");function vc(e){let{isDefaultOpen:t=!1,activeTemplateType:n}=e;const c=Object(Qe.useViewportMatch)("medium"),{setIsNavigationPanelOpened:r}=Object(i.useDispatch)(ke);return Object(a.useEffect)((function(){r(t&&c)}),[t,c,r]),Object(a.createElement)(fc,null,Object(a.createElement)(_c,null),Object(a.createElement)(Oc,{activeItem:n}),Object(a.createElement)(Ec,null))}vc.Slot=hc;var yc=vc,wc=n("diJD");function Sc(e){let{clientId:t}=e;const{getBlocks:n}=Object(i.useSelect)(Ye.store),{replaceBlocks:c}=Object(i.useDispatch)(Ye.store);return Object(a.createElement)(Ye.BlockSettingsMenuControls,null,e=>{let{onClose:r}=e;return Object(a.createElement)(O.MenuItem,{onClick:()=>{c(t,n(t)),r()}},Object(j.__)("Detach blocks from template part"))})}function xc(e){let{closeModal:t,onCreate:n}=e;const[c,r]=Object(a.useState)(""),[l,o]=Object(a.useState)("uncategorized"),[s,m]=Object(a.useState)(!1),d=Object(Qe.useInstanceId)(xc),p=Object(i.useSelect)(e=>e(u.store).__experimentalGetDefaultTemplatePartAreas(),[]);return Object(a.createElement)(O.Modal,{title:Object(j.__)("Create a template part"),closeLabel:Object(j.__)("Close"),onRequestClose:t,overlayClassName:"edit-site-create-template-part-modal"},Object(a.createElement)("form",{onSubmit:async e=>{e.preventDefault(),c&&(m(!0),await n({title:c,area:l}))}},Object(a.createElement)(O.TextControl,{label:Object(j.__)("Name"),value:c,onChange:r,required:!0}),Object(a.createElement)(O.BaseControl,{label:Object(j.__)("Area"),id:"edit-site-create-template-part-modal__area-selection-"+d,className:"edit-site-create-template-part-modal__area-base-control"},Object(a.createElement)(O.__experimentalRadioGroup,{label:Object(j.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:"edit-site-create-template-part-modal__area-selection-"+d,onChange:o,checked:l},p.map(e=>{let{icon:t,label:n,area:c,description:r}=e;return Object(a.createElement)(O.__experimentalRadio,{key:n,value:c,className:"edit-site-create-template-part-modal__area-radio"},Object(a.createElement)(O.Flex,{align:"start",justify:"start"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.Icon,{icon:t})),Object(a.createElement)(O.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},n,Object(a.createElement)("div",null,r)),Object(a.createElement)(O.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},l===c&&Object(a.createElement)(O.Icon,{icon:tt.a}))))}))),Object(a.createElement)(O.Flex,{className:"edit-site-create-template-part-modal__modal-actions",justify:"flex-end"},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.Button,{variant:"secondary",onClick:()=>{t()}},Object(j.__)("Cancel"))),Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.Button,{variant:"primary",type:"submit",disabled:!c,isBusy:s},Object(j.__)("Create"))))))}function kc(e){let{clientIds:t,blocks:n}=e;const[c,r]=Object(a.useState)(!1),{replaceBlocks:o}=Object(i.useDispatch)(Ye.store),{saveEntityRecord:u}=Object(i.useDispatch)(s.store),{createSuccessNotice:m}=Object(i.useDispatch)(x.store);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ye.BlockSettingsMenuControls,null,()=>Object(a.createElement)(O.MenuItem,{onClick:()=>{r(!0)}},Object(j.__)("Make template part"))),c&&Object(a.createElement)(xc,{closeModal:()=>{r(!1)},onCreate:async e=>{let{title:c,area:r}=e;const a=await u("postType","wp_template_part",{slug:Object(b.kebabCase)(c),title:c,content:Object(l.serialize)(n),area:r});o(t,Object(l.createBlock)("core/template-part",{slug:a.slug,theme:a.theme})),m(Object(j.__)("Template part created."),{type:"snackbar"})}}))}function Tc(){var e;const{clientIds:t,blocks:n}=Object(i.useSelect)(e=>{const{getSelectedBlockClientIds:t,getBlocksByClientId:n}=e(Ye.store),c=t();return{clientIds:c,blocks:n(c)}},[]);return 1===n.length&&"core/template-part"===(null===(e=n[0])||void 0===e?void 0:e.name)?Object(a.createElement)(Sc,{clientId:t[0]}):Object(a.createElement)(kc,{clientIds:t,blocks:n})}var Cc=n("B9Az");function Ic(e){let{type:t,id:n,activePage:c,onActivePageChange:r}=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(d.getPathAndQueryString)(l.link);return e===(null==c?void 0:c.path)?null:()=>r({type:t,slug:l.slug,path:e,context:{postType:l.type,postId:l.id}})},[l,null==c?void 0:c.path,r]);return o&&Object(a.createElement)(O.Button,{icon:Cc.a,label:Object(j.__)("Edit Page Template"),onClick:o})}function Nc(e){let{onClick:t=(()=>{})}=e;const{shortcut:n,isBlockInspectorOpen:c}=Object(i.useSelect)(e=>({shortcut:e(Xe.store).getShortcutRepresentation("core/edit-site/toggle-block-settings-sidebar"),isBlockInspectorOpen:e(F.i).getActiveComplementaryArea(ke.name)===Xn}),[]),{enableComplementaryArea:r,disableComplementaryArea:l}=Object(i.useDispatch)(F.i),o=c?Object(j.__)("Hide more settings"):Object(j.__)("Show more settings");return Object(a.createElement)(O.MenuItem,{onClick:()=>{c?(l(I),Object(nt.speak)(Object(j.__)("Block settings closed"))):(r(I,Xn),Object(nt.speak)(Object(j.__)("Additional settings are now available in the Editor block settings sidebar"))),t()},shortcut:n},o)}function Pc(){return Object(a.createElement)(Ye.BlockSettingsMenuControls,null,e=>{let{selectedClientIds:t,onClose:n}=e;return Object(a.createElement)(Rc,{selectedClientId:t[0],onClose:n})})}function Rc(e){let{selectedClientId:t,onClose:n}=e;const{params:c}=We(),r=Object(i.useSelect)(e=>{const n=e(Ye.store).getBlock(t);if(n&&Object(l.isTemplatePart)(n)){const{theme:t,slug:c}=n.attributes;return e(s.store).getEntityRecord("postType","wp_template_part",`${t}//${c}`)}},[t]),o=gt({postId:null==r?void 0:r.id,postType:null==r?void 0:r.type},{fromTemplateId:c.postId});return r?Object(a.createElement)(O.MenuItem,Object(Ne.a)({},o,{onClick:e=>{o.onClick(e),n()}}),Object(j.sprintf)(Object(j.__)("Edit %s"),r.slug)):null}var Mc=n("cjQ8");var Ac=function(){var e;const t=We(),n=qe(),c="wp_template_part"===t.params.postType,r=null===(e=t.state)||void 0===e?void 0:e.fromTemplateId;return c&&r?Object(a.createElement)(O.Button,{className:"edit-site-visual-editor__back-button",icon:Mc.a,onClick:()=>{n.back()}},Object(j.__)("Back")):null};function Lc(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(j.__)("Drag to resize"),"aria-describedby":"resizable-editor__resize-help-"+t,onKeyDown:function(e){const{keyCode:c}=e;"left"===t&&c===ut.LEFT||"right"===t&&c===ut.RIGHT?n(20):("left"===t&&c===ut.RIGHT||"right"===t&&c===ut.LEFT)&&n(-20)}}),Object(a.createElement)(O.VisuallyHidden,{id:"resizable-editor__resize-help-"+t},Object(j.__)("Use left and right arrow keys to resize the canvas.")))}const Bc="100%",Dc="100%",Fc={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 Vc=function(e){let{enableResizing:t,settings:n,...c}=e;const r=Object(i.useSelect)(e=>e(ke).__experimentalGetPreviewDeviceType(),[]),l=Object(Ye.__experimentalUseResizeCanvas)(r),[o,s]=Object(a.useState)(Bc),[u,m]=Object(a.useState)(Dc),d=Object(a.useRef)(),p=Object(Ye.__unstableUseMouseMoveTypingReset)(),b=Object(Qe.useMergeRefs)([d,p]);Object(a.useEffect)((function(){const e=d.current;if(!e||!t)return;let n,c=null;function r(){c||(c=e.contentWindow.requestAnimationFrame(()=>{m(e.contentDocument.documentElement.scrollHeight),c=null}))}function a(){var t;null===(t=n)||void 0===t||t.disconnect(),n=new e.contentWindow.ResizeObserver(r),n.observe(e.contentDocument.documentElement),r()}return e.addEventListener("load",a),a(),()=>{var t,r;null===(t=e.contentWindow)||void 0===t||t.cancelAnimationFrame(c),null===(r=n)||void 0===r||r.disconnect(),e.removeEventListener("load",a)}}),[t]);const j=Object(a.useCallback)(e=>{d.current&&s(d.current.offsetWidth+e)},[]);return Object(a.createElement)(O.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)(Lc,{direction:"left",resizeWidthBy:j}),right:Object(a.createElement)(Lc,{direction:"right",resizeWidthBy:j})},handleClasses:void 0,handleStyles:{left:Fc,right:Fc}},Object(a.createElement)(Ye.__unstableIframe,Object(Ne.a)({style:t?void 0:l,head:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ye.__unstableEditorStyles,{styles:n.styles}),Object(a.createElement)("style",null,".is-root-container { display: flow-root; }"),t&&Object(a.createElement)("style",null,"html, body { height: -moz-fit-content !important; height: fit-content !important; min-height: 0 !important; }",".is-root-container { min-height: 0 !important; }")),ref:b,name:"editor-canvas",className:"edit-site-visual-editor__editor-canvas"},c)))};const Gc={type:"default",alignments:[]};function zc(e){let{setIsInserterOpen:t}=e;const{settings:n,templateType:c,templateId:r,page:l}=Object(i.useSelect)(e=>{const{getSettings:n,getEditedPostType:c,getEditedPostId:r,getPage:a}=e(ke);return{settings:n(t),templateType:c(),templateId:r(),page:a()}},[t]),[o,u,m]=Object(s.useEntityBlockEditor)("postType",c),{setPage:d}=Object(i.useDispatch)(ke),p=Object(a.useRef)(),b=Object(Qe.useMergeRefs)([p,Object(Ye.__unstableUseTypingObserver)()]),O=Object(Qe.useViewportMatch)("small","<"),{clearSelectedBlock:j}=Object(i.useDispatch)(Ye.store),_="wp_template_part"===c;return Object(a.createElement)(Ye.BlockEditorProvider,{settings:n,value:o,onInput:u,onChange:m,useSubRegistry:!1},Object(a.createElement)(Pc,null),Object(a.createElement)(Tc,null),Object(a.createElement)(Ye.__experimentalLinkControl.ViewerFill,null,Object(a.useCallback)(e=>Object(a.createElement)(Ic,Object(Ne.a)({},e,{activePage:l,onActivePageChange:d})),[l])),Object(a.createElement)(cc,null,Object(a.createElement)(Ye.BlockInspector,null)),Object(a.createElement)(Ye.BlockTools,{className:bt()("edit-site-visual-editor",{"is-focus-mode":_}),__unstableContentRef:p,onClick:e=>{e.target===e.currentTarget&&j()}},Object(a.createElement)(Ye.BlockEditorKeyboardShortcuts.Register,null),Object(a.createElement)(Ac,null),Object(a.createElement)(Vc,{key:r,enableResizing:_&&!O,settings:n,contentRef:b},Object(a.createElement)(Ye.BlockList,{className:"edit-site-block-editor__block-list wp-site-blocks",__experimentalLayout:Gc,renderAppender:!_&&void 0})),Object(a.createElement)(Ye.__unstableBlockSettingsMenuFirstItem,null,e=>{let{onClose:t}=e;return Object(a.createElement)(Nc,{onClick:t})})),Object(a.createElement)(wc.ReusableBlocksMenuItems,null))}function Uc(e){let{openEntitiesSavedStates:t}=e;const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:c}=Object(i.useSelect)(s.store),r=Object(i.useSelect)(e=>e(ke).isListViewOpened(),[]),a=Object(i.useSelect)(e=>e(F.i).getActiveComplementaryArea(ke.name)===Xn,[]),{redo:l,undo:o}=Object(i.useDispatch)(s.store),{setIsListViewOpened:u}=Object(i.useDispatch)(ke),{enableComplementaryArea:m,disableComplementaryArea:d}=Object(i.useDispatch)(F.i);return Object(Xe.useShortcut)("core/edit-site/save",e=>{e.preventDefault();const r=n(),a=!!r.length;!r.some(e=>c(e.kind,e.name,e.key))&&a&&t()}),Object(Xe.useShortcut)("core/edit-site/undo",e=>{o(),e.preventDefault()}),Object(Xe.useShortcut)("core/edit-site/redo",e=>{l(),e.preventDefault()}),Object(Xe.useShortcut)("core/edit-site/toggle-list-view",()=>{u(!r)}),Object(Xe.useShortcut)("core/edit-site/toggle-block-settings-sidebar",e=>{e.preventDefault(),a?d(I):m(I,Xn)}),null}Uc.Register=function(){const{registerShortcut:e}=Object(i.useDispatch)(Xe.store);return Object(a.useEffect)(()=>{e({name:"core/edit-site/save",category:"global",description:Object(j.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/undo",category:"global",description:Object(j.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-site/redo",category:"global",description:Object(j.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/edit-site/toggle-list-view",category:"global",description:Object(j.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:Object(j.__)("Show or hide the block settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/edit-site/next-region",category:"global",description:Object(j.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:Object(j.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]})},[e]),null};var Hc=Uc;function Wc(){const{setTemplate:e,setTemplatePart:t,showHomepage:n,setPage:c}=Object(i.useDispatch)(ke),r=qe(),{params:{postId:l,postType:o}}=We(),{getPage:s,getEditedPostId:u,getEditedPostType:m}=Object(i.useSelect)(ke);return Object(a.useEffect)(()=>{let a=!0;return"page"===o||"post"===o?c({context:{postType:o,postId:l}}):"wp_template"===o?e(l):"wp_template_part"===o?t(l):n().then(()=>{var e,t;if(!a)return;const n=s(),c=u(),l=m();null!=n&&null!==(e=n.context)&&void 0!==e&&e.postId&&null!=n&&null!==(t=n.context)&&void 0!==t&&t.postType?r.replace({postId:n.context.postId,postType:n.context.postType}):c&&l&&r.replace({postId:c,postType:l})}),()=>{a=!1}},[l,o]),null}var qc=n("w95h");function $c(){const{setIsInserterOpened:e}=Object(i.useDispatch)(ke),t=Object(i.useSelect)(e=>e(ke).__experimentalGetInsertionPoint(),[]),n=Object(Qe.useViewportMatch)("medium","<"),[c,r]=Object(Qe.__experimentalUseDialog)({onClose:()=>e(!1)});return Object(a.createElement)("div",Object(Ne.a)({ref:c},r,{className:"edit-site-editor__inserter-panel"}),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-header"},Object(a.createElement)(O.Button,{icon:qc.a,onClick:()=>e(!1)})),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-content"},Object(a.createElement)(Ye.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:n,rootClientId:t.rootClientId,__experimentalInsertionIndex:t.insertionIndex,__experimentalFilterValue:t.filterValue})))}var Kc=n("bWcr");function Yc(){const{setIsListViewOpened:e}=Object(i.useDispatch)(ke),{clearSelectedBlock:t,selectBlock:n}=Object(i.useDispatch)(Ye.store);const c=Object(Qe.useFocusOnMount)("firstElement"),r=Object(Qe.useFocusReturn)();const l="edit-site-editor__list-view-panel-label-"+Object(Qe.useInstanceId)(Yc);return Object(a.createElement)("div",{"aria-labelledby":l,className:"edit-site-editor__list-view-panel",onKeyDown:function(t){t.keyCode!==ut.ESCAPE||t.defaultPrevented||e(!1)}},Object(a.createElement)("div",{className:"edit-site-editor__list-view-panel-header"},Object(a.createElement)("strong",{id:l},Object(j.__)("List view")),Object(a.createElement)(O.Button,{icon:Kc.a,label:Object(j.__)("Close list view sidebar"),onClick:()=>e(!1)})),Object(a.createElement)("div",{className:"edit-site-editor__list-view-panel-content",ref:Object(Qe.useMergeRefs)([r,c])},Object(a.createElement)(Ye.__experimentalListView,{onSelect:async function(e){await t(),n(e,-1)},showNestedBlocks:!0,__experimentalFeatures:!0,__experimentalPersistentListViewFeatures:!0})))}function Xc(e){let{text:t,children:n}=e;const c=Object(Qe.useCopyToClipboard)(t);return Object(a.createElement)(O.Button,{variant:"secondary",ref:c},n)}class Qc 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)(Ye.Warning,{className:"editor-error-boundary",actions:[Object(a.createElement)(O.Button,{key:"recovery",onClick:this.reboot,variant:"secondary"},Object(j.__)("Attempt Recovery")),Object(a.createElement)(Xc,{key:"copy-error",text:e.stack},Object(j.__)("Copy Error"))]},Object(j.__)("The editor has encountered an unexpected error.")):this.props.children}}function Zc(e){let{nonAnimatedSrc:t,animatedSrc:n}=e;return Object(a.createElement)("picture",{className:"edit-site-welcome-guide__image"},Object(a.createElement)("source",{srcSet:t,media:"(prefers-reduced-motion: reduce)"}),Object(a.createElement)("img",{src:n,width:"312",height:"240",alt:""}))}function Jc(){const{toggleFeature:e}=Object(i.useDispatch)(ke);return Object(i.useSelect)(e=>e(ke).isFeatureActive("welcomeGuide"),[])?Object(a.createElement)(O.Guide,{className:"edit-site-welcome-guide",contentLabel:Object(j.__)("Welcome to the site editor"),finishButtonText:Object(j.__)("Get Started"),onFinish:()=>e("welcomeGuide"),pages:[{image:Object(a.createElement)(Zc,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},Object(j.__)("Edit your site")),Object(a.createElement)("p",{className:"edit-site-welcome-guide__text"},Object(j.__)("Design everything on your site — from the header right down to the footer — using blocks.")),Object(a.createElement)("p",{className:"edit-site-welcome-guide__text"},Object(a.createInterpolateElement)(Object(j.__)("Click to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:Object(a.createElement)("img",{alt:Object(j.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath 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' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})))}]}):null}function er(){const{toggleFeature:e}=Object(i.useDispatch)(ke),{isActive:t,isStylesOpen:n}=Object(i.useSelect)(e=>{const t=e(F.i).getActiveComplementaryArea(ke.name);return{isActive:e(ke).isFeatureActive("welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}},[]);return t&&n?Object(a.createElement)(O.Guide,{className:"edit-site-welcome-guide",contentLabel:Object(j.__)("Welcome to styles"),finishButtonText:Object(j.__)("Get Started"),onFinish:()=>e("welcomeGuideStyles"),pages:[{image:Object(a.createElement)(Zc,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},Object(j.__)("Welcome to Styles")),Object(a.createElement)("p",{className:"edit-site-welcome-guide__text"},Object(j.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")))},{image:Object(a.createElement)(Zc,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},Object(j.__)("Set the design")),Object(a.createElement)("p",{className:"edit-site-welcome-guide__text"},Object(j.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle! ")))},{image:Object(a.createElement)(Zc,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},Object(j.__)("Personalize blocks")),Object(a.createElement)("p",{className:"edit-site-welcome-guide__text"},Object(j.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")))},{image:Object(a.createElement)(Zc,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},Object(j.__)("Learn more")),Object(a.createElement)("p",{className:"edit-site-welcome-guide__text"},Object(j.__)("New to block themes and styling your site? "),Object(a.createElement)(O.ExternalLink,{href:Object(j.__)("https://wordpress.org/support/article/styles-overview/")},Object(j.__)("Here’s a detailed guide to learn how to make the most of it."))))}]}):null}function tr(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Jc,null),Object(a.createElement)(er,null))}function nr(){const[e,t]=function(){const[e,t]=Object(a.useState)([]),[n,c]=Object(a.useState)({}),{merged:r}=Object(a.useContext)(Dt);return Object(a.useEffect)(()=>{if(null==r||!r.styles||null==r||!r.settings)return;const e=(e=>{const t={};return e.forEach(e=>{var n,c;const r=e.name,a=null!==(n=null==e||null===(c=e.supports)||void 0===c?void 0:c.__experimentalSelector)&&void 0!==n?n:".wp-block-"+r.replace("core/","").replace("/","-");t[r]={name:r,selector:a}}),t})(Object(l.getBlockTypes)()),n=qn(r,e),a=$n(r,e);t([{css:n,isGlobalStyles:!0},{css:a,isGlobalStyles:!0}]),c(r.settings)},[r]),[e,n]}(),{getSettings:n}=Object(i.useSelect)(ke),{updateSettings:c}=Object(i.useDispatch)(ke);Object(a.useEffect)(()=>{var r;if(!e||!t)return;const a=n(),l=null==a||null===(r=a.styles)||void 0===r?void 0:r.filter(e=>!e.isGlobalStyles);c({...a,styles:[...l,...e],__experimentalFeatures:t})},[e,t])}function cr(){return nr(),null}function rr(e,t){if(Array.isArray(t))return t}const ar=e=>{if(!Object(b.isObject)(e)||Array.isArray(e))return e;const t=Object(b.pickBy)(Object(b.mapValues)(e,ar),b.identity);return Object(b.isEmpty)(t)?void 0:t};function lr(){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:c}=Object(i.useSelect)(s.store),{editEntityRecord:r}=Object(i.useDispatch)(s.store),l=Object(a.useMemo)(()=>({settings:null!=t?t:{},styles:null!=n?n:{}}),[t,n]),o=Object(a.useCallback)(t=>{var n,a;const l=c("root","globalStyles",e),o=t({styles:null!==(n=null==l?void 0:l.styles)&&void 0!==n?n:{},settings:null!==(a=null==l?void 0:l.settings)&&void 0!==a?a:{}});r("root","globalStyles",e,{styles:ar(o.styles)||{},settings:ar(o.settings)||{}})},[e]);return[!!t||!!n,l,o]}(),[c,r]=function(){const e=Object(i.useSelect)(e=>e(s.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}(),l=Object(a.useMemo)(()=>{return r&&t?(e=r,n=t,Object(b.mergeWith)({},e,n,rr)):{};var e,n},[t,r]);return Object(a.useMemo)(()=>({isReady:e&&c,user:t,base:r,merged:l,setUserConfig:n}),[l,t,r,n,e,c])}function or(e){let{children:t}=e;const n=lr();return n.isReady?Object(a.createElement)(Dt.Provider,{value:n},t):null}function ir(e){const t=We(),n=Object(i.useSelect)(e=>{var t;return null===(t=e(s.store).getEntityRecord("root","site"))||void 0===t?void 0:t.title},[]),c=Object(a.useRef)(!0);Object(a.useEffect)(()=>{c.current=!1},[t]),Object(a.useEffect)(()=>{if(!c.current&&e&&n){const t=Object(j.sprintf)(Object(j.__)("%1$s ‹ %2$s — WordPress"),e,n);document.title=t,Object(nt.speak)(Object(j.sprintf)(Object(j.__)("Now displaying: %s"),document.title),"assertive")}},[e,n,t])}const sr={secondarySidebar:Object(j.__)("Block Library"),drawer:Object(j.__)("Navigation Sidebar")};var ur=function(e){let{onError:t}=e;const{isInserterOpen:n,isListViewOpen:c,sidebarIsOpened:r,settings:l,entityId:o,templateType:m,page:d,template:b,templateResolved:_,isNavigationOpen:g,previousShortcut:E,nextShortcut:f}=Object(i.useSelect)(e=>{const{isInserterOpened:t,isListViewOpened:n,getSettings:c,getEditedPostType:r,getEditedPostId:a,getPage:l,isNavigationOpened:o}=e(ke),{hasFinishedResolution:i,getEntityRecord:u}=e(s.store),m=r(),d=a();return{isInserterOpen:t(),isListViewOpen:n(),sidebarIsOpened:!!e(F.i).getActiveComplementaryArea(ke.name),settings:c(),templateType:m,page:l(),template:d?u("postType",m,d):null,templateResolved:!!d&&i("getEntityRecord",["postType",m,d]),entityId:d,isNavigationOpen:o(),previousShortcut:e(Xe.store).getAllShortcutKeyCombinations("core/edit-site/previous-region"),nextShortcut:e(Xe.store).getAllShortcutKeyCombinations("core/edit-site/next-region")}},[]),{setPage:h,setIsInserterOpened:v}=Object(i.useDispatch)(ke),[y,w]=Object(a.useState)(!1),S=Object(a.useCallback)(()=>w(!0),[]),x=Object(a.useCallback)(()=>{w(!1)},[]),k=Object(a.useMemo)(()=>({...null==d?void 0:d.context,queryContext:[(null==d?void 0:d.context.queryContext)||{page:1},e=>h({...d,context:{...null==d?void 0:d.context,queryContext:{...null==d?void 0:d.context.queryContext,...e}}})]}),[null==d?void 0:d.context]);Object(a.useEffect)(()=>{g?document.body.classList.add("is-navigation-sidebar-open"):document.body.classList.remove("is-navigation-sidebar-open")},[g]);const T=(null==l?void 0:l.siteUrl)&&void 0!==m&&void 0!==o;return ir(T&&Object(j.__)("Editor (beta)")),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Wc,null),T&&Object(a.createElement)(Xe.ShortcutProvider,null,Object(a.createElement)(s.EntityProvider,{kind:"root",type:"site"},Object(a.createElement)(s.EntityProvider,{kind:"postType",type:m,id:o},Object(a.createElement)(or,null,Object(a.createElement)(Ye.BlockContextProvider,{value:k},Object(a.createElement)(cr,null),Object(a.createElement)(Qc,{onError:t},Object(a.createElement)(Hc.Register,null),Object(a.createElement)(rc,null),Object(a.createElement)(F.e,{labels:sr,secondarySidebar:n?Object(a.createElement)($c,null):c?Object(a.createElement)(Yc,null):null,sidebar:r&&Object(a.createElement)(F.b.Slot,{scope:"core/edit-site"}),drawer:Object(a.createElement)(yc.Slot,null),header:Object(a.createElement)(xt,{openEntitiesSavedStates:S}),notices:Object(a.createElement)(u.EditorSnackbars,null),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(u.EditorNotices,null),b&&Object(a.createElement)(zc,{setIsInserterOpen:v}),_&&!b&&(null==l?void 0:l.siteUrl)&&o&&Object(a.createElement)(O.Notice,{status:"warning",isDismissible:!1},Object(j.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),Object(a.createElement)(Hc,{openEntitiesSavedStates:S})),actions:Object(a.createElement)(a.Fragment,null,y?Object(a.createElement)(u.EntitiesSavedStates,{close:x}):Object(a.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},Object(a.createElement)(O.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:S,"aria-expanded":!1},Object(j.__)("Open save panel")))),footer:Object(a.createElement)(Ye.BlockBreadcrumb,null),shortcuts:{previous:E,next:f}}),Object(a.createElement)(tr,null),Object(a.createElement)(O.Popover.Slot,null),Object(a.createElement)(p.PluginArea,null))))))))};const mr=["front-page","single-post","page","archive","search","404","index"];function dr(e){let{postType:t}=e;const n=qe(),{templates:c,defaultTemplateTypes:r}=Object(i.useSelect)(e=>({templates:e(s.store).getEntityRecords("postType","wp_template",{per_page:-1}),defaultTemplateTypes:e(u.store).__experimentalGetDefaultTemplateTypes()}),[]),{saveEntityRecord:l}=Object(i.useDispatch)(s.store),{createErrorNotice:o}=Object(i.useDispatch)(x.store),{getLastEntitySaveError:m}=Object(i.useSelect)(s.store);const d=Object(b.map)(c,"slug"),p=Object(b.filter)(r,e=>Object(b.includes)(mr,e.slug)&&!Object(b.includes)(d,e.slug));return p.length?Object(a.createElement)(O.DropdownMenu,{className:"edit-site-new-template-dropdown",icon:null,text:t.labels.add_new,label:t.labels.add_new_item,popoverProps:{noArrow:!1},toggleProps:{variant:"primary"}},()=>Object(a.createElement)(O.NavigableMenu,{className:"edit-site-new-template-dropdown__popover"},Object(a.createElement)(O.MenuGroup,{label:t.labels.add_new_item},Object(b.map)(p,e=>{let{title:t,description:c,slug:i}=e;return Object(a.createElement)(O.MenuItem,{info:c,key:i,onClick:()=>{!async function(e){let{slug:t}=e;try{const{title:e,description:c}=Object(b.find)(r,{slug:t}),a=await l("postType","wp_template",{excerpt:c,slug:t.toString(),status:"publish",title:e}),o=m("postType","wp_template",a.id);if(o)throw o;n.push({postId:a.id,postType:a.type})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(j.__)("An error occurred while creating the template.");o(t,{type:"snackbar"})}}({slug:i})}},t)})))):null}function pr(e){let{postType:t}=e;const n=qe(),[c,r]=Object(a.useState)(!1),{createErrorNotice:l}=Object(i.useDispatch)(x.store),{saveEntityRecord:o}=Object(i.useDispatch)(s.store),{getLastEntitySaveError:u}=Object(i.useSelect)(s.store);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.Button,{variant:"primary",onClick:()=>{r(!0)}},t.labels.add_new),c&&Object(a.createElement)(xc,{closeModal:()=>r(!1),onCreate:async function(e){let{title:t,area:c}=e;if(t)try{const e=await o("postType","wp_template_part",{slug:Object(b.kebabCase)(t),title:t,content:"",area:c}),a=u("postType","wp_template_part",e.id);if(a)throw a;r(!1),n.push({postId:e.id,postType:e.type})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(j.__)("An error occurred while creating the template part.");l(t,{type:"snackbar"}),r(!1)}else l(Object(j.__)("Title is not defined."),{type:"snackbar"})}}))}function br(e){let{templateType:t="wp_template"}=e;const n=Object(i.useSelect)(e=>e(s.store).getPostType(t),[t]);return n?"wp_template"===t?Object(a.createElement)(dr,{postType:n}):"wp_template_part"===t?Object(a.createElement)(pr,{postType:n}):null:null}function Or(e){var t;let{templateType:n}=e;const c=Object(i.useSelect)(e=>e(s.store).getPostType(n),[n]);return c?Object(a.createElement)("header",{className:"edit-site-list-header"},Object(a.createElement)(O.__experimentalHeading,{level:1,className:"edit-site-list-header__title"},null===(t=c.labels)||void 0===t?void 0:t.name),Object(a.createElement)("div",{className:"edit-site-list-header__right"},Object(a.createElement)(br,{templateType:n}))):null}function jr(e){let{template:t,onClose:n}=e;const[c,r]=Object(a.useState)(()=>t.title.rendered),[l,o]=Object(a.useState)(!1),{getLastEntitySaveError:u}=Object(i.useSelect)(s.store),{editEntityRecord:m,saveEditedEntityRecord:d}=Object(i.useDispatch)(s.store),{createSuccessNotice:p,createErrorNotice:b}=Object(i.useDispatch)(x.store);if(!t.is_custom)return null;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.MenuItem,{onClick:()=>{o(!0),r(t.title.rendered)}},Object(j.__)("Rename")),l&&Object(a.createElement)(O.Modal,{title:Object(j.__)("Rename template"),closeLabel:Object(j.__)("Close"),onRequestClose:()=>{o(!1)},overlayClassName:"edit-site-list__rename-modal"},Object(a.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await m("postType",t.type,t.id,{title:c}),r(""),o(!1),n(),await d("postType",t.type,t.id);const e=u("postType",t.type,t.id);if(e)throw e;p(Object(j.__)("Template has been renamed."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(j.__)("An error occurred while renaming the template.");b(t,{type:"snackbar"})}}},Object(a.createElement)(O.Flex,{align:"flex-start",gap:8},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.TextControl,{label:Object(j.__)("Name"),value:c,onChange:r,required:!0}))),Object(a.createElement)(O.Flex,{className:"edit-site-list__rename-modal-actions",justify:"flex-end",expanded:!1},Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.Button,{variant:"tertiary",onClick:()=>{o(!1)}},Object(j.__)("Cancel"))),Object(a.createElement)(O.FlexItem,null,Object(a.createElement)(O.Button,{variant:"primary",type:"submit"},Object(j.__)("Save")))))))}function _r(e){let{template:t}=e;const{removeTemplate:n,revertTemplate:c}=Object(i.useDispatch)(ke),{saveEditedEntityRecord:r}=Object(i.useDispatch)(s.store),{createSuccessNotice:l,createErrorNotice:o}=Object(i.useDispatch)(x.store),u=function(e){return!!e&&("custom"===e.source&&!e.has_theme_file)}(t),m=V(t);if(!u&&!m)return null;return Object(a.createElement)(O.DropdownMenu,{icon:et.a,label:Object(j.__)("Actions"),className:"edit-site-list-table__actions"},e=>{let{onClose:i}=e;return Object(a.createElement)(O.MenuGroup,null,u&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(jr,{template:t,onClose:i}),Object(a.createElement)(O.MenuItem,{isDestructive:!0,onClick:()=>{n(t),i()}},Object(j.__)("Delete template"))),m&&Object(a.createElement)(O.MenuItem,{info:Object(j.__)("Restore template to default state"),onClick:()=>{!async function(){try{await c(t,{allowUndo:!1}),await r("postType",t.type,t.id),l(Object(j.__)("Template reverted."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(j.__)("An error occurred while reverting the template.");o(t,{type:"snackbar"})}}(),i()}},Object(j.__)("Clear customizations")))})}var gr=n("0Ene");var Er=Object(a.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(w.Path,{d:"M7.25 16.4371C6.16445 15.2755 5.5 13.7153 5.5 12C5.5 8.41015 8.41015 5.5 12 5.5C15.5899 5.5 18.5 8.41015 18.5 12C18.5 13.7153 17.8356 15.2755 16.75 16.4371V16C16.75 14.4812 15.5188 13.25 14 13.25L10 13.25C8.48122 13.25 7.25 14.4812 7.25 16V16.4371ZM8.75 17.6304C9.70606 18.1835 10.8161 18.5 12 18.5C13.1839 18.5 14.2939 18.1835 15.25 17.6304V16C15.25 15.3096 14.6904 14.75 14 14.75L10 14.75C9.30964 14.75 8.75 15.3096 8.75 16V17.6304ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM14 10C14 11.1046 13.1046 12 12 12C10.8954 12 10 11.1046 10 10C10 8.89543 10.8954 8 12 8C13.1046 8 14 8.89543 14 10Z",fillRule:"evenodd",clipRule:"evenodd",fill:"black"}));const fr=["wp_template","wp_template_part"];function hr(e){let{isCustomized:t,children:n}=e;return t?Object(a.createElement)(O.Tooltip,{text:Object(j.__)("This template has been customized")},n):n}function vr(e){var t;let{slug:n,isCustomized:c}=e;const r=Object(i.useSelect)(e=>e(s.store).getTheme(n),[n]);return Object(a.createElement)(O.__experimentalHStack,{alignment:"left"},Object(a.createElement)(hr,{isCustomized:c},Object(a.createElement)("div",{className:bt()("edit-site-list-added-by__icon",{"is-customized":c})},Object(a.createElement)(O.Icon,{icon:Yt.a}))),Object(a.createElement)("span",null,(null==r||null===(t=r.name)||void 0===t?void 0:t.rendered)||n))}function yr(e){let{slug:t,isCustomized:n}=e;const c=Object(i.useSelect)(e=>e(s.store).getPlugin(t),[t]);return Object(a.createElement)(O.__experimentalHStack,{alignment:"left"},Object(a.createElement)(hr,{isCustomized:n},Object(a.createElement)("div",{className:"edit-site-list-added-by__icon"},Object(a.createElement)(O.Icon,{icon:gr.a}))),Object(a.createElement)("span",null,(null==c?void 0:c.name)||t))}function wr(e){var t;let{id:n}=e;const c=Object(i.useSelect)(e=>e(s.store).getUser(n),[n]),[r,l]=Object(a.useState)(!1),o=null==c||null===(t=c.avatar_urls)||void 0===t?void 0:t[48],u=!!o;return Object(a.createElement)(O.__experimentalHStack,{alignment:"left"},Object(a.createElement)("div",{className:bt()(u?"edit-site-list-added-by__avatar":"edit-site-list-added-by__icon",{"is-loaded":r})},u?Object(a.createElement)("img",{onLoad:()=>l(!0),alt:"",src:o}):Object(a.createElement)(O.Icon,{icon:Er})),Object(a.createElement)("span",null,null==c?void 0:c.nickname))}function Sr(){const{name:e,logoURL:t}=Object(i.useSelect)(e=>{var t;const{getEntityRecord:n,getMedia:c}=e(s.store),r=n("root","__unstableBase");return{name:r.name,logoURL:null!=r&&r.site_logo?null===(t=c(r.site_logo))||void 0===t?void 0:t.source_url:void 0}},[]),[n,c]=Object(a.useState)(!1);return Object(a.createElement)(O.__experimentalHStack,{alignment:"left"},Object(a.createElement)("div",{className:bt()("edit-site-list-added-by__avatar",{"is-loaded":n})},Object(a.createElement)("img",{onLoad:()=>c(!0),alt:"",src:t})),Object(a.createElement)("span",null,e))}function xr(e){let{templateType:t,template:n}=e;if(n){if(fr.includes(t)){if(n.has_theme_file&&("theme"===n.origin||!n.origin&&["theme","custom"].includes(n.source)))return Object(a.createElement)(vr,{slug:n.theme,isCustomized:"custom"===n.source});if(n.has_theme_file&&"plugin"===n.origin)return Object(a.createElement)(yr,{slug:n.theme,isCustomized:"custom"===n.source});if(!n.has_theme_file&&"custom"===n.source&&!n.author)return Object(a.createElement)(Sr,null)}return Object(a.createElement)(wr,{id:n.author})}}function kr(e){let{templateType:t}=e;const{templates:n,isLoading:c,postType:r}=Object(i.useSelect)(e=>{const{getEntityRecords:n,hasFinishedResolution:c,getPostType:r}=e(s.store);return{templates:n("postType",t,{per_page:-1}),isLoading:!c("getEntityRecords",["postType",t,{per_page:-1}]),postType:r(t)}},[t]);return!n||c?null:n.length?Object(a.createElement)("table",{className:"edit-site-list-table",role:"table"},Object(a.createElement)("thead",null,Object(a.createElement)("tr",{className:"edit-site-list-table-head",role:"row"},Object(a.createElement)("th",{className:"edit-site-list-table-column",role:"columnheader"},Object(j.__)("Template")),Object(a.createElement)("th",{className:"edit-site-list-table-column",role:"columnheader"},Object(j.__)("Added by")),Object(a.createElement)("th",{className:"edit-site-list-table-column",role:"columnheader"},Object(a.createElement)(O.VisuallyHidden,null,Object(j.__)("Actions"))))),Object(a.createElement)("tbody",null,n.map(e=>{var n;return Object(a.createElement)("tr",{key:e.id,className:"edit-site-list-table-row",role:"row"},Object(a.createElement)("td",{className:"edit-site-list-table-column",role:"cell"},Object(a.createElement)(O.__experimentalHeading,{level:4},Object(a.createElement)(Et,{params:{postId:e.id,postType:e.type}},(null===(n=e.title)||void 0===n?void 0:n.rendered)||e.slug)),e.description),Object(a.createElement)("td",{className:"edit-site-list-table-column",role:"cell"},Object(a.createElement)(xr,{templateType:t,template:e})),Object(a.createElement)("td",{className:"edit-site-list-table-column",role:"cell"},Object(a.createElement)(_r,{template:e})))}))):Object(a.createElement)("div",null,Object(j.sprintf)(Object(j.__)("No %s found."),null==r||null===(l=r.labels)||void 0===l||null===(o=l.name)||void 0===o?void 0:o.toLowerCase()));var l,o}function Tr(){var e,t;const{params:{postType:n}}=We();!function(){const{registerShortcut:e}=Object(i.useDispatch)(Xe.store);Object(a.useEffect)(()=>{e({name:"core/edit-site/next-region",category:"global",description:Object(j.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:Object(j.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]})},[])}();const{previousShortcut:c,nextShortcut:r,isNavigationOpen:l}=Object(i.useSelect)(e=>({previousShortcut:e(Xe.store).getAllShortcutKeyCombinations("core/edit-site/previous-region"),nextShortcut:e(Xe.store).getAllShortcutKeyCombinations("core/edit-site/next-region"),isNavigationOpen:e(ke).isNavigationOpened()}),[]),o=Object(i.useSelect)(e=>e(s.store).getPostType(n),[n]);ir(null==o||null===(e=o.labels)||void 0===e?void 0:e.name);const m=null==o||null===(t=o.labels)||void 0===t?void 0:t.items_list,d=o?{header:Object(j.sprintf)(Object(j.__)("%s - Header"),m),body:Object(j.sprintf)(Object(j.__)("%s - Content"),m)}:void 0;return Object(a.createElement)(F.e,{className:bt()("edit-site-list",{"is-navigation-open":l}),labels:{drawer:Object(j.__)("Navigation Sidebar"),...d},header:Object(a.createElement)(Or,{templateType:n}),drawer:Object(a.createElement)(yc.Slot,null),notices:Object(a.createElement)(u.EditorSnackbars,null),content:Object(a.createElement)(kr,{templateType:n}),shortcuts:{previous:c,next:r}})}function Cr(e){let{postId:t,postType:n}=e;return!(t||!n)}function Ir(e){let{reboot:t}=e;return Object(a.createElement)(O.SlotFillProvider,null,Object(a.createElement)(u.UnsavedChangesWarning,null),Object(a.createElement)(Ke,null,e=>{let{params:n}=e;const c=Cr(n);return Object(a.createElement)(a.Fragment,null,c?Object(a.createElement)(Tr,null):Object(a.createElement)(ur,{onError:t}),Object(a.createElement)(yc,{isDefaultOpen:!!c,activeTemplateType:c?n.postType:void 0}))}))}function Nr(e){let{className:t,...n}=e;return Object(a.createElement)(F.b,Object(Ne.a)({panelClassName:t,className:"edit-site-sidebar",scope:"core/edit-site"},n))}function Pr(e){return Object(a.createElement)(F.c,Object(Ne.a)({__unstableExplicitMenuItem:!0,scope:"core/edit-site"},e))}var Rr=Object(Qe.compose)(Object(p.withPluginContext)((e,t)=>({icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"})))(F.a);function Mr(e,t){Object(a.unmountComponentAtNode)(e);const n=Mr.bind(null,e,t);Object(i.dispatch)(ke).updateSettings(t),Object(i.dispatch)(u.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas});Cr(Object(d.getQueryArgs)(window.location.href))&&Object(i.dispatch)(ke).setIsNavigationPanelOpened(Object(i.select)(m.store).isViewportMatch("medium"));Object(a.render)(Object(a.createElement)(Ir,{reboot:n}),e)}function Ar(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);Object(i.dispatch)(l.store).__experimentalReapplyBlockTypeFilters(),Object(o.registerCoreBlocks)(),Mr(n,t)}},K2cm:function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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},OE6V:function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));t.a=a},OzlF:function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:c}=t;return{...e,[n]:{...e[n],...c}}}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:c,value:r}=t;return{...e,[n]:{...e[n],[c]:r}}}return e}}),f=Object(u.combineReducers)({singleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:c,item:r}=arguments.length>1?arguments[1]:void 0;return"SET_SINGLE_ENABLE_ITEM"===t&&n&&c?{...e,[n]:{...e[n],[c]:r||null}}:e},multipleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:c,item:r,isEnable:a}=arguments.length>1?arguments[1]:void 0;if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!c||!r||Object(_.get)(e,[n,c,r])===a)return e;const l=e[n]||{},o=l[c]||{};return{...e,[n]:{...l,[c]:{...o,[r]: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 w(e){return v("complementaryArea",e,void 0)}function S(e,t,n,c){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:c}}function x(e,t){return S("pinnedItems",e,t,!0)}function k(e,t){return S("pinnedItems",e,t,!1)}function T(e,t){return function(n){let{select:c,dispatch:r}=n;const a=c.isFeatureActive(e,t);r.setFeatureValue(e,t,!a)}}function C(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function I(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function N(e,t){return function(e,t,n){return Object(_.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function P(e,t,n){return!1!==function(e,t,n,c){return Object(_.get)(e.enableItems.multipleEnableItems,[t,n,c])}(e,"pinnedItems",t,n)}function R(e,t,n){var c,r;const a=null===(c=e.preferences.features[t])||void 0===c?void 0:c[n];return!!(void 0!==a?a:null===(r=e.preferenceDefaults.features[t])||void 0===r?void 0:r[n])}const M=Object(u.createReduxStore)("core/interface",{reducer:h,actions:c,selectors:r,persist:["enableItems","preferences"],__experimentalUseThunks:!0});Object(u.registerStore)("core/interface",{reducer:h,actions:c,selectors:r,persist:["enableItems","preferences"],__experimentalUseThunks:!0});var A=n("TvNi"),L=Object(A.withPluginContext)((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var B=L((function(e){let{as:t=s.Button,scope:n,identifier:c,icon:r,selectedIcon:o,...i}=e;const m=t,d=Object(u.useSelect)(e=>e(M).getActiveComplementaryArea(n)===c,[c]),{enableComplementaryArea:p,disableComplementaryArea:b}=Object(u.useDispatch)(M);return Object(l.createElement)(m,Object(a.a)({icon:o&&d?o:r,onClick:()=>{d?b(n):p(n,c)}},Object(_.omit)(i,["name"])))}));var D=e=>{let{smallScreenTitle:t,children:n,className:c,toggleButtonProps:r}=e;const o=Object(l.createElement)(B,Object(a.a)({icon:j.a},r));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",c),tabIndex:-1},n,o))};function F(e){let{name:t,as:n=s.Button,onClick:c,...r}=e;return Object(l.createElement)(s.Fill,{name:t},e=>{let{onClick:t}=e;return Object(l.createElement)(n,Object(a.a)({onClick:c||t?function(){(c||_.noop)(...arguments),(t||_.noop)(...arguments)}:void 0},r))})}F.Slot=function(e){let{name:t,as:n=s.ButtonGroup,fillProps:c={},bubblesVirtually:r,...a}=e;return Object(l.createElement)(s.Slot,{name:t,bubblesVirtually:r,fillProps:c},e=>{if(Object(_.isEmpty)(l.Children.toArray(e)))return null;const t=[];l.Children.forEach(e,e=>{let{props:{__unstableExplicitMenuItem:n,__unstableTarget:c}}=e;c&&n&&t.push(c)});const c=l.Children.map(e,e=>!e.props.__unstableExplicitMenuItem&&t.includes(e.props.__unstableTarget)?null:e);return Object(l.createElement)(n,a,c)})};var V=F;const G=e=>Object(l.createElement)(s.MenuItem,Object(_.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]));function z(e){let{scope:t,target:n,__unstableExplicitMenuItem:c,...r}=e;return Object(l.createElement)(B,Object(a.a)({as:e=>Object(l.createElement)(V,Object(a.a)({__unstableExplicitMenuItem:c,__unstableTarget:`${t}/${n}`,as:G,name:t+"/plugin-more-menu"},e)),role:"menuitemcheckbox",selectedIcon:d.a,name:n,scope:t},r))}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,...c}=e;return Object(l.createElement)(s.Slot,Object(a.a)({name:"PinnedItems/"+t},c),e=>!Object(_.isEmpty)(e)&&Object(l.createElement)("div",{className:i()(n,"interface-pinned-items")},e))};var H=U;function W(e){let{scope:t,children:n,className:c}=e;return Object(l.createElement)(s.Fill,{name:"ComplementaryArea/"+t},Object(l.createElement)("div",{className:c},n))}const q=L((function(e){let{children:t,className:n,closeLabel:c=Object(m.__)("Close plugin"),identifier:r,header:a,headerClassName:o,icon:j,isPinnable:_=!0,panelClassName:g,scope:E,name:f,smallScreenTitle:h,title:v,toggleShortcut:y,isActiveByDefault:w,showIconLabels:S=!1}=e;const{isActive:x,isPinned:k,activeArea:T,isSmall:C,isLarge:I}=Object(u.useSelect)(e=>{const{getActiveComplementaryArea:t,isItemPinned:n}=e(M),c=t(E);return{isActive:c===r,isPinned:n(E,r),activeArea:c,isSmall:e(O.store).isViewportMatch("< medium"),isLarge:e(O.store).isViewportMatch("large")}},[r,E]);!function(e,t,n,c,r){const a=Object(l.useRef)(!1),o=Object(l.useRef)(!1),{enableComplementaryArea:i,disableComplementaryArea:s}=Object(u.useDispatch)(M);Object(l.useEffect)(()=>{c&&r&&!a.current?(s(e),o.current=!0):o.current&&!r&&a.current?(o.current=!1,i(e,t)):o.current&&n&&n!==t&&(o.current=!1),r!==a.current&&(a.current=r)},[c,r,e,t,n])}(E,r,T,x,C);const{enableComplementaryArea:N,disableComplementaryArea:P,pinItem:R,unpinItem:A}=Object(u.useDispatch)(M);return Object(l.useEffect)(()=>{w&&void 0===T&&!C&&N(E,r)},[T,w,E,r,C]),Object(l.createElement)(l.Fragment,null,_&&Object(l.createElement)(H,{scope:E},k&&Object(l.createElement)(B,{scope:E,identifier:r,isPressed:x&&(!S||I),"aria-expanded":x,label:v,icon:S?d.a:j,showTooltip:!S,variant:S?"tertiary":void 0})),f&&_&&Object(l.createElement)(z,{target:f,scope:E,icon:j},v),x&&Object(l.createElement)(W,{className:i()("interface-complementary-area",n),scope:E},Object(l.createElement)(D,{className:o,closeLabel:c,onClose:()=>P(E),smallScreenTitle:h,toggleButtonProps:{label:c,shortcut:y,scope:E,identifier:r}},a||Object(l.createElement)(l.Fragment,null,Object(l.createElement)("strong",null,v),_&&Object(l.createElement)(s.Button,{className:"interface-complementary-area__pin-unpin-item",icon:k?p.a:b.a,label:k?Object(m.__)("Unpin from toolbar"):Object(m.__)("Pin to toolbar"),onClick:()=>(k?A:R)(E,r),isPressed:k,"aria-expanded":k}))),Object(l.createElement)(s.Panel,{className:g},t)))}));q.Slot=function(e){let{scope:t,...n}=e;return Object(l.createElement)(s.Slot,Object(a.a)({name:"ComplementaryArea/"+t},n))};var $=q;var K=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 X=Object(l.forwardRef)((function(e,t){let{footer:n,header:c,sidebar:r,secondarySidebar:o,notices:u,content:d,drawer:p,actions:b,labels:O,className:j,shortcuts:_}=e;const g=Object(s.__unstableUseNavigateRegions)(_);!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(m.__)("Drawer"),header:Object(m.__)("Header"),body:Object(m.__)("Content"),secondarySidebar:Object(m.__)("Block Library"),sidebar:Object(m.__)("Settings"),actions:Object(m.__)("Publish"),footer:Object(m.__)("Footer")},...O};return Object(l.createElement)("div",Object(a.a)({},g,{ref:Object(Y.useMergeRefs)([t,g.ref]),className:i()(j,"interface-interface-skeleton",g.className,!!n&&"has-footer")}),!!p&&Object(l.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":E.drawer,tabIndex:"-1"},p),Object(l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!c&&Object(l.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":E.header,tabIndex:"-1"},c),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"},d),!!r&&Object(l.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":E.sidebar,tabIndex:"-1"},r),!!b&&Object(l.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":E.actions,tabIndex:"-1"},b))),!!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:c=Object(m.__)("Options"),popoverProps:r,toggleProps:a,children:o}=e;return Object(l.createElement)(t,{className:i()("interface-more-menu-dropdown",n),icon:Q.a,label:c,popoverProps:{position:"bottom left",...r,className:i()("interface-more-menu-dropdown__content",null==r?void 0:r.className)},toggleProps:{tooltipPosition:"bottom",...a}},e=>o(e))}var J=n("gdqT");function ee(e){let{scope:t,label:n,info:c,messageActivated:r,messageDeactivated:a,shortcut:o,feature:i}=e;const p=Object(u.useSelect)(e=>e(M).isFeatureActive(t,i),[i]),{toggleFeature:b}=Object(u.useDispatch)(M);return Object(l.createElement)(s.MenuItem,{icon:p&&d.a,isSelected:p,onClick:()=>{b(t,i),p?Object(J.speak)(a||Object(m.__)("Feature deactivated")):Object(J.speak)(r||Object(m.__)("Feature activated"))},role:"menuitemcheckbox",info:c,shortcut:o},n)}},URob:function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=a},Xxwi:function(e,t,n){"use strict";var c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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 c=n("GRId"),r=n("Tqx9");const a=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(r.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},diJD:function(e,t){e.exports=window.wp.reusableBlocks},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 c=n("GRId");t.a=function(e){let{icon:t,size:n=24,...r}=e;return Object(c.cloneElement)(t,{width:n,height:n,...r})}},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 c,r;function a(e){return[e]}function l(){var e={clear:function(){e.head=null}};return e}function o(e,t,n){var c;if(e.length!==t.length)return!1;for(c=n;c2096103.424&&p!==d))return navigator.msSaveBlob?navigator.msSaveBlob(E(s),b):f(s);i=(s=E(s)).type||o}else if(/([\x80-\xff])/.test(s)){for(var j=0,_=new Uint8Array(s.length),g=_.length;j