芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/timucuy.com/wp-includes/js/dist/edit-post.min.js
/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.editPost=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="dSQ2")}({"0dt7":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));const r="core/edit-post",o="#wp-admin-bar-view a",a="#wp-admin-bar-preview a"},"1ZqX":function(e,t){e.exports=window.wp.data},"4qRI":function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},"51Zz":function(e,t){e.exports=window.wp.dataControls},"6aBm":function(e,t){e.exports=window.wp.mediaUtils},"8oxB":function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],u=!1,d=-1;function p(){u&&s&&(u=!1,s.length?l=s.concat(l):d=-1,l.length&&m())}function m(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(s=l,l=[];++d
1)for(var n=1;n
(t=l,n)=>e(t,n))])({panels(e,t){switch(t.type){case"TOGGLE_PANEL_ENABLED":{const{panelName:n}=t;return{...e,[n]:{...e[n],enabled:!Object(c.get)(e,[n,"enabled"],!0)}}}case"TOGGLE_PANEL_OPENED":{const{panelName:n}=t,r=!0===e[n]||Object(c.get)(e,[n,"opened"],!1);return{...e,[n]:{...e[n],opened:!r}}}}return e},features:(e,t)=>"TOGGLE_FEATURE"===t.type?{...e,[t.feature]:!e[t.feature]}:e,editorMode:(e,t)=>"SWITCH_MODE"===t.type?t.mode:e,hiddenBlockTypes(e,t){switch(t.type){case"SHOW_BLOCK_TYPES":return Object(c.without)(e,...t.blockNames);case"HIDE_BLOCK_TYPES":return Object(c.union)(e,t.blockNames)}return e},preferredStyleVariations(e,t){switch(t.type){case"UPDATE_PREFERRED_STYLE_VARIATIONS":return t.blockName?t.blockStyle?{...e,[t.blockName]:t.blockStyle}:Object(c.omit)(e,[t.blockName]):e}return e},localAutosaveInterval(e,t){switch(t.type){case"UPDATE_LOCAL_AUTOSAVE_INTERVAL":return t.interval}return e}});var l;const u=Object(a.combineReducers)({isSaving:function(e=!1,t){switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":return!1;default:return e}},locations:function(e={},t){switch(t.type){case"SET_META_BOXES_PER_LOCATIONS":return t.metaBoxesPerLocation}return e},initialized:function(e=!1,t){switch(t.type){case"META_BOXES_INITIALIZED":return!0}return e}});var d=Object(a.combineReducers)({activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e},metaBoxes:u,preferences:s,publishSidebarActive:function(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},removedPanels:function(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!Object(c.includes)(e,t.panelName))return[...e,t.panelName]}return e},deviceType:function(e="Desktop",t){switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},isEditingTemplate:function(e=!1,t){switch(t.type){case"SET_IS_EDITING_TEMPLATE":return t.value}return e}}),p=n("l3Sj"),m=n("U60i"),b=n("gdqT"),f=n("onLe"),v=n("jZUy");function*h(e){yield a.controls.dispatch(m.g.name,"enableComplementaryArea",je.name,e)}function*g(){yield a.controls.dispatch(m.g.name,"disableComplementaryArea",je.name)}function O(e){return{type:"OPEN_MODAL",name:e}}function y(){return{type:"CLOSE_MODAL"}}function j(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function E(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function _(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}function w(e){return{type:"TOGGLE_PANEL_ENABLED",panelName:e}}function S(e){return{type:"TOGGLE_PANEL_OPENED",panelName:e}}function x(e){return{type:"REMOVE_PANEL",panelName:e}}function P(e){return{type:"TOGGLE_FEATURE",feature:e}}function*T(e){yield{type:"SWITCH_MODE",mode:e},"visual"!==e&&(yield a.controls.dispatch("core/block-editor","clearSelectedBlock"));const t="visual"===e?Object(p.__)("Visual editor selected"):Object(p.__)("Code editor selected");Object(b.speak)(t,"assertive")}function k(e){return{type:"TOGGLE_PINNED_PLUGIN_ITEM",pluginName:e}}function C(e){return{type:"HIDE_BLOCK_TYPES",blockNames:Object(c.castArray)(e)}}function A(e,t){return{type:"UPDATE_PREFERRED_STYLE_VARIATIONS",blockName:e,blockStyle:t}}function M(e){return{type:"UPDATE_LOCAL_AUTOSAVE_INTERVAL",interval:e}}function I(e){return{type:"SHOW_BLOCK_TYPES",blockNames:Object(c.castArray)(e)}}function*B(e){yield{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}function*L(){yield{type:"REQUEST_META_BOX_UPDATES"},window.tinyMCE&&window.tinyMCE.triggerSave();const e=yield a.controls.select("core/editor","getCurrentPost"),t=[!!e.comment_status&&["comment_status",e.comment_status],!!e.ping_status&&["ping_status",e.ping_status],!!e.sticky&&["sticky",e.sticky],!!e.author&&["post_author",e.author]].filter(Boolean),n=[new window.FormData(document.querySelector(".metabox-base-form")),...(yield a.controls.select(je.name,"getActiveMetaBoxLocations")).map(e=>new window.FormData((e=>{const t=document.querySelector(`.edit-post-meta-boxes-area.is-${e} .metabox-location-${e}`);return t||document.querySelector("#metaboxes .metabox-location-"+e)})(e)))],r=Object(c.reduce)(n,(e,t)=>{for(const[n,r]of t)e.append(n,r);return e},new window.FormData);t.forEach(([e,t])=>r.append(e,t)),yield Object(i.apiFetch)({url:window._wpMetaBoxUrl,method:"POST",body:r,parse:!1}),yield a.controls.dispatch(je.name,"metaBoxUpdatesSuccess")}function N(){return{type:"META_BOX_UPDATES_SUCCESS"}}function R(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function D(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function V(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function F(e){return{type:"SET_IS_EDITING_TEMPLATE",value:e}}function*U(e){if(e){const t=yield a.controls.dispatch(v.store,"saveEntityRecord","postType","wp_template",e),n=yield a.controls.select("core/editor","getCurrentPost");yield a.controls.dispatch(v.store,"editEntityRecord","postType",n.type,n.id,{template:t.slug})}yield F(!0);if(!(yield a.controls.select("core/edit-post","isFeatureActive","welcomeGuideTemplate"))){const t=e?Object(p.__)("Custom template created. You're in template mode now."):Object(p.__)("Editing template. Changes made here affect all posts and pages that use the template.");yield a.controls.dispatch(f.store,"createSuccessNotice",t,{type:"snackbar"})}}let G=!1;function*H(){if(!(yield a.controls.select("core/editor","__unstableIsEditorReady")))return;const e=yield a.controls.select("core/editor","getCurrentPostType");if(G)return;window.postboxes.page!==e&&window.postboxes.add_postbox_toggles(e),G=!0;let t=yield a.controls.select("core/editor","isSavingPost"),n=yield a.controls.select("core/editor","isAutosavingPost");const r=yield a.controls.select(je,"hasMetaBoxes");return Object(a.subscribe)(()=>{const e=Object(a.select)("core/editor").isSavingPost(),o=Object(a.select)("core/editor").isAutosavingPost(),i=r&&t&&!e&&!n;t=e,n=o,i&&Object(a.dispatch)(je).requestMetaBoxUpdates()}),{type:"META_BOXES_INITIALIZED"}}var z=n("pPDe"),q=n("jSdM");function W(e){return Q(e,"editorMode","visual")}const Y=Object(a.createRegistrySelector)(e=>()=>{const t=e(m.g).getActiveComplementaryArea("core/edit-post");return Object(c.includes)(["edit-post/document","edit-post/block"],t)}),X=Object(a.createRegistrySelector)(e=>()=>{const t=e(m.g).getActiveComplementaryArea("core/edit-post");return!!t&&!Object(c.includes)(["edit-post/document","edit-post/block"],t)}),K=Object(a.createRegistrySelector)(e=>()=>e(m.g).getActiveComplementaryArea("core/edit-post"));function Z(e){return e.preferences}function Q(e,t,n){const r=Z(e)[t];return void 0===r?n:r}function $(e){return e.publishSidebarActive}function J(e,t){return Object(c.includes)(e.removedPanels,t)}function ee(e,t){const n=Q(e,"panels");return!J(e,t)&&Object(c.get)(n,[t,"enabled"],!0)}function te(e,t){const n=Q(e,"panels");return!0===Object(c.get)(n,[t])||!0===Object(c.get)(n,[t,"opened"])}function ne(e,t){return e.activeModal===t}function re(e,t){return Object(c.get)(e.preferences.features,[t],!1)}const oe=Object(a.createRegistrySelector)(e=>t=>e(m.g).isItemPinned("core/edit-post",t)),ae=Object(z.a)(e=>Object.keys(e.metaBoxes.locations).filter(t=>ce(e,t)),e=>[e.metaBoxes.locations]);function ie(e,t){return ce(e,t)&&Object(c.some)(se(e,t),({id:t})=>ee(e,"meta-box-"+t))}function ce(e,t){const n=se(e,t);return!!n&&0!==n.length}function se(e,t){return e.metaBoxes.locations[t]}const le=Object(z.a)(e=>Object(c.flatten)(Object(c.values)(e.metaBoxes.locations)),e=>[e.metaBoxes.locations]);function ue(e){return ae(e).length>0}function de(e){return e.metaBoxes.isSaving}function pe(e){return e.deviceType}function me(e){return!!e.blockInserterPanel}function be(e){const{rootClientId:t,insertionIndex:n}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n}}function fe(e){return e.listViewPanel}function ve(e){return e.isEditingTemplate}function he(e){return e.metaBoxes.initialized}const ge=Object(a.createRegistrySelector)(e=>()=>{const t=e(q.store).getEditedPostAttribute("template");if(t){var n;const r=null===(n=e(v.store).getEntityRecords("postType","wp_template"))||void 0===n?void 0:n.find(e=>e.slug===t);return r?e(v.store).getEditedEntityRecord("postType","wp_template",r.id):r}const r=e(q.store).getCurrentPost();return r.link&&"auto-draft"!==r.status?e(v.store).__experimentalGetTemplateForLink(r.link):null});var Oe=n("0dt7");const ye={reducer:d,actions:r,selectors:o,controls:i.controls,persist:["preferences"]},je=Object(a.createReduxStore)(Oe.a,ye);Object(a.registerStore)(Oe.a,ye)},TSYQ:function(e,t,n){var r; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t
({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var A=C((function({as:e=E.Button,scope:t,identifier:n,icon:r,selectedIcon:o,...c}){const s=e,l=Object(a.useSelect)(e=>e(h).getActiveComplementaryArea(t)===n,[n]),{enableComplementaryArea:u,disableComplementaryArea:d}=Object(a.useDispatch)(h);return Object(O.createElement)(s,Object(g.a)({icon:o&&l?o:r,onClick:()=>{l?d(t):u(t,n)}},Object(i.omit)(c,["name"])))}));var M=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:r})=>{const o=Object(O.createElement)(A,Object(g.a)({icon:T.a},r));return Object(O.createElement)(O.Fragment,null,Object(O.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&Object(O.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),o),Object(O.createElement)("div",{className:j()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},t,o))};function I({name:e,as:t=E.Button,onClick:n,...r}){return Object(O.createElement)(E.Fill,{name:e},({onClick:e})=>Object(O.createElement)(t,Object(g.a)({onClick:n||e?(...t)=>{(n||i.noop)(...t),(e||i.noop)(...t)}:void 0},r)))}I.Slot=function({name:e,as:t=E.ButtonGroup,fillProps:n={},bubblesVirtually:r,...o}){return Object(O.createElement)(E.Slot,{name:e,bubblesVirtually:r,fillProps:n},e=>{if(Object(i.isEmpty)(O.Children.toArray(e)))return null;const n=[];O.Children.forEach(e,({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)});const r=O.Children.map(e,e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e);return Object(O.createElement)(t,o,r)})};var B=I;const L=e=>Object(O.createElement)(E.MenuItem,Object(i.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]));function N({scope:e,target:t,__unstableExplicitMenuItem:n,...r}){return Object(O.createElement)(A,Object(g.a)({as:r=>Object(O.createElement)(B,Object(g.a)({__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:L,name:e+"/plugin-more-menu"},r)),role:"menuitemcheckbox",selectedIcon:w.a,name:t,scope:e},r))}function R({scope:e,...t}){return Object(O.createElement)(E.Fill,Object(g.a)({name:"PinnedItems/"+e},t))}R.Slot=function({scope:e,className:t,...n}){return Object(O.createElement)(E.Slot,Object(g.a)({name:"PinnedItems/"+e},n),e=>!Object(i.isEmpty)(e)&&Object(O.createElement)("div",{className:j()(t,"interface-pinned-items")},e))};var D=R;function V({scope:e,children:t,className:n}){return Object(O.createElement)(E.Fill,{name:"ComplementaryArea/"+e},Object(O.createElement)("div",{className:n},t))}const F=C((function({children:e,className:t,closeLabel:n=Object(_.__)("Close plugin"),identifier:r,header:o,headerClassName:i,icon:c,isPinnable:s=!0,panelClassName:l,scope:u,name:d,smallScreenTitle:p,title:m,toggleShortcut:b,isActiveByDefault:f,showIconLabels:v=!1}){const{isActive:g,isPinned:y,activeArea:T,isSmall:k,isLarge:C}=Object(a.useSelect)(e=>{const{getActiveComplementaryArea:t,isItemPinned:n}=e(h),o=t(u);return{isActive:o===r,isPinned:n(u,r),activeArea:o,isSmall:e(P.store).isViewportMatch("< medium"),isLarge:e(P.store).isViewportMatch("large")}},[r,u]);!function(e,t,n,r,o){const i=Object(O.useRef)(!1),c=Object(O.useRef)(!1),{enableComplementaryArea:s,disableComplementaryArea:l}=Object(a.useDispatch)(h);Object(O.useEffect)(()=>{r&&o&&!i.current?(l(e),c.current=!0):c.current&&!o&&i.current?(c.current=!1,s(e,t)):c.current&&n&&n!==t&&(c.current=!1),o!==i.current&&(i.current=o)},[r,o,e,t,n])}(u,r,T,g,k);const{enableComplementaryArea:I,disableComplementaryArea:B,pinItem:L,unpinItem:R}=Object(a.useDispatch)(h);return Object(O.useEffect)(()=>{f&&void 0===T&&!k&&I(u,r)},[T,f,u,r,k]),Object(O.createElement)(O.Fragment,null,s&&Object(O.createElement)(D,{scope:u},y&&Object(O.createElement)(A,{scope:u,identifier:r,isPressed:g&&(!v||C),"aria-expanded":g,label:m,icon:v?w.a:c,showTooltip:!v,isTertiary:v})),d&&s&&Object(O.createElement)(N,{target:d,scope:u,icon:c},m),g&&Object(O.createElement)(V,{className:j()("interface-complementary-area",t),scope:u},Object(O.createElement)(M,{className:i,closeLabel:n,onClose:()=>B(u),smallScreenTitle:p,toggleButtonProps:{label:n,shortcut:b,scope:u,identifier:r}},o||Object(O.createElement)(O.Fragment,null,Object(O.createElement)("strong",null,m),s&&Object(O.createElement)(E.Button,{className:"interface-complementary-area__pin-unpin-item",icon:y?S.a:x.a,label:y?Object(_.__)("Unpin from toolbar"):Object(_.__)("Pin to toolbar"),onClick:()=>(y?R:L)(u,r),isPressed:y,"aria-expanded":y}))),Object(O.createElement)(E.Panel,{className:l},e)))}));F.Slot=function({scope:e,...t}){return Object(O.createElement)(E.Slot,Object(g.a)({name:"ComplementaryArea/"+e},t))};var U=F;class G extends O.Component{componentDidMount(){this.isSticky=!1,this.sync(),document.body.classList.contains("sticky-menu")&&(this.isSticky=!0,document.body.classList.remove("sticky-menu"))}componentWillUnmount(){this.isSticky&&document.body.classList.add("sticky-menu"),this.props.isActive&&document.body.classList.remove("is-fullscreen-mode")}componentDidUpdate(e){this.props.isActive!==e.isActive&&this.sync()}sync(){const{isActive:e}=this.props;e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}render(){return null}}var H=G,z=n("K9lf");var q=Object(O.forwardRef)((function({footer:e,header:t,sidebar:n,secondarySidebar:r,notices:o,content:a,drawer:i,actions:c,labels:s,className:l,shortcuts:u},d){const p=Object(O.useRef)(),m=Object(E.__unstableUseNavigateRegions)(p,u);!function(e){Object(O.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 b={...{drawer:Object(_.__)("Drawer"),header:Object(_.__)("Header"),body:Object(_.__)("Content"),secondarySidebar:Object(_.__)("Block Library"),sidebar:Object(_.__)("Settings"),actions:Object(_.__)("Publish"),footer:Object(_.__)("Footer")},...s};return Object(O.createElement)("div",{ref:Object(z.useMergeRefs)([d,p]),className:j()(l,"interface-interface-skeleton",m,!!e&&"has-footer")},!!i&&Object(O.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":b.drawer},i),Object(O.createElement)("div",{className:"interface-interface-skeleton__editor"},!!t&&Object(O.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":b.header,tabIndex:"-1"},t),Object(O.createElement)("div",{className:"interface-interface-skeleton__body"},!!r&&Object(O.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":b.secondarySidebar,tabIndex:"-1"},r),!!o&&Object(O.createElement)("div",{className:"interface-interface-skeleton__notices"},o),Object(O.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":b.body,tabIndex:"-1"},a),!!n&&Object(O.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":b.sidebar,tabIndex:"-1"},n),!!c&&Object(O.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":b.actions,tabIndex:"-1"},c))),!!e&&Object(O.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":b.footer,tabIndex:"-1"},e))}))},URob:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=a},VKE3:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=a},Xxwi:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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},Y5n4:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return g})),n.d(t,"b",(function(){return O}));var r=n("GRId"),o=n("l3Sj"),a=n("tI+e"),i=n("1ZqX");var c=function({help:e,label:t,isChecked:n,onChange:o,children:i}){return Object(r.createElement)("div",{className:"edit-post-preferences-modal__option"},Object(r.createElement)(a.ToggleControl,{help:e,label:t,checked:n,onChange:o}),i)};function s({willEnable:e}){const[t,n]=Object(r.useState)(!1);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",{className:"edit-post-preferences-modal__custom-fields-confirmation-message"},Object(o.__)("A page reload is required for this change. Make sure your content is saved before reloading.")),Object(r.createElement)(a.Button,{className:"edit-post-preferences-modal__custom-fields-confirmation-button",isSecondary:!0,isBusy:t,disabled:t,onClick:()=>{n(!0),document.getElementById("toggle-custom-fields-form").submit()}},e?Object(o.__)("Enable & Reload"):Object(o.__)("Disable & Reload")))}var l=Object(i.withSelect)(e=>({areCustomFieldsEnabled:!!e("core/editor").getEditorSettings().enableCustomFields}))((function({label:e,areCustomFieldsEnabled:t}){const[n,o]=Object(r.useState)(t);return Object(r.createElement)(c,{label:e,isChecked:n,onChange:o},n!==t&&Object(r.createElement)(s,{willEnable:n}))})),u=n("K9lf"),d=n("T40v"),p=Object(u.compose)(Object(i.withSelect)((e,{panelName:t})=>{const{isEditorPanelEnabled:n,isEditorPanelRemoved:r}=e(d.a);return{isRemoved:r(t),isChecked:n(t)}}),Object(u.ifCondition)(({isRemoved:e})=>!e),Object(i.withDispatch)((e,{panelName:t})=>({onChange:()=>e(d.a).toggleEditorPanelEnabled(t)})))(c);const{Fill:m,Slot:b}=Object(a.createSlotFill)("EnablePluginDocumentSettingPanelOption"),f=({label:e,panelName:t})=>Object(r.createElement)(m,null,Object(r.createElement)(p,{label:e,panelName:t}));f.Slot=b;var v=f,h=n("KEfo"),g=Object(u.compose)(Object(i.withSelect)(e=>({isChecked:e("core/editor").isPublishSidebarEnabled()})),Object(i.withDispatch)(e=>{const{enablePublishSidebar:t,disablePublishSidebar:n}=e("core/editor");return{onChange:e=>e?t():n()}}),Object(h.ifViewportMatches)("medium"))(c),O=Object(u.compose)(Object(i.withSelect)((e,{featureName:t})=>{const{isFeatureActive:n}=e(d.a);return{isChecked:n(t)}}),Object(i.withDispatch)((e,{featureName:t})=>({onChange:()=>e(d.a).toggleFeature(t)})))(c)},YLtl:function(e,t){e.exports=window.lodash},Z23Y:function(e,t){e.exports=window.wp.warning},axFQ:function(e,t){e.exports=window.wp.blockEditor},bWcr:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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},cDcd:function(e,t){e.exports=window.React},cjQ8:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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},dSQ2:function(e,t,n){"use strict";n.r(t),n.d(t,"reinitializeEditor",(function(){return Js})),n.d(t,"initializeEditor",(function(){return el})),n.d(t,"PluginBlockSettingsMenuItem",(function(){return Zs})),n.d(t,"PluginDocumentSettingPanel",(function(){return ys.a})),n.d(t,"PluginMoreMenuItem",(function(){return Qs})),n.d(t,"PluginPostPublishPanel",(function(){return Ns})),n.d(t,"PluginPostStatusInfo",(function(){return rs})),n.d(t,"PluginPrePublishPanel",(function(){return Fs})),n.d(t,"PluginSidebar",(function(){return js})),n.d(t,"PluginSidebarMoreMenuItem",(function(){return $s})),n.d(t,"__experimentalFullscreenModeClose",(function(){return mc})),n.d(t,"__experimentalMainDashboardButton",(function(){return Ic})),n.d(t,"store",(function(){return w.a}));var r=n("GRId"),o=n("jZUy"),a=n("axFQ"),i=n("jSdM"),c=n("QyPg"),s=n("g56x"),l=n("6aBm");Object(s.addFilter)("editor.MediaUpload","core/edit-post/replace-media-upload",()=>l.MediaUpload);var u=n("wx14"),d=n("YLtl"),p=n("HSyU"),m=n("tI+e"),b=n("1ZqX"),f=n("l3Sj"),v=n("K9lf");const h=Object(v.compose)(Object(b.withSelect)((e,t)=>{if(Object(p.hasBlockSupport)(t.name,"multiple",!0))return{};const n=e(a.store).getBlocks(),r=Object(d.find)(n,({name:e})=>t.name===e);return{originalBlockClientId:r&&r.clientId!==t.clientId&&r.clientId}}),Object(b.withDispatch)((e,{originalBlockClientId:t})=>({selectFirst:()=>e(a.store).selectBlock(t)}))),g=Object(v.createHigherOrderComponent)(e=>h(({originalBlockClientId:t,selectFirst:n,...o})=>{if(!t)return Object(r.createElement)(e,o);const i=Object(p.getBlockType)(o.name),c=function(e){const t=Object(p.findTransform)(Object(p.getBlockTransforms)("to",e),({type:e,blocks:t})=>"block"===e&&1===t.length);if(!t)return null;return Object(p.getBlockType)(t.blocks[0])}(o.name);return[Object(r.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(r.createElement)(e,Object(u.a)({key:"block-edit"},o))),Object(r.createElement)(a.Warning,{key:"multiple-use-warning",actions:[Object(r.createElement)(m.Button,{key:"find-original",isSecondary:!0,onClick:n},Object(f.__)("Find original")),Object(r.createElement)(m.Button,{key:"remove",isSecondary:!0,onClick:()=>o.onReplace([])},Object(f.__)("Remove")),c&&Object(r.createElement)(m.Button,{key:"transform",isSecondary:!0,onClick:()=>o.onReplace(Object(p.createBlock)(c.name,o.attributes))},Object(f.__)("Transform into:")," ",c.title)]},Object(r.createElement)("strong",null,i.title,": "),Object(f.__)("This block can only be used once."))]}),"withMultipleValidation");Object(s.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",g);var O=n("K+tz"),y=n("TvNi"),j=n("Mmq9"),E=n("onLe");function _(){const{createNotice:e}=Object(b.useDispatch)(E.store),t=Object(b.useSelect)(e=>()=>e(i.store).getEditedPostAttribute("content"),[]);const n=Object(v.useCopyToClipboard)(t,(function(){e("info",Object(f.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return Object(r.createElement)(m.MenuItem,{ref:n},Object(f.__)("Copy all content"))}var w=n("T40v");var S=Object(b.withDispatch)(e=>{const{openModal:t}=e(w.a);return{openModal:t}})((function({openModal:e}){return Object(r.createElement)(m.MenuItem,{onClick:()=>{e("edit-post/manage-blocks")}},Object(f.__)("Block Manager"))})),x=n("RxS6");var P=Object(b.withDispatch)(e=>{const{openModal:t}=e(w.a);return{openModal:t}})((function({openModal:e}){return Object(r.createElement)(m.MenuItem,{onClick:()=>{e("edit-post/keyboard-shortcut-help")},shortcut:x.displayShortcut.access("h")},Object(f.__)("Keyboard shortcuts"))}));const{Fill:T,Slot:k}=Object(m.createSlotFill)("ToolsMoreMenuGroup");T.Slot=({fillProps:e})=>Object(r.createElement)(k,{fillProps:e},e=>!Object(d.isEmpty)(e)&&Object(r.createElement)(m.MenuGroup,{label:Object(f.__)("Tools")},e));var C=T;function A(){const e=Object(b.useSelect)(e=>e(w.a).isEditingTemplate(),[]),{toggleFeature:t}=Object(b.useDispatch)(w.a);return Object(r.createElement)(m.MenuItem,{onClick:()=>t(e?"welcomeGuideTemplate":"welcomeGuide")},Object(f.__)("Welcome Guide"))}Object(y.registerPlugin)("edit-post",{render:()=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)(C,null,({onClose:e})=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)(S,{onSelect:e}),Object(r.createElement)(m.MenuItem,{role:"menuitem",href:Object(j.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(f.__)("Manage Reusable blocks")),Object(r.createElement)(P,{onSelect:e}),Object(r.createElement)(A,null),Object(r.createElement)(_,null),Object(r.createElement)(m.MenuItem,{role:"menuitem",icon:O.a,href:Object(f.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(f.__)("Help"),Object(r.createElement)(m.VisuallyHidden,{as:"span"},Object(f.__)("(opens in a new tab)"))))))});var M={"t a l e s o f g u t e n b e r g":e=>{const{ownerDocument:t}=e.target;(t.activeElement.classList.contains("edit-post-visual-editor")||t.activeElement===t.body)&&(e.preventDefault(),window.wp.data.dispatch("core/block-editor").insertBlock(window.wp.blocks.createBlock("core/paragraph",{content:"🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️"})))}},I=n("TSYQ"),B=n.n(I),L=n("U60i"),N=n("hF7m");var R=Object(v.compose)(Object(b.withSelect)(e=>({isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled})),Object(b.withDispatch)(e=>({onExit(){e(w.a).switchEditorMode("visual")}})))((function({onExit:e,isRichEditingEnabled:t}){return Object(r.createElement)("div",{className:"edit-post-text-editor"},t&&Object(r.createElement)("div",{className:"edit-post-text-editor__toolbar"},Object(r.createElement)("h2",null,Object(f.__)("Editing code")),Object(r.createElement)(m.Button,{isTertiary:!0,onClick:e,shortcut:x.displayShortcut.secondary("m")},Object(f.__)("Exit code editor")),Object(r.createElement)(i.TextEditorGlobalKeyboardShortcuts,null)),Object(r.createElement)("div",{className:"edit-post-text-editor__body"},Object(r.createElement)(i.PostTitle,null),Object(r.createElement)(i.PostTextEditor,null)))})),D=function(e,t){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function V(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}D(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var F=function(){return(F=Object.assign||function(e){for(var t,n=1,r=arguments.length;n
0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function H(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o
-1||/[A-Z]/.test(e))}var _e={};var we=["","X","Y","Z"],Se=["transformPerspective","x","y","z"];function xe(e,t){return Se.indexOf(e)-Se.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return we.forEach((function(t){return Se.push(e+t)}))}));var Pe=new Set(Se);function Te(e){return Pe.has(e)}var ke=new Set(["originX","originY","originZ"]);function Ce(e){return ke.has(e)}function Ae(e,t){var n=t.layout,r=t.layoutId;return Te(e)||Ce(e)||(n||void 0!==r)&&(!!_e[e]||"opacity"===e)}var Me=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},Ie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Be(e){return e.startsWith("--")}var Le=function(e,t){return t&&"number"==typeof e?t.transform(e):e}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Ne=function(){return(Ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n
0?-1:1)*((r-a)*i)/c}):(t=function(e){return Math.exp(-e*o)*((e-s)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(s-e))});var p=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(p))return{stiffness:100,damping:10,duration:o};var m=Math.pow(p,2)*u;return{stiffness:m,damping:2*d*Math.sqrt(u*m),duration:o}}function mn(e,t){return e*Math.sqrt(1-t*t)}var bn=["duration","bounce"],fn=["stiffness","damping","mass"];function vn(e,t){return t.some((function(t){return void 0!==e[t]}))}function hn(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.restSpeed,i=void 0===a?2:a,c=e.restDelta,s=un(e,["from","to","restSpeed","restDelta"]),l={done:!1,value:n},u=function(e){var t=ln({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!vn(e,fn)&&vn(e,bn)){var n=pn(e);(t=ln(ln(ln({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(s),d=u.stiffness,p=u.damping,m=u.mass,b=u.velocity,f=u.duration,v=u.isResolvedFromDuration,h=gn,g=gn;function O(){var e=b?-b/1e3:0,t=o-n,r=p/(2*Math.sqrt(d*m)),a=Math.sqrt(d/m)/1e3;if(null!=c||(c=Math.abs(o-n)<=1?.01:.4),r<1){var i=mn(a,r);h=function(n){var c=Math.exp(-r*a*n);return o-c*((e+r*a*t)/i*Math.sin(i*n)+t*Math.cos(i*n))},g=function(n){var o=Math.exp(-r*a*n);return r*a*o*(Math.sin(i*n)*(e+r*a*t)/i+t*Math.cos(i*n))-o*(Math.cos(i*n)*(e+r*a*t)-i*t*Math.sin(i*n))}}else if(1===r)h=function(n){return o-Math.exp(-a*n)*(t+(e+a*t)*n)};else{var s=a*Math.sqrt(r*r-1);h=function(n){var i=Math.exp(-r*a*n),c=Math.min(s*n,300);return o-i*((e+r*a*t)*Math.sinh(c)+s*t*Math.cosh(c))/s}}}return O(),{next:function(e){var t=h(e);if(v)l.done=e>=f;else{var n=1e3*g(e),r=Math.abs(n)<=i,a=Math.abs(o-t)<=c;l.done=r&&a}return l.value=l.done?o:t,l},flipTarget:function(){var e;b=-b,n=(e=[o,n])[0],o=e[1],O()}}}hn.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var gn=function(e){return 0},On=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},yn=function(e,t,n){return-n*e+n*t+e},jn=function(e,t){return function(n){return Boolean(Ge(n)&&Ue.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},En=function(e,t,n){return function(r){var o;if(!Ge(r))return r;var a=r.match(Ve),i=a[0],c=a[1],s=a[2],l=a[3];return(o={})[e]=parseFloat(i),o[t]=parseFloat(c),o[n]=parseFloat(s),o.alpha=void 0!==l?parseFloat(l):1,o}},_n=Re(0,255),wn=Ne(Ne({},Ze),{transform:function(e){return Math.round(_n(e))}}),Sn={test:jn("rgb","red"),parse:En("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,a=void 0===o?1:o;return"rgba("+wn.transform(t)+", "+wn.transform(n)+", "+wn.transform(r)+", "+De(Qe.transform(a))+")"}};var xn={test:jn("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Sn.transform},Pn={test:jn("hsl","hue"),parse:En("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,a=void 0===o?1:o;return"hsla("+Math.round(t)+", "+qe.transform(De(n))+", "+qe.transform(De(r))+", "+De(Qe.transform(a))+")"}},Tn=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},kn=[xn,Sn,Pn],Cn=function(e){return kn.find((function(t){return t.test(e)}))},An=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Mn=function(e,t){var n=Cn(e),r=Cn(t);An(e),An(t),n.transform,r.transform;var o=n.parse(e),a=r.parse(t),i=ln({},o),c=n===Pn?yn:Tn;return function(e){for(var t in i)"alpha"!==t&&(i[t]=c(o[t],a[t],e));return i.alpha=yn(o.alpha,a.alpha,e),n.transform(i)}},In={test:function(e){return Sn.test(e)||xn.test(e)||Pn.test(e)},parse:function(e){return Sn.test(e)?Sn.parse(e):Pn.test(e)?Pn.parse(e):xn.parse(e)},transform:function(e){return Ge(e)?e:e.hasOwnProperty("red")?Sn.transform(e):Pn.transform(e)}};function Bn(e){var t=[],n=0,r=e.match(Fe);r&&(n=r.length,e=e.replace(Fe,"${c}"),t.push.apply(t,r.map(In.parse)));var o=e.match(Ve);return o&&(e=e.replace(Ve,"${n}"),t.push.apply(t,o.map(Ze.parse))),{values:t,numColors:n,tokenised:e}}function Ln(e){return Bn(e).values}function Nn(e){var t=Bn(e),n=t.values,r=t.numColors,o=t.tokenised,a=n.length;return function(e){for(var t=o,n=0;n
0},parse:Ln,createTransformer:Nn,getAnimatableNone:function(e){var t=Ln(e);return Nn(e)(t.map(Rn))}},Vn=function(e){return"number"==typeof e};function Fn(e,t){return Vn(e)?function(n){return yn(e,t,n)}:In.test(e)?Mn(e,t):zn(e,t)}var Un=function(e,t){var n=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o
e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var l=Wn(t,i,c),u=2===s?function(e,t){var n=e[0],r=e[1],o=t[0];return function(e){return o(On(n,r,e))}}(e,l):function(e,t){var n=e.length,r=n-1;return function(o){var a=0,i=!1;if(o<=e[0]?i=!0:o>=e[r]&&(a=r-1,i=!0),!i){for(var c=1;c
o||c===r);c++);a=c-1}var s=On(e[a],e[a+1],o);return t[a](s)}}(e,l);return a?function(t){return u(dn(e[0],e[s-1],t))}:u}var Xn,Kn=function(e){return function(t){return 1-e(1-t)}},Zn=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Qn=function(e){return function(t){return t*t*((e+1)*t-e)}},$n=function(e){return e},Jn=(Xn=2,function(e){return Math.pow(e,Xn)}),er=Kn(Jn),tr=Zn(Jn),nr=function(e){return 1-Math.sin(Math.acos(e))},rr=Kn(nr),or=Zn(rr),ar=Qn(1.525),ir=Kn(ar),cr=Zn(ar),sr=function(e){var t=Qn(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),lr=function(e){if(1===e||0===e)return e;var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},ur=Kn(lr);function dr(e,t){return e.map((function(){return t||tr})).splice(0,e.length-1)}function pr(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=e.offset,c=e.duration,s=void 0===c?300:c,l={done:!1,value:n},u=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(i&&i.length===u.length?i:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(u),s);function p(){return Yn(d,u,{ease:Array.isArray(a)?a:dr(u,a)})}var m=p();return{next:function(e){return l.value=m(e),l.done=e>=s,l},flipTarget:function(){u.reverse(),m=p()}}}var mr={keyframes:pr,spring:hn,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,a=e.power,i=void 0===a?.8:a,c=e.timeConstant,s=void 0===c?350:c,l=e.restDelta,u=void 0===l?.5:l,d=e.modifyTarget,p={done:!1,value:o},m=i*n,b=o+m,f=void 0===d?b:d(b);return f!==b&&(m=f-o),{next:function(e){var t=-m*Math.exp(-e/s);return p.done=!(t>u||t<-u),p.value=p.done?f:f+t,p},flipTarget:function(){}}}};var br="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},fr="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(br())}),1/60*1e3)};var vr=!0,hr=!1,gr=!1,Or={delta:0,timestamp:0},yr=["read","update","preRender","render","postRender"],jr=yr.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,a=new WeakSet,i={schedule:function(e,i,c){void 0===i&&(i=!1),void 0===c&&(c=!1);var s=c&&o,l=s?t:n;return i&&a.add(e),-1===l.indexOf(e)&&(l.push(e),s&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(c){var s;if(o=!0,t=(s=[n,t])[0],(n=s[1]).length=0,r=t.length)for(var l=0;l
=t+n:e<=-n}(p,P,g,k)&&M():(r.stop(),j&&j()))}return s&&(null==O||O(),(r=u(I)).start()),{stop:function(){null==y||y(),r.stop()}}}function Ir(e,t){return t?e*(1e3/t):0}var Br=function(e){return 1e3*e},Lr=function(e,t){return 1-3*t+3*e},Nr=function(e,t){return 3*t-6*e},Rr=function(e){return 3*e},Dr=function(e,t,n){return((Lr(t,n)*e+Nr(t,n))*e+Rr(t))*e},Vr=function(e,t,n){return 3*Lr(t,n)*e*e+2*Nr(t,n)*e+Rr(t)};function Fr(e,t,n,r){if(e===t&&n===r)return $n;for(var o=new Float32Array(11),a=0;a<11;++a)o[a]=Dr(.1*a,e,n);function i(t){for(var r=0,a=1;10!==a&&o[a]<=t;++a)r+=.1;--a;var i=r+.1*((t-o[a])/(o[a+1]-o[a])),c=Vr(i,e,n);return c>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var a=Vr(t,n,r);if(0===a)return t;t-=(Dr(t,n,r)-e)/a}return t}(t,i,e,n):0===c?i:function(e,t,n,r,o){var a,i,c=0;do{(a=Dr(i=t+(n-t)/2,r,o)-e)>0?n=i:t=i}while(Math.abs(a)>1e-7&&++c<10);return i}(t,r,r+.1,e,n)}return function(e){return 0===e||1===e?e:Dr(i(e),t,r)}}var Ur={linear:$n,easeIn:Jn,easeInOut:tr,easeOut:er,circIn:nr,circInOut:or,circOut:rr,backIn:ar,backInOut:cr,backOut:ir,anticipate:sr,bounceIn:ur,bounceInOut:function(e){return e<.5?.5*(1-lr(1-2*e)):.5*lr(2*e-1)+.5},bounceOut:lr},Gr=function(e){if(Array.isArray(e)){e.length;var t=G(e,4);return Fr(t[0],t[1],t[2],t[3])}return"string"==typeof e?Ur[e]:e},Hr=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Dn.test(t)||t.startsWith("url(")))},zr=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},qr=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Wr=function(){return{type:"keyframes",ease:"linear",duration:.3}},Yr=function(e){return{type:"keyframes",duration:.8,values:e}},Xr={x:zr,y:zr,z:zr,rotate:zr,rotateX:zr,rotateY:zr,rotateZ:zr,scaleX:qr,scaleY:qr,scale:qr,opacity:Wr,backgroundColor:Wr,color:Wr,default:qr},Kr=new Set(["brightness","contrast","saturate","opacity"]);function Zr(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if("drop-shadow"===n)return e;var o=(r.match(Ve)||[])[0];if(!o)return e;var a=r.replace(o,""),i=Kr.has(n)?1:0;return o!==r&&(i*=100),n+"("+i+a+")"}var Qr=/([a-z-]*)\(.*?\)/g,$r=Ne(Ne({},Dn),{getAnimatableNone:function(e){var t=e.match(Qr);return t?t.map(Zr).join(" "):e}}),Jr=F(F({},et),{color:In,backgroundColor:In,outlineColor:In,fill:In,stroke:In,borderColor:In,borderTopColor:In,borderRightColor:In,borderBottomColor:In,borderLeftColor:In,filter:$r,WebkitFilter:$r}),eo=function(e){return Jr[e]};function to(e,t){var n,r=eo(e);return r!==$r&&(r=Dn),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}function no(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,a=e.loop,i=U(e,["ease","times","yoyo","flip","loop"]),c=F({},i);return n&&(c.offset=n),i.duration&&(c.duration=Br(i.duration)),i.repeatDelay&&(c.repeatDelay=Br(i.repeatDelay)),t&&(c.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(Gr):Gr(t)),"tween"===i.type&&(c.type="keyframes"),(r||a||o)&&(!0,r?c.repeatType="reverse":a?c.repeatType="loop":o&&(c.repeatType="mirror"),c.repeat=a||r||o||i.repeat),"spring"!==i.type&&(c.type="keyframes"),c}function ro(e,t,n){var r,o,a,i;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=H([],G(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=U(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=F(F({},e),(o=n,a=t.to,i=xt(a)?Yr:Xr[o]||Xr.default,F({to:a},i(a))))),F(F({},t),no(e))}function oo(e,t,n,r,o){var a,i=co(r,e),c=null!==(a=i.from)&&void 0!==a?a:t.get(),s=Hr(e,n);"none"===c&&s&&"string"==typeof n?c=to(e,n):ao(c)&&"string"==typeof n?c=io(n):!Array.isArray(n)&&ao(n)&&"string"==typeof c&&(n=io(c));var l=Hr(e,c);return l&&s&&!1!==i.type?function(){var r={from:c,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===i.type||"decay"===i.type?function(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,a=void 0===o?0:o,i=e.min,c=e.max,s=e.power,l=void 0===s?.8:s,u=e.timeConstant,d=void 0===u?750:u,p=e.bounceStiffness,m=void 0===p?500:p,b=e.bounceDamping,f=void 0===b?10:b,v=e.restDelta,h=void 0===v?1:v,g=e.modifyTarget,O=e.driver,y=e.onUpdate,j=e.onComplete;function E(e){return void 0!==i&&e
c}function _(e){return void 0===i?c:void 0===c||Math.abs(i-e)
k||-1===C&&e
-1&&e.splice(n,1)}var po=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return lo(this.subscriptions,e),function(){return uo(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o
b&&h,j=Array.isArray(v)?v:[v],E=j.reduce(i,{});!1===g&&(E={});var _=f.prevResolvedValues,w=void 0===_?{}:_,S=F(F({},w),E),x=function(e){y=!0,p.delete(e),f.needsAnimating[e]=!0};for(var P in S){var T=E[P],k=w[P];m.hasOwnProperty(P)||(T!==k?xt(T)&&xt(k)?sn(T,k)?f.protectedKeys[P]=!0:x(P):void 0!==T?x(P):p.add(P):void 0!==T&&p.has(P)?x(P):f.protectedKeys[P]=!0)}f.prevProp=v,f.prevResolvedValues=E,f.isActive&&(m=F(F({},m),E)),a&&e.blockInitialAnimation&&(y=!1),y&&!O&&d.push.apply(d,H([],G(j.map((function(e){return{animation:e,options:F({type:o},t)}})))))},v=0;v
=3;if(t||n){var o=e.point,a=Tr().timestamp;r.history.push(F(F({},o),{timestamp:a}));var i=r.handlers,c=i.onStart,s=i.onMove;t||(c&&c(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),s&&s(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Vo(t,r.transformPagePoint),Rt(e)&&0===e.buttons?r.handlePointerUp(e,t):kr.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,a=n.onSessionEnd,i=Uo(Vo(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,i),a&&a(e,i)},!(Dt(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var a=Vo(Gt(e),this.transformPagePoint),i=a.point,c=Tr().timestamp;this.history=[F(F({},i),{timestamp:c})];var s=t.onSessionStart;s&&s(e,Uo(a,this.history)),this.removeListeners=on(Yt(window,"pointermove",this.handlePointerMove),Yt(window,"pointerup",this.handlePointerUp),Yt(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),_r.update(this.updatePoint)},e}();function Vo(e,t){return t?{point:t(e.point)}:e}function Fo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Uo(e,t){var n=e.point;return{point:n,delta:Fo(n,Ho(t)),offset:Fo(n,Go(t)),velocity:zo(t,.1)}}function Go(e){return e[0]}function Ho(e){return e[e.length-1]}function zo(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Ho(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Br(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function qo(e){return e}function Wo(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var Yo={translate:0,scale:1,origin:0,originPoint:0};function Xo(){return{x:F({},Yo),y:F({},Yo)}}function Ko(e){return[e("x"),e("y")]}function Zo(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e
o&&(e=n?yn(o,e,n.max):Math.min(e,o)),e}function Qo(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function $o(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min
r?n=On(t.min,t.max-r,e.min):r>o&&(n=On(e.min,e.max-o,t.min)),dn(0,1,n)}function aa(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=yn(t.min,t.max,e.origin),e.scale=ra(n)/ra(t),na(e.scale,1,1e-4)&&(e.scale=1),e.translate=yn(n.min,n.max,e.origin)-e.originPoint,na(e.translate)&&(e.translate=0)}function ia(e,t,n,r){aa(e.x,t.x,n.x,ca(r.originX)),aa(e.y,t.y,n.y,ca(r.originY))}function ca(e){return"number"==typeof e?e:.5}function sa(e,t,n){e.min=n.min+t.min,e.max=e.min+ra(t)}var la=function(e,t){return e.depth-t.depth};function ua(e){return e.projection.isEnabled||e.shouldResetTransform()}function da(e,t){void 0===t&&(t=[]);var n=e.parent;return n&&da(n,t),ua(e)&&t.push(e),t}function pa(e){if(!e.shouldResetTransform()){var t,n=e.getLayoutState();e.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=e.measureViewportBox(),n.layoutCorrected=(t=n.layout,{x:F({},t.x),y:F({},t.y)}),e.notifyLayoutMeasure(n.layout,e.prevViewportBox||n.layout),kr.update((function(){return e.rebaseProjectionTarget()}))}}function ma(e,t){return{min:t.min-e.min,max:t.max-e.min}}function ba(e,t){return{x:ma(e.x,t.x),y:ma(e.y,t.y)}}function fa(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||void 0===r&&e!==t}function va(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function ha(e,t){e.min=t.min,e.max=t.max}function ga(e,t,n){return n+t*(e-n)}function Oa(e,t,n,r,o){return void 0!==o&&(e=ga(e,o,r)),ga(e,n,r)+t}function ya(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),e.min=Oa(e.min,t,n,r,o),e.max=Oa(e.max,t,n,r,o)}function ja(e,t){var n=t.x,r=t.y;ya(e.x,n.translate,n.scale,n.originPoint),ya(e.y,r.translate,r.scale,r.originPoint)}function Ea(e,t,n,r){var o=G(r,3),a=o[0],i=o[1],c=o[2];e.min=t.min,e.max=t.max;var s=void 0!==n[c]?n[c]:.5,l=yn(t.min,t.max,s);ya(e,n[a],n[i],l,n.scale)}var _a=["x","scaleX","originX"],wa=["y","scaleY","originY"];function Sa(e,t,n){Ea(e.x,t.x,n,_a),Ea(e.y,t.y,n,wa)}function xa(e,t,n,r,o){return e=ga(e-=t,1/n,r),void 0!==o&&(e=ga(e,1/o,r)),e}function Pa(e,t,n){var r=G(n,3),o=r[0],a=r[1],i=r[2];!function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5);var a=yn(e.min,e.max,r)-t;e.min=xa(e.min,t,n,a,o),e.max=xa(e.max,t,n,a,o)}(e,t[o],t[a],t[i],t.scale)}function Ta(e,t){Pa(e.x,t,_a),Pa(e.y,t,wa)}var ka=new Set;function Ca(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function Aa(e){return ka.add(e),function(){return ka.delete(e)}}function Ma(){if(ka.size){var e=0,t=[[]],n=[],r=function(n){return Ca(t,n,e)},o=function(t){Ca(n,t,e),e++};ka.forEach((function(t){t(r,o),e=0})),ka.clear();for(var a=n.length,i=0;i<=a;i++)t[i]&&t[i].forEach(Ba),n[i]&&n[i].forEach(Ba)}}var Ia,Ba=function(e){return e()},La=new WeakMap,Na=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),La.set(t,this)}return e.prototype.start=function(e,t){var n=this,r=void 0===t?{}:t,o=r.snapToCursor,a=void 0!==o&&o,i=r.cursorProgress,c=this.props.transformPagePoint;this.panSession=new Do(e,{onSessionStart:function(e){var t;n.stopMotion();var r=function(e){return Gt(e,"client")}(e).point;null===(t=n.cancelLayout)||void 0===t||t.call(n),n.cancelLayout=Aa((function(e,t){var o=da(n.visualElement),c=function(e){var t=[],n=function(e){ua(e)&&t.push(e),e.children.forEach(n)};return e.children.forEach(n),t.sort(la)}(n.visualElement),s=H(H([],G(o)),G(c)),l=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),t((function(){s.forEach((function(e){return e.resetTransform()}))})),e((function(){pa(n.visualElement),c.forEach(pa)})),t((function(){s.forEach((function(e){return e.restoreTransform()})),a&&(l=n.snapToCursor(r))})),e((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var e=n.visualElement.projection;Ko((function(t){if(!l){var o=e.target[t],a=o.min,c=o.max;n.cursorProgress[t]=i?i[t]:On(a,c,r[t])}var s=n.getAxisMotionValue(t);s&&(n.originPoint[t]=s.get())}))})),t((function(){wr.update(),wr.preRender(),wr.render(),wr.postRender()})),e((function(){return n.resolveDragConstraints()}))}))},onStart:function(e,t){var r,o,a,i=n.props,c=i.drag,s=i.dragPropagation;(!c||s||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=$t(c),n.openGlobalLock))&&(Ma(),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,e,t),null===(a=n.visualElement.animationState)||void 0===a||a.setActive(Mt.Drag,!0))},onMove:function(e,t){var r,o,a,i,c=n.props,s=c.dragPropagation,l=c.dragDirectionLock;if(s||n.openGlobalLock){var u=t.offset;if(l&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(u),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t.point,u),n.updateAxis("y",t.point,u),null===(i=(a=n.props).onDrag)||void 0===i||i.call(a,e,t),Ia=e}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:c})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(ue(n)?this.resolveRefConstraints(o,n):function(e,t){var n=t.top,r=t.left,o=t.bottom,a=t.right;return{x:Qo(e.x,r,a),y:Qo(e.y,n,o)}}(o,n)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:Jo(e,"left","right"),y:Jo(e,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&Ko((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,a=t.current;this.constraintsBox=ta(a,o);var i=function(e,t){return{x:$o(e.x,t.x),y:$o(e.y,t.y)}}(e,this.constraintsBox);if(r){var c=r(function(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}(i));this.hasMutatedConstraints=!!c,c&&(i=Wo(c))}return i},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Mt.Drag,!1)},e.prototype.stop=function(e,t){var n,r,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var a=this.isDragging;if(this.cancelDrag(),a){var i=t.velocity;this.animateDragEnd(i),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return Ko((function(n){if(Ra(n,t.props.drag,t.currentDirection)){var r=t.getAxisMotionValue(n);if(!r)return t.cursorProgress[n]=.5,!0;var o=t.visualElement.getLayoutState().layout,a=o[n].max-o[n].min,i=o[n].min+a/2,c=e[n]-i;t.originPoint[n]=e[n],r.set(c)}})).includes(!0)},e.prototype.updateAxis=function(e,t,n){if(Ra(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,n):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var n=this.getAxisMotionValue(e);if(t&&n){var r=this.originPoint[e]+t[e],o=this.constraints?Zo(r,this.constraints[e],this.elastic[e]):r;n.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var n,r=this.visualElement.getLayoutState().layout[e],o=r.max-r.min,a=this.cursorProgress[e],i=function(e,t,n,r,o){var a=e-t*n;return r?Zo(a,r,o):a}(t[e],o,a,null===(n=this.constraints)||void 0===n?void 0:n[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,i,i+o)},e.prototype.setProps=function(e){var t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,a=e.dragPropagation,i=void 0!==a&&a,c=e.dragConstraints,s=void 0!==c&&c,l=e.dragElastic,u=void 0===l?.35:l,d=e.dragMomentum,p=void 0===d||d,m=U(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=F({drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:u,dragMomentum:p},m)},e.prototype.getAxisMotionValue=function(e){var t=this.props,n=t.layout,r=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,n=e._dragY;return t||n},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,i=n.dragTransition,c=function(e,t){void 0===t&&(t=!0);var n,r=e.getProjectionParent();return!!r&&(t?Ta(n=ba(r.projection.target,e.projection.target),r.getLatestValues()):n=ba(r.getLayoutState().layout,e.getLayoutState().layout),Ko((function(t){return e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),s=this.constraints||{};if(c&&Object.keys(s).length&&this.isLayoutDrag()){var l=this.visualElement.getProjectionParent();if(l){var u=ba(l.projection.targetFinal,s);Ko((function(e){var t=u[e],n=t.min,r=t.max;s[e]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=Ko((function(n){var l;if(Ra(n,r,t.currentDirection)){var u=null!==(l=null==s?void 0:s[n])&&void 0!==l?l:{},d=a?200:1e6,p=a?40:1e7,m=F(F({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},i),u);return t.getAxisMotionValue(n)?t.startAxisValueAnimation(n,m):t.visualElement.startLayoutAnimation(n,m,c)}}));return Promise.all(d).then((function(){var e,n;null===(n=(e=t.props).onDragTransitionEnd)||void 0===n||n.call(e)}))},e.prototype.stopMotion=function(){var e=this;Ko((function(t){var n=e.getAxisMotionValue(t);n?n.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);if(n){var r=n.get();return n.set(r),n.set(r),so(e,n,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.drag;if(ue(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};Ko((function(t){r[t]=oa(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateConstraints((function(){Ko((function(t){if(Ra(t,n,null)){var o=function(e,t,n){var r=e.max-e.min,o=yn(t.min,t.max-r,n);return{min:o,max:o+r}}(e.visualElement.projection.target[t],e.constraintsBox[t],r[t]),a=o.min,i=o.max;e.visualElement.setProjectionTargetAxis(t,a,i)}}))})),setTimeout(Ma,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=Aa((function(n,r){var o=da(t.visualElement);r((function(){return o.forEach((function(e){return e.resetTransform()}))})),n((function(){return pa(t.visualElement)})),r((function(){return o.forEach((function(e){return e.restoreTransform()}))})),n((function(){t.resolveDragConstraints()})),e&&r(e)}))},e.prototype.mount=function(e){var t=this,n=Yt(e.getInstance(),"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=Lt(window,"resize",(function(){t.scalePoint()})),o=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),a=e.prevDragCursor;return a&&this.start(Ia,{cursorProgress:a}),function(){null==n||n(),null==r||r(),null==o||o(),t.cancelDrag()}},e}();function Ra(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var Da,Va,Fa={pan:an((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,a=e.visualElement,i=t||n||r||o,c=Object(z.useRef)(null),s=Object(z.useContext)(Q).transformPagePoint,l={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){c.current=null,r&&r(e,t)}};Object(z.useEffect)((function(){null!==c.current&&c.current.updateHandlers(l)})),Xt(a,"pointerdown",i&&function(e){c.current=new Do(e,l,{transformPagePoint:s})}),nn((function(){return c.current&&c.current.end()}))})),drag:an((function(e){var t=e.dragControls,n=e.visualElement,r=Object(z.useContext)(Q).transformPagePoint,o=ee((function(){return new Na({visualElement:n})}));o.setProps(F(F({},e),{transformPagePoint:r})),Object(z.useEffect)((function(){return t&&t.subscribe(o)}),[o]),Object(z.useEffect)((function(){return o.mount(n)}),[])}))};function Ua(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(Da||(Da={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(Va||(Va={}));var Ga=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ha(e,t,n){void 0===n&&(n=1);var r=G(function(e){var t=Ga.exec(e);if(!t)return[,];var n=G(t,3);return[n[1],n[2]]}(e),2),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i?i.trim():Ua(a)?Ha(a,t,n+1):a}}function za(e,t){return e/(t.max-t.min)*100}var qa={process:function(e,t,n){var r=n.target;if("string"==typeof e){if(!We.test(e))return e;e=parseFloat(e)}return za(e,r.x)+"% "+za(e,r.y)+"%"}},Wa={borderRadius:F(F({},qa),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:qa,borderTopRightRadius:qa,borderBottomLeftRadius:qa,borderBottomRightRadius:qa,boxShadow:{process:function(e,t){var n=t.delta,r=t.treeScale,o=e,a=e.includes("var("),i=[];a&&(e=e.replace(Ga,(function(e){return i.push(e),"_$css"})));var c=Dn.parse(e);if(c.length>5)return o;var s=Dn.createTransformer(e),l="number"!=typeof c[0]?1:0,u=n.x.scale*r.x,d=n.y.scale*r.y;c[0+l]/=u,c[1+l]/=d;var p=yn(u,d,.5);"number"==typeof c[2+l]&&(c[2+l]/=p),"number"==typeof c[3+l]&&(c[3+l]/=p);var m=s(c);if(a){var b=0;m=m.replace("_$css",(function(){var e=i[b];return b++,e}))}return m}}},Ya=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,n,r){void 0===r&&(r={});var o=r.originBox,a=r.targetBox,i=r.visibilityAction,c=r.shouldStackAnimate,s=r.onComplete,l=r.prevParent,u=U(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=t.props,p=d.visualElement,m=d.layout;if(!1===c)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===c){c&&(t.isAnimatingTree=!0),n=o||n,e=a||e;var b=!1,f=p.getProjectionParent();if(f){var v=f.prevViewportBox,h=f.getLayoutState().layout;l&&(a&&(h=l.getLayoutState().layout),o&&!fa(l,f)&&l.prevViewportBox&&(v=l.prevViewportBox)),v&&Ja(l,o,a)&&(b=!0,n=ba(v,n),e=ba(h,e))}var g=Xa(n,e),O=Ko((function(r){var o,a;if("position"===m){var c=e[r].max-e[r].min;n[r].max=n[r].min+c}if(!p.projection.isTargetLocked)return void 0===i?g?t.animateAxis(r,e[r],n[r],F(F({},u),{isRelative:b})):(null===(a=(o=t.stopAxisAnimation)[r])||void 0===a||a.call(o),p.setProjectionTargetAxis(r,e[r].min,e[r].max,b)):void p.setVisibility(i===Va.Show)}));return p.syncRender(),Promise.all(O).then((function(){t.isAnimatingTree=!1,s&&s(),p.notifyLayoutAnimationComplete()}))}},t}return V(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=so,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)_e[t]=e[t]}(Wa)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),Ko((function(t){var n,r;return null===(r=(n=e.stopAxisAnimation)[t])||void 0===r?void 0:r.call(n)}))},t.prototype.animateAxis=function(e,t,n,r){var o,a,i=this,c=void 0===r?{}:r,s=c.transition,l=c.isRelative;if(!this.isAnimating[e]||!Qa(t,this.currentAnimationTarget[e])){null===(a=(o=this.stopAxisAnimation)[e])||void 0===a||a.call(o),this.isAnimating[e]=!0;var u=this.props.visualElement,d=this.frameTarget[e],p=u.getProjectionAnimationProgress()[e];p.clearListeners(),p.set(0),p.set(0);var m=function(){var r=p.get()/1e3;!function(e,t,n,r){e.min=yn(t.min,n.min,r),e.max=yn(t.max,n.max,r)}(d,n,t,r),u.setProjectionTargetAxis(e,d.min,d.max,l)};m();var b=p.onChange(m);this.stopAxisAnimation[e]=function(){i.isAnimating[e]=!1,p.stop(),b()},this.currentAnimationTarget[e]=t;var f=s||u.getDefaultTransition()||$a;return so("x"===e?"layoutX":"layoutY",p,1e3,f&&co(f,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(z.Component);function Xa(e,t){return!(Za(e)||Za(t)||Qa(e.x,t.x)&&Qa(e.y,t.y))}var Ka={min:0,max:0};function Za(e){return Qa(e.x,Ka)&&Qa(e.y,Ka)}function Qa(e,t){return e.min===t.min&&e.max===t.max}var $a={duration:.45,ease:[.4,0,.1,1]};function Ja(e,t,n){return e||!e&&!(t||n)}var ei={layoutReady:function(e){return e.notifyLayoutReady()}};function ti(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=void 0===t?ei:t,r=n.layoutReady,o=n.parent;Aa((function(t,n){var a=Array.from(e).sort(la),i=o?da(o):[];n((function(){H(H([],G(i)),G(a)).forEach((function(e){return e.resetTransform()}))})),t((function(){a.forEach(pa)})),n((function(){i.forEach((function(e){return e.restoreTransform()})),a.forEach(r)})),t((function(){a.forEach((function(e){e.isPresent&&(e.presence=Da.Present)}))})),n((function(){wr.preRender(),wr.render()})),t((function(){kr.postRender((function(){return a.forEach(ni)})),e.clear()}))})),Ma()}}}function ni(e){e.prevViewportBox=e.projection.target}var ri=Object(z.createContext)(ti()),oi=Object(z.createContext)(ti());function ai(e){return!!e.forceUpdate}var ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,n=e.framerSyncLayout,r=e.visualElement;ai(t)&&t.register(r),ai(n)&&n.register(r),r.onUnmount((function(){ai(t)&&t.remove(r),ai(n)&&n.remove(r)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,n=e.visualElement;return ai(t)?t.syncUpdate():(!function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(n),t.add(n)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;ai(e)||e.flush()},t.prototype.render=function(){return null},t}(q.a.Component);var ci={measureLayout:function(e){var t=Object(z.useContext)(ri),n=Object(z.useContext)(oi);return q.a.createElement(ii,F({},e,{syncLayout:t,framerSyncLayout:n}))},layoutAnimation:function(e){var t=G(te(),2)[1];return z.createElement(Ya,F({},e,{safeToRemove:t}))}};function si(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Xo(),deltaFinal:Xo(),deltaTransform:""}}var li=si();function ui(e,t,n){var r=e.x,o=e.y,a="translate3d("+r.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(n){var i=n.rotate,c=n.rotateX,s=n.rotateY;i&&(a+="rotate("+i+") "),c&&(a+="rotateX("+c+") "),s&&(a+="rotateY("+s+") ")}return a+="scale("+r.scale+", "+o.scale+")",n||a!==pi?a:""}function di(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var pi=ui(li.delta,li.treeScale,{x:1,y:1}),mi=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function bi(e,t,n,r){var o,a,i=e.delta,c=e.layout,s=e.layoutCorrected,l=e.treeScale,u=t.target;a=c,ha((o=s).x,a.x),ha(o.y,a.y),function(e,t,n){var r=n.length;if(r){var o,a;t.x=t.y=1;for(var i=0;i
=0;t--){var n=K.path[t];if(n.projection.isEnabled){e=n;break}}y=e}return y},resolveRelativeTargetBox:function(){var e=K.getProjectionParent();if(T.relativeTarget&&e&&(function(e,t){sa(e.target.x,e.relativeTarget.x,t.target.x),sa(e.target.y,e.relativeTarget.y,t.target.y)}(T,e.projection),va(e))){var t=T.target;Sa(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(f._layoutResetTransform)},pointTo:function(e){k=e.projection,C=e.getLatestValues(),null==j||j(),j=on(e.onSetAxisTarget(K.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;K.isPresent?K.presence=Da.Present:null===(e=K.layoutSafeToRemove)||void 0===e||e.call(K)})))},isPresent:!0,presence:Da.Entering});return K}};function hi(e){e.resolveRelativeTargetBox()}function gi(e){e.updateLayoutProjection()}var Oi,yi=H(["initial"],G(Po)),ji=yi.length,Ei=new Set(["width","height","top","left","right","bottom","x","y"]),_i=function(e){return Ei.has(e)},wi=function(e,t){e.set(t,!1),e.set(t)},Si=function(e){return e===Ze||e===We};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Oi||(Oi={}));var xi=function(e,t){return parseFloat(e.split(", ")[t])},Pi=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return xi(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?xi(i[1],e):0}},Ti=new Set(["x","y","z"]),ki=Se.filter((function(e){return!Ti.has(e)}));var Ci={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Pi(4,13),y:Pi(5,14)},Ai=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=F({},t),r=F({},r);var o=Object.keys(t).filter(_i),a=[],i=!1,c=[];if(o.forEach((function(o){var s=e.getValue(o);if(e.hasValue(o)){var l,u=n[o],d=t[o],p=ho(u);if(xt(d))for(var m=d.length,b=null===d[0]?1:0;b
({shortcut:e(N.store).getShortcutRepresentation("core/edit-post/toggle-sidebar"),areAdvancedSettingsOpened:"edit-post/block"===e(w.a).getActiveGeneralSidebarName()}),[]),{openGeneralSidebar:a,closeGeneralSidebar:i}=Object(b.useDispatch)(w.a),c=o?Object(f.__)("Hide more settings"):Object(f.__)("Show more settings");return Object(r.createElement)(m.MenuItem,{onClick:()=>{o?i():(a("edit-post/block"),o?Object(Ui.speak)(Object(f.__)("Block settings closed")):Object(Ui.speak)(Object(f.__)("Additional settings are now available in the Editor block settings sidebar")),e())},shortcut:n},!t&&c)};function Hi({children:e,contentRef:t,isTemplateMode:n,styles:o,style:i}){const c=Object(a.__unstableUseMouseMoveTypingReset)();return n?Object(r.createElement)(a.__unstableIframe,{head:Object(r.createElement)(a.__unstableEditorStyles,{styles:o}),ref:c,contentRef:t,style:{width:"100%",height:"100%",display:"block"}},Object(r.createElement)(a.WritingFlow,null,e)):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.__unstableEditorStyles,{styles:o}),Object(r.createElement)(a.WritingFlow,{ref:t,className:"editor-styles-wrapper",style:{flex:"1",...i},tabIndex:-1},e))}function zi({styles:e}){const{deviceType:t,isTemplateMode:n,wrapperBlockName:o,wrapperUniqueId:c}=Object(b.useSelect)(e=>{const{isEditingTemplate:t,__experimentalGetPreviewDeviceType:n}=e(w.a),{getCurrentPostId:r,getCurrentPostType:o}=e(i.store),a=t();let c;return"wp_block"===o()?c="core/block":a||(c="core/post-content"),{deviceType:n(),isTemplateMode:a,wrapperBlockName:c,wrapperUniqueId:r()}},[]),s=Object(b.useSelect)(e=>e(w.a).hasMetaBoxes(),[]),l=Object(b.useSelect)(e=>{const{getSettings:t}=e(a.store);return t().supportsLayout},[]),{clearSelectedBlock:u}=Object(b.useDispatch)(a.store),{setIsEditingTemplate:d}=Object(b.useDispatch)(w.a),p={height:"100%",width:"100%",margin:0,display:"flex",flexFlow:"column",background:"white"},h={...p,borderRadius:"2px 2px 0 0",border:"1px solid #ddd",borderBottom:0},g=Object(a.__experimentalUseResizeCanvas)(t,n),O=Object(a.useSetting)("layout"),{contentSize:y,wideSize:j}=O||{};let E,_=n?h:p;g&&(_=g),s||g||n||(E="40vh");const S=Object(r.useRef)(),x=Object(v.useMergeRefs)([S,Object(a.__unstableUseClipboardHandler)(),Object(a.__unstableUseCanvasClickRedirect)(),Object(a.__unstableUseTypewriter)(),Object(a.__unstableUseTypingObserver)(),Object(a.__unstableUseBlockSelectionClearer)()]),P=Object(a.__unstableUseBlockSelectionClearer)(),[,T]=Object(a.__experimentalUseNoRecursiveRenders)(c,o),k=Object(r.useMemo)(()=>{if(n)return{type:"default"};if(l){return{type:"default",alignments:y||j?["wide","full","left","center","right"]:["left","center","right"]}}},[n,l,y,j]);return Object(r.createElement)("div",{className:B()("edit-post-visual-editor",{"is-template-mode":n})},Object(r.createElement)(i.VisualEditorGlobalKeyboardShortcuts,null),Object(r.createElement)(a.BlockTools,{__unstableContentRef:S},Object(r.createElement)(Vi.div,{className:"edit-post-visual-editor__content-area",animate:{padding:n?"48px 48px 0":"0"},ref:P},n&&Object(r.createElement)(m.Button,{className:"edit-post-visual-editor__exit-template-mode",icon:Fi.a,onClick:()=>{u(),d(!1)}},Object(f.__)("Back")),Object(r.createElement)(Vi.div,{animate:_,initial:p},Object(r.createElement)(Hi,{isTemplateMode:n,contentRef:x,styles:e,style:{paddingBottom:E}},l&&!n&&Object(r.createElement)(a.__experimentalLayoutStyle,{selector:".edit-post-visual-editor__post-title-wrapper, .block-editor-block-list__layout.is-root-container",layout:O}),!n&&Object(r.createElement)("div",{className:"edit-post-visual-editor__post-title-wrapper"},Object(r.createElement)(i.PostTitle,null)),Object(r.createElement)(T,null,Object(r.createElement)(a.BlockList,{__experimentalLayout:k})))))),Object(r.createElement)(a.__unstableBlockSettingsMenuFirstItem,null,({onClose:e})=>Object(r.createElement)(Gi,{onClick:e})))}var qi=function(){const{getBlockSelectionStart:e}=Object(b.useSelect)(a.store),{getEditorMode:t,isEditorSidebarOpened:n,isListViewOpened:o}=Object(b.useSelect)(w.a),c=Object(b.useSelect)(e=>{const{richEditingEnabled:t,codeEditingEnabled:n}=e(i.store).getEditorSettings();return!t||!n},[]),{switchEditorMode:s,openGeneralSidebar:l,closeGeneralSidebar:u,toggleFeature:d,setIsListViewOpened:p}=Object(b.useDispatch)(w.a),{registerShortcut:m}=Object(b.useDispatch)(N.store);return Object(r.useEffect)(()=>{m({name:"core/edit-post/toggle-mode",category:"global",description:Object(f.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),m({name:"core/edit-post/toggle-fullscreen",category:"global",description:Object(f.__)("Toggle fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}}),m({name:"core/edit-post/toggle-block-navigation",category:"global",description:Object(f.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),m({name:"core/edit-post/toggle-sidebar",category:"global",description:Object(f.__)("Show or hide the settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),m({name:"core/edit-post/next-region",category:"global",description:Object(f.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),m({name:"core/edit-post/previous-region",category:"global",description:Object(f.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]}),m({name:"core/edit-post/keyboard-shortcuts",category:"main",description:Object(f.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}})},[]),Object(N.useShortcut)("core/edit-post/toggle-mode",()=>{s("visual"===t()?"text":"visual")},{bindGlobal:!0,isDisabled:c}),Object(N.useShortcut)("core/edit-post/toggle-fullscreen",()=>{d("fullscreenMode")},{bindGlobal:!0}),Object(N.useShortcut)("core/edit-post/toggle-sidebar",t=>{if(t.preventDefault(),n())u();else{const t=e()?"edit-post/block":"edit-post/document";l(t)}},{bindGlobal:!0}),Object(N.useShortcut)("core/edit-post/toggle-block-navigation",()=>p(!o()),{bindGlobal:!0}),null};const Wi=[{keyCombination:{modifier:"primary",character:"b"},description:Object(f.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:Object(f.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:Object(f.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:Object(f.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:Object(f.__)("Underline the selected text.")}];function Yi({keyCombination:e,forceAriaLabel:t}){const n=e.modifier?x.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?x.shortcutAriaLabel[e.modifier](e.character):e.character;return Object(r.createElement)("kbd",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||o},Object(d.castArray)(n).map((e,t)=>"+"===e?Object(r.createElement)(r.Fragment,{key:t},e):Object(r.createElement)("kbd",{key:t,className:"edit-post-keyboard-shortcut-help-modal__shortcut-key"},e)))}var Xi=function({description:e,keyCombination:t,aliases:n=[],ariaLabel:o}){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-description"},e),Object(r.createElement)("div",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-term"},Object(r.createElement)(Yi,{keyCombination:t,forceAriaLabel:o}),n.map((e,t)=>Object(r.createElement)(Yi,{keyCombination:e,forceAriaLabel:o,key:t}))))};var Ki=function({name:e}){const{keyCombination:t,description:n,aliases:o}=Object(b.useSelect)(t=>{const{getShortcutKeyCombination:n,getShortcutDescription:r,getShortcutAliases:o}=t(N.store);return{keyCombination:n(e),aliases:o(e),description:r(e)}});return t?Object(r.createElement)(Xi,{keyCombination:t,description:n,aliases:o}):null};const Zi="edit-post/keyboard-shortcut-help",Qi=({shortcuts:e})=>Object(r.createElement)("ul",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-list",role:"list"},e.map((e,t)=>Object(r.createElement)("li",{className:"edit-post-keyboard-shortcut-help-modal__shortcut",key:t},Object(d.isString)(e)?Object(r.createElement)(Ki,{name:e}):Object(r.createElement)(Xi,e)))),$i=({title:e,shortcuts:t,className:n})=>Object(r.createElement)("section",{className:B()("edit-post-keyboard-shortcut-help-modal__section",n)},!!e&&Object(r.createElement)("h2",{className:"edit-post-keyboard-shortcut-help-modal__section-title"},e),Object(r.createElement)(Qi,{shortcuts:t})),Ji=({title:e,categoryName:t,additionalShortcuts:n=[]})=>{const o=Object(b.useSelect)(e=>e(N.store).getCategoryShortcuts(t),[t]);return Object(r.createElement)($i,{title:e,shortcuts:o.concat(n)})};var ec=Object(v.compose)([Object(b.withSelect)(e=>({isModalActive:e(w.a).isModalActive(Zi)})),Object(b.withDispatch)((e,{isModalActive:t})=>{const{openModal:n,closeModal:r}=e(w.a);return{toggleModal:()=>t?r():n(Zi)}})])((function({isModalActive:e,toggleModal:t}){return Object(N.useShortcut)("core/edit-post/keyboard-shortcuts",t,{bindGlobal:!0}),e?Object(r.createElement)(m.Modal,{className:"edit-post-keyboard-shortcut-help-modal",title:Object(f.__)("Keyboard shortcuts"),closeLabel:Object(f.__)("Close"),onRequestClose:t},Object(r.createElement)($i,{className:"edit-post-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-post/keyboard-shortcuts"]}),Object(r.createElement)(Ji,{title:Object(f.__)("Global shortcuts"),categoryName:"global"}),Object(r.createElement)(Ji,{title:Object(f.__)("Selection shortcuts"),categoryName:"selection"}),Object(r.createElement)(Ji,{title:Object(f.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:Object(f.__)("Change the block type after adding a new paragraph."),ariaLabel:Object(f.__)("Forward-slash")}]}),Object(r.createElement)($i,{title:Object(f.__)("Text formatting"),shortcuts:Wi})):null}));var tc=function({blockTypes:e,value:t,onItemChange:n}){return Object(r.createElement)("ul",{className:"edit-post-manage-blocks-modal__checklist"},e.map(e=>Object(r.createElement)("li",{key:e.name,className:"edit-post-manage-blocks-modal__checklist-item"},Object(r.createElement)(m.CheckboxControl,{label:Object(r.createElement)(r.Fragment,null,e.title,Object(r.createElement)(a.BlockIcon,{icon:e.icon})),checked:t.includes(e.name),onChange:Object(d.partial)(n,e.name)}))))};var nc=Object(r.createContext)({});var rc=Object(v.compose)([v.withInstanceId,Object(b.withSelect)(e=>{const{getPreference:t}=e(w.a);return{hiddenBlockTypes:t("hiddenBlockTypes")}}),Object(b.withDispatch)((e,t)=>{const{showBlockTypes:n,hideBlockTypes:r}=e(w.a);return{toggleVisible(e,t){t?n(e):r(e)},toggleAllVisible(e){const o=Object(d.map)(t.blockTypes,"name");e?n(o):r(o)}}})])((function({instanceId:e,title:t,blockTypes:n,hiddenBlockTypes:o,toggleVisible:a,toggleAllVisible:i}){const c=Object(r.useContext)(nc),{allowedBlockTypes:s}=c,l=Object(r.useMemo)(()=>!0===s?n:n.filter(({name:e})=>Object(d.includes)(s||[],e)),[s,n]);if(!l.length)return null;const u=Object(d.without)(Object(d.map)(l,"name"),...o),p="edit-post-manage-blocks-modal__category-title-"+e,b=u.length===l.length;let f;return f=b?"true":u.length>0?"mixed":"false",Object(r.createElement)("div",{role:"group","aria-labelledby":p,className:"edit-post-manage-blocks-modal__category"},Object(r.createElement)(m.CheckboxControl,{checked:b,onChange:i,className:"edit-post-manage-blocks-modal__category-title","aria-checked":f,label:Object(r.createElement)("span",{id:p},t)}),Object(r.createElement)(tc,{blockTypes:l,value:u,onItemChange:a}))}));var oc=Object(v.compose)([Object(v.withState)({search:""}),Object(b.withSelect)(e=>{const{getBlockTypes:t,getCategories:n,hasBlockSupport:r,isMatchingSearchTerm:o}=e(p.store),{getPreference:a}=e(w.a),i=a("hiddenBlockTypes"),c=Object(d.isArray)(i)&&i.length;return{blockTypes:t(),categories:n(),hasBlockSupport:r,isMatchingSearchTerm:o,numberOfHiddenBlocks:c}})])((function({search:e,setState:t,blockTypes:n,categories:o,hasBlockSupport:a,isMatchingSearchTerm:i,numberOfHiddenBlocks:c}){return n=n.filter(t=>a(t,"inserter",!0)&&(!e||i(t,e))&&(!t.parent||Object(d.includes)(t.parent,"core/post-content"))),Object(r.createElement)("div",{className:"edit-post-manage-blocks-modal__content"},Object(r.createElement)(m.TextControl,{type:"search",label:Object(f.__)("Search for a block"),value:e,onChange:e=>t({search:e}),className:"edit-post-manage-blocks-modal__search"}),!!c&&Object(r.createElement)("div",{className:"edit-post-manage-blocks-modal__disabled-blocks-count"},Object(f.sprintf)(Object(f._n)("%d block is disabled.","%d blocks are disabled.",c),c)),Object(r.createElement)("div",{tabIndex:"0",role:"region","aria-label":Object(f.__)("Available block types"),className:"edit-post-manage-blocks-modal__results"},0===n.length&&Object(r.createElement)("p",{className:"edit-post-manage-blocks-modal__no-results"},Object(f.__)("No blocks found.")),o.map(e=>Object(r.createElement)(rc,{key:e.slug,title:e.title,blockTypes:Object(d.filter)(n,{category:e.slug})})),Object(r.createElement)(rc,{title:Object(f.__)("Uncategorized"),blockTypes:Object(d.filter)(n,({category:e})=>!e)})))}));var ac=Object(v.compose)([Object(b.withSelect)(e=>{const{isModalActive:t}=e(w.a);return{isActive:t("edit-post/manage-blocks")}}),Object(b.withDispatch)(e=>{const{closeModal:t}=e(w.a);return{closeModal:t}})])((function({isActive:e,closeModal:t}){return e?Object(r.createElement)(m.Modal,{className:"edit-post-manage-blocks-modal",title:Object(f.__)("Block Manager"),closeLabel:Object(f.__)("Close"),onRequestClose:t},Object(r.createElement)(oc,null)):null}));var ic=({description:e,title:t,children:n})=>Object(r.createElement)("section",{className:"edit-post-preferences-modal__section"},Object(r.createElement)("h2",{className:"edit-post-preferences-modal__section-title"},t),e&&Object(r.createElement)("p",{className:"edit-post-preferences-modal__section-description"},e),n),cc=n("Y5n4");var sc=Object(b.withSelect)(e=>{const{getEditorSettings:t}=e("core/editor"),{getAllMetaBoxes:n}=e(w.a);return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:n()}})((function({areCustomFieldsRegistered:e,metaBoxes:t,...n}){const o=Object(d.filter)(t,({id:e})=>"postcustom"!==e);return e||0!==o.length?Object(r.createElement)(ic,n,e&&Object(r.createElement)(cc.a,{label:Object(f.__)("Custom fields")}),Object(d.map)(o,({id:e,title:t})=>Object(r.createElement)(cc.c,{key:e,label:t,panelName:"meta-box-"+e}))):null}));function lc(){const e=Object(v.useViewportMatch)("medium"),{closeModal:t}=Object(b.useDispatch)(w.a),{isModalActive:n,isViewable:a}=Object(b.useSelect)(e=>{const{getEditedPostAttribute:t}=e(i.store),{getPostType:n}=e(o.store),r=n(t("type"));return{isModalActive:e(w.a).isModalActive("edit-post/preferences"),isViewable:Object(d.get)(r,["viewable"],!1)}},[]),c=Object(b.useSelect)(t=>{const{getEditorSettings:n}=t(i.store),{getEditorMode:r,isFeatureActive:o}=t(w.a),a=r(),c=n().richEditingEnabled;return!o("reducedUI")&&e&&c&&"visual"===a},[e]),s=Object(r.useMemo)(()=>[{name:"general",tabLabel:Object(f.__)("General"),content:Object(r.createElement)(r.Fragment,null,e&&Object(r.createElement)(ic,{title:Object(f.__)("Choose your own experience")},Object(r.createElement)(cc.e,{help:Object(f.__)("Review settings such as categories and tags."),label:Object(f.__)("Include pre-publish checklist")})),Object(r.createElement)(ic,{title:Object(f.__)("Decide what to focus on")},Object(r.createElement)(cc.b,{featureName:"reducedUI",help:Object(f.__)("Compacts options and outlines in the toolbar."),label:Object(f.__)("Reduce the interface")}),Object(r.createElement)(cc.b,{featureName:"focusMode",help:Object(f.__)("Highlights the current block and fades other content."),label:Object(f.__)("Spotlight mode")}),c&&Object(r.createElement)(cc.b,{featureName:"showBlockBreadcrumbs",help:Object(f.__)("Shows block breadcrumbs at the bottom of the editor."),label:Object(f.__)("Display block breadcrumbs")})))},{name:"appearance",tabLabel:Object(f.__)("Appearance"),content:Object(r.createElement)(ic,{title:Object(f.__)("Choose the way it looks")},Object(r.createElement)(cc.b,{featureName:"showIconLabels",help:Object(f.__)("Shows text instead of icons in toolbar."),label:Object(f.__)("Display button labels")}),Object(r.createElement)(cc.b,{featureName:"themeStyles",help:Object(f.__)("Make the editor look like your theme."),label:Object(f.__)("Use theme styles")}))},{name:"blocks",tabLabel:Object(f.__)("Blocks"),content:Object(r.createElement)(ic,{title:Object(f.__)("Choose how you interact with blocks")},Object(r.createElement)(cc.b,{featureName:"mostUsedBlocks",help:Object(f.__)("Places the most frequent blocks in the block library."),label:Object(f.__)("Show most used blocks")}),Object(r.createElement)(cc.b,{featureName:"keepCaretInsideBlock",help:Object(f.__)("Aids screen readers by stopping text caret from leaving blocks."),label:Object(f.__)("Contain text cursor inside block")}))},{name:"panels",tabLabel:Object(f.__)("Panels"),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(ic,{title:Object(f.__)("Document settings"),description:Object(f.__)("Choose what displays in the panel.")},Object(r.createElement)(cc.d.Slot,null),a&&Object(r.createElement)(cc.c,{label:Object(f.__)("Permalink"),panelName:"post-link"}),a&&Object(r.createElement)(cc.c,{label:Object(f.__)("Template"),panelName:"template"}),Object(r.createElement)(i.PostTaxonomies,{taxonomyWrapper:(e,t)=>Object(r.createElement)(cc.c,{label:Object(d.get)(t,["labels","menu_name"]),panelName:"taxonomy-panel-"+t.slug})}),Object(r.createElement)(i.PostFeaturedImageCheck,null,Object(r.createElement)(cc.c,{label:Object(f.__)("Featured image"),panelName:"featured-image"})),Object(r.createElement)(i.PostExcerptCheck,null,Object(r.createElement)(cc.c,{label:Object(f.__)("Excerpt"),panelName:"post-excerpt"})),Object(r.createElement)(i.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},Object(r.createElement)(cc.c,{label:Object(f.__)("Discussion"),panelName:"discussion-panel"})),Object(r.createElement)(i.PageAttributesCheck,null,Object(r.createElement)(cc.c,{label:Object(f.__)("Page attributes"),panelName:"page-attributes"}))),Object(r.createElement)(ic,{title:Object(f.__)("Additional"),description:Object(f.__)("Add extra areas to the editor.")},Object(r.createElement)(sc,null)))}],[a,e,c]),[l,u]=Object(r.useState)("preferences-menu"),{tabs:p,sectionsContentMap:h}=Object(r.useMemo)(()=>s.reduce((e,{name:t,tabLabel:n,content:r})=>(e.tabs.push({name:t,title:n}),e.sectionsContentMap[t]=r,e),{tabs:[],sectionsContentMap:{}}),[s]),g=Object(r.useCallback)(e=>h[e.name]||null,[h]);if(!n)return null;let O;return O=e?Object(r.createElement)(m.TabPanel,{className:"edit-post-preferences__tabs",tabs:p,initialTabName:"preferences-menu"!==l?l:void 0,onSelect:u,orientation:"vertical"},g):Object(r.createElement)(m.__experimentalNavigation,{activeMenu:l,onActivateMenu:u},Object(r.createElement)(m.__experimentalNavigationMenu,{menu:"preferences-menu"},p.map(e=>Object(r.createElement)(m.__experimentalNavigationItem,{key:e.name,title:e.title,navigateToMenu:e.name}))),s.map(e=>Object(r.createElement)(m.__experimentalNavigationMenu,{key:e.name+"-menu",menu:e.name,title:e.tabLabel,parentMenu:"preferences-menu"},Object(r.createElement)(m.__experimentalNavigationItem,null,e.content)))),Object(r.createElement)(m.Modal,{className:"edit-post-preferences-modal",title:Object(f.__)("Preferences"),closeLabel:Object(f.__)("Close"),onRequestClose:t},O)}class uc extends r.Component{constructor(){super(...arguments),this.state={historyId:null}}componentDidUpdate(e){const{postId:t,postStatus:n,postType:r,isSavingPost:o}=this.props,{historyId:a}=this.state;"trash"!==n||o?t===e.postId&&t===a||"auto-draft"===n||!t||this.setBrowserURL(t):this.setTrashURL(t,r)}setTrashURL(e,t){window.location.href=function(e,t){return Object(j.addQueryArgs)("edit.php",{trashed:1,post_type:t,ids:e})}(e,t)}setBrowserURL(e){window.history.replaceState({id:e},"Post "+e,function(e){return Object(j.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState(()=>({historyId:e}))}render(){return null}}var dc=Object(b.withSelect)(e=>{const{getCurrentPost:t,isSavingPost:n}=e("core/editor"),r=t();let{id:o,status:a,type:i}=r;return["wp_template","wp_template_part"].includes(i)&&(o=r.wp_id),{postId:o,postStatus:a,postType:i,isSavingPost:n()}})(uc),pc=n("wduq");var mc=function({showTooltip:e,icon:t,href:n}){const{isActive:o,isRequestingSiteIcon:a,postType:i,siteIconUrl:c}=Object(b.useSelect)(e=>{const{getCurrentPostType:t}=e("core/editor"),{isFeatureActive:n}=e(w.a),{isResolving:r}=e("core/data"),{getEntityRecord:o,getPostType:a}=e("core"),i=o("root","__unstableBase",void 0)||{};return{isActive:n("fullscreenMode"),isRequestingSiteIcon:r("core","getEntityRecord",["root","__unstableBase",void 0]),postType:a(t()),siteIconUrl:i.site_icon_url}},[]);if(!o||!i)return null;let s=Object(r.createElement)(m.Icon,{size:"36px",icon:pc.a});return c&&(s=Object(r.createElement)("img",{alt:Object(f.__)("Site Icon"),className:"edit-post-fullscreen-mode-close_site-icon",src:c})),a&&(s=null),t&&(s=Object(r.createElement)(m.Icon,{size:"36px",icon:t})),Object(r.createElement)(m.Button,{className:"edit-post-fullscreen-mode-close has-icon",href:null!=n?n:Object(j.addQueryArgs)("edit.php",{post_type:i.slug}),label:Object(d.get)(i,["labels","view_items"],Object(f.__)("Back")),showTooltip:e},s)},bc=n("OzlF"),fc=n("Q4Sy");var vc=function(){const e=Object(r.useRef)(),{setIsInserterOpened:t,setIsListViewOpened:n}=Object(b.useDispatch)(w.a),{isInserterEnabled:o,isInserterOpened:c,isTextModeEnabled:s,showIconLabels:l,isListViewOpen:u,listViewShortcut:d}=Object(b.useSelect)(e=>{const{hasInserterItems:t,getBlockRootClientId:n,getBlockSelectionEnd:r}=e(a.store),{getEditorSettings:o}=e(i.store),{getEditorMode:c,isFeatureActive:s,isListViewOpened:l}=e(w.a),{getShortcutRepresentation:u}=e(N.store);return{isInserterEnabled:"visual"===c()&&o().richEditingEnabled&&t(n(r())),isInserterOpened:e(w.a).isInserterOpened(),isTextModeEnabled:"text"===c(),showIconLabels:s("showIconLabels"),isListViewOpen:l(),listViewShortcut:u("core/edit-post/toggle-block-navigation")}},[]),p=Object(v.useViewportMatch)("medium"),h=Object(v.useViewportMatch)("wide"),g=Object(f.__)("Document tools"),O=Object(r.createElement)(r.Fragment,null,Object(r.createElement)(m.ToolbarItem,{as:i.TableOfContents,hasOutlineItemsDisabled:s,repositionDropdown:l&&!h,showTooltip:!l,isTertiary:l}),Object(r.createElement)(m.ToolbarItem,{as:m.Button,className:"edit-post-header-toolbar__list-view-toggle",icon:bc.a,disabled:s,isPressed:u,label:Object(f.__)("List View"),onClick:()=>n(!u),shortcut:d,showTooltip:!l}));return Object(r.createElement)(a.NavigableToolbar,{className:"edit-post-header-toolbar","aria-label":g},Object(r.createElement)("div",{className:"edit-post-header-toolbar__left"},Object(r.createElement)(m.ToolbarItem,{ref:e,as:m.Button,className:"edit-post-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:c,onMouseDown:e=>{e.preventDefault()},onClick:()=>{c?e.current.focus():t(!0)},disabled:!o,icon:fc.a,label:Object(f._x)("Toggle block inserter","Generic label for block inserter button"),showTooltip:!l},l&&Object(f.__)("Add")),(h||!l)&&Object(r.createElement)(r.Fragment,null,p&&Object(r.createElement)(m.ToolbarItem,{as:a.ToolSelector,showTooltip:!l,isTertiary:l,disabled:s}),Object(r.createElement)(m.ToolbarItem,{as:i.EditorHistoryUndo,showTooltip:!l,isTertiary:l}),Object(r.createElement)(m.ToolbarItem,{as:i.EditorHistoryRedo,showTooltip:!l,isTertiary:l}),O)))},hc=n("VKE3");const gc=[{value:"visual",label:Object(f.__)("Visual editor")},{value:"text",label:Object(f.__)("Code editor")}];var Oc=function(){const{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:n,mode:o}=Object(b.useSelect)(e=>({shortcut:e(N.store).getShortcutRepresentation("core/edit-post/toggle-mode"),isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled,isCodeEditingEnabled:e("core/editor").getEditorSettings().codeEditingEnabled,mode:e(w.a).getEditorMode()}),[]),{switchEditorMode:a}=Object(b.useDispatch)(w.a);if(!t||!n)return null;const i=gc.map(t=>t.value!==o?{...t,shortcut:e}:t);return Object(r.createElement)(m.MenuGroup,{label:Object(f.__)("Editor")},Object(r.createElement)(m.MenuItemsChoice,{choices:i,value:o,onSelect:a}))};function yc(){const{openModal:e}=Object(b.useDispatch)(w.a);return Object(r.createElement)(m.MenuItem,{onClick:()=>{e("edit-post/preferences")}},Object(f.__)("Preferences"))}var jc=n("RMJe");var Ec=Object(v.compose)([Object(b.withSelect)((e,{feature:t})=>({isActive:e(w.a).isFeatureActive(t)})),Object(b.withDispatch)((e,t)=>({onToggle(){e(w.a).toggleFeature(t.feature)}}))])((function({onToggle:e,isActive:t,label:n,info:o,messageActivated:a,messageDeactivated:i,shortcut:c}){return Object(r.createElement)(m.MenuItem,{icon:t&&jc.a,isSelected:t,onClick:Object(d.flow)(e,()=>{t?Object(Ui.speak)(i||Object(f.__)("Feature deactivated")):Object(Ui.speak)(a||Object(f.__)("Feature activated"))}),role:"menuitemcheckbox",info:o,shortcut:c},n)}));var _c=function(){return Object(v.useViewportMatch)("medium")?Object(r.createElement)(m.MenuGroup,{label:Object(f._x)("View","noun")},Object(r.createElement)(Ec,{feature:"fixedToolbar",label:Object(f.__)("Top toolbar"),info:Object(f.__)("Access all block and document tools in a single place"),messageActivated:Object(f.__)("Top toolbar activated"),messageDeactivated:Object(f.__)("Top toolbar deactivated")}),Object(r.createElement)(Ec,{feature:"focusMode",label:Object(f.__)("Spotlight mode"),info:Object(f.__)("Focus on one block at a time"),messageActivated:Object(f.__)("Spotlight mode activated"),messageDeactivated:Object(f.__)("Spotlight mode deactivated")}),Object(r.createElement)(Ec,{feature:"fullscreenMode",label:Object(f.__)("Fullscreen mode"),info:Object(f.__)("Work without distraction"),messageActivated:Object(f.__)("Fullscreen mode activated"),messageDeactivated:Object(f.__)("Fullscreen mode deactivated"),shortcut:x.displayShortcut.secondary("f")})):null};const wc={className:"edit-post-more-menu__content",position:"bottom left"},Sc={tooltipPosition:"bottom"};var xc=({showIconLabels:e})=>{const t=Object(v.useViewportMatch)("large");return Object(r.createElement)(m.DropdownMenu,{className:"edit-post-more-menu",icon:hc.a,label:Object(f.__)("Options"),popoverProps:wc,toggleProps:{showTooltip:!e,isTertiary:e,...Sc}},({onClose:n})=>Object(r.createElement)(r.Fragment,null,e&&!t&&Object(r.createElement)(L.f.Slot,{className:e&&"show-icon-labels",scope:"core/edit-post"}),Object(r.createElement)(_c,null),Object(r.createElement)(Oc,null),Object(r.createElement)(L.a.Slot,{name:"core/edit-post/plugin-more-menu",label:Object(f.__)("Plugins"),as:m.MenuGroup,fillProps:{onClick:n}}),Object(r.createElement)(C.Slot,{fillProps:{onClose:n}}),Object(r.createElement)(m.MenuGroup,null,Object(r.createElement)(yc,null))))};var Pc=Object(v.compose)(Object(b.withSelect)(e=>({hasPublishAction:Object(d.get)(e("core/editor").getCurrentPost(),["_links","wp:action-publish"],!1),isBeingScheduled:e("core/editor").isEditedPostBeingScheduled(),isPending:e("core/editor").isCurrentPostPending(),isPublished:e("core/editor").isCurrentPostPublished(),isPublishSidebarEnabled:e("core/editor").isPublishSidebarEnabled(),isPublishSidebarOpened:e(w.a).isPublishSidebarOpened(),isScheduled:e("core/editor").isCurrentPostScheduled()})),Object(b.withDispatch)(e=>{const{togglePublishSidebar:t}=e(w.a);return{togglePublishSidebar:t}}))((function({forceIsDirty:e,forceIsSaving:t,hasPublishAction:n,isBeingScheduled:o,isPending:a,isPublished:c,isPublishSidebarEnabled:s,isPublishSidebarOpened:l,isScheduled:u,togglePublishSidebar:d,setEntitiesSavedStatesCallback:p}){const m=Object(v.useViewportMatch)("medium","<");let b;return b=c||u&&o||a&&!n&&!m?"button":m||s?"toggle":"button",Object(r.createElement)(i.PostPublishButton,{forceIsDirty:e,forceIsSaving:t,isOpen:l,isToggle:"toggle"===b,onToggle:d,setEntitiesSavedStatesCallback:p})}));function Tc(){const{hasActiveMetaboxes:e,isPostSaveable:t,isSaving:n,deviceType:o}=Object(b.useSelect)(e=>({hasActiveMetaboxes:e(w.a).hasMetaBoxes(),isSaving:e(w.a).isSavingMetaBoxes(),isPostSaveable:e("core/editor").isEditedPostSaveable(),deviceType:e(w.a).__experimentalGetPreviewDeviceType()}),[]),{__experimentalSetPreviewDeviceType:c}=Object(b.useDispatch)(w.a);return Object(r.createElement)(a.__experimentalPreviewOptions,{isEnabled:t,className:"edit-post-post-preview-dropdown",deviceType:o,setDeviceType:c},Object(r.createElement)(m.MenuGroup,null,Object(r.createElement)("div",{className:"edit-post-header-preview__grouping-external"},Object(r.createElement)(i.PostPreviewButton,{className:"edit-post-header-preview__button-external",role:"menuitem",forceIsAutosaveable:e,forcePreviewLink:n?null:void 0,textContent:Object(r.createElement)(r.Fragment,null,Object(f.__)("Preview in new tab"),Object(r.createElement)(m.Icon,{icon:O.a}))}))))}const kc="__experimentalMainDashboardButton",{Fill:Cc,Slot:Ac}=Object(m.createSlotFill)(kc),Mc=Cc;Mc.Slot=({children:e})=>{const t=Object(m.__experimentalUseSlot)(kc);return Boolean(t.fills&&t.fills.length)?Object(r.createElement)(Ac,{bubblesVirtually:!0}):e};var Ic=Mc,Bc=n("NWDH");function Lc(){const{clearSelectedBlock:e}=Object(b.useDispatch)(a.store),{setIsEditingTemplate:t}=Object(b.useDispatch)(w.a),{getEditorSettings:n}=Object(b.useSelect)(i.store),{updateEditorSettings:c,editPost:s}=Object(b.useDispatch)(i.store),{deleteEntityRecord:l}=Object(b.useDispatch)(o.store),{template:u}=Object(b.useSelect)(e=>{const{isEditingTemplate:t,getEditedPostTemplate:n}=e(w.a);return{template:t()?n():null}},[]);if(!u||!u.wp_id)return null;let p=u.slug;return null!=u&&u.title&&(p=u.title),Object(r.createElement)(m.MenuGroup,{className:"edit-post-template-top-area__second-menu-group"},Object(r.createElement)(m.MenuItem,{className:"edit-post-template-top-area__delete-template-button",isDestructive:!0,isSecondary:!0,"aria-label":Object(f.__)("Delete template"),onClick:()=>{if(window.confirm(Object(f.sprintf)(Object(f.__)("Are you sure you want to delete the %s template? It may be used by other pages or posts."),p))){e(),t(!1),s({template:""});const r=n(),o=Object(d.pickBy)(r.availableTemplates,(e,t)=>t!==u.slug);c({...r,availableTemplates:o}),l("postType","wp_template",u.id)}}},Object(f.__)("Delete template")))}function Nc(){const{template:e}=Object(b.useSelect)(e=>{const{getEditedPostTemplate:t}=e(w.a);return{template:t()}},[]),{editEntityRecord:t}=Object(b.useDispatch)(o.store),{getEditorSettings:n}=Object(b.useSelect)(i.store),{updateEditorSettings:a}=Object(b.useDispatch)(i.store);let c=Object(f.__)("Default");return null!=e&&e.title?c=e.title:e&&(c=e.slug),Object(r.createElement)(m.TextControl,{label:Object(f.__)("Title"),value:c,help:Object(f.__)('Give the template a title that indicates its purpose, e.g. "Full Width".'),onChange:r=>{const o=n(),i=Object(d.mapValues)(o.availableTemplates,(t,n)=>n!==e.slug?t:r);a({...o,availableTemplates:i}),t("postType","wp_template",e.id,{title:r})}})}function Rc(){const{description:e}=Object(b.useSelect)(e=>{const{getEditedPostTemplate:t}=e(w.a);return{description:t().description}},[]);return e?Object(r.createElement)(m.__experimentalText,{size:"body"},e):null}var Dc=function(){const{template:e,isEditing:t,title:n}=Object(b.useSelect)(e=>{const{isEditingTemplate:t,getEditedPostTemplate:n}=e(w.a),{getEditedPostAttribute:r}=e(i.store),o=t();return{template:o?n():null,isEditing:o,title:r("title")}},[]),{clearSelectedBlock:o}=Object(b.useDispatch)(a.store),{setIsEditingTemplate:c}=Object(b.useDispatch)(w.a);if(!t||!e)return null;let s=Object(f.__)("Default");return null!=e&&e.title?s=e.title:e&&(s=e.slug),Object(r.createElement)("div",{className:"edit-post-template-top-area"},Object(r.createElement)(m.Button,{className:"edit-post-template-post-title",isLink:!0,showTooltip:!0,label:Object(f.sprintf)(Object(f.__)("Edit %s"),n),onClick:()=>{o(),c(!1)}},n),Object(r.createElement)(m.Dropdown,{position:"bottom center",contentClassName:"edit-post-template-top-area__popover",renderToggle:({onToggle:e})=>Object(r.createElement)(m.Button,{className:"edit-post-template-title",isLink:!0,icon:Bc.a,showTooltip:!0,onClick:e,label:Object(f.__)("Template Options")},s),renderContent:()=>Object(r.createElement)(r.Fragment,null,e.has_theme_file?Object(r.createElement)(Rc,null):Object(r.createElement)(Nc,null),Object(r.createElement)(Lc,null))}))};var Vc=function({setEntitiesSavedStatesCallback:e}){const{hasActiveMetaboxes:t,isPublishSidebarOpened:n,isSaving:o,showIconLabels:a,hasReducedUI:c}=Object(b.useSelect)(e=>({hasActiveMetaboxes:e(w.a).hasMetaBoxes(),isPublishSidebarOpened:e(w.a).isPublishSidebarOpened(),isSaving:e(w.a).isSavingMetaBoxes(),showIconLabels:e(w.a).isFeatureActive("showIconLabels"),hasReducedUI:e(w.a).isFeatureActive("reducedUI")}),[]),s=Object(v.useViewportMatch)("large"),l=B()("edit-post-header",{"has-reduced-ui":c});return Object(r.createElement)("div",{className:l},Object(r.createElement)(Ic.Slot,null,Object(r.createElement)(mc,null)),Object(r.createElement)("div",{className:"edit-post-header__toolbar"},Object(r.createElement)(vc,null),Object(r.createElement)(Dc,null)),Object(r.createElement)("div",{className:"edit-post-header__settings"},!n&&Object(r.createElement)(i.PostSavedState,{forceIsDirty:t,forceIsSaving:o,showIconLabels:a}),Object(r.createElement)(Tc,null),Object(r.createElement)(i.PostPreviewButton,{forceIsAutosaveable:t,forcePreviewLink:o?null:void 0}),Object(r.createElement)(Pc,{forceIsDirty:t,forceIsSaving:o,setEntitiesSavedStatesCallback:e}),(s||!a)&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L.f.Slot,{scope:"core/edit-post"}),Object(r.createElement)(xc,{showIconLabels:a})),a&&!s&&Object(r.createElement)(xc,{showIconLabels:a})))},Fc=n("w95h");function Uc(){const{insertionPoint:e,showMostUsedBlocks:t}=Object(b.useSelect)(e=>{const{isFeatureActive:t,__experimentalGetInsertionPoint:n}=e(w.a);return{insertionPoint:n(),showMostUsedBlocks:t("mostUsedBlocks")}},[]),{setIsInserterOpened:n}=Object(b.useDispatch)(w.a),o=Object(v.useViewportMatch)("medium","<"),[i,c]=Object(v.__experimentalUseDialog)({onClose:()=>n(!1)});return Object(r.createElement)("div",Object(u.a)({ref:i},c,{className:"edit-post-editor__inserter-panel"}),Object(r.createElement)("div",{className:"edit-post-editor__inserter-panel-header"},Object(r.createElement)(m.Button,{icon:Fc.a,onClick:()=>n(!1)})),Object(r.createElement)("div",{className:"edit-post-editor__inserter-panel-content"},Object(r.createElement)(a.__experimentalLibrary,{showMostUsedBlocks:t,showInserterHelpPanel:!0,shouldFocusBlock:o,rootClientId:e.rootClientId,__experimentalInsertionIndex:e.insertionIndex})))}var Gc=n("bWcr");function Hc(){const{setIsListViewOpened:e}=Object(b.useDispatch)(w.a),{clearSelectedBlock:t,selectBlock:n}=Object(b.useDispatch)(a.store);const o=Object(v.useFocusOnMount)("firstElement"),i=Object(v.useFocusReturn)();const c="edit-post-editor__list-view-panel-label-"+Object(v.useInstanceId)(Hc);return Object(r.createElement)("div",{"aria-labelledby":c,className:"edit-post-editor__list-view-panel",onKeyDown:function(t){t.keyCode===x.ESCAPE&&(t.stopPropagation(),e(!1))}},Object(r.createElement)("div",{className:"edit-post-editor__list-view-panel-header"},Object(r.createElement)("strong",{id:c},Object(f.__)("List view")),Object(r.createElement)(m.Button,{icon:Gc.a,label:Object(f.__)("Close list view sidebar"),onClick:()=>e(!1)})),Object(r.createElement)("div",{className:"edit-post-editor__list-view-panel-content",ref:Object(v.useMergeRefs)([i,o])},Object(r.createElement)(a.__experimentalBlockNavigationTree,{onSelect:async function(e){await t(),n(e,-1)},showNestedBlocks:!0,__experimentalPersistentListViewFeatures:!0})))}var zc=n("Cg8A");var qc=({sidebarName:e})=>{const{openGeneralSidebar:t}=Object(b.useDispatch)(w.a),n=()=>t("edit-post/document"),{documentLabel:o,isTemplateMode:a}=Object(b.useSelect)(e=>{var t,n;const r=e("core/editor").getCurrentPostType(),o=e("core").getPostType(r);return{documentLabel:null!==(t=null==o||null===(n=o.labels)||void 0===n?void 0:n.singular_name)&&void 0!==t?t:Object(f.__)("Document"),isTemplateMode:e(w.a).isEditingTemplate()}},[]),[i,c]="edit-post/document"===e?[Object(f.sprintf)(Object(f.__)("%s (selected)"),o),"is-active"]:[o,""],[s,l]="edit-post/block"===e?[Object(f.__)("Block (selected)"),"is-active"]:[Object(f.__)("Block"),""],[u,d]="edit-post/document"===e?[Object(f.__)("Template (selected)"),"is-active"]:[Object(f.__)("Template"),""];return Object(r.createElement)("ul",null,!a&&Object(r.createElement)("li",null,Object(r.createElement)(m.Button,{onClick:n,className:"edit-post-sidebar__panel-tab "+c,"aria-label":i,"data-label":o},o)),a&&Object(r.createElement)("li",null,Object(r.createElement)(m.Button,{onClick:n,className:"edit-post-sidebar__panel-tab "+d,"aria-label":u,"data-label":Object(f.__)("Template")},Object(f.__)("Template"))),Object(r.createElement)("li",null,Object(r.createElement)(m.Button,{onClick:()=>t("edit-post/block"),className:"edit-post-sidebar__panel-tab "+l,"aria-label":s,"data-label":Object(f.__)("Block")},Object(f.__)("Block"))))};var Wc=function(){return Object(r.createElement)(i.PostVisibilityCheck,{render:({canEdit:e})=>Object(r.createElement)(m.PanelRow,{className:"edit-post-post-visibility"},Object(r.createElement)("span",null,Object(f.__)("Visibility")),!e&&Object(r.createElement)("span",null,Object(r.createElement)(i.PostVisibilityLabel,null)),e&&Object(r.createElement)(m.Dropdown,{position:"bottom left",contentClassName:"edit-post-post-visibility__dialog",renderToggle:({isOpen:e,onToggle:t})=>Object(r.createElement)(m.Button,{"aria-expanded":e,className:"edit-post-post-visibility__toggle",onClick:t,isTertiary:!0},Object(r.createElement)(i.PostVisibilityLabel,null)),renderContent:()=>Object(r.createElement)(i.PostVisibility,null)}))})};function Yc(){return Object(r.createElement)(i.PostTrashCheck,null,Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostTrash,null)))}var Xc=function(){const e=Object(r.useRef)();return Object(r.createElement)(i.PostScheduleCheck,null,Object(r.createElement)(m.PanelRow,{className:"edit-post-post-schedule",ref:e},Object(r.createElement)("span",null,Object(f.__)("Publish")),Object(r.createElement)(m.Dropdown,{popoverProps:{anchorRef:e.current},position:"bottom left",contentClassName:"edit-post-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)(m.Button,{className:"edit-post-post-schedule__toggle",onClick:e,"aria-expanded":t,isTertiary:!0},Object(r.createElement)(i.PostScheduleLabel,null))),renderContent:()=>Object(r.createElement)(i.PostSchedule,null)})))};var Kc=function(){return Object(r.createElement)(i.PostStickyCheck,null,Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostSticky,null)))};var Zc=function(){return Object(r.createElement)(i.PostAuthorCheck,null,Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostAuthor,null)))};var Qc=function(){return Object(r.createElement)(i.PostSlugCheck,null,Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostSlug,null)))};var $c=function(){return Object(r.createElement)(i.PostFormatCheck,null,Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostFormat,null)))};var Jc=function(){return Object(r.createElement)(i.PostPendingStatusCheck,null,Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostPendingStatus,null)))};const{Fill:es,Slot:ts}=Object(m.createSlotFill)("PluginPostStatusInfo"),ns=({children:e,className:t})=>Object(r.createElement)(es,null,Object(r.createElement)(m.PanelRow,{className:t},e));ns.Slot=ts;var rs=ns;var os=Object(v.compose)([Object(b.withSelect)(e=>{const{isEditorPanelRemoved:t,isEditorPanelOpened:n}=e(w.a);return{isRemoved:t("post-status"),isOpened:n("post-status")}}),Object(v.ifCondition)(({isRemoved:e})=>!e),Object(b.withDispatch)(e=>({onTogglePanel:()=>e(w.a).toggleEditorPanelOpened("post-status")}))])((function({isOpened:e,onTogglePanel:t}){return Object(r.createElement)(m.PanelBody,{className:"edit-post-post-status",title:Object(f.__)("Status & visibility"),opened:e,onToggle:t},Object(r.createElement)(rs.Slot,null,e=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Wc,null),Object(r.createElement)(Xc,null),Object(r.createElement)($c,null),Object(r.createElement)(Kc,null),Object(r.createElement)(Jc,null),Object(r.createElement)(Qc,null),Object(r.createElement)(Zc,null),e,Object(r.createElement)(Yc,null))))}));var as=function(){return Object(r.createElement)(i.PostLastRevisionCheck,null,Object(r.createElement)(m.PanelBody,{className:"edit-post-last-revision__panel"},Object(r.createElement)(i.PostLastRevision,null)))};var is=Object(v.compose)(Object(b.withSelect)((e,t)=>{const n=Object(d.get)(t.taxonomy,["slug"]),r=n?"taxonomy-panel-"+n:"";return{panelName:r,isEnabled:!!n&&e(w.a).isEditorPanelEnabled(r),isOpened:!!n&&e(w.a).isEditorPanelOpened(r)}}),Object(b.withDispatch)((e,t)=>({onTogglePanel:()=>{e(w.a).toggleEditorPanelOpened(t.panelName)}})))((function({isEnabled:e,taxonomy:t,isOpened:n,onTogglePanel:o,children:a}){if(!e)return null;const i=Object(d.get)(t,["labels","menu_name"]);return i?Object(r.createElement)(m.PanelBody,{title:i,opened:n,onToggle:o},a):null}));var cs=function(){return Object(r.createElement)(i.PostTaxonomiesCheck,null,Object(r.createElement)(i.PostTaxonomies,{taxonomyWrapper:(e,t)=>Object(r.createElement)(is,{taxonomy:t},e)}))};const ss=Object(b.withSelect)(e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getPostType:n}=e("core"),{isEditorPanelEnabled:r,isEditorPanelOpened:o}=e(w.a);return{postType:n(t("type")),isEnabled:r("featured-image"),isOpened:o("featured-image")}}),ls=Object(b.withDispatch)(e=>{const{toggleEditorPanelOpened:t}=e(w.a);return{onTogglePanel:Object(d.partial)(t,"featured-image")}});var us=Object(v.compose)(ss,ls)((function({isEnabled:e,isOpened:t,postType:n,onTogglePanel:o}){return e?Object(r.createElement)(i.PostFeaturedImageCheck,null,Object(r.createElement)(m.PanelBody,{title:Object(d.get)(n,["labels","featured_image"],Object(f.__)("Featured image")),opened:t,onToggle:o},Object(r.createElement)(i.PostFeaturedImage,null))):null}));var ds=Object(v.compose)([Object(b.withSelect)(e=>({isEnabled:e(w.a).isEditorPanelEnabled("post-excerpt"),isOpened:e(w.a).isEditorPanelOpened("post-excerpt")})),Object(b.withDispatch)(e=>({onTogglePanel:()=>e(w.a).toggleEditorPanelOpened("post-excerpt")}))])((function({isEnabled:e,isOpened:t,onTogglePanel:n}){return e?Object(r.createElement)(i.PostExcerptCheck,null,Object(r.createElement)(m.PanelBody,{title:Object(f.__)("Excerpt"),opened:t,onToggle:n},Object(r.createElement)(i.PostExcerpt,null))):null}));var ps=Object(v.compose)([Object(b.withSelect)(e=>{const{isPermalinkEditable:t,getCurrentPost:n,isCurrentPostPublished:r,getPermalinkParts:o,getEditedPostAttribute:a,getEditedPostSlug:i}=e("core/editor"),{isEditorPanelEnabled:c,isEditorPanelOpened:s}=e(w.a),{getPostType:l}=e("core"),{link:u}=n(),p=l(a("type")),m=o();return{postLink:u,isEditable:t(),isPublished:r(),isOpened:s("post-link"),isEnabled:c("post-link"),isViewable:Object(d.get)(p,["viewable"],!1),postSlug:Object(j.safeDecodeURIComponent)(i()),postTypeLabel:Object(d.get)(p,["labels","view_item"]),hasPermalinkParts:!!m,permalinkPrefix:null==m?void 0:m.prefix,permalinkSuffix:null==m?void 0:m.suffix}}),Object(v.ifCondition)(({isEnabled:e,postLink:t,isViewable:n,hasPermalinkParts:r})=>e&&t&&n&&r),Object(b.withDispatch)(e=>{const{toggleEditorPanelOpened:t}=e(w.a),{editPost:n}=e("core/editor");return{onTogglePanel:()=>t("post-link"),editPermalink:e=>{n({slug:e})}}}),Object(v.withState)({forceEmptyField:!1})])((function({isOpened:e,onTogglePanel:t,isEditable:n,postLink:o,permalinkPrefix:a,permalinkSuffix:c,editPermalink:s,forceEmptyField:l,setState:u,postSlug:d,postTypeLabel:p}){let b,v,h;return n&&(b=a&&Object(r.createElement)("span",{className:"edit-post-post-link__link-prefix"},a),v=d&&Object(r.createElement)("span",{className:"edit-post-post-link__link-post-name"},d),h=c&&Object(r.createElement)("span",{className:"edit-post-post-link__link-suffix"},c)),Object(r.createElement)(m.PanelBody,{title:Object(f.__)("Permalink"),opened:e,onToggle:t},n&&Object(r.createElement)("div",{className:"editor-post-link"},Object(r.createElement)(m.TextControl,{label:Object(f.__)("URL Slug"),value:l?"":d,onChange:e=>{s(e),e?l&&u({forceEmptyField:!1}):l||u({forceEmptyField:!0})},onBlur:e=>{s(Object(i.cleanForSlug)(e.target.value)),l&&u({forceEmptyField:!1})}}),Object(r.createElement)("p",null,Object(f.__)("The last part of the URL.")," ",Object(r.createElement)(m.ExternalLink,{href:"https://wordpress.org/support/article/writing-posts/#post-field-descriptions"},Object(f.__)("Read about permalinks")))),Object(r.createElement)("h3",{className:"edit-post-post-link__preview-label"},p||Object(f.__)("View post")),Object(r.createElement)("div",{className:"edit-post-post-link__preview-link-container"},Object(r.createElement)(m.ExternalLink,{className:"edit-post-post-link__link",href:o,target:"_blank"},n?Object(r.createElement)(r.Fragment,null,b,v,h):o)))}));var ms=Object(v.compose)([Object(b.withSelect)(e=>({isEnabled:e(w.a).isEditorPanelEnabled("discussion-panel"),isOpened:e(w.a).isEditorPanelOpened("discussion-panel")})),Object(b.withDispatch)(e=>({onTogglePanel:()=>e(w.a).toggleEditorPanelOpened("discussion-panel")}))])((function({isEnabled:e,isOpened:t,onTogglePanel:n}){return e?Object(r.createElement)(i.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},Object(r.createElement)(m.PanelBody,{title:Object(f.__)("Discussion"),opened:t,onToggle:n},Object(r.createElement)(i.PostTypeSupportCheck,{supportKeys:"comments"},Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostComments,null))),Object(r.createElement)(i.PostTypeSupportCheck,{supportKeys:"trackbacks"},Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PostPingbacks,null))))):null}));var bs=function(){const{isEnabled:e,isOpened:t,postType:n}=Object(b.useSelect)(e=>{const{getEditedPostAttribute:t}=e(i.store),{isEditorPanelEnabled:n,isEditorPanelOpened:r}=e(w.a),{getPostType:a}=e(o.store);return{isEnabled:n("page-attributes"),isOpened:r("page-attributes"),postType:a(t("type"))}},[]),{toggleEditorPanelOpened:a}=Object(b.useDispatch)(w.a);if(!e||!n)return null;const c=Object(d.partial)(a,"page-attributes");return Object(r.createElement)(i.PageAttributesCheck,null,Object(r.createElement)(m.PanelBody,{title:Object(d.get)(n,["labels","attributes"],Object(f.__)("Page attributes")),opened:t,onToggle:c},Object(r.createElement)(i.PageAttributesParent,null),Object(r.createElement)(m.PanelRow,null,Object(r.createElement)(i.PageAttributesOrder,null))))};class fs extends r.Component{constructor(){super(...arguments),this.bindContainerNode=this.bindContainerNode.bind(this)}componentDidMount(){this.form=document.querySelector(".metabox-location-"+this.props.location),this.form&&this.container.appendChild(this.form)}componentWillUnmount(){this.form&&document.querySelector("#metaboxes").appendChild(this.form)}bindContainerNode(e){this.container=e}render(){const{location:e,isSaving:t}=this.props,n=B()("edit-post-meta-boxes-area","is-"+e,{"is-loading":t});return Object(r.createElement)("div",{className:n},t&&Object(r.createElement)(m.Spinner,null),Object(r.createElement)("div",{className:"edit-post-meta-boxes-area__container",ref:this.bindContainerNode}),Object(r.createElement)("div",{className:"edit-post-meta-boxes-area__clear"}))}}var vs=Object(b.withSelect)(e=>({isSaving:e(w.a).isSavingMetaBoxes()}))(fs);class hs extends r.Component{componentDidMount(){this.updateDOM()}componentDidUpdate(e){this.props.isVisible!==e.isVisible&&this.updateDOM()}updateDOM(){const{id:e,isVisible:t}=this.props,n=document.getElementById(e);n&&(t?n.classList.remove("is-hidden"):n.classList.add("is-hidden"))}render(){return null}}var gs=Object(b.withSelect)((e,{id:t})=>({isVisible:e(w.a).isEditorPanelEnabled("meta-box-"+t)}))(hs);function Os({location:e}){const t=Object(b.useRegistry)(),{metaBoxes:n,isVisible:o,areMetaBoxesInitialized:a,isEditorReady:c}=Object(b.useSelect)(t=>{const{__unstableIsEditorReady:n}=t(i.store),{isMetaBoxLocationVisible:r,getMetaBoxesPerLocation:o,areMetaBoxesInitialized:a}=t(w.a);return{metaBoxes:o(e),isVisible:r(e),areMetaBoxesInitialized:a(),isEditorReady:n()}},[e]);return Object(r.useEffect)(()=>{c&&!a&&t.dispatch(w.a).initializeMetaBoxes()},[c,a]),a?Object(r.createElement)(r.Fragment,null,Object(d.map)(n,({id:e})=>Object(r.createElement)(gs,{key:e,id:e})),o&&Object(r.createElement)(vs,{location:e})):null}var ys=n("xrib");function js({className:e,...t}){const{postTitle:n,shortcut:o,showIconLabels:a}=Object(b.useSelect)(e=>({postTitle:e("core/editor").getEditedPostAttribute("title"),shortcut:e(N.store).getShortcutRepresentation("core/edit-post/toggle-sidebar"),showIconLabels:e(w.a).isFeatureActive("showIconLabels")}));return Object(r.createElement)(L.b,Object(u.a)({panelClassName:e,className:"edit-post-sidebar",smallScreenTitle:n||Object(f.__)("(no title)"),scope:"core/edit-post",toggleShortcut:o,showIconLabels:a},t))}var Es=function(){const[e,t]=Object(r.useState)(!1),[n,a]=Object(r.useState)(""),{template:c,supportsTemplateMode:s,defaultTemplate:l}=Object(b.useSelect)(e=>{var t,n;const{getCurrentPostType:r,getEditorSettings:a}=e(i.store),{getPostType:c}=e(o.store),{getEditedPostTemplate:s}=e(w.a),l=null!==(t=null===(n=c(r()))||void 0===n?void 0:n.viewable)&&void 0!==t&&t,u=a().supportsTemplateMode&&l;return{template:u&&s(),supportsTemplateMode:u,defaultTemplate:a().defaultBlockTemplate}},[]),{__unstableSwitchToTemplateMode:u}=Object(b.useDispatch)(w.a);if(!s)return null;const v=Object(f.__)("Custom Template");return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"edit-post-template__actions"},!!c&&Object(r.createElement)(m.Button,{isLink:!0,onClick:()=>u()},Object(f.__)("Edit")),Object(r.createElement)(m.Button,{isLink:!0,onClick:()=>t(!0)},Object(f.__)("New"))),e&&Object(r.createElement)(m.Modal,{title:Object(f.__)("Create custom template"),closeLabel:Object(f.__)("Close"),onRequestClose:()=>{t(!1),a("")},overlayClassName:"edit-post-template__modal"},Object(r.createElement)("form",{onSubmit:e=>{e.preventDefault();const r=null!=l?l:Object(p.serialize)([Object(p.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[Object(p.createBlock)("core/site-title"),Object(p.createBlock)("core/site-tagline")]),Object(p.createBlock)("core/separator"),Object(p.createBlock)("core/group",{tagName:"main"},[Object(p.createBlock)("core/group",{layout:{inherit:!0}},[Object(p.createBlock)("core/post-title")]),Object(p.createBlock)("core/post-content",{layout:{inherit:!0}})])]);u({slug:"wp-custom-template-"+Object(d.kebabCase)(n||v),content:r,title:n||v}),t(!1)}},Object(r.createElement)(m.Flex,{align:"flex-start",gap:8},Object(r.createElement)(m.FlexItem,null,Object(r.createElement)(m.TextControl,{label:Object(f.__)("Name"),value:n,onChange:a,placeholder:v,help:Object(f.__)('Describe the purpose of the template, e.g. "Full Width". Custom templates can be applied to any post or page.')}))),Object(r.createElement)(m.Flex,{className:"edit-post-template__modal-actions",justify:"flex-end",expanded:!1},Object(r.createElement)(m.FlexItem,null,Object(r.createElement)(m.Button,{isTertiary:!0,onClick:()=>{t(!1),a("")}},Object(f.__)("Cancel"))),Object(r.createElement)(m.FlexItem,null,Object(r.createElement)(m.Button,{isPrimary:!0,type:"submit"},Object(f.__)("Create")))))))};var _s=function(){const{isEnabled:e,isOpened:t,selectedTemplate:n,availableTemplates:a,fetchedTemplates:c,isViewable:s,template:l,supportsTemplateMode:u}=Object(b.useSelect)(e=>{var t,n;const{isEditorPanelEnabled:r,isEditorPanelOpened:a,getEditedPostTemplate:c}=e(w.a),{getEditedPostAttribute:s,getEditorSettings:l,getCurrentPostType:u}=e(i.store),{getPostType:p,getEntityRecords:m}=e(o.store),b=null!==(t=null===(n=p(u()))||void 0===n?void 0:n.viewable)&&void 0!==t&&t,f=e(i.store).getEditorSettings().supportsTemplateMode&&b,v=m("postType","wp_template",{per_page:-1}),h=Object(d.fromPairs)((v||[]).map(({slug:e,title:t})=>[e,t.rendered]));return{isEnabled:r("template"),isOpened:a("template"),selectedTemplate:s("template"),availableTemplates:l().availableTemplates,fetchedTemplates:h,template:f&&c(),isViewable:b,supportsTemplateMode:f}},[]),p=Object(r.useMemo)(()=>({...a,...c}),[a,c]),{toggleEditorPanelOpened:v}=Object(b.useDispatch)(w.a),{editPost:h}=Object(b.useDispatch)(i.store);if(!e||!s||Object(d.isEmpty)(a)&&!u)return null;const g=Object(d.partial)(v,"template");let O=Object(f.__)("Template");var y;return l&&(O=Object(f.sprintf)(Object(f.__)("Template: %s"),null!==(y=null==l?void 0:l.title)&&void 0!==y?y:l.slug)),Object(r.createElement)(m.PanelBody,{title:O,opened:t,onToggle:g},Object(r.createElement)(m.SelectControl,{hideLabelFromVision:!0,label:Object(f.__)("Template:"),value:Object.keys(p).includes(n)?n:"",onChange:e=>{h({template:e||""})},options:Object(d.map)(p,(e,t)=>({value:t,label:e}))}),Object(r.createElement)(Es,null))},ws=n("iClF"),Ss=n("Civd");var xs=function(){const e=Object(b.useSelect)(e=>{const{getEditedPostTemplate:t}=e(w.a);return t()},[]);return e?Object(r.createElement)(m.PanelBody,null,Object(r.createElement)(m.Flex,{align:"flex-start"},Object(r.createElement)(m.FlexItem,null,Object(r.createElement)(ws.a,{icon:Ss.a})),Object(r.createElement)(m.FlexBlock,null,Object(r.createElement)("h2",{className:"edit-post-template-summary__title"},(null==e?void 0:e.title)||(null==e?void 0:e.slug)),Object(r.createElement)("p",null,null==e?void 0:e.description)))):null};const Ps=r.Platform.select({web:!0,native:!1});var Ts=()=>{const{sidebarName:e,keyboardShortcut:t,isTemplateMode:n}=Object(b.useSelect)(e=>{let t=e(L.g).getActiveComplementaryArea(w.a.name);["edit-post/document","edit-post/block"].includes(t)||(e(a.store).getBlockSelectionStart()&&(t="edit-post/block"),t="edit-post/document");return{sidebarName:t,keyboardShortcut:e(N.store).getShortcutRepresentation("core/edit-post/toggle-sidebar"),isTemplateMode:e(w.a).isEditingTemplate()}},[]);return Object(r.createElement)(js,{identifier:e,header:Object(r.createElement)(qc,{sidebarName:e}),closeLabel:Object(f.__)("Close settings"),headerClassName:"edit-post-sidebar__panel-tabs",title:Object(f.__)("Settings"),toggleShortcut:t,icon:zc.a,isActiveByDefault:Ps},!n&&"edit-post/document"===e&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(os,null),Object(r.createElement)(_s,null),Object(r.createElement)(ys.a.Slot,null),Object(r.createElement)(as,null),Object(r.createElement)(ps,null),Object(r.createElement)(cs,null),Object(r.createElement)(us,null),Object(r.createElement)(ds,null),Object(r.createElement)(ms,null),Object(r.createElement)(bs,null),Object(r.createElement)(Os,{location:"side"})),n&&"edit-post/document"===e&&Object(r.createElement)(xs,null),"edit-post/block"===e&&Object(r.createElement)(a.BlockInspector,null))};function ks({nonAnimatedSrc:e,animatedSrc:t}){return Object(r.createElement)("picture",{className:"edit-post-welcome-guide__image"},Object(r.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),Object(r.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}function Cs(){const{toggleFeature:e}=Object(b.useDispatch)(w.a);return Object(r.createElement)(m.Guide,{className:"edit-post-welcome-guide",contentLabel:Object(f.__)("Welcome to the block editor"),finishButtonText:Object(f.__)("Get started"),onFinish:()=>e("welcomeGuide"),pages:[{image:Object(r.createElement)(ks,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(f.__)("Welcome to the block editor")),Object(r.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(f.__)("In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.")))},{image:Object(r.createElement)(ks,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(f.__)("Make each block your own")),Object(r.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(f.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")))},{image:Object(r.createElement)(ks,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(f.__)("Get to know the block library")),Object(r.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(r.createInterpolateElement)(Object(f.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the
icon."),{InserterIconImage:Object(r.createElement)("img",{alt:Object(f.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})))},{image:Object(r.createElement)(ks,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(f.__)("Learn how to use the block editor")),Object(r.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(f.__)("New to the block editor? Want to learn more about using it? "),Object(r.createElement)(m.ExternalLink,{href:Object(f.__)("https://wordpress.org/support/article/wordpress-editor/")},Object(f.__)("Here's a detailed guide."))))}]})}function As(){const{toggleFeature:e}=Object(b.useDispatch)(w.a);return Object(r.createElement)(m.Guide,{className:"edit-post-welcome-guide",contentLabel:Object(f.__)("Welcome to the template editor"),finishButtonText:Object(f.__)("Get started"),onFinish:()=>e("welcomeGuideTemplate"),pages:[{image:Object(r.createElement)(ks,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.gif"}),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(f.__)("Welcome to the template editor")),Object(r.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(f.__)("Templates express the layout of the site. Customize all aspects of your posts and pages using the tools of blocks and patterns.")))}]})}function Ms(){const{isActive:e,isTemplateMode:t}=Object(b.useSelect)(e=>{const{isFeatureActive:t,isEditingTemplate:n}=e(w.a),r=n();return{isActive:t(r?"welcomeGuideTemplate":"welcomeGuide"),isTemplateMode:r}},[]);return e?t?Object(r.createElement)(As,null):Object(r.createElement)(Cs,null):null}const{Fill:Is,Slot:Bs}=Object(m.createSlotFill)("PluginPostPublishPanel"),Ls=Object(v.compose)(Object(y.withPluginContext)((e,t)=>({icon:t.icon||e.icon})))(({children:e,className:t,title:n,initialOpen:o=!1,icon:a})=>Object(r.createElement)(Is,null,Object(r.createElement)(m.PanelBody,{className:t,initialOpen:o||!n,title:n,icon:a},e)));Ls.Slot=Bs;var Ns=Ls;const{Fill:Rs,Slot:Ds}=Object(m.createSlotFill)("PluginPrePublishPanel"),Vs=Object(v.compose)(Object(y.withPluginContext)((e,t)=>({icon:t.icon||e.icon})))(({children:e,className:t,title:n,initialOpen:o=!1,icon:a})=>Object(r.createElement)(Rs,null,Object(r.createElement)(m.PanelBody,{className:t,initialOpen:o||!n,title:n,icon:a},e)));Vs.Slot=Ds;var Fs=Vs;const{Fill:Us,Slot:Gs}=Object(m.createSlotFill)("ActionsPanel");function Hs({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:n}){const{closePublishSidebar:o,togglePublishSidebar:a}=Object(b.useDispatch)(w.a),{publishSidebarOpened:c,hasActiveMetaboxes:s,isSavingMetaBoxes:l,hasNonPostEntityChanges:u}=Object(b.useSelect)(e=>({publishSidebarOpened:e(w.a).isPublishSidebarOpened(),hasActiveMetaboxes:e(w.a).hasMetaBoxes(),isSavingMetaBoxes:e(w.a).isSavingMetaBoxes(),hasNonPostEntityChanges:e("core/editor").hasNonPostEntityChanges()}),[]),d=Object(r.useCallback)(()=>e(!0),[]);let p;return p=c?Object(r.createElement)(i.PostPublishPanel,{onClose:o,forceIsDirty:s,forceIsSaving:l,PrePublishExtension:Fs.Slot,PostPublishExtension:Ns.Slot}):u?Object(r.createElement)("div",{className:"edit-post-layout__toggle-entities-saved-states-panel"},Object(r.createElement)(m.Button,{isSecondary:!0,className:"edit-post-layout__toggle-entities-saved-states-panel-button",onClick:d,"aria-expanded":!1},Object(f.__)("Open save panel"))):Object(r.createElement)("div",{className:"edit-post-layout__toggle-publish-panel"},Object(r.createElement)(m.Button,{isSecondary:!0,className:"edit-post-layout__toggle-publish-panel-button",onClick:a,"aria-expanded":!1},Object(f.__)("Open publish panel"))),Object(r.createElement)(r.Fragment,null,n&&Object(r.createElement)(i.EntitiesSavedStates,{close:t}),Object(r.createElement)(Gs,{bubblesVirtually:!0}),!n&&p)}const zs={secondarySidebar:Object(f.__)("Block library"),header:Object(f.__)("Editor top bar"),body:Object(f.__)("Editor content"),sidebar:Object(f.__)("Editor settings"),actions:Object(f.__)("Editor publish"),footer:Object(f.__)("Editor footer")};var qs=function({styles:e}){const t=Object(v.useViewportMatch)("medium","<"),n=Object(v.useViewportMatch)("huge",">="),{openGeneralSidebar:o,closeGeneralSidebar:c,setIsInserterOpened:s}=Object(b.useDispatch)(w.a),{mode:l,isFullscreenActive:u,isRichEditingEnabled:d,sidebarIsOpened:p,hasActiveMetaboxes:h,hasFixedToolbar:g,previousShortcut:O,nextShortcut:j,hasBlockSelected:E,isInserterOpened:_,isListViewOpened:S,showIconLabels:x,hasReducedUI:P,showBlockBreadcrumbs:T,isTemplateMode:k}=Object(b.useSelect)(e=>{const t=e(i.store).getEditorSettings();return{isTemplateMode:e(w.a).isEditingTemplate(),hasFixedToolbar:e(w.a).isFeatureActive("fixedToolbar"),sidebarIsOpened:!(!e(L.g).getActiveComplementaryArea(w.a.name)&&!e(w.a).isPublishSidebarOpened()),isFullscreenActive:e(w.a).isFeatureActive("fullscreenMode"),isInserterOpened:e(w.a).isInserterOpened(),isListViewOpened:e(w.a).isListViewOpened(),mode:e(w.a).getEditorMode(),isRichEditingEnabled:t.richEditingEnabled,hasActiveMetaboxes:e(w.a).hasMetaBoxes(),previousShortcut:e(N.store).getAllShortcutRawKeyCombinations("core/edit-post/previous-region"),nextShortcut:e(N.store).getAllShortcutRawKeyCombinations("core/edit-post/next-region"),showIconLabels:e(w.a).isFeatureActive("showIconLabels"),hasReducedUI:e(w.a).isFeatureActive("reducedUI"),showBlockBreadcrumbs:e(w.a).isFeatureActive("showBlockBreadcrumbs")}},[]),C=B()("edit-post-layout","is-mode-"+l,{"is-sidebar-opened":p,"has-fixed-toolbar":g,"has-metaboxes":h,"show-icon-labels":x});Object(r.useEffect)(()=>{p&&!n&&s(!1)},[p,n]),Object(r.useEffect)(()=>{_&&!n&&c()},[_,n]);const[A,M]=Object(r.useState)(!1),I=Object(r.useCallback)(e=>{"function"==typeof A&&A(e),M(!1)},[A]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L.d,{isActive:u}),Object(r.createElement)(dc,null),Object(r.createElement)(i.UnsavedChangesWarning,null),Object(r.createElement)(i.AutosaveMonitor,null),Object(r.createElement)(i.LocalAutosaveMonitor,null),Object(r.createElement)(qi,null),Object(r.createElement)(i.EditorKeyboardShortcutsRegister,null),Object(r.createElement)(Ts,null),Object(r.createElement)(L.e,{className:C,labels:zs,header:Object(r.createElement)(Vc,{setEntitiesSavedStatesCallback:M}),secondarySidebar:"visual"===l&&_?Object(r.createElement)(Uc,null):"visual"===l&&S?Object(r.createElement)(b.AsyncModeProvider,{value:"true"},Object(r.createElement)(Hc,null)):null,sidebar:(!t||p)&&Object(r.createElement)(r.Fragment,null,!t&&!p&&Object(r.createElement)("div",{className:"edit-post-layout__toggle-sidebar-panel"},Object(r.createElement)(m.Button,{isSecondary:!0,className:"edit-post-layout__toggle-sidebar-panel-button",onClick:()=>o(E?"edit-post/block":"edit-post/document"),"aria-expanded":!1},E?Object(f.__)("Open block settings"):Object(f.__)("Open document settings"))),Object(r.createElement)(L.b.Slot,{scope:"core/edit-post"})),notices:Object(r.createElement)(i.EditorSnackbars,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.EditorNotices,null),("text"===l||!d)&&Object(r.createElement)(R,null),d&&"visual"===l&&Object(r.createElement)(zi,{styles:e}),!k&&Object(r.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(r.createElement)(Os,{location:"normal"}),Object(r.createElement)(Os,{location:"advanced"})),t&&p&&Object(r.createElement)(m.ScrollLock,null)),footer:!P&&T&&!t&&d&&"visual"===l&&Object(r.createElement)("div",{className:"edit-post-layout__footer"},Object(r.createElement)(a.BlockBreadcrumb,null)),actions:Object(r.createElement)(Hs,{closeEntitiesSavedStates:I,isEntitiesSavedStatesOpen:A,setEntitiesSavedStatesCallback:M}),shortcuts:{previous:O,next:j}}),Object(r.createElement)(ac,null),Object(r.createElement)(lc,null),Object(r.createElement)(ec,null),Object(r.createElement)(Ms,null),Object(r.createElement)(m.Popover.Slot,null),Object(r.createElement)(y.PluginArea,null))},Ws=n("0dt7");function Ys({postId:e}){return(e=>{const{hasBlockSelection:t,isEditorSidebarOpened:n}=Object(b.useSelect)(e=>({hasBlockSelection:!!e("core/block-editor").getBlockSelectionStart(),isEditorSidebarOpened:e(Ws.a).isEditorSidebarOpened()}),[e]),{openGeneralSidebar:o}=Object(b.useDispatch)(Ws.a);Object(r.useEffect)(()=>{n&&o(t?"edit-post/block":"edit-post/document")},[t,n])})(e),(e=>{const{newPermalink:t}=Object(b.useSelect)(e=>({newPermalink:e("core/editor").getCurrentPost().link}),[e]),n=Object(r.useRef)();Object(r.useEffect)(()=>{n.current=document.querySelector(Ws.c)||document.querySelector(Ws.b)},[e]),Object(r.useEffect)(()=>{t&&n.current&&n.current.setAttribute("href",t)},[t])})(e),null}var Xs=function({postId:e,postType:t,settings:n,initialEdits:o,onError:a,...c}){const{hasFixedToolbar:s,focusMode:l,hasReducedUI:f,hasThemeStyles:v,post:h,preferredStyleVariations:g,hiddenBlockTypes:O,blockTypes:y,__experimentalLocalAutosaveInterval:j,keepCaretInsideBlock:E,isTemplateMode:_,template:S}=Object(b.useSelect)(n=>{var r,o;const{isFeatureActive:a,getPreference:i,__experimentalGetPreviewDeviceType:c,isEditingTemplate:s,getEditedPostTemplate:l}=n(w.a),{getEntityRecord:u,getPostType:d,getEntityRecords:m}=n("core"),{getEditorSettings:b}=n("core/editor"),{getBlockTypes:f}=n(p.store);let v;if(["wp_template","wp_template_part"].includes(t)){const n=m("postType",t,{wp_id:e});v=null==n?void 0:n[0]}else v=u("postType",t,e);const h=b().supportsTemplateMode,g=null!==(r=null===(o=d(t))||void 0===o?void 0:o.viewable)&&void 0!==r&&r;return{hasFixedToolbar:a("fixedToolbar")||"Desktop"!==c(),focusMode:a("focusMode"),hasReducedUI:a("reducedUI"),hasThemeStyles:a("themeStyles"),preferredStyleVariations:i("preferredStyleVariations"),hiddenBlockTypes:i("hiddenBlockTypes"),blockTypes:f(),__experimentalLocalAutosaveInterval:i("localAutosaveInterval"),keepCaretInsideBlock:a("keepCaretInsideBlock"),isTemplateMode:s(),template:h&&g?l():null,post:v}}),{updatePreferredStyleVariations:x,setIsInserterOpened:P}=Object(b.useDispatch)(w.a),T=Object(r.useMemo)(()=>{const e={...Object(d.omit)(n,["styles"]),__experimentalPreferredStyleVariations:{value:g,onChange:x},hasFixedToolbar:s,focusMode:l,hasReducedUI:f,__experimentalLocalAutosaveInterval:j,__experimentalSetIsInserterOpened:P,keepCaretInsideBlock:E};if(Object(d.size)(O)>0){const t=!0===n.allowedBlockTypes?Object(d.map)(y,"name"):n.allowedBlockTypes||[];e.allowedBlockTypes=Object(d.without)(t,...O)}return e},[n,s,l,f,O,y,g,j,P,x,E]),k=Object(r.useMemo)(()=>v?n.styles:[],[n,v]);return h?Object(r.createElement)(r.StrictMode,null,Object(r.createElement)(nc.Provider,{value:n},Object(r.createElement)(m.SlotFillProvider,null,Object(r.createElement)(i.EditorProvider,Object(u.a)({settings:T,post:h,initialEdits:o,useSubRegistry:!1,__unstableTemplate:_?S:void 0},c),Object(r.createElement)(i.ErrorBoundary,{onError:a},Object(r.createElement)(Ys,{postId:e}),Object(r.createElement)(qs,{styles:k}),Object(r.createElement)(m.KeyboardShortcuts,{shortcuts:M})),Object(r.createElement)(i.PostLockedModal,null))))):null};const Ks=(e,t)=>{return!Array.isArray(t)||(n=e,r=t,0===Object(d.difference)(n,r).length);var n,r};var Zs=({allowedBlocks:e,icon:t,label:n,onClick:o,small:i,role:c})=>Object(r.createElement)(a.BlockSettingsMenuControls,null,({selectedBlocks:a,onClose:s})=>Ks(a,e)?Object(r.createElement)(m.MenuItem,{onClick:Object(v.compose)(o,s),icon:t,label:i?n:void 0,role:c},!i&&n):null),Qs=Object(v.compose)(Object(y.withPluginContext)((e,t)=>({icon:t.icon||e.icon,name:"core/edit-post/plugin-more-menu"})))(L.a);function $s(e){return Object(r.createElement)(L.c,Object(u.a)({__unstableExplicitMenuItem:!0,scope:"core/edit-post"},e))}function Js(e,t,n,o,a){Object(r.unmountComponentAtNode)(n);const i=Js.bind(null,e,t,n,o,a);Object(r.render)(Object(r.createElement)(Xs,{settings:o,onError:i,postId:t,postType:e,initialEdits:a,recovery:!0}),n)}function el(e,t,n,o,a){const i=document.getElementById(e),s=Js.bind(null,t,n,i,o,a);Object(c.registerCoreBlocks)();"Standards"!==("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening . Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.");-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",e=>{const t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))}),Object(r.render)(Object(r.createElement)(Xs,{settings:o,onError:s,postId:n,postType:t,initialEdits:a}),i)}},g56x:function(e,t){e.exports=window.wp.hooks},gdqT:function(e,t){e.exports=window.wp.a11y},hF7m:function(e,t){e.exports=window.wp.keyboardShortcuts},iClF:function(e,t,n){"use strict";var r=n("GRId");t.a=function({icon:e,size:t=24,...n}){return Object(r.cloneElement)(e,{width:t,height:t,...n})}},jSdM:function(e,t){e.exports=window.wp.editor},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},pPDe:function(e,t,n){"use strict";var r,o;function a(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function c(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r
(void 0===n.name&&void 0!==e&&e.env,{icon:n.icon||t.icon,panelName:`${t.name}/${n.name}`})),Object(c.withSelect)((e,{panelName:t})=>({opened:e(l.a).isEditorPanelOpened(t),isEnabled:e(l.a).isEditorPanelEnabled(t)})),Object(c.withDispatch)((e,{panelName:t})=>({onToggle:()=>e(l.a).toggleEditorPanelOpened(t)})))(({isEnabled:e,panelName:t,opened:n,onToggle:a,className:i,title:c,icon:l,children:d})=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.d,{label:c,panelName:t}),Object(r.createElement)(u,null,e&&Object(r.createElement)(o.PanelBody,{className:i,title:c,icon:l,opened:n,onToggle:a},d))));p.Slot=d,t.a=p}).call(this,n("8oxB"))}});