From 4924eeb8380d4a34713b426d497e441ec0bef481 Mon Sep 17 00:00:00 2001 From: John Godley Date: Tue, 13 Jun 2023 12:17:09 +0100 Subject: [PATCH 1/3] Fix link button style Props to @nayanchamp7 --- src/components/block-editor-container/style.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/block-editor-container/style.scss b/src/components/block-editor-container/style.scss index 78374dd53..8747c045b 100644 --- a/src/components/block-editor-container/style.scss +++ b/src/components/block-editor-container/style.scss @@ -103,6 +103,10 @@ background-color: transparent; background-image: none; } + + &.is-primary:hover { + background-color: var(--wp-components-color-accent-darker-10,var(--wp-admin-theme-color-darker-10,#006BA1));; + } } // Ugly fix for an issue with the outline view in an empty document showing no content. From 681565d6e261809dfa9cd4580986653458468ddc Mon Sep 17 00:00:00 2001 From: John Godley Date: Tue, 13 Jun 2023 12:17:26 +0100 Subject: [PATCH 2/3] Allow a custom sidebar component --- CHANGELOG.md | 6 ++++++ README.md | 22 ++++++++++++++++++++-- src/components/block-editor/index.js | 3 ++- src/components/default-settings/index.js | 1 + src/index.js | 1 + 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe90d686..0a1f5b2e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.25.0] - 2023-06-13 + +### Added +- `settings.iso.sidebar.customComponent` added to allow a custom settings sidebar to be supplied +- Fix buttons in link popup (see #226) + ## [2.24.0] - 2023-04-24 ### Update diff --git a/README.md b/README.md index 8a5b86212..bcdc9dd86 100644 --- a/README.md +++ b/README.md @@ -215,11 +215,13 @@ The following function is also provided: - _iso.blocks.disallowBlocks_ `[string[]]` - list of block names to disallow, defaults to none - _iso.disallowEmbed_ `[string[]]` - List of embed names to remove, defaults to none. - _iso.toolbar_ `[Object]` - Toolbar settings -- _iso.toolbar.inserter_ `[boolean]` - Enable or disable the toolbar block inserter, defaults to `true` -- _iso.toolbar.inspector_ `[boolean]` - Enable or disable the toolbar block inspector, defaults to `false` - _iso.toolbar.navigation_ `[boolean]` - Enable or disable the toolbar navigation button, defaults to `false` - _iso.toolbar.undo_ `[boolean]` - Enable or disable the toolbar undo/redo buttons, defaults to `true` - _iso.toolbar.documentInspector_ `[string|null]` - Set to a string to show as a new tab in the inspector and filled with `DocumentSection`, otherwise defaults to no new tab +- _iso.sidebar_ `[Object]` - Sidebar settings +- _iso.sidebar.inserter_ `[boolean]` - Enable or disable the sidebar block inserter, defaults to `true` +- _iso.sidebar.inspector_ `[boolean]` - Enable or disable the sidebar block inspector, defaults to `false` +- _iso.sidebar.customComponent_ `[function]` - A function returning a custom sidebar component, or null to uses the default sidebar - _iso.moreMenu_ `[Object]` - More menu settings - _iso.moreMenu.editor_ `[boolean]` - Enable or disable the editor sub menu (visual/code editing), defaults to `false` - _iso.moreMenu.fullscreen_ `[boolean]` - Enable or disable the fullscreen option, defaults to `false` @@ -321,6 +323,22 @@ settings.editor.mediaUpload = mediaUpload; In versions earlier than 2.21.0 this was automatically done, but this meant that you were unable to modify or disable it. +### Custom settings sidebar + +By default the editor will use the Gutenberg settings sidebar. This provides the block and document inspector tabs, along with associated content. + +If you wish to customise this sidebar then you can use the `iso.sidebar.customComponent` setting and pass a function that returns a React component. + +You will need to manage the display of the sidebar yourself, including whether it should appear or not. It may help to look at the [existing sidebar code](src/components/block-editor/sidebar.js) for reference. + +For example: + +```js +sidebar: { + customComponent: () =>
My custom sidebar
+}, +``` + ### Extending Custom behaviour can be added through child components. These components will have access to the `isolated/editor` store, as well as to the editor instance versions of `core/block-editor`. diff --git a/src/components/block-editor/index.js b/src/components/block-editor/index.js index eb2d8a050..ec6a019df 100644 --- a/src/components/block-editor/index.js +++ b/src/components/block-editor/index.js @@ -147,10 +147,11 @@ function BlockEditor( props ) { const header = showHeader ? ( ) : null; + const CustomSettingsSidebar = settings?.iso?.sidebar?.customComponent ?? SettingsSidebar; return ( <> - + Date: Tue, 13 Jun 2023 12:18:17 +0100 Subject: [PATCH 3/3] Build --- build-browser/isolated-block-editor.css | 2 +- build-browser/isolated-block-editor.js | 2 +- build-module/components/block-editor-container/style.scss | 4 ++++ build-module/components/block-editor/index.js | 7 ++++--- build-module/components/block-editor/index.js.map | 2 +- build-module/components/default-settings/index.js | 1 + build-module/components/default-settings/index.js.map | 2 +- build-module/index.js | 1 + build-module/index.js.map | 2 +- build-types/components/default-settings/index.d.ts.map | 2 +- build-types/index.d.ts | 5 +++++ build-types/index.d.ts.map | 2 +- build/components/block-editor-container/style.scss | 4 ++++ build/components/block-editor/index.js | 7 ++++--- build/components/block-editor/index.js.map | 2 +- build/components/default-settings/index.js | 3 ++- build/components/default-settings/index.js.map | 2 +- build/index.js | 1 + build/index.js.map | 2 +- 19 files changed, 36 insertions(+), 17 deletions(-) diff --git a/build-browser/isolated-block-editor.css b/build-browser/isolated-block-editor.css index 747b6fbf2..982436818 100644 --- a/build-browser/isolated-block-editor.css +++ b/build-browser/isolated-block-editor.css @@ -1,6 +1,6 @@ .iso-editor{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-20: #006187;--wp-admin-border-width-focus: 2px} html.interface-interface-skeleton__html-container{position:unset !important}.components-modal__frame,.components-modal__frame select,.iso-editor,.iso-editor select{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4;color:#1e1e1e}.components-modal__frame input,.components-modal__frame select,.components-modal__frame textarea,.components-modal__frame button,.iso-editor input,.iso-editor select,.iso-editor textarea,.iso-editor button{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.components-modal__frame p:not(.components-form-token-field__help),.iso-editor p:not(.components-form-token-field__help){font-size:inherit;line-height:inherit}.components-modal__frame ul.block-editor-block-list__block,.components-modal__frame ol.block-editor-block-list__block,.iso-editor ul.block-editor-block-list__block,.iso-editor ol.block-editor-block-list__block{margin:0 0 1.2em}.components-modal__frame ul li,.components-modal__frame ol li,.iso-editor ul li,.iso-editor ol li{margin-bottom:initial}.components-modal__frame ul,.iso-editor ul{list-style-type:none}.components-modal__frame ol,.iso-editor ol{list-style-type:decimal}.components-modal__frame ul ul,.components-modal__frame ol ul,.iso-editor ul ul,.iso-editor ol ul{list-style-type:circle}.components-modal__frame .components-popover.components-animate__appear,.iso-editor .components-popover.components-animate__appear{animation:none}.iso-editor{width:100%;min-height:145px;background-color:#fff;position:relative;border:1px solid #e0e0e0}.components-modal__frame .components-modal__header h1{font-size:20px !important}.components-modal__frame button{box-shadow:none}.iso-editor__loading{min-height:125px;background-color:#e0e0e0;border:1px solid #e0e0e0;animation:loading-fade 1.6s ease-in-out infinite;margin-bottom:57px}.iso-editor__loading>textarea,.iso-editor__loading>div{display:none}@keyframes loading-fade{0%{opacity:.3}50%{opacity:1}100%{opacity:.3}}#media-search-input{box-sizing:border-box} -.iso-editor .editor-error-boundary{margin-bottom:60px;box-shadow:none;border:none}.iso-editor .block-editor-writing-flow{padding:10px 0}.iso-editor .block-editor-writing-flow ul{list-style-type:disc}.iso-editor .block-editor-writing-flow [data-type="core/list"] li{margin-left:20px}.iso-editor .wp-block{max-width:none;margin-left:auto;margin-right:auto}.iso-editor .wp-block[data-align=wide]{max-width:1100px}.iso-editor .wp-block[data-align=full]{max-width:none}.iso-editor img{max-width:100%;height:auto}.iso-editor iframe{width:100%}.iso-editor .components-navigate-regions{height:100%}.iso-editor .block-editor-block-list__layout:first-of-type .block-editor-default-block-appender{margin-left:0}.iso-editor .block-editor-block-list__layout:first-of-type .block-editor-default-block-appender__content{margin-top:16px;margin-bottom:16px}.iso-editor .edit-post-text-editor{padding-top:0}.iso-editor .edit-post-text-editor__body{max-width:none;margin-top:32px;margin-bottom:32px;padding-top:0}.iso-editor .edit-post-text-editor__body textarea{padding:15px}.iso-editor .components-resizable-box__handle::before{box-sizing:border-box}.iso-editor .components-popover__content button:focus,.iso-editor .components-popover__content button:hover{text-decoration:none}.iso-editor .components-popover__content button:not(.is-active){font-weight:normal;text-transform:none;font-family:Arial}.iso-editor .components-popover__content button:not(.is-active):active,.iso-editor .components-popover__content button:not(.is-active):focus,.iso-editor .components-popover__content button:not(.is-active):hover{background-color:transparent;background-image:none}.iso-editor .block-editor-block-navigation__container .is-selected button:active,.iso-editor .block-editor-block-navigation__container .is-selected button:focus,.iso-editor .block-editor-block-navigation__container .is-selected button:hover{background-color:#1e1e1e}.iso-editor .components-popover__content h1:before,.iso-editor .components-popover__content h2:before{content:none;display:unset;height:unset;margin:unset;width:unset;background:unset}.iso-editor .components-popover__content .block-editor-inserter__menu .components-tab-panel__tab-content button{font-size:16px}.iso-editor .block-editor-default-block-appender textarea{border:none !important;border-radius:unset !important;box-shadow:none !important} +.iso-editor .editor-error-boundary{margin-bottom:60px;box-shadow:none;border:none}.iso-editor .block-editor-writing-flow{padding:10px 0}.iso-editor .block-editor-writing-flow ul{list-style-type:disc}.iso-editor .block-editor-writing-flow [data-type="core/list"] li{margin-left:20px}.iso-editor .wp-block{max-width:none;margin-left:auto;margin-right:auto}.iso-editor .wp-block[data-align=wide]{max-width:1100px}.iso-editor .wp-block[data-align=full]{max-width:none}.iso-editor img{max-width:100%;height:auto}.iso-editor iframe{width:100%}.iso-editor .components-navigate-regions{height:100%}.iso-editor .block-editor-block-list__layout:first-of-type .block-editor-default-block-appender{margin-left:0}.iso-editor .block-editor-block-list__layout:first-of-type .block-editor-default-block-appender__content{margin-top:16px;margin-bottom:16px}.iso-editor .edit-post-text-editor{padding-top:0}.iso-editor .edit-post-text-editor__body{max-width:none;margin-top:32px;margin-bottom:32px;padding-top:0}.iso-editor .edit-post-text-editor__body textarea{padding:15px}.iso-editor .components-resizable-box__handle::before{box-sizing:border-box}.iso-editor .components-popover__content button:focus,.iso-editor .components-popover__content button:hover{text-decoration:none}.iso-editor .components-popover__content button:not(.is-active){font-weight:normal;text-transform:none;font-family:Arial}.iso-editor .components-popover__content button:not(.is-active):active,.iso-editor .components-popover__content button:not(.is-active):focus,.iso-editor .components-popover__content button:not(.is-active):hover{background-color:transparent;background-image:none}.iso-editor .components-popover__content button:not(.is-active).is-primary:hover{background-color:var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #006BA1))}.iso-editor .block-editor-block-navigation__container .is-selected button:active,.iso-editor .block-editor-block-navigation__container .is-selected button:focus,.iso-editor .block-editor-block-navigation__container .is-selected button:hover{background-color:#1e1e1e}.iso-editor .components-popover__content h1:before,.iso-editor .components-popover__content h2:before{content:none;display:unset;height:unset;margin:unset;width:unset;background:unset}.iso-editor .components-popover__content .block-editor-inserter__menu .components-tab-panel__tab-content button{font-size:16px}.iso-editor .block-editor-default-block-appender textarea{border:none !important;border-radius:unset !important;box-shadow:none !important} .iso-editor .edit-post-layout.interface-interface-skeleton{position:static;top:auto;left:auto}.iso-editor .interface-interface-skeleton__editor,.iso-editor .interface-interface-skeleton__content{width:100%}.iso-editor .is-mode__text .edit-post-text-editor__body{margin-left:0;margin-right:0;margin-bottom:0;padding:16px 24px 96px}.iso-editor .block-editor-writing-flow{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.8}.iso-editor .block-editor-writing-flow .block-editor-block-list__layout .wp-block:first-child[data-type="core/paragraph"]{padding-top:0}.iso-editor .block-editor-writing-flow .block-list-appender .wp-block{padding-top:0 !important}.iso-editor .block-editor-block-list__layout.is-root-container{padding-left:14px;padding-right:14px}@media(min-width: 600px){.iso-editor .block-editor-block-list__layout.is-root-container{padding-left:36px;padding-right:36px}}.iso-editor .block-editor-link-control__settings{border-left:none;border-right:none;border-bottom:none}.iso-editor a[href="edit.php?post_type=wp_block"]{display:none}.iso-editor .is-fullscreen-mode .block-editor-block-list__layout>div:first-child>.block-list-appender:first-child .wp-block,.iso-editor .is-fullscreen-mode .block-editor-block-list__layout>.block-list-appender:first-child .wp-block{margin:0 auto !important}.iso-editor .edit-post-visual-editor{background-color:#fff} @media(min-width: 280px){.edit-post-header{flex-wrap:nowrap}}.edit-post-header__settings{display:inline-flex;align-items:center}.edit-post-header__settings button.components-button.has-icon{margin-right:0} .block-editor-block-navigation__popover .components-popover__content{padding:0}.block-editor-block-navigation__popover .edit-post-editor__document-overview-panel .edit-post-sidebar__panel-tabs{flex-direction:row}.block-editor-block-navigation__popover .edit-post-editor__list-view-container{max-height:600px} diff --git a/build-browser/isolated-block-editor.js b/build-browser/isolated-block-editor.js index 41b333e39..6d8005d72 100644 --- a/build-browser/isolated-block-editor.js +++ b/build-browser/isolated-block-editor.js @@ -6,4 +6,4 @@ to { transform: rotate(360deg); } - `,q0=lE("svg",{target:"ea4tfvq2"})("width:",RT.spinnerSize,"px;height:",RT.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:",gT.ui.theme,";overflow:visible;"),k0={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},w0=lE("circle",{target:"ea4tfvq1"})(k0,";stroke:",gT.gray[300],";"),E0=lE("path",{target:"ea4tfvq0"})(k0,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",_0,";");const W0=(0,Bt.forwardRef)((function(e,t){let{className:n,...o}=e;return(0,Bt.createElement)(q0,Pt({className:Sz()("components-spinner",n),viewBox:"0 0 100 100",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false"},o,{ref:t}),(0,Bt.createElement)(w0,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,Bt.createElement)(E0,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"}))})),L0=W0,x0={image:"img",video:"video",audio:"audio"};function C0(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const a=x0[t],i=(0,Bt.createElement)(a,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=o)}});return[Ja(`core/${t}`,n),i]}const R0=["image"],S0={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function N0(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const o=t.getReportUrl(n);return(0,Bt.createElement)(VW,{className:"block-editor-inserter__media-list__item-preview-options",label:gr("Options"),popoverProps:S0,icon:CX},(()=>(0,Bt.createElement)(PN,null,(0,Bt.createElement)(HN,{onClick:()=>window.open(o,"_blank").focus(),icon:sX},lr(gr("Report %s"),t.mediaType)))))}function T0(e){let{onClose:t,onSubmit:n}=e;return(0,Bt.createElement)(Wj,{title:gr("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,Bt.createElement)($Q,{spacing:3},(0,Bt.createElement)("p",null,gr("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,Bt.createElement)("p",null,gr("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,Bt.createElement)(lT,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{variant:"tertiary",onClick:t},gr("Cancel"))),(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{variant:"primary",onClick:n},gr("Insert")))))}function B0(e){var t;let{media:n,onClick:o,composite:r,category:a}=e;const[i,l]=(0,Bt.useState)(!1),[s,c]=(0,Bt.useState)(!1),[u,p]=(0,Bt.useState)(!1),[d,b]=(0,Bt.useMemo)((()=>C0(n,a.mediaType)),[n,a.mediaType]),{createErrorNotice:m,createSuccessNotice:M}=Lm(gQ),z=fp((e=>e(wN).getSettings().mediaUpload),[]),f=(0,Bt.useCallback)((e=>{if(u)return;const t=ei(e),{id:n,url:r,caption:a}=t.attributes;n?o(t):(p(!0),window.fetch(r).then((e=>e.blob())).then((e=>{z({filesList:[e],additionalData:{caption:a},onFileChange(e){let[n]=e;Du(n.url)||(o({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),M(gr("Image uploaded and inserted."),{type:"snackbar"}),p(!1))},allowedTypes:R0,onError(e){m(e,{type:"snackbar"}),p(!1)}})})).catch((()=>{l(!0),p(!1)})))}),[u,o,z,m,M]),h=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let g;if(h.length>25){const e="...";g=h.slice(0,25-e.length)+e}const O=(0,Bt.useCallback)((()=>c(!0)),[]),v=(0,Bt.useCallback)((()=>c(!1)),[]);return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(LZ,{isEnabled:!0,blocks:[d]},(e=>{let{draggable:t,onDragStart:o,onDragEnd:i}=e;return(0,Bt.createElement)("div",{className:eM()("block-editor-inserter__media-list__list-item",{"is-hovered":s}),draggable:t,onDragStart:o,onDragEnd:i},(0,Bt.createElement)(ww,{text:g||h},(0,Bt.createElement)("div",{onMouseEnter:O,onMouseLeave:v},(0,Bt.createElement)(kW,Pt({role:"option",as:"div"},r,{className:"block-editor-inserter__media-list__item",onClick:()=>f(d),"aria-label":h}),(0,Bt.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},b,u&&(0,Bt.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,Bt.createElement)(L0,null)))),!u&&(0,Bt.createElement)(N0,{category:a,media:n}))))})),i&&(0,Bt.createElement)(T0,{onClose:()=>l(!1),onSubmit:()=>{o(ei(d)),M(gr("Image inserted."),{type:"snackbar"}),l(!1)}}))}const D0=function(e){let{mediaList:t,category:n,onClick:o,label:r=gr("Media List")}=e;const a=sB();return(0,Bt.createElement)(fB,Pt({},a,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r}),t.map(((e,t)=>(0,Bt.createElement)(B0,{key:e.id||e.sourceId||t,media:e,category:n,onClick:o,composite:a}))))};function I0(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,Bt.useState)(e),[o,r]=(0,Bt.useState)(e),a=Iz(r,250);return(0,Bt.useEffect)((()=>{o!==t&&a(t)}),[o,t]),[t,n,o]}function P0(e){let{rootClientId:t,onInsert:n,category:o}=e;const r=(0,Bt.useRef)();return(0,Bt.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Yq.tabbable.find(r.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,Bt.createElement)("div",{ref:r,className:"block-editor-inserter__media-dialog"},(0,Bt.createElement)(H0,{rootClientId:t,onInsert:n,category:o}))}function H0(e){let{rootClientId:t,onInsert:n,category:o}=e;const[r,a,i]=I0(),{mediaList:l,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,o]=(0,Bt.useState)(),[r,a]=(0,Bt.useState)(!1),i=(0,Bt.useRef)();return(0,Bt.useEffect)((()=>{(async()=>{var n;const r=JSON.stringify({category:e.name,...t});i.current=r,a(!0),o([]);const l=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));r===i.current&&(o(l),a(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(o,{per_page:i?20:10,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||gr("Search");return(0,Bt.createElement)("div",{className:c},(0,Bt.createElement)(OK,{className:`${c}-search`,onChange:a,value:r,label:u,placeholder:u}),s&&(0,Bt.createElement)("div",{className:`${c}-spinner`},(0,Bt.createElement)(L0,null)),!s&&!(null!=l&&l.length)&&(0,Bt.createElement)(EQ,null),!s&&!(null==l||!l.length)&&(0,Bt.createElement)(D0,{rootClientId:t,onClick:n,mediaList:l,category:o}))}const F0=function(e){let{fallback:t=null,children:n}=e;const o=fp((e=>{const{getSettings:t}=e(wN);return!!t().mediaUpload}),[]);return o?n:t},Y0=uj("editor.MediaUpload")((()=>null)),X0=["image","video","audio"];const j0=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:o,onInsert:r}=e;const a=y0(t),i=iq("medium","<"),l="block-editor-inserter__media-tabs",s=(0,Bt.useCallback)((e=>{if(null==e||!e.url)return;const[t]=C0(e,e.type);r(t)}),[r]),c=(0,Bt.useMemo)((()=>a.map((e=>({...e,label:e.labels.name})))),[a]);return(0,Bt.createElement)(Bt.Fragment,null,!i&&(0,Bt.createElement)("div",{className:`${l}-container`},(0,Bt.createElement)("nav",{"aria-label":gr("Media categories")},(0,Bt.createElement)(rQ,{role:"list",className:l},a.map((e=>(0,Bt.createElement)(aQ,{role:"listitem",key:e.name,onClick:()=>o(e),className:eM()(`${l}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,Bt.createElement)(lD,null,(0,Bt.createElement)(JB,null,e.labels.name),(0,Bt.createElement)(AF,{icon:TK}))))),(0,Bt.createElement)("div",{role:"listitem"},(0,Bt.createElement)(F0,null,(0,Bt.createElement)(Y0,{multiple:!1,onSelect:s,allowedTypes:X0,render:e=>{let{open:t}=e;return(0,Bt.createElement)(bE,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},gr("Open Media Library"))}})))))),i&&(0,Bt.createElement)(m0,{categories:c},(e=>(0,Bt.createElement)(H0,{onInsert:r,rootClientId:t,category:e}))))},{Fill:V0,Slot:U0}=aw("__unstableInserterMenuExtension");V0.Slot=U0;const $0=V0,G0=[];const K0=function(e){let{filterValue:t,onSelect:n,onHover:o,rootClientId:r,clientId:a,isAppender:i,__experimentalInsertionIndex:l,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:u=!1,isDraggable:p=!0,shouldFocusBlock:d=!0,prioritizePatterns:b,selectBlockOnInsert:m,orderInitialBlockItems:M}=e;const z=Iz(vx,500),[f,h]=WQ({onSelect:n,rootClientId:r,clientId:a,isAppender:i,insertionIndex:l,shouldFocusBlock:d,selectBlockOnInsert:m}),[g,O,v,A]=IZ(f,h),[y,,_]=OQ(h,f),q=(0,Bt.useMemo)((()=>{if(0===s)return[];const e=HQ(y,t);return void 0!==s?e.slice(0,s):e}),[t,y,s]);let k=c;b&&q.length>2&&(k=0);const w=(0,Bt.useMemo)((()=>{if(0===k)return[];let e=Gx(g,"frecency","desc");!t&&M&&(e=M(e));const n=PQ(e,O,v,t);return void 0!==k?n.slice(0,k):n}),[t,g,O,v,c,M]);(0,Bt.useEffect)((()=>{if(!t)return;const e=w.length+q.length,n=lr(vr("%d result found.","%d results found.",e),e);z(n)}),[t,z]);const E=vZ(w,{step:9}),W=vZ(E.length===w.length?q:G0),L=w.length>0||q.length>0,x=!!w.length&&(0,Bt.createElement)(DZ,{title:(0,Bt.createElement)(uE,null,gr("Blocks"))},(0,Bt.createElement)(BZ,{items:E,onSelect:A,onHover:o,label:gr("Blocks"),isDraggable:p})),C=!!q.length&&(0,Bt.createElement)(DZ,{title:(0,Bt.createElement)(uE,null,gr("Block Patterns"))},(0,Bt.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,Bt.createElement)(_Q,{shownPatterns:W,blockPatterns:q,onClickPattern:_,onHover:o,isDraggable:p})));return(0,Bt.createElement)(PZ,null,!u&&!L&&(0,Bt.createElement)(EQ,null),b?C:x,!!w.length&&!!q.length&&(0,Bt.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?x:C,u&&(0,Bt.createElement)($0.Slot,{fillProps:{onSelect:A,onHover:o,filterValue:t,hasItems:L,rootClientId:f}},(e=>e.length?e:L?null:(0,Bt.createElement)(EQ,null))))},J0=e=>{let{tabId:t,children:n,selected:o,...r}=e;return(0,Bt.createElement)(bE,Pt({role:"tab",tabIndex:o?void 0:-1,"aria-selected":o,id:t,__experimentalIsFocusable:!0},r),n)};const Z0=function e(t){var n;let{className:o,children:r,tabs:a,selectOnMove:i=!0,initialTabName:l,orientation:s="horizontal",activeClass:c="is-active",onSelect:u}=t;const p=Tz(e,"tab-panel"),[d,b]=(0,Bt.useState)(),m=(0,Bt.useCallback)((e=>{b(e),null==u||u(e)}),[u]),M=a.find((e=>{let{name:t}=e;return t===d})),z=`${p}-${null!==(n=null==M?void 0:M.name)&&void 0!==n?n:"none"}`;return(0,Bt.useLayoutEffect)((()=>{if(M)return;const e=a.find((e=>e.name===l));if(!l||e)if(e&&!e.disabled)m(e.name);else{const e=a.find((e=>!e.disabled));e&&m(e.name)}}),[a,M,l,m]),(0,Bt.useEffect)((()=>{if(null==M||!M.disabled)return;const e=a.find((e=>!e.disabled));e&&m(e.name)}),[a,null==M?void 0:M.disabled,m]),(0,Bt.createElement)("div",{className:o},(0,Bt.createElement)(YW,{role:"tablist",orientation:s,onNavigate:i?(e,t)=>{t.click()}:void 0,className:"components-tab-panel__tabs"},a.map((e=>(0,Bt.createElement)(J0,{className:Sz()("components-tab-panel__tabs-item",e.className,{[c]:e.name===d}),tabId:`${p}-${e.name}`,"aria-controls":`${p}-${e.name}-view`,selected:e.name===d,key:e.name,onClick:()=>m(e.name),disabled:e.disabled,label:e.icon&&e.title,icon:e.icon,showTooltip:!!e.icon},!e.icon&&e.title)))),M&&(0,Bt.createElement)("div",{key:z,"aria-labelledby":z,role:"tabpanel",id:`${z}-view`,className:"components-tab-panel__tab-content"},r(M)))},Q0={name:"blocks",title:gr("Blocks")},e1={name:"patterns",title:gr("Patterns")},t1={name:"reusable",title:gr("Reusable"),icon:ML},n1={name:"media",title:gr("Media")};const o1=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,showMedia:r=!1,onSelect:a,prioritizePatterns:i}=e;const l=(0,Bt.useMemo)((()=>{const e=[];return i&&n&&e.push(e1),e.push(Q0),!i&&n&&e.push(e1),r&&e.push(n1),o&&e.push(t1),e}),[i,n,o,r]);return(0,Bt.createElement)(Z0,{className:"block-editor-inserter__tabs",tabs:l,onSelect:a},t)};const r1=(0,Bt.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:a,onSelect:i,showInserterHelpPanel:l,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:u=!0,prioritizePatterns:p}=e;const[d,b,m]=I0(c),[M,z]=(0,Bt.useState)(null),[f,h]=(0,Bt.useState)(null),[g,O]=(0,Bt.useState)(null),[v,A]=(0,Bt.useState)(null),[y,_,q]=WQ({rootClientId:n,clientId:o,isAppender:r,insertionIndex:a,shouldFocusBlock:u}),{showPatterns:k,inserterItems:w}=fp((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(wN);return{showPatterns:!!t(y).length,inserterItems:n(y)}}),[y]),E=(0,Bt.useMemo)((()=>w.some((e=>{let{category:t}=e;return"reusable"===t}))),[w]),W=!!y0(y).length,L=(0,Bt.useCallback)(((e,t,n)=>{_(e,t,n),i()}),[_,i]),x=(0,Bt.useCallback)(((e,t)=>{_(e,{patternName:t}),i()}),[_,i]),C=(0,Bt.useCallback)((e=>{q(!!e),z(e)}),[q,z]),R=(0,Bt.useCallback)((e=>{q(!!e)}),[q]),S=(0,Bt.useCallback)((e=>{h(e)}),[h]),N=(0,Bt.useMemo)((()=>(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)("div",{className:"block-editor-inserter__block-list"},(0,Bt.createElement)(FZ,{rootClientId:y,onInsert:L,onHover:C,showMostUsedBlocks:s})),l&&(0,Bt.createElement)("div",{className:"block-editor-inserter__tips"},(0,Bt.createElement)(uE,{as:"h2"},gr("A tip for using the block editor")),(0,Bt.createElement)(NK,null)))),[y,L,C,s,l]),T=(0,Bt.useMemo)((()=>(0,Bt.createElement)(O0,{rootClientId:y,onInsert:x,onSelectCategory:S,selectedCategory:f})),[y,x,S,f]),B=(0,Bt.useMemo)((()=>(0,Bt.createElement)(A0,{rootClientId:y,onInsert:L,onHover:C})),[y,L,C]),D=(0,Bt.useMemo)((()=>(0,Bt.createElement)(j0,{rootClientId:y,selectedCategory:g,onSelectCategory:O,onInsert:L})),[y,L,g,O]),I=(0,Bt.useCallback)((e=>"blocks"===e.name?N:"patterns"===e.name?T:"reusable"===e.name?B:"media"===e.name?D:void 0),[N,T,B,D]),P=(0,Bt.useRef)();(0,Bt.useImperativeHandle)(t,(()=>({focusSearch:()=>{P.current.focus()}})));const H="patterns"===v&&!m&&f,F=!m&&(k||E||W),Y="media"===v&&!m&&g;return(0,Bt.createElement)("div",{className:"block-editor-inserter__menu"},(0,Bt.createElement)("div",{className:eM()("block-editor-inserter__main-area",{"show-as-tabs":F})},(0,Bt.createElement)(OK,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{M&&z(null),b(e)},value:d,label:gr("Search for blocks and patterns"),placeholder:gr("Search"),ref:P}),!!m&&(0,Bt.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,Bt.createElement)(K0,{filterValue:m,onSelect:i,onHover:C,rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:a,showBlockDirectory:!0,shouldFocusBlock:u})),F&&(0,Bt.createElement)(o1,{showPatterns:k,showReusableBlocks:E,showMedia:W,prioritizePatterns:p,onSelect:A},I),!m&&!F&&(0,Bt.createElement)("div",{className:"block-editor-inserter__no-tab-container"},N)),Y&&(0,Bt.createElement)(P0,{rootClientId:y,onInsert:L,category:g}),l&&M&&(0,Bt.createElement)(gZ,{item:M}),H&&(0,Bt.createElement)(h0,{rootClientId:y,onInsert:x,onHover:R,category:f,showTitlesAsTooltip:!0}))}));function a1(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:a,selectBlockOnInsert:i,orderInitialBlockItems:l}=e;const[s,c]=(0,Bt.useState)(""),[u,p]=WQ({onSelect:t,rootClientId:n,clientId:o,isAppender:r,selectBlockOnInsert:i}),[d]=IZ(u,p),[b]=OQ(p,u),{setInserterIsOpened:m,insertionIndex:M}=fp((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:r}=e(wN),a=t(),i=n(o),l=r();return{setInserterIsOpened:a.__experimentalSetIsInserterOpened,insertionIndex:-1===i?l:i}}),[o]),z=b.length&&(!!s||a),f=z&&b.length>6||d.length>6;(0,Bt.useEffect)((()=>{m&&m(!1)}),[m]);let h=0;return z&&(h=a?4:2),(0,Bt.createElement)("div",{className:eM()("block-editor-inserter__quick-inserter",{"has-search":f,"has-expand":m})},f&&(0,Bt.createElement)(OK,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{c(e)},label:gr("Search for blocks and patterns"),placeholder:gr("Search")}),(0,Bt.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,Bt.createElement)(K0,{filterValue:s,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:h,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:a,selectBlockOnInsert:i,orderInitialBlockItems:l})),m&&(0,Bt.createElement)(bE,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{m({rootClientId:n,insertionIndex:M,filterValue:s})},"aria-label":gr("Browse all. This will open the main inserter panel in the editor toolbar.")},gr("Browse all")))}const i1=e=>{let{onToggle:t,disabled:n,isOpen:o,blockTitle:r,hasSingleBlockType:a,toggleProps:i={},prioritizePatterns:l}=e;const{as:s=bE,label:c,onClick:u,...p}=i;let d=c;return!d&&a?d=lr(Or("Add %s","directly add the only allowed block"),r):!d&&l?d=gr("Add pattern"):d||(d=Or("Add block","Generic label for block inserter button")),(0,Bt.createElement)(s,Pt({icon:eP,label:d,tooltipPosition:"bottom",onClick:function(e){t&&t(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:n},p))};class l1 extends Bt.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:a,directInsertBlock:i,toggleProps:l,hasItems:s,renderToggle:c=i1,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!s,blockTitle:r,hasSingleBlockType:a,directInsertBlock:i,toggleProps:l,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:a,__experimentalIsQuick:i,prioritizePatterns:l,onSelectOrClose:s,selectBlockOnInsert:c,orderInitialBlockItems:u}=this.props;return i?(0,Bt.createElement)(a1,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:l,selectBlockOnInsert:c,orderInitialBlockItems:u}):(0,Bt.createElement)(r1,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:a,prioritizePatterns:l})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:a}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,Bt.createElement)(BW,{className:"block-editor-inserter",contentClassName:eM()("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:gr("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:a})}}const s1=Mn([dj(((e,t)=>{var n;let{clientId:o,rootClientId:r,shouldDirectInsert:a=!0}=t;const{getBlockRootClientId:i,hasInserterItems:l,getAllowedBlocks:s,__experimentalGetDirectInsertBlock:c,getSettings:u}=e(wN),{getBlockVariations:p}=e(kl);r=r||i(o)||void 0;const d=s(r),b=a&&c(r),m=u(),M=1===(null==d?void 0:d.length)&&0===(null===(n=p(d[0].name,"inserter"))||void 0===n?void 0:n.length);let z=!1;return M&&(z=d[0]),{hasItems:l(r),hasSingleBlockType:M,blockTitle:z?z.title:"",allowedBlockType:z,directInsertBlock:b,rootClientId:r,prioritizePatterns:m.__experimentalPreferPatternsOnRoot&&!r}})),Mj(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:r,isAppender:a,hasSingleBlockType:i,allowedBlockType:l,directInsertBlock:s,onSelectOrClose:c,selectBlockOnInsert:u}=t;if(!i&&!s)return;const{insertBlock:p}=e(wN);let d;if(s){const e=function(e){const{getBlock:t,getPreviousBlockClientId:a}=o(wN);if(!e||!r&&!n)return{};const i={};let l={};if(r){const e=t(r),n=t(a(r));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(l=(null==n?void 0:n.attributes)||{})}else{var c;const e=t(n);if(null!=e&&null!==(c=e.innerBlocks)&&void 0!==c&&c.length){const t=e.innerBlocks[e.innerBlocks.length-1];s&&(null==s?void 0:s.name)===t.name&&(l=t.attributes)}}return e.forEach((e=>{l.hasOwnProperty(e)&&(i[e]=l[e])})),i}(s.attributesToCopy);d=Ja(s.name,{...s.attributes||{},...e})}else d=Ja(l.name);var b;(p(d,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:i,getBlockRootClientId:l}=o(wN);if(r)return e(r);const s=t();return!a&&s&&l(s)===n?e(s)+1:i(n).length}(),n,u),c)&&c({clientId:null===(b=d)||void 0===b?void 0:b.clientId});vx(lr(gr("%s block added"),l.title))}}})),zj((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(l1),c1=(0,Bt.forwardRef)(((e,t)=>(0,Bt.createElement)(s1,Pt({ref:t},e,{orderInitialBlockItems:void 0}))));const u1=Mn(dj(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(wN),a=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:a,isLocked:!!r(t.rootClientId),placeholder:i}})),Mj(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(wN);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:a}=e;if(t)return null;const i=js(r)||gr("Type / to choose a block");return(0,Bt.createElement)("div",{"data-root-client-id":a||"",className:eM()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,Bt.createElement)("p",{tabIndex:"0",role:"button","aria-label":gr("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{cq!==e.keyCode&&32!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,Bt.createElement)(c1,{rootClientId:a,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function p1(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:a}=e;return(0,Bt.createElement)(c1,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:l,isOpen:s,blockTitle:c,hasSingleBlockType:u}=e;n=u?lr(Or("Add %s","directly add the only allowed block"),c):Or("Add block","Generic label for block inserter button");const p=!u;let d=(0,Bt.createElement)(bE,{ref:t,onFocus:r,tabIndex:a,className:eM()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":p?"true":void 0,"aria-expanded":p?s:void 0,disabled:l,label:n},!u&&(0,Bt.createElement)(uE,{as:"span"},n),(0,Bt.createElement)(AF,{icon:eP}));return(p||u)&&(d=(0,Bt.createElement)(ww,{text:n},d)),d},isAppender:!0})}(0,Bt.forwardRef)(((e,t)=>(jo("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),p1(e,t))));const d1=(0,Bt.forwardRef)(p1);function b1(e){let{rootClientId:t}=e;return fp((e=>e(wN).canInsertBlockType(Sa(),t)))?(0,Bt.createElement)(u1,{rootClientId:t}):(0,Bt.createElement)(d1,{rootClientId:t,className:"block-list-appender__toggle"})}const m1=function(e){let{rootClientId:t,renderAppender:n,className:o,tagName:r="div"}=e;const a=function(e,t){const{hideInserter:n,isParentSelected:o}=fp((t=>{const{getTemplateLock:n,getSelectedBlockClientId:o,__unstableGetEditorMode:r}=t(wN),a=o();return{hideInserter:!!n(e)||"zoom-out"===r(),isParentSelected:e===a||!e&&!a}}),[e]);return n||!1===t?null:t?(0,Bt.createElement)(t,null):o?(0,Bt.createElement)(b1,{rootClientId:e}):null}(t,n);return a?(0,Bt.createElement)(r,{tabIndex:-1,className:eM()("block-list-appender wp-block",o),contentEditable:!1,"data-block":!0},a):null};const M1=function(e){return Xq((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},z1=Number.MAX_SAFE_INTEGER;(0,Bt.createContext)();const f1=function(e){let{previousClientId:t,nextClientId:n,children:o,__unstablePopoverSlot:r,__unstableContentRef:a,...i}=e;const[l,s]=(0,Bt.useReducer)((e=>(e+1)%z1),0),{orientation:c,rootClientId:u,isVisible:p}=fp((e=>{var o;const{getBlockListSettings:r,getBlockRootClientId:a,isBlockVisible:i}=e(wN),l=a(null!=t?t:n);return{orientation:(null===(o=r(l))||void 0===o?void 0:o.orientation)||"vertical",rootClientId:l,isVisible:i(t)&&i(n)}}),[t,n]),d=sK(t),b=sK(n),m="vertical"===c,M=(0,Bt.useMemo)((()=>{if(l<0||!d&&!b||!p)return;const{ownerDocument:e}=d||b;return{ownerDocument:e,getBoundingClientRect(){const e=d?d.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0,r=0,a=0;return m?(o=e?e.bottom:t.top,r=e?e.width:t.width,a=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,a=e?e.height:t.height,Ar()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0)),new window.DOMRect(n,o,r,a)}}}),[d,b,l,m,p]),z=M1(a);return(0,Bt.useLayoutEffect)((()=>{if(!d)return;const e=new window.MutationObserver(s);return e.observe(d,{attributes:!0}),()=>{e.disconnect()}}),[d]),(0,Bt.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(s);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,Bt.useLayoutEffect)((()=>{if(d)return d.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=d.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[d]),(d||b)&&p?(0,Bt.createElement)(gw,Pt({ref:z,animate:!1,anchor:M,focusOnMount:!1,__unstableSlotName:r||null,key:n+"--"+u},i,{className:eM()("block-editor-block-popover","block-editor-block-popover__inbetween",i.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled"}),(0,Bt.createElement)("div",{className:"block-editor-block-popover__inbetween-container"},o)):null},h1=Number.MAX_SAFE_INTEGER;const g1=(0,Bt.forwardRef)((function(e,t){let{clientId:n,bottomClientId:o,children:r,__unstableRefreshSize:a,__unstableCoverTarget:i=!1,__unstablePopoverSlot:l,__unstableContentRef:s,shift:c=!0,...u}=e;const p=sK(n),d=sK(null!=o?o:n),b=Hz([t,M1(s)]),[m,M]=(0,Bt.useReducer)((e=>(e+1)%h1),0);(0,Bt.useLayoutEffect)((()=>{if(!p)return;const e=new window.MutationObserver(M);return e.observe(p,{attributes:!0}),()=>{e.disconnect()}}),[p]);const z=(0,Bt.useMemo)((()=>m<0||!p||d!==p?{}:{position:"absolute",width:p.offsetWidth,height:p.offsetHeight}),[p,d,a,m]),f=(0,Bt.useMemo)((()=>{if(!(m<0||!p||o&&!d))return{getBoundingClientRect(){var e,t,n,o;const r=p.getBoundingClientRect(),a=null==d?void 0:d.getBoundingClientRect(),i=Math.min(r.left,null!==(e=null==a?void 0:a.left)&&void 0!==e?e:1/0),l=Math.min(r.top,null!==(t=null==a?void 0:a.top)&&void 0!==t?t:1/0),s=Math.max(r.right,null!==(n=a.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=a.bottom)&&void 0!==o?o:-1/0)-l;return new window.DOMRect(i,l,s,c)},ownerDocument:p.ownerDocument}}),[o,d,p,m]);return!p||o&&!d?null:(0,Bt.createElement)(gw,Pt({ref:b,animate:!1,focusOnMount:!1,anchor:f,__unstableSlotName:l||null,placement:"top-start",resize:!1,flip:!1,shift:c},u,{className:eM()("block-editor-block-popover",u.className),variant:"unstyled"}),i&&(0,Bt.createElement)("div",{style:z},r),!i&&r)})),O1={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};const v1=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:o}=fp((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(wN),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),r=pX();return(0,Bt.createElement)(g1,{clientId:o,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,Bt.createElement)(Q_.div,{"data-testid":"block-popover-drop-zone",initial:r?O1.show:O1.hide,animate:O1.show,exit:r?O1.show:O1.exit,className:"block-editor-block-popover__drop-zone-foreground"}))},A1=(0,Bt.createContext)();function y1(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=Lm(wN),a=(0,Bt.useContext)(A1),i=(0,Bt.useRef)(),{orientation:l,previousClientId:s,nextClientId:c,rootClientId:u,isInserterShown:p,isDistractionFree:d,isNavigationMode:b}=fp((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:a,getPreviousBlockClientId:i,getNextBlockClientId:l,getSettings:s,isNavigationMode:c}=e(wN),u=r(),p=n(u.rootClientId);if(!p.length)return{};let d=p[u.index-1],b=p[u.index];for(;a(d);)d=i(d);for(;a(b);)b=l(b);const m=s();return{previousClientId:d,nextClientId:b,orientation:(null===(t=o(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:m.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),m=pX();const M={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:p?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},z={start:{scale:m?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(d&&!b)return null;const f=eM()("block-editor-block-list__insertion-point","is-"+l);return(0,Bt.createElement)(f1,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,Bt.createElement)(Q_.div,{layout:!m,initial:m?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&c&&o(c,-1)},onFocus:function(e){e.target!==i.current&&(a.current=!0)},className:eM()(f,{"is-with-inserter":p}),onHoverEnd:function(e){e.target!==i.current||a.current||r()}},(0,Bt.createElement)(Q_.div,{variants:M,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),p&&(0,Bt.createElement)(Q_.div,{variants:z,className:eM()("block-editor-block-list__insertion-point-inserter")},(0,Bt.createElement)(c1,{position:"bottom center",clientId:c,rootClientId:u,__experimentalIsQuick:!0,onToggle:e=>{a.current=e},onSelectOrClose:()=>{a.current=!1}}))))}function _1(e){const{insertionPoint:t,isVisible:n}=fp((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(wN);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,Bt.createElement)(v1,Pt({key:`${t.rootClientId}-${t.index}`},e)):(0,Bt.createElement)(y1,e):null}function q1(){const e=(0,Bt.useContext)(A1),t=fp((e=>e(wN).getSettings().isDistractionFree||"zoom-out"===e(wN).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:a,isMultiSelecting:i,getSelectedBlockClientIds:l,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=fp(wN),{showInsertionPoint:u,hideInsertionPoint:p}=Lm(wN);return Xq((o=>{if(!t)return o.addEventListener("mousemove",a),()=>{o.removeEventListener("mousemove",a)};function a(t){var o;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void p();let a;if(!t.target.classList.contains("is-root-container")){a=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(s(a))return;const d=(null===(o=n(a))||void 0===o?void 0:o.orientation)||"vertical",b=t.clientY,m=t.clientX;let M=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===d&&t.top>b||e.classList.contains("wp-block")&&"horizontal"===d&&(Ar()?t.rightm)}));if(!M)return void p();if(!M.id&&(M=M.firstElementChild,!M))return void p();const z=M.id.slice("block-".length);if(!z||c(z))return;if(l().includes(z))return;const f=M.getBoundingClientRect();if("horizontal"===d&&(t.clientY>f.bottom||t.clientYf.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,w1="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function E1(e){return fp((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(wN),{getBlockType:r,getActiveBlockVariation:a}=t(kl),i=n(e),l=r(i);if(!l)return null;const s=o(e),c=a(i,s),u=Ia(l)||Pa(l),p={isSynced:u,title:l.title,icon:l.icon,description:l.description,anchor:null==s?void 0:s.anchor};return c?{isSynced:u,title:c.title||l.title,icon:c.icon||l.icon,description:c.description||l.description,anchor:null==s?void 0:s.anchor}:p}),[e])}function W1(e){let{clientId:t,maximumLength:n,context:o}=e;const{attributes:r,name:a,reusableBlockTitle:i}=fp((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=e(wN),a=n(t);if(!a)return{};const i=Ia(Na(a));return{attributes:o(t),name:a,reusableBlockTitle:i&&r(o(t).ref)}}),[t]),l=E1(t);if(!a||!l)return null;const s=Na(a),c=s?Mi(s,r,o):null,u=i||c,p=u&&u!==s.title?u:l.title;if(n&&n>0&&p.length>n){const e="...";return p.slice(0,n-e.length)+e}return p}function L1(e){let{clientId:t,maximumLength:n,context:o}=e;return W1({clientId:t,maximumLength:n,context:o})}const x1=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:r,onDragEnd:a}=e;const{srcRootClientId:i,isDraggable:l,icon:s}=fp((e=>{var t;const{canMoveBlocks:o,getBlockRootClientId:r,getBlockName:a}=e(wN),i=r(n[0]),l=a(n[0]);return{srcRootClientId:i,isDraggable:o(n,i),icon:null===(t=Na(l))||void 0===t?void 0:t.icon}}),[n]),c=(0,Bt.useRef)(!1),[u,p,d]=function(){const e=(0,Bt.useRef)(null),t=(0,Bt.useRef)(null),n=(0,Bt.useRef)(null),o=(0,Bt.useRef)(null);return(0,Bt.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,Bt.useCallback)((r=>{e.current=r.clientY,n.current=lk(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,Bt.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,a=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>a){const e=Math.max(r-a-50,0),n=Math.max(i-a-50,0)/e;t.current=25*n}else if(o.clientY{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:b,stopDraggingBlocks:m}=Lm(wN);if((0,Bt.useEffect)((()=>()=>{c.current&&m()}),[]),!l)return t({draggable:!1});const M={type:"block",srcClientIds:n,srcRootClientId:i};return(0,Bt.createElement)(wZ,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:M,onDragStart:e=>{b(n),c.current=!0,u(e),r&&r()},onDragOver:p,onDragEnd:()=>{m(),c.current=!1,d(),a&&a()},__experimentalDragComponent:(0,Bt.createElement)(WZ,{count:n.length,icon:s})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))},C1=(e,t)=>"up"===e?"horizontal"===t?Ar()?"right":"left":"up":"down"===e?"horizontal"===t?Ar()?"left":"right":"down":null;function R1(e,t,n,o,r,a,i){const l=n+1;if(e>1)return function(e,t,n,o,r,a){const i=t+1;if(n&&o)return gr("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=C1("down",a);if("down"===t)return lr(gr("Move %1$d blocks from position %2$d down by one place"),e,i);if("left"===t)return lr(gr("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return lr(gr("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r>0&&o){const e=C1("down",a);if("down"===e)return gr("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return gr("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return gr("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=C1("up",a);if("up"===t)return lr(gr("Move %1$d blocks from position %2$d up by one place"),e,i);if("left"===t)return lr(gr("Move %1$d blocks from position %2$d left by one place"),e,i);if("right"===t)return lr(gr("Move %1$d blocks from position %2$d right by one place"),e,i)}if(r<0&&n){const e=C1("up",a);if("up"===e)return gr("Blocks cannot be moved up as they are already at the top");if("left"===e)return gr("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return gr("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,a,i);if(o&&r)return lr(gr("Block %s is the only block, and cannot be moved"),t);if(a>0&&!r){const e=C1("down",i);if("down"===e)return lr(gr("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return lr(gr("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return lr(gr("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(a>0&&r){const e=C1("down",i);if("down"===e)return lr(gr("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return lr(gr("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return lr(gr("Block %1$s is at the end of the content and can’t be moved right"),t)}if(a<0&&!o){const e=C1("up",i);if("up"===e)return lr(gr("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return lr(gr("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return lr(gr("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(a<0&&o){const e=C1("up",i);if("up"===e)return lr(gr("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return lr(gr("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return lr(gr("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const S1=(e,t)=>"up"===e?"horizontal"===t?Ar()?TK:BK:dX:"down"===e?"horizontal"===t?Ar()?BK:TK:bX:null,N1=(e,t)=>"up"===e?"horizontal"===t?Ar()?gr("Move right"):gr("Move left"):gr("Move up"):"down"===e?"horizontal"===t?Ar()?gr("Move left"):gr("Move right"):gr("Move down"):null,T1=(0,Bt.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:r,...a}=e;const i=Tz(T1),l=Array.isArray(n)?n:[n],s=l.length,{blockType:c,isDisabled:u,rootClientId:p,isFirst:d,isLast:b,firstIndex:m,orientation:M="vertical"}=fp((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:a,getBlock:i,getBlockListSettings:s}=e(wN),c=l[0],u=n(c),p=t(c),d=t(l[l.length-1]),b=a(u),m=i(c),M=0===p,z=d===b.length-1,{orientation:f}=s(u)||{};return{blockType:m?Na(m.name):null,isDisabled:"up"===o?M:z,rootClientId:u,firstIndex:p,isFirst:M,isLast:z,orientation:r||f}}),[n,o]),{moveBlocksDown:z,moveBlocksUp:f}=Lm(wN),h="up"===o?f:z,g=`block-editor-block-mover-button__description-${i}`;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(bE,Pt({ref:t,className:eM()("block-editor-block-mover-button",`is-${o}-button`),icon:S1(o,M),label:N1(o,M),"aria-describedby":g},a,{onClick:u?null:e=>{h(n,p),a.onClick&&a.onClick(e)},disabled:u,__experimentalIsFocusable:!0})),(0,Bt.createElement)(uE,{id:g},R1(s,c&&c.title,m,d,b,"up"===o?-1:1,M)))})),B1=(0,Bt.forwardRef)(((e,t)=>(0,Bt.createElement)(T1,Pt({direction:"up",ref:t},e)))),D1=(0,Bt.forwardRef)(((e,t)=>(0,Bt.createElement)(T1,Pt({direction:"down",ref:t},e))));const I1=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:o,rootClientId:r,isFirst:a,isLast:i,orientation:l}=fp((e=>{var n;const{getBlockIndex:o,getBlockListSettings:r,canMoveBlocks:a,getBlockOrder:i,getBlockRootClientId:l}=e(wN),s=Array.isArray(t)?t:[t],c=s[0],u=l(c),p=o(c),d=o(s[s.length-1]),b=i(u);return{canMove:a(t,u),rootClientId:u,isFirst:0===p,isLast:d===b.length-1,orientation:null===(n=r(u))||void 0===n?void 0:n.orientation}}),[t]);if(!o||a&&i&&!r)return null;const s=gr("Drag");return(0,Bt.createElement)($W,{className:eM()("block-editor-block-mover",{"is-horizontal":"horizontal"===l})},!n&&(0,Bt.createElement)(x1,{clientIds:t},(e=>(0,Bt.createElement)(bE,Pt({icon:EZ,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,Bt.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,Bt.createElement)(LW,null,(e=>(0,Bt.createElement)(B1,Pt({clientIds:t},e)))),(0,Bt.createElement)(LW,null,(e=>(0,Bt.createElement)(D1,Pt({clientIds:t},e))))))};const P1=function(e){let{clientId:t,rootClientId:n}=e;const o=E1(t),r=fp((e=>{var o;const{getBlock:r,getBlockIndex:a,hasBlockMovingClientId:i,getBlockListSettings:l,__unstableGetEditorMode:s}=e(wN),c=a(t),{name:u,attributes:p}=r(t);return{index:c,name:u,attributes:p,blockMovingMode:i(),orientation:null===(o=l(n))||void 0===o?void 0:o.orientation,editorMode:s()}}),[t,n]),{index:a,name:i,attributes:l,blockMovingMode:s,orientation:c,editorMode:u}=r,{setNavigationMode:p,removeBlock:d}=Lm(wN),b=(0,Bt.useRef)(),m=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vertical";const r=null==e?void 0:e.title,a=e?Mi(e,t,"accessibility"):"",i=void 0!==n,l=a&&a!==r;return i&&"vertical"===o?l?lr(gr("%1$s Block. Row %2$d. %3$s"),r,n,a):lr(gr("%1$s Block. Row %2$d"),r,n):i&&"horizontal"===o?l?lr(gr("%1$s Block. Column %2$d. %3$s"),r,n,a):lr(gr("%1$s Block. Column %2$d"),r,n):l?lr(gr("%1$s Block. %2$s"),r,a):lr(gr("%s Block"),r)}(Na(i),l,a+1,c);(0,Bt.useEffect)((()=>{b.current.focus(),vx(m)}),[m]);const M=sK(t),{hasBlockMovingClientId:z,getBlockIndex:f,getBlockRootClientId:h,getClientIdsOfDescendants:g,getSelectedBlockClientId:O,getMultiSelectedBlocksEndClientId:v,getPreviousBlockClientId:A,getNextBlockClientId:y}=fp(wN),{selectBlock:_,clearSelectedBlock:q,setBlockMovingClientId:k,moveBlockToPosition:w}=Lm(wN),E=eM()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!s}),W=gr("Drag");return(0,Bt.createElement)("div",{className:E},(0,Bt.createElement)(lT,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,Bt.createElement)(cT,null,(0,Bt.createElement)(IK,{icon:null==o?void 0:o.icon,showColors:!0})),(0,Bt.createElement)(cT,null,"zoom-out"===u&&(0,Bt.createElement)(I1,{clientIds:[t],hideDragHandle:!0}),"navigation"===u&&(0,Bt.createElement)(x1,{clientIds:[t]},(e=>(0,Bt.createElement)(bE,Pt({icon:EZ,className:"block-selection-button_drag-handle","aria-hidden":"true",label:W,tabIndex:"-1"},e))))),(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{ref:b,onClick:"navigation"===u?()=>p(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,o=n===mq,r=n===zq,a=n===bq,i=n===Mq,l=9===n,s=n===uq,c=n===cq,u=32===n,p=e.shiftKey;if(n===sq||n===fq)return d(t),void e.preventDefault();const b=O(),m=v(),E=A(m||b),W=y(m||b),L=l&&p||o,x=l&&!p||r,C=a,R=i;let S;if(L)S=E;else if(x)S=W;else if(C){var N;S=null!==(N=h(b))&&void 0!==N?N:b}else if(R){var T;S=null!==(T=g([b])[0])&&void 0!==T?T:b}const B=z();if(s&&B&&!e.defaultPrevented&&(k(null),e.preventDefault()),(c||u)&&B){const e=h(B),t=h(b),n=f(B);let o=f(b);n{!function(e){const[t]=Yq.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);EJ("core/block-editor/focus-toolbar",l),(0,Bt.useEffect)((()=>{a&&l()}),[n,a,l]),(0,Bt.useEffect)((()=>{let t=0;return i&&!a&&(t=window.requestAnimationFrame((()=>{const t=U1(e.current),n=i||0;t[n]&&function(e){return e.contains(e.ownerDocument.activeElement)}(e.current)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=U1(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,a])}const G1=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...a}=e;const i=(0,Bt.useRef)(),l=function(e){const[t,n]=(0,Bt.useState)(!0),o=(0,Bt.useCallback)((()=>{const t=!Yq.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||jo("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,Bt.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(i);return $1(i,n,l,o,r),l?(0,Bt.createElement)(V1,Pt({label:a["aria-label"],ref:i},a),t):(0,Bt.createElement)(YW,Pt({orientation:"horizontal",role:"toolbar",ref:i},a),t)},{clearTimeout:K1,setTimeout:J1}=window,Z1=()=>{},Q1=200;function e2(e){let{ref:t,isFocused:n,debounceTimeout:o=Q1,onChange:r=Z1}=e;const[a,i]=(0,Bt.useState)(!1),l=(0,Bt.useRef)(),s=e=>{null!=t&&t.current&&i(e),r(e)},c=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},u=()=>{const e=l.current;e&&K1&&K1(e)};return(0,Bt.useEffect)((()=>()=>{s(!1),u()}),[]),{showMovers:a,debouncedShowMovers:e=>{e&&e.stopPropagation(),u(),a||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),u(),l.current=J1((()=>{c()&&s(!1)}),o)}}}function t2(e){let{ref:t,debounceTimeout:n=Q1,onChange:o=Z1}=e;const[r,a]=(0,Bt.useState)(!1),{showMovers:i,debouncedShowMovers:l,debouncedHideMovers:s}=e2({ref:t,debounceTimeout:n,isFocused:r,onChange:o}),c=(0,Bt.useRef)(!1),u=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,Bt.useEffect)((()=>{const e=t.current,n=()=>{u()&&(a(!0),l())},o=()=>{u()||(a(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",o,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",o))}}),[t,c,a,l,s]),{showMovers:i,gestures:{onMouseMove:l,onMouseLeave:s}}}function n2(){const{selectBlock:e,toggleBlockHighlight:t}=Lm(wN),{firstParentClientId:n,shouldHide:o,isDistractionFree:r}=fp((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:r}=e(wN),{hasBlockSupport:a}=e(kl),i=n(o()),l=i[i.length-1],s=Na(t(l)),c=r();return{firstParentClientId:l,shouldHide:!a(s,"__experimentalParentSelector",!0),isDistractionFree:c.isDistractionFree}}),[]),a=E1(n),i=(0,Bt.useRef)(),{gestures:l}=t2({ref:i,onChange(e){e&&r||t(n,e)}});return o||void 0===n?null:(0,Bt.createElement)("div",Pt({className:"block-editor-block-parent-selector",key:n,ref:i},l),(0,Bt.createElement)(RW,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:lr(gr("Select %s"),null==a?void 0:a.title),showTooltip:!0,icon:(0,Bt.createElement)(IK,{icon:null==a?void 0:a.icon})}))}const o2=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function r2(e){let{blocks:t}=e;return(0,Bt.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,Bt.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,Bt.createElement)(gw,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,Bt.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,Bt.createElement)("div",{className:"block-editor-block-switcher__preview-title"},gr("Preview")),(0,Bt.createElement)(fZ,{viewportWidth:500,blocks:t})))))}function a2(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:o}=e;return t.map((e=>(0,Bt.createElement)(i2,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:o})))}function i2(e){let{item:t,onSelect:n,setHoveredTransformItemName:o}=e;const{name:r,icon:a,title:i,isDisabled:l}=t;return(0,Bt.createElement)(HN,{className:ys(r),onClick:e=>{e.preventDefault(),n(r)},disabled:l,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r)},(0,Bt.createElement)(IK,{icon:a,showColors:!0}),i)}const l2=e=>{let{className:t,possibleBlockTransformations:n,onSelect:o,blocks:r}=e;const[a,i]=(0,Bt.useState)(),{priorityTextTransformations:l,restTransformations:s}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,Bt.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:o}=e,{name:r}=n;return t[o](0,Bt.createElement)(i2,{key:e.name,item:e,onSelect:o,setHoveredTransformItemName:i}))),!c&&u),!!c&&(0,Bt.createElement)(PN,{className:t},u))};class s2{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.value=e,this._currentValue,this._valueAsArray}entries(){return this._valueAsArray.entries(...arguments)}forEach(){return this._valueAsArray.forEach(...arguments)}keys(){return this._valueAsArray.keys(...arguments)}values(){return this._valueAsArray.values(...arguments)}get value(){return this._currentValue}set value(e){e=String(e),this._valueAsArray=[...new Set(e.split(/\s+/g).filter(Boolean))],this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(e){return this._valueAsArray[e]}contains(e){return-1!==this._valueAsArray.indexOf(e)}add(){for(var e=arguments.length,t=new Array(e),n=0;n!t.includes(e))).join(" ")}toggle(e,t){return void 0===t&&(t=!this.contains(e)),t?this.add(e):this.remove(e),t}replace(e,t){return!!this.contains(e)&&(this.remove(e),this.add(t),!0)}supports(){return!0}}function c2(e,t,n){const o=new s2(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function u2(e){return null==e?void 0:e.find((e=>e.isDefault))}function p2(e){let{clientId:t,onSwitch:n}=e;const{styles:o,block:r,blockType:a,className:i}=fp((e=>{const{getBlock:n}=e(wN),o=n(t);if(!o)return{};const r=Na(o.name),{getBlockStyles:a}=e(kl);return{block:o,blockType:r,styles:a(o.name),className:o.attributes.className||""}}),[t]),{updateBlockAttributes:l}=Lm(wN),s=function(e){return e&&0!==e.length?u2(e)?e:[{name:"default",label:Or("Default","block style"),isDefault:!0},...e]:[]}(o),c=function(e,t){for(const n of new s2(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(o)return o}return u2(e)}(s,i),u=function(e,t){return(0,Bt.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?ci(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?ei(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(r,a);return{onSelect:e=>{const o=c2(i,c,e);l(t,{className:o}),n()},stylesToRender:s,activeStyle:c,genericPreviewBlock:u,className:i}}const d2=()=>{};function b2(e){let{clientId:t,onSwitch:n=d2}=e;const{onSelect:o,stylesToRender:r,activeStyle:a}=p2({clientId:t,onSwitch:n});return r&&0!==r.length?(0,Bt.createElement)(Bt.Fragment,null,r.map((e=>{const t=e.label||e.name;return(0,Bt.createElement)(HN,{key:e.name,icon:a.name===e.name?xX:null,onClick:()=>o(e)},(0,Bt.createElement)(kP,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function m2(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:o}=t;return(0,Bt.createElement)(PN,{label:gr("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,Bt.createElement)(b2,{clientId:o,onSwitch:n}))}const M2=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:o,name:r,innerBlocks:a=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of a){const o=M2(e,t,n);if(o)return o}}},z2=(e,t)=>{const n=function(e,t){var n;const o=null===(n=Na(e))||void 0===n?void 0:n.attributes;if(!o)return[];const r=Object.keys(o);return t?r.filter((e=>{var n;return(null===(n=o[e])||void 0===n?void 0:n.__experimentalRole)===t})):r}(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t},f2=(e,t)=>{const n=z2(t.name,t.attributes);e.attributes={...e.attributes,...n}},h2=(e,t)=>(0,Bt.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>ei(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=M2(r,t.name,o);if(n){e=!0,o.add(n.clientId),f2(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function g2(e){let{patterns:t,onSelect:n}=e;return(0,Bt.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,Bt.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,Bt.createElement)(gw,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,Bt.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,Bt.createElement)("div",{className:"block-editor-block-switcher__preview-title"},gr("Preview")),(0,Bt.createElement)(O2,{patterns:t,onSelect:n})))))}function O2(e){let{patterns:t,onSelect:n}=e;const o=sB();return(0,Bt.createElement)(fB,Pt({},o,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":gr("Patterns list")}),t.map((e=>(0,Bt.createElement)(v2,{key:e.name,pattern:e,onSelect:n,composite:o}))))}function v2(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-switcher__preview-patterns-container",a=Tz(v2,`${r}-list__item-description`);return(0,Bt.createElement)("div",{className:`${r}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?a:void 0},(0,Bt.createElement)(kW,Pt({role:"option",as:"div"},o,{className:`${r}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,Bt.createElement)(fZ,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,Bt.createElement)("div",{className:`${r}-list__item-title`},t.title)),!!t.description&&(0,Bt.createElement)(uE,{id:a},t.description))}const A2=function(e){let{blocks:t,patterns:n,onSelect:o}=e;const[r,a]=(0,Bt.useState)(!1),i=h2(n,t);return i.length?(0,Bt.createElement)(PN,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},r&&(0,Bt.createElement)(g2,{patterns:i,onSelect:o}),(0,Bt.createElement)(HN,{onClick:e=>{e.preventDefault(),a(!r)},icon:TK},gr("Patterns"))):null},y2=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:o,multiSelect:r}=Lm(wN),a=E1(n[0].clientId),{possibleBlockTransformations:i,canRemove:l,hasBlockStyles:s,icon:c,patterns:u}=fp((e=>{const{getBlockRootClientId:o,getBlockTransformItems:r,__experimentalGetPatternTransformItems:i}=e(wN),{getBlockStyles:l,getBlockType:s}=e(kl),{canRemoveBlocks:c}=e(wN),u=o(Array.isArray(t)?t[0]:t),[{name:p}]=n,d=1===n.length,b=d&&l(p);let m;if(d)m=null==a?void 0:a.icon;else{var M;const e=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size;m=e?null===(M=s(p))||void 0===M?void 0:M.icon:o2}return{possibleBlockTransformations:r(n,u),canRemove:c(t,u),hasBlockStyles:!(null==b||!b.length),icon:m,patterns:i(n,u)}}),[t,n,null==a?void 0:a.icon]),p=W1({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),d=1===n.length&&Ia(n[0]),b=1===n.length&&Pa(n[0]);function m(e){e.length>1&&r(e[0].clientId,e[e.length-1].clientId)}const M=!!i.length&&l&&!b,z=!(null==u||!u.length)&&l;if(!s&&!M)return(0,Bt.createElement)($W,null,(0,Bt.createElement)(RW,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:p,icon:(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(IK,{icon:c,showColors:!0}),(d||b)&&(0,Bt.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},p))}));const f=p,h=1===n.length?lr(gr("%s: Change block type or style"),p):lr(vr("Change type of %d block","Change type of %d blocks",n.length),n.length),g=s||M||z;return(0,Bt.createElement)($W,null,(0,Bt.createElement)(LW,null,(e=>(0,Bt.createElement)(VW,{className:"block-editor-block-switcher",label:f,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(IK,{icon:c,className:"block-editor-block-switcher__toggle",showColors:!0}),(d||b)&&(0,Bt.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},p)),toggleProps:{describedBy:h,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:r}=e;return g&&(0,Bt.createElement)("div",{className:"block-editor-block-switcher__container"},z&&(0,Bt.createElement)(A2,{blocks:n,patterns:u,onSelect:e=>{!function(e){o(t,e),m(e)}(e),r()}}),M&&(0,Bt.createElement)(l2,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{!function(e){const r=si(n,e);o(t,r),m(r)}(e),r()}}),s&&(0,Bt.createElement)(m2,{hoveredBlock:n[0],onSwitch:r}))})))))},_2=e=>{let{clientIds:t}=e;const n=fp((e=>e(wN).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,Bt.createElement)(y2,{clientIds:t,blocks:n})},{Fill:q2,Slot:k2}=aw("__unstableBlockToolbarLastItem");q2.Slot=k2;const w2=q2;var E2=n(2152),W2=n.n(E2);function L2(e){const t=(0,Bt.useRef)(e);return t.current=e,t}function x2(e,t){const n=L2(e),o=L2(t);return Xq((e=>{const t=new(W2())(e,{text:()=>"function"==typeof n.current?n.current():n.current||""});return t.on("success",(t=>{let{clearSelection:n}=t;n(),e.focus(),o.current&&o.current()})),()=>{t.destroy()}}),[])}function C2(e){na(e.defaultView);const t=e.defaultView.getSelection();na();const n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function R2(e){return C2(e)||!!e.activeElement&&function(e){if(!SG(e)&&!NG(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return null===t||t!==n}catch(e){return!0}}(e.activeElement)}function S2(e){const t=Array.from(e.files);return Array.from(e.items).forEach((e=>{const n=e.getAsFile();n&&!t.find((e=>{let{name:t,type:o,size:r}=e;return t===n.name&&o===n.type&&r===n.size}))&&t.push(n)})),t}function N2(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}function T2(){const{getBlockName:e}=fp(wN),{getBlockType:t}=fp(kl),{createSuccessNotice:n}=Lm(gQ);return(0,Bt.useCallback)(((o,r)=>{let a="";if(1===r.length){var i;const n=r[0],l=null===(i=t(e(n)))||void 0===i?void 0:i.title;a=lr(gr("copy"===o?'Copied "%s" to clipboard.':'Moved "%s" to clipboard.'),l)}else a=lr("copy"===o?vr("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length):vr("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(a,{type:"snackbar"})}),[])}function B2(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o,__unstableIsFullySelected:r,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:i,__unstableGetSelectedBlocksWithPartialSelection:l,canInsertBlockType:s}=fp(wN),{flashBlock:c,removeBlocks:u,replaceBlocks:p,__unstableDeleteSelection:d,__unstableExpandSelection:b,insertBlocks:m}=Lm(wN),M=T2();return Xq((z=>{function f(f){const h=t();if(0===h.length)return;if(!n()){const{target:e}=f,{ownerDocument:t}=e,n="copy"===f.type||"cut"===f.type?R2(t):function(e){return!!e.activeElement&&(SG(e.activeElement)||NG(e.activeElement)||C2(e))}(t);if(n)return}if(!z.contains(f.target.ownerDocument.activeElement))return;const g=f.defaultPrevented;f.preventDefault();const O=i(),v=a()||r(),A=!v&&!O;if("copy"===f.type||"cut"===f.type)if(1===h.length&&c(h[0]),A)b();else{let t;if(M(f.type,h),v)t=e(h);else{const[n,o]=l();t=[n,...e(h.slice(1,h.length-1)),o]}const n=f.clipboardData.getData("__unstableWrapperBlockName");n&&(t=Ja(n,JSON.parse(f.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const o=xs(t);f.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return aa(e).trim().replace(/\n\n+/g,"\n\n")}(o)),f.clipboardData.setData("text/html",o)}if("cut"===f.type)v&&!A?u(h):d();else if("paste"===f.type){if(g)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n,files:r}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=S2(t);return r.length&&!N2(r,o)?{files:r}:{html:o,plainText:n,files:[]}}(f);let a=[];if(r.length){const e=ii("from");a=r.reduce(((t,n)=>{const o=ai(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else a=Qu({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===h.length){const[e]=h;if(a.every((t=>s(t.name,e))))return void m(a,void 0,e)}p(h,a,a.length-1,-1)}}return z.ownerDocument.addEventListener("copy",f),z.ownerDocument.addEventListener("cut",f),z.ownerDocument.addEventListener("paste",f),()=>{z.ownerDocument.removeEventListener("copy",f),z.ownerDocument.removeEventListener("cut",f),z.ownerDocument.removeEventListener("paste",f)}}),[])}const D2="align",I2="__experimentalBorder",P2="color",H2="customClassName",F2="typography.__experimentalFontFamily",Y2="typography.fontSize",X2="__experimentalLayout",j2=[...["typography.lineHeight",Y2,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",F2,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"],I2,P2,"spacing"];const V2={align:e=>Da(e,D2),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==mL.OS)return!1;const n=Ba(e,I2);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}(e,"color"),backgroundColor:e=>{const t=Ba(e,P2);return t&&!1!==t.background},textColor:e=>{const t=Ba(e,P2);return t&&!1!==t.text},gradient:e=>{const t=Ba(e,P2);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>Da(e,H2,!0),fontFamily:e=>Da(e,F2),fontSize:e=>Da(e,Y2),layout:e=>Da(e,X2),style:e=>j2.some((t=>Da(e,t)))};function U2(e,t){return Object.entries(V2).reduce(((n,o)=>{let[r,a]=o;return a(e.name)&&a(t.name)&&(n[r]=e.attributes[r]),n}),{})}function $2(e,t,n){for(let o=0;o{let i="";try{if(!window.navigator.clipboard)return void r(gr("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});i=await window.navigator.clipboard.readText()}catch(e){return void r(gr("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!i||!function(e){try{const t=Fc(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(i))return void o(gr("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const l=Fc(i);if(1===l.length?e.batch((()=>{$2(a,a.map((()=>l[0])),t)})):e.batch((()=>{$2(a,l,t)})),1===a.length){var s;const e=null===(s=Na(a[0].name))||void 0===s?void 0:s.title;n(lr(gr("Pasted styles to %s."),e),{type:"snackbar"})}else n(lr(gr("Pasted styles to %d blocks."),a.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function K2(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:r,getBlockRootClientId:a,getBlocksByClientId:i,canMoveBlocks:l,canRemoveBlocks:s}=fp(wN),{getDefaultBlockName:c,getGroupingBlockName:u}=fp(kl),p=i(t),d=a(t[0]),b=p.every((e=>!!e&&Da(e.name,"multiple",!0)&&r(e.name,d))),m=r(c(),d),M=l(t,d),z=s(t,d),{removeBlocks:f,replaceBlocks:h,duplicateBlocks:g,insertAfterBlock:O,insertBeforeBlock:v,flashBlock:A,setBlockMovingClientId:y,setNavigationMode:_,selectBlock:q}=Lm(wN),k=T2(),w=G2();return n({canDuplicate:b,canInsertDefaultBlock:m,canMove:M,canRemove:z,rootClientId:d,blocks:p,onDuplicate:()=>g(t,o),onRemove:()=>f(t,o),onInsertBefore(){const e=Array.isArray(t)?t[0]:e;v(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;O(e)},onMoveTo(){_(!0),q(t[0]),y(t[0])},onGroup(){if(!p.length)return;const e=u(),n=si(p,e);n&&h(t,n)},onUngroup(){if(!p.length)return;const e=p[0].innerBlocks;e.length&&h(t,e)},onCopy(){const e=p.map((e=>{let{clientId:t}=e;return t}));1===p.length&&A(e[0]),k("copy",e)},async onPasteStyles(){await w(p)}})}const J2=()=>{};const Z2=Mn([dj(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:r,getSettings:a}=e(wN),i=o(n),l=a().codeEditingEnabled;return{mode:r(n),blockType:i?Na(i.name):null,isCodeEditingEnabled:l}})),Mj(((e,t)=>{let{onToggle:n=J2,clientId:o}=t;return{onToggleMode(){e(wN).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:r=!1,isCodeEditingEnabled:a=!0}=e;if(!t||!Da(t,"html",!0)||!a)return null;const i=gr("visual"===n?"Edit as HTML":"Edit visually");return(0,Bt.createElement)(HN,{onClick:o},!r&&i)}));const Q2=Mn(dj(((e,t)=>{let{clientId:n}=t;const o=e(wN).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),Mj(((e,t)=>{let{block:n}=t;return{onClick:()=>e(wN).replaceBlocks(n.clientId,gu({HTML:Es(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=gr("Convert to Blocks");return(0,Bt.createElement)(HN,{onClick:n},!o&&r)})),{Fill:e3,Slot:t3}=aw("__unstableBlockSettingsMenuFirstItem");e3.Slot=t3;const n3=e3;function o3(e){const{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:r,groupingBlockName:a}=fp((t=>{var n;const{getBlockRootClientId:o,getBlocksByClientId:r,canInsertBlockType:a,getSelectedBlockClientIds:i}=t(wN),{getGroupingBlockName:l}=t(kl),s=null!=e&&e.length?e:i(),c=l(),u=a(c,null!=s&&s.length?o(s[0]):void 0),p=r(s),d=1===p.length&&(null===(n=p[0])||void 0===n?void 0:n.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[e]);return{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:r,groupingBlockName:a}}function r3(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:r,groupingBlockName:a,onClose:i=(()=>{})}=e;const{replaceBlocks:l}=Lm(wN);return n||o?(0,Bt.createElement)(Bt.Fragment,null,n&&(0,Bt.createElement)(HN,{onClick:()=>{(()=>{const e=si(r,a);e&&l(t,e)})(),i()}},Or("Group","verb")),o&&(0,Bt.createElement)(HN,{onClick:()=>{(()=>{const e=r[0].innerBlocks;e.length&&l(t,e)})(),i()}},Or("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function a3(e){return fp((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:a,getBlockName:i,getBlockRootClientId:l,getTemplateLock:s}=t(wN),c=l(e),u=n(e),p=o(e,c),d=r(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:a(i(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}const i3=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})),l3=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}));const s3=function e(t){const{__nextHasNoMarginBottom:n,label:o,className:r,heading:a,checked:i,indeterminate:l,help:s,onChange:c,...u}=t;a&&jo("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[p,d]=(0,Bt.useState)(!1),[b,m]=(0,Bt.useState)(!1),M=Xq((e=>{e&&(e.indeterminate=!!l,d(e.matches(":checked")),m(e.matches(":indeterminate")))}),[i,l]),z=`inspector-checkbox-control-${Tz(e)}`;return(0,Bt.createElement)(ET,{__nextHasNoMarginBottom:n,label:a,id:z,help:s,className:Sz()("components-checkbox-control",r)},(0,Bt.createElement)("span",{className:"components-checkbox-control__input-container"},(0,Bt.createElement)("input",Pt({ref:M,id:z,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>c(e.target.checked),checked:i,"aria-describedby":s?z+"__help":void 0},u)),b?(0,Bt.createElement)(AF,{icon:tP,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,p?(0,Bt.createElement)(AF,{icon:xX,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,Bt.createElement)("label",{className:"components-checkbox-control__label",htmlFor:z},o))},c3=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})),u3=["core/block","core/navigation"];function p3(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function d3(e){let{clientId:t,onClose:n}=e;const[o,r]=(0,Bt.useState)({move:!1,remove:!1}),{canEdit:a,canMove:i,canRemove:l}=a3(t),{allowsEditLocking:s,templateLock:c,hasTemplateLock:u}=fp((e=>{var n,o;const{getBlockName:r,getBlockAttributes:a}=e(wN),i=r(t),l=Na(i);return{allowsEditLocking:u3.includes(i),templateLock:null===(n=a(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==l||null===(o=l.attributes)||void 0===o||!o.templateLock)}}),[t]),[p,d]=(0,Bt.useState)(!!c),{updateBlockAttributes:b}=Lm(wN),m=E1(t),M=Tz(d3,"block-editor-block-lock-modal__options-title");(0,Bt.useEffect)((()=>{r({move:!i,remove:!l,...s?{edit:!a}:{}})}),[a,i,l,s]);const z=Object.values(o).every(Boolean),f=Object.values(o).some(Boolean)&&!z;return(0,Bt.createElement)(Wj,{title:lr(gr("Lock %s"),m.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,Bt.createElement)("p",null,gr("Choose specific attributes to restrict or lock all available options.")),(0,Bt.createElement)("form",{onSubmit:e=>{e.preventDefault(),b([t],{lock:o,templateLock:p?p3(o):void 0}),n()}},(0,Bt.createElement)("div",{role:"group","aria-labelledby":M,className:"block-editor-block-lock-modal__options"},(0,Bt.createElement)(s3,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,Bt.createElement)("span",{id:M},gr("Lock all")),checked:z,indeterminate:f,onChange:e=>r({move:e,remove:e,...s?{edit:e}:{}})}),(0,Bt.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},s&&(0,Bt.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,Bt.createElement)(s3,{__nextHasNoMarginBottom:!0,label:gr("Restrict editing"),checked:!!o.edit,onChange:e=>r((t=>({...t,edit:e})))}),(0,Bt.createElement)(Ww,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?c3:i3})),(0,Bt.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,Bt.createElement)(s3,{__nextHasNoMarginBottom:!0,label:gr("Disable movement"),checked:o.move,onChange:e=>r((t=>({...t,move:e})))}),(0,Bt.createElement)(Ww,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?c3:i3})),(0,Bt.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,Bt.createElement)(s3,{__nextHasNoMarginBottom:!0,label:gr("Prevent removal"),checked:o.remove,onChange:e=>r((t=>({...t,remove:e})))}),(0,Bt.createElement)(Ww,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?c3:i3}))),u&&(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:gr("Apply to all blocks inside"),checked:p,disabled:o.move&&!o.remove,onChange:()=>d(!p)})),(0,Bt.createElement)(lT,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{variant:"tertiary",onClick:n},gr("Cancel"))),(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{variant:"primary",type:"submit"},gr("Apply"))))))}function b3(e){let{clientId:t}=e;const{canLock:n,isLocked:o}=a3(t),[r,a]=(0,Bt.useReducer)((e=>!e),!1);if(!n)return null;const i=gr(o?"Unlock":"Lock");return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(HN,{icon:o?i3:l3,onClick:a},i),r&&(0,Bt.createElement)(d3,{clientId:t,onClose:a}))}const{Fill:m3,Slot:M3}=aw("BlockSettingsMenuControls");function z3(e){let{...t}=e;return(0,Bt.createElement)(xz,{document},(0,Bt.createElement)(m3,t))}z3.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:o}=e;const{selectedBlocks:r,selectedClientIds:a,canRemove:i}=fp((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:o,canRemoveBlocks:r}=e(wN),a=null!==n?n:o();return{selectedBlocks:t(a),selectedClientIds:a,canRemove:r(a)}}),[n]),{canLock:l}=a3(a[0]),s=1===a.length&&l,c=o3(a),{isGroupable:u,isUngroupable:p}=c,d=(u||p)&&i;return(0,Bt.createElement)(M3,{fillProps:{...t,__unstableDisplayLocation:o,selectedBlocks:r,selectedClientIds:a}},(e=>!(null!=e&&e.length)>0&&!d&&!s?null:(0,Bt.createElement)(PN,null,s&&(0,Bt.createElement)(b3,{clientId:a[0]}),e,d&&(0,Bt.createElement)(r3,Pt({},c,{onClose:null==t?void 0:t.onClose})))))};const f3=z3,h3=()=>{},g3={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function O3(e){let{blocks:t,onCopy:n,label:o}=e;const r=x2((()=>xs(t)),n),a=t.length>1?gr("Copy blocks"):gr("Copy block"),i=o||a;return(0,Bt.createElement)(HN,{ref:r},i)}function v3(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,__unstableDisplayLocation:r,...a}=e;const i=Array.isArray(t)?t:[t],l=i.length,s=i[0],{firstParentClientId:c,isDistractionFree:u,onlyBlock:p,parentBlockType:d,previousBlockClientId:b,nextBlockClientId:m,selectedBlockClientIds:M}=fp((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:o,getPreviousBlockClientId:r,getNextBlockClientId:a,getSelectedBlockClientIds:i,getSettings:l,getBlockAttributes:c}=e(wN),{getActiveBlockVariation:u}=e(kl),p=o(s),d=p&&n(p);return{firstParentClientId:p,isDistractionFree:l().isDistractionFree,onlyBlock:1===t(p),parentBlockType:p&&(u(d,c(p))||Na(d)),previousBlockClientId:r(s),nextBlockClientId:a(s),selectedBlockClientIds:i()}}),[s]),z=fp((e=>{const{getShortcutRepresentation:t}=e(qJ);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:f,toggleBlockHighlight:h}=Lm(wN),g=(0,Bt.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:h3,[n]),O=(0,Bt.useCallback)(n?()=>{const e=b||m||c;e&&M.includes(s)&&!M.includes(e)&&n(e)}:h3,[n,b,m,c,M]),v=gr(1===l?"Delete":"Delete blocks"),A=(0,Bt.useRef)(),{gestures:y}=t2({ref:A,onChange(e){e&&u||h(c,e)}}),_=null==M?void 0:M.includes(c);return(0,Bt.createElement)(K2,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:i,canMove:u,canRemove:b,onDuplicate:m,onInsertAfter:M,onInsertBefore:h,onRemove:q,onCopy:k,onPasteStyles:w,onMoveTo:E,blocks:W}=e;return(0,Bt.createElement)(VW,Pt({icon:CX,label:gr("Options"),className:"block-editor-block-settings-menu",popoverProps:g3,noIcons:!0},a),(e=>{let{onClose:a}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(PN,null,(0,Bt.createElement)(n3.Slot,{fillProps:{onClose:a}}),!_&&!!c&&(0,Bt.createElement)(HN,Pt({},y,{ref:A,icon:(0,Bt.createElement)(IK,{icon:d.icon}),onClick:()=>f(c)}),lr(gr("Select parent block (%s)"),d.title)),1===l&&(0,Bt.createElement)(Q2,{clientId:s}),(0,Bt.createElement)(O3,{blocks:W,onCopy:k}),n&&(0,Bt.createElement)(HN,{onClick:mn(a,m,g),shortcut:z.duplicate},gr("Duplicate")),i&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(HN,{onClick:mn(a,h),shortcut:z.insertBefore},gr("Insert before")),(0,Bt.createElement)(HN,{onClick:mn(a,M),shortcut:z.insertAfter},gr("Insert after"))),u&&!p&&(0,Bt.createElement)(HN,{onClick:mn(a,E)},gr("Move to")),1===l&&(0,Bt.createElement)(Z2,{clientId:s,onToggle:a})),(0,Bt.createElement)(PN,null,(0,Bt.createElement)(O3,{blocks:W,onCopy:k,label:gr("Copy styles")}),(0,Bt.createElement)(HN,{onClick:w},gr("Paste styles"))),(0,Bt.createElement)(f3.Slot,{fillProps:{onClose:a},clientIds:t,__unstableDisplayLocation:r}),"function"==typeof o?o({onClose:a}):Bt.Children.map((e=>(0,Bt.cloneElement)(e,{onClose:a}))),b&&(0,Bt.createElement)(PN,null,(0,Bt.createElement)(HN,{onClick:mn(a,q,O),shortcut:z.remove},v)))}))}))}const A3=v3;const y3=function(e){let{clientIds:t,...n}=e;return(0,Bt.createElement)($W,null,(0,Bt.createElement)(LW,null,(e=>(0,Bt.createElement)(A3,Pt({clientIds:t,toggleProps:e},n)))))};function _3(e){let{clientId:t}=e;const n=E1(t),{canEdit:o,canMove:r,canRemove:a,canLock:i}=a3(t),[l,s]=(0,Bt.useReducer)((e=>!e),!1);return i?o&&r&&a?null:(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)($W,{className:"block-editor-block-lock-toolbar"},(0,Bt.createElement)(RW,{icon:c3,label:lr(gr("Unlock %s"),n.title),onClick:s})),l&&(0,Bt.createElement)(d3,{clientId:t,onClose:s})):null}const q3=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})),k3=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})),w3=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})),E3={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};const W3=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=o3(),{replaceBlocks:r}=Lm(wN),{canRemove:a,variations:i}=fp((e=>{const{canRemoveBlocks:o}=e(wN),{getBlockVariations:r}=e(kl);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),l=o=>{const a=si(e,n);"string"!=typeof o&&(o="group"),a&&a.length>0&&(a[0].attributes.layout=E3[o],r(t,a))};if(!o||!a)return null;const s=!!i.find((e=>{let{name:t}=e;return"group-row"===t})),c=!!i.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,Bt.createElement)($W,null,(0,Bt.createElement)(RW,{icon:q3,label:Or("Group","verb"),onClick:l}),s&&(0,Bt.createElement)(RW,{icon:k3,label:Or("Row","single horizontal line"),onClick:()=>l("row")}),c&&(0,Bt.createElement)(RW,{icon:w3,label:Or("Stack","verb"),onClick:()=>l("stack")}))};function L3(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,o=fp((e=>!!n&&"html"===e(wN).getBlockMode(n)),[n]),{toggleBlockMode:r}=Lm(wN);return o?(0,Bt.createElement)($W,null,(0,Bt.createElement)(RW,{onClick:()=>{r(n)}},gr("Edit visually"))):null}const x3=(0,Bt.createContext)(""),C3=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:r,hasFixedToolbar:a,isDistractionFree:i,isValid:l,isVisual:s,isContentLocked:c}=fp((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:a,getSettings:i,__unstableGetContentLockingParent:l}=e(wN),s=o(),c=s[0],u=a(c),p=i();return{blockClientIds:s,blockClientId:c,blockType:c&&Na(t(c)),hasFixedToolbar:p.hasFixedToolbar,isDistractionFree:p.isDistractionFree,rootClientId:u,isValid:s.every((e=>r(e))),isVisual:s.every((e=>"visual"===n(e))),isContentLocked:!!l(c)}}),[]),{toggleBlockHighlight:u}=Lm(wN),p=(0,Bt.useRef)(),{showMovers:d,gestures:b}=t2({ref:p,onChange(e){e&&i||u(o,e)}}),m=iq("medium","<")||a;if(r&&!Da(r,"__experimentalToolbar",!0))return null;const M=m||d;if(0===n.length)return null;const z=l&&s,f=n.length>1,h=Ia(r)||Pa(r),g=eM()("block-editor-block-toolbar",{"is-showing-movers":M,"is-synced":h});return(0,Bt.createElement)("div",{className:g},!f&&!m&&!c&&(0,Bt.createElement)(n2,null),(0,Bt.createElement)("div",Pt({ref:p},b),(z||f)&&!c&&(0,Bt.createElement)($W,{className:"block-editor-block-toolbar__block-controls"},(0,Bt.createElement)(_2,{clientIds:n}),!f&&(0,Bt.createElement)(_3,{clientId:n[0]}),(0,Bt.createElement)(I1,{clientIds:n,hideDragHandle:t}))),z&&f&&(0,Bt.createElement)(W3,null),z&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(DN.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Bt.createElement)(DN.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Bt.createElement)(DN.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Bt.createElement)(DN.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,Bt.createElement)(DN.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Bt.createElement)(x3.Provider,{value:null==r?void 0:r.name},(0,Bt.createElement)(w2.Slot,null))),(0,Bt.createElement)(L3,{clientIds:n}),!c&&(0,Bt.createElement)(y3,{clientIds:n}))};const R3=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:r,hasParents:a,showParentSelector:i}=fp((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o,__unstableGetContentLockingParent:r}=e(wN),{getBlockType:a}=e(kl),i=o(),l=i[0],s=n(l),c=a(t(s[s.length-1]));return{blockType:l&&a(t(l)),hasParents:s.length,showParentSelector:c&&Da(c,"__experimentalParentSelector",!0)&&i.length<=1&&!r(l)}}),[]);if(r&&!Da(r,"__experimentalToolbar",!0))return null;const l=eM()("block-editor-block-contextual-toolbar",{"has-parent":a&&i,"is-fixed":n});return(0,Bt.createElement)(G1,Pt({focusOnMount:t,className:l,"aria-label":gr("Block tools")},o),(0,Bt.createElement)(C3,{hideDragHandle:n}))};function S3(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var N3=n(5697),T3=n.n(N3);n(1726);function B3(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function D3(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function I3(e,t){if(e.clientHeightt||a>e&&i=t&&l>=n?a-e-o:i>t&&ln?i-t+r:0}var H3=0;function F3(){}function Y3(e,t){if(e){var n=function(e,t){var n=window,o=t.scrollMode,r=t.block,a=t.inline,i=t.boundary,l=t.skipOverflowHiddenElements,s="function"==typeof i?i:function(e){return e!==i};if(!B3(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,u=[],p=e;B3(p)&&s(p);){if((p=p.parentElement)===c){u.push(p);break}null!=p&&p===document.body&&I3(p)&&!I3(document.documentElement)||null!=p&&I3(p,l)&&u.push(p)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,b=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,M=window.scrollY||pageYOffset,z=e.getBoundingClientRect(),f=z.height,h=z.width,g=z.top,O=z.right,v=z.bottom,A=z.left,y="start"===r||"nearest"===r?g:"end"===r?v:g+f/2,_="center"===a?A+h/2:"end"===a?O:A,q=[],k=0;k=0&&A>=0&&v<=b&&O<=d&&g>=x&&v<=R&&A>=S&&O<=C)return q;var N=getComputedStyle(w),T=parseInt(N.borderLeftWidth,10),B=parseInt(N.borderTopWidth,10),D=parseInt(N.borderRightWidth,10),I=parseInt(N.borderBottomWidth,10),P=0,H=0,F="offsetWidth"in w?w.offsetWidth-w.clientWidth-T-D:0,Y="offsetHeight"in w?w.offsetHeight-w.clientHeight-B-I:0;if(c===w)P="start"===r?y:"end"===r?y-b:"nearest"===r?P3(M,M+b,b,B,I,M+y,M+y+f,f):y-b/2,H="start"===a?_:"center"===a?_-d/2:"end"===a?_-d:P3(m,m+d,d,T,D,m+_,m+_+h,h),P=Math.max(0,P+M),H=Math.max(0,H+m);else{P="start"===r?y-x-B:"end"===r?y-R+I+Y:"nearest"===r?P3(x,R,W,B,I+Y,y,y+f,f):y-(x+W/2)+Y/2,H="start"===a?_-S-T:"center"===a?_-(S+L/2)+F/2:"end"===a?_-C+D+F:P3(S,C,L,T,D+F,_,_+h,h);var X=w.scrollLeft,j=w.scrollTop;y+=j-(P=Math.max(0,Math.min(j+P,w.scrollHeight-W+Y))),_+=X-(H=Math.max(0,Math.min(X+H,w.scrollWidth-L+F)))}q.push({el:w,top:P,left:H})}return q}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((function(e){var t=e.el,n=e.top,o=e.left;t.scrollTop=n,t.scrollLeft=o}))}}function X3(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function j3(e,t){var n;function o(){n&&clearTimeout(n)}function r(){for(var r=arguments.length,a=new Array(r),i=0;i1?n-1:0),r=1;r=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function Q3(e,t,n,o,r){if(void 0===r&&(r=!0),0===n)return-1;var a=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:a+1);var i=t+e;i<0?i=r?a:0:i>a&&(i=r?0:a);var l=e4(e,i,n,o,r);return-1===l?t>=n?-1:t:l}function e4(e,t,n,o,r){var a=o(t);if(!a||!a.hasAttribute("disabled"))return t;if(e>0){for(var i=t+1;i=0;l--)if(!o(l).hasAttribute("disabled"))return l;return r?e>0?e4(1,0,n,o,!1):e4(-1,n-1,n,o,!1):-1}function t4(e,t,n,o){return void 0===o&&(o=!0),t.some((function(t){return t&&(X3(t,e,n)||o&&X3(t,n.document.activeElement,n))}))}var n4=j3((function(e){r4(e).textContent=""}),500);function o4(e,t){var n=r4(t);e&&(n.textContent=e,n4(t))}function r4(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var a4=["isInitialMount","highlightedIndex","items","environment"],i4={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function l4(e,t,n){var o=e.props,r=e.type,a={};Object.keys(t).forEach((function(o){!function(e,t,n,o){var r=t.props,a=t.type,i="on"+b4(e)+"Change";r[i]&&void 0!==o[e]&&o[e]!==n[e]&&r[i](Pt({type:a},o))}(o,e,t,n),n[o]!==t[o]&&(a[o]=n[o])})),o.onStateChange&&Object.keys(a).length&&o.onStateChange(Pt({type:r},a))}var s4=j3((function(e,t){o4(e(),t)}),200),c4="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Bt.useLayoutEffect:Bt.useEffect;function u4(e){var t=e.id,n=void 0===t?"downshift-"+$3():t,o=e.labelId,r=e.menuId,a=e.getItemId,i=e.toggleButtonId,l=e.inputId,s=(0,Bt.useRef)({labelId:o||n+"-label",menuId:r||n+"-menu",getItemId:a||function(e){return n+"-item-"+e},toggleButtonId:i||n+"-toggle-button",inputId:l||n+"-input"});return s.current}function p4(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function d4(e){return/^\S{1}$/.test(e)}function b4(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function m4(e){var t=(0,Bt.useRef)(e);return t.current=e,t}function M4(e,t,n){var o=(0,Bt.useRef)(),r=(0,Bt.useRef)(),a=(0,Bt.useCallback)((function(t,n){r.current=n,t=K3(t,n.props);var o=e(t,n);return n.props.stateReducer(t,Pt({},n,{changes:o}))}),[e]),i=(0,Bt.useReducer)(a,t),l=i[0],s=i[1],c=m4(n),u=(0,Bt.useCallback)((function(e){return s(Pt({props:c.current},e))}),[c]),p=r.current;return(0,Bt.useEffect)((function(){p&&o.current&&o.current!==l&&l4(p,K3(o.current,p.props),l),o.current=l}),[l,n,p]),[l,u]}function z4(e,t,n){var o=M4(e,t,n),r=o[0],a=o[1];return[K3(r,n),a]}var f4={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:Y3,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function h4(e,t,n){void 0===n&&(n=i4);var o="default"+b4(t);return o in e?e[o]:n[t]}function g4(e,t,n){if(void 0===n&&(n=i4),t in e)return e[t];var o="initial"+b4(t);return o in e?e[o]:h4(e,t,n)}function O4(e){var t=g4(e,"selectedItem"),n=g4(e,"isOpen"),o=g4(e,"highlightedIndex"),r=g4(e,"inputValue");return{highlightedIndex:o<0&&t&&n?e.items.indexOf(t):o,isOpen:n,selectedItem:t,inputValue:r}}function v4(e,t,n,o){var r=e.items,a=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,l=t.selectedItem,s=t.highlightedIndex;return 0===r.length?-1:void 0!==a&&s===a?a:void 0!==i?i:l?0===n?r.indexOf(l):Q3(n,r.indexOf(l),r.length,o,!1):0===n?-1:n<0?r.length-1:0}function A4(e,t,n,o){var r=(0,Bt.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,Bt.useEffect)((function(){var a=function(){r.current.isMouseDown=!0},i=function(a){r.current.isMouseDown=!1,e&&!t4(a.target,t.map((function(e){return e.current})),n)&&o()},l=function(){r.current.isTouchMove=!1},s=function(){r.current.isTouchMove=!0},c=function(a){!e||r.current.isTouchMove||t4(a.target,t.map((function(e){return e.current})),n,!1)||o()};return n.addEventListener("mousedown",a),n.addEventListener("mouseup",i),n.addEventListener("touchstart",l),n.addEventListener("touchmove",s),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",a),n.removeEventListener("mouseup",i),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",s),n.removeEventListener("touchend",c)}}),[e,n]),r}var y4=function(){return F3};function _4(e,t,n){var o=n.isInitialMount,r=n.highlightedIndex,a=n.items,i=n.environment,l=S3(n,a4);(0,Bt.useEffect)((function(){o||s4((function(){return e(Pt({highlightedIndex:r,highlightedItem:a[r],resultCount:a.length},l))}),i.document)}),t)}function q4(e){var t=e.highlightedIndex,n=e.isOpen,o=e.itemRefs,r=e.getItemNodeFromIndex,a=e.menuElement,i=e.scrollIntoView,l=(0,Bt.useRef)(!0);return c4((function(){t<0||!n||!Object.keys(o.current).length||(!1===l.current?l.current=!0:i(r(t),a))}),[t]),l}var k4=F3;function w4(e,t,n){var o,r=t.type,a=t.props;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:v4(a,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:v4(a,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:h4(a,"highlightedIndex"),isOpen:h4(a,"isOpen"),selectedItem:h4(a,"selectedItem"),inputValue:h4(a,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Pt({},e,o)}function E4(e){for(var t=e.keysSoFar,n=e.highlightedIndex,o=e.items,r=e.itemToString,a=e.getItemNodeFromIndex,i=t.toLowerCase(),l=0;l=0&&{selectedItem:r.items[s]});break;case 13:n={highlightedIndex:v4(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:n={highlightedIndex:v4(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:n=Pt({isOpen:h4(r,"isOpen"),highlightedIndex:h4(r,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]});break;case 3:n={highlightedIndex:e4(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case 4:n={highlightedIndex:e4(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:n={isOpen:!1,highlightedIndex:-1};break;case 7:var c=t.key,u=""+e.inputValue+c,p=E4({keysSoFar:u,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});n=Pt({inputValue:u},p>=0&&{highlightedIndex:p});break;case 0:n={highlightedIndex:Q3(a?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 1:n={highlightedIndex:Q3(a?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 20:n={selectedItem:t.selectedItem};break;default:return w4(e,t,x4)}return Pt({},e,n)}var R4=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],S4=["onClick","onKeyDown","refKey","ref"],N4=["item","index","onMouseMove","onClick","refKey","ref"];function T4(e){void 0===e&&(e={}),L4(e,T4);var t=Pt({},W4,e),n=t.items,o=t.scrollIntoView,r=t.environment,a=t.initialIsOpen,i=t.defaultIsOpen,l=t.itemToString,s=t.getA11ySelectionMessage,c=t.getA11yStatusMessage,u=z4(C4,O4(t),t),p=u[0],d=u[1],b=p.isOpen,m=p.highlightedIndex,M=p.selectedItem,z=p.inputValue,f=(0,Bt.useRef)(null),h=(0,Bt.useRef)(null),g=(0,Bt.useRef)({}),O=(0,Bt.useRef)(!0),v=(0,Bt.useRef)(null),A=u4(t),y=(0,Bt.useRef)(),_=(0,Bt.useRef)(!0),q=m4({state:p,props:t}),k=(0,Bt.useCallback)((function(e){return g.current[A.getItemId(e)]}),[A]);_4(c,[b,m,z,n],Pt({isInitialMount:_.current,previousResultCount:y.current,items:n,environment:r,itemToString:l},p)),_4(s,[M],Pt({isInitialMount:_.current,previousResultCount:y.current,items:n,environment:r,itemToString:l},p));var w=q4({menuElement:h.current,highlightedIndex:m,isOpen:b,itemRefs:g,scrollIntoView:o,getItemNodeFromIndex:k});(0,Bt.useEffect)((function(){return v.current=j3((function(e){e({type:21,inputValue:""})}),500),function(){v.current.cancel()}}),[]),(0,Bt.useEffect)((function(){z&&v.current(d)}),[d,z]),k4({isInitialMount:_.current,props:t,state:p}),(0,Bt.useEffect)((function(){_.current?(a||i||b)&&h.current&&h.current.focus():b?h.current&&h.current.focus():r.document.activeElement===h.current&&f.current&&(O.current=!1,f.current.focus())}),[b]),(0,Bt.useEffect)((function(){_.current||(y.current=n.length)}));var E=A4(b,[h,f],r,(function(){d({type:8})})),W=y4();(0,Bt.useEffect)((function(){_.current=!1}),[]),(0,Bt.useEffect)((function(){b||(g.current={})}),[b]);var L=(0,Bt.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),d({type:13,getItemNodeFromIndex:k,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),d({type:14,getItemNodeFromIndex:k,shiftKey:e.shiftKey})}}}),[d,k]),x=(0,Bt.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),d({type:0,getItemNodeFromIndex:k,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),d({type:1,getItemNodeFromIndex:k,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),d({type:3,getItemNodeFromIndex:k})},End:function(e){e.preventDefault(),d({type:4,getItemNodeFromIndex:k})},Escape:function(){d({type:2})},Enter:function(e){e.preventDefault(),d({type:5})}," ":function(e){e.preventDefault(),d({type:6})}}}),[d,k]),C=(0,Bt.useCallback)((function(){d({type:16})}),[d]),R=(0,Bt.useCallback)((function(){d({type:18})}),[d]),S=(0,Bt.useCallback)((function(){d({type:17})}),[d]),N=(0,Bt.useCallback)((function(e){d({type:19,highlightedIndex:e})}),[d]),T=(0,Bt.useCallback)((function(e){d({type:20,selectedItem:e})}),[d]),B=(0,Bt.useCallback)((function(){d({type:22})}),[d]),D=(0,Bt.useCallback)((function(e){d({type:21,inputValue:e})}),[d]),I=(0,Bt.useCallback)((function(e){return Pt({id:A.labelId,htmlFor:A.toggleButtonId},e)}),[A]),P=(0,Bt.useCallback)((function(e,t){var n,o=void 0===e?{}:e,r=o.onMouseLeave,a=o.refKey,i=void 0===a?"ref":a,l=o.onKeyDown,s=o.onBlur,c=o.ref,u=S3(o,R4),p=(void 0===t?{}:t).suppressRefError,b=void 0!==p&&p,m=q.current.state;return W("getMenuProps",b,i,h),Pt(((n={})[i]=U3(c,(function(e){h.current=e})),n.id=A.menuId,n.role="listbox",n["aria-labelledby"]=A.labelId,n.tabIndex=-1,n),m.isOpen&&m.highlightedIndex>-1&&{"aria-activedescendant":A.getItemId(m.highlightedIndex)},{onMouseLeave:V3(r,(function(){d({type:9})})),onKeyDown:V3(l,(function(e){var t=Z3(e);t&&x[t]?x[t](e):d4(t)&&d({type:7,key:t,getItemNodeFromIndex:k})})),onBlur:V3(s,(function(){!1!==O.current?!E.current.isMouseDown&&d({type:8}):O.current=!0}))},u)}),[d,q,x,E,W,A,k]),H=(0,Bt.useCallback)((function(e,t){var n,o=void 0===e?{}:e,r=o.onClick,a=o.onKeyDown,i=o.refKey,l=void 0===i?"ref":i,s=o.ref,c=S3(o,S4),u=(void 0===t?{}:t).suppressRefError,p=void 0!==u&&u,b=Pt(((n={})[l]=U3(s,(function(e){f.current=e})),n.id=A.toggleButtonId,n["aria-haspopup"]="listbox",n["aria-expanded"]=q.current.state.isOpen,n["aria-labelledby"]=A.labelId+" "+A.toggleButtonId,n),c);return c.disabled||(b.onClick=V3(r,(function(){d({type:12})})),b.onKeyDown=V3(a,(function(e){var t=Z3(e);t&&L[t]?L[t](e):d4(t)&&d({type:15,key:t,getItemNodeFromIndex:k})}))),W("getToggleButtonProps",p,l,f),b}),[d,q,L,W,A,k]),F=(0,Bt.useCallback)((function(e){var t,n=void 0===e?{}:e,o=n.item,r=n.index,a=n.onMouseMove,i=n.onClick,l=n.refKey,s=void 0===l?"ref":l,c=n.ref,u=S3(n,N4),p=q.current,b=p.state,m=p.props,M=p4(r,o,m.items);if(M<0)throw new Error("Pass either item or item index in getItemProps!");var z=Pt(((t={role:"option","aria-selected":""+(M===b.highlightedIndex),id:A.getItemId(M)})[s]=U3(c,(function(e){e&&(g.current[A.getItemId(M)]=e)})),t),u);return u.disabled||(z.onMouseMove=V3(a,(function(){r!==b.highlightedIndex&&(w.current=!1,d({type:10,index:r}))})),z.onClick=V3(i,(function(){d({type:11,index:r})}))),z}),[d,q,w,A]);return{getToggleButtonProps:H,getLabelProps:I,getMenuProps:P,getItemProps:F,toggleMenu:C,openMenu:S,closeMenu:R,setHighlightedIndex:N,selectItem:T,reset:B,setInputValue:D,highlightedIndex:m,isOpen:b,selectedItem:M,inputValue:z}}T4.stateChangeTypes=x4;T3().array.isRequired,T3().func,T3().func,T3().func,T3().bool,T3().number,T3().number,T3().number,T3().bool,T3().bool,T3().bool,T3().any,T3().any,T3().any,T3().string,T3().string,T3().string,T3().string,T3().string,T3().string,T3().func,T3().string,T3().string,T3().func,T3().func,T3().func,T3().func,T3().func,T3().func,T3().shape({addEventListener:T3().func,removeEventListener:T3().func,document:T3().shape({getElementById:T3().func,activeElement:T3().any,body:T3().any})});Pt({},f4,{getA11yStatusMessage:G3,circularNavigation:!0});T3().array,T3().array,T3().array,T3().func,T3().func,T3().func,T3().number,T3().number,T3().number,T3().func,T3().func,T3().string,T3().string,T3().shape({addEventListener:T3().func,removeEventListener:T3().func,document:T3().shape({getElementById:T3().func,activeElement:T3().any,body:T3().any})});const B4=Gw((function(e,t){const n=$w(e,"InputControlSuffixWrapper");return(0,Bt.createElement)(cF,Pt({marginBottom:0},n,{ref:t}))}),"InputControlSuffixWrapper"),D4=lE("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",gT.gray[900],";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;",(e=>{let{disabled:t}=e;return t?GN({color:gT.ui.textDisabled},"",""):""}),";",(e=>{let{selectSize:t="default"}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"}[t];return n?GN("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""}),";",(e=>{let{__next36pxDefaultSize:t,multiple:n,selectSize:o="default"}=e;if(n)return;const r={default:{height:36,minHeight:36,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};t||(r.default={height:30,minHeight:30,paddingTop:0,paddingBottom:0});return GN(r[o]||r.default,"","")}),";",(e=>{let{__next36pxDefaultSize:t,multiple:n,selectSize:o="default"}=e;const r={default:16,small:8,"__unstable-large":16};t||(r.default=8);const a=r[o]||r.default;return QI({paddingLeft:a,paddingRight:a+18,...n?{paddingTop:a,paddingBottom:a}:{}})}),";",(e=>{let{multiple:t}=e;return{overflow:t?"auto":"hidden"}}),";}"),I4=lE("div",{target:"e1mv6sxx1"})("margin-inline-end:",QN(-1),";line-height:0;"),P4=lE(B4,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",QI({right:0}),";"),H4=()=>(0,Bt.createElement)(P4,null,(0,Bt.createElement)(I4,null,(0,Bt.createElement)(AF,{icon:bX,size:18}))),F4=e=>e.__nextUnconstrainedWidth?"":GN(xP,"{min-width:130px;}",""),Y4=lE(XP,{target:"eswuck60"})(F4,";"),X4=e=>null==e?void 0:e.name,j4=(e,t)=>{let{selectedItem:n}=e,{type:o,changes:r,props:{items:a}}=t;switch(o){case T4.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:a[n?Math.min(a.indexOf(n)+1,a.length-1):0]};case T4.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:a[n?Math.max(a.indexOf(n)-1,0):a.length-1]};default:return r}};function V4(e){var t;const{__next36pxDefaultSize:n=!1,__nextUnconstrainedWidth:o=!1,className:r,hideLabelFromVision:a,label:i,describedBy:l,options:s,onChange:c,size:u="default",value:p,onMouseOver:d,onMouseOut:b,onFocus:m,onBlur:M,__experimentalShowSelectedHint:z=!1}=e,{getLabelProps:f,getToggleButtonProps:h,getMenuProps:g,getItemProps:O,isOpen:v,highlightedIndex:A,selectedItem:y}=T4({initialSelectedItem:s[0],items:s,itemToString:X4,onSelectedItemChange:c,...null!=p?{selectedItem:p}:void 0,stateReducer:j4}),[_,q]=(0,Bt.useState)(!1);o||jo("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const k=g({className:"components-custom-select-control__menu","aria-hidden":!v}),w=(0,Bt.useCallback)((e=>{var t;e.stopPropagation(),null==k||null===(t=k.onKeyDown)||void 0===t||t.call(k,e)}),[k]);return null!==(t=k["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete k["aria-activedescendant"],(0,Bt.createElement)("div",{className:Sz()("components-custom-select-control",r)},a?(0,Bt.createElement)(uE,Pt({as:"label"},f()),i):(0,Bt.createElement)(yT,f({className:"components-custom-select-control__label"}),i),(0,Bt.createElement)(Y4,{__next36pxDefaultSize:n,__nextUnconstrainedWidth:o,isFocused:v||_,__unstableInputWidth:o?void 0:"auto",labelPosition:o?void 0:"top",size:u,suffix:(0,Bt.createElement)(H4,null)},(0,Bt.createElement)(D4,Pt({onMouseOver:d,onMouseOut:b,as:"button",onFocus:function(e){q(!0),null==m||m(e)},onBlur:function(e){q(!1),null==M||M(e)},selectSize:u,__next36pxDefaultSize:n},h({"aria-label":i,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:l||(y?lr(gr("Currently selected: %s"),y.name):gr("No selection"))})),X4(y),z&&y.__experimentalHint&&(0,Bt.createElement)("span",{className:"components-custom-select-control__hint"},y.__experimentalHint))),(0,Bt.createElement)("ul",Pt({},k,{onKeyDown:w}),v&&s.map(((e,t)=>(0,Bt.createElement)("li",O({item:e,index:t,key:e.key,className:Sz()(e.className,"components-custom-select-control__item",{"is-highlighted":t===A,"has-hint":!!e.__experimentalHint,"is-next-36px-default-size":n}),style:e.style}),e.name,e.__experimentalHint&&(0,Bt.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===y&&(0,Bt.createElement)(AF,{icon:xX,className:"components-custom-select-control__item-icon"}))))))}function U4(e){return(0,Bt.createElement)(V4,Pt({},e,{__experimentalShowSelectedHint:!1}))}const{lock:$4,unlock:G4}=wn("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/components"),K4={};$4(K4,{CustomSelectControl:V4,__experimentalPopoverLegacyPositionToPlacement:lw});const{CustomSelectControl:J4}=qN(K4),Z4="position",Q4="block-editor-hooks__position-selection__select-control__option",e5={key:"default",value:"",name:gr("Default"),className:Q4},t5={key:"sticky",value:"sticky",name:Or("Sticky","Name for the value of the CSS position property"),className:Q4,__experimentalHint:gr("The block will stick to the top of the window instead of scrolling.")},n5={key:"fixed",value:"fixed",name:Or("Fixed","Name for the value of the CSS position property"),className:Q4,__experimentalHint:gr("The block will not move when the page is scrolled.")},o5=["top","right","bottom","left"],r5=["sticky","fixed"];function a5(e){return!!Ba(e,Z4)}function i5(e){var t,n;const o=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===o||"fixed"===o}function l5(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=ID("position.fixed"),n=ID("position.sticky"),o=!t&&!n;return!a5(e)||o}function s5(e){var t;const{attributes:{style:n={}},clientId:o,name:r,setAttributes:a}=e,i=function(e){const t=Ba(e,Z4);return!!(!0===t||null!=t&&t.fixed)}(r),l=function(e){const t=Ba(e,Z4);return!!(!0===t||null!=t&&t.sticky)}(r),s=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:c}=fp((e=>{const{getBlockParents:t}=e(wN);return{hasParents:t(o).length}}),[o]),u=(0,Bt.useMemo)((()=>{const e=[e5];return(l&&!c||s===t5.value)&&e.push(t5),(i||s===n5.value)&&e.push(n5),e}),[i,l,c,s]),p=s&&u.find((e=>e.value===s))||e5;return mL.select({web:u.length>1?(0,Bt.createElement)(rj,{group:"position"},(0,Bt.createElement)(ET,{className:"block-editor-hooks__position-selection"},(0,Bt.createElement)(J4,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:gr("Position"),hideLabelFromVision:!0,describedBy:lr(gr("Currently selected position: %s"),p.name),options:u,value:p,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};a({style:dI(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const c5=Jm((e=>t=>{const{name:n}=t;return[Da(n,Z4)&&!l5(t)&&(0,Bt.createElement)(s5,Pt({key:"position"},t)),(0,Bt.createElement)(e,Pt({key:"edit"},t))]}),"withInspectorControls"),u5=Jm((e=>t=>{var n,o,r,a;const{name:i,attributes:l}=t,s=Da(i,Z4)&&!l5(t),c=Tz(e),u=(0,Bt.useContext)(V5.__unstableElementContext);let p;s&&(p=function(e){let{selector:t,style:n}=e,o="";const{type:r}=(null==n?void 0:n.position)||{};return r5.includes(r)?(o+=`${t} {`,o+=`position: ${r};`,o5.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(o+=`${e}: ${n.position[e]};`)})),"sticky"!==r&&"fixed"!==r||(o+="z-index: 10"),o+="}",o):o}({selector:`.wp-container-${c}.wp-container-${c}`,style:null==l?void 0:l.style})||"");const d=eM()(null==t?void 0:t.className,{[`wp-container-${c}`]:s&&!!p,[`is-position-${null==l||null===(n=l.style)||void 0===n||null===(o=n.position)||void 0===o?void 0:o.type}`]:s&&!!p&&!(null==l||null===(r=l.style)||void 0===r||null===(a=r.position)||void 0===a||!a.type)});return(0,Bt.createElement)(Bt.Fragment,null,s&&u&&!!p&&(0,It.createPortal)((0,Bt.createElement)("style",null,p),u),(0,Bt.createElement)(e,Pt({},t,{className:d})))}));wo("editor.BlockListBlock","core/editor/position/with-position-styles",u5),wo("editor.BlockEdit","core/editor/position/with-inspector-controls",c5);const p5={placement:"top-start"},d5={...p5,flip:!1,shift:!0},b5={...p5,flip:!0,shift:!1};function m5(e,t,n,o,r){if(!e||!t)return d5;const a=(null==n?void 0:n.scrollTop)||0,i=t.getBoundingClientRect(),l=a+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=l+o,u=i.top>c,p=i.height>s-o;return r||!u&&!p?b5:d5}function M5(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isBlockInterfaceHidden:a,getSettings:i,getLastMultiSelectedBlockClientId:l}=qN(e(wN));return{editorMode:t(),hasMultiSelection:o(),isMultiSelecting:n(),isTyping:r(),isBlockInterfaceHidden:a(),hasFixedToolbar:i().hasFixedToolbar,isDistractionFree:i().isDistractionFree,lastClientId:o()?l():null}}function z5(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:o,showContents:r,capturingClientId:a,__unstablePopoverSlot:i,__unstableContentRef:l}=e;const{editorMode:s,hasMultiSelection:c,isMultiSelecting:u,isTyping:p,isBlockInterfaceHidden:d,hasFixedToolbar:b,isDistractionFree:m,lastClientId:M}=fp(M5,[]),z=fp((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(wN);if(!n())return!1;const a=o();return r(a.rootClientId)[a.index]===t}),[t]),f=iq("medium"),h=(0,Bt.useRef)(!1),{stopTyping:g}=Lm(wN),O=!p&&"edit"===s&&o,v=!c&&("navigation"===s||"zoom-out"===s),A="edit"===s&&!b&&f&&!u&&!O&&!p&&!d;EJ("core/block-editor/focus-toolbar",(()=>{h.current=!0,g(!0)}),{isDisabled:!!("edit"!==s||A||b||m||o)}),(0,Bt.useEffect)((()=>{h.current=!1}));const y=(0,Bt.useRef)(),_=function(e){let{contentElement:t,clientId:n}=e;const o=sK(n),[r,a]=(0,Bt.useState)(0),{blockIndex:i,isSticky:l}=fp((e=>{const{getBlockIndex:t,getBlockAttributes:o}=e(wN);return{blockIndex:t(n),isSticky:i5(o(n))}}),[n]),s=(0,Bt.useMemo)((()=>{if(t)return lk(t)}),[t]),[c,u]=(0,Bt.useState)((()=>m5(t,o,s,r,l))),p=Xq((e=>{a(e.offsetHeight)}),[]),d=(0,Bt.useCallback)((()=>u(m5(t,o,s,r,l))),[t,o,s,r]);return(0,Bt.useLayoutEffect)(d,[i,d]),(0,Bt.useLayoutEffect)((()=>{var e,n,r;if(!t||!o)return;const a=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let i;null==a||null===(n=a.addEventHandler)||void 0===n||n.call(a,"resize",d);const l=null==o||null===(r=o.ownerDocument)||void 0===r?void 0:r.defaultView;return l.ResizeObserver&&(i=new l.ResizeObserver(d),i.observe(o)),()=>{var e;null==a||null===(e=a.removeEventHandler)||void 0===e||e.call(a,"resize",d),i&&i.disconnect()}}),[d,t,o]),{...c,ref:p}}({contentElement:null==l?void 0:l.current,clientId:t});return O?(0,Bt.createElement)(g1,Pt({clientId:a||t,__unstableCoverTarget:!0,bottomClientId:M,className:eM()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":z}),__unstablePopoverSlot:i,__unstableContentRef:l,resize:!1,shift:!1},_),(0,Bt.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,Bt.createElement)(c1,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):v||A?(0,Bt.createElement)(g1,Pt({clientId:a||t,bottomClientId:M,className:eM()("block-editor-block-list__block-popover",{"is-insertion-point-visible":z}),__unstablePopoverSlot:i,__unstableContentRef:l,resize:!1},_),A&&r&&(0,Bt.createElement)(R3,{focusOnMount:h.current,__experimentalInitialIndex:y.current,__experimentalOnIndexChange:e=>{y.current=e},key:t}),v&&(0,Bt.createElement)(P1,{clientId:t,rootClientId:n})):null}function f5(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:r,getBlockParents:a,getSettings:i,isNavigationMode:l,__experimentalGetBlockListSettingsForBlocks:s}=e(wN),c=t()||n();if(!c)return;const{name:u,attributes:p={}}=r(c)||{},d=a(c),b=s(d),m=d.find((e=>{var t;return null===(t=b[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),M=i();return{clientId:c,rootClientId:o(c),name:u,isDistractionFree:M.isDistractionFree,isNavigationMode:l(),isEmptyDefaultBlock:u&&di({name:u,attributes:p}),capturingClientId:m}}function h5(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=fp(f5,[]);if(!o)return null;const{clientId:r,rootClientId:a,name:i,isEmptyDefaultBlock:l,capturingClientId:s,isDistractionFree:c,isNavigationMode:u}=o;return i?(0,Bt.createElement)(z5,{clientId:r,rootClientId:a,isEmptyDefaultBlock:l,showContents:!c||u,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function g5(e){let{children:t}=e;const n=(0,Bt.useContext)(A1),o=(0,Bt.useContext)(ZK.Context);return n||o?t:(jo('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,Bt.createElement)(_1,{__unstablePopoverSlot:"block-toolbar"},(0,Bt.createElement)(h5,{__unstablePopoverSlot:"block-toolbar"}),t))}const O5=Jm((e=>t=>{const{clientId:n}=CN();return(0,Bt.createElement)(e,Pt({},t,{clientId:n}))}),"withClientId"),v5=O5((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:a}=e;return(0,Bt.createElement)(d1,{className:eM()({"block-list-appender__toggle":a}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})})),A5=Mn([O5,dj(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(wN),r=o(n);return{lastBlockClientId:r[r.length-1]}}))])((e=>{let{clientId:t}=e;return(0,Bt.createElement)(u1,{rootClientId:t})})),y5=new WeakMap;function _5(e,t,n){const o=Bz((()=>qZ(e,null!=t?t:0,n)),[e,t,n]);return(0,Bt.useEffect)((()=>()=>o.cancel()),[o]),o}function q5(e){const t=(0,Bt.useRef)();return t.current=e,t}function k5(e){let{isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:a,onDragEnd:i,onDragOver:l}=e;const s=q5(n),c=q5(o),u=q5(r),p=q5(a),d=q5(i),b=q5(l);return Xq((e=>{if(t)return;let n=!1;const{ownerDocument:o}=e;function r(e){n||(n=!0,o.addEventListener("dragend",M),o.addEventListener("mousemove",M),c.current&&c.current(e))}function a(t){t.preventDefault(),e.contains(t.relatedTarget)||u.current&&u.current(t)}function i(e){!e.defaultPrevented&&b.current&&b.current(e),e.preventDefault()}function l(t){(function(t){const{defaultView:n}=o;if(!(t&&n&&t instanceof n.HTMLElement&&e.contains(t)))return!1;let r=t;do{if(r.dataset.isDropZone)return r===e}while(r=r.parentElement);return!1})(t.relatedTarget)||p.current&&p.current(t)}function m(e){e.defaultPrevented||(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length,s.current&&s.current(e),M(e))}function M(e){n&&(n=!1,o.removeEventListener("dragend",M),o.removeEventListener("mousemove",M),d.current&&d.current(e))}return e.dataset.isDropZone="true",e.addEventListener("drop",m),e.addEventListener("dragenter",a),e.addEventListener("dragover",i),e.addEventListener("dragleave",l),o.addEventListener("dragenter",r),()=>{delete e.dataset.isDropZone,e.removeEventListener("drop",m),e.removeEventListener("dragenter",a),e.removeEventListener("dragover",i),e.removeEventListener("dragleave",l),o.removeEventListener("dragend",M),o.removeEventListener("mousemove",M),o.removeEventListener("dragenter",r)}}),[t])}function w5(e,t,n,o,r,a,i){return l=>{const{srcRootClientId:s,srcClientIds:c,type:u,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(l);if("inserter"===u){i();const e=p.map((e=>ei(e)));a(e,!0,null)}if("block"===u){const a=n(c[0]);if(s===e&&a===t)return;if(c.includes(e)||o(c).some((t=>t===e)))return;const i=s===e,l=c.length;r(c,s,i&&a{if(!n)return;const i=ai(ii("from"),(n=>"files"===n.type&&r(n.blockName,e)&&n.isMatch(t)));if(i){const e=i.transform(t,o);a(e)}}}function W5(e,t,n){return e=>{const t=Qu({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function L5(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:o="insert"}=n,r=fp((e=>e(wN).getSettings().mediaUpload),[]),{canInsertBlockType:a,getBlockIndex:i,getClientIdsOfDescendants:l,getBlockOrder:s,getBlocksByClientId:c}=fp(wN),{insertBlocks:u,moveBlocksToPosition:p,updateBlockAttributes:d,clearSelectedBlock:b,replaceBlocks:m,removeBlocks:M}=Lm(wN),z=cp(),f=(0,Bt.useCallback)((function(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===o){const o=s(e)[t];m(o,n,void 0,a)}else u(n,t,e,r,a)}),[o,s,u,m,t,e]),h=(0,Bt.useCallback)(((n,r,a)=>{if("replace"===o){const o=c(n),r=s(e)[t];z.batch((()=>{M(n,!1),m(r,o,void 0,0)}))}else p(n,r,e,a)}),[o,s,c,u,p,M,t,e]),g=w5(e,t,i,l,h,f,b),O=E5(e,0,r,d,a,f),v=W5(0,0,f);return e=>{const t=S2(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?v(n):t.length?O(t):g(e)}}function x5(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:a}=e,i=o?r:a,l=o?a:r,s=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let p;return p=i>=s&&i<=c?i:i2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const a=x5(e,t,r);(void 0===n||a=e.x&&t.top<=e.y&&t.bottom>=e.y}function S5(e,t){var n,o;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const a="horizontal"===r?["left","right"]:["top","bottom"],i=Ar();let l=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:o,blockIndex:r}=e;const u=o();let[p,d]=C5(t,u,a);n&&R5(t,u)&&(p=0),p0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,Bt.useState)({index:null,operation:"insert"}),o=fp((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:o,__unstableHasActiveBlockOverlayActive:r}=t(wN),a=n(e);return["all","contentOnly"].some((e=>e===a))||r(e)||o(e)}),[e]),{getBlockListSettings:r,getBlocks:a,getBlockIndex:i}=fp(wN),{showInsertionPoint:l,hideInsertionPoint:s}=Lm(wN),c=L5(e,t.index,{operation:t.operation}),u=_5((0,Bt.useCallback)(((t,o)=>{var s;const c=a(e);if(0===c.length)return void n({index:0,operation:"insert"});const u=c.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:di(e),getBoundingClientRect:()=>o.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:i(t)}})),[p,d]=S5(u,{x:t.clientX,y:t.clientY},null===(s=r(e))||void 0===s?void 0:s.orientation);n({index:p,operation:d}),l(e,p,{operation:d})}),[e]),200);return k5({isDisabled:o,onDrop:c,onDragOver(e){u(e,e.currentTarget.ownerDocument)},onDragLeave(){u.cancel(),s()},onDragEnd(){u.cancel(),s()}})}const T5={};function B5(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:r,template:a,templateLock:i,wrapperRef:l,templateInsertUpdatesSelection:s,__experimentalCaptureToolbars:c,__experimentalAppenderTagName:u,renderAppender:p,orientation:d,placeholder:b,layout:m}=e;!function(e,t,n,o,r,a,i,l){const{updateBlockListSettings:s}=Lm(wN),c=cp(),{blockListSettings:u,parentLock:p}=fp((t=>{const n=t(wN).getBlockRootClientId(e);return{blockListSettings:t(wN).getBlockListSettings(e),parentLock:t(wN).getTemplateLock(n)}}),[e]),d=(0,Bt.useMemo)((()=>t),t);(0,Bt.useLayoutEffect)((()=>{const t={allowedBlocks:d,templateLock:void 0===r||"contentOnly"===p?p:r};if(void 0!==a&&(t.__experimentalCaptureToolbars=a),void 0!==i)t.orientation=i;else{const e=TY(null==l?void 0:l.type);t.orientation=e.getOrientation(l)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),Os(u,t)||(y5.get(c)||y5.set(c,[]),y5.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=y5.get(c))&&void 0!==e&&e.length&&c.batch((()=>{y5.get(c).forEach((e=>{s(...e)})),y5.set(c,[])}))})))}),[e,u,d,n,o,r,p,a,i,s,l,c])}(t,n,o,r,i,c,d,m),function(e,t,n,o){const{getBlocks:r,getSelectedBlocksInitialCaretPosition:a,isBlockSelected:i}=fp(wN),{replaceInnerBlocks:l,__unstableMarkNextChangeAsNotPersistent:s}=Lm(wN),{innerBlocks:c}=fp((t=>({innerBlocks:t(wN).getBlocks(e)})),[e]),u=(0,Bt.useRef)(null);(0,Bt.useLayoutEffect)((()=>{let c=!1;return window.queueMicrotask((()=>{if(c)return;const p=r(e),d=0===p.length||"all"===n||"contentOnly"===n,b=!Ys()(t,u.current);if(!d||!b)return;u.current=t;const m=tp(p,t);Ys()(m,p)||(s(),l(e,m,0===p.length&&o&&0!==m.length&&i(e),a()))})),()=>{c=!0}}),[c,t,n,e])}(t,a,i,s);const M=function(e){return fp((t=>{const n=t(wN).getBlock(e);if(!n)return;const o=t(kl).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((e=>{let[t,o]=e;return[t,n.attributes[o]]}))):void 0}),[e])}(t),z=Ba(fp((e=>{var n;return null===(n=e(wN).getBlock(t))||void 0===n?void 0:n.name}),[t]),"__experimentalLayout")||T5,{allowSizingOnChildren:f=!1}=z,h=ID("layout")||T5,g=m||z,O=(0,Bt.useMemo)((()=>({...h,...g,...f&&{allowSizingOnChildren:!0}})),[h,g,f]);return(0,Bt.createElement)(hj,{value:M},(0,Bt.createElement)($5,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:u,__experimentalLayout:O,wrapperRef:l,placeholder:b}))}function D5(e){return XK(e),(0,Bt.createElement)(B5,e)}const I5=(0,Bt.forwardRef)(((e,t)=>{const n=P5({ref:t},e);return(0,Bt.createElement)("div",{className:"block-editor-inner-blocks"},(0,Bt.createElement)("div",n))}));function P5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o}=t,{clientId:r,layout:a=null,__unstableLayoutClassNames:i=""}=CN(),l=iq("medium","<"),{__experimentalCaptureToolbars:s,hasOverlay:c}=fp((e=>{if(!r)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:o,__unstableGetEditorMode:a}=e(wN),i=t(r),s="navigation"===a()||l;return{__experimentalCaptureToolbars:e(kl).hasBlockSupport(i,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==i&&!n(r)&&!o(r,!0)&&s}}),[r,l]),u=N5({rootClientId:r}),p=Hz([e.ref,o?null:u]),d={__experimentalCaptureToolbars:s,layout:a,...t},b=d.value&&d.onChange?D5:B5;return{...e,ref:p,className:eM()(e.className,"block-editor-block-list__layout",n?"":i,{"has-overlay":c}),children:r?(0,Bt.createElement)(b,Pt({},d,{clientId:r})):(0,Bt.createElement)($5,t)}}P5.save=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerBlocks:t}=qs,n=xs(t,{isInnerBlocks:!0}),o=(0,Bt.createElement)(Fl,null,n);return{...e,children:o}},I5.DefaultBlockAppender=A5,I5.ButtonBlockAppender=v5,I5.Content=()=>P5.save().children;const H5=I5,F5=(0,Bt.createContext)(),Y5=(0,Bt.createContext)(),X5=new WeakMap;function j5(e){let{className:t,...n}=e;const[o,r]=(0,Bt.useState)(),a=iq("medium"),{isOutlineMode:i,isFocusMode:l,editorMode:s}=fp((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(wN),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,editorMode:n()}}),[]),c=cp(),{setBlockVisibility:u}=Lm(wN),p=Iz((0,Bt.useCallback)((()=>{const e={};X5.get(c).forEach((t=>{let[n,o]=t;e[n]=o})),u(e)}),[c]),300,{trailing:!0}),d=(0,Bt.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{X5.get(c)||X5.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");X5.get(c).push([e,t.isIntersecting])}p()}))}),[]),b=P5({ref:Hz([QK(),q1(),r]),className:eM()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":l&&a,"is-navigate-mode":"navigation"===s})},n);return(0,Bt.createElement)(F5.Provider,{value:o},(0,Bt.createElement)(Y5.Provider,{value:d},(0,Bt.createElement)("div",b)))}function V5(e){return function(){const{patterns:e,isPreviewMode:t}=fp((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(wN).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,Bt.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,o=-1;const r=()=>{o++,o>=e.length||(Jo(wN).__experimentalGetParsedPattern(e[o].name),n=k1(r))};return n=k1(r),()=>w1(n)}),[e,t])}(),(0,Bt.createElement)(g5,null,(0,Bt.createElement)(xN,{value:WN},(0,Bt.createElement)(j5,e)))}function U5(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:a=BY}=e;const{order:i,selectedBlocks:l,visibleBlocks:s}=fp((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o,__unstableGetVisibleBlocks:r}=e(wN);return{order:t(n),selectedBlocks:o(),visibleBlocks:r()}}),[n]);return(0,Bt.createElement)(IY,{value:a},i.map((e=>(0,Bt.createElement)(bp,{key:e,value:!s.has(e)&&!l.includes(e)},(0,Bt.createElement)(zK,{rootClientId:n,clientId:e})))),i.length<1&&t,(0,Bt.createElement)(m1,{tagName:r,rootClientId:n,renderAppender:o}))}function $5(e){return(0,Bt.createElement)(bp,{value:!1},(0,Bt.createElement)(U5,e))}V5.__unstableElementContext=F5;const G5=/^([\d.\-+]*)\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?$/;const K5=["top","right","bottom","left"],J5=["color","style","width"],Z5=e=>!e||!J5.some((t=>void 0!==e[t])),Q5=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).some((e=>-1!==K5.indexOf(e)))},e6=e=>{if(!Q5(e))return!1;const t=K5.map((t=>t6(null==e?void 0:e[t])));return!t.every((e=>e===t[0]))},t6=(e,t)=>{if(Z5(e))return t;const{color:n,style:o,width:r}=t||{},{color:a=n,style:i=o,width:l=r}=e;return[l,!!l&&"0"!==l||!!a?i||"solid":i,a].filter(Boolean).join(" ")},n6=e=>function(e){if(0===e.length)return;const t={};let n,o=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>o&&(n=e,o=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(G5);if(!t)return[void 0,void 0];const[,n,o]=t;let r=parseFloat(n);return r=Number.isNaN(r)?void 0:r,[r,o]}(`${e}`)[1])).filter((e=>void 0!==e)));Jr([Zr,ta]);const o6=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>e.slug===t));if(n)return n}return{color:n}},r6=(e,t)=>null==e?void 0:e.find((e=>e.color===t));function a6(e,t){if(e&&t)return`has-${(0,Ht.kebabCase)(t)}-${e}`}function i6(){const e={disableCustomColors:!ID("color.custom"),disableCustomGradients:!ID("color.customGradient")},t=ID("color.palette.custom"),n=ID("color.palette.theme"),o=ID("color.palette.default"),r=ID("color.defaultPalette");e.colors=(0,Bt.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:Or("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:Or("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:Or("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const a=ID("color.gradients.custom"),i=ID("color.gradients.theme"),l=ID("color.gradients.default"),s=ID("color.defaultGradients");return e.gradients=(0,Bt.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:Or("Theme","Indicates this palette comes from the theme."),gradients:i}),s&&l&&l.length&&e.push({name:Or("Default","Indicates this palette comes from WordPress."),gradients:l}),a&&a.length&&e.push({name:Or("Custom","Indicates this palette is created by the user."),gradients:a}),e}),[a,i,l]),e}const l6=()=>{};const s6=Gw(((e,t)=>{const{children:n,isShown:o,shouldRenderPlaceholder:r,...a}=function(e){var t,n,o;const{className:r,hasValue:a,isShownByDefault:i=!1,label:l,panelId:s,resetAllFilter:c=l6,onDeselect:u,onSelect:p,...d}=$w(e,"ToolsPanelItem"),{panelId:b,menuItems:m,registerResetAllFilter:M,deregisterResetAllFilter:z,registerPanelItem:f,deregisterPanelItem:h,flagItemCustomization:g,isResetting:O,shouldRenderPlaceholderItems:v,firstDisplayedItem:A,lastDisplayedItem:y,__experimentalFirstVisibleItemClass:_,__experimentalLastVisibleItemClass:q}=OX(),k=(0,Bt.useCallback)(a,[s,a]),w=(0,Bt.useCallback)(c,[s,c]),E=_B(b),W=b===s||null===b;(0,Bt.useEffect)((()=>(W&&null!==E&&f({hasValue:k,isShownByDefault:i,label:l,panelId:s}),()=>{(null===E&&b||b===s)&&h(l)})),[b,W,i,l,k,s,E,f,h]),(0,Bt.useEffect)((()=>(W&&M(w),()=>{W&&z(w)})),[M,z,w,W]);const L=i?"default":"optional",x=null==m||null===(t=m[L])||void 0===t?void 0:t[l],C=_B(x),R=void 0!==(null==m||null===(n=m[L])||void 0===n?void 0:n[l]),S=a(),N=_B(S),T=S&&!N;(0,Bt.useEffect)((()=>{T&&(i||null===b)&&g(l,L)}),[b,T,i,L,l,g]),(0,Bt.useEffect)((()=>{R&&!O&&W&&(!x||S||C||null==p||p(),!x&&C&&(null==u||u()))}),[W,x,R,O,S,C,p,u]);const B=i?void 0!==(null==m||null===(o=m[L])||void 0===o?void 0:o[l]):x,D=Uw(),I=(0,Bt.useMemo)((()=>D(DX,v&&!B&&IX,r,A===l&&_,y===l&&q)),[B,v,r,D,A,y,_,q,l]);return{...d,isShown:B,shouldRenderPlaceholder:v,className:I}}(e);return o?(0,Bt.createElement)(cE,Pt({},a,{ref:t}),n):r?(0,Bt.createElement)(cE,Pt({},a,{ref:t})):null}),"ToolsPanelItem"),c6=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),u6=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));const p6=GN("",""),d6={name:"bjn8wh",styles:"position:relative"},b6=e=>{const{color:t=gT.gray[200],style:n="solid",width:o=RT.borderWidth}=e||{};return`${t} ${!!o&&"0"!==o||!!t?n||"solid":n} ${o!==RT.borderWidth?`clamp(1px, ${o}, 10px)`:o}`},m6={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function M6(e){const{className:t,size:n="default",...o}=$w(e,"BorderBoxControlLinkedButton"),r=Uw();return{...o,className:(0,Bt.useMemo)((()=>r((e=>GN("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",QI({right:0})()," line-height:0;",""))(n),t)),[t,r,n])}}const z6=Gw(((e,t)=>{const{className:n,isLinked:o,...r}=M6(e),a=gr(o?"Unlink sides":"Link sides");return(0,Bt.createElement)(ww,{text:a},(0,Bt.createElement)(cE,{className:n},(0,Bt.createElement)(bE,Pt({},r,{isSmall:!0,icon:o?c6:u6,iconSize:24,"aria-label":a,ref:t}))))}),"BorderBoxControlLinkedButton");function f6(e){const{className:t,value:n,size:o="default",...r}=$w(e,"BorderBoxControlVisualizer"),a=Uw(),i=(0,Bt.useMemo)((()=>a(((e,t)=>GN("position:absolute;top:","__unstable-large"===t?"20px":"15px",";right:","__unstable-large"===t?"39px":"29px",";bottom:","__unstable-large"===t?"20px":"15px",";left:","__unstable-large"===t?"39px":"29px",";border-top:",b6(null==e?void 0:e.top),";border-bottom:",b6(null==e?void 0:e.bottom),";",QI({borderLeft:b6(null==e?void 0:e.left)})()," ",QI({borderRight:b6(null==e?void 0:e.right)})(),";",""))(n,o),t)),[a,t,n,o]);return{...r,className:i,value:n}}const h6=Gw(((e,t)=>{const{value:n,...o}=f6(e);return(0,Bt.createElement)(cE,Pt({},o,{ref:t}))}),"BorderBoxControlVisualizer"),g6=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M5 11.25h14v1.5H5z"})),O6=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),v6=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const A6={name:"f3vz0n",styles:"font-weight:500"},y6=GN("box-shadow:inset 0 0 0 ",RT.borderWidth," ",gT.ui.borderFocus,";",""),_6=GN("border:0;padding:0;margin:0;",dT,";",""),q6=GN(bF,"{flex:0 0 auto;}",""),k6=(e,t)=>{const{style:n}=e||{};return GN("border-radius:9999px;border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},o=n&&"none"!==n?gT.gray[300]:void 0;return GN("border-style:","none"===n?"solid":n,";border-color:",t||o,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",QN(4),";width:",QN(4),";background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},w6=GN("width:",228,"px;>div:first-of-type>",yT,"{margin-bottom:0;",A6,";}&& ",yT,"+button:not( .has-text ){min-width:24px;padding:0;}",""),E6=GN("",""),W6=GN("",""),L6=GN("justify-content:center;width:100%;&&{border-top:",RT.borderWidth," solid ",gT.gray[200],";border-top-left-radius:0;border-top-right-radius:0;height:46px;}",""),x6=GN(yT,"{",A6,";}",""),C6={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"};const R6=[{label:gr("Solid"),icon:g6,value:"solid"},{label:gr("Dashed"),icon:O6,value:"dashed"},{label:gr("Dotted"),icon:v6,value:"dotted"}],S6=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,Bt.createElement)(uE,{as:"label"},t):(0,Bt.createElement)(yT,null,t):null},N6=Gw(((e,t)=>{const{buttonClassName:n,hideLabelFromVision:o,label:r,onChange:a,value:i,...l}=function(e){const{className:t,...n}=$w(e,"BorderControlStylePicker"),o=Uw();return{...n,className:(0,Bt.useMemo)((()=>o(x6,t)),[t,o]),buttonClassName:(0,Bt.useMemo)((()=>o(C6)),[o])}}(e);return(0,Bt.createElement)(cE,Pt({},l,{ref:t}),(0,Bt.createElement)(S6,{label:r,hideLabelFromVision:o}),(0,Bt.createElement)(lT,{justify:"flex-start",gap:1},R6.map((e=>(0,Bt.createElement)(bE,{key:e.value,className:n,icon:e.icon,isSmall:!0,isPressed:e.value===i,onClick:()=>a(e.value===i?void 0:e.value),"aria-label":e.label,label:e.label,showTooltip:!0})))))}),"BorderControlStylePicker"),T6=N6;const B6=(0,Bt.forwardRef)((function(e,t){const{className:n,colorValue:o,...r}=e;return(0,Bt.createElement)("span",Pt({className:Sz()("component-color-indicator",n),style:{background:o},ref:t},r))})),D6=()=>{};const I6=(0,Bt.forwardRef)((function(e,t){const{className:n,disabled:o=!1,help:r,hideLabelFromVision:a,id:i,label:l,multiple:s=!1,onBlur:c=D6,onChange:u,onFocus:p=D6,options:d=[],size:b="default",value:m,labelPosition:M="top",children:z,prefix:f,suffix:h,__next36pxDefaultSize:g=!1,__nextHasNoMarginBottom:O=!1,...v}=e,[A,y]=(0,Bt.useState)(!1),_=function(e){const t=Tz(I6);return e||`inspector-select-control-${t}`}(i),q=r?`${_}__help`:void 0;if(!(null!=d&&d.length||z))return null;const k=Sz()("components-select-control",n);return(0,Bt.createElement)(ET,{help:r,id:_,__nextHasNoMarginBottom:O},(0,Bt.createElement)(XP,{className:k,disabled:o,hideLabelFromVision:a,id:_,isFocused:A,label:l,size:b,suffix:h||!s&&(0,Bt.createElement)(H4,null),prefix:f,labelPosition:M,__next36pxDefaultSize:g},(0,Bt.createElement)(D4,Pt({},v,{__next36pxDefaultSize:g,"aria-describedby":q,className:"components-select-control__input",disabled:o,id:_,multiple:s,onBlur:e=>{c(e),y(!1)},onChange:t=>{var n;if(e.multiple){var o;const n=Array.from(t.target.options).filter((e=>{let{selected:t}=e;return t})),r=n.map((e=>{let{value:t}=e;return t}));null===(o=e.onChange)||void 0===o||o.call(e,r,{event:t})}else null===(n=e.onChange)||void 0===n||n.call(e,t.target.value,{event:t})},onFocus:e=>{p(e),y(!0)},ref:t,selectSize:b,value:m}),z||d.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,Bt.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))})),P6=I6,H6=lE(dF,{target:"ez9hsf47"})(xP,"{width:",QN(24),";}"),F6=lE(P6,{target:"ez9hsf46"})("margin-left:",QN(-2),";width:5em;",BP,"{display:none;}"),Y6=lE(xY,{target:"ez9hsf45"})("flex:1;margin-right:",QN(2),";"),X6=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${QN(2)} );\n\tmargin-left: ${QN(1)};\n}`,j6=lE("div",{target:"ez9hsf44"})("padding-top:",QN(2),";padding-right:0;padding-left:0;padding-bottom:0;"),V6=lE(lD,{target:"ez9hsf43"})("padding-left:",QN(4),";padding-right:",QN(4),";"),U6=lE(lT,{target:"ez9hsf42"})("padding-top:",QN(4),";padding-left:",QN(4),";padding-right:",QN(3),";padding-bottom:",QN(5),";"),$6=lE("div",{target:"ez9hsf41"})(dT,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;overflow:hidden;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",QN(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",QN(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",RT.borderWidthFocus," #fff;}",X6,";"),G6=lE(bE,{target:"ez9hsf40"})("&&&&&{min-width:",QN(6),";padding:0;>svg{margin-right:0;}}");function K6(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function J6(e){return e instanceof K6(e).Element||e instanceof Element}function Z6(e){return e instanceof K6(e).HTMLElement||e instanceof HTMLElement}function Q6(e){return"undefined"!=typeof ShadowRoot&&(e instanceof K6(e).ShadowRoot||e instanceof ShadowRoot)}var e8=Math.max,t8=Math.min,n8=Math.round;function o8(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),o=1,r=1;if(Z6(e)&&t){var a=e.offsetHeight,i=e.offsetWidth;i>0&&(o=n8(n.width)/i||1),a>0&&(r=n8(n.height)/a||1)}return{width:n.width/o,height:n.height/r,top:n.top/r,right:n.right/o,bottom:n.bottom/r,left:n.left/o,x:n.left/o,y:n.top/r}}function r8(e){var t=K6(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a8(e){return e?(e.nodeName||"").toLowerCase():null}function i8(e){return((J6(e)?e.ownerDocument:e.document)||window.document).documentElement}function l8(e){return o8(i8(e)).left+r8(e).scrollLeft}function s8(e){return K6(e).getComputedStyle(e)}function c8(e){var t=s8(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function u8(e,t,n){void 0===n&&(n=!1);var o=Z6(t),r=Z6(t)&&function(e){var t=e.getBoundingClientRect(),n=n8(t.width)/e.offsetWidth||1,o=n8(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=i8(t),i=o8(e,r),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!n)&&(("body"!==a8(t)||c8(a))&&(l=function(e){return e!==K6(e)&&Z6(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:r8(e);var t}(t)),Z6(t)?((s=o8(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=l8(a))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function p8(e){var t=o8(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function d8(e){return"html"===a8(e)?e:e.assignedSlot||e.parentNode||(Q6(e)?e.host:null)||i8(e)}function b8(e){return["html","body","#document"].indexOf(a8(e))>=0?e.ownerDocument.body:Z6(e)&&c8(e)?e:b8(d8(e))}function m8(e,t){var n;void 0===t&&(t=[]);var o=b8(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),a=K6(o),i=r?[a].concat(a.visualViewport||[],c8(o)?o:[]):o,l=t.concat(i);return r?l:l.concat(m8(d8(i)))}function M8(e){return["table","td","th"].indexOf(a8(e))>=0}function z8(e){return Z6(e)&&"fixed"!==s8(e).position?e.offsetParent:null}function f8(e){for(var t=K6(e),n=z8(e);n&&M8(n)&&"static"===s8(n).position;)n=z8(n);return n&&("html"===a8(n)||"body"===a8(n)&&"static"===s8(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Z6(e)&&"fixed"===s8(e).position)return null;for(var n=d8(e);Z6(n)&&["html","body"].indexOf(a8(n))<0;){var o=s8(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}var h8="top",g8="bottom",O8="right",v8="left",A8="auto",y8=[h8,g8,O8,v8],_8="start",q8="end",k8="viewport",w8="popper",E8=y8.reduce((function(e,t){return e.concat([t+"-"+_8,t+"-"+q8])}),[]),W8=[].concat(y8,[A8]).reduce((function(e,t){return e.concat([t,t+"-"+_8,t+"-"+q8])}),[]),L8=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function x8(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var C8={placement:"bottom",modifiers:[],strategy:"absolute"};function R8(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function P8(e){var t,n=e.reference,o=e.element,r=e.placement,a=r?B8(r):null,i=r?D8(r):null,l=n.x+n.width/2-o.width/2,s=n.y+n.height/2-o.height/2;switch(a){case h8:t={x:l,y:n.y-o.height};break;case g8:t={x:l,y:n.y+n.height};break;case O8:t={x:n.x+n.width,y:s};break;case v8:t={x:n.x-o.width,y:s};break;default:t={x:n.x,y:n.y}}var c=a?I8(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case _8:t[c]=t[c]-(n[u]/2-o[u]/2);break;case q8:t[c]=t[c]+(n[u]/2-o[u]/2)}}return t}const H8={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=P8({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var F8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Y8(e){var t,n=e.popper,o=e.popperRect,r=e.placement,a=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=!0===u?function(e){var t=e.x,n=e.y,o=window.devicePixelRatio||1;return{x:n8(t*o)/o||0,y:n8(n*o)/o||0}}(i):"function"==typeof u?u(i):i,b=d.x,m=void 0===b?0:b,M=d.y,z=void 0===M?0:M,f=i.hasOwnProperty("x"),h=i.hasOwnProperty("y"),g=v8,O=h8,v=window;if(c){var A=f8(n),y="clientHeight",_="clientWidth";if(A===K6(n)&&"static"!==s8(A=i8(n)).position&&"absolute"===l&&(y="scrollHeight",_="scrollWidth"),A=A,r===h8||(r===v8||r===O8)&&a===q8)O=g8,z-=(p&&v.visualViewport?v.visualViewport.height:A[y])-o.height,z*=s?1:-1;if(r===v8||(r===h8||r===g8)&&a===q8)g=O8,m-=(p&&v.visualViewport?v.visualViewport.width:A[_])-o.width,m*=s?1:-1}var q,k=Object.assign({position:l},c&&F8);return s?Object.assign({},k,((q={})[O]=h?"0":"",q[g]=f?"0":"",q.transform=(v.devicePixelRatio||1)<=1?"translate("+m+"px, "+z+"px)":"translate3d("+m+"px, "+z+"px, 0)",q)):Object.assign({},k,((t={})[O]=h?z+"px":"",t[g]=f?m+"px":"",t.transform="",t))}const X8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,a=n.adaptive,i=void 0===a||a,l=n.roundOffsets,s=void 0===l||l,c={placement:B8(t.placement),variation:D8(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Y8(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Y8(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};const j8={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];Z6(r)&&a8(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Z6(o)&&a8(o)&&(Object.assign(o.style,a),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};const V8={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,a=void 0===r?[0,0]:r,i=W8.reduce((function(e,n){return e[n]=function(e,t,n){var o=B8(e),r=[v8,h8].indexOf(o)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],l=a[1];return i=i||0,l=(l||0)*r,[v8,O8].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,a),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=i}};var U8={left:"right",right:"left",bottom:"top",top:"bottom"};function $8(e){return e.replace(/left|right|bottom|top/g,(function(e){return U8[e]}))}var G8={start:"end",end:"start"};function K8(e){return e.replace(/start|end/g,(function(e){return G8[e]}))}function J8(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Q6(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Z8(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Q8(e,t){return t===k8?Z8(function(e){var t=K6(e),n=i8(e),o=t.visualViewport,r=n.clientWidth,a=n.clientHeight,i=0,l=0;return o&&(r=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=o.offsetLeft,l=o.offsetTop)),{width:r,height:a,x:i+l8(e),y:l}}(e)):J6(t)?function(e){var t=o8(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Z8(function(e){var t,n=i8(e),o=r8(e),r=null==(t=e.ownerDocument)?void 0:t.body,a=e8(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=e8(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+l8(e),s=-o.scrollTop;return"rtl"===s8(r||n).direction&&(l+=e8(n.clientWidth,r?r.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(i8(e)))}function e7(e,t,n){var o="clippingParents"===t?function(e){var t=m8(d8(e)),n=["absolute","fixed"].indexOf(s8(e).position)>=0,o=n&&Z6(e)?f8(e):e;return J6(o)?t.filter((function(e){return J6(e)&&J8(e,o)&&"body"!==a8(e)&&(!n||"static"!==s8(e).position)})):[]}(e):[].concat(t),r=[].concat(o,[n]),a=r[0],i=r.reduce((function(t,n){var o=Q8(e,n);return t.top=e8(o.top,t.top),t.right=t8(o.right,t.right),t.bottom=t8(o.bottom,t.bottom),t.left=e8(o.left,t.left),t}),Q8(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function t7(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function n7(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function o7(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,a=n.boundary,i=void 0===a?"clippingParents":a,l=n.rootBoundary,s=void 0===l?k8:l,c=n.elementContext,u=void 0===c?w8:c,p=n.altBoundary,d=void 0!==p&&p,b=n.padding,m=void 0===b?0:b,M=t7("number"!=typeof m?m:n7(m,y8)),z=u===w8?"reference":w8,f=e.rects.popper,h=e.elements[d?z:u],g=e7(J6(h)?h:h.contextElement||i8(e.elements.popper),i,s),O=o8(e.elements.reference),v=P8({reference:O,element:f,strategy:"absolute",placement:r}),A=Z8(Object.assign({},f,v)),y=u===w8?A:O,_={top:g.top-y.top+M.top,bottom:y.bottom-g.bottom+M.bottom,left:g.left-y.left+M.left,right:y.right-g.right+M.right},q=e.modifiersData.offset;if(u===w8&&q){var k=q[r];Object.keys(_).forEach((function(e){var t=[O8,g8].indexOf(e)>=0?1:-1,n=[h8,g8].indexOf(e)>=0?"y":"x";_[e]+=k[n]*t}))}return _}const r7={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,a=void 0===r||r,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,c=n.padding,u=n.boundary,p=n.rootBoundary,d=n.altBoundary,b=n.flipVariations,m=void 0===b||b,M=n.allowedAutoPlacements,z=t.options.placement,f=B8(z),h=s||(f===z||!m?[$8(z)]:function(e){if(B8(e)===A8)return[];var t=$8(e);return[K8(e),t,K8(t)]}(z)),g=[z].concat(h).reduce((function(e,n){return e.concat(B8(n)===A8?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,a=n.rootBoundary,i=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?W8:s,u=D8(o),p=u?l?E8:E8.filter((function(e){return D8(e)===u})):y8,d=p.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=p);var b=d.reduce((function(t,n){return t[n]=o7(e,{placement:n,boundary:r,rootBoundary:a,padding:i})[B8(n)],t}),{});return Object.keys(b).sort((function(e,t){return b[e]-b[t]}))}(t,{placement:n,boundary:u,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:M}):n)}),[]),O=t.rects.reference,v=t.rects.popper,A=new Map,y=!0,_=g[0],q=0;q=0,L=W?"width":"height",x=o7(t,{placement:k,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),C=W?E?O8:v8:E?g8:h8;O[L]>v[L]&&(C=$8(C));var R=$8(C),S=[];if(a&&S.push(x[w]<=0),l&&S.push(x[C]<=0,x[R]<=0),S.every((function(e){return e}))){_=k,y=!1;break}A.set(k,S)}if(y)for(var N=function(e){var t=g.find((function(t){var n=A.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return _=t,"break"},T=m?3:1;T>0;T--){if("break"===N(T))break}t.placement!==_&&(t.modifiersData[o]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function a7(e,t,n){return e8(e,t8(t,n))}const i7={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,a=void 0===r||r,i=n.altAxis,l=void 0!==i&&i,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,p=n.padding,d=n.tether,b=void 0===d||d,m=n.tetherOffset,M=void 0===m?0:m,z=o7(t,{boundary:s,rootBoundary:c,padding:p,altBoundary:u}),f=B8(t.placement),h=D8(t.placement),g=!h,O=I8(f),v="x"===O?"y":"x",A=t.modifiersData.popperOffsets,y=t.rects.reference,_=t.rects.popper,q="function"==typeof M?M(Object.assign({},t.rects,{placement:t.placement})):M,k="number"==typeof q?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),w=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(A){if(a){var W,L="y"===O?h8:v8,x="y"===O?g8:O8,C="y"===O?"height":"width",R=A[O],S=R+z[L],N=R-z[x],T=b?-_[C]/2:0,B=h===_8?y[C]:_[C],D=h===_8?-_[C]:-y[C],I=t.elements.arrow,P=b&&I?p8(I):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},F=H[L],Y=H[x],X=a7(0,y[C],P[C]),j=g?y[C]/2-T-X-F-k.mainAxis:B-X-F-k.mainAxis,V=g?-y[C]/2+T+X+Y+k.mainAxis:D+X+Y+k.mainAxis,U=t.elements.arrow&&f8(t.elements.arrow),$=U?"y"===O?U.clientTop||0:U.clientLeft||0:0,G=null!=(W=null==w?void 0:w[O])?W:0,K=R+V-G,J=a7(b?t8(S,R+j-G-$):S,R,b?e8(N,K):N);A[O]=J,E[O]=J-R}if(l){var Z,Q="x"===O?h8:v8,ee="x"===O?g8:O8,te=A[v],ne="y"===v?"height":"width",oe=te+z[Q],re=te-z[ee],ae=-1!==[h8,v8].indexOf(f),ie=null!=(Z=null==w?void 0:w[v])?Z:0,le=ae?oe:te-y[ne]-_[ne]-ie+k.altAxis,se=ae?te+y[ne]+_[ne]-ie-k.altAxis:re,ce=b&&ae?function(e,t,n){var o=a7(e,t,n);return o>n?n:o}(le,te,se):a7(b?le:oe,te,b?se:re);A[v]=ce,E[v]=ce-te}t.modifiersData[o]=E}},requiresIfExists:["offset"]};const l7={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=B8(n.placement),s=I8(l),c=[v8,O8].indexOf(l)>=0?"height":"width";if(a&&i){var u=function(e,t){return t7("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:n7(e,y8))}(r.padding,n),p=p8(a),d="y"===s?h8:v8,b="y"===s?g8:O8,m=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],M=i[s]-n.rects.reference[s],z=f8(a),f=z?"y"===s?z.clientHeight||0:z.clientWidth||0:0,h=m/2-M/2,g=u[d],O=f-p[c]-u[b],v=f/2-p[c]/2+h,A=a7(g,v,O),y=s;n.modifiersData[o]=((t={})[y]=A,t.centerOffset=A-v,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&J8(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function s7(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function c7(e){return[h8,O8,g8,v8].some((function(t){return e[t]>=0}))}const u7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,i=o7(t,{elementContext:"reference"}),l=o7(t,{altBoundary:!0}),s=s7(i,o),c=s7(l,r,a),u=c7(s),p=c7(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}};var p7=S8({defaultModifiers:[T8,H8,X8,j8,V8,r7,i7,l7,u7]});function d7(e){void 0===e&&(e={});var t,n,o=PT(e),r=o.visible,a=void 0!==r&&r,i=o.animated,l=void 0!==i&&i,s=VT(BE(o,["visible","animated"])),c=(0,Bt.useState)(a),u=c[0],p=c[1],d=(0,Bt.useState)(l),b=d[0],m=d[1],M=(0,Bt.useState)(!1),z=M[0],f=M[1],h=(t=u,n=(0,Bt.useRef)(null),jE((function(){n.current=t}),[t]),n),g=null!=h.current&&h.current!==u;b&&!z&&g&&f(!0),(0,Bt.useEffect)((function(){if("number"==typeof b&&z){var e=setTimeout((function(){return f(!1)}),b);return function(){clearTimeout(e)}}return function(){}}),[b,z]);var O=(0,Bt.useCallback)((function(){return p(!0)}),[]),v=(0,Bt.useCallback)((function(){return p(!1)}),[]),A=(0,Bt.useCallback)((function(){return p((function(e){return!e}))}),[]),y=(0,Bt.useCallback)((function(){return f(!1)}),[]);return TE(TE({},s),{},{visible:u,animated:b,animating:z,show:O,hide:v,toggle:A,setVisible:p,setAnimated:m,stopAnimation:y})}var b7=eW("Mac")&&!eW("Chrome")&&eW("Safari");function m7(e){return function(t){return e&&!WE(t,e)?e:t}}function M7(e){void 0===e&&(e={});var t=PT(e),n=t.gutter,o=void 0===n?12:n,r=t.placement,a=void 0===r?"bottom":r,i=t.unstable_flip,l=void 0===i||i,s=t.unstable_offset,c=t.unstable_preventOverflow,u=void 0===c||c,p=t.unstable_fixed,d=void 0!==p&&p,b=t.modal,m=void 0!==b&&b,M=BE(t,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),z=(0,Bt.useRef)(null),f=(0,Bt.useRef)(null),h=(0,Bt.useRef)(null),g=(0,Bt.useRef)(null),O=(0,Bt.useState)(a),v=O[0],A=O[1],y=(0,Bt.useState)(a),_=y[0],q=y[1],k=(0,Bt.useState)(s||[0,o])[0],w=(0,Bt.useState)({position:"fixed",left:"100%",top:"100%"}),E=w[0],W=w[1],L=(0,Bt.useState)({}),x=L[0],C=L[1],R=function(e){void 0===e&&(e={});var t=PT(e),n=t.modal,o=void 0===n||n,r=d7(BE(t,["modal"])),a=(0,Bt.useState)(o),i=a[0],l=a[1],s=(0,Bt.useRef)(null);return TE(TE({},r),{},{modal:i,setModal:l,unstable_disclosureRef:s})}(TE({modal:m},M)),S=(0,Bt.useCallback)((function(){return!!z.current&&(z.current.forceUpdate(),!0)}),[]),N=(0,Bt.useCallback)((function(e){e.placement&&q(e.placement),e.styles&&(W(m7(e.styles.popper)),g.current&&C(m7(e.styles.arrow)))}),[]);return jE((function(){return f.current&&h.current&&(z.current=p7(f.current,h.current,{placement:v,strategy:d?"fixed":"absolute",onFirstUpdate:b7?N:void 0,modifiers:[{name:"eventListeners",enabled:R.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:l,options:{padding:8}},{name:"offset",options:{offset:k}},{name:"preventOverflow",enabled:u,options:{tetherOffset:function(){var e;return(null===(e=g.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!g.current,options:{element:g.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:R.visible&&!0,fn:function(e){var t=e.state;return N(t)}}]})),function(){z.current&&(z.current.destroy(),z.current=null)}}),[v,d,R.visible,l,k,u]),(0,Bt.useEffect)((function(){if(R.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=z.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[R.visible]),TE(TE({},R),{},{unstable_referenceRef:f,unstable_popoverRef:h,unstable_arrowRef:g,unstable_popoverStyles:E,unstable_arrowStyles:x,unstable_update:S,unstable_originalPlacement:v,placement:_,place:A})}var z7={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}};var f7=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],h7=[].concat(f7,["unstable_portal"]),g7=RE({name:"TooltipReference",compose:oW,keys:f7,useProps:function(e,t){var n=t.ref,o=t.onFocus,r=t.onBlur,a=t.onMouseEnter,i=t.onMouseLeave,l=BE(t,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),s=VE(o),c=VE(r),u=VE(a),p=VE(i),d=(0,Bt.useCallback)((function(t){var n,o;null===(n=s.current)||void 0===n||n.call(s,t),t.defaultPrevented||null===(o=e.show)||void 0===o||o.call(e)}),[e.show]),b=(0,Bt.useCallback)((function(t){var n,o;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||null===(o=e.hide)||void 0===o||o.call(e)}),[e.hide]),m=(0,Bt.useCallback)((function(t){var n,o;null===(n=u.current)||void 0===n||n.call(u,t),t.defaultPrevented||null===(o=e.show)||void 0===o||o.call(e)}),[e.show]),M=(0,Bt.useCallback)((function(t){var n,o;null===(n=p.current)||void 0===n||n.call(p,t),t.defaultPrevented||null===(o=e.hide)||void 0===o||o.call(e)}),[e.hide]);return TE({ref:HE(e.unstable_referenceRef,n),tabIndex:0,onFocus:d,onBlur:b,onMouseEnter:m,onMouseLeave:M,"aria-describedby":e.baseId},l)}}),O7=xE({as:"div",useHook:g7});const v7=(0,Bt.createContext)({});var A7=RE({name:"DisclosureContent",compose:oW,keys:["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useProps:function(e,t){var n=t.onTransitionEnd,o=t.onAnimationEnd,r=t.style,a=BE(t,["onTransitionEnd","onAnimationEnd","style"]),i=e.animated&&e.animating,l=(0,Bt.useState)(null),s=l[0],c=l[1],u=!e.visible&&!i,p=u?TE({display:"none"},r):r,d=VE(n),b=VE(o),m=(0,Bt.useRef)(0);(0,Bt.useEffect)((function(){if(e.animated)return m.current=window.requestAnimationFrame((function(){m.current=window.requestAnimationFrame((function(){e.visible?c("enter"):c(i?"leave":null)}))})),function(){return window.cancelAnimationFrame(m.current)}}),[e.animated,e.visible,i]);var M=(0,Bt.useCallback)((function(t){var n;UE(t)&&(i&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,i,e.stopAnimation]),z=(0,Bt.useCallback)((function(e){var t;null===(t=d.current)||void 0===t||t.call(d,e),M(e)}),[M]),f=(0,Bt.useCallback)((function(e){var t;null===(t=b.current)||void 0===t||t.call(b,e),M(e)}),[M]);return TE({id:e.baseId,"data-enter":"enter"===s?"":void 0,"data-leave":"leave"===s?"":void 0,onTransitionEnd:z,onAnimationEnd:f,hidden:u,style:p},a)}});xE({as:"div",useHook:A7});function y7(){return XE?document.body:null}var _7=(0,Bt.createContext)(y7());function q7(e){var t=e.children,n=(0,Bt.useContext)(_7)||y7(),o=(0,Bt.useState)((function(){if(XE){var e=document.createElement("div");return e.className=q7.__className,e}return null}))[0];return jE((function(){if(o&&n)return n.appendChild(o),function(){n.removeChild(o)}}),[o,n]),o?(0,It.createPortal)((0,Bt.createElement)(_7.Provider,{value:o},t),o):null}function k7(e){e.defaultPrevented||"Escape"===e.key&&z7.show(null)}q7.__className="__reakit-portal",q7.__selector="."+q7.__className;var w7=RE({name:"Tooltip",compose:A7,keys:h7,useOptions:function(e){var t=e.unstable_portal;return TE({unstable_portal:void 0===t||t},BE(e,["unstable_portal"]))},useProps:function(e,t){var n=t.ref,o=t.style,r=t.wrapElement,a=BE(t,["ref","style","wrapElement"]);(0,Bt.useEffect)((function(){var t;FE(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",k7)}),[]);var i=(0,Bt.useCallback)((function(t){return e.unstable_portal&&(t=(0,Bt.createElement)(q7,null,t)),r?r(t):t}),[e.unstable_portal,r]);return TE({ref:HE(e.unstable_popoverRef,n),role:"tooltip",style:TE(TE({},e.unstable_popoverStyles),{},{pointerEvents:"none"},o),wrapElement:i},a)}}),E7=xE({as:"div",memo:!0,useHook:w7});const W7=Gw((function(e,t){const{as:n="span",shortcut:o,className:r,...a}=$w(e,"Shortcut");if(!o)return null;let i,l;return"string"==typeof o?i=o:(i=o.display,l=o.ariaLabel),(0,Bt.createElement)(cE,Pt({as:n,className:r,"aria-label":l,ref:t},a),i)}),"Shortcut");const L7=GN("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",RT.transitionDurationFastest," ease;font-size:",RT.fontSize,";&[data-enter]{opacity:1;}",""),x7=lE("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",gT.white,";padding:4px 8px;"),C7=lE(W7,{target:"e7tfjmw0"})("display:inline-block;margin-left:",QN(1),";"),{TooltipPopoverView:R7}=y;const S7=Gw((function(e,t){const{children:n,className:o,...r}=$w(e,"TooltipContent"),{tooltip:a}=(0,Bt.useContext)(v7),i=Uw()(L7,o);return(0,Bt.createElement)(E7,Pt({as:cE},r,a,{className:i,ref:t}),(0,Bt.createElement)(R7,null,n))}),"TooltipContent");const N7=Gw((function(e,t){const{animated:n=!0,animationDuration:o=160,baseId:r,children:a,content:i,focusable:l=!0,gutter:s=4,id:c,modal:u=!0,placement:p,visible:d=!1,shortcut:b,...m}=$w(e,"Tooltip"),M=function(e){void 0===e&&(e={});var t=PT(e),n=t.placement,o=void 0===n?"top":n,r=t.unstable_timeout,a=void 0===r?0:r,i=BE(t,["placement","unstable_timeout"]),l=(0,Bt.useState)(a),s=l[0],c=l[1],u=(0,Bt.useRef)(null),p=(0,Bt.useRef)(null),d=M7(TE(TE({},i),{},{placement:o})),b=(d.modal,d.setModal,BE(d,["modal","setModal"])),m=(0,Bt.useCallback)((function(){null!==u.current&&window.clearTimeout(u.current),null!==p.current&&window.clearTimeout(p.current)}),[]),M=(0,Bt.useCallback)((function(){m(),b.hide(),p.current=window.setTimeout((function(){z7.hide(b.baseId)}),s)}),[m,b.hide,s,b.baseId]),z=(0,Bt.useCallback)((function(){m(),!s||z7.currentTooltipId?(z7.show(b.baseId),b.show()):(z7.show(null),u.current=window.setTimeout((function(){z7.show(b.baseId),b.show()}),s))}),[m,s,b.show,b.baseId]);return(0,Bt.useEffect)((function(){return z7.subscribe((function(e){e!==b.baseId&&(m(),b.visible&&b.hide())}))}),[b.baseId,m,b.visible,b.hide]),(0,Bt.useEffect)((function(){return function(){m(),z7.hide(b.baseId)}}),[m,b.baseId]),TE(TE({},b),{},{hide:M,show:z,unstable_timeout:s,unstable_setTimeout:c})}({animated:n?o:void 0,baseId:r||c,gutter:s,placement:p,visible:d,...m}),z=(0,Bt.useMemo)((()=>({tooltip:M})),[M]);return(0,Bt.createElement)(v7.Provider,{value:z},i&&(0,Bt.createElement)(S7,{unstable_portal:u,ref:t},i,b&&(0,Bt.createElement)(C7,{shortcut:b})),a&&(0,Bt.createElement)(O7,Pt({},M,a.props,{ref:null==a?void 0:a.ref}),(e=>(l||(e.tabIndex=void 0),(0,Bt.cloneElement)(a,e)))))}),"Tooltip"),T7=N7,B7=e=>{const{color:t,colorType:n}=e,[o,r]=(0,Bt.useState)(null),a=(0,Bt.useRef)(),i=x2((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{a.current&&clearTimeout(a.current),r(t.toHex()),a.current=setTimeout((()=>{r(null),a.current=void 0}),3e3)}));return(0,Bt.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]),(0,Bt.createElement)(T7,{content:(0,Bt.createElement)(kP,{color:"white"},o===t.toHex()?gr("Copied!"):gr("Copy")),placement:"bottom"},(0,Bt.createElement)(G6,{isSmall:!0,ref:i,icon:o2,showTooltip:!1}))},D7=e=>{let{min:t,max:n,label:o,abbreviation:r,onChange:a,value:i}=e;return(0,Bt.createElement)(lD,{spacing:4},(0,Bt.createElement)(H6,{min:t,max:n,label:o,hideLabelFromVision:!0,value:i,onChange:e=>{a(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,Bt.createElement)(cF,{as:kP,paddingLeft:QN(4),color:gT.ui.theme,lineHeight:1},r),spinControls:"none",size:"__unstable-large"}),(0,Bt.createElement)(Y6,{__nextHasNoMarginBottom:!0,label:o,hideLabelFromVision:!0,min:t,max:n,value:i,onChange:a,withInputField:!1}))},I7=e=>{let{color:t,onChange:n,enableAlpha:o}=e;const{r,g:a,b:i,a:l}=t.toRgb();return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(D7,{min:0,max:255,label:"Red",abbreviation:"R",value:r,onChange:e=>n(Gr({r:e,g:a,b:i,a:l}))}),(0,Bt.createElement)(D7,{min:0,max:255,label:"Green",abbreviation:"G",value:a,onChange:e=>n(Gr({r,g:e,b:i,a:l}))}),(0,Bt.createElement)(D7,{min:0,max:255,label:"Blue",abbreviation:"B",value:i,onChange:e=>n(Gr({r,g:a,b:e,a:l}))}),o&&(0,Bt.createElement)(D7,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>n(Gr({r,g:a,b:i,a:e/100}))}))},P7=e=>{let{color:t,onChange:n,enableAlpha:o}=e;const{h:r,s:a,l:i,a:l}=t.toHsl();return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(D7,{min:0,max:359,label:"Hue",abbreviation:"H",value:r,onChange:e=>{n(Gr({h:e,s:a,l:i,a:l}))}}),(0,Bt.createElement)(D7,{min:0,max:100,label:"Saturation",abbreviation:"S",value:a,onChange:e=>{n(Gr({h:r,s:e,l:i,a:l}))}}),(0,Bt.createElement)(D7,{min:0,max:100,label:"Lightness",abbreviation:"L",value:i,onChange:e=>{n(Gr({h:r,s:a,l:e,a:l}))}}),o&&(0,Bt.createElement)(D7,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>{n(Gr({h:r,s:a,l:i,a:e/100}))}}))},H7=e=>{let{color:t,onChange:n,enableAlpha:o}=e;return(0,Bt.createElement)(GH,{prefix:(0,Bt.createElement)(cF,{as:kP,marginLeft:QN(4),color:gT.ui.theme,lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const t=e.startsWith("#")?e:"#"+e;n(Gr(t))},maxLength:o?9:7,label:gr("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{var n,o,r,a;const i=null===(n=t.payload)||void 0===n||null===(o=n.event)||void 0===o?void 0:o.nativeEvent;if("insertFromPaste"!==(null==i?void 0:i.inputType))return{...e};const l=null!==(r=e.value)&&void 0!==r&&r.startsWith("#")?e.value.slice(1).toUpperCase():null===(a=e.value)||void 0===a?void 0:a.toUpperCase();return{...e,value:l}},__unstableInputWidth:"9em"})},F7=e=>{let{colorType:t,color:n,onChange:o,enableAlpha:r}=e;const a={color:n,onChange:o,enableAlpha:r};switch(t){case"hsl":return(0,Bt.createElement)(P7,a);case"rgb":return(0,Bt.createElement)(I7,a);default:return(0,Bt.createElement)(H7,a)}};function Y7(){return(Y7=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}function j7(e){var t=(0,Bt.useRef)(e),n=(0,Bt.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var V7=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&r.current?a(G7(r.current,e,l.current)):n(!1)},t=function(){return n(!1)};function n(n){var o=s.current,a=$7(r.current),i=n?a.addEventListener:a.removeEventListener;i(o?"touchmove":"mousemove",e),i(o?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,o=r.current;if(o&&(K7(t),!function(e,t){return t&&!U7(e)}(t,s.current)&&o)){if(U7(t)){s.current=!0;var i=t.changedTouches||[];i.length&&(l.current=i[0].identifier)}o.focus(),a(G7(o,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),i({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[i,a]),u=c[0],p=c[1],d=c[2];return(0,Bt.useEffect)((function(){return d}),[d]),Dt().createElement("div",Y7({},o,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:r,onKeyDown:p,tabIndex:0,role:"slider"}))})),Z7=function(e){return e.filter(Boolean).join(" ")},Q7=function(e){var t=e.color,n=e.left,o=e.top,r=void 0===o?.5:o,a=Z7(["react-colorful__pointer",e.className]);return Dt().createElement("div",{className:a,style:{top:100*r+"%",left:100*n+"%"}},Dt().createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},e9=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},t9=(Math.PI,function(e){var t=e.s,n=e.v,o=e.a,r=(200-t)*n/100;return{h:e9(e.h),s:e9(r>0&&r<200?t*n/100/(r<=100?r:200-r)*100:0),l:e9(r/2),a:e9(o,2)}}),n9=function(e){var t=t9(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},o9=function(e){var t=t9(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},r9=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var a=Math.floor(t),i=o*(1-n),l=o*(1-(t-a)*n),s=o*(1-(1-t+a)*n),c=a%6;return{r:e9(255*[o,l,i,i,s,o][c]),g:e9(255*[s,o,o,l,i,i][c]),b:e9(255*[i,i,s,o,o,l][c]),a:e9(r,2)}},a9=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?l9({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},i9=a9,l9=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,a=Math.max(t,n,o),i=a-Math.min(t,n,o),l=i?a===t?(n-o)/i:a===n?2+(o-t)/i:4+(t-n)/i:0;return{h:e9(60*(l<0?l+6:l)),s:e9(a?i/a*100:0),v:e9(a/255*100),a:r}},s9=Dt().memo((function(e){var t=e.hue,n=e.onChange,o=Z7(["react-colorful__hue",e.className]);return Dt().createElement("div",{className:o},Dt().createElement(J7,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:V7(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":e9(t)},Dt().createElement(Q7,{className:"react-colorful__hue-pointer",left:t/360,color:n9({h:t,s:100,v:100,a:1})})))})),c9=Dt().memo((function(e){var t=e.hsva,n=e.onChange,o={backgroundColor:n9({h:t.h,s:100,v:100,a:1})};return Dt().createElement("div",{className:"react-colorful__saturation",style:o},Dt().createElement(J7,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:V7(t.s+100*e.left,0,100),v:V7(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+e9(t.s)+"%, Brightness "+e9(t.v)+"%"},Dt().createElement(Q7,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:n9(t)})))})),u9=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},p9=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function d9(e,t,n){var o=j7(n),r=(0,Bt.useState)((function(){return e.toHsva(t)})),a=r[0],i=r[1],l=(0,Bt.useRef)({color:t,hsva:a});(0,Bt.useEffect)((function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},i(n)}}),[t,e]),(0,Bt.useEffect)((function(){var t;u9(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},o(t))}),[a,e,o]);var s=(0,Bt.useCallback)((function(e){i((function(t){return Object.assign({},t,e)}))}),[]);return[a,s]}var b9,m9="undefined"!=typeof window?Bt.useLayoutEffect:Bt.useEffect,M9=new Map,z9=function(e){m9((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!M9.has(t)){var o=t.createElement("style");o.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',M9.set(t,o);var r=b9||n.nc;r&&o.setAttribute("nonce",r),t.head.appendChild(o)}}),[])},f9=function(e){var t=e.className,n=e.colorModel,o=e.color,r=void 0===o?n.defaultColor:o,a=e.onChange,i=X7(e,["className","colorModel","color","onChange"]),l=(0,Bt.useRef)(null);z9(l);var s=d9(n,r,a),c=s[0],u=s[1],p=Z7(["react-colorful",t]);return Dt().createElement("div",Y7({},i,{ref:l,className:p}),Dt().createElement(c9,{hsva:c,onChange:u}),Dt().createElement(s9,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},h9=function(e){var t=e.className,n=e.hsva,o=e.onChange,r={backgroundImage:"linear-gradient(90deg, "+o9(Object.assign({},n,{a:0}))+", "+o9(Object.assign({},n,{a:1}))+")"},a=Z7(["react-colorful__alpha",t]);return Dt().createElement("div",{className:a},Dt().createElement("div",{className:"react-colorful__alpha-gradient",style:r}),Dt().createElement(J7,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:V7(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":e9(100*n.a)+"%"},Dt().createElement(Q7,{className:"react-colorful__alpha-pointer",left:n.a,color:o9(n)})))},g9=function(e){var t=e.className,n=e.colorModel,o=e.color,r=void 0===o?n.defaultColor:o,a=e.onChange,i=X7(e,["className","colorModel","color","onChange"]),l=(0,Bt.useRef)(null);z9(l);var s=d9(n,r,a),c=s[0],u=s[1],p=Z7(["react-colorful",t]);return Dt().createElement("div",Y7({},i,{ref:l,className:p}),Dt().createElement(c9,{hsva:c,onChange:u}),Dt().createElement(s9,{hue:c.h,onChange:u}),Dt().createElement(h9,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},O9={defaultColor:"rgba(0, 0, 0, 1)",toHsva:a9,fromHsva:function(e){var t=r9(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:p9},v9=function(e){return Dt().createElement(g9,Y7({},e,{colorModel:O9}))},A9={defaultColor:"rgb(0, 0, 0)",toHsva:i9,fromHsva:function(e){var t=r9(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:p9},y9=function(e){return Dt().createElement(f9,Y7({},e,{colorModel:A9}))};const _9=e=>{let{color:t,enableAlpha:n,onChange:o}=e;const r=n?v9:y9,a=(0,Bt.useMemo)((()=>t.toRgbString()),[t]);return(0,Bt.createElement)(r,{color:a,onChange:e=>{o(Gr(e))}})};function q9(e){let{defaultValue:t,onChange:n,value:o}=e;const r=void 0!==o,a=r?o:t,[i,l]=(0,Bt.useState)(a);let s;return s=r&&"function"==typeof n?n:r||"function"!=typeof n?l:e=>{n(e),l(e)},[r?o:i,s]}Jr([Zr]);const k9=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],w9=Gw(((e,t)=>{const{enableAlpha:n=!1,color:o,onChange:r,defaultValue:a="#fff",copyFormat:i,...l}=$w(e,"ColorPicker"),[s,c]=q9({onChange:r,value:o,defaultValue:a}),u=(0,Bt.useMemo)((()=>Gr(s||"")),[s]),p=Iz(c),d=(0,Bt.useCallback)((e=>{p(e.toHex())}),[p]),[b,m]=(0,Bt.useState)(i||"hex");return(0,Bt.createElement)($6,Pt({ref:t},l),(0,Bt.createElement)(_9,{onChange:d,color:u,enableAlpha:n}),(0,Bt.createElement)(j6,null,(0,Bt.createElement)(V6,{justify:"space-between"},(0,Bt.createElement)(F6,{__nextHasNoMarginBottom:!0,options:k9,value:b,onChange:e=>m(e),label:gr("Color format"),hideLabelFromVision:!0}),(0,Bt.createElement)(B7,{color:u,colorType:i||b})),(0,Bt.createElement)(U6,{direction:"column",gap:2},(0,Bt.createElement)(F7,{colorType:b,color:u,onChange:d,enableAlpha:n}))))}),"ColorPicker"),E9=w9;function W9(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const L9=or()((e=>{const t=Gr(e),n=t.toHex(),o=t.toRgb(),r=t.toHsv(),a=t.toHsl();return{hex:n,rgb:o,hsv:r,hsl:a,source:"hex",oldHue:a.h}}));const x9=e=>(0,Bt.createElement)(E9,function(e){const{onChangeComplete:t}=e,n=(0,Bt.useCallback)((e=>{t(L9(e))}),[t]);return function(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}(e)?{color:W9(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}(e));function C9(e){const{actions:t,className:n,options:o,children:r}=e;return(0,Bt.createElement)("div",{className:Sz()("components-circular-option-picker",n)},(0,Bt.createElement)("div",{className:"components-circular-option-picker__swatches"},o),r,t&&(0,Bt.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}C9.Option=function(e){let{className:t,isSelected:n,selectedIconProps:o,tooltipText:r,...a}=e;const i=(0,Bt.createElement)(bE,Pt({isPressed:n,className:"components-circular-option-picker__option"},a));return(0,Bt.createElement)("div",{className:Sz()(t,"components-circular-option-picker__option-wrapper")},r?(0,Bt.createElement)(ww,{text:r},i):i,n&&(0,Bt.createElement)(AF,Pt({icon:xX},o||{})))},C9.ButtonAction=function(e){let{className:t,children:n,...o}=e;return(0,Bt.createElement)(bE,Pt({className:Sz()("components-circular-option-picker__clear",t),variant:"tertiary"},o),n)},C9.DropdownLinkAction=function(e){let{buttonProps:t,className:n,dropdownProps:o,linkText:r}=e;return(0,Bt.createElement)(BW,Pt({className:Sz()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,Bt.createElement)(bE,Pt({"aria-expanded":n,"aria-haspopup":"true",onClick:o,variant:"link"},t),r)}},o))};const R9=C9;const S9=lE(RX,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),N9=lE("div",{target:"eovvns30"})("margin-left:",QN(-2),";margin-right:",QN(-2),";&:first-of-type{margin-top:",QN(-2),";}&:last-of-type{margin-bottom:",QN(-2),";}",(e=>{let{paddingSize:t="small"}=e;if("none"===t)return;const n={small:QN(2),medium:QN(4)};return GN("padding:",n[t]||n.small,";","")}),";");const T9=Gw((function(e,t){const{paddingSize:n="small",...o}=$w(e,"DropdownContentWrapper");return(0,Bt.createElement)(N9,Pt({},o,{paddingSize:n,ref:t}))}),"DropdownContentWrapper");Jr([Zr,ta]);const B9=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function D9(e){let{className:t,clearColor:n,colors:o,onChange:r,value:a,actions:i}=e;const l=(0,Bt.useMemo)((()=>o.map(((e,t)=>{let{color:o,name:i}=e;const l=Gr(o),s=a===o;return(0,Bt.createElement)(R9.Option,{key:`${o}-${t}`,isSelected:s,selectedIconProps:s?{fill:l.contrast()>l.contrast("#000")?"#fff":"#000"}:{},tooltipText:i||lr(gr("Color code: %s"),o),style:{backgroundColor:o,color:o},onClick:s?n:()=>r(o,t),"aria-label":i?lr(gr("Color: %s"),i):lr(gr("Color code: %s"),o)})}))),[o,a,r,n]);return(0,Bt.createElement)(R9,{className:t,options:l,actions:i})}function I9(e){let{className:t,clearColor:n,colors:o,onChange:r,value:a,actions:i,headingLevel:l}=e;return 0===o.length?null:(0,Bt.createElement)($Q,{spacing:3,className:t},o.map(((e,t)=>{let{name:s,colors:c}=e;return(0,Bt.createElement)($Q,{spacing:2,key:t},(0,Bt.createElement)(S9,{level:l},s),(0,Bt.createElement)(D9,{clearColor:n,colors:c,onChange:e=>r(e,t),value:a,actions:o.length===t+1?i:null}))})))}function P9(e){let{isRenderedInSidebar:t,popoverProps:n,...o}=e;const r=(0,Bt.useMemo)((()=>({shift:!0,...t?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...n})),[t,n]);return(0,Bt.createElement)(BW,Pt({contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:r},o))}Jr([Zr,ta]);const H9=(0,Bt.forwardRef)((function(e,t){const{clearable:n=!0,colors:o=[],disableCustomColors:r=!1,enableAlpha:a=!1,onChange:i,value:l,__experimentalIsRenderedInSidebar:s=!1,headingLevel:c=2,...u}=e,[p,d]=(0,Bt.useState)(l),b=(0,Bt.useCallback)((()=>i(void 0)),[i]),m=(0,Bt.useCallback)((e=>{d(((e,t)=>{if(!/^var\(/.test(null!=e?e:"")||null===t)return e;const{ownerDocument:n}=t,{defaultView:o}=n,r=null==o?void 0:o.getComputedStyle(t).backgroundColor;return r?Gr(r).toHex():e})(l,e))}),[l]),M=B9(o),z=(0,Bt.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const o=/^var\(/.test(e),r=o?e:Gr(e).toHex(),a=n?t:[{colors:t}];for(const{colors:e}of a)for(const{name:t,color:n}of e)if(r===(o?n:Gr(n).toHex()))return t;return gr("Custom")}(l,o,M)),[l,o,M]),f=Gr(null!=p?p:""),h=null!=l&&l.startsWith("#")?l.substring(1):null!=l?l:"",g=h?lr(gr('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),z,h):gr("Custom color picker."),O={clearable:n,clearColor:b,onChange:i,value:l,actions:!!n&&(0,Bt.createElement)(R9.ButtonAction,{onClick:b},gr("Clear")),headingLevel:c};return(0,Bt.createElement)($Q,Pt({spacing:3,ref:t},u),!r&&(0,Bt.createElement)(P9,{isRenderedInSidebar:s,renderContent:()=>(0,Bt.createElement)(T9,{paddingSize:"none"},(0,Bt.createElement)(x9,{color:p,onChange:e=>i(e),enableAlpha:a})),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,Bt.createElement)(lT,{as:"button",ref:m,justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":g,style:(o=l,void 0===o||0===Gr(o).alpha()?{color:"#000"}:{background:l,color:f.contrast()>f.contrast("#000")?"#fff":"#000"})},(0,Bt.createElement)(cT,{isBlock:!0,as:AZ,className:"components-color-palette__custom-color-name"},z),(0,Bt.createElement)(cT,{as:"span",className:"components-color-palette__custom-color-value"},h));var o}}),M?(0,Bt.createElement)(I9,Pt({},O,{colors:o})):(0,Bt.createElement)(D9,Pt({},O,{colors:o})))})),F9=H9;function Y9(e){const{border:t,className:n,colors:o=[],enableAlpha:r=!1,enableStyle:a=!0,onChange:i,previousStyleSelection:l,size:s="default",__experimentalIsRenderedInSidebar:c=!1,...u}=$w(e,"BorderControlDropdown"),[p]=RI(null==t?void 0:t.width),d=0===p,b=Uw(),m=(0,Bt.useMemo)((()=>b((e=>GN("background:#fff;&&>button{height:","__unstable-large"===e?"40px":"30px",";width:","__unstable-large"===e?"40px":"30px",";padding:0;display:flex;align-items:center;justify-content:center;",QI({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",RT.borderWidth," solid ",gT.ui.border,";&:focus,&:hover:not( :disabled ){",y6," border-color:",gT.ui.borderFocus,";z-index:1;position:relative;}}",""))(s),n)),[n,b,s]),M=(0,Bt.useMemo)((()=>b(W6)),[b]),z=(0,Bt.useMemo)((()=>b(k6(t,s))),[t,b,s]),f=(0,Bt.useMemo)((()=>b(w6)),[b]),h=(0,Bt.useMemo)((()=>b(E6)),[b]),g=(0,Bt.useMemo)((()=>b(L6)),[b]);return{...u,border:t,className:m,colors:o,enableAlpha:r,enableStyle:a,indicatorClassName:M,indicatorWrapperClassName:z,onColorChange:e=>{const n="none"===(null==t?void 0:t.style)?l:null==t?void 0:t.style,o=d&&e?"1px":null==t?void 0:t.width;i({color:e,style:n,width:o})},onStyleChange:e=>{const n=d&&e?"1px":null==t?void 0:t.width;i({...t,style:e,width:n})},onReset:()=>{i({...t,color:void 0,style:void 0})},popoverContentClassName:h,popoverControlsClassName:f,resetButtonClassName:g,__experimentalIsRenderedInSidebar:c}}const X9=Gw(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:o,colors:r,disableCustomColors:a,enableAlpha:i,enableStyle:l,indicatorClassName:s,indicatorWrapperClassName:c,onReset:u,onColorChange:p,onStyleChange:d,popoverContentClassName:b,popoverControlsClassName:m,resetButtonClassName:M,showDropdownHeader:z,__unstablePopoverProps:f,...h}=Y9(e),{color:g,style:O}=o||{},v=((e,t)=>{if(e&&t){if(B9(t)){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(g,r),A=((e,t,n,o)=>o?t?n?lr('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,t.color,n):lr('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?n?lr('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',e,n):lr('Border color and style picker. The currently selected color has a value of "%1$s".',e):gr("Border color and style picker."):t?lr('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?lr('Border color picker. The currently selected color has a value of "%1$s".',e):gr("Border color picker."))(g,v,O,l),y=g||O&&"none"!==O,_=n?"bottom left":void 0;return(0,Bt.createElement)(BW,Pt({renderToggle:e=>{let{onToggle:t}=e;return(0,Bt.createElement)(bE,{onClick:t,variant:"tertiary","aria-label":A,tooltipPosition:_,label:gr("Border color and style picker"),showTooltip:!0},(0,Bt.createElement)("span",{className:c},(0,Bt.createElement)(B6,{className:s,colorValue:g})))},renderContent:e=>{let{onClose:t}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(T9,{paddingSize:"medium"},(0,Bt.createElement)($Q,{className:m,spacing:6},z?(0,Bt.createElement)(lD,null,(0,Bt.createElement)(yT,null,gr("Border color")),(0,Bt.createElement)(bE,{isSmall:!0,label:gr("Close border color"),icon:fK,onClick:t})):void 0,(0,Bt.createElement)(F9,{className:b,value:g,onChange:p,colors:r,disableCustomColors:a,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:i}),l&&(0,Bt.createElement)(T6,{label:gr("Style"),value:O,onChange:d}))),y&&(0,Bt.createElement)(T9,{paddingSize:"none"},(0,Bt.createElement)(bE,{className:M,variant:"tertiary",onClick:()=>{u(),t()}},gr("Reset to default"))))},popoverProps:{...f}},h,{ref:t}))}),"BorderControlDropdown"),j9=X9;function V9(e){const{className:t,colors:n=[],isCompact:o,onChange:r,enableAlpha:a=!0,enableStyle:i=!0,shouldSanitizeBorder:l=!0,size:s="default",value:c,width:u,__experimentalIsRenderedInSidebar:p=!1,...d}=$w(e,"BorderControl"),[b,m]=RI(null==c?void 0:c.width),M=m||"px",z=0===b,[f,h]=(0,Bt.useState)(),[g,O]=(0,Bt.useState)(),v=(0,Bt.useCallback)((e=>{if(l)return r((e=>{const t=void 0===(null==e?void 0:e.width)||""===e.width,n=void 0===(null==e?void 0:e.color);if(!t||!n)return e})(e));r(e)}),[r,l]),A=(0,Bt.useCallback)((e=>{const t=""===e?void 0:e,[n]=RI(e),o=0===n,r={...c,width:t};o&&!z&&(h(null==c?void 0:c.color),O(null==c?void 0:c.style),r.color=void 0,r.style="none"),!o&&z&&(void 0===r.color&&(r.color=f),"none"===r.style&&(r.style=g)),v(r)}),[c,z,f,g,v]),y=(0,Bt.useCallback)((e=>{A(`${e}${M}`)}),[A,M]),_=Uw(),q=(0,Bt.useMemo)((()=>_(_6,t)),[t,_]);let k=u;o&&(k="__unstable-large"===s?"116px":"90px");const w=(0,Bt.useMemo)((()=>{const e=!!k&&q6,t=(e=>GN("height:","__unstable-large"===e?"40px":"30px",";",""))(s);return _(GN(bF,"{flex:1 1 40%;}&& ",zF,"{min-height:0;}",""),e,t)}),[k,_,s]),E=(0,Bt.useMemo)((()=>_(GN("flex:1 1 60%;",QI({marginRight:QN(3)})(),";",""))),[_]);return{...d,className:q,colors:n,enableAlpha:a,enableStyle:i,innerWrapperClassName:w,inputWidth:k,onBorderChange:v,onSliderChange:y,onWidthChange:A,previousStyleSelection:g,sliderClassName:E,value:c,widthUnit:M,widthValue:b,size:s,__experimentalIsRenderedInSidebar:p}}const U9=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,Bt.createElement)(uE,{as:"legend"},t):(0,Bt.createElement)(yT,{as:"legend"},t):null},$9=Gw(((e,t)=>{const{colors:n,disableCustomColors:o,disableUnits:r,enableAlpha:a,enableStyle:i,hideLabelFromVision:l,innerWrapperClassName:s,inputWidth:c,label:u,onBorderChange:p,onSliderChange:d,onWidthChange:b,placeholder:m,__unstablePopoverProps:M,previousStyleSelection:z,showDropdownHeader:f,size:h,sliderClassName:g,value:O,widthUnit:v,widthValue:A,withSlider:y,__experimentalIsRenderedInSidebar:_,...q}=V9(e);return(0,Bt.createElement)(cE,Pt({as:"fieldset"},q,{ref:t}),(0,Bt.createElement)(U9,{label:u,hideLabelFromVision:l}),(0,Bt.createElement)(lD,{spacing:4,className:s},(0,Bt.createElement)(vF,{prefix:(0,Bt.createElement)(j9,{border:O,colors:n,__unstablePopoverProps:M,disableCustomColors:o,enableAlpha:a,enableStyle:i,onChange:p,previousStyleSelection:z,showDropdownHeader:f,__experimentalIsRenderedInSidebar:_,size:h}),label:gr("Border width"),hideLabelFromVision:!0,min:0,onChange:b,value:(null==O?void 0:O.width)||"",placeholder:m,disableUnits:r,__unstableInputWidth:c,size:h}),y&&(0,Bt.createElement)(xY,{__nextHasNoMarginBottom:!0,label:gr("Border width"),hideLabelFromVision:!0,className:g,initialPosition:0,max:100,min:0,onChange:d,step:["px","%"].includes(v)?1:.1,value:A||void 0,withInputField:!1})))}),"BorderControl"),G9=$9;function K9(e){const{className:t,colors:n=[],enableAlpha:o=!1,enableStyle:r=!0,size:a="default",__experimentalIsRenderedInSidebar:i=!1,...l}=$w(e,"BorderBoxControlSplitControls"),s=Uw(),c=(0,Bt.useMemo)((()=>s((e=>GN("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(a),t)),[s,t,a]);return{...l,centeredClassName:(0,Bt.useMemo)((()=>s(m6,t)),[s,t]),className:c,colors:n,enableAlpha:o,enableStyle:r,rightAlignedClassName:(0,Bt.useMemo)((()=>s(GN(QI({marginLeft:"auto"})(),";",""),t)),[s,t]),size:a,__experimentalIsRenderedInSidebar:i}}const J9=Gw(((e,t)=>{const{centeredClassName:n,colors:o,disableCustomColors:r,enableAlpha:a,enableStyle:i,onChange:l,popoverPlacement:s,popoverOffset:c,rightAlignedClassName:u,size:p="default",value:d,__experimentalIsRenderedInSidebar:b,...m}=K9(e),[M,z]=(0,Bt.useState)(null),f=(0,Bt.useMemo)((()=>s?{placement:s,offset:c,anchor:M,shift:!0}:void 0),[s,c,M]),h={colors:o,disableCustomColors:r,enableAlpha:a,enableStyle:i,isCompact:!0,__experimentalIsRenderedInSidebar:b,size:p},g=Hz([z,t]);return(0,Bt.createElement)(JX,Pt({},m,{ref:g,gap:4}),(0,Bt.createElement)(h6,{value:d,size:p}),(0,Bt.createElement)(G9,Pt({className:n,hideLabelFromVision:!0,label:gr("Top border"),onChange:e=>l(e,"top"),__unstablePopoverProps:f,value:null==d?void 0:d.top},h)),(0,Bt.createElement)(G9,Pt({hideLabelFromVision:!0,label:gr("Left border"),onChange:e=>l(e,"left"),__unstablePopoverProps:f,value:null==d?void 0:d.left},h)),(0,Bt.createElement)(G9,Pt({className:u,hideLabelFromVision:!0,label:gr("Right border"),onChange:e=>l(e,"right"),__unstablePopoverProps:f,value:null==d?void 0:d.right},h)),(0,Bt.createElement)(G9,Pt({className:n,hideLabelFromVision:!0,label:gr("Bottom border"),onChange:e=>l(e,"bottom"),__unstablePopoverProps:f,value:null==d?void 0:d.bottom},h)))}),"BorderBoxControlSplitControls"),Z9=J9;function Q9(e){const{className:t,colors:n=[],onChange:o,enableAlpha:r=!1,enableStyle:a=!0,size:i="default",value:l,__experimentalIsRenderedInSidebar:s=!1,...c}=$w(e,"BorderBoxControl"),u=e6(l),p=Q5(l),d=p?(e=>{if(!e)return;const t=[],n=[],o=[];K5.forEach((r=>{var a,i,l;t.push(null===(a=e[r])||void 0===a?void 0:a.color),n.push(null===(i=e[r])||void 0===i?void 0:i.style),o.push(null===(l=e[r])||void 0===l?void 0:l.width)}));const r=t.every((e=>e===t[0])),a=n.every((e=>e===n[0])),i=o.every((e=>e===o[0]));return{color:r?t[0]:void 0,style:a?n[0]:void 0,width:i?o[0]:n6(o)}})(l):l,b=p?l:(e=>{if(e&&!Z5(e))return{top:e,right:e,bottom:e,left:e}})(l),m=!isNaN(parseFloat(`${null==d?void 0:d.width}`)),[M,z]=(0,Bt.useState)(!u),f=Uw(),h=(0,Bt.useMemo)((()=>f(p6,t)),[f,t]),g=(0,Bt.useMemo)((()=>f(GN("flex:1;",QI({marginRight:"24px"})(),";",""))),[f]),O=(0,Bt.useMemo)((()=>f(d6)),[f]);return{...c,className:h,colors:n,disableUnits:u&&!m,enableAlpha:r,enableStyle:a,hasMixedBorders:u,isLinked:M,linkedControlClassName:g,onLinkedChange:e=>{if(!e)return o(void 0);if(!u||(e=>!!e&&J5.every((t=>void 0!==e[t])))(e))return o(Z5(e)?void 0:e);const t=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(d,e),n={top:{...null==l?void 0:l.top,...t},right:{...null==l?void 0:l.right,...t},bottom:{...null==l?void 0:l.bottom,...t},left:{...null==l?void 0:l.left,...t}};if(e6(n))return o(n);const r=Z5(n.top)?void 0:n.top;o(r)},onSplitChange:(e,t)=>{const n={...b,[t]:e};e6(n)?o(n):o(e)},toggleLinked:()=>z(!M),linkedValue:d,size:i,splitValue:b,wrapperClassName:O,__experimentalIsRenderedInSidebar:s}}const eee=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,Bt.createElement)(uE,{as:"label"},t):(0,Bt.createElement)(yT,null,t):null},tee=Gw(((e,t)=>{const{className:n,colors:o,disableCustomColors:r,disableUnits:a,enableAlpha:i,enableStyle:l,hasMixedBorders:s,hideLabelFromVision:c,isLinked:u,label:p,linkedControlClassName:d,linkedValue:b,onLinkedChange:m,onSplitChange:M,popoverPlacement:z,popoverOffset:f,size:h,splitValue:g,toggleLinked:O,wrapperClassName:v,__experimentalIsRenderedInSidebar:A,...y}=Q9(e),[_,q]=(0,Bt.useState)(null),k=(0,Bt.useMemo)((()=>z?{placement:z,offset:f,anchor:_,shift:!0}:void 0),[z,f,_]),w=Hz([q,t]);return(0,Bt.createElement)(cE,Pt({className:n},y,{ref:w}),(0,Bt.createElement)(eee,{label:p,hideLabelFromVision:c}),(0,Bt.createElement)(cE,{className:v},u?(0,Bt.createElement)(G9,{className:d,colors:o,disableUnits:a,disableCustomColors:r,enableAlpha:i,enableStyle:l,onChange:m,placeholder:s?gr("Mixed"):void 0,__unstablePopoverProps:k,shouldSanitizeBorder:!1,value:b,withSlider:!0,width:"__unstable-large"===h?"116px":"110px",__experimentalIsRenderedInSidebar:A,size:h}):(0,Bt.createElement)(Z9,{colors:o,disableCustomColors:r,enableAlpha:i,enableStyle:l,onChange:M,popoverPlacement:z,popoverOffset:f,value:g,__experimentalIsRenderedInSidebar:A,size:h}),(0,Bt.createElement)(z6,{onClick:O,isLinked:u,size:h})))}),"BorderBoxControl"),nee=tee;function oee(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function ree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||oee(Object.values(n).filter(Boolean))||"px"}function aee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>RI(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",a=oee(o),i=0===r||r?`${r}${a}`:void 0;return i}function iee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=aee(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function lee(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function see(e){let{onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,...a}=e,i=aee(r);void 0===i&&(i=ree(n));const l=lee(r)&&iee(r),s=l?gr("Mixed"):null;return(0,Bt.createElement)(vF,Pt({},a,{"aria-label":gr("Border radius"),disableUnits:l,isOnly:!0,value:i,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{o({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"}))}const cee={topLeft:gr("Top left"),topRight:gr("Top right"),bottomLeft:gr("Bottom left"),bottomRight:gr("Bottom right")};function uee(e){let{onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,...a}=e;const i=e=>n=>{if(!t)return;const o=!isNaN(parseFloat(n))?n:void 0;t({...l,[e]:o})},l="string"!=typeof r?r:{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r};return(0,Bt.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(cee).map((e=>{let[t,r]=e;const[s,c]=RI(l[t]),u=l[t]?c:n[t]||n.flat;return(0,Bt.createElement)(ww,{text:r,position:"top",key:t},(0,Bt.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,Bt.createElement)(vF,Pt({},a,{"aria-label":r,value:[s,u].join(""),onChange:i(t),onUnitChange:(p=t,e=>{const t={...n};t[p]=e,o(t)}),size:"__unstable-large"}))));var p})))}function pee(e){let{isLinked:t,...n}=e;const o=gr(t?"Unlink radii":"Link radii");return(0,Bt.createElement)(ww,{text:o},(0,Bt.createElement)("span",null,(0,Bt.createElement)(bE,Pt({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?c6:u6,iconSize:24,"aria-label":o}))))}const dee={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},bee={px:100,em:20,rem:20};function mee(e){let{onChange:t,values:n}=e;const[o,r]=(0,Bt.useState)(!lee(n)||!iee(n)),[a,i]=(0,Bt.useState)({flat:"string"==typeof n?RI(n)[1]:void 0,topLeft:RI(null==n?void 0:n.topLeft)[1],topRight:RI(null==n?void 0:n.topRight)[1],bottomLeft:RI(null==n?void 0:n.bottomLeft)[1],bottomRight:RI(null==n?void 0:n.bottomRight)[1]}),l=NI({availableUnits:ID("spacing.units")||["px","em","rem"]}),s=ree(a),c=l&&l.find((e=>e.value===s)),u=(null==c?void 0:c.step)||1,[p]=RI(aee(n));return(0,Bt.createElement)("fieldset",{className:"components-border-radius-control"},(0,Bt.createElement)(ET.VisualLabel,{as:"legend"},gr("Radius")),(0,Bt.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(see,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:a,setSelectedUnits:i,units:l}),(0,Bt.createElement)(xY,{label:gr("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=p?p:"",min:0,max:bee[s],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${s}`:void 0)},step:u,__nextHasNoMarginBottom:!0})):(0,Bt.createElement)(uee,{min:0,onChange:t,selectedUnits:a,setSelectedUnits:i,values:n||dee,units:l}),(0,Bt.createElement)(pee,{onClick:()=>r(!o),isLinked:o})))}function Mee(e){return[zee(e),fee(e),hee(e),gee(e)].some(Boolean)}function zee(e){var t;return null==e||null===(t=e.border)||void 0===t?void 0:t.color}function fee(e){var t;return null==e||null===(t=e.border)||void 0===t?void 0:t.radius}function hee(e){var t;return null==e||null===(t=e.border)||void 0===t?void 0:t.style}function gee(e){var t;return null==e||null===(t=e.border)||void 0===t?void 0:t.width}function Oee(e){return e?e.style||!e.color&&!e.width?e:{...e,style:"solid"}:e}function vee(e){let{resetAllFilter:t,onChange:n,value:o,panelId:r,children:a}=e;return(0,Bt.createElement)(ZX,{label:gr("Border"),resetAll:()=>{const e=t(o);n(e)},panelId:r},a)}const Aee={radius:!0,color:!0,width:!0};function yee(e){let{as:t=vee,value:n,onChange:o,inheritedValue:r=n,settings:a,panelId:i,defaultControls:l=Aee}=e;const s=sI(a),c=e=>{const t=s.flatMap((e=>{let{colors:t}=e;return t})).find((t=>{let{color:n}=t;return n===e}));return t?"var:preset|color|"+t.slug:e},u=(0,Bt.useCallback)((e=>{const t=s.flatMap((e=>{let{colors:t}=e;return t})).find((t=>{let{slug:n}=t;return e==="var:preset|color|"+n}));return t?t.color:e}),[s]),p=(0,Bt.useMemo)((()=>{var e,t;if(Q5(null==r?void 0:r.border)){const e={...null==r?void 0:r.border};return["top","right","bottom","left"].forEach((t=>{var n;e[t]={...e[t],color:u(null===(n=e[t])||void 0===n?void 0:n.color)}})),e}return{...null==r?void 0:r.border,color:null!=r&&null!==(e=r.border)&&void 0!==e&&e.color?u(null==r||null===(t=r.border)||void 0===t?void 0:t.color):void 0}}),[null==r?void 0:r.border,u]),d=e=>o({...n,border:e}),b=zee(a),m=hee(a),M=gee(a),z=fee(a),f=(h=null==p?void 0:p.radius,QD({settings:a},"",h));var h;const g=e=>d({...p,radius:e}),O=()=>{var e;const t=null==n||null===(e=n.border)||void 0===e?void 0:e.radius;return"object"==typeof t?Object.entries(t).some(Boolean):!!t},v=(0,Bt.useCallback)((e=>({...e,border:void 0})),[]),A=(null==l?void 0:l.color)||(null==l?void 0:l.width);return(0,Bt.createElement)(t,{resetAllFilter:v,value:n,onChange:o,panelId:i},(M||b)&&(0,Bt.createElement)(s6,{hasValue:()=>(e=>{if(!e)return!1;if(Q5(e))return!K5.every((t=>Z5(e[t])));return!Z5(e)})(null==n?void 0:n.border),label:gr("Border"),onDeselect:()=>(()=>{var e;if(O())return d({radius:null==n||null===(e=n.border)||void 0===e?void 0:e.radius});d(void 0)})(),isShownByDefault:A,panelId:i},(0,Bt.createElement)(nee,{colors:s,enableAlpha:!0,enableStyle:m,onChange:e=>{const t=function(e){return e?Q5(e)?{top:Oee(e.top),right:Oee(e.right),bottom:Oee(e.bottom),left:Oee(e.left)}:Oee(e):e}(e);Q5(t)?["top","right","bottom","left"].forEach((e=>{var n;t[e]&&(t[e]={...t[e],color:c(null===(n=t[e])||void 0===n?void 0:n.color)})})):t&&(t.color=c(t.color)),d({radius:null==p?void 0:p.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:p,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large"})),z&&(0,Bt.createElement)(s6,{hasValue:O,label:gr("Radius"),onDeselect:()=>g(void 0),isShownByDefault:l.radius,panelId:i},(0,Bt.createElement)(mee,{values:f,onChange:e=>{g(e||void 0)}})))}const _ee="__experimentalBorder",qee=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},kee=e=>{let{colors:t,namedColor:n,customColor:o}=e;if(n){const e=qee(t,"slug",n);if(e)return e}if(!o)return{color:void 0};const r=qee(t,"color",o);return r||{color:o}};function wee(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Eee(e){var t;if(Q5(null==e?void 0:e.border))return{style:e,borderColor:void 0};const n=null==e||null===(t=e.border)||void 0===t?void 0:t.color,o=null!=n&&n.startsWith("var:preset|color|")?n.substring("var:preset|color|".length):void 0,r={...e};return r.border={...r.border,color:o?void 0:n},{style:dI(r),borderColor:o}}function Wee(e){var t,n,o,r;return Q5(null===(t=e.style)||void 0===t?void 0:t.border)?e.style:{...e.style,border:{...null===(n=e.style)||void 0===n?void 0:n.border,color:e.borderColor?"var:preset|color|"+e.borderColor:null===(o=e.style)||void 0===o||null===(r=o.border)||void 0===r?void 0:r.color}}}function Lee(e){let{children:t,resetAllFilter:n}=e;const o=(0,Bt.useCallback)((e=>{const t=Wee(e),o=n(t);return{...e,...Eee(o)}}),[n]);return(0,Bt.createElement)(rj,{group:"border",resetAllFilter:o},t)}function xee(e){const{clientId:t,name:n,attributes:o,setAttributes:r}=e,a=MI(n),i=Mee(a),l=(0,Bt.useMemo)((()=>Wee({style:o.style,borderColor:o.borderColor})),[o.style,o.borderColor]);if(!i)return null;const s=Ba(e.name,[_ee,"__experimentalDefaultControls"]);return(0,Bt.createElement)(yee,{as:Lee,panelId:t,settings:a,value:l,onChange:e=>{r(Eee(e))},defaultControls:s})}function Cee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==mL.OS)return!1;const n=Ba(e,_ee);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function Ree(e,t,n){if(!Cee(t,"color")||mI(t,_ee,"color"))return e;const o=See(n),r=eM()(e.className,o);return e.className=r||void 0,e}function See(e){var t;const{borderColor:n,style:o}=e,r=a6("border-color",n);return eM()({"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color),[r]:!!r})}const Nee=Jm((e=>t=>{var n,o,r,a,i,l,s,c,u;const{name:p,attributes:d}=t,{borderColor:b,style:m}=d,{colors:M}=i6();if(!Cee(p,"color")||mI(p,_ee,"color"))return(0,Bt.createElement)(e,t);const{color:z}=kee({colors:M,namedColor:b}),{color:f}=kee({colors:M,namedColor:wee(null==m||null===(n=m.border)||void 0===n||null===(o=n.top)||void 0===o?void 0:o.color)}),{color:h}=kee({colors:M,namedColor:wee(null==m||null===(r=m.border)||void 0===r||null===(a=r.right)||void 0===a?void 0:a.color)}),{color:g}=kee({colors:M,namedColor:wee(null==m||null===(i=m.border)||void 0===i||null===(l=i.bottom)||void 0===l?void 0:l.color)}),{color:O}=kee({colors:M,namedColor:wee(null==m||null===(s=m.border)||void 0===s||null===(c=s.left)||void 0===c?void 0:c.color)}),v={borderTopColor:f||z,borderRightColor:h||z,borderBottomColor:g||z,borderLeftColor:O||z};let A=t.wrapperProps;return A={...t.wrapperProps,style:{...null===(u=t.wrapperProps)||void 0===u?void 0:u.style,...v}},(0,Bt.createElement)(e,Pt({},t,{wrapperProps:A}))}));function Tee(e){if(e)return`has-${e}-gradient-background`}function Bee(e,t){const n=null==e?void 0:e.find((e=>e.slug===t));return n&&n.gradient}function Dee(e,t){const n=function(e,t){const n=null==e?void 0:e.find((e=>e.gradient===t));return n}(e,t);return n&&n.slug}function Iee(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=CN(),o=ID("color.gradients.custom"),r=ID("color.gradients.theme"),a=ID("color.gradients.default"),i=(0,Bt.useMemo)((()=>[...o||[],...r||[],...a||[]]),[o,r,a]),{gradient:l,customGradient:s}=fp((o=>{const{getBlockAttributes:r}=o(wN),a=r(n)||{};return{customGradient:a[t],gradient:a[e]}}),[n,e,t]),{updateBlockAttributes:c}=Lm(wN),u=(0,Bt.useCallback)((o=>{const r=Dee(i,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,c]),p=Tee(l);let d;return d=l?Bee(i,l):s,{gradientClass:p,gradientValue:d,setGradient:u}}wo("blocks.registerBlockType","core/border/addAttributes",(function(e){return Cee(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),wo("blocks.getSaveContent.extraProps","core/border/addSaveProps",Ree),wo("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Cee(e,"color")||mI(e,_ee,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Ree(o,e,n)},e})),wo("editor.BlockListBlock","core/border/with-border-color-palette-styles",Nee);const Pee=lE("div",{target:"ebn2ljm1"})({name:"5ob2ly",styles:"display:flex;position:relative"}),Hee=lE("div",{target:"ebn2ljm0"})((e=>{let{isLayered:t,offsetAmount:n}=e;return GN(t?QI({marginLeft:n})():QI({right:-1*n})(),"","")})," ",(e=>{let{isLayered:t}=e;return t?Fee:Yee})," ",(e=>{let{zIndex:t}=e;return GN({zIndex:t},"","")}),";"),Fee={name:"a4hmbt",styles:"position:absolute"},Yee={name:"bjn8wh",styles:"position:relative"};const Xee=Gw((function(e,t){const{children:n,className:o,isLayered:r=!0,isReversed:a=!1,offset:i=0,...l}=$w(e,"ZStack"),s=aD(n),c=s.length-1,u=s.map(((e,t)=>{const n=a?c-t:t,o=i*t,l=(0,Bt.isValidElement)(e)?e.key:t;return(0,Bt.createElement)(Hee,{isLayered:r,offsetAmount:o,zIndex:n,key:l},e)}));return(0,Bt.createElement)(Pee,Pt({},l,{className:o,ref:t}),u)}),"ZStack"),jee=Xee;function Vee(e){let{onDragStart:t,onDragMove:n,onDragEnd:o}=e;const[r,a]=(0,Bt.useState)(!1),i=(0,Bt.useRef)({onDragStart:t,onDragMove:n,onDragEnd:o});bj((()=>{i.current.onDragStart=t,i.current.onDragMove=n,i.current.onDragEnd=o}),[t,n,o]);const l=(0,Bt.useCallback)((e=>i.current.onDragMove&&i.current.onDragMove(e)),[]),s=(0,Bt.useCallback)((e=>{i.current.onDragEnd&&i.current.onDragEnd(e),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),a(!1)}),[]),c=(0,Bt.useCallback)((e=>{i.current.onDragStart&&i.current.onDragStart(e),document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),a(!0)}),[]);return(0,Bt.useEffect)((()=>()=>{r&&(document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s))}),[r]),{startDrag:c,endDrag:s,isDragging:r}}const Uee=e=>{let{__nextHasNoMarginBottom:t}=e;return t?"":GN("margin-bottom:",QN(2),";","")},$ee=lE(lT,{target:"eln3bjz4"})(Uee,";"),Gee=lE("div",{target:"eln3bjz3"})("border-radius:50%;border:",RT.borderWidth," solid ",gT.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;:active{cursor:grabbing;}"),Kee=lE("div",{target:"eln3bjz2"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),Jee=lE("div",{target:"eln3bjz1"})("background:",gT.ui.theme,";border-radius:50%;box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:",6,"px;height:",6,"px;"),Zee=lE(kP,{target:"eln3bjz0"})("color:",gT.ui.theme,";margin-right:",QN(3),";");const Qee=function(e){let{value:t,onChange:n,...o}=e;const r=(0,Bt.useRef)(null),a=(0,Bt.useRef)(),i=(0,Bt.useRef)(),l=e=>{var t;if(void 0!==e&&(e.preventDefault(),null===(t=e.target)||void 0===t||t.focus(),void 0!==a.current&&void 0!==n)){const{x:t,y:o}=a.current;n(function(e,t,n,o){const r=o-t,a=n-e,i=Math.atan2(r,a),l=Math.round(i*(180/Math.PI))+90;if(l<0)return 360+l;return l}(t,o,e.clientX,e.clientY))}},{startDrag:s,isDragging:c}=Vee({onDragStart:e=>{(()=>{if(null===r.current)return;const e=r.current.getBoundingClientRect();a.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),l(e)},onDragMove:l,onDragEnd:l});return(0,Bt.useEffect)((()=>{c?(void 0===i.current&&(i.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=i.current||"",i.current=void 0)}),[c]),(0,Bt.createElement)(Gee,Pt({ref:r,onMouseDown:s,className:"components-angle-picker-control__angle-circle"},o),(0,Bt.createElement)(Kee,{style:t?{transform:`rotate(${t}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,Bt.createElement)(Jee,{className:"components-angle-picker-control__angle-circle-indicator"})))};const ete=(0,Bt.forwardRef)((function(e,t){const{__nextHasNoMarginBottom:n=!1,className:o,label:r=gr("Angle"),onChange:a,value:i,...l}=e;n||jo("Bottom margin styles for wp.components.AnglePickerControl",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const s=Sz()("components-angle-picker-control",o),c=(0,Bt.createElement)(Zee,null,"°"),[u,p]=Ar()?[c,null]:[null,c];return(0,Bt.createElement)($ee,Pt({},l,{ref:t,__nextHasNoMarginBottom:n,className:s,gap:2}),(0,Bt.createElement)(JB,null,(0,Bt.createElement)(dF,{label:r,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{if(void 0===a)return;const t=void 0!==e&&""!==e?parseInt(e,10):0;a(t)},size:"__unstable-large",step:"1",value:i,spinControls:"none",prefix:u,suffix:p})),(0,Bt.createElement)(cF,{marginBottom:"1",marginTop:"auto"},(0,Bt.createElement)(Qee,{"aria-hidden":"true",value:i,onChange:a})))}));function tte(e){return Math.max(0,Math.min(100,e))}function nte(e,t,n){const o=e.slice();return o[t]=n,o}function ote(e,t,n){if(function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const r=e[t].position,a=Math.min(r,n),i=Math.max(r,n);return e.some(((e,r)=>{let{position:l}=e;return r!==t&&(Math.abs(l-n)({placement:"bottom",offset:8})),[]),a=Sz()("components-custom-gradient-picker__control-point-dropdown",n);return(0,Bt.createElement)(P9,Pt({isRenderedInSidebar:t,popoverProps:r,className:a},o))}function ste(e){let{disableRemove:t,disableAlpha:n,gradientPickerDomRef:o,ignoreMarkerPosition:r,value:a,onChange:i,onStartControlPointChange:l,onStopControlPointChange:s,__experimentalIsRenderedInSidebar:c}=e;const u=(0,Bt.useRef)(),p=e=>{if(void 0===u.current||null===o.current)return;const t=ate(e.clientX,o.current),{initialPosition:n,index:r,significantMoveHappened:l}=u.current;!l&&Math.abs(n-t)>=5&&(u.current.significantMoveHappened=!0),i(ote(a,r,t))},d=()=>{window&&window.removeEventListener&&u.current&&u.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",d),s(),u.current.listenersActivated=!1)},b=(0,Bt.useRef)();return b.current=d,(0,Bt.useEffect)((()=>()=>{var e;null===(e=b.current)||void 0===e||e.call(b)}),[]),(0,Bt.createElement)(Bt.Fragment,null,a.map(((e,o)=>{const b=null==e?void 0:e.position;return r!==b&&(0,Bt.createElement)(lte,{isRenderedInSidebar:c,key:o,onClose:s,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,Bt.createElement)(ite,{key:o,onClick:()=>{u.current&&u.current.significantMoveHappened||(n?s():l(),r())},onMouseDown:()=>{window&&window.addEventListener&&(u.current={initialPosition:b,index:o,significantMoveHappened:!1,listenersActivated:!0},l(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",d))},onKeyDown:t=>{"ArrowLeft"===t.code?(t.stopPropagation(),i(ote(a,o,tte(e.position-10)))):"ArrowRight"===t.code&&(t.stopPropagation(),i(ote(a,o,tte(e.position+10))))},isOpen:n,position:e.position,color:e.color})},renderContent:r=>{let{onClose:l}=r;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(x9,{enableAlpha:!n,color:e.color,onChange:e=>{i(rte(a,o,Gr(e).toRgbString()))}}),!t&&a.length>2&&(0,Bt.createElement)(lD,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,Bt.createElement)(bE,{onClick:()=>{i(function(e,t){return e.filter(((e,n)=>n!==t))}(a,o)),l()},variant:"link"},gr("Remove Control Point"))))},style:{left:`${e.position}%`,transform:"translateX( -50% )"}})})))}ste.InsertPoint=function(e){let{value:t,onChange:n,onOpenInserter:o,onCloseInserter:r,insertPosition:a,disableAlpha:i,__experimentalIsRenderedInSidebar:l}=e;const[s,c]=(0,Bt.useState)(!1);return(0,Bt.createElement)(lte,{isRenderedInSidebar:l,className:"components-custom-gradient-picker__inserter",onClose:()=>{r()},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,Bt.createElement)(bE,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?r():(c(!1),o()),n()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:eP})},renderContent:()=>(0,Bt.createElement)(x9,{enableAlpha:!i,onChange:e=>{s?n(function(e,t,n){const o=e.findIndex((e=>e.position===t));return rte(e,o,n)}(t,a,Gr(e).toRgbString())):(n(function(e,t,n){const o=e.findIndex((e=>e.position>t)),r={color:n,position:t},a=e.slice();return a.splice(o-1,0,r),a}(t,a,Gr(e).toRgbString())),c(!0))}}),style:null!==a?{left:`${a}%`,transform:"translateX( -50% )"}:void 0})};const cte=ste,ute=(e,t)=>{switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e},pte={id:"IDLE"};function dte(e){let{background:t,hasGradient:n,value:o,onChange:r,disableInserter:a=!1,disableAlpha:i=!1,__experimentalIsRenderedInSidebar:l=!1}=e;const s=(0,Bt.useRef)(null),[c,u]=(0,Bt.useReducer)(ute,pte),p=e=>{if(!s.current)return;const t=ate(e.clientX,s.current);o.some((e=>{let{position:n}=e;return Math.abs(t-n)<10}))?"MOVING_INSERTER"===c.id&&u({type:"STOP_INSERTER_MOVE"}):u({type:"MOVE_INSERTER",insertPosition:t})},d="MOVING_INSERTER"===c.id,b="INSERTING_CONTROL_POINT"===c.id;return(0,Bt.createElement)("div",{className:Sz()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:p,onMouseMove:p,onMouseLeave:()=>{u({type:"STOP_INSERTER_MOVE"})}},(0,Bt.createElement)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:t,opacity:n?1:.4}}),(0,Bt.createElement)("div",{ref:s,className:"components-custom-gradient-picker__markers-container"},!a&&(d||b)&&(0,Bt.createElement)(cte.InsertPoint,{__experimentalIsRenderedInSidebar:l,disableAlpha:i,insertPosition:c.insertPosition,value:o,onChange:r,onOpenInserter:()=>{u({type:"OPEN_INSERTER"})},onCloseInserter:()=>{u({type:"CLOSE_INSERTER"})}}),(0,Bt.createElement)(cte,{__experimentalIsRenderedInSidebar:l,disableAlpha:i,disableRemove:a,gradientPickerDomRef:s,ignoreMarkerPosition:b?c.insertPosition:void 0,value:o,onChange:r,onStartControlPointChange:()=>{u({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{u({type:"STOP_CONTROL_CHANGE"})}})))}var bte=n(9948);const mte="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",Mte={type:"angular",value:"90"},zte=[{value:"linear-gradient",label:gr("Linear")},{value:"radial-gradient",label:gr("Radial")}],fte={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function hte(e){let{type:t,value:n,length:o}=e;return`${function(e){let{type:t,value:n}=e;return"literal"===t?n:"hex"===t?`#${n}`:`${t}(${n.join(",")})`}({type:t,value:n})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(o)}`}function gte(e){let{type:t,orientation:n,colorStops:o}=e;const r=function(e){if(!Array.isArray(e)&&e&&"angular"===e.type)return`${e.value}deg`}(n);return`${t}(${[r,...o.sort(((e,t)=>{const n=e=>{var t;return void 0===(null==e||null===(t=e.length)||void 0===t?void 0:t.value)?0:parseInt(e.length.value)};return n(e)-n(t)})).map(hte)].filter(Boolean).join(",")})`}function Ote(e){return void 0===e.length||"%"!==e.length.type}function vte(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Jr([Zr]);const Ate=lE(JB,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),yte=lE(JB,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"}),_te=e=>{var t,n;let{gradientAST:o,hasGradient:r,onChange:a}=e;const i=null!==(t=null==o||null===(n=o.orientation)||void 0===n?void 0:n.value)&&void 0!==t?t:180;return(0,Bt.createElement)(ete,{__nextHasNoMarginBottom:!0,onChange:e=>{a(gte({...o,orientation:{type:"angular",value:`${e}`}}))},value:r?i:""})},qte=e=>{let{gradientAST:t,hasGradient:n,onChange:o}=e;const{type:r}=t;return(0,Bt.createElement)(P6,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:gr("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&o(gte({...t,orientation:t.orientation?void 0:Mte,type:"linear-gradient"})),"radial-gradient"===e&&(()=>{const{orientation:e,...n}=t;o(gte({...n,type:"radial-gradient"}))})()},options:zte,size:"__unstable-large",value:n?r:void 0})};const kte=function(e){let{__nextHasNoMargin:t=!1,value:n,onChange:o,__experimentalIsRenderedInSidebar:r=!1}=e;const{gradientAST:a,hasGradient:i}=function(e){var t;let n,o=!!e;const r=null!=e?e:mte;try{n=bte.parse(r)[0]}catch(e){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",e),n=bte.parse(mte)[0],o=!1}if(Array.isArray(n.orientation)||"directional"!==(null===(t=n.orientation)||void 0===t?void 0:t.type)||(n.orientation={type:"angular",value:fte[n.orientation.value].toString()}),n.colorStops.some(Ote)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:""+t*n,type:"%"}}))}return{gradientAST:n,hasGradient:o}}(n),l=function(e){return gte({type:"linear-gradient",orientation:Mte,colorStops:e.colorStops})}(a),s=a.colorStops.map((e=>({color:vte(e),position:parseInt(e.length.value)})));return t||jo("Outer margin styles for wp.components.CustomGradientPicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,Bt.createElement)($Q,{spacing:4,className:Sz()("components-custom-gradient-picker",{"is-next-has-no-margin":t})},(0,Bt.createElement)(dte,{__experimentalIsRenderedInSidebar:r,background:l,hasGradient:i,value:s,onChange:e=>{o(gte(function(e,t){return{...e,colorStops:t.map((e=>{let{position:t,color:n}=e;const{r:o,g:r,b:a,a:i}=Gr(n).toRgb();return{length:{type:"%",value:null==t?void 0:t.toString()},type:i<1?"rgba":"rgb",value:i<1?[`${o}`,`${r}`,`${a}`,`${i}`]:[`${o}`,`${r}`,`${a}`]}}))}}(a,e)))}}),(0,Bt.createElement)(lT,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,Bt.createElement)(Ate,null,(0,Bt.createElement)(qte,{gradientAST:a,hasGradient:i,onChange:o})),(0,Bt.createElement)(yte,null,"linear-gradient"===a.type&&(0,Bt.createElement)(_te,{gradientAST:a,hasGradient:i,onChange:o}))))},wte=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function Ete(e){let{className:t,clearGradient:n,gradients:o,onChange:r,value:a,actions:i}=e;const l=(0,Bt.useMemo)((()=>o.map(((e,t)=>{let{gradient:o,name:i}=e;return(0,Bt.createElement)(R9.Option,{key:o,value:o,isSelected:a===o,tooltipText:i||lr(gr("Gradient code: %s"),o),style:{color:"rgba( 0,0,0,0 )",background:o},onClick:a===o?n:()=>r(o,t),"aria-label":i?lr(gr("Gradient: %s"),i):lr(gr("Gradient code: %s"),o)})}))),[o,a,r,n]);return(0,Bt.createElement)(R9,{className:t,options:l,actions:i})}function Wte(e){let{className:t,clearGradient:n,gradients:o,onChange:r,value:a,actions:i,headingLevel:l}=e;return(0,Bt.createElement)($Q,{spacing:3,className:t},o.map(((e,t)=>{let{name:s,gradients:c}=e;return(0,Bt.createElement)($Q,{spacing:2,key:t},(0,Bt.createElement)(S9,{level:l},s),(0,Bt.createElement)(Ete,Pt({clearGradient:n,gradients:c,onChange:e=>r(e,t),value:a},o.length===t+1?{actions:i}:{})))})))}function Lte(e){return wte(e.gradients)?(0,Bt.createElement)(Wte,e):(0,Bt.createElement)(Ete,e)}const xte=function(e){let{__nextHasNoMargin:t=!1,className:n,gradients:o=[],onChange:r,value:a,clearable:i=!0,disableCustomGradients:l=!1,__experimentalIsRenderedInSidebar:s,headingLevel:c=2}=e;const u=(0,Bt.useCallback)((()=>r(void 0)),[r]);t||jo("Outer margin styles for wp.components.GradientPicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version"});const p=t?{}:{marginTop:o.length?void 0:3,marginBottom:i?0:6};return(0,Bt.createElement)(cF,Pt({marginBottom:0},p),(0,Bt.createElement)($Q,{spacing:o.length?4:0},!l&&(0,Bt.createElement)(kte,{__nextHasNoMargin:!0,__experimentalIsRenderedInSidebar:s,value:a,onChange:r}),(o.length||i)&&(0,Bt.createElement)(Lte,{className:n,clearGradient:u,gradients:o,onChange:r,value:a,actions:i&&!l&&(0,Bt.createElement)(R9.ButtonAction,{onClick:u},gr("Clear")),headingLevel:c})))},Cte=["colors","disableCustomColors","gradients","disableCustomGradients"],Rte={name:"color",title:"Solid",value:"color"},Ste={name:"gradient",title:"Gradient",value:"gradient"},Nte=[Rte,Ste];function Tte(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:a,className:i,label:l,onColorChange:s,onGradientChange:c,colorValue:u,gradientValue:p,clearable:d,showTitle:b=!0,enableAlpha:m,headingLevel:M}=e;const z=s&&(!(0,Ht.isEmpty)(t)||!o),f=c&&(!(0,Ht.isEmpty)(n)||!r);if(!z&&!f)return null;const h={[Rte.value]:(0,Bt.createElement)(F9,{value:u,onChange:f?e=>{s(e),c()}:s,colors:t,disableCustomColors:o,__experimentalIsRenderedInSidebar:a,clearable:d,enableAlpha:m,headingLevel:M}),[Ste.value]:(0,Bt.createElement)(xte,{__nextHasNoMargin:!0,value:p,onChange:z?e=>{c(e),s()}:c,gradients:n,disableCustomGradients:r,__experimentalIsRenderedInSidebar:a,clearable:d,headingLevel:M})},g=e=>(0,Bt.createElement)("div",{className:"block-editor-color-gradient-control__panel"},h[e]);return(0,Bt.createElement)(ET,{__nextHasNoMarginBottom:!0,className:eM()("block-editor-color-gradient-control",i)},(0,Bt.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,Bt.createElement)($Q,{spacing:1},b&&(0,Bt.createElement)("legend",null,(0,Bt.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,Bt.createElement)(ET.VisualLabel,null,l))),z&&f&&(0,Bt.createElement)(Z0,{className:"block-editor-color-gradient-control__tabs",tabs:Nte,initialTabName:p?Ste.value:!!z&&Rte.value},(e=>g(e.value))),!f&&g(Rte.value),!z&&g(Ste.value))))}function Bte(e){const t={};return t.colors=ID("color.palette"),t.gradients=ID("color.gradients"),t.disableCustomColors=!ID("color.custom"),t.disableCustomGradients=!ID("color.customGradient"),(0,Bt.createElement)(Tte,Pt({},t,e))}const Dte=function(e){return Cte.every((t=>e.hasOwnProperty(t)))?(0,Bt.createElement)(Tte,e):(0,Bt.createElement)(Bte,e)};function Ite(e){const t=Pte(e),n=jte(e),o=Hte(e),r=Yte(e),a=Yte(e),i=Fte(e);return t||n||o||r||a||i}function Pte(e){var t,n;const o=sI(e);return(null==e||null===(t=e.color)||void 0===t?void 0:t.text)&&((null==o?void 0:o.length)>0||(null==e||null===(n=e.color)||void 0===n?void 0:n.custom))}function Hte(e){var t,n;const o=sI(e);return(null==e||null===(t=e.color)||void 0===t?void 0:t.link)&&((null==o?void 0:o.length)>0||(null==e||null===(n=e.color)||void 0===n?void 0:n.custom))}function Fte(e){var t,n;const o=sI(e);return(null==e||null===(t=e.color)||void 0===t?void 0:t.caption)&&((null==o?void 0:o.length)>0||(null==e||null===(n=e.color)||void 0===n?void 0:n.custom))}function Yte(e){var t,n,o;const r=sI(e),a=cI(e);return(null==e||null===(t=e.color)||void 0===t?void 0:t.heading)&&((null==r?void 0:r.length)>0||(null==e||null===(n=e.color)||void 0===n?void 0:n.custom)||(null==a?void 0:a.length)>0||(null==e||null===(o=e.color)||void 0===o?void 0:o.customGradient))}function Xte(e){var t,n,o;const r=sI(e),a=cI(e);return(null==e||null===(t=e.color)||void 0===t?void 0:t.button)&&((null==r?void 0:r.length)>0||(null==e||null===(n=e.color)||void 0===n?void 0:n.custom)||(null==a?void 0:a.length)>0||(null==e||null===(o=e.color)||void 0===o?void 0:o.customGradient))}function jte(e){var t,n,o;const r=sI(e),a=cI(e);return(null==e||null===(t=e.color)||void 0===t?void 0:t.background)&&((null==r?void 0:r.length)>0||(null==e||null===(n=e.color)||void 0===n?void 0:n.custom)||(null==a?void 0:a.length)>0||(null==e||null===(o=e.color)||void 0===o?void 0:o.customGradient))}function Vte(e){let{resetAllFilter:t,onChange:n,value:o,panelId:r,children:a}=e;return(0,Bt.createElement)(ZX,{label:gr("Color"),resetAll:()=>{const e=t(o);n(e)},panelId:r,hasInnerWrapper:!0,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,Bt.createElement)("div",{className:"color-block-support-panel__inner-wrapper"},a))}const Ute={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},$te={placement:"left-start",offset:36,shift:!0},Gte=e=>{let{indicators:t,label:n}=e;return(0,Bt.createElement)(lD,{justify:"flex-start"},(0,Bt.createElement)(jee,{isLayered:!1,offset:-8},t.map(((e,t)=>(0,Bt.createElement)(lT,{key:t,expanded:!1},(0,Bt.createElement)(B6,{colorValue:e}))))),(0,Bt.createElement)(cT,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))};function Kte(e){let{isGradient:t,inheritedValue:n,userValue:o,setValue:r,colorGradientControlSettings:a}=e;return(0,Bt.createElement)(Dte,Pt({},a,{showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:t?void 0:n,gradientValue:t?n:void 0,onColorChange:t?void 0:r,onGradientChange:t?r:void 0,clearable:n===o,headingLevel:3}))}function Jte(e){let{label:t,hasValue:n,resetValue:o,isShownByDefault:r,indicators:a,tabs:i,colorGradientControlSettings:l,panelId:s}=e;const c=i.map((e=>{let{key:t,label:n}=e;return{name:t,title:n}}));return(0,Bt.createElement)(s6,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:n,label:t,onDeselect:o,isShownByDefault:r,panelId:s},(0,Bt.createElement)(BW,{popoverProps:$te,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:e=>{let{onToggle:n,isOpen:o}=e;const r={onClick:n,className:eM()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":o}),"aria-expanded":o};return(0,Bt.createElement)(bE,r,(0,Bt.createElement)(Gte,{indicators:a,label:t}))},renderContent:()=>(0,Bt.createElement)(T9,{paddingSize:"none"},(0,Bt.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},1===i.length&&(0,Bt.createElement)(Kte,Pt({},i[0],{colorGradientControlSettings:l})),i.length>1&&(0,Bt.createElement)(Z0,{tabs:c},(e=>{const t=i.find((t=>t.key===e.name));return t?(0,Bt.createElement)(Kte,Pt({},t,{colorGradientControlSettings:l})):null}))))}))}function Zte(e){var t,n,o,r,a,i,l,s,c,u,p,d,b,m,M,z,f,h,g,O,v,A;let{as:y=Vte,value:_,onChange:q,inheritedValue:k=_,settings:w,panelId:E,defaultControls:W=Ute,children:L}=e;const x=sI(w),C=cI(w),R=null==w||null===(t=w.color)||void 0===t?void 0:t.custom,S=null==w||null===(n=w.color)||void 0===n?void 0:n.customGradient,N=x.length>0||R,T=C.length>0||S,B=e=>QD({settings:w},"",e),D=e=>{const t=x.flatMap((e=>{let{colors:t}=e;return t})).find((t=>{let{color:n}=t;return n===e}));return t?"var:preset|color|"+t.slug:e},I=e=>{const t=C.flatMap((e=>{let{gradients:t}=e;return t})).find((t=>{let{gradient:n}=t;return n===e}));return t?"var:preset|gradient|"+t.slug:e},P=Pte(w),H=B(null==k||null===(o=k.color)||void 0===o?void 0:o.text),F=B(null==_||null===(r=_.color)||void 0===r?void 0:r.text),Y=e=>{q(pI(_,["color","text"],D(e)))},X=jte(w),j=B(null==k||null===(a=k.color)||void 0===a?void 0:a.background),V=B(null==_||null===(i=_.color)||void 0===i?void 0:i.background),U=B(null==k||null===(l=k.color)||void 0===l?void 0:l.gradient),$=B(null==_||null===(s=_.color)||void 0===s?void 0:s.gradient),G=Hte(w),K=B(null==k||null===(c=k.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(p=u.color)||void 0===p?void 0:p.text),J=B(null==_||null===(d=_.elements)||void 0===d||null===(b=d.link)||void 0===b||null===(m=b.color)||void 0===m?void 0:m.text),Z=B(null==k||null===(M=k.elements)||void 0===M||null===(z=M.link)||void 0===z||null===(f=z[":hover"])||void 0===f||null===(h=f.color)||void 0===h?void 0:h.text),Q=B(null==_||null===(g=_.elements)||void 0===g||null===(O=g.link)||void 0===O||null===(v=O[":hover"])||void 0===v||null===(A=v.color)||void 0===A?void 0:A.text),ee=[{name:"caption",label:gr("Captions"),showPanel:Fte(w)},{name:"button",label:gr("Button"),showPanel:Xte(w)},{name:"heading",label:gr("Heading"),showPanel:Yte(w)},{name:"h1",label:gr("H1"),showPanel:Yte(w)},{name:"h2",label:gr("H2"),showPanel:Yte(w)},{name:"h3",label:gr("H3"),showPanel:Yte(w)},{name:"h4",label:gr("H4"),showPanel:Yte(w)},{name:"h5",label:gr("H5"),showPanel:Yte(w)},{name:"h6",label:gr("H6"),showPanel:Yte(w)}],te=(0,Bt.useCallback)((e=>{var t;return{...e,color:void 0,elements:{...null==e?void 0:e.elements,link:{...null==e||null===(t=e.elements)||void 0===t?void 0:t.link,color:void 0,":hover":{color:void 0}},...ee.reduce(((t,n)=>{var o;return{...t,[n.name]:{...null==e||null===(o=e.elements)||void 0===o?void 0:o[n.name],color:void 0}}}),{})}}}),[]),ne=[P&&{key:"text",label:gr("Text"),hasValue:()=>!!F,resetValue:()=>Y(void 0),isShownByDefault:W.text,indicators:[H],tabs:[{key:"text",label:gr("Text"),inheritedValue:H,setValue:Y,userValue:F}]},X&&{key:"background",label:gr("Background"),hasValue:()=>!!V||!!$,resetValue:()=>{const e=pI(_,["color","background"],void 0);e.color.gradient=void 0,q(e)},isShownByDefault:W.background,indicators:[null!=U?U:j],tabs:[{key:"background",label:gr("Solid"),inheritedValue:j,setValue:e=>{const t=pI(_,["color","background"],D(e));t.color.gradient=void 0,q(t)},userValue:V},{key:"gradient",label:gr("Gradient"),inheritedValue:U,setValue:e=>{const t=pI(_,["color","gradient"],I(e));t.color.background=void 0,q(t)},userValue:$,isGradient:!0}]},G&&{key:"link",label:gr("Link"),hasValue:()=>!!J||!!Q,resetValue:()=>{let e=pI(_,["elements","link",":hover","color","text"],void 0);e=pI(e,["elements","link","color","text"],void 0),q(e)},isShownByDefault:W.link,indicators:[K,Z],tabs:[{key:"link",label:gr("Default"),inheritedValue:K,setValue:e=>{q(pI(_,["elements","link","color","text"],D(e)))},userValue:J},{key:"hover",label:gr("Hover"),inheritedValue:Z,setValue:e=>{q(pI(_,["elements","link",":hover","color","text"],D(e)))},userValue:Q}]}].filter(Boolean);return ee.forEach((e=>{var t,n,o,r,a,i,l,s,c,u,p,d,b,m,M,z,f,h;let{name:g,label:O,showPanel:v}=e;if(!v)return;const A=B(null==k||null===(t=k.elements)||void 0===t||null===(n=t[g])||void 0===n||null===(o=n.color)||void 0===o?void 0:o.background),y=B(null==k||null===(r=k.elements)||void 0===r||null===(a=r[g])||void 0===a||null===(i=a.color)||void 0===i?void 0:i.gradient),w=B(null==k||null===(l=k.elements)||void 0===l||null===(s=l[g])||void 0===s||null===(c=s.color)||void 0===c?void 0:c.text),E=B(null==_||null===(u=_.elements)||void 0===u||null===(p=u[g])||void 0===p||null===(d=p.color)||void 0===d?void 0:d.background),L=B(null==_||null===(b=_.elements)||void 0===b||null===(m=b[g])||void 0===m||null===(M=m.color)||void 0===M?void 0:M.gradient),x=B(null==_||null===(z=_.elements)||void 0===z||null===(f=z[g])||void 0===f||null===(h=f.color)||void 0===h?void 0:h.text),C="caption"!==g;ne.push({key:g,label:O,hasValue:()=>!!(x||E||L),resetValue:()=>{const e=pI(_,["elements",g,"color","background"],void 0);e.elements[g].color.gradient=void 0,e.elements[g].color.text=void 0,q(e)},isShownByDefault:W[g],indicators:C?[w,null!=y?y:A]:[w],tabs:[N&&{key:"text",label:gr("Text"),inheritedValue:w,setValue:e=>{q(pI(_,["elements",g,"color","text"],D(e)))},userValue:x},N&&C&&{key:"background",label:gr("Background"),inheritedValue:A,setValue:e=>{const t=pI(_,["elements",g,"color","background"],D(e));t.elements[g].color.gradient=void 0,q(t)},userValue:E},T&&C&&{key:"gradient",label:gr("Gradient"),inheritedValue:y,setValue:e=>{const t=pI(_,["elements",g,"color","gradient"],I(e));t.elements[g].color.background=void 0,q(t)},userValue:L,isGradient:!0}].filter(Boolean)})})),(0,Bt.createElement)(y,{resetAllFilter:te,value:_,onChange:q,panelId:E},ne.map((e=>(0,Bt.createElement)(Jte,Pt({key:e.key},e,{colorGradientControlSettings:{colors:x,disableCustomColors:!R,gradients:C,disableCustomGradients:!S},panelId:E})))),L)}const Qte=()=>{};function ene(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}const tne=function(e){let{className:t,status:n="info",children:o,spokenMessage:r=o,onRemove:a=Qte,isDismissible:i=!0,actions:l=[],politeness:s=ene(n),__unstableHTML:c,onDismiss:u=Qte}=e;!function(e,t){const n="string"==typeof e?e:gs(e);(0,Bt.useEffect)((()=>{n&&vx(n,t)}),[n,t])}(r,s);const p=Sz()(t,"components-notice","is-"+n,{"is-dismissible":i});return c&&"string"==typeof o&&(o=(0,Bt.createElement)(Fl,null,o)),(0,Bt.createElement)("div",{className:p},(0,Bt.createElement)("div",{className:"components-notice__content"},o,(0,Bt.createElement)("div",{className:"components-notice__actions"},l.map(((e,t)=>{let{className:n,label:o,isPrimary:r,variant:a,noDefaultClasses:i=!1,onClick:l,url:s}=e,c=a;return"primary"===a||i||(c=s?"link":"secondary"),void 0===c&&r&&(c="primary"),(0,Bt.createElement)(bE,{key:t,href:s,variant:c,onClick:s?void 0:l,className:Sz()("components-notice__action",n)},o)})))),i&&(0,Bt.createElement)(bE,{className:"components-notice__dismiss",icon:ak,label:gr("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),u(),a()},showTooltip:!1}))};Jr([Zr,ta]);const nne=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fallbackLinkColor:r,fontSize:a,isLargeText:i,textColor:l,linkColor:s,enableAlphaChecker:c=!1}=e;const u=t||n;if(!u)return null;const p=l||o,d=s||r;if(!p&&!d)return null;const b=[{color:p,description:gr("text color")},{color:d,description:gr("link color")}],m=Gr(u),M=m.alpha()<1,z=m.brightness(),f={level:"AA",size:i||!1!==i&&a>=24?"large":"small"};let h="",g="";for(const e of b){if(!e.color)continue;const t=Gr(e.color),n=t.isReadable(m,f),o=t.alpha()<1;if(!n){if(M||o)continue;h=z{var e;if(!s.current)return;a(one(s.current).color);const t=null===(e=s.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&l(one(t).color);let n=s.current,r=one(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=one(n).backgroundColor;o(r)})),(0,Bt.createElement)(nne,{backgroundColor:n,textColor:r,enableAlphaChecker:!0,linkColor:i})}const ane="color",ine=e=>{const t=Ba(e,ane);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},lne=e=>{if("web"!==mL.OS)return!1;const t=Ba(e,ane);return null!==t&&"object"==typeof t&&!!t.link},sne=e=>{const t=Ba(e,ane);return null!==t&&"object"==typeof t&&!!t.gradients},cne=e=>{const t=Ba(e,ane);return t&&!1!==t.background},une=e=>{const t=Ba(e,ane);return t&&!1!==t.text};function pne(e,t,n){var o,r,a,i,l,s;if(!ine(t)||mI(t,ane))return e;const c=sne(t),{backgroundColor:u,textColor:p,gradient:d,style:b}=n,m=e=>!mI(t,ane,e),M=m("text")?a6("color",p):void 0,z=m("gradients")?Tee(d):void 0,f=m("background")?a6("background-color",u):void 0,h=m("background")||m("gradients"),g=u||(null==b||null===(o=b.color)||void 0===o?void 0:o.background)||c&&(d||(null==b||null===(r=b.color)||void 0===r?void 0:r.gradient)),O=eM()(e.className,M,z,{[f]:!(c&&null!=b&&null!==(a=b.color)&&void 0!==a&&a.gradient||!f),"has-text-color":m("text")&&(p||(null==b||null===(i=b.color)||void 0===i?void 0:i.text)),"has-background":h&&g,"has-link-color":m("link")&&(null==b||null===(l=b.elements)||void 0===l||null===(s=l.link)||void 0===s?void 0:s.color)});return e.className=O||void 0,e}function dne(e){var t,n,o;const r=null==e||null===(t=e.color)||void 0===t?void 0:t.text,a=null!=r&&r.startsWith("var:preset|color|")?r.substring("var:preset|color|".length):void 0,i=null==e||null===(n=e.color)||void 0===n?void 0:n.background,l=null!=i&&i.startsWith("var:preset|color|")?i.substring("var:preset|color|".length):void 0,s=null==e||null===(o=e.color)||void 0===o?void 0:o.gradient,c=null!=s&&s.startsWith("var:preset|gradient|")?s.substring("var:preset|gradient|".length):void 0,u={...e};return u.color={...u.color,text:a?void 0:r,background:l?void 0:i,gradient:c?void 0:s},{style:dI(u),textColor:a,backgroundColor:l,gradient:c}}function bne(e){var t,n,o,r,a,i,l;return{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,text:e.textColor?"var:preset|color|"+e.textColor:null===(n=e.style)||void 0===n||null===(o=n.color)||void 0===o?void 0:o.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:null===(r=e.style)||void 0===r||null===(a=r.color)||void 0===a?void 0:a.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:null===(i=e.style)||void 0===i||null===(l=i.color)||void 0===l?void 0:l.gradient}}}function mne(e){let{children:t,resetAllFilter:n}=e;const o=(0,Bt.useCallback)((e=>{const t=bne(e),o=n(t);return{...e,...dne(o)}}),[n]);return(0,Bt.createElement)(rj,{group:"color",resetAllFilter:o},t)}function Mne(e){var t,n,o;const{clientId:r,name:a,attributes:i,setAttributes:l}=e,s=MI(a),c=Ite(s),u=(0,Bt.useMemo)((()=>bne({style:i.style,textColor:i.textColor,backgroundColor:i.backgroundColor,gradient:i.gradient})),[i.style,i.textColor,i.backgroundColor,i.gradient]);if(!c)return null;const p=Ba(e.name,[ane,"__experimentalDefaultControls"]),d="web"===mL.OS&&!(null!=u&&null!==(t=u.color)&&void 0!==t&&t.gradient)&&((null==s||null===(n=s.color)||void 0===n?void 0:n.text)||(null==s||null===(o=s.color)||void 0===o?void 0:o.link))&&!1!==Ba(e.name,[ane,"enableContrastChecker"]);return(0,Bt.createElement)(Zte,{as:mne,panelId:r,settings:s,value:u,onChange:e=>{l(dne(e))},defaultControls:p,enableContrastChecker:!1!==Ba(e.name,[ane,"enableContrastChecker"])},d&&(0,Bt.createElement)(rne,{clientId:r}))}const zne=Jm((e=>t=>{var n;const{name:o,attributes:r}=t,{backgroundColor:a,textColor:i}=r,l=ID("color.palette.custom"),s=ID("color.palette.theme"),c=ID("color.palette.default"),u=(0,Bt.useMemo)((()=>[...l||[],...s||[],...c||[]]),[l,s,c]);if(!ine(o)||mI(o,ane))return(0,Bt.createElement)(e,t);const p={};var d,b;i&&!mI(o,ane,"text")&&(p.color=null===(d=o6(u,i))||void 0===d?void 0:d.color);a&&!mI(o,ane,"background")&&(p.backgroundColor=null===(b=o6(u,a))||void 0===b?void 0:b.color);let m=t.wrapperProps;return m={...t.wrapperProps,style:{...p,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,Bt.createElement)(e,Pt({},t,{wrapperProps:m}))})),fne={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};wo("blocks.registerBlockType","core/color/addAttribute",(function(e){return ine(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),sne(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),wo("blocks.getSaveContent.extraProps","core/color/addSaveProps",pne),wo("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!ine(e)||mI(e,ane))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),pne(o,e,n)},e})),wo("editor.BlockListBlock","core/color/with-color-palette-styles",zne),wo("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return bI({linkColor:lne(r),textColor:une(r),backgroundColor:cne(r),gradient:sne(r)},fne,e,t,n,o)}));const hne=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));function gne(e){const[t,...n]=e;if(!t)return null;const[,o]=RI(t.size),r=n.every((e=>{const[,t]=RI(e.size);return t===o}));return r?o:null}const One=lE("fieldset",{target:"e8tqeku4"})({name:"1t1ytme",styles:"border:0;margin:0;padding:0"}),vne=lE(ET.VisualLabel,{target:"e8tqeku3"})("display:flex;gap:",QN(1),";justify-content:flex-start;margin-bottom:0;"),Ane=lE("span",{target:"e8tqeku2"})("color:",gT.gray[700],";"),yne=lE("div",{target:"e8tqeku1"})((e=>!e.__nextHasNoMarginBottom&&`margin-bottom: ${QN(6)};`),";"),_ne=lE(bE,{target:"e8tqeku0"})("&&&{height:",(e=>"__unstable-large"===e.size?"40px":"30px"),";}"),qne={key:"default",name:gr("Default"),value:void 0},kne={key:"custom",name:gr("Custom")},wne=e=>{var t;const{fontSizes:n,value:o,disableCustomFontSizes:r,size:a,onChange:i,onSelectCustom:l}=e,s=!!gne(n),c=[qne,...n.map((e=>{let t;if(s){const[n]=RI(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,__experimentalHint:t}})),...r?[]:[kne]],u=o?null!==(t=c.find((e=>e.value===o)))&&void 0!==t?t:kne:qne;return(0,Bt.createElement)(V4,{__nextUnconstrainedWidth:!0,className:"components-font-size-picker__select",label:gr("Font size"),hideLabelFromVision:!0,describedBy:lr(gr("Currently selected font size: %s"),u.name),options:c,value:u,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;t===kne?l():i(t.value)},size:a})};const Ene=(0,Bt.forwardRef)((function(e,t){const{label:n,...o}=e,r=o["aria-label"]||n;return(0,Bt.createElement)($B,Pt({},o,{"aria-label":r,ref:t}),n)})),Wne=[gr("S"),gr("M"),gr("L"),gr("XL"),gr("XXL")],Lne=[gr("Small"),gr("Medium"),gr("Large"),gr("Extra Large"),gr("Extra Extra Large")],xne=e=>{const{fontSizes:t,value:n,__nextHasNoMarginBottom:o,size:r,onChange:a}=e;return(0,Bt.createElement)(CB,{__nextHasNoMarginBottom:o,label:gr("Font size"),hideLabelFromVision:!0,value:n,onChange:a,isBlock:!0,size:r},t.map(((e,t)=>(0,Bt.createElement)(Ene,{key:e.slug,value:e.size,label:Wne[t],"aria-label":e.name||Lne[t],showTooltip:!0}))))},Cne=(0,Bt.forwardRef)(((e,t)=>{var n;const{__nextHasNoMarginBottom:o=!1,fallbackFontSize:r,fontSizes:a=[],disableCustomFontSizes:i=!1,onChange:l,size:s="default",units:c,value:u,withSlider:p=!1,withReset:d=!0}=e;o||jo("Bottom margin styles for wp.components.FontSizePicker",{since:"6.1",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const b=NI({availableUnits:c||["px","em","rem"]}),m=a.length>5,M=a.find((e=>e.size===u)),z=!!u&&!M,[f,h]=(0,Bt.useState)(!i&&z),g=(0,Bt.useMemo)((()=>{if(f)return gr("Custom");if(!m)return M?M.name||Lne[a.indexOf(M)]:"";const e=gne(a);return e?`(${e})`:""}),[f,m,M,a]);if(0===a.length&&i)return null;const O="string"==typeof u||"string"==typeof(null===(n=a[0])||void 0===n?void 0:n.size),[v,A]=RI(u,b),y=!!A&&["em","rem"].includes(A);return(0,Bt.createElement)(One,{ref:t,className:"components-font-size-picker"},(0,Bt.createElement)(uE,{as:"legend"},gr("Font size")),(0,Bt.createElement)(cF,null,(0,Bt.createElement)(lD,{className:"components-font-size-picker__header"},(0,Bt.createElement)(vne,{"aria-label":`${gr("Size")} ${g||""}`},gr("Size"),g&&(0,Bt.createElement)(Ane,{className:"components-font-size-picker__header__hint"},g)),!i&&(0,Bt.createElement)(bE,{label:gr(f?"Use size preset":"Set custom size"),icon:hne,onClick:()=>{h(!f)},isPressed:f,isSmall:!0}))),(0,Bt.createElement)(yne,{className:"components-font-size-picker__controls",__nextHasNoMarginBottom:o},!!a.length&&m&&!f&&(0,Bt.createElement)(wne,{fontSizes:a,value:u,disableCustomFontSizes:i,size:s,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(O?e:Number(e),a.find((t=>t.size===e)))},onSelectCustom:()=>h(!0)}),!m&&!f&&(0,Bt.createElement)(xne,{fontSizes:a,value:u,__nextHasNoMarginBottom:o,size:s,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(O?e:Number(e),a.find((t=>t.size===e)))}}),!i&&f&&(0,Bt.createElement)(lT,{className:"components-font-size-picker__custom-size-control"},(0,Bt.createElement)(cT,{isBlock:!0},(0,Bt.createElement)(vF,{label:gr("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:u,onChange:e=>{void 0===e?null==l||l(void 0):null==l||l(O?e:parseInt(e,10))},size:s,units:O?b:[],min:0})),p&&(0,Bt.createElement)(cT,{isBlock:!0},(0,Bt.createElement)(cF,{marginX:2,marginBottom:0},(0,Bt.createElement)(xY,{__nextHasNoMarginBottom:o,className:"components-font-size-picker__custom-input",label:gr("Custom Size"),hideLabelFromVision:!0,value:v,initialPosition:r,withInputField:!1,onChange:e=>{void 0===e?null==l||l(void 0):O?null==l||l(e+(null!=A?A:"px")):null==l||l(e)},min:0,max:y?10:100,step:y?.1:1}))),d&&(0,Bt.createElement)(cT,null,(0,Bt.createElement)(_ne,{disabled:void 0===u,onClick:()=>{null==l||l(void 0)},isSmall:!0,variant:"secondary",size:s},gr("Reset"))))))})),Rne=Cne;function Sne(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const a=ID("typography.fontFamilies");if(o||(o=a),!o||0===o.length)return null;const i=[{value:"",label:gr("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,Bt.createElement)(P6,Pt({label:gr("Font"),options:i,value:t,onChange:n,labelPosition:"top"},r))}const Nne=[{name:Or("Regular","font style"),value:"normal"},{name:Or("Italic","font style"),value:"italic"}],Tne=[{name:Or("Thin","font weight"),value:"100"},{name:Or("Extra Light","font weight"),value:"200"},{name:Or("Light","font weight"),value:"300"},{name:Or("Regular","font weight"),value:"400"},{name:Or("Medium","font weight"),value:"500"},{name:Or("Semi Bold","font weight"),value:"600"},{name:Or("Bold","font weight"),value:"700"},{name:Or("Extra Bold","font weight"),value:"800"},{name:Or("Black","font weight"),value:"900"}];function Bne(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:a},...i}=e,l=n||o,s=((e,t)=>gr(e?t?"Appearance":"Font style":"Font weight"))(n,o),c={key:"default",name:gr("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,Bt.useMemo)((()=>n&&o?(()=>{const e=[c];return Nne.forEach((t=>{let{name:n,value:o}=t;Tne.forEach((t=>{let{name:r,value:a}=t;const i="normal"===o?r:lr(gr("%1$s %2$s"),r,n);e.push({key:`${o}-${a}`,name:i,style:{fontStyle:o,fontWeight:a}})}))})),e})():n?(()=>{const e=[c];return Nne.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[c];return Tne.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),p=u.find((e=>e.style.fontStyle===r&&e.style.fontWeight===a))||u[0];return l&&(0,Bt.createElement)(U4,Pt({},i,{className:"components-font-appearance-control",label:s,describedBy:p?lr(gr(n?o?"Currently selected font appearance: %s":"Currently selected font style: %s":"Currently selected font weight: %s"),p.name):gr("No selected font appearance"),options:u,value:p,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const Dne=1.5,Ine=.1;const Pne=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:o=!1,__unstableInputWidth:r="60px",...a}=e;const i=function(e){return void 0!==e&&""!==e}(t),l=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Dne;default:return e}},s=i?t:"";o||jo("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const c=o?void 0:{marginBottom:24};return(0,Bt.createElement)("div",{className:"block-editor-line-height-control",style:c},(0,Bt.createElement)(dF,Pt({},a,{__unstableInputWidth:r,__unstableStateReducer:(e,t)=>{var n;const o=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),r=l(e.value,o);return{...e,value:r}},onChange:(e,t)=>{let{event:o}=t;"click"!==o.type?n(e):n(l(e,!1))},label:gr("Line height"),placeholder:Dne,step:Ine,value:s,min:0,spinControls:"custom"})))};function Hne(e){let{value:t,onChange:n,__unstableInputWidth:o="60px",...r}=e;const a=NI({availableUnits:ID("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,Bt.createElement)(vF,Pt({},r,{label:gr("Letter spacing"),value:t,__unstableInputWidth:o,units:a,onChange:n}))}const Fne=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Yne=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Xne=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),jne=[{name:gr("None"),value:"none",icon:tP},{name:gr("Uppercase"),value:"uppercase",icon:Fne},{name:gr("Lowercase"),value:"lowercase",icon:Yne},{name:gr("Capitalize"),value:"capitalize",icon:Xne}];function Vne(e){let{className:t,value:n,onChange:o}=e;return(0,Bt.createElement)("fieldset",{className:eM()("block-editor-text-transform-control",t)},(0,Bt.createElement)(ET.VisualLabel,{as:"legend"},gr("Letter case")),(0,Bt.createElement)("div",{className:"block-editor-text-transform-control__buttons"},jne.map((e=>(0,Bt.createElement)(bE,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{o(e.value===n?void 0:e.value)}})))))}const Une=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),$ne=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})),Gne=[{name:gr("None"),value:"none",icon:tP},{name:gr("Underline"),value:"underline",icon:Une},{name:gr("Strikethrough"),value:"line-through",icon:$ne}];function Kne(e){let{value:t,onChange:n,className:o}=e;return(0,Bt.createElement)("fieldset",{className:eM()("block-editor-text-decoration-control",o)},(0,Bt.createElement)(ET.VisualLabel,{as:"legend"},gr("Decoration")),(0,Bt.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Gne.map((e=>(0,Bt.createElement)(bE,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}function Jne(e){const t=Qne(e),n=eoe(e),o=toe(e),r=noe(e),a=ooe(e),i=roe(e),l=aoe(e),s=Zne(e);return t||n||o||r||a||s||i||l}function Zne(e){var t,n,o,r,a;const i=!(null!=e&&null!==(t=e.typography)&&void 0!==t&&t.customFontSize),l=null!==(n=null==e||null===(o=e.typography)||void 0===o?void 0:o.fontSizes)&&void 0!==n?n:{},s=null!==(r=null!==(a=null==l?void 0:l.custom)&&void 0!==a?a:null==l?void 0:l.theme)&&void 0!==r?r:l.default;return!(null==s||!s.length)||!i}function Qne(e){var t,n,o;const r=null==e||null===(t=e.typography)||void 0===t?void 0:t.fontFamilies,a=null!==(n=null!==(o=null==r?void 0:r.custom)&&void 0!==o?o:null==r?void 0:r.theme)&&void 0!==n?n:null==r?void 0:r.default;return!(null==a||!a.length)}function eoe(e){var t;return null==e||null===(t=e.typography)||void 0===t?void 0:t.lineHeight}function toe(e){var t,n;const o=null==e||null===(t=e.typography)||void 0===t?void 0:t.fontStyle,r=null==e||null===(n=e.typography)||void 0===n?void 0:n.fontWeight;return o||r}function noe(e){var t;return null==e||null===(t=e.typography)||void 0===t?void 0:t.letterSpacing}function ooe(e){var t;return null==e||null===(t=e.typography)||void 0===t?void 0:t.textTransform}function roe(e){var t;return null==e||null===(t=e.typography)||void 0===t?void 0:t.textDecoration}function aoe(e){var t;return null==e||null===(t=e.typography)||void 0===t?void 0:t.textColumns}function ioe(e){let{resetAllFilter:t,onChange:n,value:o,panelId:r,children:a}=e;return(0,Bt.createElement)(ZX,{label:gr("Typography"),resetAll:()=>{const e=t(o);n(e)},panelId:r},a)}const loe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textTransform:!0,textDecoration:!0,textColumns:!0};function soe(e){var t,n,o,r,a,i,l,s,c,u,p,d,b,m,M,z,f,h,g;let{as:O=ioe,value:v,onChange:A,inheritedValue:y=v,settings:_,panelId:q,defaultControls:k=loe}=e;const w=e=>QD({settings:_},"",e),E=Qne(_),W=null==_||null===(t=_.typography)||void 0===t?void 0:t.fontFamilies,L=null!==(n=null!==(o=null==W?void 0:W.custom)&&void 0!==o?o:null==W?void 0:W.theme)&&void 0!==n?n:null==W?void 0:W.default,x=w(null==y||null===(r=y.typography)||void 0===r?void 0:r.fontFamily),C=e=>{var t;const n=null==L||null===(t=L.find((t=>{let{fontFamily:n}=t;return n===e})))||void 0===t?void 0:t.slug;A(pI(v,["typography","fontFamily"],n?`var:preset|font-family|${n}`:e))},R=Zne(_),S=!(null!=_&&null!==(a=_.typography)&&void 0!==a&&a.customFontSize),N=null!==(i=null==_||null===(l=_.typography)||void 0===l?void 0:l.fontSizes)&&void 0!==i?i:{},T=null!==(s=null!==(c=null==N?void 0:N.custom)&&void 0!==c?c:null==N?void 0:N.theme)&&void 0!==s?s:N.default,B=w(null==y||null===(u=y.typography)||void 0===u?void 0:u.fontSize),D=(e,t)=>{const n=null!=t&&t.slug?`var:preset|font-size|${null==t?void 0:t.slug}`:e;A(pI(v,["typography","fontSize"],n))},I=toe(_),P=function(e){var t,n;const o=null==e||null===(t=e.typography)||void 0===t?void 0:t.fontStyle,r=null==e||null===(n=e.typography)||void 0===n?void 0:n.fontWeight;return gr(o?r?"Appearance":"Font style":"Font weight")}(_),H=null==_||null===(p=_.typography)||void 0===p?void 0:p.fontStyle,F=null==_||null===(d=_.typography)||void 0===d?void 0:d.fontWeight,Y=w(null==y||null===(b=y.typography)||void 0===b?void 0:b.fontStyle),X=w(null==y||null===(m=y.typography)||void 0===m?void 0:m.fontWeight),j=e=>{let{fontStyle:t,fontWeight:n}=e;A({...v,typography:{...null==v?void 0:v.typography,fontStyle:t,fontWeight:n}})},V=eoe(_),U=w(null==y||null===(M=y.typography)||void 0===M?void 0:M.lineHeight),$=e=>{A(pI(v,["typography","lineHeight"],e))},G=noe(_),K=w(null==y||null===(z=y.typography)||void 0===z?void 0:z.letterSpacing),J=e=>{A(pI(v,["typography","letterSpacing"],e))},Z=aoe(_),Q=w(null==y||null===(f=y.typography)||void 0===f?void 0:f.textColumns),ee=e=>{A(pI(v,["typography","textColumns"],e))},te=ooe(_),ne=w(null==y||null===(h=y.typography)||void 0===h?void 0:h.textTransform),oe=e=>{A(pI(v,["typography","textTransform"],e))},re=roe(_),ae=w(null==y||null===(g=y.typography)||void 0===g?void 0:g.textDecoration),ie=e=>{A(pI(v,["typography","textDecoration"],e))},le=(0,Bt.useCallback)((e=>({...e,typography:{}})),[]);return(0,Bt.createElement)(O,{resetAllFilter:le,value:v,onChange:A,panelId:q},E&&(0,Bt.createElement)(s6,{label:gr("Font family"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.fontFamily)},onDeselect:()=>C(void 0),isShownByDefault:k.fontFamily,panelId:q},(0,Bt.createElement)(Sne,{fontFamilies:L,value:x,onChange:C,size:"__unstable-large",__nextHasNoMarginBottom:!0})),R&&(0,Bt.createElement)(s6,{label:gr("Font size"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.fontSize)},onDeselect:()=>D(void 0),isShownByDefault:k.fontSize,panelId:q},(0,Bt.createElement)(Rne,{value:B,onChange:D,fontSizes:T,disableCustomFontSizes:S,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})),I&&(0,Bt.createElement)(s6,{className:"single-column",label:P,hasValue:()=>{var e,t;return!(null==v||null===(e=v.typography)||void 0===e||!e.fontStyle)||!(null==v||null===(t=v.typography)||void 0===t||!t.fontWeight)},onDeselect:()=>{j({})},isShownByDefault:k.fontAppearance,panelId:q},(0,Bt.createElement)(Bne,{value:{fontStyle:Y,fontWeight:X},onChange:j,hasFontStyles:H,hasFontWeights:F,size:"__unstable-large",__nextHasNoMarginBottom:!0})),V&&(0,Bt.createElement)(s6,{className:"single-column",label:gr("Line height"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.lineHeight)},onDeselect:()=>$(void 0),isShownByDefault:k.lineHeight,panelId:q},(0,Bt.createElement)(Pne,{__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto",value:U,onChange:$,size:"__unstable-large"})),G&&(0,Bt.createElement)(s6,{className:"single-column",label:gr("Letter spacing"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.letterSpacing)},onDeselect:()=>J(void 0),isShownByDefault:k.letterSpacing,panelId:q},(0,Bt.createElement)(Hne,{value:K,onChange:J,size:"__unstable-large",__unstableInputWidth:"auto"})),Z&&(0,Bt.createElement)(s6,{className:"single-column",label:gr("Text columns"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.textColumns)},onDeselect:()=>ee(void 0),isShownByDefault:k.textColumns,panelId:q},(0,Bt.createElement)(dF,{label:gr("Text columns"),max:6,min:1,onChange:ee,size:"__unstable-large",spinControls:"custom",value:Q,initialPosition:1})),re&&(0,Bt.createElement)(s6,{className:"single-column",label:gr("Text decoration"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.textDecoration)},onDeselect:()=>ie(void 0),isShownByDefault:k.textDecoration,panelId:q},(0,Bt.createElement)(Kne,{value:ae,onChange:ie,size:"__unstable-large",__unstableInputWidth:"auto"})),te&&(0,Bt.createElement)(s6,{label:gr("Letter case"),hasValue:()=>{var e;return!(null==v||null===(e=v.typography)||void 0===e||!e.textTransform)},onDeselect:()=>oe(void 0),isShownByDefault:k.textTransform,panelId:q},(0,Bt.createElement)(Vne,{value:ne,onChange:oe,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})))}const coe="typography.lineHeight";const uoe="typography.__experimentalFontFamily";function poe(e,t,n){if(!Da(t,uoe))return e;if(mI(t,hoe,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const o=new s2(e.className);o.add(`has-${(0,Ht.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}wo("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return Da(e,uoe)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),wo("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",poe),wo("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!Da(e,uoe))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),poe(o,e,n)},e}));function doe(e){if(e)return`has-${(0,Ht.kebabCase)(e)}-font-size`}const boe="typography.fontSize";function moe(e,t,n){if(!Da(t,boe))return e;if(mI(t,hoe,"fontSize"))return e;const o=new s2(e.className);o.add(doe(n.fontSize));const r=o.value;return e.className=r||void 0,e}const Moe=Jm((e=>t=>{var n,o;const r=ID("typography.fontSizes"),{name:a,attributes:{fontSize:i,style:l},wrapperProps:s}=t;if(!Da(a,boe)||mI(a,hoe,"fontSize")||!i||null!=l&&null!==(n=l.typography)&&void 0!==n&&n.fontSize)return(0,Bt.createElement)(e,t);const c=((e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>{let{slug:n}=e;return n===t}));if(n)return n}return{size:n}})(r,i,null==l||null===(o=l.typography)||void 0===o?void 0:o.fontSize).size,u={...t,wrapperProps:{...s,style:{fontSize:c,...null==s?void 0:s.style}}};return(0,Bt.createElement)(e,u)}),"withFontSizeInlineStyles"),zoe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function foe(e,t){return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.includes(n)})))}wo("blocks.registerBlockType","core/font/addAttribute",(function(e){return Da(e,boe)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),wo("blocks.getSaveContent.extraProps","core/font/addSaveProps",moe),wo("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Da(e,boe))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),moe(o,e,n)},e})),wo("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Moe),wo("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){return bI({fontSize:Da(e.name,boe)},zoe,e,t,n,o)})),wo("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!Da(e,boe)||mI(e,hoe,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,o,r;const a=t?t(e):{},i=null==a||null===(n=a.style)||void 0===n?void 0:n.fontSize,l=null===(o=Jo(wN).getSettings().__experimentalFeatures)||void 0===o||null===(r=o.typography)||void 0===r?void 0:r.fluid,s="object"==typeof l?l:{},c=i&&l?XD({fontSize:i,minimumFontSizeLimit:null==s?void 0:s.minFontSize}):null;return null===c?a:{...a,style:{...null==a?void 0:a.style,fontSize:c}}},e}),11);const hoe="typography",goe=[coe,boe,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",uoe,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function Ooe(e){var t,n;const o={...foe(e,["fontFamily"])},r=null==e||null===(t=e.typography)||void 0===t?void 0:t.fontSize,a=null==e||null===(n=e.typography)||void 0===n?void 0:n.fontFamily,i=null!=r&&r.startsWith("var:preset|font-size|")?r.substring("var:preset|font-size|".length):void 0,l=null!=a&&a.startsWith("var:preset|font-family|")?a.substring("var:preset|font-family|".length):void 0;return o.typography={...foe(o.typography,["fontFamily"]),fontSize:i?void 0:r},{style:dI(o),fontFamily:l,fontSize:i}}function voe(e){var t,n,o;return{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:null===(n=e.style)||void 0===n||null===(o=n.typography)||void 0===o?void 0:o.fontSize}}}function Aoe(e){let{children:t,resetAllFilter:n}=e;const o=(0,Bt.useCallback)((e=>{const t=voe(e),o=n(t);return{...e,...Ooe(o)}}),[n]);return(0,Bt.createElement)(rj,{group:"typography",resetAllFilter:o},t)}function yoe(e){let{clientId:t,name:n,attributes:o,setAttributes:r,__unstableParentLayout:a}=e;const i=MI(n,a),l=Jne(i),s=(0,Bt.useMemo)((()=>voe({style:o.style,fontFamily:o.fontFamily,fontSize:o.fontSize})),[o.style,o.fontSize,o.fontFamily]);if(!l)return null;const c=Ba(n,[hoe,"__experimentalDefaultControls"]);return(0,Bt.createElement)(soe,{as:Aoe,panelId:t,settings:i,value:s,onChange:e=>{r(Ooe(e))},defaultControls:c})}const _oe=lE("div",{target:"e1jovhle6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),qoe=lE(lT,{target:"e1jovhle5"})({name:"5bhc30",styles:"margin-bottom:8px"}),koe=lE(lT,{target:"e1jovhle4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),woe=lE("div",{target:"e1jovhle3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),Eoe=lE(lT,{target:"e1jovhle2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),Woe=lE(lT,{target:"e1jovhle1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var Loe={name:"1ch9yvl",styles:"border-radius:0"},xoe={name:"tg3mx0",styles:"border-radius:2px"};const Coe=e=>{let{isFirst:t,isLast:n,isOnly:o}=e;return t?QI({borderTopRightRadius:0,borderBottomRightRadius:0})():n?QI({borderTopLeftRadius:0,borderBottomLeftRadius:0})():o?xoe:Loe},Roe=e=>{let{isFirst:t,isOnly:n}=e;return QI({marginLeft:t||n?0:-1})()},Soe=lE(vF,{target:"e1jovhle0"})("max-width:60px;",Coe,";",Roe,";"),Noe=()=>{};function Toe(e){let{isFirst:t,isLast:n,isOnly:o,onHoverOn:r=Noe,onHoverOff:a=Noe,label:i,value:l,...s}=e;const c=function(e,t){return EH(LH),PH({hover:e},t||{},"hover")}((e=>{let{event:t,...n}=e;n.hovering?r(t,n):a(t,n)}));return(0,Bt.createElement)(woe,c(),(0,Bt.createElement)(Boe,{text:i},(0,Bt.createElement)(Soe,Pt({"aria-label":i,className:"component-box-control__unit-control",isFirst:t,isLast:n,isOnly:o,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:l},s))))}function Boe(e){let{children:t,text:n}=e;return n?(0,Bt.createElement)(ww,{text:n,position:"top"},(0,Bt.createElement)("div",null,t)):t}const Doe={all:gr("All"),top:gr("Top"),bottom:gr("Bottom"),left:gr("Left"),right:gr("Right"),mixed:gr("Mixed"),vertical:gr("Vertical"),horizontal:gr("Horizontal")},Ioe={top:void 0,right:void 0,bottom:void 0,left:void 0},Poe=["top","right","bottom","left"];function Hoe(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function Foe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Poe;const o=Uoe(n),r=o.map((t=>RI(e[t]))),a=r.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),i=r.map((e=>e[1])),l=a.every((e=>e===a[0]))?a[0]:"";let s;var c;"number"==typeof l?s=Hoe(i):s=null!==(c=Yoe(t))&&void 0!==c?c:Hoe(i);return[l,s].join("")}function Yoe(e){if(!e||"object"!=typeof e)return;return Hoe(Object.values(e).filter(Boolean))}function Xoe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Poe;const o=Foe(e,t,n),r=isNaN(parseFloat(o));return r}function joe(e){return void 0!==e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function Voe(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function Uoe(e){const t=[];if(null==e||!e.length)return Poe;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=Poe.filter((t=>e.includes(t)));t.push(...n)}return t}function $oe(e,t,n){const o={...e};return null!=n&&n.length?n.forEach((e=>{"vertical"===e?(o.top=t,o.bottom=t):"horizontal"===e?(o.left=t,o.right=t):o[e]=t})):Poe.forEach((e=>o[e]=t)),o}const Goe=()=>{};function Koe(e){let{onChange:t=Goe,onFocus:n=Goe,onHoverOn:o=Goe,onHoverOff:r=Goe,values:a,sides:i,selectedUnits:l,setSelectedUnits:s,...c}=e;const u=Foe(a,l,i),p=joe(a)&&Xoe(a,l,i),d=p?Doe.mixed:void 0;return(0,Bt.createElement)(Toe,Pt({},c,{disableUnits:p,isOnly:!0,value:u,onChange:e=>{const n=void 0!==e&&!isNaN(parseFloat(e)),o=$oe(a,n?e:void 0,i);t(o)},onUnitChange:e=>{const t=$oe(l,e,i);s(t)},onFocus:e=>{n(e,{side:"all"})},onHoverOn:()=>{o({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{r({top:!1,bottom:!1,left:!1,right:!1})},placeholder:d}))}const Joe=()=>{};function Zoe(e){let{onChange:t=Joe,onFocus:n=Joe,onHoverOn:o=Joe,onHoverOff:r=Joe,values:a,selectedUnits:i,setSelectedUnits:l,sides:s,...c}=e;const u=e=>t=>{n(t,{side:e})},p=e=>()=>{o({[e]:!0})},d=e=>()=>{r({[e]:!1})},b=e=>(n,o)=>{let{event:r}=o;const i={...a},l=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;if(i[e]=l,r.altKey)switch(e){case"top":i.bottom=l;break;case"bottom":i.top=l;break;case"left":i.right=l;break;case"right":i.left=l}(e=>{t(e)})(i)},m=e=>t=>{const n={...i};n[e]=t,l(n)},M=null!=s&&s.length?Poe.filter((e=>s.includes(e))):Poe,z=M[0],f=M[M.length-1],h=z===f&&z;return(0,Bt.createElement)(Eoe,{className:"component-box-control__input-controls-wrapper"},(0,Bt.createElement)(Woe,{gap:0,align:"top",className:"component-box-control__input-controls"},M.map((e=>{const[t,n]=RI(a[e]),o=a[e]?n:i[e];return(0,Bt.createElement)(Toe,Pt({},c,{isFirst:z===e,isLast:f===e,isOnly:h===e,value:[t,o].join(""),onChange:b(e),onUnitChange:m(e),onFocus:u(e),onHoverOn:p(e),onHoverOff:d(e),label:Doe[e],key:`box-control-${e}`}))}))))}const Qoe=["vertical","horizontal"];function ere(e){let{onChange:t,onFocus:n,onHoverOn:o,onHoverOff:r,values:a,selectedUnits:i,setSelectedUnits:l,sides:s,...c}=e;const u=e=>t=>{n&&n(t,{side:e})},p=e=>()=>{o&&("vertical"===e&&o({top:!0,bottom:!0}),"horizontal"===e&&o({left:!0,right:!0}))},d=e=>()=>{r&&("vertical"===e&&r({top:!1,bottom:!1}),"horizontal"===e&&r({left:!1,right:!1}))},b=e=>n=>{if(!t)return;const o={...a},r=void 0!==n&&!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},m=e=>t=>{const n={...i};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),l(n)},M=null!=s&&s.length?Qoe.filter((e=>s.includes(e))):Qoe,z=M[0],f=M[M.length-1],h=z===f&&z;return(0,Bt.createElement)(Woe,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},M.map((e=>{const[t,n]=RI("vertical"===e?a.top:a.left),o="vertical"===e?i.top:i.left;return(0,Bt.createElement)(Toe,Pt({},c,{isFirst:z===e,isLast:f===e,isOnly:h===e,value:[t,null!=o?o:n].join(""),onChange:b(e),onUnitChange:m(e),onFocus:u(e),onHoverOn:p(e),onHoverOff:d(e),label:Doe[e],key:e}))})))}const tre=lE("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),nre=lE("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),ore=lE("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(e=>{let{isFocused:t}=e;return GN({backgroundColor:"currentColor",opacity:t?1:.3},"","")}),";"),rre=lE(ore,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),are=lE(ore,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),ire=lE(are,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),lre=lE(rre,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),sre=lE(are,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),cre=lE(rre,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});function ure(e){let{size:t=24,side:n="all",sides:o,...r}=e;const a=e=>!(e=>(null==o?void 0:o.length)&&!o.includes(e))(e)&&("all"===n||n===e),i=a("top")||a("vertical"),l=a("right")||a("horizontal"),s=a("bottom")||a("vertical"),c=a("left")||a("horizontal"),u=t/24;return(0,Bt.createElement)(tre,Pt({style:{transform:`scale(${u})`}},r),(0,Bt.createElement)(nre,null,(0,Bt.createElement)(ire,{isFocused:i}),(0,Bt.createElement)(lre,{isFocused:l}),(0,Bt.createElement)(sre,{isFocused:s}),(0,Bt.createElement)(cre,{isFocused:c})))}function pre(e){let{isLinked:t,...n}=e;const o=gr(t?"Unlink sides":"Link sides");return(0,Bt.createElement)(ww,{text:o},(0,Bt.createElement)(bE,Pt({},n,{className:"component-box-control__linked-button",isSmall:!0,icon:t?c6:u6,iconSize:24,"aria-label":o})))}const dre={min:0},bre=()=>{};function mre(e){let{id:t,inputProps:n=dre,onChange:o=bre,label:r=gr("Box Control"),values:a,units:i,sides:l,splitOnAxis:s=!1,allowReset:c=!0,resetValues:u=Ioe,onMouseOver:p,onMouseOut:d}=e;const[b,m]=gF(a,{fallback:Ioe}),M=b||Ioe,z=joe(a),f=1===(null==l?void 0:l.length),[h,g]=(0,Bt.useState)(z),[O,v]=(0,Bt.useState)(!z||!Xoe(M)||f),[A,y]=(0,Bt.useState)(Voe(O,s)),[_,q]=(0,Bt.useState)({top:RI(null==a?void 0:a.top)[1],right:RI(null==a?void 0:a.right)[1],bottom:RI(null==a?void 0:a.bottom)[1],left:RI(null==a?void 0:a.left)[1]}),k=function(e){const t=Tz(mre,"inspector-box-control");return e||t}(t),w=`${k}-heading`,E={...n,onChange:e=>{o(e),m(e),g(!0)},onFocus:(e,t)=>{let{side:n}=t;y(n)},isLinked:O,units:i,selectedUnits:_,setSelectedUnits:q,sides:l,values:M,onMouseOver:p,onMouseOut:d};return(0,Bt.createElement)(_oe,{id:k,role:"group","aria-labelledby":w},(0,Bt.createElement)(qoe,{className:"component-box-control__header"},(0,Bt.createElement)(cT,null,(0,Bt.createElement)(wT.VisualLabel,{id:w},r)),c&&(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{className:"component-box-control__reset-button",variant:"secondary",isSmall:!0,onClick:()=>{o(u),m(u),q(u),g(!1)},disabled:!h},gr("Reset")))),(0,Bt.createElement)(koe,{className:"component-box-control__header-control-wrapper"},(0,Bt.createElement)(cT,null,(0,Bt.createElement)(ure,{side:A,sides:l})),O&&(0,Bt.createElement)(JB,null,(0,Bt.createElement)(Koe,Pt({"aria-label":r},E))),!O&&s&&(0,Bt.createElement)(JB,null,(0,Bt.createElement)(ere,E)),!f&&(0,Bt.createElement)(cT,null,(0,Bt.createElement)(pre,{onClick:()=>{v(!O),y(Voe(!O,s))},isLinked:O}))),!O&&!s&&(0,Bt.createElement)(Zoe,E))}const Mre=mre,zre={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1}};function fre(e){var t,n,o,r,a;let{spacingSizes:i,value:l,side:s,onChange:c,isMixed:u=!1,type:p,minimumCustomValue:d,onMouseOver:b,onMouseOut:m}=e;l=function(e,t){if(dD(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(l,i);let M=i;const z=i.length<=8,f=fp((e=>{const t=e(wN).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[h,g]=(0,Bt.useState)(!f&&void 0!==l&&!dD(l));_B(l)===l||dD(l)||!0===h||g(!0);const O=NI({availableUnits:ID("spacing.units")||["px","em","rem"]});let v=null;!z&&!h&&void 0!==l&&(!dD(l)||dD(l)&&u)?(M=[...i,{name:u?gr("Mixed"):lr(gr("Custom (%s)"),l),slug:"custom",size:l}],v=M.length-1):u||(v=h?function(e,t){if(!dD(e))return e;const n=mD(e),o=t.find((e=>String(e.slug)===n));return null==o?void 0:o.size}(l,i):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":mD(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(l,i));const A=(0,Bt.useMemo)((()=>RI(v)),[v])[1]||O[0].value,y=e=>{var t;return void 0===l||null===(t=i[e])||void 0===t?void 0:t.name},_=parseFloat(v,10),q=(e,t)=>{var n;const o=parseInt(e,10);if("selectList"===t){if(0===o)return;if(1===o)return"0"}else if(0===o)return"0";return`var:preset|spacing|${null===(n=i[e])||void 0===n?void 0:n.slug}`},k=u?gr("Mixed"):null,w=u?gr("Mixed"):y(v),E=M.map(((e,t)=>({key:t,name:e.name}))),W=i.map(((e,t)=>({value:t,label:void 0}))),L=lr(gr("%1$s %2$s"),MD[s],null==p?void 0:p.toLowerCase()),x=z&&!h&&void 0!==w;return(0,Bt.createElement)(Bt.Fragment,null,"all"!==s&&(0,Bt.createElement)(lD,{className:"components-spacing-sizes-control__side-labels"},(0,Bt.createElement)(ET.VisualLabel,{className:"components-spacing-sizes-control__side-label"},MD[s]),x&&(0,Bt.createElement)(ET.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},w)),"all"===s&&x&&(0,Bt.createElement)(ET.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},w),!f&&(0,Bt.createElement)(bE,{label:gr(h?"Use size preset":"Set custom size"),icon:hne,onClick:()=>{g(!h)},isPressed:h,isSmall:!0,className:eM()({"components-spacing-sizes-control__custom-toggle-all":"all"===s,"components-spacing-sizes-control__custom-toggle-single":"all"!==s}),iconSize:24}),h&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(vF,{onMouseOver:b,onMouseOut:m,onFocus:b,onBlur:m,onChange:e=>c((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:v,units:O,min:d,placeholder:k,disableUnits:u,label:L,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,Bt.createElement)(xY,{onMouseOver:b,onMouseOut:m,onFocus:b,onBlur:m,value:_,min:0,max:null!==(t=null===(n=zre[A])||void 0===n?void 0:n.max)&&void 0!==t?t:10,step:null!==(o=null===(r=zre[A])||void 0===r?void 0:r.steps)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{c([e,A].join(""))},className:"components-spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),z&&!h&&(0,Bt.createElement)(xY,{onMouseOver:b,onMouseOut:m,className:"components-spacing-sizes-control__range-control",value:v,onChange:e=>c(q(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===l&&c("0")},withInputField:!1,"aria-valuenow":v,"aria-valuetext":null===(a=i[v])||void 0===a?void 0:a.name,renderTooltipContent:y,min:0,max:i.length-1,marks:W,label:L,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:b,onBlur:m}),!z&&!h&&(0,Bt.createElement)(U4,{className:"components-spacing-sizes-control__custom-select-control",value:E.find((e=>e.key===v))||"",onChange:e=>{c(q(e.selectedItem.key,"selectList"))},options:E,label:L,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:b,onMouseOut:m,onFocus:b,onBlur:m}))}function hre(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:a,minimumCustomValue:i,onMouseOver:l,onMouseOut:s}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return hD(Object.values(e))}(n),u=OD(n)&&gD(n,o);return(0,Bt.createElement)(fre,{value:c,onChange:e=>{const r=$oe(n,e,o);t(r)},side:"all",spacingSizes:r,isMixed:u,type:a,minimumCustomValue:i,onMouseOver:l,onMouseOut:s})}function gre(e){let{values:t,sides:n,onChange:o,spacingSizes:r,type:a,minimumCustomValue:i,onMouseOver:l,onMouseOut:s}=e;const c=null!=n&&n.length?fD.filter((e=>n.includes(e))):fD,u=e=>n=>{const r={...t};r[e]=n,o(r)};return(0,Bt.createElement)(Bt.Fragment,null,c.map((e=>(0,Bt.createElement)(fre,{value:t[e],label:MD[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:u(e),spacingSizes:r,type:a,minimumCustomValue:i,onMouseOver:l,onMouseOut:s}))))}const Ore=["vertical","horizontal"];function vre(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:a,minimumCustomValue:i,onMouseOver:l,onMouseOut:s}=e;const c=e=>o=>{if(!t)return;const r={...n};"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},u=null!=o&&o.length?Ore.filter((e=>o.includes(e))):Ore;return(0,Bt.createElement)(Bt.Fragment,null,u.map((e=>{const t="vertical"===e?n.top:n.left;return(0,Bt.createElement)(fre,{value:t,onChange:c(e),label:MD[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:r,type:a,minimumCustomValue:i,onMouseOver:l,onMouseOut:s})})))}function Are(e){let{isLinked:t,onClick:n}=e;const o=gr(t?"Unlink sides":"Link sides");return(0,Bt.createElement)(ww,{text:o},(0,Bt.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,Bt.createElement)(bE,{isSmall:!0,icon:t?c6:u6,iconSize:24,"aria-label":o,onClick:n})))}function yre(e){let{inputProps:t,onChange:n,label:o=gr("Spacing Control"),values:r,sides:a,splitOnAxis:i=!1,useSelect:l,minimumCustomValue:s=0,onMouseOver:c,onMouseOut:u}=e;const p=[{name:0,slug:"0",size:0},...ID("spacing.spacingSizes")||[]];p.length>8&&p.unshift({name:gr("Default"),slug:"default",size:void 0});const d=r||zD,b=OD(r),m=1===(null==a?void 0:a.length),[M,z]=(0,Bt.useState)(!b||!gD(d,a)||m),f={...t,onChange:e=>{const t={...r,...e};n(t)},isLinked:M,sides:a,values:d,spacingSizes:p,useSelect:l,type:o,minimumCustomValue:s,onMouseOver:c,onMouseOut:u};return(0,Bt.createElement)("fieldset",{className:eM()("component-spacing-sizes-control",{"is-unlinked":!M})},(0,Bt.createElement)(ET.VisualLabel,{as:"legend"},o),!m&&(0,Bt.createElement)(Are,{onClick:()=>{z(!M)},isLinked:M}),M&&(0,Bt.createElement)(hre,Pt({"aria-label":o},f)),!M&&i&&(0,Bt.createElement)(vre,f),!M&&!i&&(0,Bt.createElement)(gre,f))}const _re={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function qre(e){var t,n,o,r,a;let{label:i=gr("Height"),onChange:l,value:s}=e;const c=parseFloat(s),u=NI({availableUnits:ID("spacing.units")||["%","px","em","rem","vh","vw"]}),p=(0,Bt.useMemo)((()=>RI(s)),[s])[1]||(null===(t=u[0])||void 0===t?void 0:t.value)||"px";return(0,Bt.createElement)("fieldset",{className:"block-editor-height-control"},(0,Bt.createElement)(ET.VisualLabel,{as:"legend"},i),(0,Bt.createElement)(lT,null,(0,Bt.createElement)(cT,{isBlock:!0},(0,Bt.createElement)(vF,{value:s,units:u,onChange:l,onUnitChange:e=>{const[t,n]=RI(s);["em","rem"].includes(e)&&"px"===n?l((t/16).toFixed(2)+e):["em","rem"].includes(n)&&"px"===e?l(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&l(100+e)},min:0,size:"__unstable-large"})),(0,Bt.createElement)(cT,{isBlock:!0},(0,Bt.createElement)(cF,{marginX:2,marginBottom:0},(0,Bt.createElement)(xY,{value:c,min:0,max:null!==(n=null===(o=_re[p])||void 0===o?void 0:o.max)&&void 0!==n?n:100,step:null!==(r=null===(a=_re[p])||void 0===a?void 0:a.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{l([e,p].join(""))},__nextHasNoMarginBottom:!0})))))}function kre(e,t){const{orientation:n="horizontal"}=t;return gr("fill"===e?"Stretch to fill available space.":"fixed"===e&&"horizontal"===n?"Specify a fixed width.":"fixed"===e?"Specify a fixed height.":"Fit contents.")}function wre(e){let{value:t={},onChange:n,parentLayout:o}=e;const{selfStretch:r,flexSize:a}=t;return(0,Bt.useEffect)((()=>{"fixed"!==r||a||n({...t,selfStretch:"fit"})}),[]),(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(CB,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:Ere(o),value:r||"fit",help:kre(r,o),onChange:e=>{const o="fixed"!==e?null:a;n({...t,selfStretch:e,flexSize:o})},isBlock:!0},(0,Bt.createElement)(Ene,{key:"fit",value:"fit",label:gr("Fit")}),(0,Bt.createElement)(Ene,{key:"fill",value:"fill",label:gr("Fill")}),(0,Bt.createElement)(Ene,{key:"fixed",value:"fixed",label:gr("Fixed")})),"fixed"===r&&(0,Bt.createElement)(vF,{size:"__unstable-large",onChange:e=>{n({...t,flexSize:e})},value:a}))}function Ere(e){const{orientation:t="horizontal"}=e;return gr("horizontal"===t?"Width":"Height")}const Wre=["horizontal","vertical"];function Lre(e){const t=xre(e),n=Cre(e),o=Rre(e),r=Sre(e),a=Nre(e),i=Tre(e),l=Bre(e);return"web"===mL.OS&&(t||n||o||r||a||i||l)}function xre(e){var t;return null==e||null===(t=e.layout)||void 0===t?void 0:t.contentSize}function Cre(e){var t;return null==e||null===(t=e.layout)||void 0===t?void 0:t.wideSize}function Rre(e){var t;return null==e||null===(t=e.spacing)||void 0===t?void 0:t.padding}function Sre(e){var t;return null==e||null===(t=e.spacing)||void 0===t?void 0:t.margin}function Nre(e){var t;return null==e||null===(t=e.spacing)||void 0===t?void 0:t.blockGap}function Tre(e){var t;return null==e||null===(t=e.dimensions)||void 0===t?void 0:t.minHeight}function Bre(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=null==e?void 0:e.parentLayout)&&void 0!==t?t:{},a=("flex"===o||"flex"===n)&&r;return!(null==e||!e.layout)&&a}function Dre(e,t){if(!t)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=null==e?void 0:e[t]})),n}function Ire(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Pre(e){let{resetAllFilter:t,onChange:n,value:o,panelId:r,children:a}=e;return(0,Bt.createElement)(ZX,{label:gr("Dimensions"),resetAll:()=>{const e=t(o);n(e)},panelId:r},a)}const Hre={contentSize:!1,wideSize:!1,padding:!1,margin:!1,blockGap:!1,minHeight:!1,childLayout:!0};function Fre(e){var t,n,o,r,a,i,l,s,c,u,p,d,b,m,M,z,f,h,g,O,v,A,y,_,q,k,w;let{as:E=Pre,value:W,onChange:L,inheritedValue:x=W,settings:C,panelId:R,defaultControls:S=Hre,onVisualize:N=(()=>{}),includeLayoutControls:T=!1}=e;const B=e=>QD({settings:C},"",e),D=function(e){var t,n,o;const{custom:r,theme:a,default:i}=(null==e||null===(t=e.spacing)||void 0===t?void 0:t.spacingSizes)||{};return(null!==(n=null!==(o=null!=r?r:a)&&void 0!==o?o:i)&&void 0!==n?n:[]).length>0}(C),I=NI({availableUnits:(null==C||null===(t=C.spacing)||void 0===t?void 0:t.units)||["%","px","em","rem","vw"]}),P=xre(C)&&T,H=B(null==x||null===(n=x.layout)||void 0===n?void 0:n.contentSize),F=e=>{L(pI(W,["layout","contentSize"],e))},Y=Cre(C)&&T,X=B(null==x||null===(o=x.layout)||void 0===o?void 0:o.wideSize),j=e=>{L(pI(W,["layout","wideSize"],e))},V=Rre(C),U=Ire(B(null==x||null===(r=x.spacing)||void 0===r?void 0:r.padding)),$=Array.isArray(null==C||null===(a=C.spacing)||void 0===a?void 0:a.padding)?null==C||null===(i=C.spacing)||void 0===i?void 0:i.padding:null==C||null===(l=C.spacing)||void 0===l||null===(s=l.padding)||void 0===s?void 0:s.sides,G=$&&$.some((e=>Wre.includes(e))),K=e=>{const t=Dre(e,$);L(pI(W,["spacing","padding"],t))},J=()=>N("padding"),Z=Sre(C),Q=Ire(B(null==x||null===(c=x.spacing)||void 0===c?void 0:c.margin)),ee=Array.isArray(null==C||null===(u=C.spacing)||void 0===u?void 0:u.margin)?null==C||null===(p=C.spacing)||void 0===p?void 0:p.margin:null==C||null===(d=C.spacing)||void 0===d||null===(b=d.margin)||void 0===b?void 0:b.sides,te=ee&&ee.some((e=>Wre.includes(e))),ne=e=>{const t=Dre(e,ee);L(pI(W,["spacing","margin"],t))},oe=()=>N("margin"),re=Nre(C),ae=B(null==x||null===(m=x.spacing)||void 0===m?void 0:m.blockGap),ie=function(e){return e&&"string"==typeof e?{top:e}:e?{...e,right:null==e?void 0:e.left,bottom:null==e?void 0:e.top}:e}(ae),le=Array.isArray(null==C||null===(M=C.spacing)||void 0===M?void 0:M.blockGap)?null==C||null===(z=C.spacing)||void 0===z?void 0:z.blockGap:null==C||null===(f=C.spacing)||void 0===f||null===(h=f.blockGap)||void 0===h?void 0:h.sides,se=le&&le.some((e=>Wre.includes(e))),ce=e=>{L(pI(W,["spacing","blockGap"],e))},ue=e=>{e||ce(null),!se&&null!=e&&e.hasOwnProperty("top")?ce(e.top):ce({top:null==e?void 0:e.top,left:null==e?void 0:e.left})},pe=Tre(C),de=B(null==x||null===(g=x.dimensions)||void 0===g?void 0:g.minHeight),be=e=>{L(pI(W,["dimensions","minHeight"],e))},me=Bre(C),Me=null==x?void 0:x.layout,{orientation:ze="horizontal"}=null!==(O=null==C?void 0:C.parentLayout)&&void 0!==O?O:{},fe=gr("horizontal"===ze?"Width":"Height"),he=e=>{L({...W,layout:{...null==W?void 0:W.layout,...e}})},ge=(0,Bt.useCallback)((e=>({...e,layout:dI({...null==e?void 0:e.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0}),spacing:{...null==e?void 0:e.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...null==e?void 0:e.dimensions,minHeight:void 0}})),[]),Oe=()=>N(!1);return(0,Bt.createElement)(E,{resetAllFilter:ge,value:W,onChange:L,panelId:R},(P||Y)&&(0,Bt.createElement)("span",{className:"span-columns"},gr("Set the width of the main content area.")),P&&(0,Bt.createElement)(s6,{className:"single-column",label:gr("Content size"),hasValue:()=>{var e;return!(null==W||null===(e=W.layout)||void 0===e||!e.contentSize)},onDeselect:()=>F(void 0),isShownByDefault:null!==(v=S.contentSize)&&void 0!==v?v:Hre.contentSize,panelId:R},(0,Bt.createElement)(lD,{alignment:"flex-end",justify:"flex-start"},(0,Bt.createElement)(vF,{label:gr("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:H||"",onChange:e=>{F(e)},units:I}),(0,Bt.createElement)(cE,null,(0,Bt.createElement)(AF,{icon:yF})))),Y&&(0,Bt.createElement)(s6,{className:"single-column",label:gr("Wide size"),hasValue:()=>{var e;return!(null==W||null===(e=W.layout)||void 0===e||!e.wideSize)},onDeselect:()=>j(void 0),isShownByDefault:null!==(A=S.wideSize)&&void 0!==A?A:Hre.wideSize,panelId:R},(0,Bt.createElement)(lD,{alignment:"flex-end",justify:"flex-start"},(0,Bt.createElement)(vF,{label:gr("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:X||"",onChange:e=>{j(e)},units:I}),(0,Bt.createElement)(cE,null,(0,Bt.createElement)(AF,{icon:_F})))),V&&(0,Bt.createElement)(s6,{hasValue:()=>{var e,t;return!(null==W||null===(e=W.spacing)||void 0===e||!e.padding)&&Object.keys(null==W||null===(t=W.spacing)||void 0===t?void 0:t.padding).length},label:gr("Padding"),onDeselect:()=>K(void 0),isShownByDefault:null!==(y=S.padding)&&void 0!==y?y:Hre.padding,className:eM()({"tools-panel-item-spacing":D}),panelId:R},!D&&(0,Bt.createElement)(Mre,{values:U,onChange:K,label:gr("Padding"),sides:$,units:I,allowReset:!1,splitOnAxis:G,onMouseOver:J,onMouseOut:Oe}),D&&(0,Bt.createElement)(yre,{values:U,onChange:K,label:gr("Padding"),sides:$,units:I,allowReset:!1,splitOnAxis:G,onMouseOver:J,onMouseOut:Oe})),Z&&(0,Bt.createElement)(s6,{hasValue:()=>{var e,t;return!(null==W||null===(e=W.spacing)||void 0===e||!e.margin)&&Object.keys(null==W||null===(t=W.spacing)||void 0===t?void 0:t.margin).length},label:gr("Margin"),onDeselect:()=>ne(void 0),isShownByDefault:null!==(_=S.margin)&&void 0!==_?_:Hre.margin,className:eM()({"tools-panel-item-spacing":D}),panelId:R},!D&&(0,Bt.createElement)(Mre,{values:Q,onChange:ne,label:gr("Margin"),sides:ee,units:I,allowReset:!1,splitOnAxis:te,onMouseOver:oe,onMouseOut:Oe}),D&&(0,Bt.createElement)(yre,{values:Q,onChange:ne,label:gr("Margin"),sides:ee,units:I,allowReset:!1,splitOnAxis:te,onMouseOver:oe,onMouseOut:Oe})),re&&(0,Bt.createElement)(s6,{hasValue:()=>{var e;return!(null==W||null===(e=W.spacing)||void 0===e||!e.blockGap)},label:gr("Block spacing"),onDeselect:()=>ce(void 0),isShownByDefault:null!==(q=S.blockGap)&&void 0!==q?q:Hre.blockGap,className:eM()({"tools-panel-item-spacing":D}),panelId:R},!D&&(se?(0,Bt.createElement)(Mre,{label:gr("Block spacing"),min:0,onChange:ue,units:I,sides:le,values:ie,allowReset:!1,splitOnAxis:se}):(0,Bt.createElement)(vF,{label:gr("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:ce,units:I,value:ae})),D&&(0,Bt.createElement)(yre,{label:gr("Block spacing"),min:0,onChange:ue,sides:se?le:["top"],values:ie,allowReset:!1,splitOnAxis:se})),pe&&(0,Bt.createElement)(s6,{hasValue:()=>{var e;return!(null==W||null===(e=W.dimensions)||void 0===e||!e.minHeight)},label:gr("Min. height"),onDeselect:()=>{be(void 0)},isShownByDefault:null!==(k=S.minHeight)&&void 0!==k?k:Hre.minHeight,panelId:R},(0,Bt.createElement)(qre,{label:gr("Min. height"),value:de,onChange:be})),me&&(0,Bt.createElement)($Q,{as:s6,spacing:2,hasValue:()=>!(null==W||!W.layout),label:fe,onDeselect:()=>{he({selfStretch:void 0,flexSize:void 0})},isShownByDefault:null!==(w=S.childLayout)&&void 0!==w?w:Hre.childLayout,panelId:R},(0,Bt.createElement)(wre,{value:Me,onChange:he,parentLayout:null==C?void 0:C.parentLayout})))}function Yre(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Xre(e){var t,n;let{clientId:o,attributes:r,forceShow:a}=e;const i=sK(o),[l,s]=(0,Bt.useState)(),c=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin;(0,Bt.useEffect)((()=>{if(!i)return;const e=Yre(i,"margin-top"),t=Yre(i,"margin-right"),n=Yre(i,"margin-bottom"),o=Yre(i,"margin-left");s({borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:o,top:e?`-${e}`:0,right:t?`-${t}`:0,bottom:n?`-${n}`:0,left:o?`-${o}`:0})}),[i,c]);const[u,p]=(0,Bt.useState)(!1),d=(0,Bt.useRef)(c),b=(0,Bt.useRef)();return(0,Bt.useEffect)((()=>(Os(c,d.current)||a||(p(!0),d.current=c,b.current=setTimeout((()=>{p(!1)}),400)),()=>{p(!1),b.current&&window.clearTimeout(b.current)})),[c,a]),u||a?(0,Bt.createElement)(g1,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:c,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,Bt.createElement)("div",{className:"block-editor__padding-visualizer",style:l})):null}function jre(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Vre(e){var t,n;let{clientId:o,attributes:r,forceShow:a}=e;const i=sK(o),[l,s]=(0,Bt.useState)(),c=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding;(0,Bt.useEffect)((()=>{i&&s({borderTopWidth:jre(i,"padding-top"),borderRightWidth:jre(i,"padding-right"),borderBottomWidth:jre(i,"padding-bottom"),borderLeftWidth:jre(i,"padding-left")})}),[i,c]);const[u,p]=(0,Bt.useState)(!1),d=(0,Bt.useRef)(c),b=(0,Bt.useRef)();return(0,Bt.useEffect)((()=>(Os(c,d.current)||a||(p(!0),d.current=c,b.current=setTimeout((()=>{p(!1)}),400)),()=>{p(!1),b.current&&window.clearTimeout(b.current)})),[c,a]),u||a?(0,Bt.createElement)(g1,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:c,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,Bt.createElement)("div",{className:"block-editor__padding-visualizer",style:l})):null}const Ure="dimensions",$re="spacing";function Gre(e){let{children:t,resetAllFilter:n}=e;const o=(0,Bt.useCallback)((e=>{const t=e.style,o=n(t);return{...e,style:o}}),[n]);return(0,Bt.createElement)(rj,{group:"dimensions",resetAllFilter:o},t)}function Kre(e){var t,n;const{clientId:o,name:r,attributes:a,setAttributes:i,__unstableParentLayout:l}=e,s=MI(r,l),c=Lre(s),u=a.style,[p,d]=function(){const[e,t]=(0,Bt.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=qN(Lm(wN));return(0,Bt.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!c)return null;const b={...Ba(e.name,[Ure,"__experimentalDefaultControls"]),...Ba(e.name,[$re,"__experimentalDefaultControls"])};return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Fre,{as:Gre,panelId:o,settings:s,value:u,onChange:e=>{i({style:dI(e)})},defaultControls:b,onVisualize:d}),!(null==s||null===(t=s.spacing)||void 0===t||!t.padding)&&(0,Bt.createElement)(Vre,Pt({forceShow:"padding"===p},e)),!(null==s||null===(n=s.spacing)||void 0===n||!n.margin)&&(0,Bt.createElement)(Xre,Pt({forceShow:"margin"===p},e)))}const Jre=[...goe,_ee,ane,Ure,$re],Zre=e=>Jre.some((t=>Da(e,t)));function Qre(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return tY(e).forEach((e=>{t[e.key]=e.value})),t}const eae={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[ane],[`${hoe}.__experimentalSkipSerialization`]:[hoe],"dimensions.__experimentalSkipSerialization":[Ure],"spacing.__experimentalSkipSerialization":[$re]},tae={...eae,spacing:["spacing.blockGap"]},nae={gradients:"gradient"};function oae(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;oae(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function rae(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:tae;if(!Zre(t))return e;let{style:r}=n;return Object.entries(o).forEach((e=>{let[n,o]=e;const a=Ba(t,n);!0===a&&(r=oae(r,o)),Array.isArray(a)&&a.forEach((e=>{const t=nae[e]||e;r=oae(r,[[...o,t]])}))})),e.style={...Qre(r),...e.style},e}const aae=Jm((e=>t=>{const n=RN();return(0,Bt.createElement)(Bt.Fragment,null,n&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Mne,t),(0,Bt.createElement)(yoe,t),(0,Bt.createElement)(xee,t),(0,Bt.createElement)(Kre,t)),(0,Bt.createElement)(e,t))}),"withToolbarControls"),iae=Jm((e=>t=>{var n,o;const r=`wp-elements-${Tz(e)}`,a=mI(t.name,ane,"link"),i=(0,Bt.useMemo)((()=>{var e,n,o,i,l;const s=[{styles:a||null===(e=t.attributes.style)||void 0===e||null===(n=e.elements)||void 0===n?void 0:n.link,selector:`.editor-styles-wrapper .${r} ${ca.link}`},{styles:a||null===(o=t.attributes.style)||void 0===o||null===(i=o.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l[":hover"],selector:`.editor-styles-wrapper .${r} ${ca.link}:hover`}],c=[];for(const{styles:e,selector:t}of s)if(e){const n=eY(e,{selector:t});c.push(n)}return c.length>0?c.join(""):void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements,r,a]),l=(0,Bt.useContext)(V5.__unstableElementContext);return(0,Bt.createElement)(Bt.Fragment,null,i&&l&&(0,It.createPortal)((0,Bt.createElement)("style",{dangerouslySetInnerHTML:{__html:i}}),l),(0,Bt.createElement)(e,Pt({},t,{className:null!==(o=t.attributes.style)&&void 0!==o&&o.elements?eM()(t.className,r):t.className})))}));wo("blocks.registerBlockType","core/style/addAttribute",(function(e){return Zre(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),wo("blocks.getSaveContent.extraProps","core/style/addSaveProps",rae),wo("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Zre(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),rae(o,e,n,eae)},e})),wo("editor.BlockEdit","core/style/with-block-controls",aae),wo("editor.BlockListBlock","core/editor/with-elements-styles",iae);wo("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t;return Da(e,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));const lae=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));function sae(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const n=100/e.length,o=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${o} )`}Jr([Zr]);const cae=function(e){let{values:t}=e;return t?(0,Bt.createElement)(B6,{colorValue:sae(t,"135deg")}):(0,Bt.createElement)(Ww,{icon:lae})};function uae(e){let{label:t,value:n,colors:o,disableCustomColors:r,enableAlpha:a,onChange:i}=e;const[l,s]=(0,Bt.useState)(!1);return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(bE,{className:"components-color-list-picker__swatch-button",onClick:()=>s((e=>!e))},(0,Bt.createElement)(lD,{justify:"flex-start",spacing:2},n?(0,Bt.createElement)(B6,{colorValue:n,className:"components-color-list-picker__swatch-color"}):(0,Bt.createElement)(Ww,{icon:lae}),(0,Bt.createElement)("span",null,t))),l&&(0,Bt.createElement)(F9,{className:"components-color-list-picker__color-picker",colors:o,value:n,clearable:!1,onChange:i,disableCustomColors:r,enableAlpha:a}))}const pae=function(e){let{colors:t,labels:n,value:o=[],disableCustomColors:r,enableAlpha:a,onChange:i}=e;return(0,Bt.createElement)("div",{className:"components-color-list-picker"},n.map(((e,n)=>(0,Bt.createElement)(uae,{key:n,label:e,value:o[n],colors:t,disableCustomColors:r,enableAlpha:a,onChange:e=>{const t=o.slice();t[n]=e,i(t)}}))))},dae=["#333","#CCC"];function bae(e){let{value:t,onChange:n}=e;const o=!!t,r=o?t:dae,a=sae(r),i=function(e){return e.map(((t,n)=>({position:100*n/(e.length-1),color:t})))}(r);return(0,Bt.createElement)(dte,{disableInserter:!0,background:a,hasGradient:o,value:i,onChange:e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>{let{color:t}=e;return t}))}(e);n(t)}})}const mae=function(e){let{clearable:t=!0,unsetable:n=!0,colorPalette:o,duotonePalette:r,disableCustomColors:a,disableCustomDuotone:i,value:l,onChange:s}=e;const[c,u]=(0,Bt.useMemo)((()=>{return!(e=o)||e.length<2?["#000","#fff"]:e.map((e=>{let{color:t}=e;return{color:t,brightness:Gr(t).brightness()}})).reduce(((e,t)=>{let[n,o]=e;return[t.brightness<=n.brightness?t:n,t.brightness>=o.brightness?t:o]}),[{brightness:1,color:""},{brightness:0,color:""}]).map((e=>{let{color:t}=e;return t}));var e}),[o]),p="unset"===l,d=(0,Bt.createElement)(R9.Option,{key:"unset",value:"unset",isSelected:p,tooltipText:gr("Unset"),className:"components-duotone-picker__color-indicator",onClick:()=>{s(p?void 0:"unset")}}),b=r.map((e=>{let{colors:t,slug:n,name:o}=e;const r={background:sae(t,"135deg"),color:"transparent"},a=null!=o?o:lr(gr("Duotone code: %s"),n),i=o?lr(gr("Duotone: %s"),o):a,c=Ys()(t,l);return(0,Bt.createElement)(R9.Option,{key:n,value:t,isSelected:c,"aria-label":i,tooltipText:a,style:r,onClick:()=>{s(c?void 0:t)}})}));return(0,Bt.createElement)(R9,{options:n?[d,...b]:b,actions:!!t&&(0,Bt.createElement)(R9.ButtonAction,{onClick:()=>s(void 0)},gr("Clear"))},(0,Bt.createElement)(cF,{paddingTop:4},(0,Bt.createElement)($Q,{spacing:3},!a&&!i&&(0,Bt.createElement)(bae,{value:p?void 0:l,onChange:s}),!i&&(0,Bt.createElement)(pae,{labels:[gr("Shadows"),gr("Highlights")],colors:o,value:p?void 0:l,disableCustomColors:a,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=c),e[1]||(e[1]=u);const t=e.length>=2?e:void 0;s(t)}}))))},Mae=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));const zae=function(e){let t,{colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:a,value:i,onChange:l}=e;return t="unset"===i?(0,Bt.createElement)(B6,{className:"block-editor-duotone-control__unset-indicator"}):i?(0,Bt.createElement)(cae,{values:i}):(0,Bt.createElement)(AF,{icon:Mae}),(0,Bt.createElement)(BW,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:gr("Duotone"),variant:"toolbar"},renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,Bt.createElement)(RW,{showTooltip:!0,onClick:o,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==zq||(e.preventDefault(),o())},label:gr("Apply duotone filter"),icon:t})},renderContent:()=>(0,Bt.createElement)(PN,{label:gr("Duotone")},(0,Bt.createElement)("div",{className:"block-editor-duotone-control__description"},gr("Create a two-tone color effect without losing your original image.")),(0,Bt.createElement)(mae,{colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:a,value:i,onChange:l}))})};function fae(e){let{selector:t,id:n}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,Bt.createElement)("style",null,o)}function hae(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,Bt.createElement)("style",null,n)}function gae(e){let{id:t,colors:n}=e;const o=function(){const e={r:[],g:[],b:[],a:[]};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{const n=Gr(t).toRgb();e.r.push(n.r/255),e.g.push(n.g/255),e.b.push(n.b/255),e.a.push(n.a)})),e}(n);return(0,Bt.createElement)(rk,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,Bt.createElement)("defs",null,(0,Bt.createElement)("filter",{id:t},(0,Bt.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,Bt.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,Bt.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,Bt.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,Bt.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,Bt.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,Bt.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function Oae(e){let{preset:t}=e;return(0,Bt.createElement)(gae,{id:`wp-duotone-${t.slug}`,colors:t.colors})}function vae(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"root",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:a,supports:i}=e,l=!(0,Ht.isEmpty)(a),s=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&a.root?null==a?void 0:a.root:null!=i&&i.__experimentalSelector?i.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===s)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l){return(0,Ht.get)(a,`${s}.root`,null)||(0,Ht.get)(a,s,null)||e}const t=(0,Ht.get)(i,`${s}.__experimentalSelector`,null);return t?eI(c,t):e}let p;return l&&(p=(0,Ht.get)(a,s,null)),p||(o?vae(e,u[0],n):null)}const Aae=[];function yae(e){let{selector:t,id:n,colors:o}=e;return"unset"===o?(0,Bt.createElement)(hae,{selector:t}):(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(gae,{id:n,colors:o}),(0,Bt.createElement)(fae,{id:n,selector:t}))}function _ae(e){let{presetSetting:t,defaultSetting:n}=e;const o=!ID(n),r=ID(`${t}.custom`)||Aae,a=ID(`${t}.theme`)||Aae,i=ID(`${t}.default`)||Aae;return(0,Bt.useMemo)((()=>[...r,...a,...o?Aae:i]),[o,r,a,i])}function qae(e,t){if(!e)return;const n=null==t?void 0:t.find((t=>{let{slug:n}=t;return e===`var:preset|duotone|${n}`}));return n?n.colors:void 0}function kae(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,a=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=_ae({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=_ae({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),s=!ID("color.custom"),c=!ID("color.customDuotone")||0===(null==l?void 0:l.length)&&s;if(0===(null==i?void 0:i.length)&&c)return null;const u=Array.isArray(a)?a:qae(a,i);return(0,Bt.createElement)(DN,{group:"block",__experimentalShareWithChildBlocks:!0},(0,Bt.createElement)(zae,{duotonePalette:i,colorPalette:l,disableCustomDuotone:c,disableCustomColors:s,value:u,onChange:e=>{const t=function(e,t){if(!e||!Array.isArray(e))return;const n=null==t?void 0:t.find((t=>{var n;return null==t||null===(n=t.colors)||void 0===n?void 0:n.every(((t,n)=>t===e[n]))}));return n?`var:preset|duotone|${n.slug}`:void 0}(e,i),n={...r,color:{...null==r?void 0:r.color,duotone:null!=t?t:e}};o({style:n})}}))}Jr([Zr]);const wae=Jm((e=>t=>{const n=Da(t.name,"filter.duotone"),o=fp((e=>e(wN).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,Bt.createElement)(Bt.Fragment,null,n&&!o&&(0,Bt.createElement)(kae,t),(0,Bt.createElement)(e,t))}),"withDuotoneControls");function Eae(e){let{id:t,selector:n,attribute:o}=e;const r=(0,Bt.useContext)(V5.__unstableElementContext),a=_ae({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),l=i?void 0:qae(o,a),s="string"==typeof o&&l;let c=null;s?c=l:("string"==typeof o&&!s||i)&&(c=o);const u=n.split(",").map((e=>`.editor-styles-wrapper .${t}${e.trim()}`)).join(", "),p=Array.isArray(c)||"unset"===c;return r&&p&&(0,It.createPortal)((0,Bt.createElement)(yae,{selector:u,id:t,colors:c}),r)}const Wae=Jm((e=>t=>{var n,o,r;const a=Tz(e),i=(0,Bt.useMemo)((()=>{const e=Na(t.name);if(e){if(!Ba(e,"filter.duotone",!1))return null;const t=Ba(e,"color.__experimentalDuotone",!1);if(t){const n=vae(e);return"string"==typeof t?eI(n,t):n}return vae(e,"filter.duotone",{fallback:!0})}}),[t.name]),l=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(r=o.color)||void 0===r?void 0:r.duotone,s=`wp-duotone-${a}`,c=i&&l,u=c?eM()(null==t?void 0:t.className,s):null==t?void 0:t.className;return(0,Bt.createElement)(Bt.Fragment,null,c&&(0,Bt.createElement)(Eae,{id:s,selector:i,attribute:l}),(0,Bt.createElement)(e,Pt({},t,{className:u})))}),"withDuotoneStyles");wo("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return Da(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),wo("editor.BlockEdit","core/editor/duotone/with-editor-controls",wae),wo("editor.BlockListBlock","core/editor/duotone/with-styles",Wae);const Lae=(0,Bt.forwardRef)((function(e,t){const{className:n,...o}=e,r=Sz()("components-button-group",n);return(0,Bt.createElement)("div",Pt({ref:t,role:"group",className:r},o))})),xae="__experimentalLayout";function Cae(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=fp((e=>{var t;const{getSettings:n}=e(wN);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),a=ID("layout")||{},{layout:i}=n,{default:l}=Ba(o,xae)||{},s=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||l||{},c=[];if(null!=a&&null!==(e=a.definitions)&&void 0!==e&&null!==(t=e[(null==s?void 0:s.type)||"default"])&&void 0!==t&&t.className){var u,p;const e=null==a||null===(u=a.definitions)||void 0===u||null===(p=u[(null==s?void 0:s.type)||"default"])||void 0===p?void 0:p.className,t=`wp-block-${o.split("/").pop()}-${e}`;c.push(e,t)}return(null!=s&&s.inherit||null!=s&&s.contentSize||"constrained"===(null==s?void 0:s.type))&&r&&c.push("has-global-padding"),null!=s&&s.orientation&&c.push(`is-${(0,Ht.kebabCase)(s.orientation)}`),null!=s&&s.justifyContent&&c.push(`is-content-justification-${(0,Ht.kebabCase)(s.justifyContent)}`),null!=s&&s.flexWrap&&"nowrap"===s.flexWrap&&c.push("is-nowrap"),c}function Rae(e){let{clientId:t,setAttributes:n,attributes:o,name:r}=e;const{layout:a}=o,i=ID("layout"),{themeSupportsLayout:l,isContentLocked:s}=fp((e=>{const{getSettings:n,__unstableGetContentLockingParent:o}=e(wN);return{themeSupportsLayout:n().supportsLayout,isContentLocked:o(t)}}),[t]),c=Ba(r,xae,{}),{allowSwitching:u,allowEditing:p=!0,allowInheriting:d=!0,default:b}=c;if(!p)return null;const m=!(!d||!i||null!=a&&a.type&&"default"!==(null==a?void 0:a.type)&&"constrained"!==(null==a?void 0:a.type)&&(null==a||!a.inherit)),M=a||b||{},{inherit:z=!1,type:f="default",contentSize:h=null}=M;if(("default"===f||"constrained"===f)&&!l)return null;const g=TY(f),O=TY("constrained"),v=!M.type&&(h||z),A=!!z||!!h,y=e=>n({layout:e});return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,{title:gr("Layout")},m&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__toggle-control",label:gr("Inner blocks use content width"),checked:"constrained"===(null==g?void 0:g.name)||A,onChange:()=>n({layout:{type:"constrained"===(null==g?void 0:g.name)||A?"default":"constrained"}}),help:"constrained"===(null==g?void 0:g.name)||A?gr("Nested blocks use content width with options for full and wide widths."):gr("Nested blocks will fill the width of this container. Toggle to constrain.")})),!z&&u&&(0,Bt.createElement)(Sae,{type:f,onChange:e=>n({layout:{type:e}})}),g&&"default"!==g.name&&(0,Bt.createElement)(g.inspectorControls,{layout:M,onChange:y,layoutBlockSupport:c}),O&&v&&(0,Bt.createElement)(O.inspectorControls,{layout:M,onChange:y,layoutBlockSupport:c}))),!z&&!s&&g&&(0,Bt.createElement)(g.toolBarControls,{layout:M,onChange:y,layoutBlockSupport:c}))}function Sae(e){let{type:t,onChange:n}=e;return(0,Bt.createElement)(Lae,null,NY.map((e=>{let{name:o,label:r}=e;return(0,Bt.createElement)(bE,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const Nae=Jm((e=>t=>{const{name:n}=t;return[Da(n,xae)&&(0,Bt.createElement)(Rae,Pt({key:"layout"},t)),(0,Bt.createElement)(e,Pt({key:"edit"},t))]}),"withInspectorControls"),Tae=Jm((e=>t=>{const{name:n,attributes:o}=t,r=Da(n,xae),a=fp((e=>{const{getSettings:t}=e(wN);return!!t().disableLayoutStyles})),i=r&&!a,l=Tz(e),s=ID("layout")||{},c=(0,Bt.useContext)(V5.__unstableElementContext),{layout:u}=o,{default:p}=Ba(n,xae)||{},d=null!=u&&u.inherit||null!=u&&u.contentSize||null!=u&&u.wideSize?{...u,type:"constrained"}:u||p||{},b=r?Cae(o,n):null,m=`.wp-container-${l}.wp-container-${l}`,M=null!==ID("spacing.blockGap");let z;if(i){var f;const e=TY((null==d?void 0:d.type)||"default");z=null==e||null===(f=e.getLayoutStyle)||void 0===f?void 0:f.call(e,{blockName:n,selector:m,layout:d,layoutDefinitions:null==s?void 0:s.definitions,style:null==o?void 0:o.style,hasBlockGapSupport:M})}const h=eM()({[`wp-container-${l}`]:i&&!!z},b);return(0,Bt.createElement)(Bt.Fragment,null,i&&c&&!!z&&(0,It.createPortal)((0,Bt.createElement)(HY,{blockName:n,selector:m,css:z,layout:d,style:null==o?void 0:o.style}),c),(0,Bt.createElement)(e,Pt({},t,{__unstableLayoutClassNames:h})))})),Bae=Jm((e=>t=>{const{attributes:n}=t,{style:{layout:o={}}={}}=n,{selfStretch:r,flexSize:a}=o,i=r||a,l=fp((e=>{const{getSettings:t}=e(wN);return!!t().disableLayoutStyles})),s=i&&!l,c=(0,Bt.useContext)(V5.__unstableElementContext),u=Tz(e),p=`.wp-container-content-${u}`;let d="";"fixed"===r&&a?d+=`${p} {\n\t\t\t\tflex-basis: ${a};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===r&&(d+=`${p} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`);const b=eM()(null==t?void 0:t.className,{[`wp-container-content-${u}`]:s&&!!d});return(0,Bt.createElement)(Bt.Fragment,null,s&&c&&!!d&&(0,It.createPortal)((0,Bt.createElement)("style",null,d),c),(0,Bt.createElement)(e,Pt({},t,{className:b})))}));function Dae(e){let{clientId:t,stopEditingAsBlock:n}=e;const o=fp((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=e(wN);return n(t)||o(t,!0)}),[t]);return(0,Bt.useEffect)((()=>{o||n()}),[o]),null}wo("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||Da(e,xae)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),wo("editor.BlockListBlock","core/editor/layout/with-layout-styles",Tae),wo("editor.BlockListBlock","core/editor/layout/with-child-layout-styles",Bae),wo("editor.BlockEdit","core/editor/layout/with-inspector-controls",Nae);const Iae=Jm((e=>t=>{const{getBlockListSettings:n,getSettings:o}=fp(wN),r=(0,Bt.useRef)(),{templateLock:a,isLockedByParent:i,isEditingAsBlocks:l}=fp((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=e(wN);return{templateLock:o(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:r()===t.clientId}}),[t.clientId]),{updateSettings:s,updateBlockListSettings:c,__unstableSetTemporarilyEditingAsBlocks:u}=Lm(wN),p=!i&&"contentOnly"===a,{__unstableMarkNextChangeAsNotPersistent:d,updateBlockAttributes:b}=Lm(wN),m=(0,Bt.useCallback)((()=>{d(),b(t.clientId,{templateLock:"contentOnly"}),c(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),s({focusMode:r.current}),u()}),[t.clientId,r,s,c,n,d,b,u]);if(!p&&!l)return(0,Bt.createElement)(e,t);const M=l&&!p,z=!l&&p&&t.isSelected;return(0,Bt.createElement)(Bt.Fragment,null,M&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Dae,{clientId:t.clientId,stopEditingAsBlock:m}),(0,Bt.createElement)(DN,{group:"other"},(0,Bt.createElement)(RW,{onClick:()=>{m()}},gr("Done")))),z&&(0,Bt.createElement)(f3,null,(e=>{let{onClose:a}=e;return(0,Bt.createElement)(HN,{onClick:()=>{d(),b(t.clientId,{templateLock:void 0}),c(t.clientId,{...n(t.clientId),templateLock:!1}),r.current=o().focusMode,s({focusMode:!0}),u(t.clientId),a()}},gr("Modify"))})),(0,Bt.createElement)(e,Pt({},t,{className:eM()(t.className,l&&"is-content-locked-editing-as-blocks")})))}),"withToolbarControls");wo("editor.BlockEdit","core/content-lock-ui/with-block-controls",Iae);const Pae="metadata";function Hae(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.name.startsWith("core/"))return!1;const n=Ba(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function Fae(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:See(e)||void 0,style:Qre({border:n})}}function Yae(e){const{colors:t}=i6(),n=Fae(e),{borderColor:o}=e;if(o){const e=kee({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function Xae(e){var t,n,o,r,a,i;const{backgroundColor:l,textColor:s,gradient:c,style:u}=e,p=a6("background-color",l),d=a6("color",s),b=Tee(c),m=b||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:eM()(d,b,{[p]:!m&&!!p,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":l||(null==u||null===(o=u.color)||void 0===o?void 0:o.background)||c||(null==u||null===(r=u.color)||void 0===r?void 0:r.gradient),"has-link-color":null==u||null===(a=u.elements)||void 0===a||null===(i=a.link)||void 0===i?void 0:i.color})||void 0,style:Qre({color:(null==u?void 0:u.color)||{}})}}wo("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||Hae(e,"name")&&(e.attributes={...e.attributes,[Pae]:{type:"object"}}),e})),wo("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return Hae(t)&&(e.metadata=n.metadata),e})),wo("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||Hae(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:o}=e;if("list-view"===n&&null!=o&&o.name)return o.name}),e}));const jae={};function Vae(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=ID("color.palette.custom"),a=ID("color.palette.theme"),i=ID("color.palette.default"),l=ID("color.gradients")||jae,s=(0,Bt.useMemo)((()=>[...r||[],...a||[],...i||[]]),[r,a,i]),c=(0,Bt.useMemo)((()=>[...(null==l?void 0:l.custom)||[],...(null==l?void 0:l.theme)||[],...(null==l?void 0:l.default)||[]]),[l]),u=Xae(e);if(t){const e=o6(s,t);u.style.backgroundColor=e.color}if(o&&(u.style.background=Bee(c,o)),n){const e=o6(s,n);u.style.color=e.color}return u}function Uae(e){const{style:t}=e;return{style:Qre({spacing:(null==t?void 0:t.spacing)||{}})}}const $ae=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},Gae=()=>Jm((e=>t=>{const n=ID("color.palette.custom"),o=ID("color.palette.theme"),r=ID("color.palette.default"),a=(0,Bt.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,Bt.createElement)(e,Pt({},t,{colors:a}))}),"withEditorColorPalette");function Kae(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:(0,Ht.kebabCase)(t)}:t})),{});return Mn([t,e=>class extends Bt.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Gr(t),o=e=>{let{color:t}=e;return n.contrast(t)},r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=$ae(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=r6(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return Object.entries(n).reduce(((e,n)=>{let[a,i]=n;const l=o6(r,o[a],o[`custom${$ae(a)}`]),s=t[a];return(null==s?void 0:s.color)===l.color&&s?e[a]=s:e[a]={...l,class:a6(i,l.slug)},e}),{})}render(){return(0,Bt.createElement)(e,Pt({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Jae(){const e=Gae();for(var t=arguments.length,n=new Array(t),o=0;on(t===e?void 0:e)}const c=o.find((e=>e.align===t)),u=l?$W:IN,p=l?{isCollapsed:i}:{toggleProps:{describedBy:a},popoverProps:nie};return(0,Bt.createElement)(u,Pt({icon:c?c.icon:Ar()?eie:Zae,label:r,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:i?"menuitemradio":void 0,onClick:s(n)}}))},p))},rie=e=>(0,Bt.createElement)(oie,Pt({},e,{isToolbar:!1})),aie=e=>(0,Bt.createElement)(oie,Pt({},e,{isToolbar:!0})),iie=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));const lie=function(e){let{isActive:t,label:n=gr("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,Bt.createElement)(RW,{isActive:t,icon:iie,label:n,onClick:()=>o(!t),disabled:r})},sie=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],cie={"top left":gr("Top Left"),"top center":gr("Top Center"),"top right":gr("Top Right"),"center left":gr("Center Left"),"center center":gr("Center"),center:gr("Center"),"center right":gr("Center Right"),"bottom left":gr("Bottom Left"),"bottom center":gr("Bottom Center"),"bottom right":gr("Bottom Right")},uie=sie.flat();function pie(e){return("center"===e?"center center":e).replace("-"," ")}function die(e,t){return`${e}-${pie(t).replace(" ","-")}`}var bie={name:"93uojk",styles:"border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const mie=()=>bie,Mie=lE("div",{target:"ecapk1j3"})(mie,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(e=>{let{size:t=92}=e;return GN("grid-template-rows:repeat( 3, calc( ",t,"px / 3 ) );width:",t,"px;","")}),";"),zie=lE("div",{target:"ecapk1j2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),fie=e=>GN("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",ST("transition")," ",(e=>{let{isActive:t}=e;return GN("box-shadow:",t?`0 0 0 2px ${gT.gray[900]}`:null,";color:",t?gT.gray[900]:gT.gray[400],";*:hover>&{color:",t?gT.gray[900]:gT.ui.theme,";}","")})(e),";",""),hie=lE("span",{target:"ecapk1j1"})("height:6px;width:6px;",fie,";"),gie=lE("span",{target:"ecapk1j0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function Oie(e){let{isActive:t=!1,value:n,...o}=e;const r=cie[n];return(0,Bt.createElement)(ww,{text:r},(0,Bt.createElement)(kW,Pt({as:gie,role:"gridcell"},o),(0,Bt.createElement)(uE,null,n),(0,Bt.createElement)(hie,{isActive:t,role:"presentation"})))}lE("div",{target:"erowt52"})({name:"ogl07i",styles:"box-sizing:border-box;padding:2px"});const vie=lE("div",{target:"erowt51"})("transform-origin:top left;height:100%;width:100%;",mie,";",(()=>GN({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(e=>{let{disablePointerEvents:t}=e;return GN({pointerEvents:t?"none":void 0},"","")}),";"),Aie=lE("span",{target:"erowt50"})("height:2px;width:2px;",fie,";",(e=>{let{isActive:t}=e;return GN("box-shadow:",t?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")}),";"),yie=gie,_ie=24;const qie=function(e){let{className:t,disablePointerEvents:n=!0,size:o=_ie,style:r={},value:a="center",...i}=e;const l=function(){const e=pie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"center"),t=uie.indexOf(e);return t>-1?t:void 0}(a),s=(o/_ie).toFixed(2),c=Sz()("component-alignment-matrix-control-icon",t),u={...r,transform:`scale(${s})`};return(0,Bt.createElement)(vie,Pt({},i,{className:c,disablePointerEvents:n,role:"presentation",style:u}),uie.map(((e,t)=>{const n=l===t;return(0,Bt.createElement)(yie,{key:e},(0,Bt.createElement)(Aie,{isActive:n}))})))},kie=()=>{};function wie(e){let{className:t,id:n,label:o=gr("Alignment Matrix Control"),defaultValue:r="center center",value:a,onChange:i=kie,width:l=92,...s}=e;const[c]=(0,Bt.useState)(null!=a?a:r),u=function(e){const t=Tz(wie,"alignment-matrix-control");return e||t}(n),p=die(u,c),d=sB({baseId:u,currentId:p,rtl:Ar()}),{setCurrentId:b}=d;(0,Bt.useEffect)((()=>{void 0!==a&&b(die(u,a))}),[a,b,u]);const m=Sz()("component-alignment-matrix-control",t);return(0,Bt.createElement)(fB,Pt({},s,d,{"aria-label":o,as:Mie,className:m,role:"grid",size:l}),sie.map(((e,t)=>(0,Bt.createElement)(NZ,Pt({},d,{as:zie,role:"row",key:t}),e.map((e=>{const t=die(u,e),n=d.currentId===t;return(0,Bt.createElement)(Oie,Pt({},d,{id:t,isActive:n,key:e,value:e,onFocus:()=>{i(e)},tabIndex:n?0:-1}))}))))))}wie.Icon=qie;const Eie=wie,Wie=()=>{};const Lie=function(e){const{label:t=gr("Change matrix alignment"),onChange:n=Wie,value:o="center",isDisabled:r}=e,a=(0,Bt.createElement)(Eie.Icon,{value:o});return(0,Bt.createElement)(BW,{popoverProps:{variant:"toolbar",placement:"bottom-start"},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,Bt.createElement)(RW,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==zq||(e.preventDefault(),n())},label:t,icon:a,showTooltip:!0,disabled:r})},renderContent:()=>(0,Bt.createElement)(Eie,{hasFocusBorder:!1,onChange:n,value:o})})},xie=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));const Cie=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=Lm(wN),{clientId:r,parents:a,hasSelection:i}=fp((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(wN),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),l=t||gr("Document");return(0,Bt.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":gr("Block breadcrumb")},(0,Bt.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,Bt.createElement)(bE,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},l),!i&&l,!!r&&(0,Bt.createElement)(AF,{icon:xie,className:"block-editor-block-breadcrumb__separator"})),a.map((e=>(0,Bt.createElement)("li",{key:e},(0,Bt.createElement)(bE,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,Bt.createElement)(L1,{clientId:e,maximumLength:35})),(0,Bt.createElement)(AF,{icon:xie,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,Bt.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,Bt.createElement)(L1,{clientId:r,maximumLength:35})))},Rie=(0,Bt.createElement)(rk,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none"},(0,Bt.createElement)(nk,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"}));const Sie=function(e){const{icon:t,children:n,label:o,instructions:r,className:a,notices:i,preview:l,isColumnLayout:s,withIllustration:c,...u}=e,[p,{width:d}]=yB();let b;"number"==typeof d&&(b={"is-large":d>=480,"is-medium":d>=160&&d<480,"is-small":d<160});const m=Sz()("components-placeholder",a,b,c?"has-illustration":null),M=Sz()("components-placeholder__fieldset",{"is-column-layout":s});return(0,Bt.createElement)("div",Pt({},u,{className:m}),c?Rie:null,p,i,l&&(0,Bt.createElement)("div",{className:"components-placeholder__preview"},l),(0,Bt.createElement)("div",{className:"components-placeholder__label"},(0,Bt.createElement)(Ww,{icon:t}),o),(0,Bt.createElement)("fieldset",{className:M},!!r&&(0,Bt.createElement)("legend",{className:"components-placeholder__instructions"},r),n))},Nie=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));const Tie=function(e){let{icon:t=Nie,label:n=gr("Choose variation"),instructions:o=gr("Select a variation to start with."),variations:r,onSelect:a,allowSkip:i}=e;const l=eM()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,Bt.createElement)(Sie,{icon:t,label:n,instructions:o,className:l},(0,Bt.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":gr("Block variations")},r.map((e=>(0,Bt.createElement)("li",{key:e.name},(0,Bt.createElement)(bE,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>a(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,Bt.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),i&&(0,Bt.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,Bt.createElement)(bE,{variant:"link",onClick:()=>a()},gr("Skip"))))},Bie=Jm((e=>t=>{const n=ID("color.palette"),o=!ID("color.custom"),r=void 0===t.colors?n:t.colors,a=void 0===t.disableCustomColors?o:t.disableCustomColors,i=!(0,Ht.isEmpty)(r)||!a;return(0,Bt.createElement)(e,Pt({},t,{colors:r,disableCustomColors:a,hasColorsToChoose:i}))}),"withColorContext"),Die=Bie(F9);var Iie=n(381),Pie=n.n(Iie);n(5177),n(5341);const Hie="WP",Fie=/^[+-][0-1][0-9](:?[0-9][0-9])?$/;let Yie={l10n:{locale:"en",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],meridiem:{am:"am",pm:"pm",AM:"AM",PM:"PM"},relative:{future:"%s from now",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},startOfWeek:0},formats:{time:"g: i a",date:"F j, Y",datetime:"F j, Y g: i a",datetimeAbbreviated:"M j, Y g: i a"},timezone:{offset:"0",string:"",abbr:""}};function Xie(){return Yie}function jie(){Pie().tz.add(Pie().tz.pack({name:Hie,abbrs:[Hie],untils:[null],offsets:[60*-Yie.timezone.offset||0]}))}const Vie={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S(e){const t=e.format("D");return e.format("Do").replace(t,"")},w:"d",z:e=>(parseInt(e.format("DDD"),10)-1).toString(),W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:e=>e.daysInMonth(),L:e=>e.isLeapYear()?"1":"0",o:"GGGG",Y:"YYYY",y:"YY",a:"a",A:"A",B(e){const t=Pie()(e).utcOffset(60),n=parseInt(t.format("s"),10),o=parseInt(t.format("m"),10),r=parseInt(t.format("H"),10);return parseInt(((n+60*o+3600*r)/86.4).toString(),10)},g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSSSSS",v:"SSS",e:"zz",I:e=>e.isDST()?"1":"0",O:"ZZ",P:"Z",T:"z",Z(e){const t=e.format("Z"),n="-"===t[0]?-1:1,o=t.substring(1).split(":").map((e=>parseInt(e,10)));return n*(60*o[0]+o[1])*60},c:"YYYY-MM-DDTHH:mm:ssZ",r:e=>e.locale("en").format("ddd, DD MMM YYYY HH:mm:ss ZZ"),U:"X"};function Uie(e){let t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;const r=[],a=Pie()(o);for(t=0;t1&&void 0!==arguments[1]?arguments[1]:new Date,n=arguments.length>2?arguments[2]:void 0;if(!0===n)return Gie(e,t);!1===n&&(n=void 0);const o=Zie(t,n);return o.locale(Yie.l10n.locale),Uie(e,o)}function Gie(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;const n=Pie()(t).utc();return n.locale(Yie.l10n.locale),Uie(e,n)}function Kie(e){const t=Pie().tz(Hie);return Pie().tz(e,Hie).isAfter(t)}function Jie(e){return e?Pie().tz(e,Hie).toDate():Pie().tz(Hie).toDate()}function Zie(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=Pie()(e);return t&&!Qie(t)?n.tz(t):t&&Qie(t)?n.utcOffset(t):Yie.timezone.string?n.tz(Yie.timezone.string):n.utcOffset(+Yie.timezone.offset)}function Qie(e){return"number"==typeof e||Fie.test(e)}jie();const ele=new Date(2022,0,25);function tle(e){let{format:t,defaultFormat:n,onChange:o}=e;return(0,Bt.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,Bt.createElement)(uE,{as:"legend"},gr("Date format")),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Default format"),help:`${gr("Example:")} ${$ie(n,ele)}`,checked:!t,onChange:e=>o(e?null:n)}),t&&(0,Bt.createElement)(nle,{format:t,onChange:o}))}function nle(e){var t;let{format:n,onChange:o}=e;const r=[...new Set(["Y-m-d",Or("n/j/Y","short date format"),Or("n/j/Y g:i A","short date format with time"),Or("M j, Y","medium date format"),Or("M j, Y g:i A","medium date format with time"),Or("F j, Y","long date format"),Or("M j","short date format without the year")])],a=r.map(((e,t)=>({key:`suggested-${t}`,name:$ie(e,ele),format:e}))),i={key:"custom",name:gr("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:gr("Enter your own date format")},[l,s]=(0,Bt.useState)((()=>!!n&&!r.includes(n)));return(0,Bt.createElement)($Q,null,(0,Bt.createElement)(U4,{__nextUnconstrainedWidth:!0,label:gr("Choose a format"),options:[...a,i],value:l?i:null!==(t=a.find((e=>e.format===n)))&&void 0!==t?t:i,onChange:e=>{let{selectedItem:t}=e;t===i?s(!0):(s(!1),o(t.format))}}),l&&(0,Bt.createElement)(lX,{__nextHasNoMarginBottom:!0,label:gr("Custom format"),hideLabelFromVision:!0,help:xK(gr("Enter a date or time format string."),{Link:(0,Bt.createElement)(uX,{href:gr("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:n,onChange:e=>o(e)}))}const ole=e=>{let{setting:t,children:n,panelId:o,...r}=e;return(0,Bt.createElement)(s6,Pt({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},r,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:t.resetAllFilter}),n)},rle=e=>{let{colorValue:t,label:n}=e;return(0,Bt.createElement)(lD,{justify:"flex-start"},(0,Bt.createElement)(B6,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,Bt.createElement)(cT,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},ale=e=>t=>{let{onToggle:n,isOpen:o}=t;const{colorValue:r,label:a}=e,i={onClick:n,className:eM()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":o}),"aria-expanded":o};return(0,Bt.createElement)(bE,i,(0,Bt.createElement)(rle,{colorValue:r,label:a}))};function ile(e){let t,{colors:n,disableCustomColors:o,disableCustomGradients:r,enableAlpha:a,gradients:i,settings:l,__experimentalIsRenderedInSidebar:s,...c}=e;return s&&(t={placement:"left-start",offset:36,shift:!0}),(0,Bt.createElement)(Bt.Fragment,null,l.map(((e,l)=>{var u;const p={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:o,disableCustomGradients:r,enableAlpha:a,gradientValue:e.gradientValue,gradients:i,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...e},d={colorValue:null!==(u=e.gradientValue)&&void 0!==u?u:e.colorValue,label:e.label};return e&&(0,Bt.createElement)(ole,Pt({key:l,setting:e},c),(0,Bt.createElement)(BW,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:ale(d),renderContent:()=>(0,Bt.createElement)(T9,{paddingSize:"none"},(0,Bt.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,Bt.createElement)(Dte,p)))}))})))}const lle=(0,Bt.createContext)({}),sle=()=>(0,Bt.useContext)(lle);function cle(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,onFinishEditing:a,onSaveImage:i,children:l}=e;const s=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,a]=(0,Bt.useState)(),[i,l]=(0,Bt.useState)(),[s,c]=(0,Bt.useState)({x:0,y:0}),[u,p]=(0,Bt.useState)(100),[d,b]=(0,Bt.useState)(0),m=n/o,[M,z]=(0,Bt.useState)(m),f=(0,Bt.useCallback)((()=>{const e=(d+90)%360;let n=m;if(d%180==90&&(n=1/m),0===e)return a(),b(e),z(m),void c({x:-s.y*n,y:s.x*n});const o=new window.Image;o.src=t,o.onload=function(t){const o=document.createElement("canvas");let r=0,i=0;e%180?(o.width=t.target.height,o.height=t.target.width):(o.width=t.target.width,o.height=t.target.height),90!==e&&180!==e||(r=o.width),270!==e&&180!==e||(i=o.height);const l=o.getContext("2d");l.translate(r,i),l.rotate(e*Math.PI/180),l.drawImage(t.target,0,0),o.toBlob((t=>{a(URL.createObjectURL(t)),b(e),z(o.width/o.height),c({x:-s.y*n,y:s.x*n})}))};const r=No("media.crossOrigin",void 0,t);"string"==typeof r&&(o.crossOrigin=r)}),[d,m]);return(0,Bt.useMemo)((()=>({editedUrl:r,setEditedUrl:a,crop:i,setCrop:l,position:s,setPosition:c,zoom:u,setZoom:p,rotation:d,setRotation:b,rotateClockwise:f,aspect:M,setAspect:z,defaultAspect:m})),[r,i,s,u,d,f,M,m])}({url:n,naturalWidth:o,naturalHeight:r}),c=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:a,url:i,id:l,onSaveImage:s,onFinishEditing:c}=e;const{createErrorNotice:u}=Lm(gQ),[p,d]=(0,Bt.useState)(!1),b=(0,Bt.useCallback)((()=>{d(!1),c()}),[d,c]),m=(0,Bt.useCallback)((()=>{d(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,td({path:`/wp/v2/media/${l}/edit`,method:"POST",data:e}).then((e=>{s({id:e.id,url:e.source_url,height:o&&r?r/a:void 0})})).catch((e=>{u(lr(gr("Could not edit image. %s"),aa(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{d(!1),c()}))}),[d,t,n,o,r,a,i,s,u,d,c]);return(0,Bt.useMemo)((()=>({isInProgress:p,apply:m,cancel:b})),[p,m,b])}({id:t,url:n,onSaveImage:i,onFinishEditing:a,...s}),u=(0,Bt.useMemo)((()=>({...s,...c})),[s,c]);return(0,Bt.createElement)(lle.Provider,{value:u},l)}var ule=function(e,t){return ule=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])},ule(e,t)};var ple=function(){return ple=Object.assign||function(e){for(var t,n=1,o=arguments.length;nu*r?{width:u*r,height:u}:{width:c,height:c/r}}function Mle(e,t,n,o,r){void 0===r&&(r=0);var a=qle(t.width,t.height,r),i=a.width,l=a.height;return{x:zle(e.x,i,n.width,o),y:zle(e.y,l,n.height,o)}}function zle(e,t,n,o){var r=t*o/2-n/2;return kle(e,-r,r)}function fle(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function hle(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function gle(e,t,n,o,r,a,i){void 0===a&&(a=0),void 0===i&&(i=!0);var l=i?Ole:vle,s=qle(t.width,t.height,a),c=qle(t.naturalWidth,t.naturalHeight,a),u={x:l(100,((s.width-n.width/r)/2-e.x/r)/s.width*100),y:l(100,((s.height-n.height/r)/2-e.y/r)/s.height*100),width:l(100,n.width/s.width*100/r),height:l(100,n.height/s.height*100/r)},p=Math.round(l(c.width,u.width*c.width/100)),d=Math.round(l(c.height,u.height*c.height/100)),b=c.width>=c.height*o?{width:Math.round(d*o),height:d}:{width:p,height:Math.round(p/o)};return{croppedAreaPercentages:u,croppedAreaPixels:ple(ple({},b),{x:Math.round(l(c.width-b.width,u.x*c.width/100)),y:Math.round(l(c.height-b.height,u.y*c.height/100))})}}function Ole(e,t){return Math.min(e,Math.max(0,t))}function vle(e,t){return t}function Ale(e,t,n,o,r,a){var i=qle(t.width,t.height,n),l=kle(o.width/i.width*(100/e.width),r,a);return{crop:{x:l*i.width/2-o.width/2-i.width*l*(e.x/100),y:l*i.height/2-o.height/2-i.height*l*(e.y/100)},zoom:l}}function yle(e,t,n,o,r,a){void 0===n&&(n=0);var i=qle(t.naturalWidth,t.naturalHeight,n),l=kle(function(e,t,n){var o=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*o):n.width/(e.width*o)}(e,t,o),r,a),s=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((i.width-e.width)/2-e.x)*s,y:((i.height-e.height)/2-e.y)*s},zoom:l}}function _le(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function qle(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function kle(e,t,n){return Math.min(Math.max(e,t),n)}function wle(){for(var e=[],t=0;t0})).join(" ").trim()}var Ele=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=Dt().createRef(),n.videoRef=Dt().createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=document,n.currentWindow=window,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=Ale(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),o=t.crop,r=t.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}else if(n.props.initialCroppedAreaPixels){var a=yle(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=a.crop,r=a.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,a,i,l=n.imageRef.current||n.videoRef.current;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var s=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef.current)||void 0===r?void 0:r.videoHeight)||0,p=c/u,d=void 0;if(l.offsetWidthp?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":d={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":d={width:n.containerRect.height*p,height:n.containerRect.height};break;case"auto-cover":d=c>u?{width:n.containerRect.width,height:n.containerRect.width/p}:{width:n.containerRect.height*p,height:n.containerRect.height}}else d={width:l.offsetWidth,height:l.offsetHeight};n.mediaSize=ple(ple({},d),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:mle(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===b.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===b.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.onMouseDown=function(e){e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0])))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,o,r=e.x,a=e.y;n.dragStartPosition={x:r,y:a},n.dragStartCrop=ple({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?Mle(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(!n.props.onWheelRequest||n.props.onWheelRequest(e)){e.preventDefault();var o=t.getMousePoint(e),r=ble()(e).pixelY,a=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(a,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,a=r.crop,i=r.zoom;return{x:(t+a.x)/i,y:(o+a.y)/i}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,a=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var i=n.getPointOnContainer(t),l=n.getPointOnMedia(i),s=kle(e,n.props.minZoom,n.props.maxZoom),c={x:l.x*s-i.x,y:l.y*s-i.y};if(a){var u=n.props.restrictPosition?Mle(c,n.mediaSize,n.state.cropSize,s,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(s)}},n.getCropData=function(){return n.state.cropSize?gle(n.props.restrictPosition?Mle(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Mle(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}ule(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef)},t.prototype.componentWillUnmount=function(){var e;this.currentWindow.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,o,r,a,i,l,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(a=e.crop)||void 0===a?void 0:a.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=fle(n,o),this.lastPinchRotation=hle(n,o),this.onDragStart(_le(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),a=_le(o,r);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=fle(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,a,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var i=hle(o,r),l=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,a=t.transform,i=t.crop,l=i.x,s=i.y,c=t.rotation,u=t.zoom,p=t.cropShape,d=t.showGrid,b=t.style,m=b.containerStyle,M=b.cropAreaStyle,z=b.mediaStyle,f=t.classes,h=f.containerClassName,g=f.cropAreaClassName,O=f.mediaClassName,v=t.objectFit;return Dt().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:wle("reactEasyCrop_Container",h)},n?Dt().createElement("img",ple({alt:"",className:wle("reactEasyCrop_Image","contain"===v&&"reactEasyCrop_Contain","horizontal-cover"===v&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===v&&"reactEasyCrop_Cover_Vertical","auto-cover"===v&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),O)},r,{src:n,ref:this.imageRef,style:ple(ple({},z),{transform:a||"translate("+l+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):o&&Dt().createElement("video",ple({autoPlay:!0,loop:!0,muted:!0,className:wle("reactEasyCrop_Video","contain"===v&&"reactEasyCrop_Contain","horizontal-cover"===v&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===v&&"reactEasyCrop_Cover_Vertical","auto-cover"===v&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),O)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:ple(ple({},z),{transform:a||"translate("+l+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Dt().createElement("source",ple({key:e.src},e))}))),this.state.cropSize&&Dt().createElement("div",{style:ple(ple({},M),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:wle("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",g)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Dt().Component);const Wle=Ele,Lle={placement:"bottom-start",variant:"toolbar"};function xle(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:a,naturalWidth:i,borderProps:l}=e;const{isInProgress:s,editedUrl:c,position:u,zoom:p,aspect:d,setPosition:b,setCrop:m,setZoom:M,rotation:z}=sle();let f=o||r*a/i;return z%180==90&&(f=r*i/a),(0,Bt.createElement)("div",{className:eM()("wp-block-image__crop-area",null==l?void 0:l.className,{"is-applying":s}),style:{...null==l?void 0:l.style,width:n||r,height:f}},(0,Bt.createElement)(Wle,{image:c||t,disabled:s,minZoom:1,maxZoom:3,crop:u,zoom:p/100,aspect:d,onCropChange:e=>{b(e)},onCropComplete:e=>{m(e)},onZoomChange:e=>{M(100*e)}}),s&&(0,Bt.createElement)(L0,null))}function Cle(){const{isInProgress:e,zoom:t,setZoom:n}=sle();return(0,Bt.createElement)(BW,{contentClassName:"wp-block-image__zoom",popoverProps:Lle,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,Bt.createElement)(RW,{icon:hK,label:gr("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,Bt.createElement)(xY,{__nextHasNoMarginBottom:!0,label:gr("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}const Rle=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function Sle(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:a}=e;return(0,Bt.createElement)(PN,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,Bt.createElement)(HN,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===a,icon:o===a?xX:void 0},t)})))}function Nle(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:a}=sle();return(0,Bt.createElement)(VW,{icon:Rle,label:gr("Aspect Ratio"),popoverProps:Lle,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Sle,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:gr("Original"),aspect:a},{title:gr("Square"),aspect:1}]}),(0,Bt.createElement)(Sle,{label:gr("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:gr("16:10"),aspect:1.6},{title:gr("16:9"),aspect:16/9},{title:gr("4:3"),aspect:4/3},{title:gr("3:2"),aspect:1.5}]}),(0,Bt.createElement)(Sle,{label:gr("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:gr("10:16"),aspect:.625},{title:gr("9:16"),aspect:9/16},{title:gr("3:4"),aspect:3/4},{title:gr("2:3"),aspect:2/3}]}))}))}const Tle=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function Ble(){const{isInProgress:e,rotateClockwise:t}=sle();return(0,Bt.createElement)(RW,{icon:Tle,label:gr("Rotate"),onClick:t,disabled:e})}function Dle(){const{isInProgress:e,apply:t,cancel:n}=sle();return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(RW,{onClick:t,disabled:e},gr("Apply")),(0,Bt.createElement)(RW,{onClick:n},gr("Cancel")))}function Ile(e){let{id:t,url:n,width:o,height:r,clientWidth:a,naturalHeight:i,naturalWidth:l,onSaveImage:s,onFinishEditing:c,borderProps:u}=e;return(0,Bt.createElement)(cle,{id:t,url:n,naturalWidth:l,naturalHeight:i,onSaveImage:s,onFinishEditing:c},(0,Bt.createElement)(xle,{borderProps:u,url:n,width:o,height:r,clientWidth:a,naturalHeight:i,naturalWidth:l}),(0,Bt.createElement)(DN,null,(0,Bt.createElement)($W,null,(0,Bt.createElement)(Cle,null),(0,Bt.createElement)(LW,null,(e=>(0,Bt.createElement)(Nle,{toggleProps:e}))),(0,Bt.createElement)(Ble,null)),(0,Bt.createElement)($W,null,(0,Bt.createElement)(Dle,null))))}const Ple=[25,50,75,100],Hle=()=>{};function Fle(e){let{imageSizeHelp:t,imageWidth:n,imageHeight:o,imageSizeOptions:r=[],isResizable:a=!0,slug:i,width:l,height:s,onChange:c,onChangeImage:u=Hle}=e;const{currentHeight:p,currentWidth:d,updateDimension:b,updateDimensions:m}=function(e,t,n,o,r){var a,i;const[l,s]=(0,Bt.useState)(null!==(a=null!=t?t:o)&&void 0!==a?a:""),[c,u]=(0,Bt.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,Bt.useEffect)((()=>{void 0===t&&void 0!==o&&s(o),void 0===e&&void 0!==n&&u(n)}),[o,n]),(0,Bt.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(l)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(c)&&u(e)}),[t,e]),{currentHeight:c,currentWidth:l,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?s(n):u(n),r({[e]:n})},updateDimensions:(e,t)=>{u(null!=e?e:n),s(null!=t?t:o),r({height:e,width:t})}}}(s,l,o,n,c);return(0,Bt.createElement)(Bt.Fragment,null,r&&r.length>0&&(0,Bt.createElement)(P6,{__nextHasNoMarginBottom:!0,label:gr("Resolution"),value:i,options:r,onChange:u,help:t,size:"__unstable-large"}),a&&(0,Bt.createElement)("div",{className:"block-editor-image-size-control"},(0,Bt.createElement)(lD,{align:"baseline",spacing:"3"},(0,Bt.createElement)(dF,{className:"block-editor-image-size-control__width",label:gr("Width"),value:d,min:1,onChange:e=>b("width",e),size:"__unstable-large"}),(0,Bt.createElement)(dF,{className:"block-editor-image-size-control__height",label:gr("Height"),value:p,min:1,onChange:e=>b("height",e),size:"__unstable-large"})),(0,Bt.createElement)(lD,null,(0,Bt.createElement)(Lae,{"aria-label":gr("Image size presets")},Ple.map((e=>{const t=Math.round(n*(e/100)),r=Math.round(o*(e/100)),a=d===t&&p===r;return(0,Bt.createElement)(bE,{key:e,isSmall:!0,variant:a?"primary":void 0,isPressed:a,onClick:()=>m(r,t)},e,"%")}))),(0,Bt.createElement)(bE,{isSmall:!0,onClick:()=>m()},gr("Reset")))))}function Yle(){const e=(0,Bt.useRef)(!1);return Qf((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class Xle extends Bt.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function jle({children:e,isPresent:t}){const n=(0,Bt.useId)(),o=(0,Bt.useRef)(null),r=(0,Bt.useRef)({width:0,height:0,top:0,left:0});return(0,Bt.useInsertionEffect)((()=>{const{width:e,height:a,top:i,left:l}=r.current;if(t||!o.current||!e||!a)return;o.current.dataset.motionPopId=n;const s=document.createElement("style");return document.head.appendChild(s),s.sheet&&s.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${i}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(s)}}),[t]),Bt.createElement(Xle,{isPresent:t,childRef:o,sizeRef:r},Bt.cloneElement(e,{ref:o}))}const Vle=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:i})=>{const l=dh(Ule),s=(0,Bt.useId)(),c=(0,Bt.useMemo)((()=>({id:s,initial:t,isPresent:n,custom:r,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},register:e=>(l.set(e,!1),()=>l.delete(e))})),a?void 0:[n]);return(0,Bt.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),Bt.useEffect((()=>{!n&&!l.size&&o&&o()}),[n]),"popLayout"===i&&(e=Bt.createElement(jle,{isPresent:n},e)),Bt.createElement(Zf.Provider,{value:c},e)};function Ule(){return new Map}const $le=e=>e.key||"";const Gle=({children:e,custom:t,initial:n=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:i="sync"})=>{r&&(i="wait",eO(!1,"Replace exitBeforeEnter with mode='wait'"));let[l]=function(){const e=Yle(),[t,n]=(0,Bt.useState)(0),o=(0,Bt.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,Bt.useCallback)((()=>_O.postRender(o)),[o]),t]}();const s=(0,Bt.useContext)(Mh).forceRender;s&&(l=s);const c=Yle(),u=function(e){const t=[];return Bt.Children.forEach(e,(e=>{(0,Bt.isValidElement)(e)&&t.push(e)})),t}(e);let p=u;const d=new Set,b=(0,Bt.useRef)(p),m=(0,Bt.useRef)(new Map).current,M=(0,Bt.useRef)(!0);if(Qf((()=>{M.current=!1,function(e,t){e.forEach((e=>{const n=$le(e);t.set(n,e)}))}(u,m),b.current=p})),Kg((()=>{M.current=!0,m.clear(),d.clear()})),M.current)return Bt.createElement(Bt.Fragment,null,p.map((e=>Bt.createElement(Vle,{key:$le(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:a,mode:i},e))));p=[...p];const z=b.current.map($le),f=u.map($le),h=z.length;for(let e=0;e{if(-1!==f.indexOf(e))return;const n=m.get(e);if(!n)return;const r=z.indexOf(e);p.splice(r,0,Bt.createElement(Vle,{key:$le(n),isPresent:!1,onExitComplete:()=>{m.delete(e),d.delete(e);const t=b.current.findIndex((t=>t.key===e));if(b.current.splice(t,1),!d.size){if(b.current=u,!1===c.current)return;l(),o&&o()}},custom:t,presenceAffectsLayout:a,mode:i},n))})),p=p.map((e=>{const t=e.key;return d.has(t)?e:Bt.createElement(Vle,{key:$le(e),isPresent:!0,presenceAffectsLayout:a,mode:i},e)})),Bt.createElement(Bt.Fragment,null,d.size?p:p.map((e=>(0,Bt.cloneElement)(e))))},Kle=()=>{},Jle=e=>{let{value:t,onChange:n=Kle,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},a=o.map((e=>(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,Bt.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,Bt.createElement)(uE,{as:"legend"},gr("Currently selected link settings")),a)};const Zle=function e(t){let{settingsOpen:n,setSettingsOpen:o,showTextControl:r,showSettings:a,textInputRef:i,internalTextInputValue:l,setInternalTextInputValue:s,handleSubmitWithEnter:c,value:u,settings:p,onChange:d}=t;const b=pX(),m=b?Bt.Fragment:Gle,M=b?"div":Q_.div,z=`link-control-settings-drawer-${Tz(e)}`;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(bE,{className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:hne,label:gr("Link Settings"),"aria-controls":z}),(0,Bt.createElement)(m,null,n&&(0,Bt.createElement)(M,{className:"block-editor-link-control__drawer",hidden:!n,id:z,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1}},(0,Bt.createElement)("div",{className:"block-editor-link-control__drawer-inner"},r&&(0,Bt.createElement)(lX,{__nextHasNoMarginBottom:!0,ref:i,className:"block-editor-link-control__setting block-editor-link-control__text-content",label:"Text",value:l,onChange:s,onKeyDown:c}),a&&(0,Bt.createElement)(Jle,{value:u,settings:p,onChange:d})))))};var Qle=n(4979),ese=n.n(Qle);const tse=Jm((e=>t=>(0,Bt.createElement)(e,Pt({},t,{speak:vx,debouncedSpeak:Iz(vx,500)}))),"withSpokenMessages"),nse=Jm((e=>class extends Bt.Component{constructor(e){super(e),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(e,t){const n=setTimeout((()=>{e(),this.clearTimeout(n)}),t);return this.timeouts.push(n),n}clearTimeout(e){clearTimeout(e),this.timeouts=this.timeouts.filter((t=>t!==e))}render(){return(0,Bt.createElement)(e,Pt({},this.props,{setTimeout:this.setTimeout,clearTimeout:this.clearTimeout}))}}),"withSafeTimeout"),ose=nse,rse=Jm((e=>t=>{const n=Tz(e);return(0,Bt.createElement)(e,Pt({},t,{instanceId:n}))}),"instanceId");function ase(e){try{return new URL(e),!0}catch{return!1}}function ise(e){return"function"==typeof e}class lse extends Bt.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,Bt.createRef)(),this.inputRef=(0,Bt.createRef)(),this.updateSuggestions=Dz(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,isUpdatingSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ese()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.state.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);var a,i;if(t=t.trim(),!r&&(t.length<2||!o&&ase(t)))return null===(a=this.suggestionsRequest)||void 0===a||null===(i=a.cancel)||void 0===i||i.call(a),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:t,selectedSuggestion:null,loading:!1});this.setState({isUpdatingSuggestions:!0,selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,isUpdatingSuggestions:!1,suggestionsValue:t,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak(lr(vr("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak(gr("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===l&&this.setState({isUpdatingSuggestions:!1,loading:!1})})),this.suggestionsRequest=l}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.state.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case mq:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case zq:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case cq:e.preventDefault(),this.props.onSubmit&&this.props.onSubmit(null,e)}return}const a=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case mq:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case zq:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case 9:null!==this.state.selectedSuggestion&&(this.selectLink(a),this.props.speak(gr("Link selected.")));break;case cq:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(a),this.props.onSubmit&&this.props.onSubmit(a,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:a=!1}=e,{showSuggestions:i}=t,l=i;const s=n&&n.length;return a||s||(l=!1),!0===r&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,Bt.createElement)(Bt.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:o,instanceId:r,placeholder:a=gr("Paste URL or type to search"),__experimentalRenderControl:i,value:l=""}=this.props,{loading:s,showSuggestions:c,selectedSuggestion:u,suggestionsListboxId:p,suggestionOptionIdPrefix:d}=this.state,b=`url-input-control-${r}`,m={id:b,label:t,className:eM()("block-editor-url-input",n,{"is-full-width":o})},M={id:b,value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:a,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:gr("URL"),"aria-expanded":c,"aria-autocomplete":"list","aria-owns":p,"aria-activedescendant":null!==u?`${d}-${u}`:void 0,ref:this.inputRef};return i?i(m,M,s):(e||jo("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,Bt.createElement)(ET,Pt({__nextHasNoMarginBottom:e},m),(0,Bt.createElement)("input",M),s&&(0,Bt.createElement)(L0,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:a,suggestionsListboxId:i,suggestionOptionIdPrefix:l,loading:s}=this.state;if(!n||0===o.length)return null;const c={id:i,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a||void 0});return ise(t)?t({suggestions:o,selectedSuggestion:a,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:s,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!(null!=r&&r.length),currentInputValue:r}):(0,Bt.createElement)(gw,{placement:"bottom",focusOnMount:!1},(0,Bt.createElement)("div",Pt({},c,{className:eM()("block-editor-url-input__suggestions",`${e}__suggestions`)}),o.map(((e,t)=>(0,Bt.createElement)(bE,Pt({},u(0,t),{key:e.id,className:eM()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title)))))}}const sse=Mn(ose,tse,rse,dj(((e,t)=>{if(ise(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(wN);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(lse),cse=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:a,buttonText:i}=e;return n?(t=i?"function"==typeof i?i(n):i:xK(lr(gr("Create: %s"),n),{mark:(0,Bt.createElement)("mark",null)}),(0,Bt.createElement)(bE,Pt({},r,{className:eM()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":a}),onClick:o}),(0,Bt.createElement)(AF,{className:"block-editor-link-control__search-item-icon",icon:eP}),(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};function use(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),a=r[r.length-1];if(a.length<=t)return"…"+n.slice(-t);const i=a.lastIndexOf("."),[l,s]=[a.slice(0,i),a.slice(i+1)],c=l.slice(-3)+"."+s;return a.slice(0,t-c.length-1)+"…"+c}function pse(e){try{return decodeURI(e)}catch(t){return e}}const dse=new RegExp(`[${["-","~","­","֊","־","᐀","᠆","‐","‑","‒","–","—","―","⁓","⁻","₋","−","⸗","⸺","⸻","〜","〰","゠","︱","︲","﹘","﹣","-"].join("")}]`,"g"),bse=e=>Ci()(e).toLocaleLowerCase().replace(dse,"-");function mse(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}const Mse=e=>{const{text:t="",highlight:n=""}=e,o=n.trim();if(!o)return(0,Bt.createElement)(Bt.Fragment,null,t);const r=new RegExp(`(${mse(o)})`,"gi");return xK(t.replace(r,"$&"),{mark:(0,Bt.createElement)("mark",null)})},zse=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"})),fse=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),hse=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"})),gse=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Ose=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"})),vse=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),Ase={post:zse,page:fse,post_tag:hse,category:gse,attachment:Ose};function yse(e){let{isURL:t,suggestion:n}=e,o=null;return t?o=vse:n.type in Ase&&(o=Ase[n.type]),o?(0,Bt.createElement)(AF,{className:"block-editor-link-control__search-item-icon",icon:o}):null}const _se=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:a=!1,searchTerm:i="",shouldShowType:l=!1}=e;return(0,Bt.createElement)(bE,Pt({},t,{onClick:r,className:eM()("block-editor-link-control__search-item",{"is-selected":o,"is-url":a,"is-entity":!a})}),(0,Bt.createElement)(yse,{suggestion:n,isURL:a}),(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,Bt.createElement)(Mse,{text:aa(n.title),highlight:i})),(0,Bt.createElement)("span",{"aria-hidden":!a,className:"block-editor-link-control__search-item-info"},!a&&(use(pse(n.url))||""),a&&gr("Press ENTER to add this link"))),l&&n.type&&(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))},qse="__CREATE__",kse="mailto",wse="internal",Ese=["URL",kse,"tel",wse],Wse=[{id:"opensInNewTab",title:gr("Open in new tab")}];function Lse(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:a,buildSuggestionItemProps:i,suggestions:l,selectedSuggestion:s,isLoading:c,isInitialSuggestions:u,createSuggestionButtonText:p,suggestionsQuery:d}=e;const b=eM()("block-editor-link-control__search-results",{"is-loading":c}),m=1===l.length&&Ese.includes(l[0].type),M=n&&!m&&!u,z=!(null!=d&&d.type),f=`block-editor-link-control-search-results-label-${t}`,h=u?gr("Recently updated"):lr(gr('Search results for "%s"'),o),g=(0,Bt.createElement)(u?Bt.Fragment:uE,{},(0,Bt.createElement)("span",{className:"block-editor-link-control__search-results-label",id:f},h));return(0,Bt.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},g,(0,Bt.createElement)("div",Pt({},a,{className:b,"aria-labelledby":f}),l.map(((e,t)=>M&&qse===e.type?(0,Bt.createElement)(cse,{searchTerm:o,buttonText:p,onClick:()=>r(e),key:e.type,itemProps:i(e,t),isSelected:t===s}):qse===e.type?null:(0,Bt.createElement)(_se,{key:`${e.id}-${e.type}`,itemProps:i(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===s,isURL:Ese.includes(e.type),searchTerm:o,shouldShowType:z,isFrontPage:null==e?void 0:e.isFrontPage})))))}function xse(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}const Cse=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function Rse(e){return Cse.test(e)}const Sse=/^(?:[a-z]+:|#|\?|\.|\/)/i;function Nse(e){return e?(e=e.trim(),Sse.test(e)||Rse(e)?e:"http://"+e):e}function Tse(e){const t=null==e?void 0:e.startsWith("#");return ase(e)||e&&e.includes("www.")||t}const Bse=()=>Promise.resolve([]),Dse=e=>{let t="URL";const n=xse(e)||"";return n.includes("mailto")&&(t=kse),n.includes("tel")&&(t="tel"),null!=e&&e.startsWith("#")&&(t=wse),Promise.resolve([{id:e,title:e,url:"URL"===t?Nse(e):e,type:t}])};function Ise(e,t,n,o){const{fetchSearchSuggestions:r,pageOnFront:a}=fp((e=>{const{getSettings:t}=e(wN);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?Dse:Bse;return(0,Bt.useCallback)(((t,l)=>{let{isInitialSuggestions:s}=l;return Tse(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,a,i)=>{const{isInitialSuggestions:l}=t;let s=!1,c=await Promise.all([n(e,t),o(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&a&&!l?c[0].concat(c[1]):c[0],l||Tse(e)||!r?c:c.concat({title:e,url:e,type:qse})})(t,{...e,isInitialSuggestions:s},r,i,n,o,a)}),[i,r,n])}const Pse=()=>Promise.resolve([]),Hse=()=>{},Fse=(0,Bt.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:a=null,placeholder:i=null,withCreateSuggestion:l=!1,onCreateSuggestion:s=Hse,onChange:c=Hse,onSelect:u=Hse,showSuggestions:p=!0,renderSuggestions:d=(e=>(0,Bt.createElement)(Lse,e)),fetchSuggestions:b=null,allowDirectEntry:m=!0,showInitialSuggestions:M=!1,suggestionsQuery:z={},withURLSuggestion:f=!0,createSuggestionButtonText:h,useLabel:g=!1}=e;const O=Ise(z,m,l,f),v=p?b||O:Pse,A=Tz(Fse),[y,_]=(0,Bt.useState)(),q=async e=>{let t=e;if(qse!==e.type){if(m||t&&Object.keys(t).length>=1){const{id:e,url:n,...o}=null!=r?r:{};u({...o,...t},t)}}else try{var n;t=await s(e.title),null!==(n=t)&&void 0!==n&&n.url&&u(t)}catch(e){}},k=eM()(a,{"has-no-label":!g});return(0,Bt.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,Bt.createElement)(sse,{__nextHasNoMarginBottom:!0,label:g?"URL":void 0,className:k,value:n,onChange:(e,t)=>{c(e),_(t)},placeholder:null!=i?i:gr("Search or type url"),__experimentalRenderSuggestions:p?e=>d({...e,instanceId:A,withCreateSuggestion:l,createSuggestionButtonText:h,suggestionsQuery:z,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),q(t)}}):null,__experimentalFetchLinkSuggestions:v,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:M,onSubmit:(e,t)=>{var o;const r=e||y;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?q(r||{url:n}):t.preventDefault()},ref:t}),o)})),Yse=Fse,Xse=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),jse=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),{Slot:Vse,Fill:Use}=aw("BlockEditorLinkControlViewer");function $se(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}const Gse=function(e){const[t,n]=(0,Bt.useReducer)($se,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=fp((e=>{const{getSettings:t}=e(wN);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,Bt.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Kse(e){var t;let{value:n,onEditClick:o,hasRichPreviews:r=!1,hasUnlinkControl:a=!1,onRemove:i}=e;const l=r?null==n?void 0:n.url:null,{richData:s,isFetching:c}=Gse(l),u=s&&Object.keys(s).length,p=n&&use(pse(n.url),16)||"",d=(null==s?void 0:s.title)||(null==n?void 0:n.title)||p,b=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let m;return m=null!=s&&s.icon?(0,Bt.createElement)("img",{src:null==s?void 0:s.icon,alt:""}):b?(0,Bt.createElement)(AF,{icon:Xse,size:32}):(0,Bt.createElement)(AF,{icon:vse}),(0,Bt.createElement)("div",{"aria-label":gr("Currently selected"),className:eM()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":b})},(0,Bt.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,Bt.createElement)("span",{className:eM()("block-editor-link-control__search-item-icon",{"is-image":null==s?void 0:s.icon})},m),(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-details"},b?(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},gr("Link is empty")):(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(uX,{className:"block-editor-link-control__search-item-title",href:n.url},aa(d)),(null==n?void 0:n.url)&&(0,Bt.createElement)("span",{className:"block-editor-link-control__search-item-info"},p)))),(0,Bt.createElement)(bE,{icon:jse,label:gr("Edit"),className:"block-editor-link-control__search-item-action",onClick:o,iconSize:24}),a&&(0,Bt.createElement)(bE,{icon:u6,label:gr("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,Bt.createElement)(Vse,{fillProps:n})),!!(u&&(null!=s&&s.image||null!=s&&s.description)||c)&&(0,Bt.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==s?void 0:s.image)||c)&&(0,Bt.createElement)("div",{"aria-hidden":!(null!=s&&s.image),className:eM()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=s&&s.image)})},(null==s?void 0:s.image)&&(0,Bt.createElement)("img",{src:null==s?void 0:s.image,alt:""})),((null==s?void 0:s.description)||c)&&(0,Bt.createElement)("div",{"aria-hidden":!(null!=s&&s.description),className:eM()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=s&&s.description)})},(null==s?void 0:s.description)&&(0,Bt.createElement)(kP,{truncate:!0,numberOfLines:"2"},s.description))))}const Jse=e=>{let t=!1;const n=new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))}));return{promise:n,cancel(){t=!0}}};function Zse(e){const[t,n]=(0,Bt.useState)(e||"");return(0,Bt.useEffect)((()=>{e&&e!==t&&n(e)}),[e]),[t,n]}const Qse=()=>{};function ece(e){var t,n,o;let{searchInputPlaceholder:r,value:a,settings:i=Wse,onChange:l=Qse,onRemove:s,onCancel:c,noDirectEntry:u=!1,showSuggestions:p=!0,showInitialSuggestions:d,forceIsEditingLink:b,createSuggestion:m,withCreateSuggestion:M,inputValue:z="",suggestionsQuery:f={},noURLSuggestion:h=!1,createSuggestionButtonText:g,hasRichPreviews:O=!1,hasTextControl:v=!1,renderControlBottom:A=null}=e;void 0===M&&m&&(M=!0);const y=(0,Bt.useRef)(!0),_=(0,Bt.useRef)(),q=(0,Bt.useRef)(),k=(0,Bt.useRef)(!1),[w,E]=(0,Bt.useState)(!1),[W,L]=Zse((null==a?void 0:a.url)||""),[x,C]=Zse((null==a?void 0:a.title)||""),[R,S]=(0,Bt.useState)(void 0!==b?b:!a||!a.url),{createPage:N,isCreatingPage:T,errorMessage:B}=function(e){const t=(0,Bt.useRef)(),[n,o]=(0,Bt.useState)(!1),[r,a]=(0,Bt.useState)(null);return(0,Bt.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),a(null);try{return t.current=Jse(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw a(e.message||gr("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(m);(0,Bt.useEffect)((()=>{void 0!==b&&b!==R&&S(b)}),[b]),(0,Bt.useEffect)((()=>{if(y.current)return void(y.current=!1);const e=null!=q&&q.current?1:0;(Yq.focusable.find(_.current)[e]||_.current).focus(),k.current=!1}),[R,T]);const D=(null==a||null===(t=a.url)||void 0===t||null===(n=t.trim())||void 0===n?void 0:n.length)>0,I=()=>{var e;k.current=!(null===(e=_.current)||void 0===e||!e.contains(_.current.ownerDocument.activeElement)),E(!1),S(!1)},P=()=>{H===(null==a?void 0:a.url)&&x===(null==a?void 0:a.title)||l({...a,url:H,title:x}),I()},H=z||W,F=!(null!=H&&null!==(o=H.trim())&&void 0!==o&&o.length),Y=s&&a&&!R&&!T,X=!(null==i||!i.length),j=D&&v,V=(R||!a)&&!T;return(0,Bt.createElement)("div",{tabIndex:-1,ref:_,className:"block-editor-link-control"},T&&(0,Bt.createElement)("div",{className:"block-editor-link-control__loading"},(0,Bt.createElement)(L0,null)," ",gr("Creating"),"…"),V&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)("div",{className:eM()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},(0,Bt.createElement)(Yse,{currentLink:a,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:H,withCreateSuggestion:M,onCreateSuggestion:N,onChange:L,onSelect:e=>{l({...e,title:x||(null==e?void 0:e.title)}),I()},showInitialSuggestions:d,allowDirectEntry:!u,showSuggestions:p,suggestionsQuery:f,withURLSuggestion:!h,createSuggestionButtonText:g,useLabel:j})),B&&(0,Bt.createElement)(tne,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},B)),a&&!R&&!T&&(0,Bt.createElement)(Kse,{key:null==a?void 0:a.url,value:a,onEditClick:()=>S(!0),hasRichPreviews:O,hasUnlinkControl:Y,onRemove:s}),V&&(0,Bt.createElement)("div",{className:"block-editor-link-control__tools"},(X||j)&&(0,Bt.createElement)(Zle,{settingsOpen:w,setSettingsOpen:E,showTextControl:j,showSettings:X,textInputRef:q,internalTextInputValue:x,setInternalTextInputValue:C,handleSubmitWithEnter:e=>{const{keyCode:t}=e;t!==cq||F||(e.preventDefault(),P())},value:a,settings:i,onChange:l}),(0,Bt.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,Bt.createElement)(bE,{variant:"primary",onClick:P,className:"block-editor-link-control__search-submit",disabled:F},gr("Apply")),(0,Bt.createElement)(bE,{variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),L(null==a?void 0:a.url),C(null==a?void 0:a.title),D?I():null==s||s(),null==c||c()}},gr("Cancel")))),A&&A())}ece.ViewerFill=Use;const tce=ece;function nce(e,t,n,o){var r,a;const i=null!==(r=null==o?void 0:o.initWindowSize)&&void 0!==r?r:30,l=null===(a=null==o?void 0:o.useWindowing)||void 0===a||a,[s,c]=(0,Bt.useState)({visibleItems:i,start:0,end:i,itemInView:e=>e>=0&&e<=i});return(0,Bt.useLayoutEffect)((()=>{var r,a,i,s;if(!l)return;const u=lk(e.current),p=e=>{var r;if(!u)return;const a=Math.ceil(u.clientHeight/t),i=e?a:null!==(r=null==o?void 0:o.windowOverscan)&&void 0!==r?r:a,l=Math.floor(u.scrollTop/t),s=Math.max(0,l-i),p=Math.min(n-1,l+a+i);c((e=>{const t={visibleItems:a,start:s,end:p,itemInView:e=>s<=e&&e<=p};return e.start!==t.start||e.end!==t.end||e.visibleItems!==t.visibleItems?t:e}))};p(!0);const d=Dz((()=>{p()}),16);return null==u||u.addEventListener("scroll",d),null==u||null===(r=u.ownerDocument)||void 0===r||null===(a=r.defaultView)||void 0===a||a.addEventListener("resize",d),null==u||null===(i=u.ownerDocument)||void 0===i||null===(s=i.defaultView)||void 0===s||s.addEventListener("resize",d),()=>{var e,t;null==u||u.removeEventListener("scroll",d),null==u||null===(e=u.ownerDocument)||void 0===e||null===(t=e.defaultView)||void 0===t||t.removeEventListener("resize",d)}}),[t,e,n]),(0,Bt.useLayoutEffect)((()=>{var o,r;if(!l)return;const a=lk(e.current),i=e=>{switch(e.keyCode){case dq:return null==a?void 0:a.scrollTo({top:0});case pq:return null==a?void 0:a.scrollTo({top:n*t});case 33:return null==a?void 0:a.scrollTo({top:a.scrollTop-s.visibleItems*t});case 34:return null==a?void 0:a.scrollTo({top:a.scrollTop+s.visibleItems*t})}};return null==a||null===(o=a.ownerDocument)||void 0===o||null===(r=o.defaultView)||void 0===r||r.addEventListener("keydown",i),()=>{var e,t;null==a||null===(e=a.ownerDocument)||void 0===e||null===(t=e.defaultView)||void 0===t||t.removeEventListener("keydown",i)}}),[n,t,e,s.visibleItems]),[s,c]}const oce=(0,Bt.createContext)(void 0),rce=oce.Provider;function ace(e){let{children:t}=e;const[n,o]=(0,Bt.useState)(),r=(0,Bt.useMemo)((()=>({lastFocusedElement:n,setLastFocusedElement:o})),[n]);return(0,Bt.createElement)(rce,{value:r},t)}function ice(e){return Yq.focusable.find(e,{sequential:!0}).filter((t=>t.closest('[role="row"]')===e))}const lce=(0,Bt.forwardRef)((function(e,t){let{children:n,onExpandRow:o=(()=>{}),onCollapseRow:r=(()=>{}),onFocusRow:a=(()=>{}),applicationAriaLabel:i,...l}=e;const s=(0,Bt.useCallback)((e=>{const{keyCode:t,metaKey:n,ctrlKey:i,altKey:l}=e;if(n||i||l||![mq,zq,bq,Mq,dq,pq].includes(t))return;e.stopPropagation();const{activeElement:s}=document,{currentTarget:c}=e;if(!s||!c.contains(s))return;const u=s.closest('[role="row"]');if(!u)return;const p=ice(u),d=p.indexOf(s),b=0===d,m=b&&"false"===u.getAttribute("aria-expanded")&&t===Mq;if([bq,Mq].includes(t)){let n;if(n=t===bq?Math.max(0,d-1):Math.min(d+1,p.length-1),b){if(t===bq){var M,z,f;if("true"===u.getAttribute("aria-expanded"))return r(u),void e.preventDefault();const t=Math.max(parseInt(null!==(M=null==u?void 0:u.getAttribute("aria-level"))&&void 0!==M?M:"1",10)-1,1),n=Array.from(c.querySelectorAll('[role="row"]'));let o=u;for(let e=n.indexOf(u);e>=0;e--){const r=n[e].getAttribute("aria-level");if(null!==r&&parseInt(r,10)===t){o=n[e];break}}null===(z=ice(o))||void 0===z||null===(f=z[0])||void 0===f||f.focus()}if(t===Mq){if("false"===u.getAttribute("aria-expanded"))return o(u),void e.preventDefault();const t=ice(u);var h;if(t.length>0)null===(h=t[n])||void 0===h||h.focus()}return void e.preventDefault()}if(m)return;p[n].focus(),e.preventDefault()}else if([mq,zq].includes(t)){const n=Array.from(c.querySelectorAll('[role="row"]')),o=n.indexOf(u);let r;if(r=t===mq?Math.max(0,o-1):Math.min(o+1,n.length-1),r===o)return void e.preventDefault();const i=ice(n[r]);if(!i||!i.length)return void e.preventDefault();i[Math.min(d,i.length-1)].focus(),a(e,u,n[r]),e.preventDefault()}else if([dq,pq].includes(t)){const n=Array.from(c.querySelectorAll('[role="row"]')),o=n.indexOf(u);let r;if(r=t===dq?0:n.length-1,r===o)return void e.preventDefault();const i=ice(n[r]);if(!i||!i.length)return void e.preventDefault();i[Math.min(d,i.length-1)].focus(),a(e,u,n[r]),e.preventDefault()}}),[o,r,a]);return(0,Bt.createElement)(ace,null,(0,Bt.createElement)("div",{role:"application","aria-label":i},(0,Bt.createElement)("table",Pt({},l,{role:"treegrid",onKeyDown:s,ref:t}),(0,Bt.createElement)("tbody",null,n))))})),sce=lce;const cce=(0,Bt.forwardRef)((function(e,t){let{children:n,level:o,positionInSet:r,setSize:a,isExpanded:i,...l}=e;return(0,Bt.createElement)("tr",Pt({},l,{ref:t,role:"row","aria-level":o,"aria-posinset":r,"aria-setsize":a,"aria-expanded":i}),n)})),uce=cce,pce=(0,Bt.forwardRef)((function(e,t){let{children:n,as:o,...r}=e;const a=(0,Bt.useRef)(),i=t||a,{lastFocusedElement:l,setLastFocusedElement:s}=(0,Bt.useContext)(oce);let c;l&&(c=l===("current"in i?i.current:void 0)?0:-1);const u={ref:i,tabIndex:c,onFocus:e=>null==s?void 0:s(e.target),...r};return"function"==typeof n?n(u):o?(0,Bt.createElement)(o,u,n):null})),dce=pce;const bce=(0,Bt.forwardRef)((function(e,t){let{children:n,...o}=e;return(0,Bt.createElement)(dce,Pt({ref:t},o),n)})),mce=bce;const Mce=(0,Bt.forwardRef)((function(e,t){let{children:n,withoutGridItem:o=!1,...r}=e;return(0,Bt.createElement)("td",Pt({},r,{role:"gridcell"}),o?(0,Bt.createElement)(Bt.Fragment,null,n):(0,Bt.createElement)(mce,{ref:t},n))})),zce=Mce,fce=(0,Bt.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:o,clientId:r,...a}=e;const[i,l]=(0,Bt.useState)(null),s=Tz(fce),{hideInserter:c}=fp((e=>{const{getTemplateLock:t,__unstableGetEditorMode:n}=e(wN);return{hideInserter:!!t(r)||"zoom-out"===n()}}),[r]),u=W1({clientId:r,context:"list-view"}),p=W1({clientId:null==i?void 0:i.clientId,context:"list-view"});if((0,Bt.useEffect)((()=>{null!=p&&p.length&&vx(lr(gr("%s block inserted"),p),"assertive")}),[p]),c)return null;const d=`list-view-appender__${s}`,b=lr(gr("Append to %1$s block at position %2$d, Level %3$d"),u,o+1,n);return(0,Bt.createElement)("div",{className:"list-view-appender"},(0,Bt.createElement)(c1,Pt({ref:t,rootClientId:r,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},a,{toggleProps:{"aria-describedby":d},onSelectOrClose:e=>{null!=e&&e.clientId&&l(e)}})),(0,Bt.createElement)("div",{className:"list-view-appender__description",id:d},b))})),hce=LG(uce),gce=(0,Bt.forwardRef)(((e,t)=>{let{isSelected:n,position:o,level:r,rowCount:a,children:i,className:l,path:s,...c}=e;const u=Hz([t,RG({isSelected:n,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s})]);return(0,Bt.createElement)(hce,Pt({ref:u,className:eM()("block-editor-list-view-leaf",l),level:r,positionInSet:o,setSize:a},c),i)})),Oce=gce;const vce=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})),Ace=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function yce(e){let{onClick:t}=e;return(0,Bt.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander"},(0,Bt.createElement)(AF,{icon:Ar()?Ace:xie}))}const _ce=(0,Bt.forwardRef)((function(e,t){let{className:n,block:{clientId:o},onClick:r,onToggleExpanded:a,tabIndex:i,onFocus:l,onDragStart:s,onDragEnd:c,draggable:u}=e;const p=E1(o),d=W1({clientId:o,context:"list-view"}),{isLocked:b}=a3(o);return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(bE,{className:eM()("block-editor-list-view-block-select-button",n),onClick:r,onKeyDown:function(e){e.keyCode!==cq&&32!==e.keyCode||r(e)},ref:t,tabIndex:i,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:u,href:`#block-${o}`,"aria-hidden":!0},(0,Bt.createElement)(yce,{onClick:a}),(0,Bt.createElement)(IK,{icon:null==p?void 0:p.icon,showColors:!0}),(0,Bt.createElement)(lD,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,Bt.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,Bt.createElement)(AZ,{ellipsizeMode:"auto"},d)),(null==p?void 0:p.anchor)&&(0,Bt.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,Bt.createElement)(AZ,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},p.anchor)),b&&(0,Bt.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,Bt.createElement)(AF,{icon:vce})))))})),qce=(0,Bt.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:a,position:i,siblingBlockCount:l,level:s,isExpanded:c,selectedClientIds:u,...p}=e;const{clientId:d}=r,{blockMovingClientId:b,selectedBlockInBlockEditor:m}=fp((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(wN);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[d]),M=b&&m===d,z=eM()("block-editor-list-view-block-contents",{"is-dropping-before":M}),f=u.includes(d)?u:[d];return(0,Bt.createElement)(x1,{clientIds:f},(e=>{let{draggable:u,onDragStart:d,onDragEnd:b}=e;return(0,Bt.createElement)(_ce,Pt({ref:t,className:z,block:r,onClick:n,onToggleExpanded:o,isSelected:a,position:i,siblingBlockCount:l,level:s,draggable:u,onDragStart:d,onDragEnd:b,isExpanded:c},p))}))})),kce=qce,wce=(0,Bt.createContext)({}),Ece=()=>(0,Bt.useContext)(wce);const Wce=(0,Bt.memo)((function e(t){let{block:n,isDragged:o,isSelected:r,isBranchSelected:a,selectBlock:i,position:l,level:s,rowCount:c,siblingBlockCount:u,showBlockMovers:p,path:d,isExpanded:b,selectedClientIds:m,preventAnnouncement:M,isSyncedBranch:z}=t;const f=(0,Bt.useRef)(null),h=(0,Bt.useRef)(null),[g,O]=(0,Bt.useState)(!1),{clientId:v}=n,{isLocked:A,isContentLocked:y,canEdit:_}=a3(v),q=fp((e=>!r&&(!!y&&e(wN).hasSelectedInnerBlock(v,!0))),[y,v,r]),k=!y&&_,w=q||r&&m[0]===v,E=q||r&&m[m.length-1]===v,{toggleBlockHighlight:W}=Lm(wN),L=E1(v),x=Da(fp((e=>e(wN).getBlockName(v)),[v]),"__experimentalToolbar",!0),C=`list-view-block-select-button__${Tz(e)}`,R=((e,t,n)=>lr(gr("Block %1$d of %2$d, Level %3$d"),e,t,n))(l,u,s);let S=gr("Link");L&&(S=lr(gr(A?"%s link (locked)":"%s link"),L.title));const N=L?lr(gr("Options for %s block"),L.title):gr("Options"),{isTreeGridMounted:T,expand:B,collapse:D,BlockSettingsMenu:I}=Ece(),P=p&&u>0,H=eM()("block-editor-list-view-block__mover-cell",{"is-visible":g||r}),F=eM()("block-editor-list-view-block__menu-cell",{"is-visible":g||w});(0,Bt.useEffect)((()=>{!T&&r&&f.current.focus()}),[]);const Y=(0,Bt.useCallback)((()=>{O(!0),W(v,!0)}),[v,O,W]),X=(0,Bt.useCallback)((()=>{O(!1),W(v,!1)}),[v,O,W]),j=(0,Bt.useCallback)((e=>{i(e,v),e.preventDefault()}),[v,i]),V=(0,Bt.useCallback)((e=>{i(void 0,e)}),[i]),U=(0,Bt.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?D(v):!1===b&&B(v)}),[v,B,D,b]);let $;P?$=2:x||($=3);const G=eM()({"is-selected":r||q,"is-first-selected":w,"is-last-selected":E,"is-branch-selected":a,"is-synced-branch":z,"is-dragging":o,"has-single-cell":!x,"is-synced":null==L?void 0:L.isSynced}),K=m.includes(v)?m:[v];!function(e){let{isSelected:t,selectedClientIds:n,rowItemRef:o}=e;const r=1===n.length;(0,Bt.useLayoutEffect)((()=>{if(!t||!r||!o.current)return;const e=lk(o.current),{ownerDocument:n}=o.current;if(e===n.body||e===n.documentElement||!e)return;const a=o.current.getBoundingClientRect(),i=e.getBoundingClientRect();(a.topi.bottom)&&o.current.scrollIntoView()}),[t,r,o])}({isSelected:r,rowItemRef:h,selectedClientIds:m});const J=r&&1===m.length;return(0,Bt.createElement)(Oce,{className:G,onMouseEnter:Y,onMouseLeave:X,onFocus:Y,onBlur:X,level:s,position:l,rowCount:c,path:d,id:`list-view-block-${v}`,"data-block":v,"data-expanded":k?b:void 0,isExpanded:k?b:void 0,"aria-selected":!!r||q,ref:h},(0,Bt.createElement)(zce,{className:"block-editor-list-view-block__contents-cell",colSpan:$,ref:f,"aria-label":S,"aria-selected":!!r||q,"aria-expanded":k?b:void 0,"aria-describedby":C},(e=>{let{ref:t,tabIndex:o,onFocus:a}=e;return(0,Bt.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,Bt.createElement)(kce,{block:n,onClick:j,onToggleExpanded:U,isSelected:r,position:l,siblingBlockCount:u,level:s,ref:t,tabIndex:J?0:o,onFocus:a,isExpanded:b,selectedClientIds:m,preventAnnouncement:M}),(0,Bt.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:C},R))})),P&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(zce,{className:H,withoutGridItem:!0},(0,Bt.createElement)(mce,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,Bt.createElement)(B1,{orientation:"vertical",clientIds:[v],ref:t,tabIndex:n,onFocus:o})})),(0,Bt.createElement)(mce,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,Bt.createElement)(D1,{orientation:"vertical",clientIds:[v],ref:t,tabIndex:n,onFocus:o})})))),x&&I&&(0,Bt.createElement)(zce,{className:F,"aria-selected":!!r||q},(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,Bt.createElement)(I,{clientIds:K,block:n,icon:CX,label:N,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:o,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:V})})))}));function Lce(e,t,n,o){var r;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(xce(t,n,o),0):1}const xce=(e,t,n)=>(o,r)=>{var a;if(null==t?void 0:t.includes(r.clientId))return o;return(null!==(a=e[r.clientId])&&void 0!==a?a:n)&&r.innerBlocks.length>0?o+Lce(r,e,t,n):o+1},Cce=()=>{};const Rce=(0,Bt.memo)((function e(t){const{blocks:n,selectBlock:o=Cce,showBlockMovers:r,selectedClientIds:a,level:i=1,path:l="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:u,isExpanded:p,parentId:d,shouldShowInnerBlocks:b=!0,isSyncedBranch:m=!1,showAppender:M=!0}=t,z=E1(d),f=m||!(null==z||!z.isSynced),h=fp((e=>{if(!d)return!0;const t="contentOnly"===e(wN).getTemplateLock(d),n=e(wN).canEditBlock(d);return!t&&n}),[d]),{expandedState:g,draggedClientIds:O}=Ece();if(!h)return null;const v=M&&1===i,A=n.filter(Boolean),y=A.length,_=v?y+1:y;let q=c;return(0,Bt.createElement)(Bt.Fragment,null,A.map(((t,n)=>{var c;const{clientId:d,innerBlocks:m}=t;n>0&&(q+=Lce(A[n-1],g,O,p));const{itemInView:M}=u,z=M(q),h=n+1,v=l.length>0?`${l}_${h}`:`${h}`,k=!(null==m||!m.length),w=k&&b?null!==(c=g[d])&&void 0!==c?c:p:void 0,E=!(null==O||!O.includes(d)),W=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(d,a),L=s||W&&k,x=E||z||W;return(0,Bt.createElement)(bp,{key:d,value:!W},x&&(0,Bt.createElement)(Wce,{block:t,selectBlock:o,isSelected:W,isBranchSelected:L,isDragged:E,level:i,position:h,rowCount:_,siblingBlockCount:y,showBlockMovers:r,path:v,isExpanded:w,listPosition:q,selectedClientIds:a,isSyncedBranch:f}),!x&&(0,Bt.createElement)("tr",null,(0,Bt.createElement)("td",{className:"block-editor-list-view-placeholder"})),k&&w&&!E&&(0,Bt.createElement)(e,{parentId:d,blocks:m,selectBlock:o,showBlockMovers:r,level:i+1,path:v,listPosition:q+1,fixedListWindow:u,isBranchSelected:L,selectedClientIds:a,isExpanded:p,isSyncedBranch:f}))})),v&&(0,Bt.createElement)(uce,{level:i,setSize:_,positionInSet:_,isExpanded:!0},(0,Bt.createElement)(zce,null,(e=>(0,Bt.createElement)(fce,Pt({clientId:d,nestingLevel:i,blockCount:y},e))))))}));function Sce(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:a}=n||{},[i,l]=(0,Bt.useMemo)((()=>{if(!t.current)return[];return[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]}),[o,r]),s=l||i,c=(0,Bt.useCallback)((()=>{if(!i)return 0;const e=s.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,s]),u=(0,Bt.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),p=(0,Bt.useMemo)((()=>{if(s&&("top"===a||"bottom"===a||"inside"===a))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,o=e.right;let r=0,i=0;"top"===a?(r=e.top,i=e.top):(r=e.bottom,i=e.bottom);const l=o-n,u=i-r;return new window.DOMRect(n,r,l,u)}}}),[s,a,c]);return s?(0,Bt.createElement)(gw,{animate:!1,anchor:p,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,Bt.createElement)("div",{style:u,className:"block-editor-list-view-drop-indicator__line"})):null}function Nce(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=Lm(wN),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:a,getSelectedBlockClientIds:i,hasMultiSelection:l,hasSelectedBlock:s}=fp(wN),{getBlockType:c}=fp(kl),u=(0,Bt.useCallback)((async(u,p,d)=>{if(null==u||!u.shiftKey)return void n(p);u.preventDefault();const b="keydown"===u.type&&(u.keyCode===mq||u.keyCode===zq||u.keyCode===dq||u.keyCode===pq);if(!b&&!s()&&!l())return void n(p,null);const m=i(),M=[...r(p),p];b&&!m.some((e=>M.includes(e)))&&await e();let z=a(),f=p;b&&(s()||l()||(z=p),d&&(f=d));const h=r(z),g=r(f),{start:O,end:v}=function(e,t,n,o){const r=[...n,e],a=[...o,t],i=Math.min(r.length,a.length)-1;return{start:r[i],end:a[i]}}(z,f,h,g);await t(O,v,null);const A=i();if((u.keyCode===dq||u.keyCode===pq)&&A.length>1)return;const y=m.filter((e=>!A.includes(e)));let _;if(1===y.length){var q;const e=null===(q=c(o(y[0])))||void 0===q?void 0:q.title;e&&(_=lr(gr("%s deselected."),e))}else y.length>1&&(_=lr(gr("%s blocks deselected."),y.length));_&&vx(_)}),[e,o,c,r,a,i,l,s,t,n]);return{updateBlockSelection:u}}const Tce=["top","bottom"];function Bce(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=fp(wN),[a,i]=(0,Bt.useState)(),{rootClientId:l,blockIndex:s}=a||{},c=L5(l,s),u=o(),p=_5((0,Bt.useCallback)(((o,a)=>{const l={x:o.clientX,y:o.clientY},s=!(null==u||!u.length),c=function(e,t){let n,o,r,a;for(const i of e){if(i.isDraggedBlock)continue;const l=i.element.getBoundingClientRect(),[s,c]=C5(t,l,Tce),u=R5(t,l);if(void 0===r||s0&&o.isExpanded||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,a)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const l=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+l,dropPosition:n}}(Array.from(a.querySelectorAll("[data-block]")).map((o=>{const a=o.dataset.block,i="true"===o.dataset.expanded,l=e(a);return{clientId:a,isExpanded:i,rootClientId:l,blockIndex:t(a),element:o,isDraggedBlock:!!s&&u.includes(a),innerBlockCount:n(a),canInsertDraggedBlocksAsSibling:!s||r(u,l),canInsertDraggedBlocksAsChild:!s||r(u,a)}})),l);c&&i(c)}),[u]),200);return{ref:k5({onDrop:c,onDragOver(e){p(e,e.currentTarget)},onDragEnd(){p.cancel(),i(null)}}),target:a}}const Dce=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const Ice=(0,Bt.forwardRef)((function(e,t){let{id:n,blocks:o,showBlockMovers:r=!1,isExpanded:a=!1,showAppender:i=!1,blockSettingsMenu:l=v3,rootClientId:s}=e;o&&jo("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const{clientIdsTree:c,draggedClientIds:u,selectedClientIds:p}=function(e){let{blocks:t,rootClientId:n}=e;return fp((e=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:a}=e(wN);return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:t||a(n)}}),[t,n])}({blocks:o,rootClientId:s}),{visibleBlockCount:d,shouldShowInnerBlocks:b}=fp((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(wN),r=(null==u?void 0:u.length)>0?n(u).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[u]),{updateBlockSelection:m}=Nce(),[M,z]=(0,Bt.useReducer)(Dce,{}),{ref:f,target:h}=Bce(),g=(0,Bt.useRef)(),O=Hz([g,f,t]),v=(0,Bt.useRef)(!1),{setSelectedTreeId:A}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[o,r]=(0,Bt.useState)(null),{selectedBlockParentClientIds:a}=fp((e=>{const{getBlockParents:n}=e(wN);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(a)&&a.length?a:null;return(0,Bt.useEffect)((()=>{o!==t&&i&&n({type:"expand",clientIds:a})}),[t]),{setSelectedTreeId:r}}({firstSelectedBlockClientId:p[0],setExpandedState:z}),y=(0,Bt.useCallback)(((e,t)=>{m(e,t),A(t)}),[A,m]);(0,Bt.useEffect)((()=>{v.current=!0}),[]);const[_]=nce(g,36,d,{useWindowing:!0,windowOverscan:40}),q=(0,Bt.useCallback)((e=>{e&&z({type:"expand",clientIds:[e]})}),[z]),k=(0,Bt.useCallback)((e=>{e&&z({type:"collapse",clientIds:[e]})}),[z]),w=(0,Bt.useCallback)((e=>{var t;q(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[q]),E=(0,Bt.useCallback)((e=>{var t;k(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[k]),W=(0,Bt.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&m(e,null==t||null===(o=t.dataset)||void 0===o?void 0:o.block,null==n||null===(r=n.dataset)||void 0===r?void 0:r.block)}),[m]),L=(0,Bt.useMemo)((()=>({isTreeGridMounted:v.current,draggedClientIds:u,expandedState:M,expand:q,collapse:k,BlockSettingsMenu:l})),[v.current,u,M,q,k,l]);return c.length?(0,Bt.createElement)(bp,{value:!0},(0,Bt.createElement)(Sce,{listViewRef:g,blockDropTarget:h}),(0,Bt.createElement)(sce,{id:n,className:"block-editor-list-view-tree","aria-label":gr("Block navigation structure"),ref:O,onCollapseRow:E,onExpandRow:w,onFocusRow:W,applicationAriaLabel:gr("Block navigation structure")},(0,Bt.createElement)(wce.Provider,{value:L},(0,Bt.createElement)(Rce,{blocks:c,parentId:s,selectBlock:y,showBlockMovers:r,fixedListWindow:_,selectedClientIds:p,isExpanded:a,shouldShowInnerBlocks:b,showAppender:i})))):null})),Pce=(0,Bt.forwardRef)(((e,t)=>(0,Bt.createElement)(Ice,Pt({ref:t},e,{showAppender:!1,blockSettingsMenu:v3,rootClientId:null}))));const Hce=function(e){let{accept:t,children:n,multiple:o=!1,onChange:r,onClick:a,render:i,...l}=e;const s=(0,Bt.useRef)(null),c=()=>{var e;null===(e=s.current)||void 0===e||e.click()},u=i?i({openFileDialog:c}):(0,Bt.createElement)(bE,Pt({onClick:c},l),n);return(0,Bt.createElement)("div",{className:"components-form-file-upload"},u,(0,Bt.createElement)("input",{type:"file",ref:s,multiple:o,style:{display:"none"},accept:t,onChange:r,onClick:a,"data-testid":"form-file-upload-input"}))},Fce=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Yce=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Xce=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),jce=()=>{};let Vce=0;const Uce=Mn([Mj((e=>{const{createNotice:t,removeNotice:n}=e(gQ);return{createNotice:t,removeNotice:n}})),uj("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:o,allowedTypes:r,accept:a,onError:i,onSelect:l,onSelectURL:s,onToggleFeaturedImage:c,useFeaturedImage:u,onFilesUpload:p=jce,name:d=gr("Replace"),createNotice:b,removeNotice:m,children:M,multiple:z=!1,addToGallery:f,handleUpload:h=!0}=e;const g=fp((e=>e(wN).getSettings().mediaUpload),[]),O=!!g,v=(0,Bt.useRef)(),A="block-editor/media-replace-flow/error-notice/"+ ++Vce,y=e=>{const t=aa(e);i?i(t):setTimeout((()=>{b("error",t,{speak:!0,id:A,isDismissible:!0})}),1e3)},_=(e,t)=>{u&&c&&c(),t(),l(e),vx(gr("The media file has been replaced")),m(A)},q=e=>{e.keyCode===zq&&(e.preventDefault(),e.target.click())},k=z&&!(!r||0===r.length)&&r.every((e=>"image"===e||e.startsWith("image/")));return(0,Bt.createElement)(BW,{popoverProps:{variant:"toolbar"},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,Bt.createElement)(RW,{ref:v,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:q},d)},renderContent:e=>{let{onClose:i}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(YW,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,Bt.createElement)(F0,null,(0,Bt.createElement)(Y0,{gallery:k,addToGallery:f,multiple:z,value:z?o:n,onSelect:e=>_(e,i),allowedTypes:r,render:e=>{let{open:t}=e;return(0,Bt.createElement)(HN,{icon:Fce,onClick:t},gr("Open Media Library"))}}),(0,Bt.createElement)(Hce,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!h)return t(),l(n);p(n),g({allowedTypes:r,filesList:n,onFileChange:e=>{let[n]=e;_(n,t)},onError:y})})(e,i)},accept:a,multiple:z,render:e=>{let{openFileDialog:t}=e;return(0,Bt.createElement)(HN,{icon:Yce,onClick:()=>{t()}},gr("Upload"))}})),c&&(0,Bt.createElement)(HN,{icon:Xce,onClick:c,isPressed:u},gr("Use featured image")),M),s&&(0,Bt.createElement)("form",{className:eM()("block-editor-media-flow__url-input",{"has-siblings":O||c})},(0,Bt.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},gr("Current media URL:")),(0,Bt.createElement)(ww,{text:t,position:"bottom"},(0,Bt.createElement)("div",null,(0,Bt.createElement)(tce,{value:{url:t},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;s(t),v.current.focus()}})))))}})}));const $ce=function(e){let{className:t,label:n,onFilesDrop:o,onHTMLDrop:r,onDrop:a,...i}=e;const[l,s]=(0,Bt.useState)(),[c,u]=(0,Bt.useState)(),[p,d]=(0,Bt.useState)(),b=k5({onDrop(e){var t;const n=e.dataTransfer?S2(e.dataTransfer):[],i=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/html");i&&r?r(i):n.length&&o?o(n):a&&a(e)},onDragStart(e){var t,n;s(!0);let o="default";null!==(t=e.dataTransfer)&&void 0!==t&&t.types.includes("text/html")?o="html":(null!==(n=e.dataTransfer)&&void 0!==n&&n.types.includes("Files")||(e.dataTransfer?S2(e.dataTransfer):[]).length>0)&&(o="file"),d(o)},onDragEnd(){s(!1),d(void 0)},onDragEnter(){u(!0)},onDragLeave(){u(!1)}}),m=pX();let M;const z={hidden:{opacity:0},show:{opacity:1,transition:{type:"tween",duration:.2,delay:0,delayChildren:.1}},exit:{opacity:0,transition:{duration:.2,delayChildren:0}}},f={hidden:{opacity:0,scale:.9},show:{opacity:1,scale:1,transition:{duration:.1}},exit:{opacity:0,scale:.9}};c&&(M=(0,Bt.createElement)(Q_.div,{variants:z,initial:m?"show":"hidden",animate:"show",exit:m?"show":"exit",className:"components-drop-zone__content",style:{pointerEvents:"none"}},(0,Bt.createElement)(Q_.div,{variants:f},(0,Bt.createElement)(AF,{icon:Yce,className:"components-drop-zone__content-icon"}),(0,Bt.createElement)("span",{className:"components-drop-zone__content-text"},n||gr("Drop files to upload")))));const h=Sz()("components-drop-zone",t,{"is-active":(l||c)&&("file"===p&&o||"html"===p&&r||"default"===p&&a),"is-dragging-over-document":l,"is-dragging-over-element":c,[`is-dragging-${p}`]:!!p});return(0,Bt.createElement)("div",Pt({},i,{ref:b,className:h}),m?M:(0,Bt.createElement)(Gle,null,M))},Gce=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,Bt.createElement)(nk,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));function Kce(e){let{url:t,urlLabel:n,className:o}=e;const r=eM()(o,"block-editor-url-popover__link-viewer-url");return t?(0,Bt.createElement)(uX,{className:r,href:t},n||use(pse(t))):(0,Bt.createElement)("span",{className:r})}const{__experimentalPopoverLegacyPositionToPlacement:Jce}=qN(K4);function Zce(e){let t,{additionalControls:n,children:o,renderSettings:r,placement:a,focusOnMount:i="firstElement",position:l,...s}=e;void 0!==l&&jo("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==a?t=a:void 0!==l&&(t=Jce(l)),t=t||"bottom";const[c,u]=(0,Bt.useState)(!1),p=!!r&&c;return(0,Bt.createElement)(gw,Pt({className:"block-editor-url-popover",focusOnMount:i,placement:t,shift:!0},s),(0,Bt.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,Bt.createElement)("div",{className:"block-editor-url-popover__row"},o,!!r&&(0,Bt.createElement)(bE,{className:"block-editor-url-popover__settings-toggle",icon:bX,label:gr("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),p&&(0,Bt.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),n&&!p&&(0,Bt.createElement)("div",{className:"block-editor-url-popover__additional-controls"},n))}Zce.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...a}=e;return(0,Bt.createElement)("form",Pt({className:eM()("block-editor-url-popover__link-editor",n)},a),(0,Bt.createElement)(sse,{__nextHasNoMarginBottom:!0,value:r,onChange:o,autocompleteRef:t}),(0,Bt.createElement)(bE,{icon:Gce,label:gr("Apply"),type:"submit"}))},Zce.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:a,...i}=e;return(0,Bt.createElement)("div",Pt({className:eM()("block-editor-url-popover__link-viewer",t)},i),(0,Bt.createElement)(Kce,{url:r,urlLabel:a,className:n}),o&&(0,Bt.createElement)(bE,{icon:jse,label:gr("Edit"),onClick:o}))};const Qce=Zce,eue=()=>{},tue=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,Bt.createElement)(Qce,{onClose:r},(0,Bt.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,Bt.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":gr("URL"),placeholder:gr("Paste or type URL"),onChange:n,value:t}),(0,Bt.createElement)(bE,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Gce,label:gr("Apply"),type:"submit"})))};const nue=uj("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:a={},mediaPreview:i,notices:l,isAppender:s,accept:c,addToGallery:u,multiple:p=!1,handleUpload:d=!0,disableDropZone:b,disableMediaButtons:m,onError:M,onSelect:z,onCancel:f,onSelectURL:h,onToggleFeaturedImage:g,onDoubleClick:O,onFilesPreUpload:v=eue,onHTMLDrop:A=eue,children:y,mediaLibraryButton:_,placeholder:q,style:k}=e;const w=fp((e=>{const{getSettings:t}=e(wN);return t().mediaUpload}),[]),[E,W]=(0,Bt.useState)(""),[L,x]=(0,Bt.useState)(!1);(0,Bt.useEffect)((()=>{var e;W(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const C=e=>{W(e.target.value)},R=()=>{x(!0)},S=()=>{x(!1)},N=e=>{e.preventDefault(),E&&h&&(h(E),S())},T=e=>{if(!d)return z(e);let o;if(v(e),p)if(u){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));z(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=z;else o=e=>{let[t]=e;return z(t)};w({allowedTypes:n,filesList:e,onFileChange:o,onError:M})},B=e=>{T(e.target.files)},D=null!=q?q:e=>{let{instructions:t,title:c}=a;if(w||h||(t=gr("To edit this block, you need permission to upload media.")),void 0===t||void 0===c){const e=null!=n?n:[],[o]=e,r=1===e.length,a=r&&"audio"===o,i=r&&"image"===o,l=r&&"video"===o;void 0===t&&w&&(t=gr("Upload a media file or pick one from your media library."),a?t=gr("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=gr("Upload an image file, pick one from your media library, or add one with a URL."):l&&(t=gr("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===c&&(c=gr("Media"),a?c=gr("Audio"):i?c=gr("Image"):l&&(c=gr("Video")))}const u=eM()("block-editor-media-placeholder",o,{"is-appender":s});return(0,Bt.createElement)(Sie,{icon:r,label:c,instructions:t,className:u,notices:l,onDoubleClick:O,preview:i,style:k},e,y)},I=()=>b?null:(0,Bt.createElement)($ce,{onFilesDrop:T,onHTMLDrop:A}),P=()=>f&&(0,Bt.createElement)(bE,{className:"block-editor-media-placeholder__cancel-button",title:gr("Cancel"),variant:"link",onClick:f},gr("Cancel")),H=()=>h&&(0,Bt.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,Bt.createElement)(bE,{className:"block-editor-media-placeholder__button",onClick:R,isPressed:L,variant:"tertiary"},gr("Insert from URL")),L&&(0,Bt.createElement)(tue,{src:E,onChange:C,onSubmit:N,onClose:S})),F=()=>g&&(0,Bt.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,Bt.createElement)(bE,{className:"block-editor-media-placeholder__button",onClick:g,variant:"tertiary"},gr("Use featured image")));return m?(0,Bt.createElement)(F0,null,I()):(0,Bt.createElement)(F0,{fallback:D(H())},(()=>{const e=null!=_?_:e=>{let{open:t}=e;return(0,Bt.createElement)(bE,{variant:"tertiary",onClick:()=>{t()}},gr("Media Library"))},o=(0,Bt.createElement)(Y0,{addToGallery:u,gallery:p&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:p,onSelect:z,allowedTypes:n,mode:"browse",value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(w&&s)return(0,Bt.createElement)(Bt.Fragment,null,I(),(0,Bt.createElement)(Hce,{onChange:B,accept:c,multiple:p,render:e=>{let{openFileDialog:t}=e;const n=(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(bE,{variant:"primary",className:eM()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},gr("Upload")),o,H(),F(),P());return D(n)}}));if(w){const e=(0,Bt.createElement)(Bt.Fragment,null,I(),(0,Bt.createElement)(Hce,{variant:"primary",className:eM()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:B,accept:c,multiple:p},gr("Upload")),o,H(),F(),P());return D(e)}return D(o)})())}));function oue(e){return t=>{const[n,o]=(0,Bt.useState)([]);return(0,Bt.useLayoutEffect)((()=>{const{options:n,isDebounced:r}=e,a=Dz((()=>{const r=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(r.canceled)return;const a=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),i=new RegExp("(?:\\b|\\s|^)"+mse(t),"i");o(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const o=[];for(let r=0;re.test(Ci()(t))))&&(o.push(a),o.length===n))break}return o}(i,a))}));return r}),r?250:0),i=a();return()=>{a.cancel(),i&&(i.canceled=!0)}}),[t]),[n]}}function rue(e){const t=e.useItems?e.useItems:oue(e);return function(e){let{filterValue:n,instanceId:o,listBoxId:r,className:a,selectedIndex:i,onChangeOptions:l,onSelect:s,onReset:c,reset:u,contentRef:p}=e;const[d]=t(n),b=_x({editableContentElement:p.current}),[m,M]=(0,Bt.useState)(!1),z=(0,Bt.useRef)(null),f=Hz([z,Xq((e=>{p.current&&M(e.ownerDocument!==p.current.ownerDocument)}),[p])]);if(function(e,t){(0,Bt.useEffect)((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[t])}(z,u),(0,Bt.useLayoutEffect)((()=>{l(d)}),[d]),0===d.length)return null;const h=e=>{let{Component:t="div"}=e;return(0,Bt.createElement)(t,{id:r,role:"listbox",className:"components-autocomplete__results"},d.map(((e,t)=>(0,Bt.createElement)(bE,{key:e.key,id:`components-autocomplete-item-${o}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:Sz()("components-autocomplete__result",a,{"is-selected":t===i}),onClick:()=>s(e)},e.label))))};return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(gw,{focusOnMount:!1,onClose:c,placement:"top-start",className:"components-autocomplete__popover",anchor:b,ref:f},(0,Bt.createElement)(h,null)),p.current&&m&&(0,It.createPortal)((0,Bt.createElement)(h,{Component:uE}),p.current.ownerDocument.body))}}const aue=[];function iue(e){let{record:t,onChange:n,onReplace:o,completers:r,contentRef:a}=e;const i=Iz(vx,500),l=Tz(iue),[s,c]=(0,Bt.useState)(0),[u,p]=(0,Bt.useState)(aue),[d,b]=(0,Bt.useState)(""),[m,M]=(0,Bt.useState)(null),[z,f]=(0,Bt.useState)(null),h=(0,Bt.useRef)(!1);function g(e){const{getOptionCompletion:r}=m||{};if(!e.isDisabled){if(r){const a=r(e.value,d),i=(e=>null!==e&&"object"==typeof e&&"action"in e&&void 0!==e.action&&"value"in e&&void 0!==e.value)(a)?a:{action:"insert-at-caret",value:a};if("replace"===i.action)return void o([i.value]);"insert-at-caret"===i.action&&function(e){if(null===m)return;const o=t.start,r=o-m.triggerPrefix.length-d.length,a=CL({html:gs(e)});n(JL(t,a,r,o))}(i.value)}O()}}function O(){c(0),p(aue),b(""),M(null),f(null)}const v=(0,Bt.useMemo)((()=>{if(jL(t))return XL(ex(t,0))}),[t]);(0,Bt.useEffect)((()=>{if(!v)return void(m&&O());const e=null==r?void 0:r.find((e=>{let{triggerPrefix:n,allowContext:o}=e;const r=v.lastIndexOf(n);if(-1===r)return!1;const a=v.slice(r+n.length);if(a.length>50)return!1;const i=0===u.length,l=1===a.split(/\s/).length,s=h.current&&a.split(/\s/).length<=3;if(i&&!s&&!l)return!1;const c=XL(ex(t,void 0,XL(t).length));return!(o&&!o(v.slice(0,r),c))&&(!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a))}));if(!e)return void(m&&O());const n=mse(e.triggerPrefix),o=Ci()(v),a=o.slice(o.lastIndexOf(e.triggerPrefix)).match(new RegExp(`${n}([\0-￿]*)$`)),i=a&&a[1];M(e),f((()=>e!==m?rue(e):z)),b(null===i?"":i)}),[v]);const{key:A=""}=u[s]||{},{className:y}=m||{},_=!!m&&u.length>0,q=_?`components-autocomplete-listbox-${l}`:void 0;return{listBoxId:q,activeId:_?`components-autocomplete-item-${l}-${A}`:null,onKeyDown:function(e){if(h.current="Backspace"===e.key,m&&0!==u.length&&!e.defaultPrevented&&!e.isComposing&&229!==e.keyCode){switch(e.key){case"ArrowUp":c((0===s?u.length:s)-1);break;case"ArrowDown":c((s+1)%u.length);break;case"Escape":M(null),f(null),e.preventDefault();break;case"Enter":g(u[s]);break;case"ArrowLeft":case"ArrowRight":return void O();default:return}e.preventDefault()}},popover:void 0!==t.start&&z&&(0,Bt.createElement)(z,{className:y,filterValue:d,instanceId:l,listBoxId:q,selectedIndex:s,onChangeOptions:function(e){c(e.length===u.length?s:0),p(e),function(e){i&&(e.length?i(lr(vr("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):i(gr("No results."),"assertive"))}(e)},onSelect:g,value:t,contentRef:a,reset:O})}}function lue(e){const t=(0,Bt.useRef)(null),n=(0,Bt.useRef)(),{record:o}=e,r=function(e){const t=(0,Bt.useRef)(new Set);return t.current.add(e),t.current.size>2&&t.current.delete(Array.from(t.current)[0]),Array.from(t.current)[0]}(o),{popover:a,listBoxId:i,activeId:l,onKeyDown:s}=iue({...e,contentRef:t});n.current=s;const c=Hz([t,Xq((e=>{function t(e){var t;null===(t=n.current)||void 0===t||t.call(n,e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]);return o.text!==(null==r?void 0:r.text)?{ref:c,children:a,"aria-autocomplete":i?"list":void 0,"aria-owns":i,"aria-activedescendant":l}:{ref:c}}const sue=()=>{};const cue={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=fp((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(wN),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,a]=IZ(t,sue),i=(0,Bt.useMemo)((()=>(e.trim()?PQ(o,r,a,e):Gx(o,"frecency","desc")).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,a]),l=(0,Bt.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(IK,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i]);return[l]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:Ja(t,n,Za(o))}}},uue=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));const pue={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await td({path:Cp("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(AF,{key:"icon",icon:"page"===e.subtype?fse:uue}),e.title),getOptionCompletion:e=>(0,Bt.createElement)("a",{href:e.url},e.title)},due=[];function bue(e){let{completers:t=due}=e;const{name:n}=CN();return(0,Bt.useMemo)((()=>{let e=[...t,pue];return(n===Sa()||Ba(n,"__experimentalSlashInserter",!1))&&(e=[...e,cue]),xo("editor.Autocomplete.completers")&&(e===t&&(e=e.map((e=>({...e})))),e=No("editor.Autocomplete.completers",e,n)),e}),[t,n])}const mue={position:"bottom right",variant:"toolbar"},Mue=()=>(0,Bt.createElement)(Bt.Fragment,null,["bold","italic","link","unknown"].map((e=>(0,Bt.createElement)(ow,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,Bt.createElement)(ow,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})),n=t.some((e=>{let{isActive:t}=e;return t}));return(0,Bt.createElement)(LW,null,(t=>(0,Bt.createElement)(VW,{icon:bX,label:gr("More"),toggleProps:{...t,className:eM()(t.className,{"is-pressed":n}),describedBy:gr("Displays more block tools")},controls:Gx(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:mue})))})));function zue(e){let{editableContentElement:t,activeFormats:n}=e;const o=n[n.length-1],r=null==o?void 0:o.type,a=_x({editableContentElement:t,settings:fp((e=>e(yL).getFormatType(r)),[r])});return(0,Bt.createElement)(fue,{popoverAnchor:a})}function fue(e){let{popoverAnchor:t}=e;return(0,Bt.createElement)(gw,{placement:"top",focusOnMount:!1,anchor:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,Bt.createElement)(G1,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":gr("Format tools")},(0,Bt.createElement)($W,null,(0,Bt.createElement)(Mue,null))))}const hue=e=>{let{inline:t,editableContentElement:n,value:o}=e;const r=fp((e=>e(wN).getSettings().hasInlineToolbar),[]);if(t)return(0,Bt.createElement)(fue,{popoverAnchor:n});if(r){const e=HL(o);return jL(o)&&!e.length?null:(0,Bt.createElement)(zue,{editableContentElement:n,activeFormats:e})}return(0,Bt.createElement)(DN,{group:"inline"},(0,Bt.createElement)(Mue,null))};function gue(){const{didAutomaticChange:e,getSettings:t}=fp(wN);return Xq((n=>{function o(n){const{keyCode:o}=n;if(n.defaultPrevented)return;if(o!==fq&&o!==sq&&o!==uq)return;const{__experimentalUndo:r}=t();r&&e()&&(n.preventDefault(),r())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function Oue(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function vue(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Aue(e){let{allowedFormats:t,disableFormats:n}=e;return n?Aue.EMPTY_ARRAY:t}Aue.EMPTY_ARRAY=[];function yue(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:a,multilineTag:i}=e;if(!o||!r)return;const{start:l=0,end:s=0}=t,c={...t,start:l,end:s},u=[],[p,d]=tx(c),b=n.length>0;let m=-1;const M=VL(p)&&!VL(d);b&&VL(p)||(u.push(r(lx({value:p,multilineTag:i}),!M)),m+=1),b?(u.push(...n),m+=n.length):a&&u.push(a()),(b||a)&&VL(d)||u.push(r(lx({value:d,multilineTag:i}),M));o(u,b?m:1,b?-1:0)}function _ue(e,t){return t?QL(e,/\n+/g,WL):QL(e,new RegExp(WL,"g"),"\n")}function que(e){const t=(0,Bt.useRef)(e);return t.current=e,Xq((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:a,formatTypes:i,tagName:l,onReplace:s,onSplit:c,onSplitMiddle:u,__unstableEmbedURLOnPaste:p,multilineTag:d,preserveWhiteSpace:b,pastePlainText:m}=t.current;if(!n)return;const{clipboardData:M}=e;let z="",f="";try{z=M.getData("text/plain"),f=M.getData("text/html")}catch(e){try{f=M.getData("Text")}catch(e){return}}if(f=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(f),f=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(f),e.preventDefault(),window.console.log("Received HTML:\n\n",f),window.console.log("Received plain text:\n\n",z),o)return void r(JL(a,z));const h=i.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===a&&(e=n(a,{html:f,plainText:z})),e}),a);if(h!==a)return void r(h);const g=[...S2(M)];if("true"===M.getData("rich-text")){const e=M.getData("rich-text-multi-line-tag")||void 0;let t=CL({html:f,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:b});return t=_ue(t,!!d),Oue(t,a.activeFormats),void r(JL(a,t))}if(m)return void r(JL(a,CL({text:z})));if(null!=g&&g.length&&window.console.log("Received items:\n\n",g),null!=g&&g.length&&!N2(g,f)){const e=ii("from"),t=g.reduce(((t,n)=>{const o=ai(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat();if(!t.length)return;return void(s&&VL(a)?s(t):yue({value:a,pastedBlocks:t,onReplace:s,onSplit:c,onSplitMiddle:u,multilineTag:d}))}let O=s&&c?"AUTO":"INLINE";var v;"AUTO"===O&&VL(a)&&(v=z,cu(".*").test(v))&&(O="BLOCKS"),p&&VL(a)&&ase(z.trim())&&(O="BLOCKS");const A=Qu({HTML:f,plainText:z,mode:O,tagName:l,preserveWhiteSpace:b});if("string"==typeof A){let e=CL({html:A});e=_ue(e,!!d),Oue(e,a.activeFormats),r(JL(a,e))}else A.length>0&&(s&&VL(a)?s(A,A.length-1,-1):yue({value:a,pastedBlocks:A,onReplace:s,onSplit:c,onSplitMiddle:u,multilineTag:d}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}const kue=["`",'"',"'","“”","‘’"];function wue(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=Lm(wN),o=(0,Bt.useRef)(e);return o.current=e,Xq((e=>{function r(r){const{inputType:a,data:i}=r,{value:l,onChange:s}=o.current;if("insertText"!==a)return;if(jL(l))return;const c=No("blockEditor.wrapSelectionSettings",kue).find((e=>{let[t,n]=e;return t===i||n===i}));if(!c)return;const[u,p=u]=c,d=l.start,b=l.end+u.length;let m=JL(l,u,d,d);m=JL(m,p,b,b),t(),s(m),n();const M={};for(const e in r)M[e]=r[e];M.data=p;const{ownerDocument:z}=e,{defaultView:f}=z,h=new f.InputEvent("input",M);window.queueMicrotask((()=>{r.target.dispatchEvent(h)})),r.preventDefault()}return e.addEventListener("beforeinput",r),()=>{e.removeEventListener("beforeinput",r)}}),[])}function Eue(e){let t=e.length;for(;t--;){const n=mS(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].replace(bS,""),[e[t].clientId,n,0,0];const o=Eue(e[t].innerBlocks);if(o)return o}return[]}function Wue(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=Lm(wN),o=(0,Bt.useRef)(e);return o.current=e,Xq((e=>{function r(){const{getValue:e,onReplace:t,selectionChange:r}=o.current;if(!t)return;const a=e(),{start:i,text:l}=a;if(" "!==l.slice(i-1,i))return;const s=l.slice(0,i).trim(),c=ii("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=ai(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const p=lx({value:JL(a,bS,0,i)}),d=u.transform(p);return r(...Eue([d])),t([d]),n(),!0}function a(e){const{inputType:a,type:i}=e,{getValue:l,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==a&&"compositionend"!==i)return;if(c&&r&&r())return;const p=l(),d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n{e.removeEventListener("input",a),e.removeEventListener("compositionend",a)}}),[])}function Lue(e){const t=(0,Bt.useRef)(e);return t.current=e,Xq((e=>{function n(e){const{keyCode:n}=e;if(e.defaultPrevented)return;const{value:o,onMerge:r,onRemove:a}=t.current;if(n===fq||n===sq){const{start:t,end:i,text:l}=o,s=n===sq,c=o.activeFormats&&!!o.activeFormats.length;if(!jL(o)||c||s&&0!==t||!s&&i!==l.length)return;r&&r(!s),a&&VL(o)&&s&&a(!s),e.preventDefault()}}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}}),[])}function xue(e){const{__unstableMarkAutomaticChange:t}=Lm(wN),n=(0,Bt.useRef)(e);return n.current=e,Xq((e=>{function o(e){if(e.defaultPrevented)return;if(e.keyCode!==cq)return;const{removeEditorOnlyFormats:o,value:r,onReplace:a,onSplit:i,onSplitMiddle:l,multilineTag:s,onChange:c,disableLineBreaks:u,onSplitAtEnd:p}=n.current;e.preventDefault();const d={...r};d.formats=o(r);const b=a&&i;if(a){const e=ii("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=ai(e,(e=>e.regExp.test(d.text)));n&&(a([n.transform({content:d.text})]),t())}if(s)e.shiftKey?u||c(JL(d,"\n")):b&&UL(d)?yue({value:d,onReplace:a,onSplit:i,onSplitMiddle:l,multilineTag:s}):c(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end;const o=e.text.slice(0,t).lastIndexOf(WL),r=e.replacements[o];let a=[,];r&&(a=[r]);return JL(e,{formats:[,],replacements:a,text:WL},t,n)}(d));else{const{text:t,start:n,end:o}=d,r=p&&n===o&&o===t.length;e.shiftKey||!b&&!r?u||c(JL(d,"\n")):!b&&r?p():b&&yue({value:d,onReplace:a,onSplit:i,onSplitMiddle:l,multilineTag:s})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function Cue(e){return e(yL).getFormatTypes()}const Rue=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Sue(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((e=>{let[n,o]=e;return[`${t}.${n}`,o]})))}function Nue(e,t){return e[t]?e[t]:Object.keys(e).filter((e=>e.startsWith(t+"."))).reduce(((n,o)=>(n[o.slice(t.length+1)]=e[o],n)),{})}function Tue(e){return Xq((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function Bue(e){return Xq((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function Due(){const{__unstableMarkLastChangeAsPersistent:e}=Lm(wN);return Xq((t=>{function n(t){"insertReplacementText"===t.inputType&&e()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}}),[])}function Iue(){const{isMultiSelecting:e}=fp(wN);return Xq((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function Pue(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:a}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const l=FL(r,t),s=void 0!==l,c=function(e){let{start:t,end:n,replacements:o,text:r}=e;if(t+1===n&&r[t]===LL)return o[t]}(r),u=void 0!==c&&c.type===t;return(0,Bt.createElement)(i,{key:t,isActive:s,activeAttributes:s&&l.attributes||{},isObjectActive:u,activeObjectAttributes:u&&c.attributes||{},value:r,onChange:n,onFocus:o,contentRef:a})}))}const Hue=(0,Bt.createContext)(),Fue=(0,Bt.createContext)();const Yue=(0,Bt.forwardRef)((function e(t,n){let{children:o,tagName:r="div",value:a="",onChange:i,isSelected:l,multiline:s,inlineToolbar:c,wrapperClassName:u,autocompleters:p,onReplace:d,placeholder:b,allowedFormats:m,withoutInteractiveFormatting:M,onRemove:z,onMerge:f,onSplit:h,__unstableOnSplitAtEnd:g,__unstableOnSplitMiddle:O,identifier:v,preserveWhiteSpace:A,__unstablePastePlainText:y,__unstableEmbedURLOnPaste:_,__unstableDisableFormats:q,disableLineBreaks:k,__unstableAllowPrefixTransformations:w,...E}=t;s&&jo("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});const W=Tz(e);v=v||W,E=function(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:a,tagsToEliminate:i,disableEditingMenu:l,fontSize:s,fontFamily:c,fontWeight:u,fontStyle:p,minWidth:d,maxWidth:b,setRef:m,disableSuggestions:M,disableAutocorrection:z,...f}=e;return f}(E);const L=(0,Bt.useRef)(),{clientId:x}=CN(),{selectionStart:C,selectionEnd:R,isSelected:S}=fp((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(wN),o=t(),r=n();let a;return void 0===l?a=o.clientId===x&&r.clientId===x&&o.attributeKey===v:l&&(a=o.clientId===x),{selectionStart:a?o.offset:void 0,selectionEnd:a?r.offset:void 0,isSelected:a}})),{getSelectionStart:N,getSelectionEnd:T,getBlockRootClientId:B}=fp(wN),{selectionChange:D}=Lm(wN),I=vue(s),P=Aue({allowedFormats:m,disableFormats:q}),H=!P||P.length>0;let F=a,Y=i;Array.isArray(a)&&(jo("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),F=Lc.toHTML(a),Y=e=>i(Lc.fromDOM(EL(document,e).childNodes)));const X=(0,Bt.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;if("number"==typeof e||o){if(void 0===t&&B(x)!==B(T().clientId))return;n.start={clientId:x,attributeKey:v,offset:e}}if("number"==typeof t||o){if(void 0===e&&B(x)!==B(N().clientId))return;n.end={clientId:x,attributeKey:v,offset:t}}D(n)}),[x,v]),{formatTypes:j,prepareHandlers:V,valueHandlers:U,changeHandlers:$,dependencies:G}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const a=fp(Cue,[]),i=(0,Bt.useMemo)((()=>a.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&Rue.has(n))}))),[a,r,Rue]),l=fp((e=>i.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...Sue(r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t}),r.name)}:o),{})),[i,t,n]),s=Lm(),c=[],u=[],p=[],d=[];for(const e in l)d.push(l[e]);return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=e.__experimentalCreatePrepareEditableTree(Nue(l,e.name),{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?u.push(o):c.push(o)}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:n,blockClientId:t}));const r=Nue(l,e.name);p.push(e.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:c,valueHandlers:u,changeHandlers:p,dependencies:d}}({clientId:x,identifier:v,withoutInteractiveFormatting:M,allowedFormats:P});function K(e){return j.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=GL(e,t.name,0,e.text.length))})),e.formats}const{value:J,getValue:Z,onChange:Q,ref:ee}=function(e){let{value:t="",selectionStart:n,selectionEnd:o,placeholder:r,preserveWhiteSpace:a,onSelectionChange:i,onChange:l,__unstableMultilineTag:s,__unstableDisableFormats:c,__unstableIsSelected:u,__unstableDependencies:p=[],__unstableAfterParse:d,__unstableBeforeSerialize:b,__unstableAddInvisibleFormats:m}=e;const M=cp(),[,z]=(0,Bt.useReducer)((()=>({}))),f=(0,Bt.useRef)();function h(){const{ownerDocument:{defaultView:e}}=f.current,t=e.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;return CL({element:f.current,range:n,multilineTag:s,multilineWrapperTags:"li"===s?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:a})}function g(e){let{domOnly:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Nx({value:e,current:f.current,multilineTag:s,multilineWrapperTags:"li"===s?["ul","ol"]:void 0,prepareEditableTree:m,__unstableDomOnly:t,placeholder:r})}const O=(0,Bt.useRef)(t),v=(0,Bt.useRef)();function A(){O.current=t,v.current=CL({html:t,multilineTag:s,multilineWrapperTags:"li"===s?["ul","ol"]:void 0,preserveWhiteSpace:a}),c&&(v.current.formats=Array(t.length),v.current.replacements=Array(t.length)),d&&(v.current.formats=d(v.current)),v.current.start=n,v.current.end=o}const y=(0,Bt.useRef)(!1);if(v.current)n===v.current.start&&o===v.current.end||(y.current=u,v.current={...v.current,start:n,end:o});else{var _,q,k;A(),"core/text-color"===(null===(_=v.current)||void 0===_||null===(q=_.formats[0])||void 0===q||null===(k=q[0])||void 0===k?void 0:k.type)&&function(e){v.current=e,O.current=lx({value:b?{...e,formats:b(e)}:e,multilineTag:s,preserveWhiteSpace:a});const{formats:t,text:n}=e;M.batch((()=>{l(O.current,{__unstableFormats:t,__unstableText:n})})),z()}(v.current)}function w(e){v.current=e,g(e),O.current=c?e.text:lx({value:b?{...e,formats:b(e)}:e,multilineTag:s,preserveWhiteSpace:a});const{start:t,end:n,formats:o,text:r}=e;M.batch((()=>{i(t,n),l(O.current,{__unstableFormats:o,__unstableText:r})})),z()}function E(){A(),g(v.current)}const W=(0,Bt.useRef)(!1);(0,Bt.useLayoutEffect)((()=>{W.current&&t!==O.current&&(E(),z())}),[t]),(0,Bt.useLayoutEffect)((()=>{y.current&&(f.current.ownerDocument.activeElement!==f.current&&f.current.focus(),E(),y.current=!1)}),[y.current]);const L=Hz([f,(0,Bt.useCallback)((e=>{e&&(e.style.whiteSpace="pre-wrap",e.style.minWidth="1px")}),[]),Bx({record:v}),Dx({record:v,multilineTag:s,preserveWhiteSpace:a}),Xq((e=>{function t(t){const{target:n}=t;if(n===e||n.textContent)return;const{ownerDocument:o}=n,{defaultView:r}=o,a=o.createRange(),i=r.getSelection();a.selectNode(n),i.removeAllRanges(),i.addRange(a)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[]),Px({record:v,applyRecord:g}),Vx({createRecord:h,handleChange:w,multilineTag:s}),Xx({record:v,applyRecord:g,createRecord:h,handleChange:w,isSelected:u,onSelectionChange:i}),Xq((e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection();let r;function a(){return o.rangeCount?o.getRangeAt(0):null}function i(e){const n="keydown"===e.type?"keyup":"pointerup";function o(){t.removeEventListener(n,i),t.removeEventListener("selectionchange",o),t.removeEventListener("input",o)}function i(){o(),qx(r,a())||t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(n,i),t.addEventListener("selectionchange",o),t.addEventListener("input",o),r=a()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}}),[]),Xq((()=>{E(),W.current=!0}),[r,...p])]);return{value:v.current,getValue:()=>v.current,onChange:w,ref:L}}({value:F,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;Y(e),Object.values($).forEach((e=>{e(n,o)}))},selectionStart:C,selectionEnd:R,onSelectionChange:X,placeholder:b,__unstableIsSelected:S,__unstableMultilineTag:I,__unstableDisableFormats:q,preserveWhiteSpace:A,__unstableDependencies:[...G,r],__unstableAfterParse:function(e){return U.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:K,__unstableAddInvisibleFormats:function(e){return V.reduce(((t,n)=>n(t,e.text)),e.formats)}}),te=function(e){return lue({...e,completers:bue(e)})}({onReplace:d,completers:p,record:J,onChange:Q});!function(e){let{html:t,value:n}=e;const o=(0,Bt.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:a}=Lm(wN);(0,Bt.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{a()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}a()}else o.current=n.text}),[t,r])}({html:F,value:J});const ne=(0,Bt.useRef)(new Set),oe=(0,Bt.useRef)(new Set);function re(){var e;null===(e=L.current)||void 0===e||e.focus()}const ae=r;return(0,Bt.createElement)(Bt.Fragment,null,S&&(0,Bt.createElement)(Hue.Provider,{value:ne},(0,Bt.createElement)(Fue.Provider,{value:oe},(0,Bt.createElement)(gw.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:J,onChange:Q,onFocus:re}),(0,Bt.createElement)(Pue,{value:J,onChange:Q,onFocus:re,formatTypes:j,forwardedRef:L})))),S&&H&&(0,Bt.createElement)(hue,{inline:c,editableContentElement:L.current,value:J}),(0,Bt.createElement)(ae,Pt({role:"textbox","aria-multiline":!k,"aria-label":b},E,te,{ref:Hz([n,te.ref,E.ref,ee,wue({value:J,onChange:Q}),Wue({getValue:Z,onChange:Q,__unstableAllowPrefixTransformations:w,formatTypes:j,onReplace:d,selectionChange:D}),Due(),Xq((e=>{function t(e){(Wq.primary(e,"z")||Wq.primary(e,"y")||Wq.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),Tue(ne),Bue(oe),gue(),que({isSelected:S,disableFormats:q,onChange:Q,value:J,formatTypes:j,tagName:r,onReplace:d,onSplit:h,onSplitMiddle:O,__unstableEmbedURLOnPaste:_,multilineTag:I,preserveWhiteSpace:A,pastePlainText:y}),Lue({value:J,onMerge:f,onRemove:z}),xue({removeEditorOnlyFormats:K,value:J,onReplace:d,onSplit:h,onSplitMiddle:O,multilineTag:I,onChange:Q,disableLineBreaks:k,onSplitAtEnd:g}),Iue(),L]),contentEditable:!0,suppressContentEditableWarning:!0,className:eM()("block-editor-rich-text__editable",E.className,"rich-text")})))}));Yue.Content=e=>{let{value:t,tagName:n,multiline:o,...r}=e;Array.isArray(t)&&(jo("wp.blockEditor.RichText value prop as children type",{since:"6.1",version:"6.3",alternative:"value prop as string",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),t=Lc.toHTML(t));const a=vue(o);!t&&a&&(t=`<${a}>`);const i=(0,Bt.createElement)(Fl,null,t);if(n){const{format:e,...t}=r;return(0,Bt.createElement)(n,t,i)}return i},Yue.isEmpty=e=>!e||0===e.length;const Xue=Yue,jue=(0,Bt.forwardRef)(((e,t)=>(0,Bt.createElement)(Xue,Pt({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));jue.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,Bt.createElement)(n,o,t)};const Vue=jue,Uue=(0,Bt.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,Bt.createElement)(Vue,Pt({ref:t},o));const{className:r,onChange:a,...i}=o;return(0,Bt.createElement)(Hj.Z,Pt({ref:t,className:eM()("block-editor-plain-text",r),onChange:e=>a(e.target.value)},i))})),$ue=Uue;function Gue(e){let{character:t,type:n,onUse:o}=e;const r=(0,Bt.useContext)(Hue),a=(0,Bt.useRef)();return a.current=o,(0,Bt.useEffect)((()=>{function e(e){Wq[n](e,t)&&(a.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function Kue(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...a}=e,i="RichText.ToolbarControls";return n&&(i+=`.${n}`),o&&r&&(t=kq[o](r)),(0,Bt.createElement)(nw,{name:i},(0,Bt.createElement)(RW,Pt({},a,{shortcut:t})))}function Jue(e){let{inputType:t,onInput:n}=e;const o=(0,Bt.useContext)(Fue),r=(0,Bt.useRef)();return r.current=n,(0,Bt.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const Zue=()=>{};const Que=function(e){let{choices:t=[],onHover:n=Zue,onSelect:o,value:r}=e;return(0,Bt.createElement)(Bt.Fragment,null,t.map((e=>{const t=r===e.value;return(0,Bt.createElement)(HN,{key:e.value,role:"menuitemradio",icon:t&&xX,info:e.info,isSelected:t,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{t||o(e.value)},onMouseEnter:()=>n(e.value),onMouseLeave:()=>n(null),"aria-label":e["aria-label"]},e.label)})))},epe=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));const tpe=(0,Bt.forwardRef)((function(e,t){const n=fp((e=>e(wN).__unstableGetEditorMode()),[]),{__unstableSetEditorMode:o}=Lm(wN);return(0,Bt.createElement)(BW,{renderToggle:o=>{let{isOpen:r,onToggle:a}=o;return(0,Bt.createElement)(bE,Pt({},e,{ref:t,icon:"navigation"===n?epe:jse,"aria-expanded":r,"aria-haspopup":"true",onClick:a,label:gr("Tools")}))},popoverProps:{placement:"bottom-start"},renderContent:()=>(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(YW,{role:"menu","aria-label":gr("Tools")},(0,Bt.createElement)(Que,{value:"navigation"===n?"navigation":"edit",onSelect:o,choices:[{value:"edit",label:(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(AF,{icon:jse}),gr("Edit"))},{value:"navigation",label:(0,Bt.createElement)(Bt.Fragment,null,epe,gr("Select"))}]})),(0,Bt.createElement)("div",{className:"block-editor-tool-selector__help"},gr("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})})),npe="none",ope="custom",rpe="media",ape="attachment",ipe=["noreferrer","noopener"],lpe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,Bt.createElement)(nk,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,Bt.createElement)(nk,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),spe=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:a,mediaLink:i,linkTarget:l,linkClass:s,rel:c}=e;const[u,p]=(0,Bt.useState)(!1),[d,b]=(0,Bt.useState)(null),m=(0,Bt.useCallback)((()=>{p(!0)})),[M,z]=(0,Bt.useState)(!1),[f,h]=(0,Bt.useState)(null),g=(0,Bt.useRef)(null),O=(0,Bt.useCallback)((()=>{t!==rpe&&t!==ape||h(""),z(!0)})),v=(0,Bt.useCallback)((()=>{z(!1)})),A=(0,Bt.useCallback)((()=>{h(null),v(),p(!1)})),y=(0,Bt.useCallback)((()=>e=>{const t=g.current;t&&t.contains(e.target)||(p(!1),h(null),v())})),_=(0,Bt.useCallback)((()=>e=>{if(f){var t;const e=(null===(t=k().find((e=>e.url===f)))||void 0===t?void 0:t.linkDestination)||ope;n({href:f,linkDestination:e})}v(),h(null),e.preventDefault()})),q=(0,Bt.useCallback)((()=>{n({linkDestination:npe,href:""})})),k=()=>{const e=[{linkDestination:rpe,title:gr("Media File"),url:"image"===r?a:void 0,icon:lpe}];return"image"===r&&i&&e.push({linkDestination:ape,title:gr("Attachment Page"),url:"image"===r?i:void 0,icon:(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,Bt.createElement)(nk,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},w=(0,Bt.createElement)($Q,{spacing:"3"},(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=c?c:"").split(" ");ipe.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=c?c:"").split(" ").filter((e=>!1===ipe.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===l}),(0,Bt.createElement)(lX,{__nextHasNoMarginBottom:!0,label:gr("Link rel"),value:null!=c?c:"",onChange:e=>{n({rel:e})}}),(0,Bt.createElement)(lX,{__nextHasNoMarginBottom:!0,label:gr("Link CSS Class"),value:s||"",onChange:e=>{n({linkClass:e})}})),E=null!==f?f:o,W=(k().find((e=>e.linkDestination===t))||{}).title;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(RW,{icon:c6,className:"components-toolbar__control",label:gr(o?"Edit link":"Insert link"),"aria-expanded":u,onClick:m,ref:b}),u&&(0,Bt.createElement)(Qce,{anchor:d,onFocusOutside:y(),onClose:A,renderSettings:()=>w,additionalControls:!E&&(0,Bt.createElement)(YW,null,k().map((e=>(0,Bt.createElement)(HN,{key:e.linkDestination,icon:e.icon,onClick:()=>{h(null),(e=>{const t=k();let o;o=e?(t.find((t=>t.url===e))||{linkDestination:ope}).linkDestination:npe,n({linkDestination:o,href:e})})(e.url),v()}},e.title))))},(!o||M)&&(0,Bt.createElement)(Qce.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:E,onChangeInputValue:h,onSubmit:_(),autocompleteRef:g}),o&&!M&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Qce.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:O,urlLabel:W}),(0,Bt.createElement)(bE,{icon:ak,label:gr("Remove link"),onClick:q}))))};const cpe=dj((e=>({selectedBlockClientId:e(wN).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=lK(t);return t?(0,Bt.createElement)(bE,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},gr("Skip to the selected block")):null})),upe={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp://g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","€-¿×÷"," -⯿","⸀-⹿","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function ppe(e,t){return t.replace(e.HTMLRegExp,"\n")}function dpe(e,t){return t.replace(e.astralRegExp,"a")}function bpe(e,t){return t.replace(e.HTMLEntityRegExp,"")}function mpe(e,t){return t.replace(e.connectorRegExp," ")}function Mpe(e,t){return t.replace(e.removeRegExp,"")}function zpe(e,t){return t.replace(e.HTMLcommentRegExp,"")}function fpe(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t}function hpe(e,t){return t.replace(e.spaceRegExp," ")}function gpe(e,t){return t.replace(e.HTMLEntityRegExp,"a")}function Ope(e,t,n){var o,r;return e=[ppe.bind(null,n),zpe.bind(null,n),fpe.bind(null,n),dpe.bind(null,n),hpe.bind(null,n),gpe.bind(null,n)].reduce(((e,t)=>t(e)),e),null!==(o=null===(r=(e+="\n").match(t))||void 0===r?void 0:r.length)&&void 0!==o?o:0}function vpe(e,t,n){const o=function(e,t){var n,o;const r=Object.assign({},upe,t);return r.shortcodes=null!==(n=null===(o=r.l10n)||void 0===o?void 0:o.shortcodes)&&void 0!==n?n:[],r.shortcodes&&r.shortcodes.length&&(r.shortcodesRegExp=new RegExp("\\[\\/?(?:"+r.shortcodes.join("|")+")[^\\]]*?\\]","g")),r.type=e,"characters_excluding_spaces"!==r.type&&"characters_including_spaces"!==r.type&&(r.type="words"),r}(t,n);let r;switch(o.type){case"words":return r=o.wordsRegExp,function(e,t,n){var o,r;return e=[ppe.bind(null,n),zpe.bind(null,n),fpe.bind(null,n),hpe.bind(null,n),bpe.bind(null,n),mpe.bind(null,n),Mpe.bind(null,n)].reduce(((e,t)=>t(e)),e),null!==(o=null===(r=(e+="\n").match(t))||void 0===r?void 0:r.length)&&void 0!==o?o:0}(e,r,o);case"characters_including_spaces":return r=o.characters_including_spacesRegExp,Ope(e,r,o);case"characters_excluding_spaces":return r=o.characters_excluding_spacesRegExp,Ope(e,r,o);default:return 0}}const Ape=dj((e=>{const{getMultiSelectedBlocks:t}=e(wN);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=vpe(xs(t),"words");return(0,Bt.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,Bt.createElement)(IK,{icon:o2,showColors:!0}),(0,Bt.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,Bt.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},lr(vr("%d block","%d blocks",t.length),t.length)),(0,Bt.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},lr(vr("%d word","%d words",n),n))))}));function ype(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;return(0,Bt.createElement)("fieldset",{className:t},(0,Bt.createElement)(uE,{as:"legend"},gr("Transform to variation")),r.map((e=>(0,Bt.createElement)(bE,{key:e.name,icon:(0,Bt.createElement)(IK,{icon:e.icon,showColors:!0}),isPressed:o===e.name,label:o===e.name?e.title:lr(gr("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function _pe(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;const a=r.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}}));return(0,Bt.createElement)(VW,{className:t,label:gr("Transform to variation"),text:gr("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:bX,toggleProps:{iconPosition:"right"}},(()=>(0,Bt.createElement)("div",{className:`${t}__container`},(0,Bt.createElement)(PN,null,(0,Bt.createElement)(Que,{choices:a,value:o,onSelect:n})))))}const qpe=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=Lm(wN),{activeBlockVariation:o,variations:r}=fp((e=>{const{getActiveBlockVariation:n,getBlockVariations:o}=e(kl),{getBlockName:r,getBlockAttributes:a}=e(wN),i=t&&r(t);return{activeBlockVariation:n(i,a(t)),variations:i&&o(i,"transform")}}),[t]),a=null==o?void 0:o.name,i=(0,Bt.useMemo)((()=>{const e=new Set;return!!r&&(r.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===r.length)}),[r]);if(null==r||!r.length)return null;const l=i?ype:_pe;return(0,Bt.createElement)(l,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...r.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:a,variations:r})};function kpe(e){var t;let{genericPreviewBlock:n,style:o,className:r,activeStyle:a}=e;const i=null===(t=Na(n.name))||void 0===t?void 0:t.example,l=c2(r,a,o),s=(0,Bt.useMemo)((()=>({...n,title:o.label||o.name,description:o.description,initialAttributes:{...n.attributes,className:l+" block-editor-block-styles__block-preview-container"},example:i})),[n,l]);return(0,Bt.createElement)(gZ,{item:s,isStylePreview:!0})}const wpe=()=>{};function Epe(e){let{clientId:t,onSwitch:n=wpe,onHoverClassName:o=wpe}=e;const{onSelect:r,stylesToRender:a,activeStyle:i,genericPreviewBlock:l,className:s}=p2({clientId:t,onSwitch:n}),[c,u]=(0,Bt.useState)(null),p=iq("medium","<");if(!a||0===a.length)return null;const d=Dz(u,250),b=e=>{var t;c!==e?(d(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):d.cancel()};return(0,Bt.createElement)("div",{className:"block-editor-block-styles"},(0,Bt.createElement)("div",{className:"block-editor-block-styles__variants"},a.map((e=>{const t=e.isDefault?gr("Default"):e.label||e.name;return(0,Bt.createElement)(bE,{className:eM()("block-editor-block-styles__item",{"is-active":i.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>b(e),onFocus:()=>b(e),onMouseLeave:()=>b(null),onBlur:()=>b(null),onClick:()=>(e=>{r(e),o(null),u(null),d.cancel()})(e),"aria-current":i.name===e.name},(0,Bt.createElement)(AZ,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!p&&(0,Bt.createElement)(gw,{placement:"left-start",offset:20,focusOnMount:!1},(0,Bt.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>b(null)},(0,Bt.createElement)(kpe,{activeStyle:i,className:s,genericPreviewBlock:l,style:c}))))}const Wpe=Epe;function Lpe(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:r}=fp((e=>{var n,o;const r=e(wN).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:e(kl).getBlockStyles(t)}}),[t]),a=(0,Bt.useMemo)((()=>[{label:gr("Not set"),value:""},...r.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[r]),i=(0,Bt.useMemo)((()=>{var e;return null===(e=u2(r))||void 0===e?void 0:e.name}),[r]),l=(0,Bt.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==i?o&&(0,Bt.createElement)("div",{className:"default-style-picker__default-switcher"},(0,Bt.createElement)(P6,{__nextHasNoMarginBottom:!0,options:a,value:n||"",label:gr("Default Style"),onChange:l})):null}Epe.Slot=()=>(jo("BlockStyles.Slot",{version:"6.4",since:"6.2"}),null);const xpe=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})),Cpe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),Rpe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})),Spe={name:"settings",title:gr("Settings"),value:"settings",icon:xpe,className:"block-editor-block-inspector__tab-item"},Npe={name:"styles",title:gr("Styles"),value:"styles",icon:Cpe,className:"block-editor-block-inspector__tab-item"},Tpe={name:"list",title:gr("List View"),value:"list-view",icon:Rpe,className:"block-editor-block-inspector__tab-item"},Bpe=()=>{const e=NN(oj.slotName);return Boolean(e&&e.length)?(0,Bt.createElement)(fX,{className:"block-editor-block-inspector__advanced",title:gr("Advanced"),initialOpen:!1},(0,Bt.createElement)(rj.Slot,{group:"advanced"})):null},Dpe=()=>{const[e,t]=(0,Bt.useState)(),{multiSelectedBlocks:n}=fp((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(wN);return{multiSelectedBlocks:t(n())}}),[]);return(0,Bt.useLayoutEffect)((()=>{void 0===e&&t(n.some((e=>{var t,n;let{attributes:o}=e;return!(null==o||null===(t=o.style)||void 0===t||null===(n=t.position)||void 0===n||!n.type)})))}),[e,n,t]),(0,Bt.createElement)(fX,{className:"block-editor-block-inspector__position",title:gr("Position"),initialOpen:null!=e&&e},(0,Bt.createElement)(rj.Slot,{group:"position"}))},Ipe=()=>{const e=NN(EX.position.Slot.__unstableName);return Boolean(e&&e.length)?(0,Bt.createElement)(Dpe,null):null};const Ppe=function(e){let t;return(n,o)=>{if("SET_PERSISTENCE_LAYER"===o.type){const{persistenceLayer:e,persistedData:n}=o;return t=e,n}const r=e(n,o);var a;"SET_PREFERENCE_VALUE"===o.type&&(null===(a=t)||void 0===a||a.set(r));return r}}((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_PREFERENCE_VALUE"===t.type){const{scope:n,name:o,value:r}=t;return{...e,[n]:{...e[n],[o]:r}}}return e}));function Hpe(e,t){return function(n){let{select:o,dispatch:r}=n;const a=o.get(e,t);r.set(e,t,!a)}}function Fpe(e,t,n){return{type:"SET_PREFERENCE_VALUE",scope:e,name:t,value:n}}function Ype(e,t){return{type:"SET_PREFERENCE_DEFAULTS",scope:e,defaults:t}}async function Xpe(e){const t=await e.get();return{type:"SET_PERSISTENCE_LAYER",persistenceLayer:e,persistedData:t}}function jpe(e,t,n){var o,r;const a=null===(o=e.preferences[t])||void 0===o?void 0:o[n];return void 0!==a?a:null===(r=e.defaults[t])||void 0===r?void 0:r[n]}const Vpe=co("core/preferences",{reducer:Ko({defaults:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_PREFERENCE_DEFAULTS"===t.type){const{scope:n,defaults:o}=t;return{...e,[n]:{...e[n],...o}}}return e},preferences:Ppe}),actions:_,selectors:q});tr(Vpe);const Upe="isInspectorControlsTabsHintVisible";function $pe(){const e=fp((e=>{var t;return null===(t=e(Vpe).get("core",Upe))||void 0===t||t}),[]),t=(0,Bt.useRef)(),{set:n}=Lm(Vpe);return e?(0,Bt.createElement)("div",{ref:t,className:"block-editor-inspector-controls-tabs__hint"},(0,Bt.createElement)("div",{className:"block-editor-inspector-controls-tabs__hint-content"},gr("Looking for other block settings? They've moved to the styles tab.")),(0,Bt.createElement)(bE,{className:"block-editor-inspector-controls-tabs__hint-dismiss",icon:ak,iconSize:"16",label:gr("Dismiss hint"),onClick:()=>{const e=Yq.tabbable.findPrevious(t.current);null==e||e.focus(),n("core",Upe,!1)},showTooltip:!1})):null}const Gpe=e=>{let{showAdvancedControls:t=!1}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(rj.Slot,null),(0,Bt.createElement)(Ipe,null),t&&(0,Bt.createElement)("div",null,(0,Bt.createElement)(Bpe,null)),(0,Bt.createElement)($pe,null))},Kpe=e=>{let{blockName:t,clientId:n,hasBlockStyles:o}=e;return(0,Bt.createElement)(Bt.Fragment,null,o&&(0,Bt.createElement)("div",null,(0,Bt.createElement)(fX,{title:gr("Styles")},(0,Bt.createElement)(Wpe,{clientId:n}),Da(t,"defaultStylePicker",!0)&&(0,Bt.createElement)(Lpe,{blockName:t}))),(0,Bt.createElement)(rj.Slot,{group:"color",label:gr("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Bt.createElement)(rj.Slot,{group:"typography",label:gr("Typography")}),(0,Bt.createElement)(rj.Slot,{group:"dimensions",label:gr("Dimensions")}),(0,Bt.createElement)(rj.Slot,{group:"border",label:gr("Border")}),(0,Bt.createElement)(rj.Slot,{group:"styles"}))},Jpe=["core/navigation"],Zpe=e=>!Jpe.includes(e);function Qpe(e){let{blockName:t,clientId:n,hasBlockStyles:o,tabs:r}=e;const a=Zpe(t)?void 0:Tpe.name;return(0,Bt.createElement)(Z0,{className:"block-editor-block-inspector__tabs",tabs:r,initialTabName:a,key:n},(e=>e.name===Spe.name?(0,Bt.createElement)(Gpe,{showAdvancedControls:!!t}):e.name===Npe.name?(0,Bt.createElement)(Kpe,{blockName:t,clientId:n,hasBlockStyles:o}):e.name===Tpe.name?(0,Bt.createElement)(rj.Slot,{group:"list"}):void 0))}const ede=[];function tde(e){const t=[],{border:n,color:o,default:r,dimensions:a,list:i,position:l,styles:s,typography:c}=EX,u=Zpe(e),p=NN(i.Slot.__unstableName),d=!u&&!!p&&p.length,b=[...NN(n.Slot.__unstableName)||[],...NN(o.Slot.__unstableName)||[],...NN(a.Slot.__unstableName)||[],...NN(s.Slot.__unstableName)||[],...NN(c.Slot.__unstableName)||[]].length,m=NN(oj.slotName)||[],M=[...NN(r.Slot.__unstableName)||[],...NN(l.Slot.__unstableName)||[],...d&&b>1?m:[]];d&&t.push(Tpe),M.length&&t.push(Spe),b&&t.push(Npe);const z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,fp((e=>e(wN).getSettings().blockInspectorTabs),[]));return z?t:ede}function nde(e,t){const n=(0,Bt.useMemo)((()=>e.reduce(((e,t)=>("core/list-item"!==t.name&&Object.entries(t.attributes).some((e=>{let[,{__experimentalRole:t}]=e;return"content"===t}))&&(e[t.name]=!0),e)),{})),[e]),o=(0,Bt.useCallback)((e=>!!n[e]),[n]);return(0,Bt.useMemo)((()=>ode([t],o)),[t,o])}function ode(e,t){const n=[];for(const o of e)t(o.name)&&n.push(o),n.push(...ode(o.innerBlocks,t));return n}function rde(e){let{blockTypes:t,block:n,selectedBlock:o}=e;const{selectBlock:r}=Lm(wN),a=t.find((e=>{let{name:t}=e;return t===n.name})),i=o&&o.clientId===n.clientId;return(0,Bt.createElement)(bE,{isPressed:i,onClick:()=>r(n.clientId)},(0,Bt.createElement)(lD,{justify:"flex-start"},(0,Bt.createElement)(IK,{icon:a.icon}),(0,Bt.createElement)(cT,null,a.title)))}function ade(e){let{topLevelLockedBlock:t}=e;const{blockTypes:n,block:o,selectedBlock:r}=fp((e=>({blockTypes:e(kl).getBlockTypes(),block:e(wN).getBlock(t),selectedBlock:e(wN).getSelectedBlock()})),[t]),a=E1(t),i=nde(n,o);return(0,Bt.createElement)("div",{className:"block-editor-block-inspector"},(0,Bt.createElement)(PK,Pt({},a,{className:a.isSynced&&"is-synced"})),(0,Bt.createElement)(qpe,{blockClientId:t}),(0,Bt.createElement)($Q,{spacing:1,padding:4,className:"block-editor-block-inspector__block-buttons-container"},(0,Bt.createElement)("h2",{className:"block-editor-block-card__title"},gr("Content")),i.map((e=>(0,Bt.createElement)(rde,{selectedBlock:r,key:e.clientId,block:e,blockTypes:n})))))}const ide=e=>{let{animate:t,wrapper:n,children:o}=e;return t?n(o):o},lde=e=>{let{blockInspectorAnimationSettings:t,selectedBlockClientId:n,children:o}=e;const r=t&&"leftToRight"===t.enterDirection?-50:50;return(0,Bt.createElement)(Q_.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},key:n},o)},sde=e=>{let{clientId:t,blockName:n}=e;const o=tde(n),r=(null==o?void 0:o.length)>1,a=fp((e=>{const{getBlockStyles:t}=e(kl),o=t(n);return o&&o.length>0}),[n]),i=E1(t);return(0,Bt.createElement)("div",{className:"block-editor-block-inspector"},(0,Bt.createElement)(PK,Pt({},i,{className:i.isSynced&&"is-synced"})),(0,Bt.createElement)(qpe,{blockClientId:t}),r&&(0,Bt.createElement)(Qpe,{hasBlockStyles:a,clientId:t,blockName:n,tabs:o}),!r&&(0,Bt.createElement)(Bt.Fragment,null,a&&(0,Bt.createElement)("div",null,(0,Bt.createElement)(fX,{title:gr("Styles")},(0,Bt.createElement)(Wpe,{clientId:t}),Da(n,"defaultStylePicker",!0)&&(0,Bt.createElement)(Lpe,{blockName:n}))),(0,Bt.createElement)(rj.Slot,null),(0,Bt.createElement)(rj.Slot,{group:"color",label:gr("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Bt.createElement)(rj.Slot,{group:"typography",label:gr("Typography")}),(0,Bt.createElement)(rj.Slot,{group:"dimensions",label:gr("Dimensions")}),(0,Bt.createElement)(rj.Slot,{group:"border",label:gr("Border")}),(0,Bt.createElement)(rj.Slot,{group:"styles"}),(0,Bt.createElement)(Ipe,null),(0,Bt.createElement)("div",null,(0,Bt.createElement)(Bpe,null))),(0,Bt.createElement)(cpe,{key:"back"}))},cde=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,selectedBlockName:o,selectedBlockClientId:r,blockType:a,topLevelLockedBlock:i}=fp((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o,__unstableGetContentLockingParent:r,getTemplateLock:a}=e(wN),i=t(),l=i&&o(i),s=l&&Na(l);return{count:n(),selectedBlockClientId:i,selectedBlockName:l,blockType:s,topLevelLockedBlock:r(i)||("contentOnly"===a(i)?i:void 0)}}),[]),l=tde(null==a?void 0:a.name),s=(null==l?void 0:l.length)>1,c=function(e,t){return fp((t=>{if(e){const n=t(wN).getSettings().blockInspectorAnimation,o=null==n?void 0:n.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:a}=t(wN);return a(r(),o,!0)[0]||e.name===o?null==n?void 0:n[e.name]:null}return null}),[t,e])}(a,r);if(n>1)return(0,Bt.createElement)("div",{className:"block-editor-block-inspector"},(0,Bt.createElement)(Ape,null),s?(0,Bt.createElement)(Qpe,{tabs:l}):(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(rj.Slot,null),(0,Bt.createElement)(rj.Slot,{group:"color",label:gr("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,Bt.createElement)(rj.Slot,{group:"typography",label:gr("Typography")}),(0,Bt.createElement)(rj.Slot,{group:"dimensions",label:gr("Dimensions")}),(0,Bt.createElement)(rj.Slot,{group:"border",label:gr("Border")}),(0,Bt.createElement)(rj.Slot,{group:"styles"})));const u=o===xa();return a&&r&&!u?i?(0,Bt.createElement)(ade,{topLevelLockedBlock:i}):(0,Bt.createElement)(ide,{animate:c,wrapper:e=>(0,Bt.createElement)(lde,{blockInspectorAnimationSettings:c,selectedBlockClientId:r},e)},(0,Bt.createElement)(sde,{clientId:r,blockName:a.name})):t?(0,Bt.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},gr("No block selected.")):null};const ude=function(e){let{__unstableContentRef:t}=e;const[n,o]=(0,Bt.useState)(!1),r=fp((e=>e(wN).getBlockOrder()),[]);return(0,Bt.useEffect)((()=>{const e=setTimeout((()=>{o(!0)}),500);return()=>{clearTimeout(e)}}),[]),n?r.map(((e,n)=>n===r.length-1?null:(0,Bt.createElement)(f1,{key:e,previousClientId:e,nextClientId:r[n+1],__unstableContentRef:t},(0,Bt.createElement)("div",{className:"block-editor-block-list__insertion-point-inserter is-with-inserter"},(0,Bt.createElement)(c1,{position:"bottom center",clientId:r[n+1],__experimentalIsQuick:!0}))))):null};function pde(e){const{__unstableGetEditorMode:t,getSettings:n,isTyping:o}=e(wN);return{isZoomOutMode:"zoom-out"===t(),hasFixedToolbar:n().hasFixedToolbar,isTyping:o()}}function dde(e){let{children:t,__unstableContentRef:n,...o}=e;const r=iq("medium"),{hasFixedToolbar:a,isZoomOutMode:i,isTyping:l}=fp(pde,[]),s=kJ(),{getSelectedBlockClientIds:c,getBlockRootClientId:u}=fp(wN),{duplicateBlocks:p,removeBlocks:d,insertAfterBlock:b,insertBeforeBlock:m,clearSelectedBlock:M,moveBlocksUp:z,moveBlocksDown:f}=Lm(wN);const h=M1(n),g=M1(n);return(0,Bt.createElement)("div",Pt({},o,{onKeyDown:function(e){if(!e.defaultPrevented)if(s("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=u(t[0]);z(t,n)}}else if(s("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=u(t[0]);f(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),p(t))}else if(s("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),d(t))}else if(s("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),b(t[t.length-1]))}else if(s("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),m(t[0]))}else if(s("core/block-editor/unselect",e)){c().length&&(e.preventDefault(),M(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==n||n.current.focus())}}}),(0,Bt.createElement)(A1.Provider,{value:(0,Bt.useRef)(!1)},!l&&(0,Bt.createElement)(_1,{__unstableContentRef:n}),!i&&(a||!r)&&(0,Bt.createElement)(R3,{isFixed:!0}),(0,Bt.createElement)(h5,{__unstableContentRef:n}),(0,Bt.createElement)(gw.Slot,{name:"block-toolbar",ref:h}),t,(0,Bt.createElement)(gw.Slot,{name:"__unstable-block-tools-after",ref:g}),i&&(0,Bt.createElement)(ude,{__unstableContentRef:n})))}const bde=()=>{};const mde=(0,Bt.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:a,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:l,__experimentalFilterValue:s,onSelect:c=bde,shouldFocusBlock:u=!1}=e;const{destinationRootClientId:p,prioritizePatterns:d}=fp((e=>{const{getBlockRootClientId:t,getSettings:r}=e(wN);return{destinationRootClientId:n||t(o)||void 0,prioritizePatterns:r().__experimentalPreferPatternsOnRoot}}),[o,n]);return(0,Bt.createElement)(r1,{onSelect:c,rootClientId:p,clientId:o,isAppender:r,showInserterHelpPanel:a,showMostUsedBlocks:i,__experimentalInsertionIndex:l,__experimentalFilterValue:s,shouldFocusBlock:u,prioritizePatterns:d,ref:t})}));function Mde(){return null}Mde.Register=function(){const{registerShortcut:e}=Lm(qJ);return(0,Bt.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:gr("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:gr("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:gr("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:gr("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:gr("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:gr("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:gr("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:gr("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:gr("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:gr("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};const zde=Mde,fde=new Set([mq,Mq,zq,bq,cq,sq]);function hde(){const e=fp((e=>e(wN).isTyping()),[]),{stopTyping:t}=Lm(wN);return Xq((n=>{if(!e)return;const{ownerDocument:o}=n;let r,a;function i(e){const{clientX:n,clientY:o}=e;r&&a&&(r!==n||a!==o)&&t(),r=n,a=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function gde(){const{isTyping:e,hasInlineToolbar:t}=fp((e=>{const{isTyping:t,getSettings:n}=e(wN);return{isTyping:t(),hasInlineToolbar:n().hasInlineToolbar}}),[]),{startTyping:n,stopTyping:o}=Lm(wN),r=hde(),a=Xq((r=>{const{ownerDocument:a}=r,{defaultView:i}=a,l=i.getSelection();if(e){let e;function n(t){const{target:n}=t;e=i.setTimeout((()=>{NG(n)||o()}))}function s(e){const{keyCode:t}=e;t!==uq&&9!==t||o()}function c(){l.isCollapsed||o()}return r.addEventListener("focus",n),r.addEventListener("keydown",s),t||a.addEventListener("selectionchange",c),()=>{i.clearTimeout(e),r.removeEventListener("focus",n),r.removeEventListener("keydown",s),a.removeEventListener("selectionchange",c)}}function s(e){const{type:t,target:o}=e;NG(o)&&r.contains(o)&&("keydown"!==t||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&fde.has(t)}(e))&&n()}return r.addEventListener("keypress",s),r.addEventListener("keydown",s),()=>{r.removeEventListener("keypress",s),r.removeEventListener("keydown",s)}}),[e,t,n,o]);return Hz([r,a])}window.navigator.userAgent.indexOf("Trident");const Ode=new Set([mq,zq,bq,Mq]);function vde(){const e=fp((e=>e(wN).hasSelectedBlock()),[]);return Xq((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,a,i;function l(){r||(r=o.requestAnimationFrame((()=>{d(),r=null})))}function s(e){a&&o.cancelAnimationFrame(a),a=o.requestAnimationFrame((()=>{c(e),a=null}))}function c(e){let{keyCode:r}=e;if(!b())return;const a=sJ(o);if(!a)return;if(!i)return void(i=a);if(Ode.has(r))return void(i=a);const l=a.top-i.top;if(0===l)return;const s=lk(t);if(!s)return;const c=s===n.body||s===n.documentElement,u=c?o.scrollY:s.scrollTop,p=c?0:s.getBoundingClientRect().top,d=c?i.top/o.innerHeight:(i.top-p)/(o.innerHeight-p);if(0===u&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=a);const m=c?o.innerHeight:s.clientHeight;i.top+i.height>p+m||i.top{o.removeEventListener("scroll",l,!0),o.removeEventListener("resize",l,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",p),o.cancelAnimationFrame(r),o.cancelAnimationFrame(a)}}),[e])}const Ade=(0,Bt.createContext)({});function yde(e){let{children:t,uniqueId:n,blockName:o=""}=e;const r=(0,Bt.useContext)(Ade),{name:a}=CN();o=o||a;const i=(0,Bt.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(r,o,n)),[r,o,n]);return(0,Bt.createElement)(Ade.Provider,{value:i},t)}function _de(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,Bt.useContext)(Ade),{name:r}=CN();return n=n||r,Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e))}function qde(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function kde(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function wde(e){kde(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ede(e,t){kde(2,arguments);var n=wde(e),o=qde(t);return isNaN(o)?new Date(NaN):o?(n.setDate(n.getDate()+o),n):n}function Wde(e,t){kde(2,arguments);var n=wde(e),o=qde(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+o+1,0);var i=a.getDate();return r>=i?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}var Lde,xde,Cde={};function Rde(){return Cde}function Sde(e,t){var n,o,r,a,i,l,s,c;kde(1,arguments);var u=Rde(),p=qde(null!==(n=null!==(o=null!==(r=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(l=i.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==o?o:null===(s=u.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=wde(e),b=d.getDay(),m=(b=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=wde(e),b=d.getDay(),m=6+(bo.getTime()}(e,t))&&(Fde(e,n)||function(e,t){kde(2,arguments);var n=wde(e),o=wde(t);return n.getTime()-1}),[v]),_=(0,Bt.useCallback)((function(e,t){A(t?Array.isArray(e)?e:[e]:function(t){return t.concat(Array.isArray(e)?e:[e])})}),[]),q=(0,Bt.useCallback)((function(e){return A((function(t){return Array.isArray(e)?t.filter((function(t){return!e.map((function(e){return e.getTime()})).includes(t.getTime())})):t.filter((function(t){return!Fde(t,e)}))}))}),[]),k=(0,Bt.useCallback)((function(e,t){return y(e)?q(e):_(e,t)}),[q,y,_]),w=(0,Bt.useCallback)((function(e,t,n){A(n?Dde({start:e,end:t}):function(n){return n.concat(Dde({start:e,end:t}))})}),[]),E=(0,Bt.useCallback)((function(e,t){A((function(n){return n.filter((function(n){return!Dde({start:e,end:t}).map((function(e){return e.getTime()})).includes(n.getTime())}))}))}),[]),W=(0,Bt.useMemo)((function(){return function(e){kde(1,arguments);var t=e||{},n=wde(t.start),o=wde(t.end).getTime(),r=[];if(!(n.getTime()<=o))throw new RangeError("Invalid interval");var a=n;for(a.setHours(0,0,0,0),a.setDate(1);a.getTime()<=o;)r.push(wde(a)),a.setMonth(a.getMonth()+1);return r}({start:Ide(p),end:Bde(Wde(p,c-1))}).map((function(e){return function(e,t){kde(1,arguments);var n=e||{},o=wde(n.start),r=wde(n.end),a=r.getTime();if(!(o.getTime()<=a))throw new RangeError("Invalid interval");var i=Sde(o,t),l=Sde(r,t);i.setHours(15),l.setHours(15),a=l.getTime();for(var s=[],c=i;c.getTime()<=a;)c.setHours(0),s.push(wde(c)),(c=Nde(c,1)).setHours(15);return s}({start:Ide(e),end:Bde(e)},{weekStartsOn:o}).map((function(e){return Dde({start:Sde(e,{weekStartsOn:o}),end:Pde(e,{weekStartsOn:o})})}))}))}),[p,o,c]);return{clearTime:Vde,inRange:jde,viewing:p,setViewing:d,viewToday:b,viewMonth:m,viewPreviousMonth:M,viewNextMonth:z,viewYear:f,viewPreviousYear:h,viewNextYear:g,selected:v,setSelected:A,clearSelected:function(){return A([])},isSelected:y,select:_,deselect:q,toggle:k,selectRange:w,deselectRange:E,calendar:W}};function $de(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Gde(e){return Gde="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gde(e)}function Kde(e){$de(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Gde(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Jde(e){$de(1,arguments);var t=Kde(e);return t.setHours(0,0,0,0),t}function Zde(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Qde(e,t){$de(2,arguments);var n=Kde(e),o=Zde(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+o+1,0);var i=a.getDate();return r>=i?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function ebe(e,t){$de(2,arguments);var n=Zde(t);return Qde(e,-n)}function tbe(e){return tbe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tbe(e)}function nbe(e){return $de(1,arguments),e instanceof Date||"object"===tbe(e)&&"[object Date]"===Object.prototype.toString.call(e)}function obe(e){if($de(1,arguments),!nbe(e)&&"number"!=typeof e)return!1;var t=Kde(e);return!isNaN(Number(t))}function rbe(e,t){$de(2,arguments);var n=Kde(e).getTime(),o=Zde(t);return new Date(n+o)}function abe(e,t){$de(2,arguments);var n=Zde(t);return rbe(e,-n)}var ibe=864e5;function lbe(e){$de(1,arguments);var t=1,n=Kde(e),o=n.getUTCDay(),r=(o=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function cbe(e){$de(1,arguments);var t=sbe(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var o=lbe(n);return o}var ube=6048e5;var pbe={};function dbe(){return pbe}function bbe(e,t){var n,o,r,a,i,l,s,c;$de(1,arguments);var u=dbe(),p=Zde(null!==(n=null!==(o=null!==(r=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(l=i.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==o?o:null===(s=u.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Kde(e),b=d.getUTCDay(),m=(b=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(p+1,0,b),m.setUTCHours(0,0,0,0);var M=bbe(m,t),z=new Date(0);z.setUTCFullYear(p,0,b),z.setUTCHours(0,0,0,0);var f=bbe(z,t);return u.getTime()>=M.getTime()?p+1:u.getTime()>=f.getTime()?p:p-1}function Mbe(e,t){var n,o,r,a,i,l,s,c;$de(1,arguments);var u=dbe(),p=Zde(null!==(n=null!==(o=null!==(r=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(l=i.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==o?o:null===(s=u.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),d=mbe(e,t),b=new Date(0);b.setUTCFullYear(d,0,p),b.setUTCHours(0,0,0,0);var m=bbe(b,t);return m}var zbe=6048e5;function fbe(e,t){for(var n=e<0?"-":"",o=Math.abs(e).toString();o.length0?n:1-n;return fbe("yy"===t?o%100:o,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):fbe(n+1,2)},d:function(e,t){return fbe(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return fbe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return fbe(e.getUTCHours(),t.length)},m:function(e,t){return fbe(e.getUTCMinutes(),t.length)},s:function(e,t){return fbe(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,o=e.getUTCMilliseconds();return fbe(Math.floor(o*Math.pow(10,n-3)),t.length)}};const gbe=hbe;var Obe="midnight",vbe="noon",Abe="morning",ybe="afternoon",_be="evening",qbe="night",kbe={G:function(e,t,n){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var o=e.getUTCFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return gbe.y(e,t)},Y:function(e,t,n,o){var r=mbe(e,o),a=r>0?r:1-r;return"YY"===t?fbe(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):fbe(a,t.length)},R:function(e,t){return fbe(sbe(e),t.length)},u:function(e,t){return fbe(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return fbe(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return fbe(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){var o=e.getUTCMonth();switch(t){case"M":case"MM":return gbe.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return fbe(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var r=function(e,t){$de(1,arguments);var n=Kde(e),o=bbe(n,t).getTime()-Mbe(n,t).getTime();return Math.round(o/zbe)+1}(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):fbe(r,t.length)},I:function(e,t,n){var o=function(e){$de(1,arguments);var t=Kde(e),n=lbe(t).getTime()-cbe(t).getTime();return Math.round(n/ube)+1}(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):fbe(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):gbe.d(e,t)},D:function(e,t,n){var o=function(e){$de(1,arguments);var t=Kde(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),r=n-o;return Math.floor(r/ibe)+1}(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):fbe(o,t.length)},E:function(e,t,n){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){var r=e.getUTCDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return fbe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){var r=e.getUTCDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return fbe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var o=e.getUTCDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return fbe(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){var o=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var o,r=e.getUTCHours();switch(o=12===r?vbe:0===r?Obe:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var o,r=e.getUTCHours();switch(o=r>=17?_be:r>=12?ybe:r>=4?Abe:qbe,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var o=e.getUTCHours()%12;return 0===o&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return gbe.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):gbe.H(e,t)},K:function(e,t,n){var o=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):fbe(o,t.length)},k:function(e,t,n){var o=e.getUTCHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):fbe(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):gbe.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):gbe.s(e,t)},S:function(e,t){return gbe.S(e,t)},X:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Ebe(r);case"XXXX":case"XX":return Wbe(r);default:return Wbe(r,":")}},x:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"x":return Ebe(r);case"xxxx":case"xx":return Wbe(r);default:return Wbe(r,":")}},O:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wbe(r,":");default:return"GMT"+Wbe(r,":")}},z:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wbe(r,":");default:return"GMT"+Wbe(r,":")}},t:function(e,t,n,o){var r=o._originalDate||e;return fbe(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,o){return fbe((o._originalDate||e).getTime(),t.length)}};function wbe(e,t){var n=e>0?"-":"+",o=Math.abs(e),r=Math.floor(o/60),a=o%60;if(0===a)return n+String(r);var i=t||"";return n+String(r)+i+fbe(a,2)}function Ebe(e,t){return e%60==0?(e>0?"-":"+")+fbe(Math.abs(e)/60,2):Wbe(e,t)}function Wbe(e,t){var n=t||"",o=e>0?"-":"+",r=Math.abs(e);return o+fbe(Math.floor(r/60),2)+n+fbe(r%60,2)}const Lbe=kbe;var xbe=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Cbe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Rbe={p:Cbe,P:function(e,t){var n,o=e.match(/(P+)(p+)?/)||[],r=o[1],a=o[2];if(!a)return xbe(e,t);switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",xbe(r,t)).replace("{{time}}",Cbe(a,t))}};const Sbe=Rbe;function Nbe(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Tbe=["D","DD"],Bbe=["YY","YYYY"];function Dbe(e){return-1!==Tbe.indexOf(e)}function Ibe(e){return-1!==Bbe.indexOf(e)}function Pbe(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Hbe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const Fbe=function(e,t,n){var o,r=Hbe[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};function Ybe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,o=e.formats[n]||e.formats[e.defaultWidth];return o}}const Xbe={date:Ybe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ybe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ybe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var jbe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const Vbe=function(e,t,n,o){return jbe[e]};function Ube(e){return function(t,n){var o;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):r;o=e.formattingValues[a]||e.formattingValues[r]}else{var i=e.defaultWidth,l=null!=n&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[i]}return o[e.argumentCallback?e.argumentCallback(t):t]}}var $be={ordinalNumber:function(e,t){var n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ube({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ube({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ube({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ube({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ube({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};const Gbe=$be;function Kbe(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;var i,l=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Zbe(s,(function(e){return e.test(l)})):Jbe(s,(function(e){return e.test(l)}));i=e.valueCallback?e.valueCallback(c):c,i=n.valueCallback?n.valueCallback(i):i;var u=t.slice(l.length);return{value:i,rest:u}}}function Jbe(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Zbe(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(Qbe.matchPattern);if(!n)return null;var o=n[0],r=e.match(Qbe.parsePattern);if(!r)return null;var a=Qbe.valueCallback?Qbe.valueCallback(r[0]):r[0];a=t.valueCallback?t.valueCallback(a):a;var i=e.slice(o.length);return{value:a,rest:i}}),era:Kbe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Kbe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Kbe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Kbe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Kbe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const tme={code:"en-US",formatDistance:Fbe,formatLong:Xbe,formatRelative:Vbe,localize:Gbe,match:eme,options:{weekStartsOn:0,firstWeekContainsDate:1}};var nme=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ome=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rme=/^'([^]*?)'?$/,ame=/''/g,ime=/[a-zA-Z]/;function lme(e,t,n){var o,r,a,i,l,s,c,u,p,d,b,m,M,z,f,h,g,O;$de(2,arguments);var v=String(t),A=dbe(),y=null!==(o=null!==(r=null==n?void 0:n.locale)&&void 0!==r?r:A.locale)&&void 0!==o?o:tme,_=Zde(null!==(a=null!==(i=null!==(l=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:A.firstWeekContainsDate)&&void 0!==i?i:null===(p=A.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:1);if(!(_>=1&&_<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=Zde(null!==(b=null!==(m=null!==(M=null!==(z=null==n?void 0:n.weekStartsOn)&&void 0!==z?z:null==n||null===(f=n.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==M?M:A.weekStartsOn)&&void 0!==m?m:null===(g=A.locale)||void 0===g||null===(O=g.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==b?b:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!y.localize)throw new RangeError("locale must contain localize property");if(!y.formatLong)throw new RangeError("locale must contain formatLong property");var k=Kde(e);if(!obe(k))throw new RangeError("Invalid time value");var w=Nbe(k),E=abe(k,w),W={firstWeekContainsDate:_,weekStartsOn:q,locale:y,_originalDate:k},L=v.match(ome).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Sbe[t])(e,y.formatLong):e})).join("").match(nme).map((function(o){if("''"===o)return"'";var r=o[0];if("'"===r)return sme(o);var a=Lbe[r];if(a)return null!=n&&n.useAdditionalWeekYearTokens||!Ibe(o)||Pbe(o,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!Dbe(o)||Pbe(o,t,String(e)),a(E,o,y.localize,W);if(r.match(ime))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return o})).join("");return L}function sme(e){var t=e.match(rme);return t?t[1].replace(ame,"'"):e}function cme(e,t){$de(2,arguments);var n=Kde(e),o=Kde(t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function ume(e,t){$de(2,arguments);var n=Kde(e),o=Kde(t);return n.getTime()===o.getTime()}function pme(e,t){$de(2,arguments);var n=Jde(e),o=Jde(t);return n.getTime()===o.getTime()}function dme(e,t){$de(2,arguments);var n=Kde(e),o=Zde(t);return isNaN(o)?new Date(NaN):o?(n.setDate(n.getDate()+o),n):n}function bme(e,t){$de(2,arguments);var n=Zde(t),o=7*n;return dme(e,o)}const mme=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));const Mme=lE("div",{target:"e105ri6r5"})({name:"1khn195",styles:"box-sizing:border-box"}),zme=lE(lD,{target:"e105ri6r4"})("margin-bottom:",QN(4),";"),fme=lE(RX,{target:"e105ri6r3"})("font-size:",RT.fontSize,";font-weight:",RT.fontWeight,";strong{font-weight:",RT.fontWeightHeading,";}"),hme=lE("div",{target:"e105ri6r2"})("column-gap:",QN(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",QN(2),";"),gme=lE("div",{target:"e105ri6r1"})("color:",gT.gray[700],";font-size:",RT.fontSize,";line-height:",RT.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),Ome=lE(bE,{shouldForwardProp:e=>!["column","isSelected","isToday","hasEvents"].includes(e),target:"e105ri6r0"})("grid-column:",(e=>e.column),";position:relative;justify-content:center;",(e=>1===e.column&&"\n\t\tjustify-self: start;\n\t\t")," ",(e=>7===e.column&&"\n\t\tjustify-self: end;\n\t\t")," ",(e=>e.disabled&&"\n\t\tpointer-events: none;\n\t\t")," &&&{border-radius:100%;height:",QN(7),";width:",QN(7),";",(e=>e.isSelected&&`\n\t\t\tbackground: ${gT.ui.theme};\n\t\t\tcolor: ${gT.white};\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${gT.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tbackground: ${e.isSelected?gT.white:gT.ui.theme};\n\t\t\tborder-radius: 2px;\n\t\t\tbottom: 0;\n\t\t\tcontent: " ";\n\t\t\theight: 4px;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: -2px;\n\t\t\tposition: absolute;\n\t\t\twidth: 4px;\n\t\t}\n\t\t`),";");function vme(e){return"string"==typeof e?new Date(e):Kde(e)}const Ame="yyyy-MM-dd'T'HH:mm:ss";function yme(e){let{day:t,column:n,isSelected:o,isFocusable:r,isFocusAllowed:a,isToday:i,isInvalid:l,numEvents:s,onClick:c,onKeyDown:u}=e;const p=(0,Bt.useRef)();return(0,Bt.useEffect)((()=>{p.current&&r&&a&&p.current.focus()}),[r]),(0,Bt.createElement)(Ome,{ref:p,className:"components-datetime__date__day",disabled:l,tabIndex:r?0:-1,"aria-label":_me(t,o,s),column:n,isSelected:o,isToday:i,hasEvents:s>0,onClick:c,onKeyDown:u},$ie("j",t,-t.getTimezoneOffset()))}function _me(e,t,n){const{formats:o}=Xie(),r=$ie(o.date,e,-e.getTimezoneOffset());return t&&n>0?lr(vr("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),r,n):t?lr(gr("%1$s. Selected"),r):n>0?lr(vr("%1$s. There is %2$d event","%1$s. There are %2$d events",n),r,n):r}const qme=function(e){let{currentDate:t,onChange:n,events:o=[],isInvalidDate:r,onMonthPreviewed:a,startOfWeek:i=0}=e;const l=t?vme(t):new Date,{calendar:s,viewing:c,setSelected:u,setViewing:p,isSelected:d,viewPreviousMonth:b,viewNextMonth:m}=Ude({selected:[Jde(l)],viewing:Jde(l),weekStartsOn:i}),[M,z]=(0,Bt.useState)(Jde(l)),[f,h]=(0,Bt.useState)(!1),[g,O]=(0,Bt.useState)(t);return t!==g&&(O(t),u([Jde(l)]),p(Jde(l)),z(Jde(l))),(0,Bt.createElement)(Mme,{className:"components-datetime__date",role:"application","aria-label":gr("Calendar")},(0,Bt.createElement)(zme,null,(0,Bt.createElement)(bE,{icon:Ar()?UN:mme,variant:"tertiary","aria-label":gr("View previous month"),onClick:()=>{b(),z(ebe(M,1)),null==a||a(lme(ebe(c,1),Ame))}}),(0,Bt.createElement)(fme,{level:3},(0,Bt.createElement)("strong",null,$ie("F",c,-c.getTimezoneOffset()))," ",$ie("Y",c,-c.getTimezoneOffset())),(0,Bt.createElement)(bE,{icon:Ar()?mme:UN,variant:"tertiary","aria-label":gr("View next month"),onClick:()=>{m(),z(Qde(M,1)),null==a||a(lme(Qde(c,1),Ame))}})),(0,Bt.createElement)(hme,{onFocus:()=>h(!0),onBlur:()=>h(!1)},s[0][0].map((e=>(0,Bt.createElement)(gme,{key:e.toString()},$ie("D",e,-e.getTimezoneOffset())))),s[0].map((e=>e.map(((e,t)=>cme(e,c)?(0,Bt.createElement)(yme,{key:e.toString(),day:e,column:t+1,isSelected:d(e),isFocusable:ume(e,M),isFocusAllowed:f,isToday:pme(e,new Date),isInvalid:!!r&&r(e),numEvents:o.filter((t=>pme(t.date,e))).length,onClick:()=>{u([e]),z(e),null==n||n(lme(new Date(e.getFullYear(),e.getMonth(),e.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),Ame))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=dme(e,Ar()?1:-1)),"ArrowRight"===t.key&&(n=dme(e,Ar()?-1:1)),"ArrowUp"===t.key&&(n=function(e,t){$de(2,arguments);var n=Zde(t);return bme(e,-n)}(e,1)),"ArrowDown"===t.key&&(n=bme(e,1)),"PageUp"===t.key&&(n=ebe(e,1)),"PageDown"===t.key&&(n=Qde(e,1)),"Home"===t.key&&(n=function(e,t){var n,o,r,a,i,l,s,c;$de(1,arguments);var u=dbe(),p=Zde(null!==(n=null!==(o=null!==(r=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(i=t.locale)||void 0===i||null===(l=i.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==o?o:null===(s=u.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Kde(e),b=d.getDay(),m=(b=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Kde(e),b=d.getDay(),m=6+(b{const{timezone:e}=Xie(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",o=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offset}`,r="UTC"===e.string?gr("Coordinated Universal Time"):`(${o}) ${e.string.replace("_"," ")}`;return(0,Bt.createElement)(ww,{position:"top center",text:r},(0,Bt.createElement)(Hme,{className:"components-datetime__timezone"},o))};function Yme(e,t){return t?(e%12+12)%24:e%12}function Xme(e){return(t,n)=>{const o={...t};return n.type!==BI&&n.type!==jI&&n.type!==YI||void 0!==o.value&&(o.value=o.value.toString().padStart(e,"0")),o}}const jme=function(e){let{is12Hour:t,currentTime:n,onChange:o}=e;const[r,a]=(0,Bt.useState)((()=>n?kme(vme(n)):new Date));(0,Bt.useEffect)((()=>{a(n?kme(vme(n)):new Date)}),[n]);const{day:i,month:l,year:s,minutes:c,hours:u,am:p}=(0,Bt.useMemo)((()=>({day:lme(r,"dd"),month:lme(r,"MM"),year:lme(r,"yyyy"),minutes:lme(r,"mm"),hours:lme(r,t?"hh":"HH"),am:lme(r,"a")})),[r,t]),d=e=>(n,i)=>{let{event:l}=i;if(!(l.target instanceof HTMLInputElement))return;if(!l.target.validity.valid)return;let s=Number(n);"hours"===e&&t&&(s=Yme(s,"PM"===p));const c=function(e,t){if($de(2,arguments),"object"!==Wme(t)||null===t)throw new RangeError("values parameter must be an object");var n=Kde(e);return isNaN(n.getTime())?new Date(NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=Eme(n,t.month)),null!=t.date&&n.setDate(Zde(t.date)),null!=t.hours&&n.setHours(Zde(t.hours)),null!=t.minutes&&n.setMinutes(Zde(t.minutes)),null!=t.seconds&&n.setSeconds(Zde(t.seconds)),null!=t.milliseconds&&n.setMilliseconds(Zde(t.milliseconds)),n)}(r,{[e]:s});a(c),null==o||o(lme(c,Ame))};function b(e){return()=>{if(p===e)return;const t=parseInt(u,10),n=function(e,t){$de(2,arguments);var n=Kde(e),o=Zde(t);return n.setHours(o),n}(r,Yme(t,"PM"===e));a(n),null==o||o(lme(n,Ame))}}const m=(0,Bt.createElement)(Ime,{className:"components-datetime__time-field components-datetime__time-field-day",label:gr("Day"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:i,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:d("date")}),M=(0,Bt.createElement)(Bme,null,(0,Bt.createElement)(Dme,{className:"components-datetime__time-field components-datetime__time-field-month",label:gr("Month"),hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,value:l,options:[{value:"01",label:gr("January")},{value:"02",label:gr("February")},{value:"03",label:gr("March")},{value:"04",label:gr("April")},{value:"05",label:gr("May")},{value:"06",label:gr("June")},{value:"07",label:gr("July")},{value:"08",label:gr("August")},{value:"09",label:gr("September")},{value:"10",label:gr("October")},{value:"11",label:gr("November")},{value:"12",label:gr("December")}],onChange:e=>{const t=Eme(r,Number(e)-1);a(t),null==o||o(lme(t,Ame))}}));return(0,Bt.createElement)(Lme,{className:"components-datetime__time"},(0,Bt.createElement)(xme,null,(0,Bt.createElement)(ET.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},gr("Time")),(0,Bt.createElement)(lD,{className:"components-datetime__time-wrapper"},(0,Bt.createElement)(Cme,{className:"components-datetime__time-field components-datetime__time-field-time"},(0,Bt.createElement)(Sme,{className:"components-datetime__time-field-hours-input",label:gr("Hours"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:u,step:1,min:t?1:0,max:t?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:d("hours"),__unstableStateReducer:Xme(2)}),(0,Bt.createElement)(Nme,{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,Bt.createElement)(Tme,{className:"components-datetime__time-field-minutes-input",label:gr("Minutes"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:c,step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:d("minutes"),__unstableStateReducer:Xme(2)})),t&&(0,Bt.createElement)(Lae,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,Bt.createElement)(bE,{className:"components-datetime__time-am-button",variant:"AM"===p?"primary":"secondary",onClick:b("AM")},gr("AM")),(0,Bt.createElement)(bE,{className:"components-datetime__time-pm-button",variant:"PM"===p?"primary":"secondary",onClick:b("PM")},gr("PM"))),(0,Bt.createElement)(cF,null),(0,Bt.createElement)(Fme,null))),(0,Bt.createElement)(xme,null,(0,Bt.createElement)(ET.VisualLabel,{as:"legend",className:"components-datetime__time-legend"},gr("Date")),(0,Bt.createElement)(lD,{className:"components-datetime__time-wrapper"},t?(0,Bt.createElement)(Bt.Fragment,null,M,m):(0,Bt.createElement)(Bt.Fragment,null,m,M),(0,Bt.createElement)(Pme,{className:"components-datetime__time-field components-datetime__time-field-year",label:gr("Year"),hideLabelFromVision:!0,__next36pxDefaultSize:!0,value:s,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:d("year"),__unstableStateReducer:Xme(4)}))))};const Vme=lE($Q,{target:"e1p5onf01"})({name:"1khn195",styles:"box-sizing:border-box"}),Ume=lE("div",{target:"e1p5onf00"})({name:"l0rwn2",styles:"min-width:260px"}),$me=()=>{};const Gme=(0,Bt.forwardRef)((function(e,t){let{currentDate:n,is12Hour:o,isInvalidDate:r,onMonthPreviewed:a=$me,onChange:i,events:l,startOfWeek:s,__nextRemoveHelpButton:c=!1,__nextRemoveResetButton:u=!1}=e;c||jo("Help button in wp.components.DateTimePicker",{since:"13.4",version:"15.8",hint:"Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version."}),u||jo("Reset button in wp.components.DateTimePicker",{since:"13.4",version:"15.8",hint:"Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version."});const[p,d]=(0,Bt.useState)(!1);return(0,Bt.createElement)(Vme,{ref:t,className:"components-datetime",spacing:4},!p&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(jme,{currentTime:n,onChange:i,is12Hour:o}),(0,Bt.createElement)(qme,{currentDate:n,onChange:i,isInvalidDate:r,events:l,onMonthPreviewed:a,startOfWeek:s})),p&&(0,Bt.createElement)(Ume,{className:"components-datetime__calendar-help"},(0,Bt.createElement)(RX,{level:4},gr("Click to Select")),(0,Bt.createElement)("ul",null,(0,Bt.createElement)("li",null,gr("Click the right or left arrows to select other months in the past or the future.")),(0,Bt.createElement)("li",null,gr("Click the desired day to select it."))),(0,Bt.createElement)(RX,{level:4},gr("Navigating with a keyboard")),(0,Bt.createElement)("ul",null,(0,Bt.createElement)("li",null,(0,Bt.createElement)("abbr",{"aria-label":Or("Enter","keyboard button")},"↵")," ",(0,Bt.createElement)("span",null,gr("Select the date in focus."))),(0,Bt.createElement)("li",null,(0,Bt.createElement)("abbr",{"aria-label":gr("Left and Right Arrows")},"←/→")," ",gr("Move backward (left) or forward (right) by one day.")),(0,Bt.createElement)("li",null,(0,Bt.createElement)("abbr",{"aria-label":gr("Up and Down Arrows")},"↑/↓")," ",gr("Move backward (up) or forward (down) by one week.")),(0,Bt.createElement)("li",null,(0,Bt.createElement)("abbr",{"aria-label":gr("Page Up and Page Down")},gr("PgUp/PgDn"))," ",gr("Move backward (PgUp) or forward (PgDn) by one month.")),(0,Bt.createElement)("li",null,(0,Bt.createElement)("abbr",{"aria-label":gr("Home and End")},gr("Home/End"))," ",gr("Go to the first (Home) or last (End) day of a week.")))),(!u||!c)&&(0,Bt.createElement)(lD,{className:"components-datetime__buttons"},!u&&!p&&n&&(0,Bt.createElement)(bE,{className:"components-datetime__date-reset-button",variant:"link",onClick:()=>null==i?void 0:i(null)},gr("Reset")),(0,Bt.createElement)(cF,null),!c&&(0,Bt.createElement)(bE,{className:"components-datetime__date-help-toggle",variant:"link",onClick:function(){d(!p)}},gr(p?"Close":"Calendar Help"))))})),Kme=Gme;function Jme(e){let{title:t,help:n,actions:o=[],onClose:r}=e;return(0,Bt.createElement)($Q,{className:"block-editor-inspector-popover-header",spacing:4},(0,Bt.createElement)(lD,{alignment:"center"},(0,Bt.createElement)(RX,{className:"block-editor-inspector-popover-header__heading",level:2,size:13},t),(0,Bt.createElement)(cF,null),o.map((e=>{let{label:t,icon:n,onClick:o}=e;return(0,Bt.createElement)(bE,{key:t,className:"block-editor-inspector-popover-header__action",label:t,icon:n,variant:!n&&"tertiary",onClick:o},!n&&t)})),r&&(0,Bt.createElement)(bE,{className:"block-editor-inspector-popover-header__action",label:gr("Close"),icon:fK,onClick:r})),n&&(0,Bt.createElement)(kP,null,n))}const Zme=(0,Bt.forwardRef)((function(e,t){let{onClose:n,onChange:o,...r}=e;return(0,Bt.createElement)("div",{ref:t,className:"block-editor-publish-date-time-picker"},(0,Bt.createElement)(Jme,{title:gr("Publish"),actions:[{label:gr("Now"),onClick:()=>null==o?void 0:o(null)}],onClose:n}),(0,Bt.createElement)(Kme,Pt({startOfWeek:Xie().l10n.startOfWeek,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0,onChange:o},r)))})),Qme={button:"wp-element-button",caption:"wp-element-caption"},eMe=e=>Qme[e]?Qme[e]:"";function tMe(e,t){return Object.entries(t).every((t=>{let[n,o]=t;return"object"==typeof o&&"object"==typeof e[n]?tMe(e[n],o):e[n]===o}))}const nMe=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&tMe(e,n)}));return 1===n.length?n[0]:void 0},oMe={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function rMe(e){var t;const n="var:";if(null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)){return`var(--wp--${e.slice(n.length).split("|").join("--")})`}return e}function aMe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return GD.reduce(((n,o)=>{let{path:r,cssVarInfix:a,classes:i}=o;if(!i)return n;const l=(0,Ht.get)(t,r,[]);return["default","theme","custom"].forEach((t=>{l[t]&&l[t].forEach((t=>{let{slug:o}=t;i.forEach((t=>{let{classSuffix:r,propertyName:i}=t;const l=`.has-${(0,Ht.kebabCase)(o)}-${r}`,s=e.split(",").map((e=>`${e}${l}`)).join(","),c=`var(--wp--preset--${a}--${(0,Ht.kebabCase)(o)})`;n+=`${s}{${i}: ${c} !important;}`}))}))})),n}),"")}function iMe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=[];return Object.keys(e).forEach((r=>{const a=t+(0,Ht.kebabCase)(r.replace("/","-")),i=e[r];if(i instanceof Object){const e=a+n;o=[...o,...iMe(i,e,n)]}else o.push(`${a}: ${i}`)})),o}function lMe(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}const sMe=(e,t)=>{const n={};return Object.entries(e).forEach((e=>{let[o,r]=e;if("root"===o||null==t||!t[o])return;const a="string"==typeof r;if(a||Object.entries(r).forEach((e=>{let[r,a]=e;if("root"===r||null==t||!t[o][r])return;const i=cMe({[o]:{[r]:t[o][r]}});n[a]=[...n[a]||[],...i],delete t[o][r]})),a||r.root){const e=a?r:r.root,i=cMe({[o]:t[o]});n[e]=[...n[e]||[],...i],delete t[o]}})),n};function cMe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=$D===t,a=Object.entries(sa).reduce(((t,o)=>{let[a,{value:i,properties:l,useEngine:s,rootOnly:c}]=o;if(c&&!r)return t;const u=i;if("elements"===u[0]||s)return t;const p=(0,Ht.get)(e,u);if("--wp--style--root--padding"===a&&("string"==typeof p||!n))return t;if(l&&"string"!=typeof p)Object.entries(l).forEach((e=>{const[n,o]=e;if(!(0,Ht.get)(p,[o],!1))return;const r=n.startsWith("--")?n:(0,Ht.kebabCase)(n);t.push(`${r}: ${rMe((0,Ht.get)(p,[o]))}`)}));else if((0,Ht.get)(e,u,!1)){const n=a.startsWith("--")?a:(0,Ht.kebabCase)(a);t.push(`${n}: ${rMe((0,Ht.get)(e,u))}`)}return t}),[]),i=tY(e);return i.forEach((e=>{var t;if(r&&n&&e.key.startsWith("padding"))return;const i=e.key.startsWith("--")?e.key:(0,Ht.kebabCase)(e.key);let l=e.value;if("string"!=typeof l&&null!==(t=l)&&void 0!==t&&t.ref){var s;const e=l.ref.split(".");if(l=(0,Ht.get)(o,e),!l||null!==(s=l)&&void 0!==s&&s.ref)return}var c;"font-size"===i&&(l=UD({size:l},null==o||null===(c=o.settings)||void 0===c?void 0:c.typography));a.push(`${i}: ${l}`)})),a}function uMe(e){var t,n,o,r,a;let{tree:i,style:l,selector:s,hasBlockGapSupport:c,hasFallbackGapSupport:u,fallbackGapValue:p}=e,d="",b=c?AD(null==l||null===(t=l.spacing)||void 0===t?void 0:t.blockGap):"";if(u&&(s===$D?b=b||"0.5em":!c&&p&&(b=p)),b&&null!=i&&null!==(n=i.settings)&&void 0!==n&&null!==(o=n.layout)&&void 0!==o&&o.definitions&&(Object.values(i.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:o}=e;(c||"flex"===n)&&null!=o&&o.length&&o.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,o]=e;n.push(`${t}: ${o||b}`)})),n.length){let o="";o=c?s===$D?`:where(${s} .${t})${(null==e?void 0:e.selector)||""}`:`${s}-${t}${(null==e?void 0:e.selector)||""}`:s===$D?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${s}.${t}${(null==e?void 0:e.selector)||""})`,d+=`${o} { ${n.join("; ")}; }`}}))})),s===$D&&c&&(d+=`${s} { --wp--style--block-gap: ${b}; }`)),s===$D&&null!=i&&null!==(r=i.settings)&&void 0!==r&&null!==(a=r.layout)&&void 0!==a&&a.definitions){const e=["block","flex","grid"];Object.values(i.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:o,baseStyles:r}=t;o&&e.includes(o)&&(d+=`${s} .${n} { display:${o}; }`),null!=r&&r.length&&r.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,o]=e;t.push(`${n}: ${o}`)})),t.length){const o=`${s} .${n}${(null==e?void 0:e.selector)||""}`;d+=`${o} { ${t.join("; ")}; }`}}))}))}return d}const pMe=(e,t)=>{var n,o;const r=[];if(null==e||!e.styles)return r;const a=e=>Object.fromEntries(Object.entries(null!=e?e:{}).filter((e=>{let[t]=e;return["border","color","dimensions","spacing","typography","filter","outline","shadow"].includes(t)}))),i=a(e.styles);return i&&r.push({styles:i,selector:$D}),Object.entries(ca).forEach((t=>{var n,o;let[a,i]=t;var l,s;null!==(n=e.styles)&&void 0!==n&&null!==(o=n.elements)&&void 0!==o&&o[a]&&r.push({styles:null===(l=e.styles)||void 0===l||null===(s=l.elements)||void 0===s?void 0:s[a],selector:i})})),Object.entries(null!==(n=null===(o=e.styles)||void 0===o?void 0:o.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,o;let[i,l]=e;const s=a(l);if(null!=l&&l.variations){const e={};Object.keys(l.variations).forEach((t=>{e[t]=a(l.variations[t])})),s.variations=e}var c;s&&null!=t&&null!==(n=t[i])&&void 0!==n&&n.selector&&r.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:null===(c=t[i])||void 0===c?void 0:c.selector,styles:s,featureSelectors:t[i].featureSelectors,styleVariationSelectors:t[i].styleVariationSelectors});Object.entries(null!==(o=null==l?void 0:l.elements)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;var a;o&&null!=t&&t[i]&&null!=ca&&ca[n]&&r.push({styles:o,selector:null===(a=t[i])||void 0===a?void 0:a.selector.split(",").map((e=>ca[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),r},dMe=(e,t)=>{var n,o,r;const a=[];if(null==e||!e.settings)return a;const i=e=>{const t={};return GD.forEach((n=>{let{path:o}=n;const r=(0,Ht.get)(e,o,!1);!1!==r&&(0,Ht.set)(t,o,r)})),t},l=i(e.settings),s=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,Ht.isEmpty)(l)&&!s||a.push({presets:l,custom:s,selector:$D}),Object.entries(null!==(o=null===(r=e.settings)||void 0===r?void 0:r.blocks)&&void 0!==o?o:{}).forEach((e=>{let[n,o]=e;const r=i(o),l=o.custom;var s;(0,Ht.isEmpty)(r)&&!l||a.push({presets:r,custom:l,selector:null===(s=t[n])||void 0===s?void 0:s.selector})})),a},bMe=(e,t)=>{const n=dMe(e,t);let o="";return n.forEach((t=>{let{presets:n,custom:r,selector:a}=t;const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return GD.reduce(((n,o)=>{let{path:r,valueKey:a,valueFunc:i,cssVarInfix:l}=o;const s=(0,Ht.get)(e,r,[]);return["default","theme","custom"].forEach((e=>{s[e]&&s[e].forEach((e=>{a&&!i?n.push(`--wp--preset--${l}--${(0,Ht.kebabCase)(e.slug)}: ${e[a]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${l}--${(0,Ht.kebabCase)(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(n,null==e?void 0:e.settings),l=iMe(r,"--wp--custom--","--");l.length>0&&i.push(...l),i.length>0&&(o+=`${a}{${i.join(";")};}`)})),o};function mMe(e,t){return dMe(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return GD.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,Ht.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>gs((0,Bt.createElement)(Oae,{preset:e,key:e.slug})))))).join("")}))}(t)}))}const MMe=(e,t)=>{const n={};return e.forEach((e=>{var o,r,a,i;const l=e.name,s=vae(e);let c=vae(e,"filter.duotone");if(!c){const t=vae(e),n=Ba(e,"color.__experimentalDuotone",!1);c=n&&eI(t,n)}const u=!(null==e||null===(o=e.supports)||void 0===o||!o.__experimentalLayout),p=null==e||null===(r=e.supports)||void 0===r||null===(a=r.spacing)||void 0===a||null===(i=a.blockGap)||void 0===i?void 0:i.__experimentalDefault,d=t(l),b={};null!=d&&d.length&&d.forEach((e=>{const t=`.is-style-${e.name}${s}`;b[e.name]=t}));const m=((e,t)=>{if(!(0,Ht.isEmpty)(null==e?void 0:e.selectors))return e.selectors;const n={root:t};return Object.entries(oMe).forEach((t=>{let[o,r]=t;const a=vae(e,o);a&&(n[r]=a)})),n})(e,s);n[l]={duotoneSelector:c,fallbackGapValue:p,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:u,name:l,selector:s,styleVariationSelectors:Object.keys(b).length?b:void 0}})),n};const zMe=(e,t)=>{let n="";return e.split("&").forEach((e=>{n+=e.includes("{")?t+e:t+"{"+e+"}"})),n};function fMe(){let{merged:e}=(0,Bt.useContext)(tI);const[t]=aI("spacing.blockGap"),n=null!==t,o=!n,r=fp((e=>{const{getSettings:t}=e(wN);return!!t().disableLayoutStyles})),a=fp((e=>e(kl).getBlockStyles),[]);return(0,Bt.useMemo)((()=>{var t,i,l;if(null===(t=e)||void 0===t||!t.styles||null===(i=e)||void 0===i||!i.settings)return[];e=function(e){var t,n,o,r,a,i,l,s,c,u,p,d;return!(null===(t=e.styles)||void 0===t||null===(n=t.blocks)||void 0===n?void 0:n["core/separator"])||!(null===(o=e.styles)||void 0===o||null===(r=o.blocks)||void 0===r||null===(a=r["core/separator"].color)||void 0===a?void 0:a.background)||null!==(i=e.styles)&&void 0!==i&&null!==(l=i.blocks)&&void 0!==l&&null!==(s=l["core/separator"].color)&&void 0!==s&&s.text||null!==(c=e.styles)&&void 0!==c&&null!==(u=c.blocks)&&void 0!==u&&null!==(p=u["core/separator"].border)&&void 0!==p&&p.color?e:{...e,styles:{...e.styles,blocks:{...e.styles.blocks,"core/separator":{...e.styles.blocks["core/separator"],color:{...e.styles.blocks["core/separator"].color,text:null===(d=e.styles)||void 0===d?void 0:d.blocks["core/separator"].color.background}}}}}}(e);const s=MMe(Ta(),a),c=bMe(e,s),u=function(e,t,n,o){var r,a;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const l=pMe(e,t),s=dMe(e,t),c=null==e||null===(r=e.settings)||void 0===r?void 0:r.useRootPaddingAwareAlignments,{contentSize:u,wideSize:p}=(null==e||null===(a=e.settings)||void 0===a?void 0:a.layout)||{};let d="body {margin: 0;";if(u&&(d+=` --wp--style--global--content-size: ${u};`),p&&(d+=` --wp--style--global--wide-size: ${p};`),c&&(d+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }\n\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }\n\t\t\t.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;"),d+="}",l.forEach((t=>{let{selector:r,duotoneSelector:a,styles:l,fallbackGapValue:s,hasLayoutSupport:u,featureSelectors:p,styleVariationSelectors:b}=t;if(p){const e=sMe(p,l);Object.entries(e).forEach((e=>{let[t,n]=e;if(n.length){const e=n.join(";");d+=`${t}{${e}}`}}))}b&&Object.entries(b).forEach((t=>{var n;let[o,r]=t;if(null!=l&&null!==(n=l.variations)&&void 0!==n&&n[o]){var a;if(p){var i;const e=sMe(p,null==l||null===(i=l.variations)||void 0===i?void 0:i[o]);Object.entries(e).forEach((e=>{let[t,n]=e;if(n.length){const e=lMe(t,r),o=n.join(";");d+=`${e}{${o}}`}}))}const t=cMe(null==l||null===(a=l.variations)||void 0===a?void 0:a[o],r,c,e);t.length&&(d+=`${r}{${t.join(";")}}`)}}));const m={};if(null!=l&&l.filter&&(m.filter=l.filter,delete l.filter),a){const e=cMe(m);e.length>0&&(d+=`${a}{${e.join(";")};}`)}i||$D!==r&&!u||(d+=uMe({tree:e,style:l,selector:r,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:s}));const M=cMe(l,r,c,e);null!=M&&M.length&&(d+=`${r}{${M.join(";")};}`);const z=Object.entries(l).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=z&&z.length&&z.forEach((e=>{let[t,n]=e;const o=cMe(n);if(null==o||!o.length)return;const a=`${r.split(",").map((e=>e+t)).join(",")}{${o.join(";")};}`;d+=a}))})),d+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",d+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",d+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",n){var b,m;const t=AD(null==e||null===(b=e.styles)||void 0===b||null===(m=b.spacing)||void 0===m?void 0:m.blockGap)||"0.5em";d+=`:where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,d+=":where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }",d+=":where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }"}return s.forEach((e=>{let{selector:t,presets:n}=e;$D===t&&(t="");const o=aMe(t,n);(0,Ht.isEmpty)(o)||(d+=o)})),d}(e,s,n,o,r),p=mMe(e,s),d=[{css:c,isGlobalStyles:!0},{css:u,isGlobalStyles:!0},{css:null!==(l=e.styles.css)&&void 0!==l?l:"",isGlobalStyles:!0},{assets:p,__unstableType:"svg",isGlobalStyles:!0}];return Ta().forEach((t=>{var n;if(null!==(n=e.styles.blocks[t.name])&&void 0!==n&&n.css){var o;const n=s[t.name].selector;d.push({css:zMe(null===(o=e.styles.blocks[t.name])||void 0===o?void 0:o.css,n),isGlobalStyles:!0})}})),[d,e.settings]}),[n,o,e,r])}const hMe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"}));function gMe(e){return OMe(e)}function OMe(e){return!(null==e||!e.shadow)}function vMe(e){let{resetAllFilter:t,onChange:n,value:o,panelId:r,children:a}=e;return(0,Bt.createElement)(ZX,{label:gr("Effects"),resetAll:()=>{const e=t(o);n(e)},panelId:r},a)}const AMe={shadow:!0};function yMe(e){let{as:t=vMe,value:n,onChange:o,inheritedValue:r=n,settings:a,panelId:i,defaultControls:l=AMe}=e;const s=OMe(a),c=(u=null==r?void 0:r.shadow,QD({settings:a},"",u));var u;const p=e=>{o(pI(n,["shadow"],e))},d=(0,Bt.useCallback)((e=>({...e,shadow:void 0})),[]);return(0,Bt.createElement)(t,{resetAllFilter:d,value:n,onChange:o,panelId:i},s&&(0,Bt.createElement)(s6,{label:gr("Shadow"),hasValue:()=>!(null==n||!n.shadow),onDeselect:()=>p(void 0),isShownByDefault:l.shadow,panelId:i},(0,Bt.createElement)(rQ,{isBordered:!0,isSeparated:!0},(0,Bt.createElement)(_Me,{shadow:c,onShadowChange:p,settings:a}))))}const _Me=e=>{let{shadow:t,onShadowChange:n,settings:o}=e;return(0,Bt.createElement)(BW,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles-effects-panel__shadow-dropdown",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;const o={onClick:t,className:eM()({"is-open":n}),"aria-expanded":n};return(0,Bt.createElement)(bE,o,(0,Bt.createElement)(lD,{justify:"flex-start"},(0,Bt.createElement)(AF,{className:"block-editor-global-styles-effects-panel__toggle-icon",icon:hMe,size:24}),(0,Bt.createElement)(cT,null,gr("Shadow"))))},renderContent:()=>(0,Bt.createElement)(T9,{paddingSize:"medium"},(0,Bt.createElement)(qMe,{shadow:t,onShadowChange:n,settings:o}))})};function qMe(e){var t,n,o,r,a;let{shadow:i,onShadowChange:l,settings:s}=e;const c=null==s||null===(t=s.shadow)||void 0===t||null===(n=t.presets)||void 0===n?void 0:n.default,u=null==s||null===(o=s.shadow)||void 0===o||null===(r=o.presets)||void 0===r?void 0:r.theme,p=[...(null==s||null===(a=s.shadow)||void 0===a?void 0:a.defaultPresets)?c:[],...u||[]];return(0,Bt.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-popover-container"},(0,Bt.createElement)($Q,{spacing:4},(0,Bt.createElement)(RX,{level:5},gr("Shadow")),(0,Bt.createElement)(kMe,{presets:p,activeShadow:i,onSelect:l})))}function kMe(e){let{presets:t,activeShadow:n,onSelect:o}=e;return t?(0,Bt.createElement)(JX,{columns:6,gap:0,align:"center",justify:"center"},t.map((e=>{let{name:t,slug:r,shadow:a}=e;return(0,Bt.createElement)(wMe,{key:r,label:t,isActive:a===n,onSelect:()=>o(a===n?void 0:a),shadow:a})}))):null}function wMe(e){let{label:t,isActive:n,onSelect:o,shadow:r}=e;return(0,Bt.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-indicator-wrapper"},(0,Bt.createElement)(bE,{className:"block-editor-global-styles-effects-panel__shadow-indicator",onClick:o,label:t,style:{boxShadow:r},showTooltip:!0},n&&(0,Bt.createElement)(AF,{icon:xX})))}const EMe=[];function WMe(e,t){var n,o,r,a,i,l,s;let{presetSetting:c,defaultSetting:u}=t;const p=!(null!=e&&null!==(n=e.color)&&void 0!==n&&n[u]),d=(null==e||null===(o=e.color)||void 0===o||null===(r=o[c])||void 0===r?void 0:r.custom)||EMe,b=(null==e||null===(a=e.color)||void 0===a||null===(i=a[c])||void 0===i?void 0:i.theme)||EMe,m=(null==e||null===(l=e.color)||void 0===l||null===(s=l[c])||void 0===s?void 0:s.default)||EMe;return(0,Bt.useMemo)((()=>[...d,...b,...p?EMe:m]),[p,d,b,m])}function LMe(e){return xMe(e)}function xMe(e){return e.color.customDuotone||e.color.defaultDuotone}function CMe(e){let{resetAllFilter:t,onChange:n,value:o,panelId:r,children:a}=e;return(0,Bt.createElement)(ZX,{label:gr("Filters"),resetAll:()=>{const e=t(o);n(e)},panelId:r},a)}const RMe={duotone:!0};function SMe(e){var t;let{as:n=CMe,value:o,onChange:r,inheritedValue:a=o,settings:i,panelId:l,defaultControls:s=RMe}=e;const c=xMe(i),u=WMe(i,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),p=WMe(i,{presetSetting:"palette",defaultSetting:"defaultPalette"}),d=(b=null==a||null===(t=a.filter)||void 0===t?void 0:t.duotone,QD({settings:i},"",b));var b;const m=e=>{const t=u.find((t=>{let{colors:n}=t;return n===e})),n=t?`var:preset|duotone|${t.slug}`:e;r(pI(o,["filter","duotone"],n))},M=(0,Bt.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,Bt.createElement)(n,{resetAllFilter:M,value:o,onChange:r,panelId:l},c&&(0,Bt.createElement)(s6,{label:gr("Duotone"),hasValue:()=>{var e;return!(null==o||null===(e=o.filter)||void 0===e||!e.duotone)},onDeselect:()=>m(void 0),isShownByDefault:s.duotone,panelId:l},(0,Bt.createElement)($Q,null,(0,Bt.createElement)("p",null,gr("Create a two-tone color effect without losing your original image.")),(0,Bt.createElement)(mae,{colorPalette:p,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:d,onChange:m}))))}const NMe=["core/navigation-link/page","core/navigation-link"],TMe=(0,Bt.forwardRef)(((e,t)=>{let{nestingLevel:n,blockCount:o,clientId:r,...a}=e;const[i,l]=(0,Bt.useState)(null),s=Tz(TMe),{hideInserter:c}=fp((e=>{const{getTemplateLock:t,__unstableGetEditorMode:n}=e(wN);return{hideInserter:!!t(r)||"zoom-out"===n()}}),[r]),u=W1({clientId:r,context:"list-view"}),p=W1({clientId:null==i?void 0:i.clientId,context:"list-view"});(0,Bt.useEffect)((()=>{null!=p&&p.length&&vx(lr(gr("%s block inserted"),p),"assertive")}),[p]);const d=(0,Bt.useCallback)((e=>(e.sort(((e,t)=>{let{id:n}=e,{id:o}=t,r=NMe.indexOf(n),a=NMe.indexOf(o);return r<0&&(r=NMe.length),a<0&&(a=NMe.length),r-a})),e)),[]);if(c)return null;const{PrivateInserter:b}=qN(Jze),m=`off-canvas-editor-appender__${s}`,M=lr(gr("Append to %1$s block at position %2$d, Level %3$d"),u,o+1,n);return(0,Bt.createElement)("div",{className:"offcanvas-editor-appender"},(0,Bt.createElement)(b,Pt({ref:t,rootClientId:r,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:!1,__experimentalIsQuick:!0},a,{toggleProps:{"aria-describedby":m},onSelectOrClose:e=>{null!=e&&e.clientId&&l(e)},orderInitialBlockItems:d})),(0,Bt.createElement)("div",{className:"offcanvas-editor-appender__description",id:m},M))})),BMe=LG(uce);function DMe(e){let{isSelected:t,position:n,level:o,rowCount:r,children:a,className:i,path:l,...s}=e;const c=RG({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:l});return(0,Bt.createElement)(BMe,Pt({ref:c,className:eM()("block-editor-list-view-leaf","offcanvas-editor-list-view-leaf",i),level:o,positionInSet:n,setSize:r},s),a)}function IMe(e){let{onClick:t}=e;return(0,Bt.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,Bt.createElement)(AF,{icon:Ar()?Ace:xie}))}const PMe=(0,Bt.forwardRef)((function(e,t){let{className:n,block:o,onClick:r,onToggleExpanded:a,tabIndex:i,onFocus:l,onDragStart:s,onDragEnd:c,draggable:u}=e;const{clientId:p}=o,d=E1(p),b=W1({clientId:p,context:"list-view"}),{isLocked:m}=a3(p),M=d?lr(gr("Edit %s block"),d.title):gr("Edit");return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(bE,{className:eM()("block-editor-list-view-block-select-button",n),onClick:r,onKeyDown:function(e){e.keyCode!==cq&&32!==e.keyCode||r(e)},ref:t,tabIndex:i,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:u,href:`#block-${p}`,"aria-hidden":!0,title:M},(0,Bt.createElement)(IMe,{onClick:a}),(0,Bt.createElement)(IK,{icon:null==d?void 0:d.icon,showColors:!0,context:"list-view"}),(0,Bt.createElement)(lD,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,Bt.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,Bt.createElement)(AZ,{ellipsizeMode:"auto"},b)),(null==d?void 0:d.anchor)&&(0,Bt.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,Bt.createElement)(AZ,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},d.anchor)),m&&(0,Bt.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,Bt.createElement)(AF,{icon:vce})))))}));function HMe(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{}}}function FMe(e){let{clientId:t}=e;const{getBlock:n,blockTransforms:o}=fp((e=>{const{getBlock:n,getBlockRootClientId:o,getBlockTransformItems:r}=e(wN);return{getBlock:n,blockTransforms:r(n(t),o(t))}}),[t]),{replaceBlock:r}=Lm(wN),a=["core/page-list","core/site-logo","core/social-links","core/search"],i=o.filter((e=>a.includes(e.name)));return null!=i&&i.length&&t?(0,Bt.createElement)("div",{className:"link-control-transform"},(0,Bt.createElement)("h3",{className:"link-control-transform__subheading"},gr("Transform")),(0,Bt.createElement)("div",{className:"link-control-transform__items"},i.map((e=>(0,Bt.createElement)(bE,{key:`transform-${e.name}`,onClick:()=>r(t,si(n(t),e.name)),className:"link-control-transform__item"},(0,Bt.createElement)(IK,{icon:e.icon}),e.title))))):null}function YMe(e){const{label:t,url:n,opensInNewTab:o,type:r,kind:a}=e.link,i={url:n,opensInNewTab:o,title:t&&aa(t)};return(0,Bt.createElement)(gw,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,Bt.createElement)(tce,{hasTextControl:!0,hasRichPreviews:!0,className:e.className,value:i,showInitialSuggestions:!0,withCreateSuggestion:e.hasCreateSuggestion,noDirectEntry:!!r,noURLSuggestion:!!r,suggestionsQuery:HMe(r,a),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:n?null:()=>(0,Bt.createElement)(FMe,{clientId:e.clientId})}))}const XMe=(0,Bt.createContext)({}),jMe=()=>(0,Bt.useContext)(XMe),VMe=["core/navigation-link","core/navigation-submenu"],UMe=(0,Bt.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:a,position:i,siblingBlockCount:l,level:s,isExpanded:c,selectedClientIds:u,...p}=e;const{clientId:d}=r,[b,m]=(0,Bt.useState)(),{blockMovingClientId:M,selectedBlockInBlockEditor:z,lastInsertedBlockClientId:f}=fp((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n,getLastInsertedBlocksClientIds:o}=qN(e(wN)),r=o();return{blockMovingClientId:t(),selectedBlockInBlockEditor:n(),lastInsertedBlockClientId:r&&r[0]}}),[d]),{insertedBlockAttributes:h,insertedBlockName:g,setInsertedBlockAttributes:O}=(e=>{const{insertedBlockAttributes:t,insertedBlockName:n}=fp((t=>{const{getBlockName:n,getBlockAttributes:o}=t(wN);return{insertedBlockAttributes:o(e),insertedBlockName:n(e)}}),[e]),{updateBlockAttributes:o}=Lm(wN),r=t=>{e&&o(e,t)};return e?{insertedBlockAttributes:t,insertedBlockName:n,setInsertedBlockAttributes:r}:{insertedBlockAttributes:void 0,insertedBlockName:void 0,setInsertedBlockAttributes:r}})(f),v=null==h?void 0:h.url;(0,Bt.useEffect)((()=>{d===f&&null!=VMe&&VMe.includes(g)&&!v&&m(!0)}),[f,d,g,v]);const{renderAdditionalBlockUI:A}=jMe(),y=M&&z===d,_=eM()("block-editor-list-view-block-contents",{"is-dropping-before":y}),q=u.includes(d)?u:[d];return(0,Bt.createElement)(Bt.Fragment,null,A&&A(r),b&&(0,Bt.createElement)(YMe,{clientId:f,link:h,onClose:()=>m(!1),hasCreateSuggestion:!1,onChange:e=>{!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{label:o="",kind:r="",type:a=""}=n,{title:i="",url:l="",opensInNewTab:s,id:c,kind:u=r,type:p=a}=e,d=i.replace(/http(s?):\/\//gi,""),b=l.replace(/http(s?):\/\//gi,""),m=i&&i!==o&&d!==b?$l(i):o||$l(b),M="post_tag"===p?"tag":p.replace("-","_"),z=["post","page","tag","category"].indexOf(M)>-1,f=!u&&!z||"custom"===u?"custom":u;t({...l&&{url:encodeURI(pse(l))},...m&&{label:m},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...f&&{kind:f},...M&&"URL"!==M&&{type:M}})}(e,O,h),m(!1)},onCancel:()=>m(!1)}),(0,Bt.createElement)(x1,{clientIds:q},(e=>{let{draggable:u,onDragStart:d,onDragEnd:b}=e;return(0,Bt.createElement)(PMe,Pt({ref:t,className:_,block:r,onClick:n,onToggleExpanded:o,isSelected:a,position:i,siblingBlockCount:l,level:s,draggable:u,onDragStart:d,onDragEnd:b,isExpanded:c},p))})))})),$Me=UMe;const GMe=(0,Bt.memo)((function e(t){let{block:{clientId:n},isDragged:o,isSelected:r,isBranchSelected:a,selectBlock:i,position:l,level:s,rowCount:c,siblingBlockCount:u,showBlockMovers:p,path:d,isExpanded:b,selectedClientIds:m,preventAnnouncement:M}=t;const z=(0,Bt.useRef)(null),[f,h]=(0,Bt.useState)(!1),{isLocked:g,isContentLocked:O}=a3(n),v=fp((e=>!r&&(!!O&&e(wN).hasSelectedInnerBlock(n,!0))),[O,n,r]),A=v||r&&m[0]===n,y=v||r&&m[m.length-1]===n,{toggleBlockHighlight:_}=Lm(wN),q=E1(n),k=fp((e=>e(wN).getBlock(n)),[n]);(0,Bt.useEffect)((()=>{!x&&r&&z.current.focus()}),[]);const w=(0,Bt.useCallback)((()=>{h(!0),_(n,!0)}),[n,h,_]),E=(0,Bt.useCallback)((()=>{h(!1),_(n,!1)}),[n,h,_]),W=(0,Bt.useCallback)((e=>{i(e,n),e.preventDefault()}),[n,i]),L=(0,Bt.useCallback)((e=>{i(void 0,e)}),[i]),{isTreeGridMounted:x,expand:C,collapse:R,LeafMoreMenu:S}=jMe(),N=(0,Bt.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?R(n):!1===b&&C(n)}),[n,C,R,b]),T=Tz(e);if(!k)return null;const B=!!k&&Da(k.name,"__experimentalToolbar",!0),D=`list-view-block-select-button__${T}`,I=((e,t,n)=>lr(gr("Block %1$d of %2$d, Level %3$d"),e,t,n))(l,u,s);let P=gr("Link");q&&(P=lr(gr(g?"%s link (locked)":"%s link"),q.title));const H=q?lr(gr("Options for %s block"),q.title):gr("Options"),F=p&&u>0,Y=eM()("block-editor-list-view-block__mover-cell",{"is-visible":f||r}),X=eM()("block-editor-list-view-block__menu-cell",{"is-visible":f||A});let j;F?j=1:B||(j=2);const V=eM()({"is-selected":r||v,"is-first-selected":A,"is-last-selected":y,"is-branch-selected":a,"is-dragging":o,"has-single-cell":!B}),U=m.includes(n)?m:[n],$=S||A3;return(0,Bt.createElement)(DMe,{className:V,onMouseEnter:w,onMouseLeave:E,onFocus:w,onBlur:E,level:s,position:l,rowCount:c,path:d,id:`list-view-block-${n}`,"data-block":n,isExpanded:O?void 0:b,"aria-selected":!!r||v},(0,Bt.createElement)(zce,{className:"block-editor-list-view-block__contents-cell",colSpan:j,ref:z,"aria-label":P,"aria-selected":!!r||v,"aria-expanded":O?void 0:b,"aria-describedby":D},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,Bt.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,Bt.createElement)($Me,{block:k,onClick:W,onToggleExpanded:N,isSelected:r,position:l,siblingBlockCount:u,level:s,ref:t,tabIndex:n,onFocus:o,isExpanded:b,selectedClientIds:m,preventAnnouncement:M}),(0,Bt.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:D},I))})),F&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(zce,{className:Y,withoutGridItem:!0},(0,Bt.createElement)(mce,null,(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,Bt.createElement)(B1,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:o,onFocus:r})})),(0,Bt.createElement)(mce,null,(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,Bt.createElement)(D1,{orientation:"vertical",clientIds:[n],ref:t,tabIndex:o,onFocus:r})})))),B&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(zce,{className:X,"aria-selected":!!r||v},(e=>{let{ref:t,tabIndex:o,onFocus:r}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)($,{clientIds:U,block:k,clientId:n,icon:CX,label:H,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:o,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L}))}))))}));function KMe(e,t,n,o){var r;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(JMe(t,n,o),0):1}const JMe=(e,t,n)=>(o,r)=>{var a;if(null==t?void 0:t.includes(r.clientId))return o;return(null!==(a=e[r.clientId])&&void 0!==a?a:n)&&r.innerBlocks.length>0?o+KMe(r,e,t,n):o+1},ZMe=()=>{};const QMe=(0,Bt.memo)((function e(t){const{blocks:n,selectBlock:o=ZMe,showBlockMovers:r,selectedClientIds:a,level:i=1,path:l="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:u,isExpanded:p,parentId:d,shouldShowInnerBlocks:b=!0,showAppender:m=!0}=t,M=fp((e=>!(!d||"contentOnly"!==e(wN).getTemplateLock(d))),[d]),{expandedState:z,draggedClientIds:f}=jMe();if(M)return null;const h=m&&1===i,g=n.filter(Boolean),O=g.length,v=h?O+1:O;let A=c;return(0,Bt.createElement)(Bt.Fragment,null,g.map(((t,n)=>{var c;const{clientId:d,innerBlocks:M}=t;n>0&&(A+=KMe(g[n-1],z,f,p));const{itemInView:h}=u,y=h(A),_=n+1,q=l.length>0?`${l}_${_}`:`${_}`,k=!(null==M||!M.length),w=k&&b?null!==(c=z[d])&&void 0!==c?c:p:void 0,E=!(null==f||!f.includes(d)),W=E||y,L=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(d,a),x=s||L&&k;return(0,Bt.createElement)(bp,{key:d,value:!L},W&&(0,Bt.createElement)(GMe,{block:t,selectBlock:o,isSelected:L,isBranchSelected:x,isDragged:E,level:i,position:_,rowCount:v,siblingBlockCount:O,showBlockMovers:r,path:q,isExpanded:w,listPosition:A,selectedClientIds:a}),!W&&(0,Bt.createElement)("tr",null,(0,Bt.createElement)("td",{className:"block-editor-list-view-placeholder"})),k&&w&&!E&&(0,Bt.createElement)(e,{parentId:d,blocks:M,selectBlock:o,showBlockMovers:r,level:i+1,path:q,listPosition:A+1,fixedListWindow:u,isBranchSelected:x,selectedClientIds:a,isExpanded:p,showAppender:m}))})),h&&(0,Bt.createElement)(uce,{level:i,setSize:v,positionInSet:v,isExpanded:!0},(0,Bt.createElement)(zce,null,(e=>(0,Bt.createElement)(TMe,Pt({clientId:d,nestingLevel:i,blockCount:O},e))))))}));function eze(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:a}=n||{},[i,l]=(0,Bt.useMemo)((()=>{if(!t.current)return[];return[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]}),[o,r]),s=l||i,c=(0,Bt.useCallback)((()=>{if(!i)return 0;const e=s.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,s]),u=(0,Bt.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),p=(0,Bt.useMemo)((()=>{if(s&&("top"===a||"bottom"===a||"inside"===a))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,o=e.right;let r=0,i=0;"top"===a?(r=e.top,i=e.top):(r=e.bottom,i=e.bottom);const l=o-n,u=i-r;return new window.DOMRect(n,r,l,u)}}}),[s,a,c]);return s?(0,Bt.createElement)(gw,{animate:!1,anchor:p,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,Bt.createElement)("div",{style:u,className:"block-editor-list-view-drop-indicator__line"})):null}function tze(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=Lm(wN),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:a,getBlockSelectionEnd:i,getSelectedBlockClientIds:l,hasMultiSelection:s,hasSelectedBlock:c}=fp(wN),{getBlockType:u}=fp(kl),p=(0,Bt.useCallback)((async(i,p,d)=>{if(null==i||!i.shiftKey)return void n(p);i.preventDefault();const b="keydown"===i.type&&(i.keyCode===mq||i.keyCode===zq||i.keyCode===dq||i.keyCode===pq);if(!b&&!c()&&!s())return void n(p,null);const m=l(),M=[...r(p),p];b&&!m.some((e=>M.includes(e)))&&await e();let z=a(),f=p;b&&(c()||s()||(z=p),d&&(f=d));const h=r(z),g=r(f),{start:O,end:v}=function(e,t,n,o){const r=[...n,e],a=[...o,t],i=Math.min(r.length,a.length)-1;return{start:r[i],end:a[i]}}(z,f,h,g);await t(O,v,null);const A=l();if((i.keyCode===dq||i.keyCode===pq)&&A.length>1)return;const y=m.filter((e=>!A.includes(e)));let _;if(1===y.length){var q;const e=null===(q=u(o(y[0])))||void 0===q?void 0:q.title;e&&(_=lr(gr("%s deselected."),e))}else y.length>1&&(_=lr(gr("%s blocks deselected."),y.length));_&&vx(_)}),[e,o,u,r,a,i,l,s,c,t,n]);return{updateBlockSelection:p}}const nze=["top","bottom"];function oze(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=fp(wN),[a,i]=(0,Bt.useState)(),{rootClientId:l,blockIndex:s}=a||{},c=L5(l,s),u=o(),p=_5((0,Bt.useCallback)(((o,a)=>{const l={x:o.clientX,y:o.clientY},s=!(null==u||!u.length),c=function(e,t){let n,o,r,a;for(const i of e){if(i.isDraggedBlock)continue;const l=i.element.getBoundingClientRect(),[s,c]=C5(t,l,nze),u=R5(t,l);if(void 0===r||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,a)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const l=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+l,dropPosition:n}}(Array.from(a.querySelectorAll("[data-block]")).map((o=>{const a=o.dataset.block,i=e(a);return{clientId:a,rootClientId:i,blockIndex:t(a),element:o,isDraggedBlock:!!s&&u.includes(a),innerBlockCount:n(a),canInsertDraggedBlocksAsSibling:!s||r(u,i),canInsertDraggedBlocksAsChild:!s||r(u,a)}})),l);c&&i(c)}),[u]),200);return{ref:k5({onDrop:c,onDragOver(e){p(e,e.currentTarget)},onDragEnd(){p.cancel(),i(null)}}),target:a}}const rze=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const aze=(0,Bt.forwardRef)((function(e,t){let{id:n,parentClientId:o,blocks:r,showBlockMovers:a=!1,isExpanded:i=!1,showAppender:l=!0,LeafMoreMenu:s,description:c=gr("Block navigation structure"),onSelect:u,renderAdditionalBlockUI:p}=e;const{getBlock:d}=fp(wN),{clientIdsTree:b,draggedClientIds:m,selectedClientIds:M}=function(e){return fp((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(wN);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(r),{visibleBlockCount:z,shouldShowInnerBlocks:f}=fp((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:o}=e(wN),r=(null==m?void 0:m.length)>0?n(m).length+1:0;return{visibleBlockCount:t()-r,shouldShowInnerBlocks:"zoom-out"!==o()}}),[m,r]),{updateBlockSelection:h}=tze(),[g,O]=(0,Bt.useReducer)(rze,{}),{ref:v,target:A}=oze(),y=(0,Bt.useRef)(),_=Hz([y,v,t]),q=(0,Bt.useRef)(!1),{setSelectedTreeId:k}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[o,r]=(0,Bt.useState)(null),{selectedBlockParentClientIds:a}=fp((e=>{const{getBlockParents:n}=e(wN);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(a)&&a.length?a:null;return(0,Bt.useEffect)((()=>{o!==t&&i&&n({type:"expand",clientIds:a})}),[t]),{setSelectedTreeId:r}}({firstSelectedBlockClientId:M[0],setExpandedState:O}),w=(0,Bt.useCallback)(((e,t)=>{h(e,t),k(t),u&&u(d(t))}),[k,h,u,d]);(0,Bt.useEffect)((()=>{q.current=!0}),[]);const[E]=nce(y,36,z,{useWindowing:!0,windowOverscan:40}),W=(0,Bt.useCallback)((e=>{e&&O({type:"expand",clientIds:[e]})}),[O]),L=(0,Bt.useCallback)((e=>{e&&O({type:"collapse",clientIds:[e]})}),[O]),x=(0,Bt.useCallback)((e=>{var t;W(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[W]),C=(0,Bt.useCallback)((e=>{var t;L(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[L]),R=(0,Bt.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&h(e,null==t||null===(o=t.dataset)||void 0===o?void 0:o.block,null==n||null===(r=n.dataset)||void 0===r?void 0:r.block)}),[h]),S=(0,Bt.useMemo)((()=>({isTreeGridMounted:q.current,draggedClientIds:m,expandedState:g,expand:W,collapse:L,LeafMoreMenu:s,renderAdditionalBlockUI:p})),[q.current,m,g,W,L,s,p]);return(0,Bt.createElement)(bp,{value:!0},(0,Bt.createElement)(eze,{listViewRef:y,blockDropTarget:A}),(0,Bt.createElement)("div",{className:"offcanvas-editor-list-view-tree-wrapper"},(0,Bt.createElement)(sce,{id:n,className:"block-editor-list-view-tree","aria-label":gr("Block navigation structure"),ref:_,onCollapseRow:C,onExpandRow:x,onFocusRow:R,"aria-description":c},(0,Bt.createElement)(XMe.Provider,{value:S},(0,Bt.createElement)(QMe,{parentId:o,blocks:b,selectBlock:w,showBlockMovers:a,fixedListWindow:E,selectedClientIds:M,isExpanded:i,shouldShowInnerBlocks:f,showAppender:l}),(0,Bt.createElement)(uce,{level:1,setSize:1,positionInSet:1,isExpanded:!0},!b.length&&(0,Bt.createElement)(zce,{withoutGridItem:!0},(0,Bt.createElement)("div",{className:"offcanvas-editor-list-view-is-empty"},gr("Your menu is currently empty. Add your first menu item to get started."))))))))})),ize=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})),lze={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"},sze=["core/navigation-link","core/navigation-submenu"];function cze(e){let{block:t,onClose:n}=e;const{expandedState:o,expand:r}=jMe(),{insertBlock:a,replaceBlock:i,replaceInnerBlocks:l}=Lm(wN),s=t.clientId,c=!sze.includes(t.name);return(0,Bt.createElement)(HN,{icon:ize,disabled:c,onClick:()=>{const e=Ja("core/navigation-link");if("core/navigation-submenu"===t.name)a(e,t.innerBlocks.length,s,false);else{const n=Ja("core/navigation-submenu",t.attributes,t.innerBlocks);i(s,n),l(n.clientId,[e],false)}o[t.clientId]||r(t.clientId),n()}},gr("Add submenu link"))}var uze=function(){var e=function(t,n){return e=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,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pze=function(){return pze=Object.assign||function(e){for(var t,n=1,o=arguments.length;n{},Cze={bottom:"bottom",corner:"corner"};function Rze(e){let{axis:t,fadeTimeout:n=180,onResize:o=xze,position:r=Cze.bottom,showPx:a=!1}=e;const[i,l]=yB(),s=!!t,[c,u]=(0,Bt.useState)(!1),[p,d]=(0,Bt.useState)(!1),{width:b,height:m}=l,M=(0,Bt.useRef)(m),z=(0,Bt.useRef)(b),f=(0,Bt.useRef)(),h=(0,Bt.useCallback)((()=>{f.current&&window.clearTimeout(f.current),f.current=window.setTimeout((()=>{s||(u(!1),d(!1))}),n)}),[n,s]);(0,Bt.useEffect)((()=>{if(!(null!==b||null!==m))return;const e=b!==z.current,t=m!==M.current;if(e||t){if(b&&!z.current&&m&&!M.current)return z.current=b,void(M.current=m);e&&(u(!0),z.current=b),t&&(d(!0),M.current=m),o({width:b,height:m}),h()}}),[b,m,o,h]);const g=function(e){let{axis:t,height:n,moveX:o=!1,moveY:r=!1,position:a=Cze.bottom,showPx:i=!1,width:l}=e;if(!o&&!r)return;if(a===Cze.corner)return`${l} x ${n}`;const s=i?" px":"";if(t){if("x"===t&&o)return`${l}${s}`;if("y"===t&&r)return`${n}${s}`}if(o&&r)return`${l} x ${n}`;if(o)return`${l}${s}`;if(r)return`${n}${s}`;return}({axis:t,height:m,moveX:c,moveY:p,position:r,showPx:a,width:b});return{label:g,resizeListener:i}}const Sze=lE("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),Nze=lE("div",{target:"e1wq7y4k2"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),Tze=lE("div",{target:"e1wq7y4k1"})("background:",gT.gray[900],";border-radius:2px;box-sizing:border-box;font-family:",pT("default.fontFamily"),";font-size:12px;color:",gT.ui.textDark,";padding:4px 8px;position:relative;"),Bze=lE(kP,{target:"e1wq7y4k0"})("&&&{color:",gT.ui.textDark,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const Dze=(0,Bt.forwardRef)((function(e,t){let{label:n,position:o=Cze.corner,zIndex:r=1e3,...a}=e;const i=!!n,l=o===Cze.bottom,s=o===Cze.corner;if(!i)return null;let c={opacity:i?1:void 0,zIndex:r},u={};return l&&(c={...c,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},u={transform:"translate(0, 100%)"}),s&&(c={...c,position:"absolute",top:4,right:Ar()?void 0:4,left:Ar()?4:void 0}),(0,Bt.createElement)(Nze,Pt({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:t,style:c},a),(0,Bt.createElement)(Tze,{className:"components-resizable-tooltip__tooltip",style:u},(0,Bt.createElement)(Bze,{as:"span"},n)))})),Ize=Dze,Pze=()=>{};const Hze=(0,Bt.forwardRef)((function(e,t){let{axis:n,className:o,fadeTimeout:r=180,isVisible:a=!0,labelRef:i,onResize:l=Pze,position:s=Cze.bottom,showPx:c=!0,zIndex:u=1e3,...p}=e;const{label:d,resizeListener:b}=Rze({axis:n,fadeTimeout:r,onResize:l,showPx:c,position:s});if(!a)return null;const m=Sz()("components-resize-tooltip",o);return(0,Bt.createElement)(Sze,Pt({"aria-hidden":"true",className:m,ref:t},p),b,(0,Bt.createElement)(Ize,{"aria-hidden":p["aria-hidden"],label:d,position:s,ref:i,zIndex:u}))})),Fze=Hze,Yze="components-resizable-box__handle",Xze="components-resizable-box__side-handle",jze="components-resizable-box__corner-handle",Vze={top:Sz()(Yze,Xze,"components-resizable-box__handle-top"),right:Sz()(Yze,Xze,"components-resizable-box__handle-right"),bottom:Sz()(Yze,Xze,"components-resizable-box__handle-bottom"),left:Sz()(Yze,Xze,"components-resizable-box__handle-left"),topLeft:Sz()(Yze,jze,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:Sz()(Yze,jze,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:Sz()(Yze,jze,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:Sz()(Yze,jze,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},Uze={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},$ze={top:Uze,right:Uze,bottom:Uze,left:Uze,topLeft:Uze,topRight:Uze,bottomRight:Uze,bottomLeft:Uze};const Gze=(0,Bt.forwardRef)((function(e,t){let{className:n,children:o,showHandle:r=!0,__experimentalShowTooltip:a=!1,__experimentalTooltipProps:i={},...l}=e;return(0,Bt.createElement)(Lze,Pt({className:Sz()("components-resizable-box__container",r&&"has-show-handle",n),handleClasses:Vze,handleStyles:$ze,ref:t},l),o,a&&(0,Bt.createElement)(Fze,i))})),Kze=Gze;const Jze={};_N(Jze,{...k,ExperimentalBlockEditorProvider:jK,LeafMoreMenu:function(e){const{clientId:t,block:n}=e,{moveBlocksDown:o,moveBlocksUp:r,removeBlocks:a}=Lm(wN),i=lr(gr("Remove %s"),L1({clientId:t,maximumLength:25})),l=fp((e=>{const{getBlockRootClientId:n}=e(wN);return n(t)}),[t]);return(0,Bt.createElement)(VW,Pt({icon:CX,label:gr("Options"),className:"block-editor-block-settings-menu",popoverProps:lze,noIcons:!0},e),(e=>{let{onClose:s}=e;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(PN,null,(0,Bt.createElement)(HN,{icon:dX,onClick:()=>{r([t],l),s()}},gr("Move up")),(0,Bt.createElement)(HN,{icon:bX,onClick:()=>{o([t],l),s()}},gr("Move down")),(0,Bt.createElement)(cze,{block:n,onClose:s})),(0,Bt.createElement)(PN,null,(0,Bt.createElement)(HN,{onClick:()=>{a([t],!1),s()}},i)))}))},OffCanvasEditor:aze,PrivateInserter:s1,PrivateListView:Ice,ResizableBoxPopover:function(e){let{clientId:t,resizableBoxProps:n,...o}=e;return(0,Bt.createElement)(g1,Pt({clientId:t,__unstableCoverTarget:!0,__unstablePopoverSlot:"block-toolbar",shift:!1},o),(0,Bt.createElement)(Kze,n))}});const Zze={...JW,richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:void 0};function Qze(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const efe=Ko({postId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SETUP_EDITOR_STATE"===t.type?t.post.id:e},postType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SETUP_EDITOR_STATE"===t.type?t.post.type:e},saving:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},isReady:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zze,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:n,...o}=e;return o}}return e}});const tfe=new Set(["meta"]),nfe="SAVE_POST_NOTICE_ID",ofe="TRASH_POST_NOTICE_ID",rfe=/%(?:postname|pagename)%/,afe=["title","excerpt","content"],ife=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),lfe=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),sfe=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),cfe=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const ufe={},pfe=[],dfe=zn((e=>()=>e(Km).hasUndo())),bfe=zn((e=>()=>e(Km).hasRedo()));function mfe(e){return"auto-draft"===gfe(e).status}function Mfe(e){return"content"in _fe(e)}const zfe=zn((e=>t=>{const n=Ofe(t),o=vfe(t);return!!e(Km).hasEditsForEntityRecord("postType",n,o)})),ffe=zn((e=>t=>{const n=e(Km).__experimentalGetDirtyEntityRecords(),{type:o,id:r}=gfe(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==r))}));function hfe(e){return!zfe(e)&&mfe(e)}const gfe=zn((e=>t=>{const n=vfe(t),o=Ofe(t),r=e(Km).getRawEntityRecord("postType",o,n);return r||ufe}));function Ofe(e){return e.postType}function vfe(e){return e.postId}function Afe(e){var t,n,o,r;return null!==(t=null===(n=gfe(e)._links)||void 0===n||null===(o=n["version-history"])||void 0===o||null===(r=o[0])||void 0===r?void 0:r.count)&&void 0!==t?t:0}function yfe(e){var t,n,o,r;return null!==(t=null===(n=gfe(e)._links)||void 0===n||null===(o=n["predecessor-version"])||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id)&&void 0!==t?t:null}const _fe=zn((e=>t=>{const n=Ofe(t),o=vfe(t);return e(Km).getEntityRecordEdits("postType",n,o)||ufe}));function qfe(e,t){switch(t){case"type":return Ofe(e);case"id":return vfe(e);default:const n=gfe(e);if(!n.hasOwnProperty(t))break;return Qze(n[t])}}function kfe(e,t){if("content"===t)return Ufe(e);const n=_fe(e);return n.hasOwnProperty(t)?tfe.has(t)?((e,t)=>{const n=_fe(e);return n.hasOwnProperty(t)?{...qfe(e,t),...n[t]}:qfe(e,t)})(e,t):n[t]:qfe(e,t)}const wfe=zn((e=>(t,n)=>{var o;if(!afe.includes(n)&&"preview_link"!==n)return;const r=Ofe(t),a=vfe(t),i=null===(o=e(Km).getCurrentUser())||void 0===o?void 0:o.id,l=e(Km).getAutosave(r,a,i);return l?Qze(l[n]):void 0}));function Efe(e){if("private"===kfe(e,"status"))return"private";return kfe(e,"password")?"password":"public"}function Wfe(e){return"pending"===gfe(e).status}function Lfe(e,t){const n=t||gfe(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!Kie(new Date(Number(Jie(n.date))-6e4))}function xfe(e){return"future"===gfe(e).status&&!Lfe(e)}function Cfe(e){const t=gfe(e);return zfe(e)||-1===["publish","private","future"].indexOf(t.status)}function Rfe(e){return!Ife(e)&&(!!kfe(e,"title")||!!kfe(e,"excerpt")||!Sfe(e)||"native"===mL.OS)}function Sfe(e){const t=lhe(e);if(t.length){if(t.length>1)return!1;const e=t[0].name;if(e!==Sa()&&e!==Ea())return!1}return!Ufe(e)}const Nfe=zn((e=>t=>{var n;if(!Rfe(t))return!1;if(the(t))return!1;const o=Ofe(t),r=vfe(t),a=e(Km).hasFetchedAutosaves(o,r),i=null===(n=e(Km).getCurrentUser())||void 0===n?void 0:n.id,l=e(Km).getAutosave(o,r,i);return!!a&&(!l||(!!Mfe(t)||["title","excerpt"].some((e=>Qze(l[e])!==kfe(t,e)))))}));function Tfe(e){const t=kfe(e,"date");return Kie(new Date(Number(Jie(t))-6e4))}function Bfe(e){const t=kfe(e,"date"),n=kfe(e,"modified"),o=gfe(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===n||null===t)}function Dfe(e){return!!e.deleting.pending}const Ife=zn((e=>t=>{const n=Ofe(t),o=vfe(t);return e(Km).isSavingEntityRecord("postType",n,o)})),Pfe=zn((e=>t=>{const n=e(Km).__experimentalGetEntitiesBeingSaved(),{type:o,id:r}=gfe(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==r))})),Hfe=zn((e=>t=>{const n=Ofe(t),o=vfe(t);return!e(Km).getLastEntitySaveError("postType",n,o)})),Ffe=zn((e=>t=>{const n=Ofe(t),o=vfe(t);return!!e(Km).getLastEntitySaveError("postType",n,o)}));function Yfe(e){var t;return!!Ife(e)&&Boolean(null===(t=e.saving.options)||void 0===t?void 0:t.isAutosave)}function Xfe(e){var t;return!!Ife(e)&&Boolean(null===(t=e.saving.options)||void 0===t?void 0:t.isPreview)}function jfe(e){if(e.saving.pending||Ife(e))return;let t=wfe(e,"preview_link");t&&"draft"!==gfe(e).status||(t=kfe(e,"link"),t&&(t=Cp(t,{preview:!0})));const n=kfe(e,"featured_media");return t&&n?Cp(t,{_thumbnail_id:n}):t}function Vfe(e){const t=lhe(e);if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){var o;const e=null===(o=t[0].attributes)||void 0===o?void 0:o.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}const Ufe=zn((e=>t=>{const n=vfe(t),o=Ofe(t),r=e(Km).getEditedEntityRecord("postType",o,n);if(r){if("function"==typeof r.content)return r.content(r);if(r.blocks)return Ls(r.blocks);if(r.content)return r.content}return""}));function $fe(e){return Ife(e)&&!Lfe(e)&&"publish"===kfe(e,"status")}function Gfe(e){const t=kfe(e,"permalink_template");return rfe.test(t)}function Kfe(e){const t=Zfe(e);if(!t)return null;const{prefix:n,postName:o,suffix:r}=t;return Gfe(e)?n+o+r:n}function Jfe(e){return kfe(e,"slug")||function(e){return e?Ci()(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}(kfe(e,"title"))||vfe(e)}function Zfe(e){const t=kfe(e,"permalink_template");if(!t)return null;const n=kfe(e,"slug")||kfe(e,"generated_slug"),[o,r]=t.split(rfe);return{prefix:o,postName:n,suffix:r}}function Qfe(e){return e.postLock.isLocked}function ehe(e){return Object.keys(e.postSavingLock).length>0}function the(e){return Object.keys(e.postAutosavingLock).length>0}function nhe(e){return e.postLock.isTakeover}function ohe(e){return e.postLock.user}function rhe(e){return e.postLock.activePostLock}function ahe(e){var t;return Boolean(null===(t=gfe(e)._links)||void 0===t?void 0:t.hasOwnProperty("wp:action-unfiltered-html"))}const ihe=zn((e=>()=>!!e(Vpe).get("core/edit-post","isPublishSidebarEnabled")));function lhe(e){return kfe(e,"blocks")||pfe}function she(e){var t;return jo("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),null===(t=kfe(e,"selection"))||void 0===t?void 0:t.selectionStart}function che(e){var t;return jo("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),null===(t=kfe(e,"selection"))||void 0===t?void 0:t.selectionEnd}function uhe(e){return kfe(e,"selection")}function phe(e){return e.isReady}function dhe(e){return e.editorSettings}function bhe(){return jo("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function mhe(){return jo("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function Mhe(e){return zn((t=>function(n){jo("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"});for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a{var t;const n=(null===(t=dhe(e))||void 0===t?void 0:t.defaultTemplatePartAreas)||[];return null==n?void 0:n.map((e=>{return{...e,icon:(t=e.icon,"header"===t?ife:"footer"===t?lfe:"sidebar"===t?sfe:cfe)};var t}))}),(e=>{var t;return[null===(t=dhe(e))||void 0===t?void 0:t.defaultTemplatePartAreas]})),Mge=Li(((e,t)=>{var n;const o=bge(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:ufe}),((e,t)=>[bge(e),t]));function zge(e,t){var n;if(!t)return ufe;const{description:o,slug:r,title:a,area:i}=t,{title:l,description:s}=Mge(e,r),c="string"==typeof a?a:null==a?void 0:a.rendered,u="string"==typeof o?o:null==o?void 0:o.raw,p=(null===(n=mge(e).find((e=>i===e.area)))||void 0===n?void 0:n.icon)||Nie;return{title:c&&c!==r?c:l||r,description:u||s,icon:p}}const fge=zn((e=>t=>{var n;const o=Ofe(t),r=e(Km).getPostType(o);return null==r||null===(n=r.labels)||void 0===n?void 0:n.singular_name}));function hge(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function gge(e,t,n,o,r){window.sessionStorage.setItem(hge(e,t),JSON.stringify({post_title:n,content:o,excerpt:r}))}function Oge(e){var t,n;const{previousPost:o,post:r,postType:a}=e;if(null!==(t=e.options)&&void 0!==t&&t.isAutosave)return[];if("trash"===r.status&&"trash"!==o.status)return[];const i=["publish","private","future"],l=i.includes(o.status),s=i.includes(r.status);let c,u,p=null!==(n=null==a?void 0:a.viewable)&&void 0!==n&&n;l||s?l&&!s?(c=a.labels.item_reverted_to_draft,p=!1):c=!l&&s?{publish:a.labels.item_published,private:a.labels.item_published_privately,future:a.labels.item_scheduled}[r.status]:a.labels.item_updated:(c=gr("Draft saved."),u=!0);const d=[];return p&&d.push({label:u?gr("View Preview"):a.labels.view_item,url:r.link}),[c,{id:nfe,type:"snackbar",actions:d}]}function vge(e){const{post:t,edits:n,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const r=["publish","private","future"],a=-1!==r.indexOf(t.status),i={publish:gr("Publishing failed."),private:gr("Publishing failed."),future:gr("Scheduling failed.")};let l=a||-1===r.indexOf(n.status)?gr("Updating failed."):i[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(l=[l,o.message].join(" ")),[l,{id:nfe}]}const Age=(e,t,n)=>o=>{let{dispatch:r}=o;r.setupEditorState(e);if("auto-draft"===e.status&&n){let o;o="content"in t?t.content:e.content.raw;let a=Fc(o);a=tp(a,n),r.resetEditorBlocks(a,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((t=>{var n,o;let[r,a]=t;return a!==(null!==(n=null===(o=e[r])||void 0===o?void 0:o.raw)&&void 0!==n?n:e[r])}))&&r.editPost(t)};function yge(){return{type:"TEAR_DOWN_EDITOR"}}function _ge(){return jo("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function qge(){return jo("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function kge(e){return{type:"SETUP_EDITOR_STATE",post:e}}const wge=(e,t)=>n=>{let{select:o,registry:r}=n;const{id:a,type:i}=o.getCurrentPost();r.dispatch(Km).editEntityRecord("postType",i,a,e,t)},Ege=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async t=>{let{select:n,dispatch:o,registry:r}=t;if(!n.isEditedPostSaveable())return;const a=n.getEditedPostContent();e.isAutosave||o.editPost({content:a},{undoIgnore:!0});const i=n.getCurrentPost(),l={id:i.id,...r.select(Km).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:a};o({type:"REQUEST_POST_UPDATE_START",options:e}),await r.dispatch(Km).saveEntityRecord("postType",i.type,l,e),o({type:"REQUEST_POST_UPDATE_FINISH",options:e});const s=r.select(Km).getLastEntitySaveError("postType",i.type,i.id);if(s){const e=vge({post:i,edits:l,error:s});e.length&&r.dispatch(gQ).createErrorNotice(...e)}else{const t=n.getCurrentPost(),o=Oge({previousPost:i,post:t,postType:await r.resolveSelect(Km).getPostType(t.type),options:e});o.length&&r.dispatch(gQ).createSuccessNotice(...o),e.isAutosave||r.dispatch(wN).__unstableMarkLastChangeAsPersistent()}}};function Wge(){return jo("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const Lge=()=>async e=>{let{select:t,dispatch:n,registry:o}=e;const r=t.getCurrentPostType(),a=await o.resolveSelect(Km).getPostType(r);o.dispatch(gQ).removeNotice(ofe);const{rest_base:i,rest_namespace:l="wp/v2"}=a;n({type:"REQUEST_POST_DELETE_START"});try{const e=t.getCurrentPost();await td({path:`/${l}/${i}/${e.id}`,method:"DELETE"}),await n.savePost()}catch(e){o.dispatch(gQ).createErrorNotice(...(s={error:e},[s.error.message&&"unknown_error"!==s.error.code?s.error.message:gr("Trashing failed"),{id:ofe}]))}var s;n({type:"REQUEST_POST_DELETE_FINISH"})},xge=function(){let{local:e=!1,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async n=>{let{select:o,dispatch:r}=n;if(e){const e=o.getCurrentPost(),t=o.isEditedPostNew(),n=o.getEditedPostAttribute("title"),r=o.getEditedPostAttribute("content"),a=o.getEditedPostAttribute("excerpt");gge(e.id,t,n,r,a)}else await r.savePost({isAutosave:!0,...t})}},Cge=()=>e=>{let{registry:t}=e;t.dispatch(Km).redo()},Rge=()=>e=>{let{registry:t}=e;t.dispatch(Km).undo()};function Sge(){return jo("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Nge(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Tge=()=>e=>{let{registry:t}=e;t.dispatch(Vpe).set("core/edit-post","isPublishSidebarEnabled",!0)},Bge=()=>e=>{let{registry:t}=e;t.dispatch(Vpe).set("core/edit-post","isPublishSidebarEnabled",!1)};function Dge(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Ige(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Pge(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Hge(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Fge=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{select:o,dispatch:r,registry:a}=n;const{__unstableShouldCreateUndoLevel:i,selection:l}=t,s={blocks:e,selection:l};if(!1!==i){const{id:e,type:t}=o.getCurrentPost();if(a.select(Km).getEditedEntityRecord("postType",t,e).blocks===s.blocks)return void a.dispatch(Km).__unstableCreateUndoLevel("postType",t,e);s.content=e=>{let{blocks:t=[]}=e;return Ls(t)}}r.editPost(s)}};function Yge(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Xge=e=>function(){for(var t=arguments.length,n=new Array(t),o=0;o{let{registry:o}=t;jo("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),o.dispatch(wN)[e](...n)}},jge=Xge("resetBlocks"),Vge=Xge("receiveBlocks"),Uge=Xge("updateBlock"),$ge=Xge("updateBlockAttributes"),Gge=Xge("selectBlock"),Kge=Xge("startMultiSelect"),Jge=Xge("stopMultiSelect"),Zge=Xge("multiSelect"),Qge=Xge("clearSelectedBlock"),eOe=Xge("toggleSelection"),tOe=Xge("replaceBlocks"),nOe=Xge("replaceBlock"),oOe=Xge("moveBlocksDown"),rOe=Xge("moveBlocksUp"),aOe=Xge("moveBlockToPosition"),iOe=Xge("insertBlock"),lOe=Xge("insertBlocks"),sOe=Xge("showInsertionPoint"),cOe=Xge("hideInsertionPoint"),uOe=Xge("setTemplateValidity"),pOe=Xge("synchronizeTemplate"),dOe=Xge("mergeBlocks"),bOe=Xge("removeBlocks"),mOe=Xge("removeBlock"),MOe=Xge("toggleBlockMode"),zOe=Xge("startTyping"),fOe=Xge("stopTyping"),hOe=Xge("enterFormattedText"),gOe=Xge("exitFormattedText"),OOe=Xge("insertDefaultBlock"),vOe=Xge("updateBlockListSettings"),AOe={reducer:efe,selectors:w,actions:E},yOe=co("core/editor",{...AOe});tr(yOe);function _Oe(e){var t;const n=Object.fromEntries(Object.entries(null!==(t=e.attributes)&&void 0!==t?t:{}).filter((e=>{let[,{source:t}]=e;return"meta"===t})).map((e=>{let[t,{meta:n}]=e;return[t,n]})));return(0,Ht.isEmpty)(n)||(e.edit=(e=>Jm((t=>n=>{let{attributes:o,setAttributes:r,...a}=n;const i=fp((e=>e(yOe).getCurrentPostType()),[]),[l,s]=Tm("postType",i,"meta"),c=(0,Bt.useMemo)((()=>({...o,...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,l[n]]})))})),[o,l]);return(0,Bt.createElement)(t,Pt({attributes:c,setAttributes:t=>{const n=Object.fromEntries(Object.entries(null!=t?t:{}).filter((t=>{let[n]=t;return n in e})).map((t=>{let[n,o]=t;return[e[n],o]})));(0,Ht.isEmpty)(n)||s(n),r(t)}},a))}),"withMetaAttributeSource"))(n)(e.edit)),e}function qOe(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,Bt.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,Bt.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,Bt.createElement)(Bt.Fragment,null,t,(0,Bt.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,Bt.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}wo("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",_Oe),Jo(kl).getBlockTypes().map((e=>{let{name:t}=e;return Jo(kl).getBlockType(t)})).forEach(_Oe);const kOe={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=fp((t=>{const{getUsers:n}=t(Km);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,Bt.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:qOe(e)}))):[]),[t]);return[n]},getOptionCompletion:e=>`@${e.slug}`};wo("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.push({...kOe}),e}));var wOe=n(9253),EOe=n.n(wOe);const WOe=e=>{let{children:t,isValid:n,level:o,href:r,onSelect:a}=e;return(0,Bt.createElement)("li",{className:EOe()("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!n})},(0,Bt.createElement)("a",{href:r,className:"document-outline__button",onClick:a},(0,Bt.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Bt.createElement)("strong",{className:"document-outline__level"},o),(0,Bt.createElement)("span",{className:"document-outline__item-content"},t)))},LOe=(0,Bt.createElement)("em",null,gr("(Empty heading)")),xOe=[(0,Bt.createElement)("br",{key:"incorrect-break"}),(0,Bt.createElement)("em",{key:"incorrect-message"},gr("(Incorrect heading level)"))],COe=[(0,Bt.createElement)("br",{key:"incorrect-break-h1"}),(0,Bt.createElement)("em",{key:"incorrect-message-h1"},gr("(Your theme may already use a H1 for the post title)"))],ROe=[(0,Bt.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,Bt.createElement)("em",{key:"incorrect-message-multiple-h1"},gr("(Multiple H1 headings are not recommended)"))],SOe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.flatMap((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:NOe(e)}:SOe(e.innerBlocks)}))},NOe=e=>!e.attributes.content||0===e.attributes.content.length,TOe=Mn(dj((e=>{var t,n;const{getBlocks:o}=e(wN),{getEditedPostAttribute:r}=e(yOe),{getPostType:a}=e(Km),i=a(r("type"));return{title:r("title"),blocks:o(),isTitleSupported:null!==(t=null==i||null===(n=i.supports)||void 0===n?void 0:n.title)&&void 0!==t&&t}})))((e=>{let{blocks:t=[],title:n,onSelect:o,isTitleSupported:r,hasOutlineItemsDisabled:a}=e;const i=SOe(t),{selectBlock:l}=Lm(wN);if(i.length<1)return null;let s=1;const c=document.querySelector(".editor-post-title__input"),u=r&&n&&c,p=i.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{}),d=p[1]>1;return(0,Bt.createElement)("div",{className:"document-outline"},(0,Bt.createElement)("ul",null,u&&(0,Bt.createElement)(WOe,{level:gr("Title"),isValid:!0,onSelect:o,href:`#${c.id}`,isDisabled:a},n),i.map(((e,t)=>{const n=e.level>s+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(d||u));return s=e.level,(0,Bt.createElement)(WOe,{key:t,level:`H${e.level}`,isValid:r,isDisabled:a,href:`#block-${e.clientId}`,onSelect:()=>{l(e.clientId),null==o||o()}},e.isEmpty?LOe:XL(CL({html:e.attributes.content})),n&&xOe,1===e.level&&d&&ROe,u&&1===e.level&&!d&&COe)}))))}));const BOe=function(e){let{resetBlocksOnSave:t}=e;const{resetEditorBlocks:n,savePost:o}=Lm(yOe),{isEditedPostDirty:r,getPostEdits:a,isPostSavingLocked:i}=fp(yOe);return EJ("core/editor/save",(e=>{if(e.preventDefault(),!i()&&r()){if(t){const e=a();if(e.content&&"string"==typeof e.content){const t=Fc(e.content);n(t)}}o()}})),null};const DOe=function(){const{redo:e,undo:t}=Lm(yOe);return EJ("core/editor/undo",(e=>{t(),e.preventDefault()})),EJ("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,Bt.createElement)(BOe,null)},IOe=()=>{};const POe=function(e){let{notices:t,onRemove:n=IOe,className:o,children:r}=e;const a=e=>()=>n(e);return o=Sz()("components-notice-list",o),(0,Bt.createElement)("div",{className:o},r,[...t].reverse().map((e=>{const{content:t,...n}=e;return(0,Bt.createElement)(tne,Pt({},n,{key:e.id,onRemove:a(e.id)}),e.content)})))};const HOe=Mn([dj((e=>({isValid:e(wN).isValidTemplate()}))),Mj((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(wN);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function(e){let{isValid:t,...n}=e;return t?null:(0,Bt.createElement)(tne,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:gr("Keep it as is"),onClick:n.resetTemplateValidity},{label:gr("Reset the template"),onClick:()=>{window.confirm(gr("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()}}]},gr("The content of your post doesn’t match the template assigned to your post type."))}));const FOe=Mn([dj((e=>({notices:e(gQ).getNotices()}))),Mj((e=>({onRemove:e(gQ).removeNotice})))])((function(e){let{notices:t,onRemove:n}=e;const o=t.filter((e=>{let{isDismissible:t,type:n}=e;return t&&"default"===n})),r=t.filter((e=>{let{isDismissible:t,type:n}=e;return!t&&"default"===n}));return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(POe,{notices:r,className:"components-editor-notices__pinned"}),(0,Bt.createElement)(POe,{notices:o,className:"components-editor-notices__dismissible",onRemove:n},(0,Bt.createElement)(HOe,null)))}));const YOe=(0,Bt.forwardRef)((function(e,t){let{className:n,children:o,spokenMessage:r=o,politeness:a="polite",actions:i=[],onRemove:l,icon:s=null,explicitDismiss:c=!1,onDismiss:u,listRef:p}=e;function d(e){var t;e&&e.preventDefault&&e.preventDefault(),null==p||null===(t=p.current)||void 0===t||t.focus(),null==u||u(),null==l||l()}!function(e,t){const n="string"==typeof e?e:gs(e);(0,Bt.useEffect)((()=>{n&&vx(n,t)}),[n,t])}(r,a),(0,Bt.useEffect)((()=>{const e=setTimeout((()=>{c||(null==u||u(),null==l||l())}),1e4);return()=>clearTimeout(e)}),[u,l,c]);const b=Sz()(n,"components-snackbar",{"components-snackbar-explicit-dismiss":!!c});i&&i.length>1&&(i=[i[0]]);const m=Sz()("components-snackbar__content",{"components-snackbar__content-with-icon":!!s});return(0,Bt.createElement)("div",{ref:t,className:b,onClick:c?void 0:d,tabIndex:0,role:c?"":"button",onKeyPress:c?void 0:d,"aria-label":c?"":gr("Dismiss this notice")},(0,Bt.createElement)("div",{className:m},s&&(0,Bt.createElement)("div",{className:"components-snackbar__icon"},s),o,i.map(((e,t)=>{let{label:n,onClick:o,url:r}=e;return(0,Bt.createElement)(bE,{key:t,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),null==l||l(),t&&t(e)}(e,o),className:"components-snackbar__action"},n)})),c&&(0,Bt.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:0,className:"components-snackbar__dismiss-button",onClick:d,onKeyPress:d},"✕")))})),XOe=YOe,jOe={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{stiffness:1e3,velocity:-100}}},exit:{opacity:0,transition:{duration:.5}}};const VOe=function(e){let{notices:t,className:n,children:o,onRemove:r}=e;const a=(0,Bt.useRef)(null),i=pX();n=Sz()("components-snackbar-list",n);const l=e=>()=>null==r?void 0:r(e.id);return(0,Bt.createElement)("div",{className:n,tabIndex:-1,ref:a},o,(0,Bt.createElement)(Gle,null,t.map((e=>{const{content:t,...n}=e;return(0,Bt.createElement)(Q_.div,{layout:!i,initial:"init",animate:"open",exit:"exit",key:e.id,variants:i?void 0:jOe},(0,Bt.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,Bt.createElement)(XOe,Pt({},n,{onRemove:l(e),listRef:a}),e.content)))}))))};function UOe(){const e=fp((e=>e(gQ).getNotices()),[]),{removeNotice:t}=Lm(gQ),n=e.filter((e=>{let{type:t}=e;return"snackbar"===t}));return(0,Bt.createElement)(VOe,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}function $Oe(){try{return Jo(yOe).getEditedPostContent()}catch(e){}}function GOe(e){let{text:t,children:n}=e;const o=x2(t);return(0,Bt.createElement)(bE,{variant:"secondary",ref:o},n)}class KOe extends Bt.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){So("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(!e)return this.props.children;const t=[(0,Bt.createElement)(GOe,{key:"copy-post",text:$Oe},gr("Copy Post Text")),(0,Bt.createElement)(GOe,{key:"copy-error",text:e.stack},gr("Copy Error"))];return(0,Bt.createElement)(xj,{className:"editor-error-boundary",actions:t},gr("The editor has encountered an unexpected error."))}}const JOe=KOe;function ZOe(){const e=fp((e=>e(yOe).getEditedPostAttribute("content")),[]),t=Or("words","Word count type. Do not translate!");return(0,Bt.createElement)("span",{className:"word-count"},vpe(e,t))}function QOe(){const e=fp((e=>e(yOe).getEditedPostAttribute("content")),[]),t=Or("words","Word count type. Do not translate!"),n=Math.round(vpe(e,t)/189),o=xK(0===n?gr("< 1 minute"):lr(vr("%d minute","%d minutes",n),n),{span:(0,Bt.createElement)("span",null)});return(0,Bt.createElement)("span",{className:"time-to-read"},o)}function eve(){return vpe(fp((e=>e(yOe).getEditedPostAttribute("content")),[]),"characters_including_spaces")}const tve=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"}));function nve(e){if(!e)return;const{metadata:t,settings:n,name:o}=e;return qa({name:o,...t},n)}const ove={};function rve(e){let{className:t}=e;return(0,Bt.createElement)(Sie,{className:t},gr("Block rendered as empty."))}function ave(e){let{response:t,className:n}=e;const o=lr(gr("Error loading block: %s"),t.errorMsg);return(0,Bt.createElement)(Sie,{className:n},o)}function ive(e){let{children:t,showLoader:n}=e;return(0,Bt.createElement)("div",{style:{position:"relative"}},n&&(0,Bt.createElement)("div",{style:{position:"absolute",top:"50%",left:"50%",marginTop:"-9px",marginLeft:"-9px"}},(0,Bt.createElement)(L0,null)),(0,Bt.createElement)("div",{style:{opacity:n?"0.3":1}},t))}function lve(e){const{attributes:t,block:n,className:o,httpMethod:r="GET",urlQueryArgs:a,skipBlockSupportAttributes:i=!1,EmptyResponsePlaceholder:l=rve,ErrorResponsePlaceholder:s=ave,LoadingResponsePlaceholder:c=ive}=e,u=(0,Bt.useRef)(!0),[p,d]=(0,Bt.useState)(!1),b=(0,Bt.useRef)(),[m,M]=(0,Bt.useState)(null),z=_B(e),[f,h]=(0,Bt.useState)(!1);function g(){var e,o;if(!u.current)return;h(!0);let l=t&&zi(n,t);i&&(l=function(e){const{backgroundColor:t,borderColor:n,fontFamily:o,fontSize:r,gradient:a,textColor:i,className:l,...s}=e,{border:c,color:u,elements:p,spacing:d,typography:b,...m}=(null==e?void 0:e.style)||ove;return{...s,style:m}}(l));const s="POST"===r,c=s?null:null!==(e=l)&&void 0!==e?e:null,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Cp(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==t?{attributes:t}:{},...arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}})}(n,c,a),d=s?{attributes:null!==(o=l)&&void 0!==o?o:null}:null,m=b.current=td({path:p,data:d,method:s?"POST":"GET"}).then((e=>{u.current&&m===b.current&&e&&M(e.rendered)})).catch((e=>{u.current&&m===b.current&&M({error:!0,errorMsg:e.message})})).finally((()=>{u.current&&m===b.current&&h(!1)}));return m}const O=Iz(g,500);(0,Bt.useEffect)((()=>()=>{u.current=!1}),[]),(0,Bt.useEffect)((()=>{void 0===z?g():Ys()(z,e)||O()})),(0,Bt.useEffect)((()=>{if(!f)return;const e=setTimeout((()=>{d(!0)}),1e3);return()=>clearTimeout(e)}),[f]);const v=!!m,A=""===m,y=null==m?void 0:m.error;return f?(0,Bt.createElement)(c,Pt({},e,{showLoader:p}),v&&(0,Bt.createElement)(Fl,{className:o},m)):A||!v?(0,Bt.createElement)(l,e):y?(0,Bt.createElement)(s,Pt({response:m},e)):(0,Bt.createElement)(Fl,{className:o},m)}const sve={},cve=dj((e=>{const t=e("core/editor");if(t){const e=t.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return sve}))((e=>{let{urlQueryArgs:t=sve,currentPostId:n,...o}=e;const r=(0,Bt.useMemo)((()=>n?{post_id:n,...t}:t),[n,t]);return(0,Bt.createElement)(lve,Pt({urlQueryArgs:r},o))})),uve=cve;const pve={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/archives",title:"Archives",category:"widgets",description:"Display a date archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showLabel:{type:"boolean",default:!0},showPostCounts:{type:"boolean",default:!1},type:{type:"string",default:"monthly"}},supports:{align:!0,anchor:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-archives-editor"},{name:dve}=pve,bve={icon:tve,example:{},edit:function(e){let{attributes:t,setAttributes:n}=e;const{showLabel:o,showPostCounts:r,displayAsDropdown:a,type:i}=t;return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,{title:gr("Settings")},(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Display as dropdown"),checked:a,onChange:()=>n({displayAsDropdown:!a})}),a&&(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Show label"),checked:o,onChange:()=>n({showLabel:!o})}),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}),(0,Bt.createElement)(P6,{__nextHasNoMarginBottom:!0,label:gr("Group by:"),options:[{label:gr("Year"),value:"yearly"},{label:gr("Month"),value:"monthly"},{label:gr("Week"),value:"weekly"},{label:gr("Day"),value:"daily"}],value:i,onChange:e=>n({type:e})}))),(0,Bt.createElement)("div",pK(),(0,Bt.createElement)(ZK,null,(0,Bt.createElement)(uve,{block:"core/archives",skipBlockSupportAttributes:!0,attributes:t}))))}},mve=()=>nve({name:dve,metadata:pve,settings:bve}),Mve=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));var zve=n(7383),fve=n.n(zve);function hve(e){const t=e.indexOf("?");if(-1===t)return e;const n=Lp(e),o=e.substr(0,t);for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;idelete n[e]));const l=xp(n);return l?o+"?"+l:o}function gve(e){const t=e?e[0]:24,n=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*n)}}function Ove(){const{avatarURL:e}=fp((e=>{const{getSettings:t}=e(wN),{__experimentalDiscussionSettings:n}=t();return n}));return e}const vve=e=>{let{__next36pxDefaultSize:t}=e;return!t&&GN("height:28px;padding-left:",QN(1),";padding-right:",QN(1),";","")},Ave=lE(lT,{target:"evuatpg0"})("height:34px;padding-left:",QN(2),";padding-right:",QN(2),";",vve,";");const yve=(0,Bt.forwardRef)((function(e,t){const{value:n,isExpanded:o,instanceId:r,selectedSuggestionIndex:a,className:i,onChange:l,onFocus:s,onBlur:c,...u}=e,[p,d]=(0,Bt.useState)(!1),b=n?n.length+1:0;return(0,Bt.createElement)("input",Pt({ref:t,id:`components-form-token-input-${r}`,type:"text"},u,{value:n||"",onChange:e=>{l&&l({value:e.target.value})},onFocus:e=>{d(!0),null==s||s(e)},onBlur:e=>{d(!1),null==c||c(e)},size:b,className:Sz()(i,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":o,"aria-autocomplete":"list","aria-owns":o?`components-form-token-suggestions-${r}`:void 0,"aria-activedescendant":p&&-1!==a&&o?`components-form-token-suggestions-${r}-${a}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${r}`}))})),_ve=yve,qve=e=>{e.preventDefault()};const kve=function(e){let{selectedIndex:t,scrollIntoView:n,match:o,onHover:r,onSelect:a,suggestions:i=[],displayTransform:l,instanceId:s,__experimentalRenderItem:c}=e;const[u,p]=(0,Bt.useState)(!1),d=Xq((e=>{let o;return t>-1&&n&&e.children[t]&&(p(!0),ese()(e.children[t],e,{onlyScrollIfNeeded:!0}),o=requestAnimationFrame((()=>{p(!1)}))),()=>{void 0!==o&&cancelAnimationFrame(o)}}),[t,n]),b=e=>()=>{u||null==r||r(e)},m=e=>()=>{null==a||a(e)};return(0,Bt.createElement)("ul",{ref:d,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${s}`,role:"listbox"},i.map(((e,n)=>{const r=(e=>{const t=l(o).toLocaleLowerCase();if(0===t.length)return null;const n=l(e),r=n.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:n.substring(0,r),suggestionMatch:n.substring(r,r+t.length),suggestionAfterMatch:n.substring(r+t.length)}})(e),a=Sz()("components-form-token-field__suggestion",{"is-selected":n===t});let i;return i="function"==typeof c?c({item:e}):r?(0,Bt.createElement)("span",{"aria-label":l(e)},r.suggestionBeforeMatch,(0,Bt.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch):l(e),(0,Bt.createElement)("li",{id:`components-form-token-suggestions-${s}-${n}`,role:"option",className:a,key:"object"==typeof e&&"value"in e?null==e?void 0:e.value:l(e),onMouseDown:qve,onClick:m(e),onMouseEnter:b(e),"aria-selected":n===t},i)})))},wve=Jm((e=>t=>{const[n,o]=(0,Bt.useState)(),r=(0,Bt.useCallback)((e=>o((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,Bt.createElement)("div",Gq(n),(0,Bt.createElement)(e,Pt({ref:r},t)))}),"withFocusOutside"),Eve=()=>{},Wve=wve(class extends Bt.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),Lve=(e,t)=>null===e?-1:t.indexOf(e);const xve=function e(t){var n;let{__nextHasNoMarginBottom:o=!1,__next36pxDefaultSize:r=!1,value:a,label:i,options:l,onChange:s,onFilterValueChange:c=Eve,hideLabelFromVision:u,help:p,allowReset:d=!0,className:b,messages:m={selected:gr("Item selected.")},__experimentalRenderItem:M}=t;const[z,f]=q9({value:a,onChange:s}),h=l.find((e=>e.value===z)),g=null!==(n=null==h?void 0:h.label)&&void 0!==n?n:"",O=Tz(e,"combobox-control"),[v,A]=(0,Bt.useState)(h||null),[y,_]=(0,Bt.useState)(!1),[q,k]=(0,Bt.useState)(!1),[w,E]=(0,Bt.useState)(""),W=(0,Bt.useRef)(null),L=(0,Bt.useMemo)((()=>{const e=[],t=[],n=bse(w);return l.forEach((o=>{const r=bse(o.label).indexOf(n);0===r?e.push(o):r>0&&t.push(o)})),e.concat(t)}),[w,l]),x=e=>{f(e.value),vx(m.selected,"assertive"),A(e),E(""),_(!1)},C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=Lve(v,L);let n=t+e;n<0?n=L.length-1:n>=L.length&&(n=0),A(L[n]),_(!0)};return(0,Bt.useEffect)((()=>{const e=L.length>0,t=Lve(v,L)>0;e&&!t&&A(L[0])}),[L,v]),(0,Bt.useEffect)((()=>{const e=L.length>0;if(y){vx(e?lr(vr("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",L.length),L.length):gr("No results."),"polite")}}),[L,y]),(0,Bt.createElement)(Wve,{onFocusOutside:()=>{_(!1)}},(0,Bt.createElement)(ET,{__nextHasNoMarginBottom:o,className:Sz()(b,"components-combobox-control"),label:i,id:`components-form-token-input-${O}`,hideLabelFromVision:u,help:p},(0,Bt.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:e=>{let t=!1;if(!e.defaultPrevented&&!e.nativeEvent.isComposing&&229!==e.keyCode){switch(e.code){case"Enter":v&&(x(v),t=!0);break;case"ArrowUp":C(-1),t=!0;break;case"ArrowDown":C(1),t=!0;break;case"Escape":_(!1),A(null),t=!0}t&&e.preventDefault()}}},(0,Bt.createElement)(Ave,{__next36pxDefaultSize:r},(0,Bt.createElement)(JB,null,(0,Bt.createElement)(_ve,{className:"components-combobox-control__input",instanceId:O,ref:W,value:y?w:g,onFocus:()=>{k(!0),_(!0),c(""),E("")},onBlur:()=>{k(!1)},isExpanded:y,selectedSuggestionIndex:Lve(v,L),onChange:e=>{const t=e.value;E(t),c(t),q&&_(!0)}})),d&&(0,Bt.createElement)(cT,null,(0,Bt.createElement)(bE,{className:"components-combobox-control__reset",icon:fK,disabled:!z,onClick:()=>{var e;f(null),null===(e=W.current)||void 0===e||e.focus()},label:gr("Reset")}))),y&&(0,Bt.createElement)(kve,{instanceId:O,match:{label:w,value:""},displayTransform:e=>e.label,suggestions:L,selectedIndex:Lve(v,L),onHover:A,onSelect:x,scrollIntoView:!0,__experimentalRenderItem:M}))))},Cve={who:"authors",per_page:-1,_fields:"id,name",context:"view"};const Rve=function(e){let{value:t,onChange:n}=e;const[o,r]=(0,Bt.useState)(),a=fp((e=>{const{getUsers:t}=e(Km);return t(Cve)}),[]);if(!a)return null;const i=a.map((e=>({label:e.name,value:e.id})));return(0,Bt.createElement)(xve,{__nextHasNoMarginBottom:!0,label:gr("User"),help:gr("Select the avatar user to display, if it is blank it will use the post/page author."),value:t,onChange:n,options:o||i,onFilterValueChange:e=>r(i.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})},Sve=e=>{let{setAttributes:t,avatar:n,attributes:o,selectUser:r}=e;return(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,{title:gr("Settings")},(0,Bt.createElement)(xY,{__nextHasNoMarginBottom:!0,label:gr("Image size"),onChange:e=>t({size:e}),min:n.minSize,max:n.maxSize,initialPosition:null==o?void 0:o.size,value:null==o?void 0:o.size}),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Link to user profile"),onChange:()=>t({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,Bt.createElement)(sD,{label:gr("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),r&&(0,Bt.createElement)(Rve,{value:null==o?void 0:o.userId,onChange:e=>{t({userId:e})}})))},Nve=e=>{let{setAttributes:t,attributes:n,avatar:o,blockProps:r,isSelected:a}=e;const i=Yae(n),l=Cp(hve(null==o?void 0:o.src,["s"]),{s:2*(null==n?void 0:n.size)});return(0,Bt.createElement)("div",r,(0,Bt.createElement)(Kze,{size:{width:n.size,height:n.size},showHandle:a,onResizeStop:(e,o,r,a)=>{t({size:parseInt(n.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!Ar(),bottom:!0,left:Ar()},minWidth:o.minSize,maxWidth:o.maxSize},(0,Bt.createElement)("img",{src:l,alt:o.alt,className:fve()("avatar","avatar-"+n.size,"photo","wp-block-avatar__image",i.className),style:i.style})))},Tve=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{commentId:a}=n,i=pK(),l=function(e){let{commentId:t}=e;const[n]=Tm("root","comment","author_avatar_urls",t),[o]=Tm("root","comment","author_name",t),r=n?Object.values(n):null,a=n?Object.keys(n):null,{minSize:i,maxSize:l}=gve(a),s=Ove();return{src:r?r[r.length-1]:s,minSize:i,maxSize:l,alt:o?lr(gr("%s Avatar"),o):gr("Default Avatar")}}({commentId:a});return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Sve,{avatar:l,setAttributes:o,attributes:t,selectUser:!1}),t.isLink?(0,Bt.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Bt.createElement)(Nve,{attributes:t,avatar:l,blockProps:i,isSelected:r,setAttributes:o})):(0,Bt.createElement)(Nve,{attributes:t,avatar:l,blockProps:i,isSelected:r,setAttributes:o}))},Bve=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{postId:a,postType:i}=n,l=function(e){let{userId:t,postId:n,postType:o}=e;const{authorDetails:r}=fp((e=>{var r;const{getEditedEntityRecord:a,getUser:i}=e(Km);if(t)return{authorDetails:i(t)};const l=null===(r=a("postType",o,n))||void 0===r?void 0:r.author;return{authorDetails:l?i(l):null}}),[o,n,t]),a=null!=r&&r.avatar_urls?Object.values(r.avatar_urls):null,i=null!=r&&r.avatar_urls?Object.keys(r.avatar_urls):null,{minSize:l,maxSize:s}=gve(i),c=Ove();return{src:a?a[a.length-1]:c,minSize:l,maxSize:s,alt:r?lr(gr("%s Avatar"),null==r?void 0:r.name):gr("Default Avatar")}}({userId:null==t?void 0:t.userId,postId:a,postType:i}),s=pK();return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(Sve,{selectUser:!0,attributes:t,avatar:l,setAttributes:o}),(0,Bt.createElement)("div",null,t.isLink?(0,Bt.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Bt.createElement)(Nve,{attributes:t,avatar:l,blockProps:s,isSelected:r,setAttributes:o})):(0,Bt.createElement)(Nve,{attributes:t,avatar:l,blockProps:s,isSelected:r,setAttributes:o})))};const Dve={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user’s avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{anchor:!0,html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"}},editorStyle:"wp-block-avatar",style:"wp-block-avatar"},{name:Ive}=Dve,Pve={icon:Mve,edit:function(e){var t,n;return null!=e&&null!==(t=e.context)&&void 0!==t&&t.commentId||null===(null==e||null===(n=e.context)||void 0===n?void 0:n.commentId)?(0,Bt.createElement)(Tve,e):(0,Bt.createElement)(Bve,e)}},Hve=()=>nve({name:Ive,metadata:Dve,settings:Pve}),Fve=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),Yve=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:i}=t;return(0,Bt.createElement)("figure",null,(0,Bt.createElement)("audio",{controls:"controls",src:i,autoPlay:n,loop:r,preload:a}),!Xue.isEmpty(o)&&(0,Bt.createElement)(Xue.Content,{tagName:"figcaption",value:o}))}}],Xve=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})),jve=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Vve="wp-embed";var Uve=n(1893),$ve=n.n(Uve);const{name:Gve}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0,spacing:{margin:!0}},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Kve=e=>{var t;return null===(t=Ha(Gve))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((t=>e.match(t)))}(e,n)}))},Jve=e=>e&&e.includes('class="wp-embedded-content"'),Zve=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:o,attributes:r={}}=e,{url:a,providerNameSlug:i,type:l,...s}=r;if(!a||!Na(Gve))return;const c=Kve(a),u="wordpress"===i||l===Vve,p=!u&&c&&(c.attributes.providerNameSlug!==i||!i);if(p)return Ja(Gve,{url:a,...s,...c.attributes});const d=null===(t=Ha(Gve))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&o&&Jve(o.html)&&!u?Ja(Gve,{url:a,...d.attributes,...n}):void 0},Qve=e=>!!e&&jve.some((t=>{let{className:n}=t;return e.includes(n)})),eAe=e=>{if(!e)return e;const t=jve.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return $ve()(e,t)};function tAe(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return eAe(t);const o=document.implementation.createHTMLDocument("");o.body.innerHTML=e;const r=o.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n=o.ratio){return e-o.ratio>.1?eAe(t):$ve()(eAe(t),o.className,"wp-has-aspect-ratio")}}}return t}const nAe=or()((function(e,t,n,o){let r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const a={};let{type:i="rich"}=e;const{html:l,provider_name:s}=e,c=(0,Ht.kebabCase)((s||t).toLowerCase());return Jve(l)&&(i=Vve),(l||"photo"===i)&&(a.type=i,a.providerNameSlug=c),Qve(n)||(a.className=tAe(l,n,o&&r)),a})),oAe=["audio"];const rAe=function(e){let{attributes:t,className:n,setAttributes:o,onReplace:r,isSelected:a,insertBlocksAfter:i}=e;const{id:l,autoplay:s,caption:c,loop:u,preload:p,src:d}=t,b=_B(c),[m,M]=(0,Bt.useState)(!!c),z=!l&&Du(d),f=fp((e=>{const{getSettings:t}=e(wN);return t().mediaUpload}),[]);(0,Bt.useEffect)((()=>{if(!l&&Du(d)){const e=Nu(d);e&&f({filesList:[e],onFileChange:e=>{let[t]=e;return y(t)},onError:e=>A(e),allowedTypes:oAe})}}),[]),(0,Bt.useEffect)((()=>{c&&!b&&M(!0)}),[c,b]);const h=(0,Bt.useCallback)((e=>{e&&!c&&e.focus()}),[c]);function g(e){return t=>{o({[e]:t})}}function O(e){if(e!==d){const t=Zve({attributes:{url:e}});if(void 0!==t&&r)return void r(t);o({src:e,id:void 0})}}(0,Bt.useEffect)((()=>{a||c||M(!1)}),[a,c]);const{createErrorNotice:v}=Lm(gQ);function A(e){v(e,{type:"snackbar"})}function y(e){e&&e.url?o({src:e.url,id:e.id,caption:e.caption}):o({src:void 0,id:void 0,caption:void 0})}const _=pK({className:fve()(n,{"is-transient":z})});return d?(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(DN,{group:"block"},(0,Bt.createElement)(RW,{onClick:()=>{M(!m),m&&c&&o({caption:void 0})},icon:Xve,isPressed:m,label:gr(m?"Remove caption":"Add caption")})),(0,Bt.createElement)(DN,{group:"other"},(0,Bt.createElement)(Uce,{mediaId:l,mediaURL:d,allowedTypes:oAe,accept:"audio/*",onSelect:y,onSelectURL:O,onError:A})),(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,{title:gr("Settings")},(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Autoplay"),onChange:g("autoplay"),checked:s,help:function(e){return e?gr("Autoplay may cause usability issues for some users."):null}}),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Loop"),onChange:g("loop"),checked:u}),(0,Bt.createElement)(P6,{__nextHasNoMarginBottom:!0,label:Or("Preload","noun; Audio block parameter"),value:p||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:gr("Browser default")},{value:"auto",label:gr("Auto")},{value:"metadata",label:gr("Metadata")},{value:"none",label:Or("None","Preload value")}]}))),(0,Bt.createElement)("figure",_,(0,Bt.createElement)(ZK,{isDisabled:!a},(0,Bt.createElement)("audio",{controls:"controls",src:d})),z&&(0,Bt.createElement)(L0,null),m&&(!Xue.isEmpty(c)||a)&&(0,Bt.createElement)(Xue,{identifier:"caption",tagName:"figcaption",className:eMe("caption"),ref:h,"aria-label":gr("Audio caption text"),placeholder:gr("Add caption"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>i(Ja(Sa()))}))):(0,Bt.createElement)("div",_,(0,Bt.createElement)(nue,{icon:(0,Bt.createElement)(IK,{icon:Fve}),onSelect:y,onSelectURL:O,accept:"audio/*",allowedTypes:oAe,value:t,onError:A}))};const aAe={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform:e=>Ja("core/audio",{src:Su(e[0])})},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:o,ogg:r,wav:a,wma:i}}=e;return t||n||o||r||a||i}},loop:{type:"string",shortcode:e=>{let{named:{loop:t}}=e;return t}},autoplay:{type:"string",shortcode:e=>{let{named:{autoplay:t}}=e;return t}},preload:{type:"string",shortcode:e=>{let{named:{preload:t}}=e;return t}}}}]},iAe=aAe,lAe={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},id:{type:"number",__experimentalRole:"content"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:sAe}=lAe,cAe={icon:Fve,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:iAe,deprecated:Yve,edit:rAe,save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:i}=t;return i&&(0,Bt.createElement)("figure",pK.save(),(0,Bt.createElement)("audio",{controls:"controls",src:i,autoPlay:n,loop:r,preload:a}),!Xue.isEmpty(o)&&(0,Bt.createElement)(Xue.Content,{tagName:"figcaption",value:o,className:eMe("caption")}))}},uAe=()=>nve({name:sAe,metadata:lAe,settings:cAe}),pAe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"})),dAe=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,dAe(n)]})).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,Ht.isEmpty)(t)?void 0:t},bAe=dAe;function mAe(e){var t,n;if(null==e||null===(t=e.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.fontFamily)return e;const{fontFamily:o,...r}=e.style.typography;return{...e,style:bAe({...e.style,typography:r}),fontFamily:o.split("|").pop()}}const MAe=e=>{var t,n,o;const{borderRadius:r,...a}=e,i=[r,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return i?{...a,style:{...a.style,border:{...null===(o=a.style)||void 0===o?void 0:o.border,radius:`${i}px`}}}:a};const zAe=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:n,customBackgroundColor:o,customGradient:r,...a}=e;return{...a,style:t}},fAe=e=>{const{color:t,textColor:n,...o}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return zAe(o)},hAe={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},gAe={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:i,rel:l,style:s,text:c,title:u,url:p,width:d}=o;if(!c)return null;const b=Fae(o),m=Xae(o),M=Uae(o),z=fve()("wp-block-button__link",m.className,b.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),f={...b.style,...m.style,...M.style},h=fve()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Bt.createElement)("div",pK.save({className:h}),(0,Bt.createElement)(Xue.Content,{tagName:"a",className:z,href:p,title:u,style:f,value:c,target:i,rel:l}))}},OAe={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:i,rel:l,style:s,text:c,title:u,url:p,width:d}=o;if(!c)return null;const b=Fae(o),m=Xae(o),M=Uae(o),z=fve()("wp-block-button__link",m.className,b.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),f={...b.style,...m.style,...M.style},h=fve()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Bt.createElement)("div",pK.save({className:h}),(0,Bt.createElement)(Xue.Content,{tagName:"a",className:z,href:p,title:u,style:f,value:c,target:i,rel:l}))},migrate:mAe,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},vAe=[gAe,OAe,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...hAe,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible(e){var t;let{style:n}=e;return"number"==typeof(null==n||null===(t=n.border)||void 0===t?void 0:t.radius)},save(e){var t,n,o;let{attributes:r,className:a}=e;const{fontSize:i,linkTarget:l,rel:s,style:c,text:u,title:p,url:d,width:b}=r;if(!u)return null;const m=null==c||null===(t=c.border)||void 0===t?void 0:t.radius,M=Xae(r),z=fve()("wp-block-button__link",M.className,{"no-border-radius":0===(null==c||null===(n=c.border)||void 0===n?void 0:n.radius)}),f={borderRadius:m||void 0,...M.style},h=fve()(a,{[`has-custom-width wp-block-button__width-${b}`]:b,"has-custom-font-size":i||(null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize)});return(0,Bt.createElement)("div",pK.save({className:h}),(0,Bt.createElement)(Xue.Content,{tagName:"a",className:z,href:d,title:p,style:f,value:u,target:l,rel:s}))},migrate:Mn(mAe,MAe)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...hAe,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:i,title:l,url:s,width:c}=t,u=Xae(t),p=fve()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},b=fve()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Bt.createElement)("div",pK.save({className:b}),(0,Bt.createElement)(Xue.Content,{tagName:"a",className:p,href:s,title:l,style:d,value:i,target:r,rel:a}))},migrate:Mn(mAe,MAe)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...hAe,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:i,title:l,url:s,width:c}=t,u=Xae(t),p=fve()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},b=fve()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Bt.createElement)("div",pK.save({className:b}),(0,Bt.createElement)(Xue.Content,{tagName:"a",className:p,href:s,title:l,style:d,value:i,target:r,rel:a}))},migrate:Mn(mAe,MAe)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...hAe,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save(e){let{attributes:t}=e;const{borderRadius:n,linkTarget:o,rel:r,text:a,title:i,url:l}=t,s=fve()("wp-block-button__link",{"no-border-radius":0===n}),c={borderRadius:n?n+"px":void 0};return(0,Bt.createElement)(Xue.Content,{tagName:"a",className:s,href:l,title:i,style:c,value:a,target:o,rel:r})},migrate:MAe},{supports:{align:!0,alignWide:!1},attributes:{...hAe,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!(e.customTextColor||e.customBackgroundColor||e.customGradient||e.align),migrate:Mn(MAe,zAe,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:fve()(n.className,`align${e.align}`)}})),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:o,customBackgroundColor:r,customTextColor:a,customGradient:i,linkTarget:l,gradient:s,rel:c,text:u,textColor:p,title:d,url:b}=t,m=a6("color",p),M=!i&&a6("background-color",n),z=Tee(s),f=fve()("wp-block-button__link",{"has-text-color":p||a,[m]:m,"has-background":n||r||i||s,[M]:M,"no-border-radius":0===o,[z]:z}),h={background:i||void 0,backgroundColor:M||i||s?void 0:r,color:m?void 0:a,borderRadius:o?o+"px":void 0};return(0,Bt.createElement)("div",null,(0,Bt.createElement)(Xue.Content,{tagName:"a",className:f,href:b,title:d,style:h,value:u,target:l,rel:c}))}},{attributes:{...hAe,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible:e=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),MAe(zAe({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,customTextColor:r,linkTarget:a,rel:i,text:l,textColor:s,title:c,url:u}=t,p=a6("color",s),d=a6("background-color",n),b=fve()("wp-block-button__link",{"has-text-color":s||r,[p]:p,"has-background":n||o,[d]:d}),m={backgroundColor:d?void 0:o,color:p?void 0:r};return(0,Bt.createElement)("div",null,(0,Bt.createElement)(Xue.Content,{tagName:"a",className:b,href:u,title:c,style:m,value:l,target:a,rel:i}))}},{attributes:{...hAe,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:fAe,save(e){let{attributes:t}=e;const{url:n,text:o,title:r,backgroundColor:a,textColor:i,customBackgroundColor:l,customTextColor:s}=t,c=a6("color",i),u=a6("background-color",a),p=fve()("wp-block-button__link",{"has-text-color":i||s,[c]:c,"has-background":a||l,[u]:u}),d={backgroundColor:u?void 0:l,color:c?void 0:s};return(0,Bt.createElement)("div",null,(0,Bt.createElement)(Xue.Content,{tagName:"a",className:p,href:n,title:r,style:d,value:o}))}},{attributes:{...hAe,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:i,textColor:l}=t,s={backgroundColor:i,color:l};return(0,Bt.createElement)("div",{className:`align${a}`},(0,Bt.createElement)(Xue.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:r,style:s,value:o}))},migrate:fAe},{attributes:{...hAe,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:i,textColor:l}=t;return(0,Bt.createElement)("div",{className:`align${a}`,style:{backgroundColor:i}},(0,Bt.createElement)(Xue.Content,{tagName:"a",href:n,title:r,style:{color:l},value:o}))},migrate:fAe}],AAe=vAe,yAe="noreferrer noopener";function _Ae(e){let{selectedWidth:t,setAttributes:n}=e;return(0,Bt.createElement)(fX,{title:gr("Width settings")},(0,Bt.createElement)(Lae,{"aria-label":gr("Button width")},[25,50,75,100].map((e=>(0,Bt.createElement)(bE,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var o;n({width:t===(o=e)?void 0:o})}},e,"%")))))}const qAe=function(e){var t;const{attributes:n,setAttributes:o,className:r,isSelected:a,onReplace:i,mergeBlocks:l}=e,{textAlign:s,linkTarget:c,placeholder:u,rel:p,style:d,text:b,url:m,width:M}=n,[z,f]=(0,Bt.useState)(null),h=Yae(n),g=Vae(n),O=Uae(n),v=(0,Bt.useRef)(),A=(0,Bt.useRef)(),y=pK({ref:Hz([f,v]),onKeyDown:function(e){if(Wq.primary(e,"k"))E(e);else if(Wq.primaryShift(e,"k")){var t;W(),null===(t=A.current)||void 0===t||t.focus()}}}),[_,q]=(0,Bt.useState)(!1),k=!!m,w="_blank"===c;function E(e){e.preventDefault(),q(!0)}function W(){o({url:void 0,linkTarget:void 0,rel:void 0}),q(!1)}return(0,Bt.useEffect)((()=>{a||q(!1)}),[a]),(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)("div",Pt({},y,{className:fve()(y.className,{[`has-custom-width wp-block-button__width-${M}`]:M,"has-custom-font-size":y.style.fontSize})}),(0,Bt.createElement)(Xue,{ref:A,"aria-label":gr("Button text"),placeholder:u||gr("Add text…"),value:b,onChange:e=>{o({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:fve()(r,"wp-block-button__link",g.className,h.className,{[`has-text-align-${s}`]:s,"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)},eMe("button")),style:{...h.style,...g.style,...O.style},onSplit:e=>Ja("core/button",{...n,text:e}),onReplace:i,onMerge:l,identifier:"text"})),(0,Bt.createElement)(DN,{group:"block"},(0,Bt.createElement)(rie,{value:s,onChange:e=>{o({textAlign:e})}}),!k&&(0,Bt.createElement)(RW,{name:"link",icon:c6,title:gr("Link"),shortcut:kq.primary("k"),onClick:E}),k&&(0,Bt.createElement)(RW,{name:"link",icon:u6,title:gr("Unlink"),shortcut:kq.primaryShift("k"),onClick:W,isActive:!0})),a&&(_||k)&&(0,Bt.createElement)(gw,{placement:"bottom",onClose:()=>{var e;q(!1),null===(e=A.current)||void 0===e||e.focus()},anchor:z,focusOnMount:!!_&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,Bt.createElement)(tce,{className:"wp-block-navigation-link__inline-link-input",value:{url:m,opensInNewTab:w},onChange:e=>{let{url:t="",opensInNewTab:n}=e;o({url:Nse(t)}),w!==n&&function(e){const t=e?"_blank":void 0;let n=p;t&&!p?n=yAe:t||p!==yAe||(n=void 0),o({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;W(),null===(e=A.current)||void 0===e||e.focus()},forceIsEditingLink:_})),(0,Bt.createElement)(rj,null,(0,Bt.createElement)(_Ae,{selectedWidth:M,setAttributes:o})),(0,Bt.createElement)(rj,{group:"advanced"},(0,Bt.createElement)(lX,{__nextHasNoMarginBottom:!0,label:gr("Link rel"),value:p||"",onChange:e=>o({rel:e})})))};const kAe={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href",__experimentalRole:"content"},title:{type:"string",source:"attribute",selector:"a",attribute:"title",__experimentalRole:"content"},text:{type:"string",source:"html",selector:"a",__experimentalRole:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",__experimentalRole:"content"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:!0,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:wAe}=kAe,EAe={icon:pAe,example:{attributes:{className:"is-style-fill",text:gr("Call to Action")}},edit:qAe,save:function(e){var t,n;let{attributes:o,className:r}=e;const{textAlign:a,fontSize:i,linkTarget:l,rel:s,style:c,text:u,title:p,url:d,width:b}=o;if(!u)return null;const m=Fae(o),M=Xae(o),z=Uae(o),f=fve()("wp-block-button__link",M.className,m.className,{[`has-text-align-${a}`]:a,"no-border-radius":0===(null==c||null===(t=c.border)||void 0===t?void 0:t.radius)},eMe("button")),h={...m.style,...M.style,...z.style},g=fve()(r,{[`has-custom-width wp-block-button__width-${b}`]:b,"has-custom-font-size":i||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)});return(0,Bt.createElement)("div",pK.save({className:g}),(0,Bt.createElement)(Xue.Content,{tagName:"a",className:f,href:d,title:p,style:h,value:u,target:l,rel:s}))},deprecated:AAe,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}},WAe=()=>nve({name:wAe,metadata:kAe,settings:EAe}),LAe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"})),xAe=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...o}=e;return(t||n)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),o},CAe=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:e=>{let{contentJustification:t,orientation:n}=e;return!!t||!!n},migrate:xAe,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,Bt.createElement)("div",pK.save({className:fve()({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,Bt.createElement)(H5.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,Bt.createElement)("div",null,(0,Bt.createElement)(H5.Content,null)),isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate:e=>xAe({...e,align:void 0,contentJustification:e.align})}],RAe=CAe,{name:SAe}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},NAe={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>Ja(SAe,{},e.map((e=>Ja("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>Ja(SAe,{},e.map((e=>{const t=EL(document,e.content),n=t.innerText||"",o=t.querySelector("a");return Ja("core/button",{text:n,url:null==o?void 0:o.getAttribute("href")})}))),isMatch:e=>e.every((e=>{const t=EL(document,e.content),n=t.innerText||"",o=t.querySelectorAll("a");return n.length<=30&&o.length<=1}))}]},TAe=NAe,BAe=[wAe],DAe={name:wAe,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};const IAe=function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,i=pK({className:fve()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),l=fp((e=>{var t;const n=e(wN).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[wAe]}),[]),s=P5(i,{allowedBlocks:BAe,__experimentalDefaultBlock:DAe,__experimentalDirectInsert:!0,template:[[wAe,{className:l&&`is-style-${l}`}]],templateInsertUpdatesSelection:!0});return(0,Bt.createElement)("div",s)};const PAe={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],html:!1,__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:HAe}=PAe,FAe={icon:LAe,example:{innerBlocks:[{name:"core/button",attributes:{text:gr("Find out more")}},{name:"core/button",attributes:{text:gr("Contact us")}}]},deprecated:RAe,transforms:TAe,edit:IAe,save:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,i=pK.save({className:fve()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),l=P5.save(i);return(0,Bt.createElement)("div",l)}},YAe=()=>nve({name:HAe,metadata:PAe,settings:FAe}),XAe=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})),jAe=or()((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));const VAe={from:[{type:"block",blocks:["core/archives"],transform:()=>Ja("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>Ja("core/archives")}]},UAe={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0,anchor:!0,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-calendar"},{name:$Ae}=UAe,GAe={icon:XAe,example:{},edit:function(e){let{attributes:t}=e;const n=pK(),{date:o,hasPosts:r,hasPostsResolved:a}=fp((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(Km),o={status:"publish",per_page:1},r=t("postType","post",o),a=n("getEntityRecords",["postType","post",o]);let i;const l=e("core/editor");if(l){"post"===l.getEditedPostAttribute("type")&&(i=l.getEditedPostAttribute("date"))}return{date:i,hasPostsResolved:a,hasPosts:a&&1===(null==r?void 0:r.length)}}),[]);return r?(0,Bt.createElement)("div",n,(0,Bt.createElement)(ZK,null,(0,Bt.createElement)(uve,{block:"core/calendar",attributes:{...t,...jAe(o)}}))):(0,Bt.createElement)("div",n,(0,Bt.createElement)(Sie,{icon:XAe,label:gr("Calendar")},a?gr("No published posts found."):(0,Bt.createElement)(L0,null)))},transforms:VAe},KAe=()=>nve({name:$Ae,metadata:UAe,settings:GAe}),JAe=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"}));const ZAe={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/categories",title:"Categories List",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1}},supports:{align:!0,anchor:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:QAe}=ZAe,eye={icon:gse,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:o,showPostCounts:r,showOnlyTopLevel:a,showEmpty:i},setAttributes:l,className:s}=t;const c=Tz(e,"blocks-category-select"),u={per_page:-1,hide_empty:!i,context:"view"};a&&(u.parent=0);const{records:p,isResolving:d}=jm("taxonomy","category",u),b=e=>null!=p&&p.length?null===e?p:p.filter((t=>{let{parent:n}=t;return n===e})):[],m=e=>t=>l({[e]:t}),M=e=>e?js(e).trim():gr("(Untitled)"),z=e=>{const t=b(e.id),{id:n,link:a,count:i,name:l}=e;return(0,Bt.createElement)("li",{key:n,className:`cat-item cat-item-${n}`},(0,Bt.createElement)("a",{href:a,target:"_blank",rel:"noreferrer noopener"},M(l)),r&&` (${i})`,o&&!!t.length&&(0,Bt.createElement)("ul",{className:"children"},t.map((e=>z(e)))))},f=(e,t)=>{const{id:n,count:a,name:i}=e,l=b(n);return[(0,Bt.createElement)("option",{key:n,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),M(i),r&&` (${a})`),o&&!!l.length&&l.map((e=>f(e,t+1)))]},h=null==p||!p.length||n||d?"div":"ul",g=pK({className:fve()(s,{"wp-block-categories-list":!(null==p||!p.length||n||d),"wp-block-categories-dropdown":!(null==p||!p.length)&&n&&!d})});return(0,Bt.createElement)(h,g,(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,{title:gr("Settings")},(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Display as dropdown"),checked:n,onChange:m("displayAsDropdown")}),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Show post counts"),checked:r,onChange:m("showPostCounts")}),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Show only top level categories"),checked:a,onChange:m("showOnlyTopLevel")}),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Show empty categories"),checked:i,onChange:m("showEmpty")}),!a&&(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Show hierarchy"),checked:o,onChange:m("showHierarchy")}))),d&&(0,Bt.createElement)(Sie,{icon:JAe,label:gr("Categories")},(0,Bt.createElement)(L0,null)),!d&&0===(null==p?void 0:p.length)&&(0,Bt.createElement)("p",null,gr("Your site does not have any posts, so there is nothing to display here at the moment.")),!d&&(null==p?void 0:p.length)>0&&(n?(()=>{const e=b(o?0:null);return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(uE,{as:"label",htmlFor:c},gr("Categories")),(0,Bt.createElement)("select",{id:c},(0,Bt.createElement)("option",null,gr("Select Category")),e.map((e=>f(e,0)))))})():b(o?0:null).map((e=>z(e)))))}},tye=()=>nve({name:QAe,metadata:ZAe,settings:eye}),nye=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"})),oye=e=>{let{clientId:t}=e;const{replaceBlocks:n}=Lm(wN),o=fp((e=>e(wN).getBlock(t)),[t]);return(0,Bt.createElement)(RW,{onClick:()=>n(o.clientId,gu({HTML:xs(o)}))},gr("Convert to blocks"))};function rye(e){const t=fp((e=>e(wN).getSettings().styles));return(0,Bt.useEffect)((()=>{const{baseURL:n,suffix:o,settings:r}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:o}),window.wp.oldEditor.initialize(e.id,{tinymce:{...r,height:500,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((e=>{let{css:t}=e;const o=n.createElement("style");o.innerHTML=t,n.head.appendChild(o)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Bt.createElement)("textarea",e)}function aye(e){const{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e,[a,i]=(0,Bt.useState)(!1),l=`editor-${t}`,s=gr("Classic Edit");return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(DN,null,(0,Bt.createElement)($W,null,(0,Bt.createElement)(RW,{onClick:()=>i(!0)},s))),n&&(0,Bt.createElement)(Fl,null,n),(a||!n)&&(0,Bt.createElement)(Wj,{title:s,__experimentalHideHeader:!0},(0,Bt.createElement)("h2",{style:{display:"flex",justifyContent:"space-between"}},(0,Bt.createElement)("div",null,s),(0,Bt.createElement)("div",null,(0,Bt.createElement)(bE,{onClick:()=>n?i(!1):r([])},gr("Cancel")),(0,Bt.createElement)(bE,{variant:"primary",onClick:()=>{o({content:window.wp.oldEditor.getContent(l)}),i(!1)}},gr("Save")))),(0,Bt.createElement)(rye,{id:l,defaultValue:n})))}const{wp:iye}=window;function lye(e){let{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e;const{getMultiSelectedBlockClientIds:a}=fp(wN),i=(0,Bt.useRef)(!1);return(0,Bt.useEffect)((()=>{if(!i.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,Bt.useEffect)((()=>{const{baseURL:e,suffix:l}=window.wpEditorL10n.tinymce;function s(e){let t;n&&e.on("loadContent",(()=>e.setContent(n))),e.on("blur",(()=>{var n;t=e.selection.getBookmark(2,!0);const r=document.querySelector(".interface-interface-skeleton__content"),i=r.scrollTop;return null!==(n=a())&&void 0!==n&&n.length||o({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),r.scrollTop!==i&&(r.scrollTop=i))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const i=Dz((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",i),e.on("remove",i.cancel),e.on("keydown",(t=>{Wq.primary(t,"z")&&t.stopPropagation(),t.keyCode!==sq&&t.keyCode!==fq||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(r([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&121===t.keyCode&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:e}=window.wpEditorL10n.tinymce;iye.oldEditor.initialize(`editor-${t}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${t}`,setup:s}})}function u(){"complete"===document.readyState&&c()}return i.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:l}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),iye.oldEditor.remove(`editor-${t}`)}}),[]),(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)("div",{key:"toolbar",id:`toolbar-${t}`,className:"block-library-classic__toolbar",onClick:function(){const e=window.tinymce.get(`editor-${t}`);e&&e.focus()},"data-placeholder":gr("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,Bt.createElement)("div",{key:"editor",id:`editor-${t}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const sye={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:cye}=sye,uye={icon:nye,edit:function(e){const{clientId:t}=e,n=fp((e=>e(wN).canRemoveBlock(t)),[t]),[o,r]=(0,Bt.useState)(!1),a=Xq((e=>{r(e.ownerDocument!==document)}),[]);return(0,Bt.createElement)(Bt.Fragment,null,n&&(0,Bt.createElement)(DN,null,(0,Bt.createElement)($W,null,(0,Bt.createElement)(oye,{clientId:t}))),(0,Bt.createElement)("div",pK({ref:a}),o?(0,Bt.createElement)(aye,e):(0,Bt.createElement)(lye,e)))},save:function(e){let{attributes:t}=e;const{content:n}=t;return(0,Bt.createElement)(Fl,null,n)}},pye=()=>nve({name:cye,metadata:sye,settings:uye}),dye=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));function bye(e){return e.replace(/\[/g,"[")}function mye(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}const Mye={from:[{type:"enter",regExp:/^```$/,transform:()=>Ja("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:e=>{let{content:t}=e;return Ja("core/code",{content:t})}},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return Ja("core/paragraph",{content:t.replace(/\n/g,"
")})}}]},zye=Mye,fye={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code"}},supports:{anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"},{name:hye}=fye,gye={icon:dye,example:{attributes:{content:gr("// A “block” is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );")}},transforms:zye,edit:function(e){let{attributes:t,setAttributes:n,onRemove:o}=e;const r=pK();return(0,Bt.createElement)("pre",r,(0,Bt.createElement)(Xue,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:o,placeholder:gr("Write code…"),"aria-label":gr("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return(0,Bt.createElement)("pre",pK.save(),(0,Bt.createElement)(Xue.Content,{tagName:"code",value:(n=t.content,mn(bye,mye)(n||""))}));var n}},Oye=()=>nve({name:hye,metadata:fye,settings:gye}),vye=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})),Aye=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate:e=>({...e,width:`${e.width}%`}),save(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=fve()({[`is-vertically-aligned-${n}`]:n}),a={flexBasis:o+"%"};return(0,Bt.createElement)("div",{className:r,style:a},(0,Bt.createElement)(H5.Content,null))}}],yye=Aye;const _ye=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:o,allowedBlocks:r},setAttributes:a,clientId:i}=e;const l=fve()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),s=NI({availableUnits:ID("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:p}=fp((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(wN),o=n(i);return{hasChildBlocks:t(i).length>0,rootClientId:o,columnsIds:t(o)}}),[i]),{updateBlockAttributes:d}=Lm(wN),b=Number.isFinite(n)?n+"%":n,m=pK({className:l,style:b?{flexBasis:b}:void 0}),M=c.length,z=c.indexOf(i)+1,f=lr(gr("%1$s (%2$d of %3$d)"),m["aria-label"],z,M),h=P5({...m,"aria-label":f},{templateLock:o,allowedBlocks:r,renderAppender:u?void 0:H5.ButtonBlockAppender});return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(DN,null,(0,Bt.createElement)(CD,{onChange:e=>{a({verticalAlignment:e}),d(p,{verticalAlignment:null})},value:t})),(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,{title:gr("Column settings")},(0,Bt.createElement)(vF,{label:gr("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,a({width:e})},units:s}))),(0,Bt.createElement)("div",h))};const qye={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0}},{name:kye}=qye,wye={icon:vye,edit:_ye,save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=fve()({[`is-vertically-aligned-${n}`]:n});let a;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&null!=o&&o.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}a={flexBasis:e}}const i=pK.save({className:r,style:a}),l=P5.save(i);return(0,Bt.createElement)("div",l)},deprecated:yye},Eye=()=>nve({name:kye,metadata:qye,settings:wye}),Wye=(0,Bt.createElement)(rk,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function Lye(e){let t,{doc:n}=Lye;n||(n=document.implementation.createHTMLDocument(""),Lye.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}const xye=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:o,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:o,customBackgroundColor:r,textColor:a,customTextColor:i}=t,l=a6("background-color",o),s=a6("color",a),c=fve()({"has-background":o||r,"has-text-color":a||i,[l]:l,[s]:s,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:l?void 0:r,color:s?void 0:i};return(0,Bt.createElement)("div",{className:c||void 0,style:u},(0,Bt.createElement)(H5.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==Lye(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let o=Lye(n);return void 0===o&&(o=0),e[o]||(e[o]=[]),e[o].push(t),e}),[]).map((e=>Ja("core/column",{},e))),{columns:o,...r}=e;return[{...r,isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,Bt.createElement)("div",{className:`has-${n}-columns`},(0,Bt.createElement)(H5.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...o}=e;return[e={...o,isStackedOnMobile:!0},t]},save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:o}=t,r=fve()(`has-${o}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,Bt.createElement)("div",{className:r},(0,Bt.createElement)(H5.Content,null))}}],Cye=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Rye(e,t){const{width:n=100/t}=e.attributes;return Cye(n)}function Sye(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>e+Rye(n,t)),0)}function Nye(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const o=Rye(n,t);return Object.assign(e,{[n.clientId]:o})}),{})}function Tye(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const o=Sye(e,n);return Object.fromEntries(Object.entries(Nye(e,n)).map((e=>{let[n,r]=e;return[n,Cye(t*r/o)]})))}function Bye(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}const Dye=["core/column"];const Iye=Mj(((e,t,n)=>({updateAlignment(o){const{clientId:r,setAttributes:a}=t,{updateBlockAttributes:i}=e(wN),{getBlockOrder:l}=n.select(wN);a({verticalAlignment:o});l(r).forEach((e=>{i(e,{verticalAlignment:o})}))},updateColumns(o,r){const{clientId:a}=t,{replaceInnerBlocks:i}=e(wN),{getBlocks:l}=n.select(wN);let s=l(a);const c=function(e){return e.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}))}(s),u=r>o;if(u&&c){const e=Cye(100/r);s=[...Bye(s,Tye(s,100-e)),...Array.from({length:r-o}).map((()=>Ja("core/column",{width:`${e}%`})))]}else if(u)s=[...s,...Array.from({length:r-o}).map((()=>Ja("core/column")))];else if(r{const{canInsertBlockType:t,canRemoveBlock:n,getBlocks:o,getBlockCount:r}=e(wN),i=o(a).reduce(((e,t,o)=>(n(t.clientId)||e.push(o),e)),[]);return{count:r(a),canInsertColumnBlock:t("core/column",a),minCount:Math.max(...i)+1}}),[a]),d=P5(pK({className:fve()({[`are-vertically-aligned-${l}`]:l,"is-not-stacked-on-mobile":!i})}),{allowedBlocks:Dye,orientation:"horizontal",renderAppender:!1,templateLock:s});return(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(DN,null,(0,Bt.createElement)(CD,{onChange:o,value:l})),(0,Bt.createElement)(rj,null,(0,Bt.createElement)(fX,null,u&&(0,Bt.createElement)(Bt.Fragment,null,(0,Bt.createElement)(xY,{__nextHasNoMarginBottom:!0,label:gr("Columns"),value:c,onChange:e=>r(c,Math.max(p,e)),min:Math.max(1,p),max:Math.max(6,c)}),c>6&&(0,Bt.createElement)(tne,{status:"warning",isDismissible:!1},gr("This column count exceeds the recommended amount and may cause visual breakage."))),(0,Bt.createElement)(sD,{__nextHasNoMarginBottom:!0,label:gr("Stack on mobile"),checked:i,onChange:()=>n({isStackedOnMobile:!i})}))),(0,Bt.createElement)("div",d))}));function Pye(e){var t;let{clientId:n,name:o,setAttributes:r}=e;const{blockType:a,defaultVariation:i,variations:l}=fp((e=>{const{getBlockVariations:t,getBlockType:n,getDefaultBlockVariation:r}=e(kl);return{blockType:n(o),defaultVariation:r(o,"block"),variations:t(o,"block")}}),[o]),{replaceInnerBlocks:s}=Lm(wN),c=pK();return(0,Bt.createElement)("div",c,(0,Bt.createElement)(Tie,{icon:null==a||null===(t=a.icon)||void 0===t?void 0:t.src,label:null==a?void 0:a.title,variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;e.attributes&&r(e.attributes),e.innerBlocks&&s(n,Za(e.innerBlocks),!0)},allowSkip:!0}))}const Hye=e=>{const{clientId:t}=e,n=fp((e=>e(wN).getBlocks(t).length>0),[t])?Iye:Pye;return(0,Bt.createElement)(n,e)};const Fye=[{name:"one-column-full",title:gr("100"),description:gr("One column"),icon:(0,Bt.createElement)(rk,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:gr("50 / 50"),description:gr("Two columns; equal split"),icon:(0,Bt.createElement)(rk,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:gr("33 / 66"),description:gr("Two columns; one-third, two-thirds split"),icon:(0,Bt.createElement)(rk,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:gr("66 / 33"),description:gr("Two columns; two-thirds, one-third split"),icon:(0,Bt.createElement)(rk,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:gr("33 / 33 / 33"),description:gr("Three columns; equal split"),icon:(0,Bt.createElement)(rk,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:gr("25 / 50 / 25"),description:gr("Three columns; wide center column"),icon:(0,Bt.createElement)(rk,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Bt.createElement)(nk,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],Yye={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((e=>{let{name:n,attributes:o,innerBlocks:r}=e;return["core/column",{width:`${t}%`},[[n,{...o},r]]]}));return Ja("core/columns",{},Za(n))},isMatch:(e,t)=>{let{length:n}=e;return(1!==t.length||"core/columns"!==t[0].name)&&(n&&n<=6)}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:o,textColor:r,style:a,mediaAlt:i,mediaId:l,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:p,mediaWidth:d,verticalAlignment:b}=e;let m;if("image"!==u&&u)m=["core/video",{id:l,src:p}];else{m=["core/image",{...{id:l,alt:i,url:p,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const M=[["core/column",{width:`${d}%`},[m]],["core/column",{width:100-d+"%"},t]];return"right"===s&&M.reverse(),Ja("core/columns",{align:n,backgroundColor:o,textColor:r,style:a,verticalAlignment:b},Za(M))}}],to:[{type:"block",blocks:["*"],transform:(e,t)=>t.flatMap((e=>e.innerBlocks))}]},Xye=Yye,jye={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Vye}=jye,Uye={icon:Wye,variations:Fye,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:gr("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:gr("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:gr("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:gr("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:xye,edit:Hye,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:o}=t,r=fve()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!n}),a=pK.save({className:r}),i=P5.save(a);return(0,Bt.createElement)("div",i)},transforms:Xye},$ye=()=>nve({name:Vye,metadata:jye,settings:Uye}),Gye=(0,Bt.createElement)(rk,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Bt.createElement)(nk,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})),Kye={attributes:{tagName:{type:"string",default:"div"}},apiVersion:2,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save(e){let{attributes:{tagName:t}}=e;const n=pK.save(),{className:o}=n,r=(null==o?void 0:o.split(" "))||[],a=null==r?void 0:r.filter((e=>"wp-block-comments"!==e)),i={...n,className:a.join(" ")};return(0,Bt.createElement)(t,i,(0,Bt.createElement)(H5.Content,null))}},Jye=[Kye];function Zye(e){let{attributes:{tagName:t},setAttributes:n}=e;const o={section:gr("The
element should represent a standalone portion of the document that can't be better represented by another element."),aside:gr("The