woocommerce/9937.d7cd7c9b.iframe.bundle.js

2 lines
1.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see 9937.d7cd7c9b.iframe.bundle.js.LICENSE.txt */
(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[9937],{"../../node_modules/.pnpm/@wordpress+block-editor@9.8.0_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/@wordpress/block-editor/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{oS:()=>provider,m9:()=>BlockList,LJ:()=>BlockTools,us:()=>observe_typing,Pe:()=>writing_flow,M_:()=>store_store});var selectors_namespaceObject={};__webpack_require__.r(selectors_namespaceObject),__webpack_require__.d(selectors_namespaceObject,{getFormatType:()=>getFormatType,getFormatTypeForBareElement:()=>getFormatTypeForBareElement,getFormatTypeForClassName:()=>getFormatTypeForClassName,getFormatTypes:()=>getFormatTypes});var actions_namespaceObject={};__webpack_require__.r(actions_namespaceObject),__webpack_require__.d(actions_namespaceObject,{addFormatTypes:()=>addFormatTypes,removeFormatTypes:()=>removeFormatTypes});var store_selectors_namespaceObject={};__webpack_require__.r(store_selectors_namespaceObject),__webpack_require__.d(store_selectors_namespaceObject,{__experimentalGetActiveBlockIdByBlockNames:()=>__experimentalGetActiveBlockIdByBlockNames,__experimentalGetAllowedBlocks:()=>__experimentalGetAllowedBlocks,__experimentalGetAllowedPatterns:()=>__experimentalGetAllowedPatterns,__experimentalGetBlockListSettingsForBlocks:()=>__experimentalGetBlockListSettingsForBlocks,__experimentalGetDirectInsertBlock:()=>__experimentalGetDirectInsertBlock,__experimentalGetGlobalBlocksByName:()=>__experimentalGetGlobalBlocksByName,__experimentalGetLastBlockAttributeChanges:()=>__experimentalGetLastBlockAttributeChanges,__experimentalGetParsedPattern:()=>__experimentalGetParsedPattern,__experimentalGetPatternTransformItems:()=>__experimentalGetPatternTransformItems,__experimentalGetPatternsByBlockTypes:()=>__experimentalGetPatternsByBlockTypes,__experimentalGetReusableBlockTitle:()=>__experimentalGetReusableBlockTitle,__unstableGetBlockWithoutInnerBlocks:()=>__unstableGetBlockWithoutInnerBlocks,__unstableGetClientIdWithClientIdsTree:()=>__unstableGetClientIdWithClientIdsTree,__unstableGetClientIdsTree:()=>__unstableGetClientIdsTree,__unstableGetSelectedBlocksWithPartialSelection:()=>__unstableGetSelectedBlocksWithPartialSelection,__unstableGetVisibleBlocks:()=>__unstableGetVisibleBlocks,__unstableIsFullySelected:()=>__unstableIsFullySelected,__unstableIsLastBlockChangeIgnored:()=>__unstableIsLastBlockChangeIgnored,__unstableIsSelectionCollapsed:()=>__unstableIsSelectionCollapsed,__unstableIsSelectionMergeable:()=>__unstableIsSelectionMergeable,areInnerBlocksControlled:()=>areInnerBlocksControlled,canEditBlock:()=>canEditBlock,canInsertBlockType:()=>canInsertBlockType,canInsertBlocks:()=>canInsertBlocks,canLockBlockType:()=>canLockBlockType,canMoveBlock:()=>canMoveBlock,canMoveBlocks:()=>canMoveBlocks,canRemoveBlock:()=>canRemoveBlock,canRemoveBlocks:()=>canRemoveBlocks,didAutomaticChange:()=>didAutomaticChange,getAdjacentBlockClientId:()=>getAdjacentBlockClientId,getBlock:()=>getBlock,getBlockAttributes:()=>getBlockAttributes,getBlockCount:()=>getBlockCount,getBlockHierarchyRootClientId:()=>getBlockHierarchyRootClientId,getBlockIndex:()=>getBlockIndex,getBlockInsertionPoint:()=>getBlockInsertionPoint,getBlockListSettings:()=>getBlockListSettings,getBlockMode:()=>getBlockMode,getBlockName:()=>getBlockName,getBlockOrder:()=>getBlockOrder,getBlockParents:()=>getBlockParents,getBlockParentsByBlockName:()=>getBlockParentsByBlockName,getBlockRootClientId:()=>getBlockRootClientId,getBlockSelectionEnd:()=>getBlockSelectionEnd,getBlockSelectionStart:()=>getBlockSelectionStart,getBlockTransformItems:()=>getBlockTransformItems,getBlocks:()=>getBlocks,getBlocksByClientId:()=>getBlocksByClientId,getClientIdsOfDescendants:()=>getClientIdsOfDescendants,getClientIdsWithDescendants:()=>getClientIdsWithDescendants,getDraggedBlockClientIds:()=>getDraggedBlockClientIds,getFirstMultiSelectedBlockClientId:()=>getFirstMultiSelectedBlockClientId,getGlobalBlockCount:()=>getGlobalBlockCount,getInserterItems:()=>getInserterItems,getLastMultiSelectedBlockClientId:()=>getLastMultiSelectedBlockClientId,getLowestCommonAncestorWithSelectedBlock:()=>getLowestCommonAncestorWithSelectedBlock,getMultiSelectedBlockClientIds:()=>getMultiSelectedBlockClientIds,getMultiSelectedBlocks:()=>getMultiSelectedBlocks,getMultiSelectedBlocksEndClientId:()=>getMultiSelectedBlocksEndClientId,getMultiSelectedBlocksStartClientId:()=>getMultiSelectedBlocksStartClientId,getNextBlockClientId:()=>getNextBlockClientId,getPreviousBlockClientId:()=>getPreviousBlockClientId,getSelectedBlock:()=>getSelectedBlock,getSelectedBlockClientId:()=>getSelectedBlockClientId,getSelectedBlockClientIds:()=>getSelectedBlockClientIds,getSelectedBlockCount:()=>getSelectedBlockCount,getSelectedBlocksInitialCaretPosition:()=>getSelectedBlocksInitialCaretPosition,getSelectionEnd:()=>getSelectionEnd,getSelectionStart:()=>getSelectionStart,getSettings:()=>getSettings,getTemplate:()=>getTemplate,getTemplateLock:()=>getTemplateLock,hasBlockMovingClientId:()=>selectors_hasBlockMovingClientId,hasInserterItems:()=>hasInserterItems,hasMultiSelection:()=>hasMultiSelection,hasSelectedBlock:()=>hasSelectedBlock,hasSelectedInnerBlock:()=>hasSelectedInnerBlock,isAncestorBeingDragged:()=>isAncestorBeingDragged,isAncestorMultiSelected:()=>isAncestorMultiSelected,isBlockBeingDragged:()=>isBlockBeingDragged,isBlockHighlighted:()=>isBlockHighlighted,isBlockInsertionPointVisible:()=>isBlockInsertionPointVisible,isBlockMultiSelected:()=>isBlockMultiSelected,isBlockSelected:()=>isBlockSelected,isBlockValid:()=>isBlockValid,isBlockVisible:()=>isBlockVisible,isBlockWithinSelection:()=>isBlockWithinSelection,isCaretWithinFormattedText:()=>isCaretWithinFormattedText,isDraggingBlocks:()=>isDraggingBlocks,isFirstMultiSelectedBlock:()=>isFirstMultiSelectedBlock,isLastBlockChangePersistent:()=>isLastBlockChangePersistent,isMultiSelecting:()=>selectors_isMultiSelecting,isNavigationMode:()=>selectors_isNavigationMode,isSelectionEnabled:()=>selectors_isSelectionEnabled,isTyping:()=>selectors_isTyping,isValidTemplate:()=>isValidTemplate,wasBlockJustInserted:()=>wasBlockJustInserted});var store_actions_namespaceObject={};__webpack_require__.r(store_actions_namespaceObject),__webpack_require__.d(store_actions_namespaceObject,{__unstableDeleteSelection:()=>__unstableDeleteSelection,__unstableExpandSelection:()=>__unstableExpandSelection,__unstableMarkAutomaticChange:()=>__unstableMarkAutomaticChange,__unstableMarkLastChangeAsPersistent:()=>__unstableMarkLastChangeAsPersistent,__unstableMarkNextChangeAsNotPersistent:()=>__unstableMarkNextChangeAsNotPersistent,__unstableSaveReusableBlock:()=>__unstableSaveReusableBlock,__unstableSplitSelection:()=>__unstableSplitSelection,clearSelectedBlock:()=>clearSelectedBlock,duplicateBlocks:()=>duplicateBlocks,enterFormattedText:()=>enterFormattedText,exitFormattedText:()=>exitFormattedText,flashBlock:()=>flashBlock,hideInsertionPoint:()=>hideInsertionPoint,insertAfterBlock:()=>insertAfterBlock,insertBeforeBlock:()=>insertBeforeBlock,insertBlock:()=>insertBlock,insertBlocks:()=>insertBlocks,insertDefaultBlock:()=>insertDefaultBlock,mergeBlocks:()=>mergeBlocks,moveBlockToPosition:()=>moveBlockToPosition,moveBlocksDown:()=>moveBlocksDown,moveBlocksToPosition:()=>moveBlocksToPosition,moveBlocksUp:()=>moveBlocksUp,multiSelect:()=>multiSelect,receiveBlocks:()=>receiveBlocks,removeBlock:()=>removeBlock,removeBlocks:()=>removeBlocks,replaceBlock:()=>replaceBlock,replaceBlocks:()=>replaceBlocks,replaceInnerBlocks:()=>replaceInnerBlocks,resetBlocks:()=>resetBlocks,resetSelection:()=>resetSelection,selectBlock:()=>selectBlock,selectNextBlock:()=>selectNextBlock,selectPreviousBlock:()=>selectPreviousBlock,selectionChange:()=>selectionChange,setBlockMovingClientId:()=>setBlockMovingClientId,setBlockVisibility:()=>setBlockVisibility,setHasControlledInnerBlocks:()=>setHasControlledInnerBlocks,setNavigationMode:()=>setNavigationMode,setTemplateValidity:()=>setTemplateValidity,showInsertionPoint:()=>showInsertionPoint,startDraggingBlocks:()=>startDraggingBlocks,startMultiSelect:()=>startMultiSelect,startTyping:()=>startTyping,stopDraggingBlocks:()=>stopDraggingBlocks,stopMultiSelect:()=>stopMultiSelect,stopTyping:()=>stopTyping,synchronizeTemplate:()=>synchronizeTemplate,toggleBlockHighlight:()=>toggleBlockHighlight,toggleBlockMode:()=>toggleBlockMode,toggleSelection:()=>toggleSelection,updateBlock:()=>updateBlock,updateBlockAttributes:()=>updateBlockAttributes,updateBlockListSettings:()=>updateBlockListSettings,updateSettings:()=>updateSettings,validateBlocksToTemplate:()=>validateBlocksToTemplate});var text_styles_namespaceObject={};__webpack_require__.r(text_styles_namespaceObject),__webpack_require__.d(text_styles_namespaceObject,{Text:()=>Text,block:()=>styles_block,destructive:()=>destructive,highlighterText:()=>highlighterText,muted:()=>muted,positive:()=>positive,upperCase:()=>upperCase});var build_module_store_actions_namespaceObject={};__webpack_require__.r(build_module_store_actions_namespaceObject),__webpack_require__.d(build_module_store_actions_namespaceObject,{registerShortcut:()=>registerShortcut,unregisterShortcut:()=>unregisterShortcut});var build_module_store_selectors_namespaceObject={};__webpack_require__.r(build_module_store_selectors_namespaceObject),__webpack_require__.d(build_module_store_selectors_namespaceObject,{getAllShortcutKeyCombinations:()=>getAllShortcutKeyCombinations,getAllShortcutRawKeyCombinations:()=>getAllShortcutRawKeyCombinations,getCategoryShortcuts:()=>getCategoryShortcuts,getShortcutAliases:()=>getShortcutAliases,getShortcutDescription:()=>getShortcutDescription,getShortcutKeyCombination:()=>getShortcutKeyCombination,getShortcutRepresentation:()=>getShortcutRepresentation});var metadata_selectors_namespaceObject={};__webpack_require__.r(metadata_selectors_namespaceObject),__webpack_require__.d(metadata_selectors_namespaceObject,{countSelectorsByStatus:()=>countSelectorsByStatus,getCachedResolvers:()=>getCachedResolvers,getIsResolving:()=>getIsResolving,getResolutionError:()=>getResolutionError,getResolutionState:()=>getResolutionState,hasFinishedResolution:()=>hasFinishedResolution,hasResolutionFailed:()=>hasResolutionFailed,hasResolvingSelectors:()=>hasResolvingSelectors,hasStartedResolution:()=>hasStartedResolution,isResolving:()=>isResolving});var metadata_actions_namespaceObject={};__webpack_require__.r(metadata_actions_namespaceObject),__webpack_require__.d(metadata_actions_namespaceObject,{failResolution:()=>failResolution,failResolutions:()=>failResolutions,finishResolution:()=>finishResolution,finishResolutions:()=>finishResolutions,invalidateResolution:()=>invalidateResolution,invalidateResolutionForStore:()=>invalidateResolutionForStore,invalidateResolutionForStoreSelector:()=>invalidateResolutionForStoreSelector,startResolution:()=>startResolution,startResolutions:()=>startResolutions});var notices_build_module_store_actions_namespaceObject={};__webpack_require__.r(notices_build_module_store_actions_namespaceObject),__webpack_require__.d(notices_build_module_store_actions_namespaceObject,{createErrorNotice:()=>createErrorNotice,createInfoNotice:()=>createInfoNotice,createNotice:()=>createNotice,createSuccessNotice:()=>createSuccessNotice,createWarningNotice:()=>createWarningNotice,removeNotice:()=>removeNotice});var notices_build_module_store_selectors_namespaceObject={};__webpack_require__.r(notices_build_module_store_selectors_namespaceObject),__webpack_require__.d(notices_build_module_store_selectors_namespaceObject,{getNotices:()=>getNotices});var tooltip_styles_namespaceObject={};__webpack_require__.r(tooltip_styles_namespaceObject),__webpack_require__.d(tooltip_styles_namespaceObject,{ZI:()=>TooltipContent,TooltipPopoverView:()=>TooltipPopoverView,wy:()=>TooltipShortcut});var toggle_group_control_option_base_styles_namespaceObject={};__webpack_require__.r(toggle_group_control_option_base_styles_namespaceObject),__webpack_require__.d(toggle_group_control_option_base_styles_namespaceObject,{ButtonContentView:()=>ButtonContentView,LabelView:()=>LabelView,rK:()=>buttonActive,uG:()=>buttonView,If:()=>styles_isIcon,eh:()=>labelBlock});var build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+blocks@11.21.0_react@17.0.2/node_modules/@wordpress/blocks/build-module/index.js"),hooks_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@3.57.0/node_modules/@wordpress/hooks/build-module/index.js");(0,hooks_build_module.U2)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function migrateLightBlockWrapper(settings){const{apiVersion=1}=settings;return apiVersion<2&&(0,build_module.pN)(settings,"lightBlockWrapper",!1)&&(settings.apiVersion=2),settings}));var esm_extends=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js"),react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),node_modules_classnames=__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(node_modules_classnames),lodash=__webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"),create_higher_order_component=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js"),emotion_element_c39617d8_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-element-c39617d8.browser.esm.js"),emotion_cache_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+cache@11.11.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js"),memize=__webpack_require__("../../node_modules/.pnpm/memize@1.1.0/node_modules/memize/index.js"),memize_default=__webpack_require__.n(memize),v4=__webpack_require__("../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js");const uuidCache=new Set,memoizedCreateCacheWithContainer=memize_default()((container=>{let key=v4.A().replace(/[0-9]/g,"");for(;uuidCache.has(key);)key=v4.A().replace(/[0-9]/g,"");return uuidCache.add(key),(0,emotion_cache_browser_esm.A)({container,key})}));const style_provider=function StyleProvider(props){const{children,document}=props;if(!document)return null;const cache=memoizedCreateCacheWithContainer(document.head);return(0,react.createElement)(emotion_element_c39617d8_browser_esm.C,{value:cache},children)},toolbar_context=(0,react.createContext)();var helpers_esm_extends=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/esm/extends.js"),deprecated_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+deprecated@3.41.0/node_modules/@wordpress/deprecated/build-module/index.js"),use_instance_id=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js"),build_module_react=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/react.js"),use_debounce=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-debounce/index.js"),use_merge_refs=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-merge-refs/index.js"),floating_ui_core=__webpack_require__("../../node_modules/.pnpm/@floating-ui+core@1.5.2/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),floating_ui_dom=__webpack_require__("../../node_modules/.pnpm/@floating-ui+dom@1.5.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),react_dom=__webpack_require__("../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js");const arrow=options=>{const{element,padding}=options;return{name:"arrow",options,fn:args=>function isRef(value){return Object.prototype.hasOwnProperty.call(value,"current")}(element)?null!=element.current?(0,floating_ui_core.UE)({element:element.current,padding}).fn(args):{}:element?(0,floating_ui_core.UE)({element,padding}).fn(args):{}}};var index="undefined"!=typeof document?react.useLayoutEffect:react.useEffect;function deepEqual(a,b){if(a===b)return!0;if(typeof a!=typeof b)return!1;if("function"==typeof a&&a.toString()===b.toString())return!0;let length,i,keys;if(a&&b&&"object"==typeof a){if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;0!=i--;)if(!deepEqual(a[i],b[i]))return!1;return!0}if(keys=Object.keys(a),length=keys.length,length!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){const key=keys[i];if(("_owner"!==key||!a.$$typeof)&&!deepEqual(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}function useLatestRef(value){const ref=react.useRef(value);return index((()=>{ref.current=value})),ref}var use_reduced_motion=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs"),motion=__webpack_require__("../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/dom/motion.mjs"),use_viewport_match=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js"),use_dialog=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-dialog/index.js"),library_close=__webpack_require__("../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/close.js"),svg=__webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.55.0/node_modules/@wordpress/primitives/build-module/svg/index.js");let previousScrollTop=0;function setLocked(locked){const scrollingElement=document.scrollingElement||document.body;locked&&(previousScrollTop=scrollingElement.scrollTop);const methodName=locked?"add":"remove";scrollingElement.classList[methodName]("lockscroll"),document.documentElement.classList[methodName]("lockscroll"),locked||(scrollingElement.scrollTop=previousScrollTop)}let lockCounter=0;const scroll_lock=function ScrollLock(){return(0,react.useEffect)((()=>(0===lockCounter&&setLocked(!0),++lockCounter,()=>{1===lockCounter&&setLocked(!1),--lockCounter})),[]),null};var process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");const slot_fill_context=(0,react.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==process&&process.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function useSlot(name){const registry=(0,react.useContext)(slot_fill_context),slot=registry.slots[name]||{},slotFills=registry.fills[name],fills=(0,react.useMemo)((()=>slotFills||[]),[slotFills]);return{...slot,updateSlot:(0,react.useCallback)((fillProps=>{registry.updateSlot(name,fillProps)}),[name,registry.updateSlot]),unregisterSlot:(0,react.useCallback)((slotRef=>{registry.unregisterSlot(name,slotRef)}),[name,registry.unregisterSlot]),fills,registerFill:(0,react.useCallback)((fillRef=>{registry.registerFill(name,fillRef)}),[name,registry.registerFill]),unregisterFill:(0,react.useCallback)((fillRef=>{registry.unregisterFill(name,fillRef)}),[name,registry.unregisterFill])}}const context=(0,react.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}}),use_slot=name=>{const{getSlot,subscribe}=(0,react.useContext)(context),[slot,setSlot]=(0,react.useState)(getSlot(name));return(0,react.useEffect)((()=>{setSlot(getSlot(name));return subscribe((()=>{setSlot(getSlot(name))}))}),[name]),slot};function FillComponent(_ref){let{name,children,registerFill,unregisterFill}=_ref;const slot=use_slot(name),ref=(0,react.useRef)({name,children});return(0,react.useLayoutEffect)((()=>(registerFill(name,ref.current),()=>unregisterFill(name,ref.current))),[]),(0,react.useLayoutEffect)((()=>{ref.current.children=children,slot&&slot.forceUpdate()}),[children]),(0,react.useLayoutEffect)((()=>{name!==ref.current.name&&(unregisterFill(ref.current.name,ref.current),ref.current.name=name,registerFill(name,ref.current))}),[name]),slot&&slot.node?("function"==typeof children&&(children=children(slot.props.fillProps)),(0,react_dom.createPortal)(children,slot.node)):null}const fill=props=>(0,react.createElement)(context.Consumer,null,(_ref2=>{let{registerFill,unregisterFill}=_ref2;return(0,react.createElement)(FillComponent,(0,helpers_esm_extends.A)({},props,{registerFill,unregisterFill}))}));var utils=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/utils.js");function isFunction(maybeFunc){return"function"==typeof maybeFunc}class SlotComponent extends react.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot}=this.props;registerSlot(this.props.name,this)}componentWillUnmount(){const{unregisterSlot}=this.props;this.isUnmounted=!0,unregisterSlot(this.props.name,this)}componentDidUpdate(prevProps){const{name,unregisterSlot,registerSlot}=this.props;prevProps.name!==name&&(unregisterSlot(prevProps.name),registerSlot(name,this))}bindNode(node){this.node=node}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){var _getFills;const{children,name,fillProps={},getFills}=this.props,fills=(null!==(_getFills=getFills(name,this))&&void 0!==_getFills?_getFills:[]).map((fill=>{const fillChildren=isFunction(fill.children)?fill.children(fillProps):fill.children;return react.Children.map(fillChildren,((child,childIndex)=>{if(!child||"string"==typeof child)return child;const childKey=child.key||childIndex;return(0,react.cloneElement)(child,{key:childKey})}))})).filter((element=>!(0,utils.s)(element)));return(0,react.createElement)(react.Fragment,null,isFunction(children)?children(fills):fills)}}const slot=props=>(0,react.createElement)(context.Consumer,null,(_ref=>{let{registerSlot,unregisterSlot,getFills}=_ref;return(0,react.createElement)(SlotComponent,(0,helpers_esm_extends.A)({},props,{registerSlot,unregisterSlot,getFills}))}));function useForceUpdate(){const[,setState]=(0,react.useState)({}),mounted=(0,react.useRef)(!0);return(0,react.useEffect)((()=>()=>{mounted.current=!1}),[]),()=>{mounted.current&&setState({})}}function fill_Fill(_ref){let{name,children}=_ref;const slot=useSlot(name),ref=(0,react.useRef)({rerender:useForceUpdate()});if((0,react.useEffect)((()=>(slot.registerFill(ref),()=>{slot.unregisterFill(ref)})),[slot.registerFill,slot.unregisterFill]),!slot.ref||!slot.ref.current)return null;"function"==typeof children&&(children=children(slot.fillProps));const wrappedChildren=(0,react.createElement)(style_provider,{document:slot.ref.current.ownerDocument},children);return(0,react_dom.createPortal)(wrappedChildren,slot.ref.current)}const bubbles_virtually_slot=(0,react.forwardRef)((function slot_Slot(_ref,forwardedRef){let{name,fillProps={},as:Component="div",...props}=_ref;const registry=(0,react.useContext)(slot_fill_context),ref=(0,react.useRef)();return(0,react.useLayoutEffect)((()=>(registry.registerSlot(name,ref,fillProps),()=>{registry.unregisterSlot(name,ref)})),[registry.registerSlot,registry.unregisterSlot,name]),(0,react.useLayoutEffect)((()=>{registry.updateSlot(name,fillProps)})),(0,react.createElement)(Component,(0,helpers_esm_extends.A)({ref:(0,use_merge_refs.A)([forwardedRef,ref])},props))}));function slot_fill_Fill(props){return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(fill,props),(0,react.createElement)(fill_Fill,props))}const slot_fill_Slot=(0,react.forwardRef)(((_ref,ref)=>{let{bubblesVirtually,...props}=_ref;return bubblesVirtually?(0,react.createElement)(bubbles_virtually_slot,(0,helpers_esm_extends.A)({},props,{ref})):(0,react.createElement)(slot,props)}));function createSlotFill(name){const FillComponent=props=>(0,react.createElement)(slot_fill_Fill,(0,helpers_esm_extends.A)({name},props));FillComponent.displayName=name+"Fill";const SlotComponent=props=>(0,react.createElement)(slot_fill_Slot,(0,helpers_esm_extends.A)({name},props));return SlotComponent.displayName=name+"Slot",SlotComponent.__unstableName=name,{Fill:FillComponent,Slot:SlotComponent}}const PLACEMENT_TO_ANIMATION_ORIGIN={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}},getFrameOffset=document=>{var _document$defaultView;const frameElement=null==document||null===(_document$defaultView=document.defaultView)||void 0===_document$defaultView?void 0:_document$defaultView.frameElement;if(!frameElement)return;const iframeRect=frameElement.getBoundingClientRect();return{x:iframeRect.left,y:iframeRect.top}},SLOT_NAME="Popover",ArrowTriangle=props=>(0,react.createElement)(svg.t4,(0,helpers_esm_extends.A)({},props,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"components-popover__triangle",role:"presentation"}),(0,react.createElement)(svg.wA,{className:"components-popover__triangle-bg",d:"M 0 0 L 50 50 L 100 0"}),(0,react.createElement)(svg.wA,{className:"components-popover__triangle-border",d:"M 0 0 L 50 50 L 100 0",vectorEffect:"non-scaling-stroke"})),MaybeAnimatedWrapper=(0,react.forwardRef)(((_ref,forwardedRef)=>{let{style:receivedInlineStyles,placement,shouldAnimate=!1,...props}=_ref;const shouldReduceMotion=(0,use_reduced_motion.I)(),{style:motionInlineStyles,...otherMotionProps}=(0,react.useMemo)((()=>(placement=>{const translateProp=placement.startsWith("top")||placement.startsWith("bottom")?"translateY":"translateX",translateDirection=placement.startsWith("top")||placement.startsWith("left")?1:-1;return{style:PLACEMENT_TO_ANIMATION_ORIGIN[placement],initial:{opacity:0,scale:0,[translateProp]:2*translateDirection+"em"},animate:{opacity:1,scale:1,[translateProp]:0},transition:{duration:.1,ease:[0,0,.2,1]}}})(placement)),[placement]);return shouldAnimate&&!shouldReduceMotion?(0,react.createElement)(motion.P.div,(0,helpers_esm_extends.A)({style:{...motionInlineStyles,...receivedInlineStyles}},otherMotionProps,props,{ref:forwardedRef})):(0,react.createElement)("div",(0,helpers_esm_extends.A)({style:receivedInlineStyles},props,{ref:forwardedRef}))})),slotNameContext=(0,react.createContext)(),PopoverContainer=(0,react.forwardRef)(((_ref2,forwardedRef)=>{let{range,animate=!0,headerTitle,onClose,children,className,noArrow=!0,isAlternate,position,placement:placementProp="bottom-start",offset:offsetProp=0,focusOnMount="firstElement",anchorRef,anchorRect,getAnchorRect,expandOnMobile,onFocusOutside,__unstableSlotName=SLOT_NAME,__unstableObserveElement,__unstableForcePosition=!1,__unstableShift=!1,...contentProps}=_ref2;range&&(0,deprecated_build_module.A)("range prop in Popover component",{since:"6.1",version:"6.3"});const arrowRef=(0,react.useRef)(null),anchorRefFallback=(0,react.useRef)(null),isMobileViewport=(0,use_viewport_match.A)("medium","<"),isExpanded=expandOnMobile&&isMobileViewport,hasArrow=!isExpanded&&!noArrow,normalizedPlacementFromProps=position?(position=>{const[x,y,z]=position.split(" ");if(["top","bottom"].includes(x)){let suffix="";return z&&"left"===z||"right"===y?suffix="-start":(z&&"right"===z||"left"===y)&&(suffix="-end"),x+suffix}return y})(position):placementProp,referenceOwnerDocument=(0,react.useMemo)((()=>{var _documentToReturn;let documentToReturn;if(null!=anchorRef&&anchorRef.top)documentToReturn=null==anchorRef?void 0:anchorRef.top.ownerDocument;else if(null!=anchorRef&&anchorRef.startContainer)documentToReturn=anchorRef.startContainer.ownerDocument;else if(null!=anchorRef&&anchorRef.current)documentToReturn=anchorRef.current.ownerDocument;else if(anchorRef)documentToReturn=anchorRef.ownerDocument;else if(anchorRect&&null!=anchorRect&&anchorRect.ownerDocument)documentToReturn=anchorRect.ownerDocument;else if(getAnchorRect){var _getAnchorRect;documentToReturn=null===(_getAnchorRect=getAnchorRect(anchorRefFallback.current))||void 0===_getAnchorRect?void 0:_getAnchorRect.ownerDocument}return null!==(_documentToReturn=documentToReturn)&&void 0!==_documentToReturn?_documentToReturn:document}),[anchorRef,anchorRect,getAnchorRect]),frameOffsetRef=(0,react.useRef)(getFrameOffset(referenceOwnerDocument)),offsetRef=(0,react.useRef)(offsetProp),middleware=[(0,floating_ui_core.cY)((_ref3=>{let{placement:currentPlacement}=_ref3;if(!frameOffsetRef.current)return offsetRef.current;const mainAxis=currentPlacement.includes("top")||currentPlacement.includes("bottom")?"y":"x",crossAxis="x"===mainAxis?"y":"x",mainAxisModifier=currentPlacement.includes("top")||currentPlacement.includes("left")?-1:1;return{mainAxis:offsetRef.current+frameOffsetRef.current[mainAxis]*mainAxisModifier,crossAxis:frameOffsetRef.current[crossAxis]}})),__unstableForcePosition?void 0:(0,floating_ui_core.UU)(),__unstableForcePosition?void 0:(0,floating_ui_core.Ej)({apply(sizeProps){const{availableHeight}=sizeProps;refs.floating.current&&Object.assign(refs.floating.current.firstChild.style,{maxHeight:`${availableHeight}px`,overflow:"auto"})}}),__unstableShift?(0,floating_ui_core.BN)({crossAxis:!0,limiter:(0,floating_ui_core.ER)(),padding:1}):void 0,hasArrow?arrow({element:arrowRef}):void 0].filter((m=>!!m)),slotName=(0,react.useContext)(slotNameContext)||__unstableSlotName,slot=useSlot(slotName);let onDialogClose;(onClose||onFocusOutside)&&(onDialogClose=(type,event)=>{"focus-outside"===type&&onFocusOutside?onFocusOutside(event):onClose&&onClose()});const[dialogRef,dialogProps]=(0,use_dialog.A)({focusOnMount,__unstableOnClose:onDialogClose,onClose:onDialogClose}),{x,y,reference,floating,refs,strategy,update,placement:computedPlacement,middlewareData:{arrow:arrowData={}}}=function useFloating(options){void 0===options&&(options={});const{placement="bottom",strategy="absolute",middleware=[],platform,whileElementsMounted,open}=options,[data,setData]=react.useState({x:null,y:null,strategy,placement,middlewareData:{},isPositioned:!1}),[latestMiddleware,setLatestMiddleware]=react.useState(middleware);deepEqual(latestMiddleware,middleware)||setLatestMiddleware(middleware);const referenceRef=react.useRef(null),floatingRef=react.useRef(null),dataRef=react.useRef(data),whileElementsMountedRef=useLatestRef(whileElementsMounted),platformRef=useLatestRef(platform),[reference,_setReference]=react.useState(null),[floating,_setFloating]=react.useState(null),setReference=react.useCallback((node=>{referenceRef.current!==node&&(referenceRef.current=node,_setReference(node))}),[]),setFloating=react.useCallback((node=>{floatingRef.current!==node&&(floatingRef.current=node,_setFloating(node))}),[]),update=react.useCallback((()=>{if(!referenceRef.current||!floatingRef.current)return;const config={placement,strategy,middleware:latestMiddleware};platformRef.current&&(config.platform=platformRef.current),(0,floating_ui_dom.rD)(referenceRef.current,floatingRef.current,config).then((data=>{const fullData={...data,isPositioned:!0};isMountedRef.current&&!deepEqual(dataRef.current,fullData)&&(dataRef.current=fullData,react_dom.flushSync((()=>{setData(fullData)})))}))}),[latestMiddleware,placement,strategy,platformRef]);index((()=>{!1===open&&dataRef.current.isPositioned&&(dataRef.current.isPositioned=!1,setData((data=>({...data,isPositioned:!1}))))}),[open]);const isMountedRef=react.useRef(!1);index((()=>(isMountedRef.current=!0,()=>{isMountedRef.current=!1})),[]),index((()=>{if(reference&&floating){if(whileElementsMountedRef.current)return whileElementsMountedRef.current(reference,floating,update);update()}}),[reference,floating,update,whileElementsMountedRef]);const refs=react.useMemo((()=>({reference:referenceRef,floating:floatingRef,setReference,setFloating})),[setReference,setFloating]),elements=react.useMemo((()=>({reference,floating})),[reference,floating]);return react.useMemo((()=>({...data,update,refs,elements,reference:setReference,floating:setFloating})),[data,update,refs,elements,setReference,setFloating])}({placement:normalizedPlacementFromProps,middleware});(0,react.useEffect)((()=>{offsetRef.current=offsetProp,update()}),[offsetProp,update]),(0,react.useLayoutEffect)((()=>{let resultingReferenceRef;if(null!=anchorRef&&anchorRef.top?resultingReferenceRef={getBoundingClientRect(){const topRect=anchorRef.top.getBoundingClientRect(),bottomRect=anchorRef.bottom.getBoundingClientRect();return new window.DOMRect(topRect.x,topRect.y,topRect.width,bottomRect.bottom-topRect.top)}}:null!=anchorRef&&anchorRef.current?resultingReferenceRef=anchorRef.current:anchorRef?resultingReferenceRef=anchorRef:anchorRect?resultingReferenceRef={getBoundingClientRect:()=>anchorRect}:getAnchorRect?resultingReferenceRef={getBoundingClientRect(){var _rect$x,_rect$y,_rect$width,_rect$height;const rect=getAnchorRect(anchorRefFallback.current);return new window.DOMRect(null!==(_rect$x=rect.x)&&void 0!==_rect$x?_rect$x:rect.left,null!==(_rect$y=rect.y)&&void 0!==_rect$y?_rect$y:rect.top,null!==(_rect$width=rect.width)&&void 0!==_rect$width?_rect$width:rect.right-rect.left,null!==(_rect$height=rect.height)&&void 0!==_rect$height?_rect$height:rect.bottom-rect.top)}}:anchorRefFallback.current&&(resultingReferenceRef=anchorRefFallback.current.parentNode),resultingReferenceRef&&(reference(resultingReferenceRef),refs.floating.current))return(0,floating_ui_dom.ll)(resultingReferenceRef,refs.floating.current,update)}),[anchorRef,anchorRect,getAnchorRect,update]),(0,react.useLayoutEffect)((()=>{if(!__unstableObserveElement)return;const observer=new window.MutationObserver(update);return observer.observe(__unstableObserveElement,{attributes:!0}),()=>{observer.disconnect()}}),[__unstableObserveElement,update]),(0,react.useLayoutEffect)((()=>{var _referenceOwnerDocume;if(referenceOwnerDocument===document)return void(frameOffsetRef.current=void 0);const{defaultView}=referenceOwnerDocument;let updateFrameOffset;referenceOwnerDocument.addEventListener("scroll",update);return!(null==referenceOwnerDocument||null===(_referenceOwnerDocume=referenceOwnerDocument.defaultView)||void 0===_referenceOwnerDocume||!_referenceOwnerDocume.frameElement)&&(updateFrameOffset=()=>{frameOffsetRef.current=getFrameOffset(referenceOwnerDocument),update()},updateFrameOffset(),defaultView.addEventListener("resize",updateFrameOffset)),()=>{referenceOwnerDocument.removeEventListener("scroll",update),updateFrameOffset&&defaultView.removeEventListener("resize",updateFrameOffset)}}),[referenceOwnerDocument,update]);const mergedFloatingRef=(0,use_merge_refs.A)([floating,dialogRef,forwardedRef]);let content=(0,react.createElement)(MaybeAnimatedWrapper,(0,helpers_esm_extends.A)({shouldAnimate:animate&&!isExpanded,placement:computedPlacement,className:classnames_default()("components-popover",className,{"is-expanded":isExpanded,"is-alternate":isAlternate})},contentProps,{ref:mergedFloatingRef},dialogProps,{tabIndex:"-1",style:isExpanded?void 0:{position:strategy,left:Number.isNaN(x)?0:x,top:Number.isNaN(y)?0:y}}),isExpanded&&(0,react.createElement)(scroll_lock,null),isExpanded&&(0,react.createElement)("div",{className:"components-popover__header"},(0,react.createElement)("span",{className:"components-popover__header-title"},headerTitle),(0,react.createElement)(build_module_button,{className:"components-popover__close",icon:library_close.A,onClick:onClose})),(0,react.createElement)("div",{className:"components-popover__content"},children),hasArrow&&(0,react.createElement)("div",{ref:arrowRef,className:["components-popover__arrow",`is-${computedPlacement.split("-")[0]}`].join(" "),style:{left:Number.isFinite(null==arrowData?void 0:arrowData.x)?`${arrowData.x}px`:"",top:Number.isFinite(null==arrowData?void 0:arrowData.y)?`${arrowData.y}px`:""}},(0,react.createElement)(ArrowTriangle,null)));return slot.ref&&(content=(0,react.createElement)(slot_fill_Fill,{name:slotName},content)),anchorRef||anchorRect?content:(0,react.createElement)("span",{ref:anchorRefFallback},content)}));PopoverContainer.Slot=(0,react.forwardRef)((function PopoverSlot(_ref4,ref){let{name=SLOT_NAME}=_ref4;return(0,react.createElement)(slot_fill_Slot,{bubblesVirtually:!0,name,className:"popover-slot",ref})})),PopoverContainer.__unstableSlotNameProvider=slotNameContext.Provider;const popover=PopoverContainer;const build_module_shortcut=function Shortcut(props){const{shortcut,className}=props;if(!shortcut)return null;let displayText,ariaLabel;return"string"==typeof shortcut&&(displayText=shortcut),null!==shortcut&&"object"==typeof shortcut&&(displayText=shortcut.display,ariaLabel=shortcut.ariaLabel),(0,react.createElement)("span",{className,"aria-label":ariaLabel},displayText)},TOOLTIP_DELAY=700,eventCatcher=(0,react.createElement)("div",{className:"event-catcher"}),getDisabledElement=_ref=>{let{eventHandlers,child,childrenWithPopover,mergedRefs}=_ref;return(0,react.cloneElement)((0,react.createElement)("span",{className:"disabled-element-wrapper"},(0,react.cloneElement)(eventCatcher,eventHandlers),(0,react.cloneElement)(child,{children:childrenWithPopover,ref:mergedRefs})),{...eventHandlers})},getRegularElement=_ref2=>{let{child,eventHandlers,childrenWithPopover,mergedRefs}=_ref2;return(0,react.cloneElement)(child,{...eventHandlers,children:childrenWithPopover,ref:mergedRefs})},emitToChild=(children,eventName,event)=>{if(1!==react.Children.count(children))return;const child=react.Children.only(children);child.props.disabled||"function"==typeof child.props[eventName]&&child.props[eventName](event)};const tooltip=function Tooltip(props){var _Children$toArray$;const{children,position="bottom middle",text,shortcut,delay=TOOLTIP_DELAY}=props,[isMouseDown,setIsMouseDown]=(0,react.useState)(!1),[isOver,setIsOver]=(0,react.useState)(!1),delayedSetIsOver=(0,use_debounce.A)(setIsOver,delay),childRef=(0,react.useRef)(null),existingChildRef=null===(_Children$toArray$=react.Children.toArray(children)[0])||void 0===_Children$toArray$?void 0:_Children$toArray$.ref,mergedChildRefs=(0,use_merge_refs.A)([childRef,existingChildRef]),createMouseDown=event=>{"OPTION"!==event.target.tagName&&(emitToChild(children,"onMouseDown",event),document.addEventListener("mouseup",cancelIsMouseDown),setIsMouseDown(!0))},createMouseUp=event=>{"OPTION"!==event.target.tagName&&(emitToChild(children,"onMouseUp",event),document.removeEventListener("mouseup",cancelIsMouseDown),setIsMouseDown(!1))},createMouseEvent=type=>"mouseUp"===type?createMouseUp:"mouseDown"===type?createMouseDown:void 0,cancelIsMouseDown=createMouseEvent("mouseUp"),createToggleIsOver=(eventName,isDelayed)=>event=>{if(emitToChild(children,eventName,event),event.currentTarget.disabled)return;if("focus"===event.type&&isMouseDown)return;delayedSetIsOver.cancel();const _isOver=["focus","mouseenter"].includes(event.type);_isOver!==isOver&&(isDelayed?delayedSetIsOver(_isOver):setIsOver(_isOver))},clearOnUnmount=()=>{delayedSetIsOver.cancel(),document.removeEventListener("mouseup",cancelIsMouseDown)};if((0,react.useEffect)((()=>clearOnUnmount),[]),1!==react.Children.count(children))return children;const eventHandlers={onMouseEnter:createToggleIsOver("onMouseEnter",!0),onMouseLeave:createToggleIsOver("onMouseLeave"),onClick:createToggleIsOver("onClick"),onFocus:createToggleIsOver("onFocus"),onBlur:createToggleIsOver("onBlur"),onMouseDown:createMouseEvent("mouseDown")},child=react.Children.only(children),{children:grandchildren,disabled}=child.props,getElementWithPopover=disabled?getDisabledElement:getRegularElement,childrenWithPopover=(_ref3=>{let{anchorRef,grandchildren,isOver,offset,position,shortcut,text}=_ref3;return(0,build_module_react.oG)(grandchildren,isOver&&(0,react.createElement)(popover,{focusOnMount:!1,position,className:"components-tooltip","aria-hidden":"true",animate:!1,offset,anchorRef,__unstableShift:!0},text,(0,react.createElement)(build_module_shortcut,{className:"components-tooltip__shortcut",shortcut})))})({grandchildren,...{anchorRef:childRef,isOver,offset:4,position,shortcut,text}});return getElementWithPopover({child,eventHandlers,childrenWithPopover,mergedRefs:mergedChildRefs})};const dashicon=function Dashicon(_ref){let{icon,className,...extraProps}=_ref;const iconClass=["dashicon","dashicons","dashicons-"+icon,className].filter(Boolean).join(" ");return(0,react.createElement)("span",(0,helpers_esm_extends.A)({className:iconClass},extraProps))};const build_module_icon=function Icon(_ref){let{icon=null,size=24,...additionalProps}=_ref;if("string"==typeof icon)return(0,react.createElement)(dashicon,(0,helpers_esm_extends.A)({icon},additionalProps));if((0,react.isValidElement)(icon)&&dashicon===icon.type)return(0,react.cloneElement)(icon,{...additionalProps});if("function"==typeof icon)return icon.prototype instanceof react.Component?(0,react.createElement)(icon,{size,...additionalProps}):icon({size,...additionalProps});if(icon&&("svg"===icon.type||icon.type===svg.t4)){const appliedProps={width:size,height:size,...icon.props,...additionalProps};return(0,react.createElement)(svg.t4,appliedProps)}return(0,react.isValidElement)(icon)?(0,react.cloneElement)(icon,{size,...additionalProps}):icon};var context_system_provider_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");const ComponentsContext=(0,react.createContext)({}),useComponentsContext=()=>(0,react.useContext)(ComponentsContext);function useContextSystemBridge(_ref){let{value}=_ref;const parentContext=useComponentsContext(),valueRef=(0,react.useRef)(value);!function useUpdateEffect(effect,deps){const mounted=(0,react.useRef)(!1);(0,react.useEffect)((()=>{if(mounted.current)return effect();mounted.current=!0}),deps)}((()=>{(0,lodash.isEqual)(valueRef.current,value)&&valueRef.current!==value&&void 0!==context_system_provider_process&&context_system_provider_process.env}),[value]);return(0,react.useMemo)((()=>(0,lodash.merge)((0,lodash.cloneDeep)(parentContext),value)),[parentContext,value])}const ContextSystemProvider=(0,react.memo)((_ref2=>{let{children,value}=_ref2;const contextValue=useContextSystemBridge({value});return(0,react.createElement)(ComponentsContext.Provider,{value:contextValue},children)})),COMPONENT_NAMESPACE="data-wp-component",CONNECTED_NAMESPACE="data-wp-c16t",CONNECT_STATIC_NAMESPACE="__contextSystemKey__";const getStyledClassNameFromKey=memize_default()((function getStyledClassName(namespace){return`components-${(0,lodash.kebabCase)(namespace)}`}));var emotion_utils_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+utils@1.2.1/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js"),emotion_css_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.js");const useCx=()=>{const cache=(0,emotion_element_c39617d8_browser_esm._)();return(0,react.useCallback)((function(){if(null===cache)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var _len=arguments.length,classNames=new Array(_len),_key=0;_key<_len;_key++)classNames[_key]=arguments[_key];return(0,emotion_css_esm.cx)(...classNames.map((arg=>(o=>null!=o&&["name","styles"].every((p=>void 0!==o[p])))(arg)?((0,emotion_utils_browser_esm.sk)(cache,arg,!1),`${cache.key}-${arg.name}`):arg)))}),[cache])};var use_context_system_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");function useContextSystem(props,namespace){const contextSystemProps=useComponentsContext();void 0===namespace&&void 0!==use_context_system_process&&use_context_system_process.env;const contextProps=(null==contextSystemProps?void 0:contextSystemProps[namespace])||{},finalComponentProps={[CONNECTED_NAMESPACE]:!0,...(componentName=namespace,{[COMPONENT_NAMESPACE]:componentName})};var componentName;const{_overrides:overrideProps,...otherContextProps}=contextProps,initialMergedProps=Object.entries(otherContextProps).length?Object.assign({},otherContextProps,props):props,classes=useCx()(getStyledClassNameFromKey(namespace),props.className),rendered="function"==typeof initialMergedProps.renderChildren?initialMergedProps.renderChildren(initialMergedProps):initialMergedProps.children;for(const key in initialMergedProps)finalComponentProps[key]=initialMergedProps[key];for(const key in overrideProps)finalComponentProps[key]=overrideProps[key];return void 0!==rendered&&(finalComponentProps.children=rendered),finalComponentProps.className=classes,finalComponentProps}var context_connect_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");function contextConnect(Component,namespace){let options=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:memoProp=!1}=options;let WrappedComponent=(0,react.forwardRef)(Component);memoProp&&(WrappedComponent=(0,react.memo)(WrappedComponent)),void 0===namespace&&void 0!==context_connect_process&&context_connect_process.env;let mergedNamespace=WrappedComponent[CONNECT_STATIC_NAMESPACE]||[namespace];return Array.isArray(namespace)&&(mergedNamespace=[...mergedNamespace,...namespace]),"string"==typeof namespace&&(mergedNamespace=[...mergedNamespace,namespace]),WrappedComponent.displayName=namespace,WrappedComponent[CONNECT_STATIC_NAMESPACE]=[...new Set(mergedNamespace)],WrappedComponent.selector=`.${getStyledClassNameFromKey(namespace)}`,WrappedComponent}function getConnectNamespace(Component){if(!Component)return[];let namespaces=[];return Component[CONNECT_STATIC_NAMESPACE]&&(namespaces=Component[CONNECT_STATIC_NAMESPACE]),Component.type&&Component.type[CONNECT_STATIC_NAMESPACE]&&(namespaces=Component.type[CONNECT_STATIC_NAMESPACE]),namespaces}function hasConnectNamespace(Component,match){return!!Component&&("string"==typeof match?getConnectNamespace(Component).includes(match):!!Array.isArray(match)&&match.some((result=>getConnectNamespace(Component).includes(result))))}const visuallyHidden={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"};var emotion_styled_base_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js");const View=(0,emotion_styled_base_browser_esm.A)("div",{target:"em57xhy0"})("");View.selector=".components-view",View.displayName="View";const component=View;const visually_hidden_component=contextConnect((function UnconnectedVisuallyHidden(props,forwardedRef){const{style:styleProp,...contextProps}=useContextSystem(props,"VisuallyHidden");return(0,react.createElement)(component,(0,helpers_esm_extends.A)({ref:forwardedRef},contextProps,{style:{...visuallyHidden,...styleProp||{}}}))}),"VisuallyHidden"),disabledEventsOnDisabledButton=["onMouseDown","onClick"];const build_module_button=(0,react.forwardRef)((function Button(props,ref){const{href,target,isSmall,isPressed,isBusy,isDestructive,className,disabled,icon,iconPosition="left",iconSize,showTooltip,tooltipPosition,shortcut,label,children,text,variant,__experimentalIsFocusable:isFocusable,describedBy,...additionalProps}=function useDeprecatedProps(_ref){let{isDefault,isPrimary,isSecondary,isTertiary,isLink,variant,...otherProps}=_ref,computedVariant=variant;var _computedVariant,_computedVariant2,_computedVariant3,_computedVariant4,_computedVariant5;return isPrimary&&(null!==(_computedVariant=computedVariant)&&void 0!==_computedVariant||(computedVariant="primary")),isTertiary&&(null!==(_computedVariant2=computedVariant)&&void 0!==_computedVariant2||(computedVariant="tertiary")),isSecondary&&(null!==(_computedVariant3=computedVariant)&&void 0!==_computedVariant3||(computedVariant="secondary")),isDefault&&((0,deprecated_build_module.A)("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(_computedVariant4=computedVariant)&&void 0!==_computedVariant4||(computedVariant="secondary")),isLink&&(null!==(_computedVariant5=computedVariant)&&void 0!==_computedVariant5||(computedVariant="link")),{...otherProps,variant:computedVariant}}(props),instanceId=(0,use_instance_id.A)(Button,"components-button__description"),classes=classnames_default()("components-button",className,{"is-secondary":"secondary"===variant,"is-primary":"primary"===variant,"is-small":isSmall,"is-tertiary":"tertiary"===variant,"is-pressed":isPressed,"is-busy":isBusy,"is-link":"link"===variant,"is-destructive":isDestructive,"has-text":!!icon&&!!children,"has-icon":!!icon}),trulyDisabled=disabled&&!isFocusable,Tag=void 0===href||trulyDisabled?"button":"a",tagProps="a"===Tag?{href,target}:{type:"button",disabled:trulyDisabled,"aria-pressed":isPressed};if(disabled&&isFocusable){tagProps["aria-disabled"]=!0;for(const disabledEvent of disabledEventsOnDisabledButton)additionalProps[disabledEvent]=event=>{event.stopPropagation(),event.preventDefault()}}const shouldShowTooltip=!trulyDisabled&&(showTooltip&&label||shortcut||!!label&&!(null!=children&&children.length)&&!1!==showTooltip),descriptionId=describedBy?instanceId:null,describedById=additionalProps["aria-describedby"]||descriptionId,element=(0,react.createElement)(Tag,(0,helpers_esm_extends.A)({},tagProps,additionalProps,{className:classes,"aria-label":additionalProps["aria-label"]||label,"aria-describedby":describedById,ref}),icon&&"left"===iconPosition&&(0,react.createElement)(build_module_icon,{icon,size:iconSize}),text&&(0,react.createElement)(react.Fragment,null,text),icon&&"right"===iconPosition&&(0,react.createElement)(build_module_icon,{icon,size:iconSize}),children);return shouldShowTooltip?(0,react.createElement)(react.Fragment,null,(0,react.createElement)(tooltip,{text:null!=children&&children.length&&describedBy?describedBy:label,shortcut,position:tooltipPosition},element),describedBy&&(0,react.createElement)(visually_hidden_component,null,(0,react.createElement)("span",{id:descriptionId},describedBy))):(0,react.createElement)(react.Fragment,null,element,describedBy&&(0,react.createElement)(visually_hidden_component,null,(0,react.createElement)("span",{id:descriptionId},describedBy)))}));var ToolbarItem=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Toolbar/ToolbarItem.js"),toolbar_item_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");const toolbar_item=(0,react.forwardRef)((function toolbar_item_ToolbarItem(_ref,ref){let{children,as:Component,...props}=_ref;const accessibleToolbarState=(0,react.useContext)(toolbar_context);if("function"!=typeof children&&!Component)return void 0!==toolbar_item_process&&toolbar_item_process.env,null;const allProps={...props,ref,"data-toolbar-item":!0};return accessibleToolbarState?(0,react.createElement)(ToolbarItem.T,(0,helpers_esm_extends.A)({},accessibleToolbarState,allProps,{as:Component}),children):Component?(0,react.createElement)(Component,allProps,children):children(allProps)})),toolbar_button_container=props=>(0,react.createElement)("div",{className:props.className},props.children);const toolbar_button=(0,react.forwardRef)((function ToolbarButton(_ref,ref){let{containerClassName,className,extraProps,children,title,isActive,isDisabled,...props}=_ref;return(0,react.useContext)(toolbar_context)?(0,react.createElement)(toolbar_item,(0,helpers_esm_extends.A)({className:classnames_default()("components-toolbar-button",className)},extraProps,props,{ref}),(toolbarItemProps=>(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({label:title,isPressed:isActive,disabled:isDisabled},toolbarItemProps),children))):(0,react.createElement)(toolbar_button_container,{className:containerClassName},(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({ref,icon:props.icon,label:title,shortcut:props.shortcut,"data-subscript":props.subscript,onClick:event=>{event.stopPropagation(),props.onClick&&props.onClick(event)},className:classnames_default()("components-toolbar__control",className),isPressed:isActive,disabled:isDisabled,"data-toolbar-item":!0},extraProps,props),children))})),toolbar_group_container=_ref=>{let{className,children,...props}=_ref;return(0,react.createElement)("div",(0,helpers_esm_extends.A)({className},props),children)};var keycodes_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/index.js"),build_module_svg=__webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.45.0/node_modules/@wordpress/primitives/build-module/svg/index.js");const library_menu=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function Dropdown(props){const{renderContent,renderToggle,className,contentClassName,expandOnMobile,headerTitle,focusOnMount,position,popoverProps,onClose,onToggle,style}=props,containerRef=(0,react.useRef)(),[isOpen,setIsOpen]=function useObservableState(initialState,onStateChange){const[state,setState]=(0,react.useState)(initialState);return[state,value=>{setState(value),onStateChange&&onStateChange(value)}]}(!1,onToggle);function close(){onClose&&onClose(),setIsOpen(!1)}(0,react.useEffect)((()=>()=>{onToggle&&isOpen&&onToggle(!1)}),[onToggle,isOpen]);const args={isOpen,onToggle:function toggle(){setIsOpen(!isOpen)},onClose:close},hasAnchorRef=!(null==popoverProps||!popoverProps.anchorRef)||!(null==popoverProps||!popoverProps.getAnchorRect)||!(null==popoverProps||!popoverProps.anchorRect);return(0,react.createElement)("div",{className:classnames_default()("components-dropdown",className),ref:containerRef,tabIndex:"-1",style},renderToggle(args),isOpen&&(0,react.createElement)(popover,(0,helpers_esm_extends.A)({position,onClose:close,onFocusOutside:function closeIfFocusOutside(){const{ownerDocument}=containerRef.current,dialog=ownerDocument.activeElement.closest('[role="dialog"]');containerRef.current.contains(ownerDocument.activeElement)||dialog&&!dialog.contains(containerRef.current)||close()},expandOnMobile,headerTitle,focusOnMount,offset:13,anchorRef:hasAnchorRef?void 0:containerRef},popoverProps,{className:classnames_default()("components-dropdown__content",popoverProps?popoverProps.className:void 0,contentClassName)}),renderContent(args)))}var dom_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/index.js");const noop=()=>{},MENU_ITEM_ROLES=["menuitem","menuitemradio","menuitemcheckbox"];class NavigableContainer extends react.Component{constructor(){super(...arguments),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.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(ref){const{forwardedRef}=this.props;this.container=ref,"function"==typeof forwardedRef?forwardedRef(ref):forwardedRef&&"current"in forwardedRef&&(forwardedRef.current=ref)}getFocusableContext(target){const{onlyBrowserTabstops}=this.props,focusables=(onlyBrowserTabstops?dom_build_module.XC.tabbable:dom_build_module.XC.focusable).find(this.container),index=this.getFocusableIndex(focusables,target);return index>-1&&target?{index,target,focusables}:null}getFocusableIndex(focusables,target){const directIndex=focusables.indexOf(target);if(-1!==directIndex)return directIndex}onKeyDown(event){this.props.onKeyDown&&this.props.onKeyDown(event);const{getFocusableContext}=this,{cycle=!0,eventToOffset,onNavigate=noop,stopNavigationEvents}=this.props,offset=eventToOffset(event);if(void 0!==offset&&stopNavigationEvents){event.stopImmediatePropagation();const targetRole=event.target.getAttribute("role");MENU_ITEM_ROLES.includes(targetRole)&&event.preventDefault()}if(!offset)return;const context=getFocusableContext(event.target.ownerDocument.activeElement);if(!context)return;const{index,focusables}=context,nextIndex=cycle?function cycleValue(value,total,offset){const nextValue=value+offset;return nextValue<0?total+nextValue:nextValue>=total?nextValue-total:nextValue}(index,focusables.length,offset):index+offset;nextIndex>=0&&nextIndex<focusables.length&&(focusables[nextIndex].focus(),onNavigate(nextIndex,focusables[nextIndex]))}render(){const{children,stopNavigationEvents,eventToOffset,onNavigate,onKeyDown,cycle,onlyBrowserTabstops,forwardedRef,...restProps}=this.props;return(0,react.createElement)("div",(0,helpers_esm_extends.A)({ref:this.bindContainer},restProps),children)}}const forwardedNavigableContainer=(props,ref)=>(0,react.createElement)(NavigableContainer,(0,helpers_esm_extends.A)({},props,{forwardedRef:ref}));forwardedNavigableContainer.displayName="NavigableContainer";const container=(0,react.forwardRef)(forwardedNavigableContainer);const navigable_container_menu=(0,react.forwardRef)((function NavigableMenu(_ref,ref){let{role="menu",orientation="vertical",...rest}=_ref;return(0,react.createElement)(container,(0,helpers_esm_extends.A)({ref,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role,"aria-orientation":"presentation"===role?null:orientation,eventToOffset:evt=>{const{keyCode}=evt;let next=[keycodes_build_module.PX],previous=[keycodes_build_module.UP];return"horizontal"===orientation&&(next=[keycodes_build_module.NS],previous=[keycodes_build_module.M3]),"both"===orientation&&(next=[keycodes_build_module.NS,keycodes_build_module.PX],previous=[keycodes_build_module.M3,keycodes_build_module.UP]),next.includes(keyCode)?1:previous.includes(keyCode)?-1:[keycodes_build_module.PX,keycodes_build_module.UP,keycodes_build_module.M3,keycodes_build_module.NS].includes(keyCode)?0:void 0}},rest))}));function mergeProps(){let defaultProps=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},props=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const mergedProps={...defaultProps,...props};return props.className&&defaultProps.className&&(mergedProps.className=classnames_default()(props.className,defaultProps.className)),mergedProps}function dropdown_menu_isFunction(maybeFunc){return"function"==typeof maybeFunc}const dropdown_menu=function DropdownMenu(dropdownMenuProps){const{children,className,controls,icon=library_menu,label,popoverProps,toggleProps,menuProps,disableOpenOnArrowDown=!1,text,noIcons}=dropdownMenuProps;if(!(null!=controls&&controls.length||dropdown_menu_isFunction(children)))return null;let controlSets;null!=controls&&controls.length&&(controlSets=controls,Array.isArray(controlSets[0])||(controlSets=[controlSets]));const mergedPopoverProps=mergeProps({className:"components-dropdown-menu__popover"},popoverProps);return(0,react.createElement)(Dropdown,{className:classnames_default()("components-dropdown-menu",className),popoverProps:mergedPopoverProps,renderToggle:_ref=>{var _toggleProps$showTool;let{isOpen,onToggle}=_ref;const mergedToggleProps=mergeProps({className:classnames_default()("components-dropdown-menu__toggle",{"is-opened":isOpen})},toggleProps);return(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({},mergedToggleProps,{icon,onClick:event=>{onToggle(event),mergedToggleProps.onClick&&mergedToggleProps.onClick(event)},onKeyDown:event=>{(event=>{disableOpenOnArrowDown||isOpen||event.keyCode!==keycodes_build_module.PX||(event.preventDefault(),onToggle())})(event),mergedToggleProps.onKeyDown&&mergedToggleProps.onKeyDown(event)},"aria-haspopup":"true","aria-expanded":isOpen,label,text,showTooltip:null===(_toggleProps$showTool=null==toggleProps?void 0:toggleProps.showTooltip)||void 0===_toggleProps$showTool||_toggleProps$showTool}),mergedToggleProps.children)},renderContent:props=>{var _controlSets;const mergedMenuProps=mergeProps({"aria-label":label,className:classnames_default()("components-dropdown-menu__menu",{"no-icons":noIcons})},menuProps);return(0,react.createElement)(navigable_container_menu,(0,helpers_esm_extends.A)({},mergedMenuProps,{role:"menu"}),dropdown_menu_isFunction(children)?children(props):null,null===(_controlSets=controlSets)||void 0===_controlSets?void 0:_controlSets.flatMap(((controlSet,indexOfSet)=>controlSet.map(((control,indexOfControl)=>(0,react.createElement)(build_module_button,{key:[indexOfSet,indexOfControl].join(),onClick:event=>{event.stopPropagation(),props.onClose(),control.onClick&&control.onClick()},className:classnames_default()("components-dropdown-menu__menu-item",{"has-separator":indexOfSet>0&&0===indexOfControl,"is-active":control.isActive,"is-icon-only":!control.title}),icon:control.icon,label:control.label,"aria-checked":"menuitemcheckbox"===control.role||"menuitemradio"===control.role?control.isActive:void 0,role:"menuitemcheckbox"===control.role||"menuitemradio"===control.role?control.role:"menuitem",disabled:control.isDisabled},control.title))))))}})};const toolbar_group_collapsed=function ToolbarGroupCollapsed(_ref){let{controls=[],toggleProps,...props}=_ref;const renderDropdownMenu=internalToggleProps=>(0,react.createElement)(dropdown_menu,(0,helpers_esm_extends.A)({controls,toggleProps:{...internalToggleProps,"data-toolbar-item":!0}},props));return(0,react.useContext)(toolbar_context)?(0,react.createElement)(toolbar_item,toggleProps,renderDropdownMenu):renderDropdownMenu(toggleProps)};const toolbar_group=function ToolbarGroup(_ref){var _controlSets;let{controls=[],children,className,isCollapsed,title,...props}=_ref;const accessibleToolbarState=(0,react.useContext)(toolbar_context);if(!(controls&&controls.length||children))return null;const finalClassName=classnames_default()(accessibleToolbarState?"components-toolbar-group":"components-toolbar",className);let controlSets=controls;return Array.isArray(controlSets[0])||(controlSets=[controlSets]),isCollapsed?(0,react.createElement)(toolbar_group_collapsed,(0,helpers_esm_extends.A)({label:title,controls:controlSets,className:finalClassName,children},props)):(0,react.createElement)(toolbar_group_container,(0,helpers_esm_extends.A)({className:finalClassName},props),null===(_controlSets=controlSets)||void 0===_controlSets?void 0:_controlSets.flatMap(((controlSet,indexOfSet)=>controlSet.map(((control,indexOfControl)=>(0,react.createElement)(toolbar_button,(0,helpers_esm_extends.A)({key:[indexOfSet,indexOfControl].join(),containerClassName:indexOfSet>0&&0===indexOfControl?"has-left-divider":null},control)))))),children)};var use_memo_one_esm=__webpack_require__("../../node_modules/.pnpm/use-memo-one@1.1.3_react@17.0.2/node_modules/use-memo-one/dist/use-memo-one.esm.js"),priority_queue_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+priority-queue@2.47.0/node_modules/@wordpress/priority-queue/build-module/index.js"),is_shallow_equal_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+is-shallow-equal@4.24.0/node_modules/@wordpress/is-shallow-equal/build-module/index.js"),use_isomorphic_layout_effect=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-isomorphic-layout-effect/index.js"),default_registry=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@7.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/default-registry.js");const Context=(0,react.createContext)(default_registry.A),{Consumer,Provider:context_Provider}=Context,RegistryConsumer=Consumer,registry_provider_context=context_Provider;function use_registry_useRegistry(){return(0,react.useContext)(Context)}const context_Context=(0,react.createContext)(!1),{Consumer:context_Consumer,Provider:async_mode_provider_context_Provider}=context_Context,async_mode_provider_context=async_mode_provider_context_Provider;const use_select_noop=()=>{},renderQueue=(0,priority_queue_build_module.y)();function use_select_useSelect(mapSelect,deps){const hasMappingFunction="function"==typeof mapSelect;hasMappingFunction||(deps=[]);const callbackMapper=(0,react.useCallback)(hasMappingFunction?mapSelect:use_select_noop,deps),_mapSelect=hasMappingFunction?callbackMapper:null,registry=use_registry_useRegistry(),isAsync=function use_async_mode_useAsyncMode(){return(0,react.useContext)(context_Context)}(),latestRegistry=(0,react.useRef)(registry),latestMapSelect=(0,react.useRef)(),latestIsAsync=(0,react.useRef)(isAsync),latestMapOutput=(0,react.useRef)(),latestMapOutputError=(0,react.useRef)(),listeningStores=(0,react.useRef)([]),wrapSelect=(0,react.useCallback)((callback=>registry.__unstableMarkListeningStores((()=>callback(registry.select,registry)),listeningStores)),[registry]),depsChangedFlag=(0,react.useMemo)((()=>({})),deps||[]);let mapOutput,selectorRan=!1;if(_mapSelect){mapOutput=latestMapOutput.current;const hasReplacedRegistry=latestRegistry.current!==registry,hasReplacedMapSelect=latestMapSelect.current!==_mapSelect,hasLeftAsyncMode=latestIsAsync.current&&!isAsync,lastMapSelectFailed=!!latestMapOutputError.current;if(hasReplacedRegistry||hasReplacedMapSelect||hasLeftAsyncMode||lastMapSelectFailed)try{mapOutput=wrapSelect(_mapSelect),selectorRan=!0}catch(error){let errorMessage=`An error occurred while running 'mapSelect': ${error.message}`;latestMapOutputError.current&&(errorMessage+="\nThe error may be correlated with this previous error:\n",errorMessage+=`${latestMapOutputError.current.stack}\n\n`,errorMessage+="Original stack trace:"),console.error(errorMessage)}}(0,use_isomorphic_layout_effect.A)((()=>{hasMappingFunction&&(latestRegistry.current=registry,latestMapSelect.current=_mapSelect,latestIsAsync.current=isAsync,selectorRan&&(latestMapOutput.current=mapOutput),latestMapOutputError.current=void 0)}));const queueContext=(0,use_memo_one_esm.MA)((()=>({queue:!0})),[registry]),[,forceRender]=(0,react.useReducer)((s=>s+1),0),isMounted=(0,react.useRef)(!1);return(0,use_isomorphic_layout_effect.A)((()=>{if(!hasMappingFunction)return;const onStoreChange=()=>{try{const newMapOutput=wrapSelect(latestMapSelect.current);if((0,is_shallow_equal_build_module.Ay)(latestMapOutput.current,newMapOutput))return;latestMapOutput.current=newMapOutput}catch(error){latestMapOutputError.current=error}forceRender()},onChange=()=>{isMounted.current&&(latestIsAsync.current?renderQueue.add(queueContext,onStoreChange):onStoreChange())};onStoreChange();const unsubscribers=listeningStores.current.map((storeName=>registry.__unstableSubscribeStore(storeName,onChange)));return isMounted.current=!0,()=>{unsubscribers.forEach((unsubscribe=>null==unsubscribe?void 0:unsubscribe())),renderQueue.cancel(queueContext),isMounted.current=!1}}),[registry,wrapSelect,hasMappingFunction,depsChangedFlag]),(0,react.useDebugValue)(mapOutput),hasMappingFunction?mapOutput:registry.select(mapSelect)}const block_controls_groups={default:createSlotFill("BlockControls"),block:createSlotFill("BlockControlsBlock"),inline:createSlotFill("BlockFormatControls"),other:createSlotFill("BlockControlsOther"),parent:createSlotFill("BlockControlsParent")};var redux_store=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@7.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/redux-store/index.js"),data_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@7.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/index.js"),i18n_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/index.js");const PREFERENCES_DEFAULTS={insertUsage:{}},SETTINGS_DEFAULTS={alignWide:!1,supportsLayout:!0,colors:[{name:(0,i18n_build_module.__)("Black"),slug:"black",color:"#000000"},{name:(0,i18n_build_module.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,i18n_build_module.__)("White"),slug:"white",color:"#ffffff"},{name:(0,i18n_build_module.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,i18n_build_module.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,i18n_build_module.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,i18n_build_module.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,i18n_build_module.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,i18n_build_module.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,i18n_build_module.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,i18n_build_module.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,i18n_build_module.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,i18n_build_module._x)("Small","font size name"),size:13,slug:"small"},{name:(0,i18n_build_module._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,i18n_build_module._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,i18n_build_module._x)("Large","font size name"),size:36,slug:"large"},{name:(0,i18n_build_module._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,i18n_build_module.__)("Thumbnail")},{slug:"medium",name:(0,i18n_build_module.__)("Medium")},{slug:"large",name:(0,i18n_build_module.__)("Large")},{slug:"full",name:(0,i18n_build_module.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,generateAnchors:!1,gradients:[{name:(0,i18n_build_module.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,i18n_build_module.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,i18n_build_module.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,i18n_build_module.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,i18n_build_module.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,i18n_build_module.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,i18n_build_module.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,i18n_build_module.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,i18n_build_module.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,i18n_build_module.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,i18n_build_module.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,i18n_build_module.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function insertAt(array,elements,index){return[...array.slice(0,index),...(0,lodash.castArray)(elements),...array.slice(index)]}function moveTo(array,from,to){let count=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const withoutMovedElements=[...array];return withoutMovedElements.splice(from,count),insertAt(withoutMovedElements,array.slice(from,from+count),to)}const identity=x=>x;function mapBlockOrder(blocks){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const result={[rootClientId]:[]};return blocks.forEach((block=>{const{clientId,innerBlocks}=block;result[rootClientId].push(clientId),Object.assign(result,mapBlockOrder(innerBlocks,clientId))})),result}function mapBlockParents(blocks){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return blocks.reduce(((result,block)=>Object.assign(result,{[block.clientId]:rootClientId},mapBlockParents(block.innerBlocks,block.clientId))),{})}function flattenBlocks(blocks){let transform=arguments.length>1&&void 0!==arguments[1]?arguments[1]:identity;const result={},stack=[...blocks];for(;stack.length;){const{innerBlocks,...block}=stack.shift();stack.push(...innerBlocks),result[block.clientId]=transform(block)}return result}function getFlattenedBlocksWithoutAttributes(blocks){return flattenBlocks(blocks,(block=>(0,lodash.omit)(block,"attributes")))}function getFlattenedBlockAttributes(blocks){return flattenBlocks(blocks,(block=>block.attributes))}function isUpdatingSameBlockAttribute(action,lastAction){return"UPDATE_BLOCK_ATTRIBUTES"===action.type&&void 0!==lastAction&&"UPDATE_BLOCK_ATTRIBUTES"===lastAction.type&&(0,lodash.isEqual)(action.clientIds,lastAction.clientIds)&&function hasSameKeys(a,b){return(0,lodash.isEqual)(Object.keys(a),Object.keys(b))}(action.attributes,lastAction.attributes)}function buildBlockTree(state,blocks){const result={},stack=[...blocks],flattenedBlocks=[...blocks];for(;stack.length;){const block=stack.shift();stack.push(...block.innerBlocks),flattenedBlocks.push(...block.innerBlocks)}for(const block of flattenedBlocks)result[block.clientId]={};for(const block of flattenedBlocks)result[block.clientId]=Object.assign(result[block.clientId],{...state.byClientId[block.clientId],attributes:state.attributes[block.clientId],innerBlocks:block.innerBlocks.map((subBlock=>result[subBlock.clientId]))});return result}function updateParentInnerBlocksInTree(state,tree,updatedClientIds){let updateChildrenOfUpdatedClientIds=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const uncontrolledParents=new Set([]),controlledParents=new Set;for(const clientId of updatedClientIds){let current=updateChildrenOfUpdatedClientIds?clientId:state.parents[clientId];do{if(state.controlledInnerBlocks[current]){controlledParents.add(current);break}uncontrolledParents.add(current),current=state.parents[current]}while(void 0!==current)}for(const clientId of uncontrolledParents)tree[clientId]={...tree[clientId]};for(const clientId of uncontrolledParents)tree[clientId].innerBlocks=(state.order[clientId]||[]).map((subClientId=>tree[subClientId]));for(const clientId of controlledParents)tree["controlled||"+clientId]={innerBlocks:(state.order[clientId]||[]).map((subClientId=>tree[subClientId]))};return tree}const blocks=(0,lodash.flow)(data_build_module.HY,(reducer=>(state,action)=>{if(state&&"SAVE_REUSABLE_BLOCK_SUCCESS"===action.type){const{id,updatedId}=action;if(id===updatedId)return state;(state={...state}).attributes=(0,lodash.mapValues)(state.attributes,((attributes,clientId)=>{const{name}=state.byClientId[clientId];return"core/block"===name&&attributes.ref===id?{...attributes,ref:updatedId}:attributes}))}return reducer(state,action)}),(reducer=>function(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;const newState=reducer(state,action);if(newState===state)return state;switch(newState.tree=state.tree?state.tree:{},action.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const subTree=buildBlockTree(newState,action.blocks);newState.tree=updateParentInnerBlocksInTree(newState,{...newState.tree,...subTree},action.rootClientId?[action.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":newState.tree=updateParentInnerBlocksInTree(newState,{...newState.tree,[action.clientId]:{...newState.tree[action.clientId],...newState.byClientId[action.clientId],attributes:newState.attributes[action.clientId]}},[action.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const newSubTree=action.clientIds.reduce(((result,clientId)=>(result[clientId]={...newState.tree[clientId],attributes:newState.attributes[clientId]},result)),{});newState.tree=updateParentInnerBlocksInTree(newState,{...newState.tree,...newSubTree},action.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const subTree=buildBlockTree(newState,action.blocks);newState.tree=updateParentInnerBlocksInTree(newState,{...(0,lodash.omit)(newState.tree,action.replacedClientIds.concat(action.replacedClientIds.filter((clientId=>!subTree[clientId])).map((clientId=>"controlled||"+clientId)))),...subTree},action.blocks.map((b=>b.clientId)),!1);const parentsOfRemovedBlocks=[];for(const clientId of action.clientIds)void 0===state.parents[clientId]||""!==state.parents[clientId]&&!newState.byClientId[state.parents[clientId]]||parentsOfRemovedBlocks.push(state.parents[clientId]);newState.tree=updateParentInnerBlocksInTree(newState,newState.tree,parentsOfRemovedBlocks,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const parentsOfRemovedBlocks=[];for(const clientId of action.clientIds)void 0===state.parents[clientId]||""!==state.parents[clientId]&&!newState.byClientId[state.parents[clientId]]||parentsOfRemovedBlocks.push(state.parents[clientId]);newState.tree=updateParentInnerBlocksInTree(newState,(0,lodash.omit)(newState.tree,action.removedClientIds.concat(action.removedClientIds.map((clientId=>"controlled||"+clientId)))),parentsOfRemovedBlocks,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const updatedBlockUids=[];action.fromRootClientId?updatedBlockUids.push(action.fromRootClientId):updatedBlockUids.push(""),action.toRootClientId&&updatedBlockUids.push(action.toRootClientId),newState.tree=updateParentInnerBlocksInTree(newState,newState.tree,updatedBlockUids,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const updatedBlockUids=[action.rootClientId?action.rootClientId:""];newState.tree=updateParentInnerBlocksInTree(newState,newState.tree,updatedBlockUids,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const updatedBlockUids=Object.keys((0,lodash.omitBy)(newState.attributes,((attributes,clientId)=>"core/block"!==newState.byClientId[clientId].name||attributes.ref!==action.updatedId)));newState.tree=updateParentInnerBlocksInTree(newState,{...newState.tree,...updatedBlockUids.reduce(((result,clientId)=>(result[clientId]={...newState.byClientId[clientId],attributes:newState.attributes[clientId],innerBlocks:newState.tree[clientId].innerBlocks},result)),{})},updatedBlockUids,!1)}}return newState}),(reducer=>(state,action)=>{const getAllChildren=clientIds=>{let result=clientIds;for(let i=0;i<result.length;i++)!state.order[result[i]]||action.keepControlledInnerBlocks&&action.keepControlledInnerBlocks[result[i]]||(result===clientIds&&(result=[...result]),result.push(...state.order[result[i]]));return result};if(state)switch(action.type){case"REMOVE_BLOCKS":action={...action,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:getAllChildren(action.clientIds)};break;case"REPLACE_BLOCKS":action={...action,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:getAllChildren(action.clientIds)}}return reducer(state,action)}),(reducer=>(state,action)=>{if("REPLACE_INNER_BLOCKS"!==action.type)return reducer(state,action);const nestedControllers={};if(Object.keys(state.controlledInnerBlocks).length){const stack=[...action.blocks];for(;stack.length;){const{innerBlocks,...block}=stack.shift();stack.push(...innerBlocks),state.controlledInnerBlocks[block.clientId]&&(nestedControllers[block.clientId]=!0)}}let stateAfterBlocksRemoval=state;state.order[action.rootClientId]&&(stateAfterBlocksRemoval=reducer(stateAfterBlocksRemoval,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:nestedControllers,clientIds:state.order[action.rootClientId]}));let stateAfterInsert=stateAfterBlocksRemoval;return action.blocks.length&&(stateAfterInsert=reducer(stateAfterInsert,{...action,type:"INSERT_BLOCKS",index:0}),stateAfterInsert.order={...stateAfterInsert.order,...(0,lodash.reduce)(nestedControllers,((result,value,key)=>(state.order[key]&&(result[key]=state.order[key]),result)),{})},stateAfterInsert.tree={...stateAfterInsert.tree,...(0,lodash.reduce)(nestedControllers,((result,value,_key)=>{const key=`controlled||${_key}`;return state.tree[key]&&(result[key]=state.tree[key]),result}),{})}),stateAfterInsert}),(reducer=>(state,action)=>{if("RESET_BLOCKS"===action.type){const newState={...state,byClientId:getFlattenedBlocksWithoutAttributes(action.blocks),attributes:getFlattenedBlockAttributes(action.blocks),order:mapBlockOrder(action.blocks),parents:mapBlockParents(action.blocks),controlledInnerBlocks:{},visibility:{}},subTree=buildBlockTree(newState,action.blocks);return newState.tree={...subTree,"":{innerBlocks:action.blocks.map((subBlock=>subTree[subBlock.clientId]))}},newState}return reducer(state,action)}),(function withPersistentBlockChange(reducer){let lastAction,markNextChangeAsNotPersistent=!1;return(state,action)=>{let nextState=reducer(state,action);const isExplicitPersistentChange="MARK_LAST_CHANGE_AS_PERSISTENT"===action.type||markNextChangeAsNotPersistent;if(state===nextState&&!isExplicitPersistentChange){var _state$isPersistentCh;markNextChangeAsNotPersistent="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===action.type;const nextIsPersistentChange=null===(_state$isPersistentCh=null==state?void 0:state.isPersistentChange)||void 0===_state$isPersistentCh||_state$isPersistentCh;return state.isPersistentChange===nextIsPersistentChange?state:{...nextState,isPersistentChange:nextIsPersistentChange}}return nextState={...nextState,isPersistentChange:isExplicitPersistentChange?!markNextChangeAsNotPersistent:!isUpdatingSameBlockAttribute(action,lastAction)},lastAction=action,markNextChangeAsNotPersistent="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===action.type,nextState}}),(function withIgnoredBlockChange(reducer){const IGNORED_ACTION_TYPES=new Set(["RECEIVE_BLOCKS"]);return(state,action)=>{const nextState=reducer(state,action);return nextState!==state&&(nextState.isIgnoredChange=IGNORED_ACTION_TYPES.has(action.type)),nextState}}),(reducer=>(state,action)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===action.type){const tempState=reducer(state,{type:"REPLACE_INNER_BLOCKS",rootClientId:action.clientId,blocks:[]});return reducer(tempState,action)}return reducer(state,action)}))({byClientId(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...state,...getFlattenedBlocksWithoutAttributes(action.blocks)};case"UPDATE_BLOCK":if(!state[action.clientId])return state;const changes=(0,lodash.omit)(action.updates,"attributes");return(0,lodash.isEmpty)(changes)?state:{...state,[action.clientId]:{...state[action.clientId],...changes}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return action.blocks?{...(0,lodash.omit)(state,action.replacedClientIds),...getFlattenedBlocksWithoutAttributes(action.blocks)}:state;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,lodash.omit)(state,action.removedClientIds)}return state},attributes(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...state,...getFlattenedBlockAttributes(action.blocks)};case"UPDATE_BLOCK":return state[action.clientId]&&action.updates.attributes?{...state,[action.clientId]:{...state[action.clientId],...action.updates.attributes}}:state;case"UPDATE_BLOCK_ATTRIBUTES":{if(action.clientIds.every((id=>!state[id])))return state;const next=action.clientIds.reduce(((accumulator,id)=>({...accumulator,[id]:(0,lodash.reduce)(action.uniqueByBlock?action.attributes[id]:action.attributes,((result,value,key)=>(value!==result[key]&&((result=function getMutateSafeObject(original,working){return original===working?{...original}:working}(state[id],result))[key]=value),result)),state[id])})),{});return action.clientIds.every((id=>next[id]===state[id]))?state:{...state,...next}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return action.blocks?{...(0,lodash.omit)(state,action.replacedClientIds),...getFlattenedBlockAttributes(action.blocks)}:state;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,lodash.omit)(state,action.removedClientIds)}return state},order(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"RECEIVE_BLOCKS":{const blockOrder=mapBlockOrder(action.blocks);return{...state,...(0,lodash.omit)(blockOrder,""),"":((null==state?void 0:state[""])||[]).concat(blockOrder[""])}}case"INSERT_BLOCKS":{const{rootClientId=""}=action,subState=state[rootClientId]||[],mappedBlocks=mapBlockOrder(action.blocks,rootClientId),{index=subState.length}=action;return{...state,...mappedBlocks,[rootClientId]:insertAt(subState,mappedBlocks[rootClientId],index)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId="",toRootClientId="",clientIds}=action,{index=state[toRootClientId].length}=action;if(fromRootClientId===toRootClientId){const fromIndex=state[toRootClientId].indexOf(clientIds[0]);return{...state,[toRootClientId]:moveTo(state[toRootClientId],fromIndex,index,clientIds.length)}}return{...state,[fromRootClientId]:(0,lodash.without)(state[fromRootClientId],...clientIds),[toRootClientId]:insertAt(state[toRootClientId],clientIds,index)}}case"MOVE_BLOCKS_UP":{const{clientIds,rootClientId=""}=action,firstClientId=(0,lodash.first)(clientIds),subState=state[rootClientId];if(!subState.length||firstClientId===(0,lodash.first)(subState))return state;const firstIndex=subState.indexOf(firstClientId);return{...state,[rootClientId]:moveTo(subState,firstIndex,firstIndex-1,clientIds.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds,rootClientId=""}=action,firstClientId=(0,lodash.first)(clientIds),lastClientId=(0,lodash.last)(clientIds),subState=state[rootClientId];if(!subState.length||lastClientId===(0,lodash.last)(subState))return state;const firstIndex=subState.indexOf(firstClientId);return{...state,[rootClientId]:moveTo(subState,firstIndex,firstIndex+1,clientIds.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds}=action;if(!action.blocks)return state;const mappedBlocks=mapBlockOrder(action.blocks);return(0,lodash.flow)([nextState=>(0,lodash.omit)(nextState,action.replacedClientIds),nextState=>({...nextState,...(0,lodash.omit)(mappedBlocks,"")}),nextState=>(0,lodash.mapValues)(nextState,(subState=>(0,lodash.reduce)(subState,((result,clientId)=>clientId===clientIds[0]?[...result,...mappedBlocks[""]]:(-1===clientIds.indexOf(clientId)&&result.push(clientId),result)),[])))])(state)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,lodash.flow)([nextState=>(0,lodash.omit)(nextState,action.removedClientIds),nextState=>(0,lodash.mapValues)(nextState,(subState=>(0,lodash.without)(subState,...action.removedClientIds)))])(state)}return state},parents(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"RECEIVE_BLOCKS":return{...state,...mapBlockParents(action.blocks)};case"INSERT_BLOCKS":return{...state,...mapBlockParents(action.blocks,action.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...state,...action.clientIds.reduce(((accumulator,id)=>(accumulator[id]=action.toRootClientId||"",accumulator)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,lodash.omit)(state,action.replacedClientIds),...mapBlockParents(action.blocks,state[action.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,lodash.omit)(state,action.removedClientIds)}return state},controlledInnerBlocks(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type,clientId,hasControlledInnerBlocks}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===type?{...state,[clientId]:hasControlledInnerBlocks}:state},visibility(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===action.type?{...state,...action.updates}:state}});function selectionHelper(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"CLEAR_SELECTED_BLOCK":return state.clientId?{}:state;case"SELECT_BLOCK":return action.clientId===state.clientId?state:{clientId:action.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return action.updateSelection&&action.blocks.length?{clientId:action.blocks[0].clientId}:state;case"REMOVE_BLOCKS":return action.clientIds&&action.clientIds.length&&-1!==action.clientIds.indexOf(state.clientId)?{}:state;case"REPLACE_BLOCKS":{if(-1===action.clientIds.indexOf(state.clientId))return state;const blockToSelect=action.blocks[action.indexToSelect]||action.blocks[action.blocks.length-1];return blockToSelect?blockToSelect.clientId===state.clientId?state:{clientId:blockToSelect.clientId}:{}}}return state}const reducer=(0,data_build_module.HY)({blocks,isTyping:function isTyping(){let state=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return state},draggedBlocks:function draggedBlocks(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"START_DRAGGING_BLOCKS":return action.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return state},selection:function selection(){var _state$selectionStart,_state$selectionEnd,_state$selectionStart2,_state$selectionEnd2;let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"SELECTION_CHANGE":return action.clientId?{selectionStart:{clientId:action.clientId,attributeKey:action.attributeKey,offset:action.startOffset},selectionEnd:{clientId:action.clientId,attributeKey:action.attributeKey,offset:action.endOffset}}:{selectionStart:action.start||state.selectionStart,selectionEnd:action.end||state.selectionEnd};case"RESET_SELECTION":const{selectionStart,selectionEnd}=action;return{selectionStart,selectionEnd};case"MULTI_SELECT":const{start,end}=action;return start===(null===(_state$selectionStart=state.selectionStart)||void 0===_state$selectionStart?void 0:_state$selectionStart.clientId)&&end===(null===(_state$selectionEnd=state.selectionEnd)||void 0===_state$selectionEnd?void 0:_state$selectionEnd.clientId)?state:{selectionStart:{clientId:start},selectionEnd:{clientId:end}};case"RESET_BLOCKS":const startClientId=null==state||null===(_state$selectionStart2=state.selectionStart)||void 0===_state$selectionStart2?void 0:_state$selectionStart2.clientId,endClientId=null==state||null===(_state$selectionEnd2=state.selectionEnd)||void 0===_state$selectionEnd2?void 0:_state$selectionEnd2.clientId;if(!startClientId&&!endClientId)return state;if(!action.blocks.some((block=>block.clientId===startClientId)))return{selectionStart:{},selectionEnd:{}};if(!action.blocks.some((block=>block.clientId===endClientId)))return{...state,selectionEnd:state.selectionStart}}return{selectionStart:selectionHelper(state.selectionStart,action),selectionEnd:selectionHelper(state.selectionEnd,action)}},isMultiSelecting:function isMultiSelecting(){let state=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return state},isSelectionEnabled:function isSelectionEnabled(){let state=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],action=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===action.type?action.isSelectionEnabled:state},initialPosition:function initialPosition(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,action=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===action.type&&void 0!==action.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(action.type)?action.initialPosition:state},blocksMode:function blocksMode(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===action.type){const{clientId}=action;return{...state,[clientId]:state[clientId]&&"html"===state[clientId]?"visual":"html"}}return state},blockListSettings:function(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,lodash.omit)(state,action.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId}=action;return action.settings?(0,lodash.isEqual)(state[clientId],action.settings)?state:{...state,[clientId]:action.settings}:state.hasOwnProperty(clientId)?(0,lodash.omit)(state,clientId):state}}return state},insertionPoint:function insertionPoint(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"SHOW_INSERTION_POINT":const{rootClientId,index,__unstableWithInserter}=action;return{rootClientId,index,__unstableWithInserter};case"HIDE_INSERTION_POINT":return null}return state},template:function template(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},action=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===action.type?{...state,isValid:action.isValid}:state},settings:function settings(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:SETTINGS_DEFAULTS,action=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===action.type?{...state,...action.settings}:state},preferences:function preferences(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:PREFERENCES_DEFAULTS,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return action.blocks.reduce(((prevState,block)=>{const{attributes,name:blockName}=block,match=(0,data_build_module.Lt)(build_module.M_).getActiveBlockVariation(blockName,attributes);let id=null!=match&&match.name?`${blockName}/${match.name}`:blockName;const insert={name:id};return"core/block"===blockName&&(insert.ref=attributes.ref,id+="/"+attributes.ref),{...prevState,insertUsage:{...prevState.insertUsage,[id]:{time:action.time,count:prevState.insertUsage[id]?prevState.insertUsage[id].count+1:1,insert}}}}),state)}return state},lastBlockAttributesChange:function lastBlockAttributesChange(state,action){switch(action.type){case"UPDATE_BLOCK":if(!action.updates.attributes)break;return{[action.clientId]:action.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return action.clientIds.reduce(((accumulator,id)=>({...accumulator,[id]:action.uniqueByBlock?action.attributes[id]:action.attributes})),{})}return null},isNavigationMode:function isNavigationMode(){let state=arguments.length>0&&void 0!==arguments[0]&&arguments[0],action=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==action.type&&("SET_NAVIGATION_MODE"===action.type?action.isNavigationMode:state)},hasBlockMovingClientId:function hasBlockMovingClientId(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,action=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===action.type?action.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===action.type?null:state},automaticChangeStatus:function automaticChangeStatus(state,action){switch(action.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===state?"final":void 0;case"SELECTION_CHANGE":return"final"!==state?state:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":return state}},highlightedBlock:function highlightedBlock(state,action){switch(action.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId,isHighlighted}=action;return isHighlighted?clientId:state===clientId?null:state;case"SELECT_BLOCK":if(action.clientId!==state)return null}return state},lastBlockInserted:function lastBlockInserted(){var _action$meta;let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"INSERT_BLOCKS":if(!action.blocks.length)return state;return{clientId:action.blocks[0].clientId,source:null===(_action$meta=action.meta)||void 0===_action$meta?void 0:_action$meta.source};case"RESET_BLOCKS":return{}}return state}});var rememo=__webpack_require__("../../node_modules/.pnpm/rememo@4.0.2/node_modules/rememo/rememo.js");const platform={OS:"web",select:spec=>"web"in spec?spec.web:spec.default,isWeb:!0},library_symbol=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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"}));const store_reducer=(0,data_build_module.HY)({formatTypes:function formatTypes(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"ADD_FORMAT_TYPES":return{...state,...action.formatTypes.reduce(((newFormatTypes,type)=>({...newFormatTypes,[type.name]:type})),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(state).filter((_ref=>{let[key]=_ref;return!action.names.includes(key)})))}return state}}),getFormatTypes=(0,rememo.A)((state=>Object.values(state.formatTypes)),(state=>[state.formatTypes]));function getFormatType(state,name){return state.formatTypes[name]}function getFormatTypeForBareElement(state,bareElementTagName){return getFormatTypes(state).find((_ref=>{let{className,tagName}=_ref;return null===className&&bareElementTagName===tagName}))}function getFormatTypeForClassName(state,elementClassName){return getFormatTypes(state).find((_ref2=>{let{className}=_ref2;return null!==className&&` ${elementClassName} `.indexOf(` ${className} `)>=0}))}function addFormatTypes(formatTypes){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(formatTypes)?formatTypes:[formatTypes]}}function removeFormatTypes(names){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(names)?names:[names]}}const store=(0,redux_store.A)("core/rich-text",{reducer:store_reducer,selectors:selectors_namespaceObject,actions:actions_namespaceObject});function create_element_createElement(_ref,html){let{implementation}=_ref;return create_element_createElement.body||(create_element_createElement.body=implementation.createHTMLDocument("").body),create_element_createElement.body.innerHTML=html,create_element_createElement.body}function mergePair(a,b){return a.formats=a.formats.concat(b.formats),a.replacements=a.replacements.concat(b.replacements),a.text+=b.text,a}(0,data_build_module.kz)(store);const LINE_SEPARATOR="\u2028",OBJECT_REPLACEMENT_CHARACTER="",ZWNBSP="\ufeff";function toFormat(_ref){let formatType,{type,attributes}=_ref;if(attributes&&attributes.class&&(formatType=(0,data_build_module.Lt)(store).getFormatTypeForClassName(attributes.class),formatType&&(attributes.class=` ${attributes.class} `.replace(` ${formatType.className} `," ").trim(),attributes.class||delete attributes.class)),formatType||(formatType=(0,data_build_module.Lt)(store).getFormatTypeForBareElement(type)),!formatType)return attributes?{type,attributes}:{type};if(formatType.__experimentalCreatePrepareEditableTree&&!formatType.__experimentalCreateOnChangeEditableValue)return null;if(!attributes)return{type:formatType.name};const registeredAttributes={},unregisteredAttributes={},_attributes={...attributes};for(const key in formatType.attributes){const name=formatType.attributes[key];registeredAttributes[key]=_attributes[name],formatType.__unstableFilterAttributeValue&&(registeredAttributes[key]=formatType.__unstableFilterAttributeValue(key,registeredAttributes[key])),delete _attributes[name],void 0===registeredAttributes[key]&&delete registeredAttributes[key]}for(const name in _attributes)unregisteredAttributes[name]=attributes[name];return{type:formatType.name,attributes:registeredAttributes,unregisteredAttributes}}function create_create(){let{element,text,html,range,multilineTag,multilineWrapperTags,__unstableIsEditableTree:isEditableTree,preserveWhiteSpace}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"==typeof text&&text.length>0?{formats:Array(text.length),replacements:Array(text.length),text}:("string"==typeof html&&html.length>0&&(element=create_element_createElement(document,html)),"object"!=typeof element?{formats:[],replacements:[],text:""}:multilineTag?createFromMultilineElement({element,range,multilineTag,multilineWrapperTags,isEditableTree,preserveWhiteSpace}):createFromElement({element,range,isEditableTree,preserveWhiteSpace}))}function accumulateSelection(accumulator,node,range,value){if(!range)return;const{parentNode}=node,{startContainer,startOffset,endContainer,endOffset}=range,currentLength=accumulator.text.length;void 0!==value.start?accumulator.start=currentLength+value.start:node===startContainer&&node.nodeType===node.TEXT_NODE?accumulator.start=currentLength+startOffset:parentNode===startContainer&&node===startContainer.childNodes[startOffset]?accumulator.start=currentLength:parentNode===startContainer&&node===startContainer.childNodes[startOffset-1]?accumulator.start=currentLength+value.text.length:node===startContainer&&(accumulator.start=currentLength),void 0!==value.end?accumulator.end=currentLength+value.end:node===endContainer&&node.nodeType===node.TEXT_NODE?accumulator.end=currentLength+endOffset:parentNode===endContainer&&node===endContainer.childNodes[endOffset-1]?accumulator.end=currentLength+value.text.length:parentNode===endContainer&&node===endContainer.childNodes[endOffset]?accumulator.end=currentLength:node===endContainer&&(accumulator.end=currentLength+endOffset)}function filterRange(node,range,filter){if(!range)return;const{startContainer,endContainer}=range;let{startOffset,endOffset}=range;return node===startContainer&&(startOffset=filter(node.nodeValue.slice(0,startOffset)).length),node===endContainer&&(endOffset=filter(node.nodeValue.slice(0,endOffset)).length),{startContainer,startOffset,endContainer,endOffset}}function collapseWhiteSpace(string){return string.replace(/[\n\r\t]+/g," ")}function removeReservedCharacters(string){return string.replace(new RegExp(`[${ZWNBSP}${OBJECT_REPLACEMENT_CHARACTER}]`,"gu"),"")}function createFromElement(_ref2){let{element,range,multilineTag,multilineWrapperTags,currentWrapperTags=[],isEditableTree,preserveWhiteSpace}=_ref2;const accumulator={formats:[],replacements:[],text:""};if(!element)return accumulator;if(!element.hasChildNodes())return accumulateSelection(accumulator,element,range,{formats:[],replacements:[],text:""}),accumulator;const length=element.childNodes.length;for(let index=0;index<length;index++){const node=element.childNodes[index],type=node.nodeName.toLowerCase();if(node.nodeType===node.TEXT_NODE){let filter=removeReservedCharacters;preserveWhiteSpace||(filter=string=>removeReservedCharacters(collapseWhiteSpace(string)));const text=filter(node.nodeValue);range=filterRange(node,range,filter),accumulateSelection(accumulator,node,range,{text}),accumulator.formats.length+=text.length,accumulator.replacements.length+=text.length,accumulator.text+=text;continue}if(node.nodeType!==node.ELEMENT_NODE)continue;if(isEditableTree&&(node.getAttribute("data-rich-text-placeholder")||"br"===type&&!node.getAttribute("data-rich-text-line-break"))){accumulateSelection(accumulator,node,range,{formats:[],replacements:[],text:""});continue}if("script"===type){const value={formats:[,],replacements:[{type,attributes:{"data-rich-text-script":node.getAttribute("data-rich-text-script")||encodeURIComponent(node.innerHTML)}}],text:OBJECT_REPLACEMENT_CHARACTER};accumulateSelection(accumulator,node,range,value),mergePair(accumulator,value);continue}if("br"===type){accumulateSelection(accumulator,node,range,{formats:[],replacements:[],text:""}),mergePair(accumulator,create_create({text:"\n"}));continue}const format=toFormat({type,attributes:getAttributes({element:node})});if(multilineWrapperTags&&-1!==multilineWrapperTags.indexOf(type)){const value=createFromMultilineElement({element:node,range,multilineTag,multilineWrapperTags,currentWrapperTags:[...currentWrapperTags,format],isEditableTree,preserveWhiteSpace});accumulateSelection(accumulator,node,range,value),mergePair(accumulator,value);continue}const value=createFromElement({element:node,range,multilineTag,multilineWrapperTags,isEditableTree,preserveWhiteSpace});if(accumulateSelection(accumulator,node,range,value),format)if(0===value.text.length)format.attributes&&mergePair(accumulator,{formats:[,],replacements:[format],text:OBJECT_REPLACEMENT_CHARACTER});else{function mergeFormats(formats){if(mergeFormats.formats===formats)return mergeFormats.newFormats;const newFormats=formats?[format,...formats]:[format];return mergeFormats.formats=formats,mergeFormats.newFormats=newFormats,newFormats}mergeFormats.newFormats=[format],mergePair(accumulator,{...value,formats:Array.from(value.formats,mergeFormats)})}else mergePair(accumulator,value)}return accumulator}function createFromMultilineElement(_ref3){let{element,range,multilineTag,multilineWrapperTags,currentWrapperTags=[],isEditableTree,preserveWhiteSpace}=_ref3;const accumulator={formats:[],replacements:[],text:""};if(!element||!element.hasChildNodes())return accumulator;const length=element.children.length;for(let index=0;index<length;index++){const node=element.children[index];if(node.nodeName.toLowerCase()!==multilineTag)continue;const value=createFromElement({element:node,range,multilineTag,multilineWrapperTags,currentWrapperTags,isEditableTree,preserveWhiteSpace});(0!==index||currentWrapperTags.length>0)&&mergePair(accumulator,{formats:[,],replacements:currentWrapperTags.length>0?[currentWrapperTags]:[,],text:LINE_SEPARATOR}),accumulateSelection(accumulator,node,range,value),mergePair(accumulator,value)}return accumulator}function getAttributes(_ref4){let{element}=_ref4;if(!element.hasAttributes())return;const length=element.attributes.length;let accumulator;for(let i=0;i<length;i++){const{name,value}=element.attributes[i];if(0===name.indexOf("data-rich-text-"))continue;accumulator=accumulator||{},accumulator[/^on/i.test(name)?"data-disable-rich-text-"+name:name]=value}return accumulator}function normalise_formats_normaliseFormats(value){const newFormats=value.formats.slice();return newFormats.forEach(((formatsAtIndex,index)=>{const formatsAtPreviousIndex=newFormats[index-1];if(formatsAtPreviousIndex){const newFormatsAtIndex=formatsAtIndex.slice();newFormatsAtIndex.forEach(((format,formatIndex)=>{const previousFormat=formatsAtPreviousIndex[formatIndex];(function isFormatEqual(format1,format2){if(format1===format2)return!0;if(!format1||!format2)return!1;if(format1.type!==format2.type)return!1;const attributes1=format1.attributes,attributes2=format2.attributes;if(attributes1===attributes2)return!0;if(!attributes1||!attributes2)return!1;const keys1=Object.keys(attributes1),keys2=Object.keys(attributes2);if(keys1.length!==keys2.length)return!1;const length=keys1.length;for(let i=0;i<length;i++){const name=keys1[i];if(attributes1[name]!==attributes2[name])return!1}return!0})(format,previousFormat)&&(newFormatsAtIndex[formatIndex]=previousFormat)})),newFormats[index]=newFormatsAtIndex}})),{...value,formats:newFormats}}function insert(value,valueToInsert){let startIndex=arguments.length>2&&void 0!==arguments[2]?arguments[2]:value.start,endIndex=arguments.length>3&&void 0!==arguments[3]?arguments[3]:value.end;const{formats,replacements,text}=value;"string"==typeof valueToInsert&&(valueToInsert=create_create({text:valueToInsert}));const index=startIndex+valueToInsert.text.length;return normalise_formats_normaliseFormats({formats:formats.slice(0,startIndex).concat(valueToInsert.formats,formats.slice(endIndex)),replacements:replacements.slice(0,startIndex).concat(valueToInsert.replacements,replacements.slice(endIndex)),text:text.slice(0,startIndex)+valueToInsert.text+text.slice(endIndex),start:index,end:index})}function remove(value,startIndex,endIndex){return insert(value,create_create(),startIndex,endIndex)}var escape_html_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js");function restoreOnAttributes(attributes,isEditableTree){if(isEditableTree)return attributes;const newAttributes={};for(const key in attributes){let newKey=key;key.startsWith("data-disable-rich-text-")&&(newKey=key.slice(23)),newAttributes[newKey]=attributes[key]}return newAttributes}function fromFormat(_ref){let{type,attributes,unregisteredAttributes,object,boundaryClass,isEditableTree}=_ref;const formatType=function get_format_type_getFormatType(name){return(0,data_build_module.Lt)(store).getFormatType(name)}(type);let elementAttributes={};if(boundaryClass&&(elementAttributes["data-rich-text-format-boundary"]="true"),!formatType)return attributes&&(elementAttributes={...attributes,...elementAttributes}),{type,attributes:restoreOnAttributes(elementAttributes,isEditableTree),object};elementAttributes={...unregisteredAttributes,...elementAttributes};for(const name in attributes){const key=!!formatType.attributes&&formatType.attributes[name];key?elementAttributes[key]=attributes[name]:elementAttributes[name]=attributes[name]}return formatType.className&&(elementAttributes.class?elementAttributes.class=`${formatType.className} ${elementAttributes.class}`:elementAttributes.class=formatType.className),{type:formatType.tagName,object:formatType.object,attributes:restoreOnAttributes(elementAttributes,isEditableTree)}}function isEqualUntil(a,b,index){do{if(a[index]!==b[index])return!1}while(index--);return!0}function toHTMLString(_ref){let{value,multilineTag,preserveWhiteSpace}=_ref;const tree=function toTree(_ref2){let{value,multilineTag,preserveWhiteSpace,createEmpty,append,getLastChild,getParent,isText,getText,remove,appendText,onStartIndex,onEndIndex,isEditableTree,placeholder}=_ref2;const{formats,replacements,text,start,end}=value,formatsLength=formats.length+1,tree=createEmpty(),multilineFormat={type:multilineTag},activeFormats=function getActiveFormats(_ref){let{formats,start,end,activeFormats}=_ref,EMPTY_ACTIVE_FORMATS=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===start)return EMPTY_ACTIVE_FORMATS;if(start===end){if(activeFormats)return activeFormats;const formatsBefore=formats[start-1]||EMPTY_ACTIVE_FORMATS,formatsAfter=formats[start]||EMPTY_ACTIVE_FORMATS;return formatsBefore.length<formatsAfter.length?formatsBefore:formatsAfter}return formats[start]||EMPTY_ACTIVE_FORMATS}(value),deepestActiveFormat=activeFormats[activeFormats.length-1];let lastSeparatorFormats,lastCharacterFormats,lastCharacter;multilineTag?(append(append(tree,{type:multilineTag}),""),lastCharacterFormats=lastSeparatorFormats=[multilineFormat]):append(tree,"");for(let i=0;i<formatsLength;i++){const character=text.charAt(i),shouldInsertPadding=isEditableTree&&(!lastCharacter||lastCharacter===LINE_SEPARATOR||"\n"===lastCharacter);let characterFormats=formats[i];multilineTag&&(characterFormats=character===LINE_SEPARATOR?lastSeparatorFormats=(replacements[i]||[]).reduce(((accumulator,format)=>(accumulator.push(format,multilineFormat),accumulator)),[multilineFormat]):[...lastSeparatorFormats,...characterFormats||[]]);let pointer=getLastChild(tree);if(shouldInsertPadding&&character===LINE_SEPARATOR){let node=pointer;for(;!isText(node);)node=getLastChild(node);append(getParent(node),ZWNBSP)}if(lastCharacter===LINE_SEPARATOR){let node=pointer;for(;!isText(node);)node=getLastChild(node);onStartIndex&&start===i&&onStartIndex(tree,node),onEndIndex&&end===i&&onEndIndex(tree,node)}var _replacements$i;if(characterFormats&&characterFormats.forEach(((format,formatIndex)=>{if(pointer&&lastCharacterFormats&&isEqualUntil(characterFormats,lastCharacterFormats,formatIndex)&&(character!==LINE_SEPARATOR||characterFormats.length-1!==formatIndex))return void(pointer=getLastChild(pointer));const{type,attributes,unregisteredAttributes}=format,boundaryClass=isEditableTree&&character!==LINE_SEPARATOR&&format===deepestActiveFormat,parent=getParent(pointer),newNode=append(parent,fromFormat({type,attributes,unregisteredAttributes,boundaryClass,isEditableTree}));isText(pointer)&&0===getText(pointer).length&&remove(pointer),pointer=append(newNode,"")})),character!==LINE_SEPARATOR)0===i&&(onStartIndex&&0===start&&onStartIndex(tree,pointer),onEndIndex&&0===end&&onEndIndex(tree,pointer)),character===OBJECT_REPLACEMENT_CHARACTER?(isEditableTree||"script"!==(null===(_replacements$i=replacements[i])||void 0===_replacements$i?void 0:_replacements$i.type)?pointer=append(getParent(pointer),fromFormat({...replacements[i],object:!0,isEditableTree})):(pointer=append(getParent(pointer),fromFormat({type:"script",isEditableTree})),append(pointer,{html:decodeURIComponent(replacements[i].attributes["data-rich-text-script"])})),pointer=append(getParent(pointer),"")):preserveWhiteSpace||"\n"!==character?isText(pointer)?appendText(pointer,character):pointer=append(getParent(pointer),character):(pointer=append(getParent(pointer),{type:"br",attributes:isEditableTree?{"data-rich-text-line-break":"true"}:void 0,object:!0}),pointer=append(getParent(pointer),"")),onStartIndex&&start===i+1&&onStartIndex(tree,pointer),onEndIndex&&end===i+1&&onEndIndex(tree,pointer),shouldInsertPadding&&i===text.length&&(append(getParent(pointer),ZWNBSP),placeholder&&0===text.length&&append(getParent(pointer),{type:"span",attributes:{"data-rich-text-placeholder":placeholder,contenteditable:"false",style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),lastCharacterFormats=characterFormats,lastCharacter=character;else lastCharacterFormats=characterFormats,lastCharacter=character}return tree}({value,multilineTag,preserveWhiteSpace,createEmpty,append,getLastChild,getParent,isText,getText,remove:to_html_string_remove,appendText});return createChildrenHTML(tree.children)}function createEmpty(){return{}}function getLastChild(_ref2){let{children}=_ref2;return children&&children[children.length-1]}function append(parent,object){return"string"==typeof object&&(object={text:object}),object.parent=parent,parent.children=parent.children||[],parent.children.push(object),object}function appendText(object,text){object.text+=text}function getParent(_ref3){let{parent}=_ref3;return parent}function isText(_ref4){let{text}=_ref4;return"string"==typeof text}function getText(_ref5){let{text}=_ref5;return text}function to_html_string_remove(object){const index=object.parent.children.indexOf(object);return-1!==index&&object.parent.children.splice(index,1),object}function createChildrenHTML(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((child=>void 0!==child.html?child.html:void 0===child.text?function createElementHTML(_ref6){let{type,attributes,object,children}=_ref6,attributeString="";for(const key in attributes)(0,escape_html_build_module.i8)(key)&&(attributeString+=` ${key}="${(0,escape_html_build_module.Gj)(attributes[key])}"`);return object?`<${type}${attributeString}>`:`<${type}${attributeString}>${createChildrenHTML(children)}</${type}>`}(child):(0,escape_html_build_module.jG)(child.text))).join("")}function mapRichTextSettings(attributeDefinition){const{multiline:multilineTag,__unstableMultilineWrapperTags:multilineWrapperTags,__unstablePreserveWhiteSpace:preserveWhiteSpace}=attributeDefinition;return{multilineTag,multilineWrapperTags,preserveWhiteSpace}}const EMPTY_ARRAY=[];function getBlockName(state,clientId){const block=state.blocks.byClientId[clientId];if("web"!==platform.OS&&"core/social-link"===(null==block?void 0:block.name)){const attributes=state.blocks.attributes[clientId],{service}=attributes;return service?`core/social-link-${service}`:"core/social-link"}return block?block.name:null}function isBlockValid(state,clientId){const block=state.blocks.byClientId[clientId];return!!block&&block.isValid}function getBlockAttributes(state,clientId){return state.blocks.byClientId[clientId]?state.blocks.attributes[clientId]:null}function getBlock(state,clientId){return state.blocks.byClientId[clientId]?state.blocks.tree[clientId]:null}const __unstableGetBlockWithoutInnerBlocks=(0,rememo.A)(((state,clientId)=>{const block=state.blocks.byClientId[clientId];return block?{...block,attributes:getBlockAttributes(state,clientId)}:null}),((state,clientId)=>[state.blocks.byClientId[clientId],state.blocks.attributes[clientId]]));function getBlocks(state,rootClientId){var _state$blocks$tree$tr;const treeKey=rootClientId&&areInnerBlocksControlled(state,rootClientId)?"controlled||"+rootClientId:rootClientId||"";return(null===(_state$blocks$tree$tr=state.blocks.tree[treeKey])||void 0===_state$blocks$tree$tr?void 0:_state$blocks$tree$tr.innerBlocks)||EMPTY_ARRAY}const __unstableGetClientIdWithClientIdsTree=(0,rememo.A)(((state,clientId)=>({clientId,innerBlocks:__unstableGetClientIdsTree(state,clientId)})),(state=>[state.blocks.order])),__unstableGetClientIdsTree=(0,rememo.A)((function(state){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,lodash.map)(getBlockOrder(state,rootClientId),(clientId=>__unstableGetClientIdWithClientIdsTree(state,clientId)))}),(state=>[state.blocks.order])),getClientIdsOfDescendants=(0,rememo.A)(((state,clientIds)=>{const collectedIds=[];for(const givenId of clientIds)for(const descendantId of getBlockOrder(state,givenId))collectedIds.push(descendantId,...getClientIdsOfDescendants(state,[descendantId]));return collectedIds}),(state=>[state.blocks.order])),getClientIdsWithDescendants=(0,rememo.A)((state=>{const collectedIds=[];for(const topLevelId of getBlockOrder(state))collectedIds.push(topLevelId,...getClientIdsOfDescendants(state,[topLevelId]));return collectedIds}),(state=>[state.blocks.order])),getGlobalBlockCount=(0,rememo.A)(((state,blockName)=>{const clientIds=getClientIdsWithDescendants(state);return blockName?(0,lodash.reduce)(clientIds,((accumulator,clientId)=>state.blocks.byClientId[clientId].name===blockName?accumulator+1:accumulator),0):clientIds.length}),(state=>[state.blocks.order,state.blocks.byClientId])),__experimentalGetGlobalBlocksByName=(0,rememo.A)(((state,blockName)=>{if(!blockName)return EMPTY_ARRAY;const foundBlocks=getClientIdsWithDescendants(state).filter((clientId=>state.blocks.byClientId[clientId].name===blockName));return foundBlocks.length>0?foundBlocks:EMPTY_ARRAY}),(state=>[state.blocks.order,state.blocks.byClientId])),getBlocksByClientId=(0,rememo.A)(((state,clientIds)=>(0,lodash.map)((0,lodash.castArray)(clientIds),(clientId=>getBlock(state,clientId)))),((state,clientIds)=>(0,lodash.map)((0,lodash.castArray)(clientIds),(clientId=>state.blocks.tree[clientId]))));function getBlockCount(state,rootClientId){return getBlockOrder(state,rootClientId).length}function getSelectionStart(state){return state.selection.selectionStart}function getSelectionEnd(state){return state.selection.selectionEnd}function getBlockSelectionStart(state){return state.selection.selectionStart.clientId}function getBlockSelectionEnd(state){return state.selection.selectionEnd.clientId}function getSelectedBlockCount(state){const multiSelectedBlockCount=getMultiSelectedBlockClientIds(state).length;return multiSelectedBlockCount||(state.selection.selectionStart.clientId?1:0)}function hasSelectedBlock(state){const{selectionStart,selectionEnd}=state.selection;return!!selectionStart.clientId&&selectionStart.clientId===selectionEnd.clientId}function getSelectedBlockClientId(state){const{selectionStart,selectionEnd}=state.selection,{clientId}=selectionStart;return clientId&&clientId===selectionEnd.clientId?clientId:null}function getSelectedBlock(state){const clientId=getSelectedBlockClientId(state);return clientId?getBlock(state,clientId):null}function getBlockRootClientId(state,clientId){return void 0!==state.blocks.parents[clientId]?state.blocks.parents[clientId]:null}const getBlockParents=(0,rememo.A)((function(state,clientId){let ascending=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const parents=[];let current=clientId;for(;state.blocks.parents[current];)current=state.blocks.parents[current],parents.push(current);return ascending?parents:parents.reverse()}),(state=>[state.blocks.parents])),getBlockParentsByBlockName=(0,rememo.A)((function(state,clientId,blockName){const parents=getBlockParents(state,clientId,arguments.length>3&&void 0!==arguments[3]&&arguments[3]);return(0,lodash.map)((0,lodash.filter)((0,lodash.map)(parents,(id=>({id,name:getBlockName(state,id)}))),(_ref=>{let{name}=_ref;return Array.isArray(blockName)?blockName.includes(name):name===blockName})),(_ref2=>{let{id}=_ref2;return id}))}),(state=>[state.blocks.parents]));function getBlockHierarchyRootClientId(state,clientId){let parent,current=clientId;do{parent=current,current=state.blocks.parents[current]}while(current);return parent}function getLowestCommonAncestorWithSelectedBlock(state,clientId){const selectedId=getSelectedBlockClientId(state),clientParents=[...getBlockParents(state,clientId),clientId],selectedParents=[...getBlockParents(state,selectedId),selectedId];let lowestCommonAncestor;const maxDepth=Math.min(clientParents.length,selectedParents.length);for(let index=0;index<maxDepth&&clientParents[index]===selectedParents[index];index++)lowestCommonAncestor=clientParents[index];return lowestCommonAncestor}function getAdjacentBlockClientId(state,startClientId){let modifier=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===startClientId&&(startClientId=getSelectedBlockClientId(state)),void 0===startClientId&&(startClientId=modifier<0?getFirstMultiSelectedBlockClientId(state):getLastMultiSelectedBlockClientId(state)),!startClientId)return null;const rootClientId=getBlockRootClientId(state,startClientId);if(null===rootClientId)return null;const{order}=state.blocks,orderSet=order[rootClientId],nextIndex=orderSet.indexOf(startClientId)+1*modifier;return nextIndex<0||nextIndex===orderSet.length?null:orderSet[nextIndex]}function getPreviousBlockClientId(state,startClientId){return getAdjacentBlockClientId(state,startClientId,-1)}function getNextBlockClientId(state,startClientId){return getAdjacentBlockClientId(state,startClientId,1)}function getSelectedBlocksInitialCaretPosition(state){return state.initialPosition}const getSelectedBlockClientIds=(0,rememo.A)((state=>{const{selectionStart,selectionEnd}=state.selection;if(void 0===selectionStart.clientId||void 0===selectionEnd.clientId)return EMPTY_ARRAY;if(selectionStart.clientId===selectionEnd.clientId)return[selectionStart.clientId];const rootClientId=getBlockRootClientId(state,selectionStart.clientId);if(null===rootClientId)return EMPTY_ARRAY;const blockOrder=getBlockOrder(state,rootClientId),startIndex=blockOrder.indexOf(selectionStart.clientId),endIndex=blockOrder.indexOf(selectionEnd.clientId);return startIndex>endIndex?blockOrder.slice(endIndex,startIndex+1):blockOrder.slice(startIndex,endIndex+1)}),(state=>[state.blocks.order,state.selection.selectionStart.clientId,state.selection.selectionEnd.clientId]));function getMultiSelectedBlockClientIds(state){const{selectionStart,selectionEnd}=state.selection;return selectionStart.clientId===selectionEnd.clientId?EMPTY_ARRAY:getSelectedBlockClientIds(state)}const getMultiSelectedBlocks=(0,rememo.A)((state=>{const multiSelectedBlockClientIds=getMultiSelectedBlockClientIds(state);return multiSelectedBlockClientIds.length?multiSelectedBlockClientIds.map((clientId=>getBlock(state,clientId))):EMPTY_ARRAY}),(state=>[...getSelectedBlockClientIds.getDependants(state),state.blocks.byClientId,state.blocks.order,state.blocks.attributes]));function getFirstMultiSelectedBlockClientId(state){return(0,lodash.first)(getMultiSelectedBlockClientIds(state))||null}function getLastMultiSelectedBlockClientId(state){return(0,lodash.last)(getMultiSelectedBlockClientIds(state))||null}function isFirstMultiSelectedBlock(state,clientId){return getFirstMultiSelectedBlockClientId(state)===clientId}function isBlockMultiSelected(state,clientId){return-1!==getMultiSelectedBlockClientIds(state).indexOf(clientId)}const isAncestorMultiSelected=(0,rememo.A)(((state,clientId)=>{let ancestorClientId=clientId,isMultiSelected=!1;for(;ancestorClientId&&!isMultiSelected;)ancestorClientId=getBlockRootClientId(state,ancestorClientId),isMultiSelected=isBlockMultiSelected(state,ancestorClientId);return isMultiSelected}),(state=>[state.blocks.order,state.selection.selectionStart.clientId,state.selection.selectionEnd.clientId]));function getMultiSelectedBlocksStartClientId(state){const{selectionStart,selectionEnd}=state.selection;return selectionStart.clientId===selectionEnd.clientId?null:selectionStart.clientId||null}function getMultiSelectedBlocksEndClientId(state){const{selectionStart,selectionEnd}=state.selection;return selectionStart.clientId===selectionEnd.clientId?null:selectionEnd.clientId||null}function __unstableIsFullySelected(state){const selectionAnchor=getSelectionStart(state),selectionFocus=getSelectionEnd(state);return!selectionAnchor.attributeKey&&!selectionFocus.attributeKey&&void 0===selectionAnchor.offset&&void 0===selectionFocus.offset}function __unstableIsSelectionCollapsed(state){const selectionAnchor=getSelectionStart(state),selectionFocus=getSelectionEnd(state);return!!selectionAnchor&&!!selectionFocus&&selectionAnchor.clientId===selectionFocus.clientId&&selectionAnchor.attributeKey===selectionFocus.attributeKey&&selectionAnchor.offset===selectionFocus.offset}function __unstableIsSelectionMergeable(state,isForward){const selectionAnchor=getSelectionStart(state),selectionFocus=getSelectionEnd(state);if(selectionAnchor.clientId===selectionFocus.clientId)return!1;if(!selectionAnchor.attributeKey||!selectionFocus.attributeKey||void 0===selectionAnchor.offset||void 0===selectionFocus.offset)return!1;const anchorRootClientId=getBlockRootClientId(state,selectionAnchor.clientId);if(anchorRootClientId!==getBlockRootClientId(state,selectionFocus.clientId))return!1;const blockOrder=getBlockOrder(state,anchorRootClientId);let selectionStart,selectionEnd;blockOrder.indexOf(selectionAnchor.clientId)>blockOrder.indexOf(selectionFocus.clientId)?(selectionStart=selectionFocus,selectionEnd=selectionAnchor):(selectionStart=selectionAnchor,selectionEnd=selectionFocus);const targetBlockClientId=isForward?selectionEnd.clientId:selectionStart.clientId,blockToMergeClientId=isForward?selectionStart.clientId:selectionEnd.clientId,targetBlock=getBlock(state,targetBlockClientId);if(!(0,build_module.E7)(targetBlock.name).merge)return!1;const blockToMerge=getBlock(state,blockToMergeClientId);if(blockToMerge.name===targetBlock.name)return!0;const blocksToMerge=(0,build_module.bh)(blockToMerge,targetBlock.name);return blocksToMerge&&blocksToMerge.length}const __unstableGetSelectedBlocksWithPartialSelection=state=>{const selectionAnchor=getSelectionStart(state),selectionFocus=getSelectionEnd(state);if(selectionAnchor.clientId===selectionFocus.clientId)return EMPTY_ARRAY;if(!selectionAnchor.attributeKey||!selectionFocus.attributeKey||void 0===selectionAnchor.offset||void 0===selectionFocus.offset)return EMPTY_ARRAY;const anchorRootClientId=getBlockRootClientId(state,selectionAnchor.clientId);if(anchorRootClientId!==getBlockRootClientId(state,selectionFocus.clientId))return EMPTY_ARRAY;const blockOrder=getBlockOrder(state,anchorRootClientId),anchorIndex=blockOrder.indexOf(selectionAnchor.clientId),focusIndex=blockOrder.indexOf(selectionFocus.clientId),[selectionStart,selectionEnd]=anchorIndex>focusIndex?[selectionFocus,selectionAnchor]:[selectionAnchor,selectionFocus],blockA=getBlock(state,selectionStart.clientId),blockAType=(0,build_module.E7)(blockA.name),blockB=getBlock(state,selectionEnd.clientId),blockBType=(0,build_module.E7)(blockB.name),htmlA=blockA.attributes[selectionStart.attributeKey],htmlB=blockB.attributes[selectionEnd.attributeKey],attributeDefinitionA=blockAType.attributes[selectionStart.attributeKey],attributeDefinitionB=blockBType.attributes[selectionEnd.attributeKey];let valueA=create_create({html:htmlA,...mapRichTextSettings(attributeDefinitionA)}),valueB=create_create({html:htmlB,...mapRichTextSettings(attributeDefinitionB)});return valueA=remove(valueA,0,selectionStart.offset),valueB=remove(valueB,selectionEnd.offset,valueB.text.length),[{...blockA,attributes:{...blockA.attributes,[selectionStart.attributeKey]:toHTMLString({value:valueA,...mapRichTextSettings(attributeDefinitionA)})}},{...blockB,attributes:{...blockB.attributes,[selectionEnd.attributeKey]:toHTMLString({value:valueB,...mapRichTextSettings(attributeDefinitionB)})}}]};function getBlockOrder(state,rootClientId){return state.blocks.order[rootClientId||""]||EMPTY_ARRAY}function getBlockIndex(state,clientId){return getBlockOrder(state,getBlockRootClientId(state,clientId)).indexOf(clientId)}function isBlockSelected(state,clientId){const{selectionStart,selectionEnd}=state.selection;return selectionStart.clientId===selectionEnd.clientId&&selectionStart.clientId===clientId}function hasSelectedInnerBlock(state,clientId){let deep=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,lodash.some)(getBlockOrder(state,clientId),(innerClientId=>isBlockSelected(state,innerClientId)||isBlockMultiSelected(state,innerClientId)||deep&&hasSelectedInnerBlock(state,innerClientId,deep)))}function isBlockWithinSelection(state,clientId){if(!clientId)return!1;const clientIds=getMultiSelectedBlockClientIds(state),index=clientIds.indexOf(clientId);return index>-1&&index<clientIds.length-1}function hasMultiSelection(state){const{selectionStart,selectionEnd}=state.selection;return selectionStart.clientId!==selectionEnd.clientId}function selectors_isMultiSelecting(state){return state.isMultiSelecting}function selectors_isSelectionEnabled(state){return state.isSelectionEnabled}function getBlockMode(state,clientId){return state.blocksMode[clientId]||"visual"}function selectors_isTyping(state){return state.isTyping}function isDraggingBlocks(state){return!!state.draggedBlocks.length}function getDraggedBlockClientIds(state){return state.draggedBlocks}function isBlockBeingDragged(state,clientId){return state.draggedBlocks.includes(clientId)}function isAncestorBeingDragged(state,clientId){if(!isDraggingBlocks(state))return!1;const parents=getBlockParents(state,clientId);return(0,lodash.some)(parents,(parentClientId=>isBlockBeingDragged(state,parentClientId)))}function isCaretWithinFormattedText(){return(0,deprecated_build_module.A)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function getBlockInsertionPoint(state){let rootClientId,index;const{insertionPoint,selection:{selectionEnd}}=state;if(null!==insertionPoint)return insertionPoint;const{clientId}=selectionEnd;return clientId?(rootClientId=getBlockRootClientId(state,clientId)||void 0,index=getBlockIndex(state,selectionEnd.clientId)+1):index=getBlockOrder(state).length,{rootClientId,index}}function isBlockInsertionPointVisible(state){return null!==state.insertionPoint}function isValidTemplate(state){return state.template.isValid}function getTemplate(state){return state.settings.template}function getTemplateLock(state,rootClientId){if(!rootClientId)return state.settings.templateLock;const blockListSettings=getBlockListSettings(state,rootClientId);return blockListSettings?blockListSettings.templateLock:null}const checkAllowList=function(list,item){let defaultResult=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof list?list:Array.isArray(list)?!(!list.includes("core/post-content")||null!==item)||list.includes(item):defaultResult},canInsertBlockTypeUnmemoized=function(state,blockName){let blockType,rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(blockName&&"object"==typeof blockName?(blockType=blockName,blockName=blockType.name):blockType=(0,build_module.E7)(blockName),!blockType)return!1;const{allowedBlockTypes}=getSettings(state);if(!checkAllowList(allowedBlockTypes,blockName,!0))return!1;if(!!getTemplateLock(state,rootClientId))return!1;const parentBlockListSettings=getBlockListSettings(state,rootClientId);if(rootClientId&&void 0===parentBlockListSettings)return!1;const parentAllowedBlocks=null==parentBlockListSettings?void 0:parentBlockListSettings.allowedBlocks,hasParentAllowedBlock=checkAllowList(parentAllowedBlocks,blockName),blockAllowedParentBlocks=blockType.parent,parentName=getBlockName(state,rootClientId),hasBlockAllowedParent=checkAllowList(blockAllowedParentBlocks,parentName);let hasBlockAllowedAncestor=!0;const blockAllowedAncestorBlocks=blockType.ancestor;if(blockAllowedAncestorBlocks){const ancestors=[rootClientId,...getBlockParents(state,rootClientId)];hasBlockAllowedAncestor=(0,lodash.some)(ancestors,(ancestorClientId=>checkAllowList(blockAllowedAncestorBlocks,getBlockName(state,ancestorClientId))))}const canInsert=hasBlockAllowedAncestor&&(null===hasParentAllowedBlock&&null===hasBlockAllowedParent||!0===hasParentAllowedBlock||!0===hasBlockAllowedParent);return canInsert?(0,hooks_build_module.W5)("blockEditor.__unstableCanInsertBlockType",canInsert,blockType,rootClientId,{getBlock:getBlock.bind(null,state),getBlockParentsByBlockName:getBlockParentsByBlockName.bind(null,state)}):canInsert},canInsertBlockType=(0,rememo.A)(canInsertBlockTypeUnmemoized,((state,blockName,rootClientId)=>[state.blockListSettings[rootClientId],state.blocks.byClientId[rootClientId],state.settings.allowedBlockTypes,state.settings.templateLock]));function canInsertBlocks(state,clientIds){let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return clientIds.every((id=>canInsertBlockType(state,getBlockName(state,id),rootClientId)))}function canRemoveBlock(state,clientId){let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const attributes=getBlockAttributes(state,clientId);if(null===attributes)return!0;const{lock}=attributes,parentIsLocked=!!getTemplateLock(state,rootClientId);return void 0===lock||void 0===(null==lock?void 0:lock.remove)?!parentIsLocked:!(null!=lock&&lock.remove)}function canRemoveBlocks(state,clientIds){let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return clientIds.every((clientId=>canRemoveBlock(state,clientId,rootClientId)))}function canMoveBlock(state,clientId){let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const attributes=getBlockAttributes(state,clientId);if(null===attributes)return;const{lock}=attributes,parentIsLocked="all"===getTemplateLock(state,rootClientId);return void 0===lock||void 0===(null==lock?void 0:lock.move)?!parentIsLocked:!(null!=lock&&lock.move)}function canMoveBlocks(state,clientIds){let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return clientIds.every((clientId=>canMoveBlock(state,clientId,rootClientId)))}function canEditBlock(state,clientId){const attributes=getBlockAttributes(state,clientId);if(null===attributes)return!0;const{lock}=attributes;return!(null!=lock&&lock.edit)}function canLockBlockType(state,nameOrType){var _state$settings;return!!(0,build_module.pN)(nameOrType,"lock",!0)&&!(null===(_state$settings=state.settings)||void 0===_state$settings||!_state$settings.canLockBlocks)}function getInsertUsage(state,id){var _state$preferences$in,_state$preferences$in2;return null!==(_state$preferences$in=null===(_state$preferences$in2=state.preferences.insertUsage)||void 0===_state$preferences$in2?void 0:_state$preferences$in2[id])&&void 0!==_state$preferences$in?_state$preferences$in:null}const canIncludeBlockTypeInInserter=(state,blockType,rootClientId)=>!!(0,build_module.pN)(blockType,"inserter",!0)&&canInsertBlockTypeUnmemoized(state,blockType.name,rootClientId),calculateFrecency=(time,count)=>{if(!time)return count;const duration=Date.now()-time;switch(!0){case duration<36e5:return 4*count;case duration<864e5:return 2*count;case duration<6048e5:return count/2;default:return count/4}},buildBlockTypeItem=(state,_ref3)=>{let{buildScope="inserter"}=_ref3;return blockType=>{const id=blockType.name;let isDisabled=!1;(0,build_module.pN)(blockType.name,"multiple",!0)||(isDisabled=(0,lodash.some)(getBlocksByClientId(state,getClientIdsWithDescendants(state)),{name:blockType.name}));const{time,count=0}=getInsertUsage(state,id)||{},blockItemBase={id,name:blockType.name,title:blockType.title,icon:blockType.icon,isDisabled,frecency:calculateFrecency(time,count)};if("transform"===buildScope)return blockItemBase;const inserterVariations=(0,build_module.oO)(blockType.name,"inserter");return{...blockItemBase,initialAttributes:{},description:blockType.description,category:blockType.category,keywords:blockType.keywords,variations:inserterVariations,example:blockType.example,utility:1}}},getInserterItems=(0,rememo.A)((function(state){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const buildBlockTypeInserterItem=buildBlockTypeItem(state,{buildScope:"inserter"}),blockParserTokenizer=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,blockTypeInserterItems=(0,build_module.li)().filter((blockType=>canIncludeBlockTypeInInserter(state,blockType,rootClientId))).map(buildBlockTypeInserterItem),reusableBlockInserterItems=canInsertBlockTypeUnmemoized(state,"core/block",rootClientId)?getReusableBlocks(state).map((reusableBlock=>{let icon=library_symbol;if("web"===platform.OS){const rawBlockMatch=("string"==typeof reusableBlock.content.raw?reusableBlock.content.raw:reusableBlock.content).match(blockParserTokenizer);if(rawBlockMatch){const[,,namespace="core/",blockName]=rawBlockMatch,referencedBlockType=(0,build_module.E7)(namespace+blockName);referencedBlockType&&(icon=referencedBlockType.icon)}}const id=`core/block/${reusableBlock.id}`,{time,count=0}=getInsertUsage(state,id)||{},frecency=calculateFrecency(time,count);return{id,name:"core/block",initialAttributes:{ref:reusableBlock.id},title:reusableBlock.title.raw,icon,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency}})):[],items=blockTypeInserterItems.reduce(((accumulator,item)=>{const{variations=[]}=item;if(variations.some((_ref4=>{let{isDefault}=_ref4;return isDefault}))||accumulator.push(item),variations.length){const variationMapper=((state,item)=>variation=>{const variationId=`${item.id}/${variation.name}`,{time,count=0}=getInsertUsage(state,variationId)||{};return{...item,id:variationId,icon:variation.icon||item.icon,title:variation.title||item.title,description:variation.description||item.description,category:variation.category||item.category,example:variation.hasOwnProperty("example")?variation.example:item.example,initialAttributes:{...item.initialAttributes,...variation.attributes},innerBlocks:variation.innerBlocks,keywords:variation.keywords||item.keywords,frecency:calculateFrecency(time,count)}})(state,item);accumulator.push(...variations.map(variationMapper))}return accumulator}),[]),{core:coreItems,noncore:nonCoreItems}=items.reduce(((blocks,block)=>{const{core,noncore}=blocks;return(block.name.startsWith("core/")?core:noncore).push(block),blocks}),{core:[],noncore:[]});return[...[...coreItems,...nonCoreItems],...reusableBlockInserterItems]}),((state,rootClientId)=>[state.blockListSettings[rootClientId],state.blocks.byClientId,state.blocks.order,state.preferences.insertUsage,state.settings.allowedBlockTypes,state.settings.templateLock,getReusableBlocks(state),(0,build_module.li)()])),getBlockTransformItems=(0,rememo.A)((function(state,blocks){var _itemsByName$sourceBl;let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const normalizedBlocks=(0,lodash.castArray)(blocks),[sourceBlock]=normalizedBlocks,buildBlockTypeTransformItem=buildBlockTypeItem(state,{buildScope:"transform"}),blockTypeTransformItems=(0,build_module.li)().filter((blockType=>canIncludeBlockTypeInInserter(state,blockType,rootClientId))).map(buildBlockTypeTransformItem),itemsByName=Object.fromEntries(Object.entries(blockTypeTransformItems).map((_ref5=>{let[,value]=_ref5;return[value.name,value]})));itemsByName["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,i18n_build_module.__)("Unwrap"),icon:null===(_itemsByName$sourceBl=itemsByName[null==sourceBlock?void 0:sourceBlock.name])||void 0===_itemsByName$sourceBl?void 0:_itemsByName$sourceBl.icon};const possibleTransforms=(0,build_module.Fk)(normalizedBlocks).reduce(((accumulator,block)=>("*"===block?accumulator.push(itemsByName["*"]):itemsByName[null==block?void 0:block.name]&&accumulator.push(itemsByName[block.name]),accumulator)),[]);return(0,lodash.orderBy)(possibleTransforms,(block=>itemsByName[block.name].frecency),"desc")}),((state,rootClientId)=>[state.blockListSettings[rootClientId],state.blocks.byClientId,state.preferences.insertUsage,state.settings.allowedBlockTypes,state.settings.templateLock,(0,build_module.li)()])),hasInserterItems=(0,rememo.A)((function(state){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((0,lodash.some)((0,build_module.li)(),(blockType=>canIncludeBlockTypeInInserter(state,blockType,rootClientId))))return!0;return canInsertBlockTypeUnmemoized(state,"core/block",rootClientId)&&getReusableBlocks(state).length>0}),((state,rootClientId)=>[state.blockListSettings[rootClientId],state.blocks.byClientId,state.settings.allowedBlockTypes,state.settings.templateLock,getReusableBlocks(state),(0,build_module.li)()])),__experimentalGetAllowedBlocks=(0,rememo.A)((function(state){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(rootClientId)return(0,lodash.filter)((0,build_module.li)(),(blockType=>canIncludeBlockTypeInInserter(state,blockType,rootClientId)))}),((state,rootClientId)=>[state.blockListSettings[rootClientId],state.blocks.byClientId,state.settings.allowedBlockTypes,state.settings.templateLock,(0,build_module.li)()])),__experimentalGetDirectInsertBlock=(0,rememo.A)((function(state){var _state$blockListSetti,_state$blockListSetti2;let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!rootClientId)return;const defaultBlock=null===(_state$blockListSetti=state.blockListSettings[rootClientId])||void 0===_state$blockListSetti?void 0:_state$blockListSetti.__experimentalDefaultBlock,directInsert=null===(_state$blockListSetti2=state.blockListSettings[rootClientId])||void 0===_state$blockListSetti2?void 0:_state$blockListSetti2.__experimentalDirectInsert;return defaultBlock&&directInsert?"function"==typeof directInsert?directInsert(getBlock(state,rootClientId))?defaultBlock:null:defaultBlock:void 0}),((state,rootClientId)=>[state.blockListSettings[rootClientId],state.blocks.tree[rootClientId]])),__experimentalGetParsedPattern=(0,rememo.A)(((state,patternName)=>{const pattern=state.settings.__experimentalBlockPatterns.find((_ref6=>{let{name}=_ref6;return name===patternName}));return pattern?{...pattern,blocks:(0,build_module.qg)(pattern.content,{__unstableSkipMigrationLogs:!0})}:null}),(state=>[state.settings.__experimentalBlockPatterns])),getAllAllowedPatterns=(0,rememo.A)((state=>{const patterns=state.settings.__experimentalBlockPatterns,{allowedBlockTypes}=getSettings(state),parsedPatterns=patterns.filter((_ref7=>{let{inserter=!0}=_ref7;return!!inserter})).map((_ref8=>{let{name}=_ref8;return __experimentalGetParsedPattern(state,name)})),allowedPatterns=parsedPatterns.filter((_ref9=>{let{blocks}=_ref9;return((blocks,allowedBlockTypes)=>{if("boolean"==typeof allowedBlockTypes)return allowedBlockTypes;const blocksQueue=[...blocks];for(;blocksQueue.length>0;){var _block$innerBlocks;const block=blocksQueue.shift();if(!checkAllowList(allowedBlockTypes,block.name||block.blockName,!0))return!1;null===(_block$innerBlocks=block.innerBlocks)||void 0===_block$innerBlocks||_block$innerBlocks.forEach((innerBlock=>{blocksQueue.push(innerBlock)}))}return!0})(blocks,allowedBlockTypes)}));return allowedPatterns}),(state=>[state.settings.__experimentalBlockPatterns,state.settings.allowedBlockTypes])),__experimentalGetAllowedPatterns=(0,rememo.A)((function(state){let rootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const availableParsedPatterns=getAllAllowedPatterns(state),patternsAllowed=(0,lodash.filter)(availableParsedPatterns,(_ref10=>{let{blocks}=_ref10;return blocks.every((_ref11=>{let{name}=_ref11;return canInsertBlockType(state,name,rootClientId)}))}));return patternsAllowed}),((state,rootClientId)=>[state.settings.__experimentalBlockPatterns,state.settings.allowedBlockTypes,state.settings.templateLock,state.blockListSettings[rootClientId],state.blocks.byClientId[rootClientId]])),__experimentalGetPatternsByBlockTypes=(0,rememo.A)((function(state,blockNames){if(!blockNames)return EMPTY_ARRAY;const patterns=__experimentalGetAllowedPatterns(state,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null),normalizedBlockNames=Array.isArray(blockNames)?blockNames:[blockNames];return patterns.filter((pattern=>{var _pattern$blockTypes,_pattern$blockTypes$s;return null==pattern||null===(_pattern$blockTypes=pattern.blockTypes)||void 0===_pattern$blockTypes||null===(_pattern$blockTypes$s=_pattern$blockTypes.some)||void 0===_pattern$blockTypes$s?void 0:_pattern$blockTypes$s.call(_pattern$blockTypes,(blockName=>normalizedBlockNames.includes(blockName)))}))}),((state,rootClientId)=>[...__experimentalGetAllowedPatterns.getDependants(state,rootClientId)])),__experimentalGetPatternTransformItems=(0,rememo.A)((function(state,blocks){let rootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!blocks)return EMPTY_ARRAY;if(blocks.some((_ref12=>{let{clientId,innerBlocks}=_ref12;return innerBlocks.length||areInnerBlocksControlled(state,clientId)})))return EMPTY_ARRAY;const selectedBlockNames=Array.from(new Set(blocks.map((_ref13=>{let{name}=_ref13;return name}))));return __experimentalGetPatternsByBlockTypes(state,selectedBlockNames,rootClientId)}),((state,rootClientId)=>[...__experimentalGetPatternsByBlockTypes.getDependants(state,rootClientId)]));function getBlockListSettings(state,clientId){return state.blockListSettings[clientId]}function getSettings(state){return state.settings}function isLastBlockChangePersistent(state){return state.blocks.isPersistentChange}const __experimentalGetBlockListSettingsForBlocks=(0,rememo.A)((function(state){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).reduce(((blockListSettingsForBlocks,clientId)=>state.blockListSettings[clientId]?{...blockListSettingsForBlocks,[clientId]:state.blockListSettings[clientId]}:blockListSettingsForBlocks),{})}),(state=>[state.blockListSettings])),__experimentalGetReusableBlockTitle=(0,rememo.A)(((state,ref)=>{var _reusableBlock$title;const reusableBlock=(0,lodash.find)(getReusableBlocks(state),(block=>block.id===ref));return reusableBlock?null===(_reusableBlock$title=reusableBlock.title)||void 0===_reusableBlock$title?void 0:_reusableBlock$title.raw:null}),(state=>[getReusableBlocks(state)]));function __unstableIsLastBlockChangeIgnored(state){return state.blocks.isIgnoredChange}function __experimentalGetLastBlockAttributeChanges(state){return state.lastBlockAttributesChange}function getReusableBlocks(state){var _state$settings$__exp,_state$settings2;return null!==(_state$settings$__exp=null==state||null===(_state$settings2=state.settings)||void 0===_state$settings2?void 0:_state$settings2.__experimentalReusableBlocks)&&void 0!==_state$settings$__exp?_state$settings$__exp:EMPTY_ARRAY}function selectors_isNavigationMode(state){return state.isNavigationMode}function selectors_hasBlockMovingClientId(state){return state.hasBlockMovingClientId}function didAutomaticChange(state){return!!state.automaticChangeStatus}function isBlockHighlighted(state,clientId){return state.highlightedBlock===clientId}function areInnerBlocksControlled(state,clientId){return!!state.blocks.controlledInnerBlocks[clientId]}const __experimentalGetActiveBlockIdByBlockNames=(0,rememo.A)(((state,validBlockNames)=>{if(!validBlockNames.length)return null;const selectedBlockClientId=getSelectedBlockClientId(state);if(validBlockNames.includes(getBlockName(state,selectedBlockClientId)))return selectedBlockClientId;const multiSelectedBlockClientIds=getMultiSelectedBlockClientIds(state),entityAreaParents=getBlockParentsByBlockName(state,selectedBlockClientId||multiSelectedBlockClientIds[0],validBlockNames);return entityAreaParents?(0,lodash.last)(entityAreaParents):null}),((state,validBlockNames)=>[state.selection.selectionStart.clientId,state.selection.selectionEnd.clientId,validBlockNames]));function wasBlockJustInserted(state,clientId,source){const{lastBlockInserted}=state;return lastBlockInserted.clientId===clientId&&lastBlockInserted.source===source}function isBlockVisible(state,clientId){var _state$blocks$visibil,_state$blocks$visibil2;return null===(_state$blocks$visibil=null===(_state$blocks$visibil2=state.blocks.visibility)||void 0===_state$blocks$visibil2?void 0:_state$blocks$visibil2[clientId])||void 0===_state$blocks$visibil||_state$blocks$visibil}const __unstableGetVisibleBlocks=(0,rememo.A)((state=>new Set(Object.keys(state.blocks.visibility).filter((key=>state.blocks.visibility[key])))),(state=>[state.blocks.visibility]));function addContainer(ariaLive="polite"){const container=document.createElement("div");container.id=`a11y-speak-${ariaLive}`,container.className="a11y-speak-region",container.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),container.setAttribute("aria-live",ariaLive),container.setAttribute("aria-relevant","additions text"),container.setAttribute("aria-atomic","true");const{body}=document;return body&&body.appendChild(container),container}let previousMessage="";function speak(message,ariaLive){!function clear(){const regions=document.getElementsByClassName("a11y-speak-region"),introText=document.getElementById("a11y-speak-intro-text");for(let i=0;i<regions.length;i++)regions[i].textContent="";introText&&introText.setAttribute("hidden","hidden")}(),message=function filterMessage(message){return message=message.replace(/<[^<>]+>/g," "),previousMessage===message&&(message+=" "),previousMessage=message,message}(message);const introText=document.getElementById("a11y-speak-intro-text"),containerAssertive=document.getElementById("a11y-speak-assertive"),containerPolite=document.getElementById("a11y-speak-polite");containerAssertive&&"assertive"===ariaLive?containerAssertive.textContent=message:containerPolite&&(containerPolite.textContent=message),introText&&introText.removeAttribute("hidden")}!function domReady(callback){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",callback):callback())}((function setup(){const introText=document.getElementById("a11y-speak-intro-text"),containerAssertive=document.getElementById("a11y-speak-assertive"),containerPolite=document.getElementById("a11y-speak-polite");null===introText&&function addIntroText(){const introText=document.createElement("p");introText.id="a11y-speak-intro-text",introText.className="a11y-speak-intro-text",introText.textContent=(0,i18n_build_module.__)("Notifications"),introText.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),introText.setAttribute("hidden","hidden");const{body}=document;return body&&body.appendChild(introText),introText}(),null===containerAssertive&&addContainer("assertive"),null===containerPolite&&addContainer("polite")}));function retrieveSelectedAttribute(blockAttributes){if(blockAttributes)return Object.keys(blockAttributes).find((name=>{const value=blockAttributes[name];return"string"==typeof value&&-1!==value.indexOf("†")}))}const actions_castArray=maybeArray=>Array.isArray(maybeArray)?maybeArray:[maybeArray],resetBlocks=blocks=>_ref2=>{let{dispatch}=_ref2;dispatch({type:"RESET_BLOCKS",blocks}),dispatch(validateBlocksToTemplate(blocks))},validateBlocksToTemplate=blocks=>_ref3=>{let{select,dispatch}=_ref3;const template=select.getTemplate(),templateLock=select.getTemplateLock(),isBlocksValidToTemplate=!template||"all"!==templateLock||(0,build_module.V6)(blocks,template);if(isBlocksValidToTemplate!==select.isValidTemplate())return dispatch.setTemplateValidity(isBlocksValidToTemplate),isBlocksValidToTemplate};function resetSelection(selectionStart,selectionEnd,initialPosition){return{type:"RESET_SELECTION",selectionStart,selectionEnd,initialPosition}}function receiveBlocks(blocks){return(0,deprecated_build_module.A)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks}}function updateBlockAttributes(clientIds,attributes){let uniqueByBlock=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:actions_castArray(clientIds),attributes,uniqueByBlock}}function updateBlock(clientId,updates){return{type:"UPDATE_BLOCK",clientId,updates}}function selectBlock(clientId){return{type:"SELECT_BLOCK",initialPosition:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,clientId}}const selectPreviousBlock=clientId=>_ref4=>{let{select,dispatch}=_ref4;const previousBlockClientId=select.getPreviousBlockClientId(clientId);previousBlockClientId&&dispatch.selectBlock(previousBlockClientId,-1)},selectNextBlock=clientId=>_ref5=>{let{select,dispatch}=_ref5;const nextBlockClientId=select.getNextBlockClientId(clientId);nextBlockClientId&&dispatch.selectBlock(nextBlockClientId)};function startMultiSelect(){return{type:"START_MULTI_SELECT"}}function stopMultiSelect(){return{type:"STOP_MULTI_SELECT"}}const multiSelect=function(start,end){let __experimentalInitialPosition=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return _ref6=>{let{select,dispatch}=_ref6;if(select.getBlockRootClientId(start)!==select.getBlockRootClientId(end))return;dispatch({type:"MULTI_SELECT",start,end,initialPosition:__experimentalInitialPosition});const blockCount=select.getSelectedBlockCount();speak((0,i18n_build_module.nv)((0,i18n_build_module._n)("%s block selected.","%s blocks selected.",blockCount),blockCount),"assertive")}};function clearSelectedBlock(){return{type:"CLEAR_SELECTED_BLOCK"}}function toggleSelection(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function getBlocksWithDefaultStylesApplied(blocks,blockEditorSettings){var _blockEditorSettings$,_blockEditorSettings$2;const preferredStyleVariations=null!==(_blockEditorSettings$=null==blockEditorSettings||null===(_blockEditorSettings$2=blockEditorSettings.__experimentalPreferredStyleVariations)||void 0===_blockEditorSettings$2?void 0:_blockEditorSettings$2.value)&&void 0!==_blockEditorSettings$?_blockEditorSettings$:{};return blocks.map((block=>{var _block$attributes;const blockName=block.name;if(!(0,build_module.pN)(blockName,"defaultStylePicker",!0))return block;if(!preferredStyleVariations[blockName])return block;const className=null===(_block$attributes=block.attributes)||void 0===_block$attributes?void 0:_block$attributes.className;if(null!=className&&className.includes("is-style-"))return block;const{attributes={}}=block,blockStyle=preferredStyleVariations[blockName];return{...block,attributes:{...attributes,className:`${className||""} is-style-${blockStyle}`.trim()}}}))}const replaceBlocks=function(clientIds,blocks,indexToSelect){let initialPosition=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,meta=arguments.length>4?arguments[4]:void 0;return _ref7=>{let{select,dispatch}=_ref7;clientIds=actions_castArray(clientIds),blocks=getBlocksWithDefaultStylesApplied(actions_castArray(blocks),select.getSettings());const rootClientId=select.getBlockRootClientId(clientIds[0]);for(let index=0;index<blocks.length;index++){const block=blocks[index];if(!select.canInsertBlockType(block.name,rootClientId))return}dispatch({type:"REPLACE_BLOCKS",clientIds,blocks,time:Date.now(),indexToSelect,initialPosition,meta}),dispatch((_ref=>{let{select,dispatch}=_ref;if(select.getBlockCount()>0)return;const{__unstableHasCustomAppender}=select.getSettings();__unstableHasCustomAppender||dispatch.insertDefaultBlock()}))}};function replaceBlock(clientId,block){return replaceBlocks(clientId,block)}const createOnMove=type=>(clientIds,rootClientId)=>_ref8=>{let{select,dispatch}=_ref8;select.canMoveBlocks(clientIds,rootClientId)&&dispatch({type,clientIds:actions_castArray(clientIds),rootClientId})},moveBlocksDown=createOnMove("MOVE_BLOCKS_DOWN"),moveBlocksUp=createOnMove("MOVE_BLOCKS_UP"),moveBlocksToPosition=function(clientIds){let fromRootClientId=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",toRootClientId=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",index=arguments.length>3?arguments[3]:void 0;return _ref9=>{let{select,dispatch}=_ref9;if(select.canMoveBlocks(clientIds,fromRootClientId)){if(fromRootClientId!==toRootClientId){if(!select.canRemoveBlocks(clientIds,fromRootClientId))return;if(!select.canInsertBlocks(clientIds,toRootClientId))return}dispatch({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId,toRootClientId,clientIds,index})}}};function moveBlockToPosition(clientId){return moveBlocksToPosition([clientId],arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",arguments.length>3?arguments[3]:void 0)}function insertBlock(block,index,rootClientId,updateSelection,meta){return insertBlocks([block],index,rootClientId,updateSelection,0,meta)}const insertBlocks=function(blocks,index,rootClientId){let updateSelection=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],initialPosition=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,meta=arguments.length>5?arguments[5]:void 0;return _ref10=>{let{select,dispatch}=_ref10;null!==initialPosition&&"object"==typeof initialPosition&&(meta=initialPosition,initialPosition=0,(0,deprecated_build_module.A)("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),blocks=getBlocksWithDefaultStylesApplied(actions_castArray(blocks),select.getSettings());const allowedBlocks=[];for(const block of blocks){select.canInsertBlockType(block.name,rootClientId)&&allowedBlocks.push(block)}allowedBlocks.length&&dispatch({type:"INSERT_BLOCKS",blocks:allowedBlocks,index,rootClientId,time:Date.now(),updateSelection,initialPosition:updateSelection?initialPosition:null,meta})}};function showInsertionPoint(rootClientId,index){let __unstableOptions=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter}=__unstableOptions;return{type:"SHOW_INSERTION_POINT",rootClientId,index,__unstableWithInserter}}function hideInsertionPoint(){return{type:"HIDE_INSERTION_POINT"}}function setTemplateValidity(isValid){return{type:"SET_TEMPLATE_VALIDITY",isValid}}const synchronizeTemplate=()=>_ref11=>{let{select,dispatch}=_ref11;dispatch({type:"SYNCHRONIZE_TEMPLATE"});const blocks=select.getBlocks(),template=select.getTemplate(),updatedBlockList=(0,build_module.Nk)(blocks,template);dispatch.resetBlocks(updatedBlockList)},__unstableDeleteSelection=isForward=>_ref12=>{let{registry,select,dispatch}=_ref12;const selectionAnchor=select.getSelectionStart(),selectionFocus=select.getSelectionEnd();if(selectionAnchor.clientId===selectionFocus.clientId)return;if(!selectionAnchor.attributeKey||!selectionFocus.attributeKey||void 0===selectionAnchor.offset||void 0===selectionFocus.offset)return!1;const anchorRootClientId=select.getBlockRootClientId(selectionAnchor.clientId);if(anchorRootClientId!==select.getBlockRootClientId(selectionFocus.clientId))return;const blockOrder=select.getBlockOrder(anchorRootClientId);let selectionStart,selectionEnd;blockOrder.indexOf(selectionAnchor.clientId)>blockOrder.indexOf(selectionFocus.clientId)?(selectionStart=selectionFocus,selectionEnd=selectionAnchor):(selectionStart=selectionAnchor,selectionEnd=selectionFocus);const targetSelection=isForward?selectionEnd:selectionStart,targetBlock=select.getBlock(targetSelection.clientId),targetBlockType=(0,build_module.E7)(targetBlock.name);if(!targetBlockType.merge)return;const selectionA=selectionStart,selectionB=selectionEnd,blockA=select.getBlock(selectionA.clientId),blockAType=(0,build_module.E7)(blockA.name),blockB=select.getBlock(selectionB.clientId),blockBType=(0,build_module.E7)(blockB.name),htmlA=blockA.attributes[selectionA.attributeKey],htmlB=blockB.attributes[selectionB.attributeKey],attributeDefinitionA=blockAType.attributes[selectionA.attributeKey],attributeDefinitionB=blockBType.attributes[selectionB.attributeKey];let valueA=create_create({html:htmlA,...mapRichTextSettings(attributeDefinitionA)}),valueB=create_create({html:htmlB,...mapRichTextSettings(attributeDefinitionB)});valueA=remove(valueA,selectionA.offset,valueA.text.length),valueB=insert(valueB,"†",0,selectionB.offset);const cloneA=(0,build_module.JB)(blockA,{[selectionA.attributeKey]:toHTMLString({value:valueA,...mapRichTextSettings(attributeDefinitionA)})}),cloneB=(0,build_module.JB)(blockB,{[selectionB.attributeKey]:toHTMLString({value:valueB,...mapRichTextSettings(attributeDefinitionB)})}),followingBlock=isForward?cloneA:cloneB,blocksWithTheSameType=blockA.name===blockB.name?[followingBlock]:(0,build_module.bh)(followingBlock,targetBlockType.name);if(!blocksWithTheSameType||!blocksWithTheSameType.length)return;let updatedAttributes;if(isForward){const blockToMerge=blocksWithTheSameType.pop();updatedAttributes=targetBlockType.merge(blockToMerge.attributes,cloneB.attributes)}else{const blockToMerge=blocksWithTheSameType.shift();updatedAttributes=targetBlockType.merge(cloneA.attributes,blockToMerge.attributes)}const newAttributeKey=retrieveSelectedAttribute(updatedAttributes),convertedValue=create_create({html:updatedAttributes[newAttributeKey],...mapRichTextSettings(targetBlockType.attributes[newAttributeKey])}),newOffset=convertedValue.text.indexOf("†"),newHtml=toHTMLString({value:remove(convertedValue,newOffset,newOffset+1),...mapRichTextSettings(targetBlockType.attributes[newAttributeKey])});updatedAttributes[newAttributeKey]=newHtml;const selectedBlockClientIds=select.getSelectedBlockClientIds(),replacement=[...isForward?blocksWithTheSameType:[],{...targetBlock,attributes:{...targetBlock.attributes,...updatedAttributes}},...isForward?[]:blocksWithTheSameType];registry.batch((()=>{dispatch.selectionChange(targetBlock.clientId,newAttributeKey,newOffset,newOffset),dispatch.replaceBlocks(selectedBlockClientIds,replacement,0,select.getSelectedBlocksInitialCaretPosition())}))},__unstableSplitSelection=()=>_ref13=>{let{select,dispatch}=_ref13;const selectionAnchor=select.getSelectionStart(),selectionFocus=select.getSelectionEnd();if(selectionAnchor.clientId===selectionFocus.clientId)return;if(!selectionAnchor.attributeKey||!selectionFocus.attributeKey||void 0===selectionAnchor.offset||void 0===selectionFocus.offset)return;const anchorRootClientId=select.getBlockRootClientId(selectionAnchor.clientId);if(anchorRootClientId!==select.getBlockRootClientId(selectionFocus.clientId))return;const blockOrder=select.getBlockOrder(anchorRootClientId);let selectionStart,selectionEnd;blockOrder.indexOf(selectionAnchor.clientId)>blockOrder.indexOf(selectionFocus.clientId)?(selectionStart=selectionFocus,selectionEnd=selectionAnchor):(selectionStart=selectionAnchor,selectionEnd=selectionFocus);const selectionA=selectionStart,selectionB=selectionEnd,blockA=select.getBlock(selectionA.clientId),blockAType=(0,build_module.E7)(blockA.name),blockB=select.getBlock(selectionB.clientId),blockBType=(0,build_module.E7)(blockB.name),htmlA=blockA.attributes[selectionA.attributeKey],htmlB=blockB.attributes[selectionB.attributeKey],attributeDefinitionA=blockAType.attributes[selectionA.attributeKey],attributeDefinitionB=blockBType.attributes[selectionB.attributeKey];let valueA=create_create({html:htmlA,...mapRichTextSettings(attributeDefinitionA)}),valueB=create_create({html:htmlB,...mapRichTextSettings(attributeDefinitionB)});valueA=remove(valueA,selectionA.offset,valueA.text.length),valueB=remove(valueB,0,selectionB.offset),dispatch.replaceBlocks(select.getSelectedBlockClientIds(),[{...blockA,attributes:{...blockA.attributes,[selectionA.attributeKey]:toHTMLString({value:valueA,...mapRichTextSettings(attributeDefinitionA)})}},(0,build_module.Wv)((0,build_module.K$)()),{...blockB,attributes:{...blockB.attributes,[selectionB.attributeKey]:toHTMLString({value:valueB,...mapRichTextSettings(attributeDefinitionB)})}}],1,select.getSelectedBlocksInitialCaretPosition())},__unstableExpandSelection=()=>_ref14=>{let{select,dispatch}=_ref14;const selectionAnchor=select.getSelectionStart(),selectionFocus=select.getSelectionEnd();dispatch.selectionChange({start:{clientId:selectionAnchor.clientId},end:{clientId:selectionFocus.clientId}})},mergeBlocks=(firstBlockClientId,secondBlockClientId)=>_ref15=>{let{registry,select,dispatch}=_ref15;const blocks=[firstBlockClientId,secondBlockClientId];dispatch({type:"MERGE_BLOCKS",blocks});const[clientIdA,clientIdB]=blocks,blockA=select.getBlock(clientIdA),blockAType=(0,build_module.E7)(blockA.name);if(!blockAType)return;const blockB=select.getBlock(clientIdB);if(blockAType&&!blockAType.merge){const blocksWithTheSameType=(0,build_module.bh)(blockB,blockAType.name);if(1!==(null==blocksWithTheSameType?void 0:blocksWithTheSameType.length))return void dispatch.selectBlock(blockA.clientId);const[blockWithSameType]=blocksWithTheSameType;return blockWithSameType.innerBlocks.length<1?void dispatch.selectBlock(blockA.clientId):void registry.batch((()=>{dispatch.insertBlocks(blockWithSameType.innerBlocks,void 0,clientIdA),dispatch.removeBlock(clientIdB),dispatch.selectBlock(blockWithSameType.innerBlocks[0].clientId)}))}const blockBType=(0,build_module.E7)(blockB.name),{clientId,attributeKey,offset}=select.getSelectionStart(),attributeDefinition=(clientId===clientIdA?blockAType:blockBType).attributes[attributeKey],canRestoreTextSelection=(clientId===clientIdA||clientId===clientIdB)&&void 0!==attributeKey&&void 0!==offset&&!!attributeDefinition;attributeDefinition||("number"==typeof attributeKey?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof attributeKey):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const cloneA=(0,build_module.JB)(blockA),cloneB=(0,build_module.JB)(blockB);if(canRestoreTextSelection){const selectedBlock=clientId===clientIdA?cloneA:cloneB,value=insert(create_create({html:selectedBlock.attributes[attributeKey],...mapRichTextSettings(attributeDefinition)}),"†",offset,offset);selectedBlock.attributes[attributeKey]=toHTMLString({value,...mapRichTextSettings(attributeDefinition)})}const blocksWithTheSameType=blockA.name===blockB.name?[cloneB]:(0,build_module.bh)(cloneB,blockA.name);if(!blocksWithTheSameType||!blocksWithTheSameType.length)return;const updatedAttributes=blockAType.merge(cloneA.attributes,blocksWithTheSameType[0].attributes);if(canRestoreTextSelection){const newAttributeKey=retrieveSelectedAttribute(updatedAttributes),convertedValue=create_create({html:updatedAttributes[newAttributeKey],...mapRichTextSettings(blockAType.attributes[newAttributeKey])}),newOffset=convertedValue.text.indexOf("†"),newHtml=toHTMLString({value:remove(convertedValue,newOffset,newOffset+1),...mapRichTextSettings(blockAType.attributes[newAttributeKey])});updatedAttributes[newAttributeKey]=newHtml,dispatch.selectionChange(blockA.clientId,newAttributeKey,newOffset,newOffset)}dispatch.replaceBlocks([blockA.clientId,blockB.clientId],[{...blockA,attributes:{...blockA.attributes,...updatedAttributes}},...blocksWithTheSameType.slice(1)],0)},removeBlocks=function(clientIds){let selectPrevious=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return _ref16=>{let{select,dispatch}=_ref16;if(!clientIds||!clientIds.length)return;clientIds=actions_castArray(clientIds);const rootClientId=select.getBlockRootClientId(clientIds[0]);select.canRemoveBlocks(clientIds,rootClientId)&&(selectPrevious&&dispatch.selectPreviousBlock(clientIds[0]),dispatch({type:"REMOVE_BLOCKS",clientIds}),dispatch((_ref=>{let{select,dispatch}=_ref;if(select.getBlockCount()>0)return;const{__unstableHasCustomAppender}=select.getSettings();__unstableHasCustomAppender||dispatch.insertDefaultBlock()})))}};function removeBlock(clientId,selectPrevious){return removeBlocks([clientId],selectPrevious)}function replaceInnerBlocks(rootClientId,blocks){let updateSelection=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId,blocks,updateSelection,initialPosition:updateSelection?arguments.length>3&&void 0!==arguments[3]?arguments[3]:0:null,time:Date.now()}}function toggleBlockMode(clientId){return{type:"TOGGLE_BLOCK_MODE",clientId}}function startTyping(){return{type:"START_TYPING"}}function stopTyping(){return{type:"STOP_TYPING"}}function startDraggingBlocks(){return{type:"START_DRAGGING_BLOCKS",clientIds:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]}}function stopDraggingBlocks(){return{type:"STOP_DRAGGING_BLOCKS"}}function enterFormattedText(){return(0,deprecated_build_module.A)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function exitFormattedText(){return(0,deprecated_build_module.A)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function selectionChange(clientId,attributeKey,startOffset,endOffset){return"string"==typeof clientId?{type:"SELECTION_CHANGE",clientId,attributeKey,startOffset,endOffset}:{type:"SELECTION_CHANGE",...clientId}}const insertDefaultBlock=(attributes,rootClientId,index)=>_ref17=>{let{dispatch}=_ref17;const defaultBlockName=(0,build_module.K$)();if(!defaultBlockName)return;const block=(0,build_module.Wv)(defaultBlockName,attributes);return dispatch.insertBlock(block,index,rootClientId)};function updateBlockListSettings(clientId,settings){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId,settings}}function updateSettings(settings){return{type:"UPDATE_SETTINGS",settings}}function __unstableSaveReusableBlock(id,updatedId){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id,updatedId}}function __unstableMarkLastChangeAsPersistent(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function __unstableMarkNextChangeAsNotPersistent(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const __unstableMarkAutomaticChange=()=>_ref18=>{let{dispatch}=_ref18;dispatch({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback=cb=>setTimeout(cb,100)}=window;requestIdleCallback((()=>{dispatch({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},setNavigationMode=function(){let isNavigationMode=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return _ref19=>{let{dispatch}=_ref19;dispatch({type:"SET_NAVIGATION_MODE",isNavigationMode}),speak(isNavigationMode?(0,i18n_build_module.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter."):(0,i18n_build_module.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},setBlockMovingClientId=function(){let hasBlockMovingClientId=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return _ref20=>{let{dispatch}=_ref20;dispatch({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId}),hasBlockMovingClientId&&speak((0,i18n_build_module.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},duplicateBlocks=function(clientIds){let updateSelection=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return _ref21=>{let{select,dispatch}=_ref21;if(!clientIds||!clientIds.length)return;const blocks=select.getBlocksByClientId(clientIds);if(blocks.some((block=>!block)))return;const blockNames=blocks.map((block=>block.name));if(blockNames.some((blockName=>!(0,build_module.pN)(blockName,"multiple",!0))))return;const rootClientId=select.getBlockRootClientId(clientIds[0]),clientIdsArray=actions_castArray(clientIds),lastSelectedIndex=select.getBlockIndex(clientIdsArray[clientIdsArray.length-1]),clonedBlocks=blocks.map((block=>(0,build_module.Eb)(block)));return dispatch.insertBlocks(clonedBlocks,lastSelectedIndex+1,rootClientId,updateSelection),clonedBlocks.length>1&&updateSelection&&dispatch.multiSelect(clonedBlocks[0].clientId,clonedBlocks[clonedBlocks.length-1].clientId),clonedBlocks.map((block=>block.clientId))}},insertBeforeBlock=clientId=>_ref22=>{let{select,dispatch}=_ref22;if(!clientId)return;const rootClientId=select.getBlockRootClientId(clientId);if(select.getTemplateLock(rootClientId))return;const firstSelectedIndex=select.getBlockIndex(clientId);return dispatch.insertDefaultBlock({},rootClientId,firstSelectedIndex)},insertAfterBlock=clientId=>_ref23=>{let{select,dispatch}=_ref23;if(!clientId)return;const rootClientId=select.getBlockRootClientId(clientId);if(select.getTemplateLock(rootClientId))return;const firstSelectedIndex=select.getBlockIndex(clientId);return dispatch.insertDefaultBlock({},rootClientId,firstSelectedIndex+1)};function toggleBlockHighlight(clientId,isHighlighted){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId,isHighlighted}}const flashBlock=clientId=>async _ref24=>{let{dispatch}=_ref24;dispatch(toggleBlockHighlight(clientId,!0)),await new Promise((resolve=>setTimeout(resolve,150))),dispatch(toggleBlockHighlight(clientId,!1))};function setHasControlledInnerBlocks(clientId,hasControlledInnerBlocks){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks,clientId}}function setBlockVisibility(updates){return{type:"SET_BLOCK_VISIBILITY",updates}}const storeConfig={reducer,selectors:store_selectors_namespaceObject,actions:store_actions_namespaceObject},store_store=(0,redux_store.A)("core/block-editor",{...storeConfig,persist:["preferences"]});(0,data_build_module.ti)("core/block-editor",{...storeConfig,persist:["preferences"]});const DEFAULT_BLOCK_EDIT_CONTEXT={name:"",isSelected:!1},block_edit_context_Context=(0,react.createContext)(DEFAULT_BLOCK_EDIT_CONTEXT),{Provider:block_edit_context_Provider}=block_edit_context_Context;function context_useBlockEditContext(){return(0,react.useContext)(block_edit_context_Context)}function useDisplayBlockControls(){const{isSelected,clientId,name}=context_useBlockEditContext();return use_select_useSelect((select=>{if(isSelected)return!0;const{getBlockName,isFirstMultiSelectedBlock,getMultiSelectedBlockClientIds}=select(store_store);return!!isFirstMultiSelectedBlock(clientId)&&getMultiSelectedBlockClientIds().every((id=>getBlockName(id)===name))}),[clientId,isSelected,name])}function BlockControlsFill(_ref){let{group="default",controls,children,__experimentalShareWithChildBlocks=!1}=_ref;const Fill=function useBlockControlsFill(group,shareWithChildBlocks){const isDisplayed=useDisplayBlockControls(),{clientId}=context_useBlockEditContext(),isParentDisplayed=use_select_useSelect((select=>{const{getBlockName,hasSelectedInnerBlock}=select(store_store),{hasBlockSupport}=select(build_module.M_);return shareWithChildBlocks&&hasBlockSupport(getBlockName(clientId),"__experimentalExposeControlsToChildren",!1)&&hasSelectedInnerBlock(clientId)}),[shareWithChildBlocks,clientId]);var _groups$group;return isDisplayed?null===(_groups$group=block_controls_groups[group])||void 0===_groups$group?void 0:_groups$group.Fill:isParentDisplayed?block_controls_groups.parent.Fill:null}(group,__experimentalShareWithChildBlocks);return Fill?(0,react.createElement)(style_provider,{document},(0,react.createElement)(Fill,null,(fillProps=>{const value=(0,lodash.isEmpty)(fillProps)?null:fillProps;return(0,react.createElement)(toolbar_context.Provider,{value},"default"===group&&(0,react.createElement)(toolbar_group,{controls}),children)}))):null}function BlockControlsSlot(_ref){let{group="default",...props}=_ref;const accessibleToolbarState=(0,react.useContext)(toolbar_context),Slot=block_controls_groups[group].Slot,slot=useSlot(Slot.__unstableName);return Boolean(slot.fills&&slot.fills.length)?"default"===group?(0,react.createElement)(Slot,(0,esm_extends.A)({},props,{bubblesVirtually:!0,fillProps:accessibleToolbarState})):(0,react.createElement)(toolbar_group,null,(0,react.createElement)(Slot,(0,esm_extends.A)({},props,{bubblesVirtually:!0,fillProps:accessibleToolbarState}))):null}const BlockControls=BlockControlsFill;BlockControls.Slot=BlockControlsSlot;const block_controls=BlockControls;const toolbar_dropdown_menu=(0,react.forwardRef)((function ToolbarDropdownMenu(props,ref){return(0,react.useContext)(toolbar_context)?(0,react.createElement)(toolbar_item,(0,helpers_esm_extends.A)({ref},props.toggleProps),(toolbarItemProps=>(0,react.createElement)(dropdown_menu,(0,helpers_esm_extends.A)({},props,{popoverProps:{isAlternate:!0,...props.popoverProps},toggleProps:toolbarItemProps})))):(0,react.createElement)(dropdown_menu,props)}));const menu_group=function MenuGroup(props){const{children,className="",label,hideSeparator}=props,instanceId=(0,use_instance_id.A)(MenuGroup);if(!react.Children.count(children))return null;const labelId=`components-menu-group-label-${instanceId}`,classNames=classnames_default()(className,"components-menu-group",{"has-hidden-separator":hideSeparator});return(0,react.createElement)("div",{className:classNames},label&&(0,react.createElement)("div",{className:"components-menu-group__label",id:labelId,"aria-hidden":"true"},label),(0,react.createElement)("div",{role:"group","aria-labelledby":label?labelId:null},children))};const menu_item=(0,react.forwardRef)((function MenuItem(props,ref){let{children,info,className,icon,iconPosition="right",shortcut,isSelected,role="menuitem",...buttonProps}=props;return className=classnames_default()("components-menu-item__button",className),info&&(children=(0,react.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,react.createElement)("span",{className:"components-menu-item__item"},children),(0,react.createElement)("span",{className:"components-menu-item__info"},info))),icon&&"string"!=typeof icon&&(icon=(0,react.cloneElement)(icon,{className:classnames_default()("components-menu-items__item-icon",{"has-icon-right":"right"===iconPosition})})),(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({ref,"aria-checked":"menuitemcheckbox"===role||"menuitemradio"===role?isSelected:void 0,role,icon:"left"===iconPosition?icon:void 0,className},buttonProps),(0,react.createElement)("span",{className:"components-menu-item__item"},children),(0,react.createElement)(build_module_shortcut,{className:"components-menu-item__shortcut",shortcut}),icon&&"right"===iconPosition&&(0,react.createElement)(build_module_icon,{icon}))})),justify_left=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),justify_center=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),justify_right=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),justify_space_between=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),arrow_right=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),arrow_down=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));var emotion_react_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");const breakpoints=["40em","52em","64em"],useBreakpointIndex=function(){let options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex=0}=options;if("number"!=typeof defaultIndex)throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);if(defaultIndex<0||defaultIndex>breakpoints.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);const[value,setValue]=(0,react.useState)(defaultIndex);return(0,react.useEffect)((()=>{const onResize=()=>{const newValue=breakpoints.filter((bp=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${bp})`).matches)).length;value!==newValue&&setValue(newValue)};return onResize(),"undefined"!=typeof window&&window.addEventListener("resize",onResize),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",onResize)}}),[value]),value};function useResponsiveValue(values){const index=useBreakpointIndex(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});if(!Array.isArray(values)&&"function"!=typeof values)return values;const array=values||[];return array[index>=array.length?array.length-1:index]}const GRID_BASE="4px";function space(value){var _window$CSS,_window$CSS$supports;if(void 0===value)return;if(!value)return"0";const asInt="number"==typeof value?value:Number(value);return"undefined"!=typeof window&&null!==(_window$CSS=window.CSS)&&void 0!==_window$CSS&&null!==(_window$CSS$supports=_window$CSS.supports)&&void 0!==_window$CSS$supports&&_window$CSS$supports.call(_window$CSS,"margin",value.toString())||Number.isNaN(asInt)?value.toString():`calc(${GRID_BASE} * ${value})`}const Flex={name:"zjik7",styles:"display:flex"},Item={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},block={name:"82a6rk",styles:"flex:1"},ItemsColumn={name:"13nosa1",styles:">*{min-height:0;}"},ItemsRow={name:"1pwxzk4",styles:">*{min-width:0;}"};var _wordpress_i18n_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.57.0/node_modules/@wordpress/i18n/build-module/index.js");const LOWER_LEFT_REGEXP=new RegExp(/-left/g),LOWER_RIGHT_REGEXP=new RegExp(/-right/g),UPPER_LEFT_REGEXP=new RegExp(/Left/g),UPPER_RIGHT_REGEXP=new RegExp(/Right/g);function getConvertedKey(key){return"left"===key?"right":"right"===key?"left":LOWER_LEFT_REGEXP.test(key)?key.replace(LOWER_LEFT_REGEXP,"-right"):LOWER_RIGHT_REGEXP.test(key)?key.replace(LOWER_RIGHT_REGEXP,"-left"):UPPER_LEFT_REGEXP.test(key)?key.replace(UPPER_LEFT_REGEXP,"Right"):UPPER_RIGHT_REGEXP.test(key)?key.replace(UPPER_RIGHT_REGEXP,"Left"):key}const convertLTRToRTL=function(){let ltrStyles=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.fromEntries(Object.entries(ltrStyles).map((_ref=>{let[key,value]=_ref;return[getConvertedKey(key),value]})))};function rtl(){let ltrStyles=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},rtlStyles=arguments.length>1?arguments[1]:void 0;return()=>rtlStyles?(0,_wordpress_i18n_build_module.V8)()?(0,emotion_react_browser_esm.AH)(rtlStyles,""):(0,emotion_react_browser_esm.AH)(ltrStyles,""):(0,_wordpress_i18n_build_module.V8)()?(0,emotion_react_browser_esm.AH)(convertLTRToRTL(ltrStyles),""):(0,emotion_react_browser_esm.AH)(ltrStyles,"")}function useFlex(props){const{align="center",className,direction:directionProp="row",expanded=!0,gap=2,justify="space-between",wrap=!1,...otherProps}=useContextSystem(function hook_useDeprecatedProps(props){const{isReversed,...otherProps}=props;return void 0!==isReversed?((0,deprecated_build_module.A)("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...otherProps,direction:isReversed?"row-reverse":"row"}):otherProps}(props),"Flex"),direction=useResponsiveValue(Array.isArray(directionProp)?directionProp:[directionProp]),isColumn="string"==typeof direction&&!!direction.includes("column"),isReverse="string"==typeof direction&&direction.includes("reverse"),cx=useCx(),rtlWatchResult=rtl.watch();return{...otherProps,className:(0,react.useMemo)((()=>{const sx={};return sx.Base=(0,emotion_react_browser_esm.AH)({alignItems:isColumn?"normal":align,flexDirection:direction,flexWrap:wrap?"wrap":void 0,justifyContent:justify,height:isColumn&&expanded?"100%":void 0,width:!isColumn&&expanded?"100%":void 0,marginBottom:wrap?`calc(${space(gap)} * -1)`:void 0},"",""),sx.Items=(0,emotion_react_browser_esm.AH)(">*+*:not( marquee ){margin-top:",isColumn?space(gap):void 0,";",rtl({marginLeft:isColumn||isReverse?void 0:space(gap),marginRight:!isColumn&&isReverse?space(gap):void 0})(),";}",""),sx.WrapItems=(0,emotion_react_browser_esm.AH)(">*:not( marquee ){margin-bottom:",space(gap),";",rtl({marginLeft:!isColumn&&isReverse?space(gap):void 0,marginRight:isColumn||isReverse?void 0:space(gap)})(),";}>*:last-child:not( marquee ){",rtl({marginLeft:!isColumn&&isReverse?0:void 0,marginRight:isColumn||isReverse?void 0:0})(),";}",""),cx(Flex,sx.Base,wrap?sx.WrapItems:sx.Items,isColumn?ItemsColumn:ItemsRow,className)}),[align,className,cx,direction,expanded,gap,isColumn,isReverse,justify,wrap,rtlWatchResult]),isColumn}}rtl.watch=()=>(0,_wordpress_i18n_build_module.V8)();const FlexContext=(0,react.createContext)({flexItemDisplay:void 0}),useFlexContext=()=>(0,react.useContext)(FlexContext);const flex_component=contextConnect((function UnconnectedFlex(props,forwardedRef){const{children,isColumn,...otherProps}=useFlex(props);return(0,react.createElement)(FlexContext.Provider,{value:{flexItemDisplay:isColumn?"block":void 0}},(0,react.createElement)(component,(0,helpers_esm_extends.A)({},otherProps,{ref:forwardedRef}),children))}),"Flex");function useFlexItem(props){const{className,display:displayProp,isBlock=!1,...otherProps}=useContextSystem(props,"FlexItem"),sx={},contextDisplay=useFlexContext().flexItemDisplay;sx.Base=(0,emotion_react_browser_esm.AH)({display:displayProp||contextDisplay},"","");return{...otherProps,className:useCx()(Item,sx.Base,isBlock&&block,className)}}const flex_item_component=contextConnect((function UnconnectedFlexItem(props,forwardedRef){const flexItemProps=useFlexItem(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},flexItemProps,{ref:forwardedRef}))}),"FlexItem"),form_toggle_noop=()=>{};const form_toggle=function FormToggle(props){const{className,checked,id,disabled,onChange=form_toggle_noop,...additionalProps}=props,wrapperClasses=classnames_default()("components-form-toggle",className,{"is-checked":checked,"is-disabled":disabled});return(0,react.createElement)("span",{className:wrapperClasses},(0,react.createElement)("input",(0,helpers_esm_extends.A)({className:"components-form-toggle__input",id,type:"checkbox",checked,onChange,disabled},additionalProps)),(0,react.createElement)("span",{className:"components-form-toggle__track"}),(0,react.createElement)("span",{className:"components-form-toggle__thumb"}))},font_values={"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 font(value){return(0,lodash.get)(font_values,value,"")}const boxSizingReset={name:"kv6lnz",styles:"box-sizing:border-box;*,*::before,*::after{box-sizing:inherit;}"};const baseLabelTypography={name:"9amh4a",styles:"font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase"};var node_modules_colord=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs"),names=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs");function rgba(){let hexValue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",alpha=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,node_modules_colord.Mj)(hexValue).alpha(alpha).toRgbString()}(0,node_modules_colord.X$)([names.A]);const GRAY={900:"#1e1e1e",800:"#2f2f2f",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},DARK_GRAY={500:"#555d66",300:"#6c7781",150:"#8d96a0"},LIGHT_GRAY={800:"#b5bcc2",600:"#d7dade",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5"},UI={theme:"var( --wp-admin-theme-color, #007cba)",background:"#fff",backgroundDisabled:LIGHT_GRAY[200],border:GRAY[700],borderHover:GRAY[700],borderFocus:"var( --wp-admin-theme-color-darker-10, #006ba1)",borderDisabled:GRAY[400],textDisabled:DARK_GRAY[150],textDark:"#fff",darkGrayPlaceholder:rgba(GRAY[900],.62),lightGrayPlaceholder:rgba("#fff",.65)},COLORS=Object.freeze({darkGray:DARK_GRAY,gray:GRAY,lightGray:LIGHT_GRAY,white:"#fff",alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},ui:UI});const Wrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"ej5x27r4"})("font-family:",font("default.fontFamily"),";font-size:",font("default.fontSize"),";",boxSizingReset,";"),StyledField=(0,emotion_styled_base_browser_esm.A)("div",{target:"ej5x27r3"})((_ref2=>{let{__nextHasNoMarginBottom=!1}=_ref2;return!__nextHasNoMarginBottom&&(0,emotion_react_browser_esm.AH)("margin-bottom:",space(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),labelStyles=(0,emotion_react_browser_esm.AH)(baseLabelTypography,";display:inline-block;margin-bottom:",space(2),";padding:0;",""),StyledLabel=(0,emotion_styled_base_browser_esm.A)("label",{target:"ej5x27r2"})(labelStyles,";");var _ref={name:"11yad0w",styles:"margin-bottom:revert"};const StyledHelp=(0,emotion_styled_base_browser_esm.A)("p",{target:"ej5x27r1"})("margin-top:",space(2),";margin-bottom:0;font-size:",font("helpText.fontSize"),";font-style:normal;color:",COLORS.gray[700],";",(_ref3=>{let{__nextHasNoMarginBottom=!1}=_ref3;return!__nextHasNoMarginBottom&&_ref}),";"),StyledVisualLabel=(0,emotion_styled_base_browser_esm.A)("span",{target:"ej5x27r0"})(labelStyles,";"),BaseControl=_ref=>{let{__nextHasNoMarginBottom=!1,id,label,hideLabelFromVision=!1,help,className,children}=_ref;return(0,react.createElement)(Wrapper,{className:classnames_default()("components-base-control",className)},(0,react.createElement)(StyledField,{className:"components-base-control__field",__nextHasNoMarginBottom},label&&id&&(hideLabelFromVision?(0,react.createElement)(visually_hidden_component,{as:"label",htmlFor:id},label):(0,react.createElement)(StyledLabel,{className:"components-base-control__label",htmlFor:id},label)),label&&!id&&(hideLabelFromVision?(0,react.createElement)(visually_hidden_component,{as:"label"},label):(0,react.createElement)(BaseControl.VisualLabel,null,label)),children),!!help&&(0,react.createElement)(StyledHelp,{id:id?id+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom},help))};BaseControl.VisualLabel=_ref2=>{let{className,children,...props}=_ref2;return(0,react.createElement)(StyledVisualLabel,(0,helpers_esm_extends.A)({},props,{className:classnames_default()("components-base-control__label",className)}),children)};const base_control=BaseControl;function ToggleControl(_ref){let{label,checked,help,className,onChange,disabled}=_ref;const id=`inspector-toggle-control-${(0,use_instance_id.A)(ToggleControl)}`;let describedBy,helpLabel;return help&&(describedBy=id+"__help",helpLabel="function"==typeof help?help(checked):help),(0,react.createElement)(base_control,{id,help:helpLabel,className:classnames_default()("components-toggle-control",className)},(0,react.createElement)(form_toggle,{id,checked,onChange:function onChangeToggle(event){onChange(event.target.checked)},"aria-describedby":describedBy,disabled}),(0,react.createElement)("label",{htmlFor:id,className:"components-toggle-control__label"},label))}function appendSelectors(selectors){let append=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return selectors.split(",").map((subselector=>`.editor-styles-wrapper ${subselector}${append?` ${append}`:""}`)).join(",")}function getBlockGapCSS(selector,layoutDefinitions,layoutType,blockGapValue){var _layoutDefinitions$la,_layoutDefinitions$la2;let output="";return null!=layoutDefinitions&&null!==(_layoutDefinitions$la=layoutDefinitions[layoutType])&&void 0!==_layoutDefinitions$la&&null!==(_layoutDefinitions$la2=_layoutDefinitions$la.spacingStyles)&&void 0!==_layoutDefinitions$la2&&_layoutDefinitions$la2.length&&blockGapValue&&layoutDefinitions[layoutType].spacingStyles.forEach((gapStyle=>{output+=`${appendSelectors(selector,gapStyle.selector.trim())} { `,output+=Object.entries(gapStyle.rules).map((_ref=>{let[cssProperty,value]=_ref;return`${cssProperty}: ${value||blockGapValue}`})).join("; "),output+="; }"})),output}function getAlignmentsInfo(layout){const{contentSize,wideSize}=layout,alignmentInfo={},sizeRegex=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return sizeRegex.test(contentSize)&&(alignmentInfo.none=(0,i18n_build_module.nv)((0,i18n_build_module.__)("Max %s wide"),contentSize)),sizeRegex.test(wideSize)&&(alignmentInfo.wide=(0,i18n_build_module.nv)((0,i18n_build_module.__)("Max %s wide"),wideSize)),alignmentInfo}const isWeb="web"===platform.OS,allUnits={px:{value:"px",label:isWeb?"px":(0,_wordpress_i18n_build_module.__)("Pixels (px)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Pixels (px)"),step:1},"%":{value:"%",label:isWeb?"%":(0,_wordpress_i18n_build_module.__)("Percentage (%)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Percent (%)"),step:.1},em:{value:"em",label:isWeb?"em":(0,_wordpress_i18n_build_module.__)("Relative to parent font size (em)"),a11yLabel:(0,_wordpress_i18n_build_module._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:isWeb?"rem":(0,_wordpress_i18n_build_module.__)("Relative to root font size (rem)"),a11yLabel:(0,_wordpress_i18n_build_module._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:isWeb?"vw":(0,_wordpress_i18n_build_module.__)("Viewport width (vw)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:isWeb?"vh":(0,_wordpress_i18n_build_module.__)("Viewport height (vh)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:isWeb?"vmin":(0,_wordpress_i18n_build_module.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:isWeb?"vmax":(0,_wordpress_i18n_build_module.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:isWeb?"ch":(0,_wordpress_i18n_build_module.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:isWeb?"ex":(0,_wordpress_i18n_build_module.__)("x-height of the font (ex)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:isWeb?"cm":(0,_wordpress_i18n_build_module.__)("Centimeters (cm)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:isWeb?"mm":(0,_wordpress_i18n_build_module.__)("Millimeters (mm)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:isWeb?"in":(0,_wordpress_i18n_build_module.__)("Inches (in)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Inches (in)"),step:.001},pc:{value:"pc",label:isWeb?"pc":(0,_wordpress_i18n_build_module.__)("Picas (pc)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Picas (pc)"),step:1},pt:{value:"pt",label:isWeb?"pt":(0,_wordpress_i18n_build_module.__)("Points (pt)"),a11yLabel:(0,_wordpress_i18n_build_module.__)("Points (pt)"),step:1}},ALL_CSS_UNITS=Object.values(allUnits),CSS_UNITS=[allUnits.px,allUnits["%"],allUnits.em,allUnits.rem,allUnits.vw,allUnits.vh],DEFAULT_UNIT=allUnits.px;function getParsedQuantityAndUnit(rawValue,fallbackUnit,allowedUnits){return parseQuantityAndUnitFromRawValue(fallbackUnit?`${null!=rawValue?rawValue:""}${fallbackUnit}`:rawValue,allowedUnits)}function hasUnits(units){return Array.isArray(units)&&!!units.length}function parseQuantityAndUnitFromRawValue(rawValue){var _trimmedValue,_unitMatch$;let trimmedValue,quantityToReturn,allowedUnits=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ALL_CSS_UNITS;if(void 0!==rawValue||null===rawValue){trimmedValue=`${rawValue}`.trim();const parsedQuantity=parseFloat(trimmedValue);quantityToReturn=isFinite(parsedQuantity)?parsedQuantity:void 0}const unitMatch=null===(_trimmedValue=trimmedValue)||void 0===_trimmedValue?void 0:_trimmedValue.match(/[\d.\-\+]*\s*(.*)/),matchedUnit=null==unitMatch||null===(_unitMatch$=unitMatch[1])||void 0===_unitMatch$?void 0:_unitMatch$.toLowerCase();let unitToReturn;if(hasUnits(allowedUnits)){const match=allowedUnits.find((item=>item.value===matchedUnit));unitToReturn=null==match?void 0:match.value}else unitToReturn=DEFAULT_UNIT.value;return[quantityToReturn,unitToReturn]}function getValidParsedQuantityAndUnit(rawValue,allowedUnits,fallbackQuantity,fallbackUnit){const[parsedQuantity,parsedUnit]=parseQuantityAndUnitFromRawValue(rawValue,allowedUnits),quantityToReturn=null!=parsedQuantity?parsedQuantity:fallbackQuantity;let unitToReturn=parsedUnit||fallbackUnit;return!unitToReturn&&hasUnits(allowedUnits)&&(unitToReturn=allowedUnits[0].value),[quantityToReturn,unitToReturn]}const useCustomUnits=_ref=>{let{units=ALL_CSS_UNITS,availableUnits=[],defaultValues}=_ref;const customUnitsToReturn=function filterUnitsWithSettings(){let allowedUnitValues=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],availableUnits=arguments.length>1?arguments[1]:void 0;return Array.isArray(availableUnits)?availableUnits.filter((unit=>allowedUnitValues.includes(unit.value))):[]}(availableUnits,units);return defaultValues&&customUnitsToReturn.forEach(((unit,i)=>{if(defaultValues[unit.value]){const[parsedDefaultValue]=parseQuantityAndUnitFromRawValue(defaultValues[unit.value]);customUnitsToReturn[i].default=parsedDefaultValue}})),customUnitsToReturn};const flex_block_component=contextConnect((function UnconnectedFlexBlock(props,forwardedRef){const flexBlockProps=function useFlexBlock(props){return useFlexItem({isBlock:!0,...useContextSystem(props,"FlexBlock")})}(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},flexBlockProps,{ref:forwardedRef}))}),"FlexBlock");var use_gesture_react_esm=__webpack_require__("../../node_modules/.pnpm/@use-gesture+react@10.3.0_react@17.0.2/node_modules/@use-gesture/react/dist/use-gesture-react.esm.js");const CHANGE="CHANGE",COMMIT="COMMIT",CONTROL="CONTROL",DRAG_END="DRAG_END",DRAG_START="DRAG_START",DRAG="DRAG",INVALIDATE="INVALIDATE",PRESS_DOWN="PRESS_DOWN",PRESS_ENTER="PRESS_ENTER",PRESS_UP="PRESS_UP",RESET="RESET",CONTROL_PROPS={controlSurfaceColor:COLORS.white,controlTextActiveColor:COLORS.ui.theme,controlPaddingX:"12px",controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:COLORS.white,controlBorderRadius:"2px",controlBorderColor:COLORS.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:COLORS.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${COLORS.ui.theme}`,controlDestructiveBorderColor:COLORS.alert.red,controlHeight:"36px",controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},TOGGLE_GROUP_CONTROL_PROPS={toggleGroupControlBackgroundColor:CONTROL_PROPS.controlBackgroundColor,toggleGroupControlBorderColor:COLORS.ui.border,toggleGroupControlBackdropBackgroundColor:CONTROL_PROPS.controlSurfaceColor,toggleGroupControlBackdropBorderColor:COLORS.ui.border,toggleGroupControlBackdropBoxShadow:"transparent",toggleGroupControlButtonColorActive:CONTROL_PROPS.controlBackgroundColor},config_values=Object.assign({},CONTROL_PROPS,TOGGLE_GROUP_CONTROL_PROPS,{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,radiusBlockUi:"2px",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.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${space(2)}`,cardPaddingSmall:`${space(4)}`,cardPaddingMedium:`${space(4)} ${space(6)}`,cardPaddingLarge:`${space(6)} ${space(8)}`,surfaceBackgroundColor:COLORS.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:COLORS.white,surfaceColor:COLORS.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 Truncate={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};function isValueDefined(value){return null!=value}const TRUNCATE_ELLIPSIS="…",TRUNCATE_TYPE={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},TRUNCATE_DEFAULT_PROPS={ellipsis:TRUNCATE_ELLIPSIS,ellipsizeMode:TRUNCATE_TYPE.auto,limit:0,numberOfLines:0};function truncateContent(){let words=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const mergedProps={...TRUNCATE_DEFAULT_PROPS,...arguments.length>1?arguments[1]:void 0},{ellipsis,ellipsizeMode,limit}=mergedProps;if(ellipsizeMode===TRUNCATE_TYPE.none)return words;let truncateHead,truncateTail;switch(ellipsizeMode){case TRUNCATE_TYPE.head:truncateHead=0,truncateTail=limit;break;case TRUNCATE_TYPE.middle:truncateHead=Math.floor(limit/2),truncateTail=Math.floor(limit/2);break;default:truncateHead=limit,truncateTail=0}const truncatedContent=ellipsizeMode!==TRUNCATE_TYPE.auto?function truncateMiddle(word,headLength,tailLength,ellipsis){if("string"!=typeof word)return"";const wordLength=word.length,frontLength=~~headLength,backLength=~~tailLength,truncateStr=isValueDefined(ellipsis)?ellipsis:TRUNCATE_ELLIPSIS;return 0===frontLength&&0===backLength||frontLength>=wordLength||backLength>=wordLength||frontLength+backLength>=wordLength?word:0===backLength?word.slice(0,frontLength)+truncateStr:word.slice(0,frontLength)+truncateStr+word.slice(wordLength-backLength)}(words,truncateHead,truncateTail,ellipsis):words;return truncatedContent}function useTruncate(props){const{className,children,ellipsis=TRUNCATE_ELLIPSIS,ellipsizeMode=TRUNCATE_TYPE.auto,limit=0,numberOfLines=0,...otherProps}=useContextSystem(props,"Truncate"),cx=useCx(),truncatedContent=truncateContent("string"==typeof children?children:"",{ellipsis,ellipsizeMode,limit,numberOfLines}),shouldTruncate=ellipsizeMode===TRUNCATE_TYPE.auto;return{...otherProps,className:(0,react.useMemo)((()=>cx(shouldTruncate&&!numberOfLines&&Truncate,shouldTruncate&&!!numberOfLines&&(0,emotion_react_browser_esm.AH)("-webkit-box-orient:vertical;-webkit-line-clamp:",numberOfLines,";display:-webkit-box;overflow:hidden;",""),className)),[className,cx,numberOfLines,shouldTruncate]),children:truncatedContent}}let colorComputationNode;(0,node_modules_colord.X$)([names.A]);const getComputedBackgroundColor=memize_default()((function _getComputedBackgroundColor(backgroundColor){var _window;if("string"!=typeof backgroundColor)return"";if(function isColor(value){return"string"==typeof value&&(0,node_modules_colord.Mj)(value).isValid()}(backgroundColor))return backgroundColor;if(!backgroundColor.includes("var("))return"";if("undefined"==typeof document)return"";const el=function getColorComputationNode(){if("undefined"!=typeof document){if(!colorComputationNode){const el=document.createElement("div");el.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(el),colorComputationNode=el}return colorComputationNode}}();if(!el)return"";el.style.background=backgroundColor;const computedColor=null===(_window=window)||void 0===_window?void 0:_window.getComputedStyle(el).background;return el.style.background="",computedColor||""}));function getOptimalTextShade(backgroundColor){const result=function getOptimalTextColor(backgroundColor){const background=getComputedBackgroundColor(backgroundColor);return(0,node_modules_colord.Mj)(background).isLight()?"#000000":"#ffffff"}(backgroundColor);return"#000000"===result?"dark":"light"}const Text=(0,emotion_react_browser_esm.AH)("color:",COLORS.gray[900],";line-height:",config_values.fontLineHeightBase,";margin:0;",""),styles_block={name:"4zleql",styles:"display:block"},positive=(0,emotion_react_browser_esm.AH)("color:",COLORS.alert.green,";",""),destructive=(0,emotion_react_browser_esm.AH)("color:",COLORS.alert.red,";",""),muted=(0,emotion_react_browser_esm.AH)("color:",COLORS.gray[700],";",""),highlighterText=(0,emotion_react_browser_esm.AH)("mark{background:",COLORS.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),upperCase={name:"50zrmy",styles:"text-transform:uppercase"};var dist=__webpack_require__("../../node_modules/.pnpm/highlight-words-core@1.2.2/node_modules/highlight-words-core/dist/index.js");const memoizedLowercaseProps=memize_default()((object=>{const mapped={};for(const key in object)mapped[key.toLowerCase()]=object[key];return mapped}));const BASE_FONT_SIZE=13,PRESET_FONT_SIZES={body:BASE_FONT_SIZE,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},HEADING_FONT_SIZES=[1,2,3,4,5,6].flatMap((n=>[n,n.toString()]));function getFontSize(){let size=arguments.length>0&&void 0!==arguments[0]?arguments[0]:BASE_FONT_SIZE;if(size in PRESET_FONT_SIZES)return getFontSize(PRESET_FONT_SIZES[size]);if("number"!=typeof size){const parsed=parseFloat(size);if(Number.isNaN(parsed))return size;size=parsed}return`calc(${`(${size} / ${BASE_FONT_SIZE})`} * ${config_values.fontSize})`}function getHeadingFontSize(){let size=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(!HEADING_FONT_SIZES.includes(size))return getFontSize(size);return config_values[`fontSizeH${size}`]}var hook_ref={name:"50zrmy",styles:"text-transform:uppercase"};function useText(props){const{adjustLineHeightForInnerControls,align,children,className,color,ellipsizeMode,isDestructive=!1,display,highlightEscape=!1,highlightCaseSensitive=!1,highlightWords,highlightSanitize,isBlock=!1,letterSpacing,lineHeight:lineHeightProp,optimizeReadabilityFor,size,truncate=!1,upperCase=!1,variant,weight=config_values.fontWeight,...otherProps}=useContextSystem(props,"Text");let content=children;const isHighlighter=Array.isArray(highlightWords),isCaption="caption"===size;if(isHighlighter){if("string"!=typeof children)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");content=function createHighlighterText(_ref){let{activeClassName="",activeIndex=-1,activeStyle,autoEscape,caseSensitive=!1,children,findChunks,highlightClassName="",highlightStyle={},highlightTag="mark",sanitize,searchWords=[],unhighlightClassName="",unhighlightStyle}=_ref;if(!children)return null;if("string"!=typeof children)return children;const textToHighlight=children,chunks=(0,dist.findAll)({autoEscape,caseSensitive,findChunks,sanitize,searchWords,textToHighlight}),HighlightTag=highlightTag;let highlightStyles,highlightIndex=-1,highlightClassNames="";const textContent=chunks.map(((chunk,index)=>{const text=textToHighlight.substr(chunk.start,chunk.end-chunk.start);if(chunk.highlight){let highlightClass;highlightIndex++,"object"==typeof highlightClassName?caseSensitive?highlightClass=highlightClassName[text]:(highlightClassName=memoizedLowercaseProps(highlightClassName),highlightClass=highlightClassName[text.toLowerCase()]):highlightClass=highlightClassName;const isActive=highlightIndex===+activeIndex;highlightClassNames=`${highlightClass} ${isActive?activeClassName:""}`,highlightStyles=!0===isActive&&null!==activeStyle?Object.assign({},highlightStyle,activeStyle):highlightStyle;const props={children:text,className:highlightClassNames,key:index,style:highlightStyles};return"string"!=typeof HighlightTag&&(props.highlightIndex=highlightIndex),(0,react.createElement)(HighlightTag,props)}return(0,react.createElement)("span",{children:text,className:unhighlightClassName,key:index,style:unhighlightStyle})}));return textContent}({autoEscape:highlightEscape,children,caseSensitive:highlightCaseSensitive,searchWords:highlightWords,sanitize:highlightSanitize})}const cx=useCx(),classes=(0,react.useMemo)((()=>{const sx={},lineHeight=function getLineHeight(adjustLineHeightForInnerControls,lineHeight){if(lineHeight)return lineHeight;if(!adjustLineHeightForInnerControls)return;let value=`calc(${config_values.controlHeight} + ${space(2)})`;switch(adjustLineHeightForInnerControls){case"large":value=`calc(${config_values.controlHeightLarge} + ${space(2)})`;break;case"small":value=`calc(${config_values.controlHeightSmall} + ${space(2)})`;break;case"xSmall":value=`calc(${config_values.controlHeightXSmall} + ${space(2)})`}return value}(adjustLineHeightForInnerControls,lineHeightProp);if(sx.Base=(0,emotion_react_browser_esm.AH)({color,display,fontSize:getFontSize(size),fontWeight:weight,lineHeight,letterSpacing,textAlign:align},"",""),sx.upperCase=hook_ref,sx.optimalTextColor=null,optimizeReadabilityFor){const isOptimalTextColorDark="dark"===getOptimalTextShade(optimizeReadabilityFor);sx.optimalTextColor=isOptimalTextColorDark?(0,emotion_react_browser_esm.AH)({color:COLORS.gray[900]},"",""):(0,emotion_react_browser_esm.AH)({color:COLORS.white},"","")}return cx(Text,sx.Base,sx.optimalTextColor,isDestructive&&destructive,!!isHighlighter&&highlighterText,isBlock&&styles_block,isCaption&&muted,variant&&text_styles_namespaceObject[variant],upperCase&&sx.upperCase,className)}),[adjustLineHeightForInnerControls,align,className,color,cx,display,isBlock,isCaption,isDestructive,isHighlighter,letterSpacing,lineHeightProp,optimizeReadabilityFor,size,upperCase,variant,weight]);let finalEllipsizeMode;!0===truncate&&(finalEllipsizeMode="auto"),!1===truncate&&(finalEllipsizeMode="none");const truncateProps=useTruncate({...otherProps,className:classes,children,ellipsizeMode:ellipsizeMode||finalEllipsizeMode});return!truncate&&Array.isArray(children)&&(content=react.Children.map(children,(child=>{if("object"!=typeof child||null===child||!("props"in child))return child;return hasConnectNamespace(child,["Link"])?(0,react.cloneElement)(child,{size:child.props.size||"inherit"}):child}))),{...truncateProps,children:truncate?truncateProps.children:content}}const text_component=contextConnect((function component_Text(props,forwardedRef){const textProps=useText(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({as:"span"},textProps,{ref:forwardedRef}))}),"Text");var _ref6={name:"1739oy8",styles:"z-index:1"};const rootFocusedStyles=_ref7=>{let{isFocused}=_ref7;return isFocused?_ref6:""};var _ref3={name:"2o6p8u",styles:"justify-content:space-between"},_ref4={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},_ref5={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const rootLabelPositionStyles=_ref8=>{let{labelPosition}=_ref8;switch(labelPosition){case"top":return _ref5;case"bottom":return _ref4;case"edge":return _ref3;default:return""}},Root=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"em5sgkm7"})("position:relative;border-radius:2px;padding-top:0;",rootFocusedStyles," ",rootLabelPositionStyles,";");var _ref2={name:"wyxldh",styles:"margin:0 !important"};var input_control_styles_ref={name:"1d3w5wq",styles:"width:100%"};const Container=(0,emotion_styled_base_browser_esm.A)("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(_ref9=>{let{disabled}=_ref9;const backgroundColor=disabled?COLORS.ui.backgroundDisabled:COLORS.ui.background;return(0,emotion_react_browser_esm.AH)({backgroundColor},"","")})," ",(_ref10=>{let{hideLabel}=_ref10;return hideLabel?_ref2:null})," ",(_ref11=>{let{__unstableInputWidth,labelPosition}=_ref11;return __unstableInputWidth?"side"===labelPosition?"":"edge"===labelPosition?(0,emotion_react_browser_esm.AH)({flex:`0 0 ${__unstableInputWidth}`},"",""):(0,emotion_react_browser_esm.AH)({width:__unstableInputWidth},"",""):input_control_styles_ref}),";"),getSizeConfig=_ref14=>{let{inputSize:size,__next36pxDefaultSize}=_ref14;const sizes={default:{height:36,lineHeight:1,minHeight:36,paddingLeft:space(4),paddingRight:space(4)},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:space(2),paddingRight:space(2)},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:space(4),paddingRight:space(4)}};return __next36pxDefaultSize||(sizes.default={height:30,lineHeight:1,minHeight:30,paddingLeft:space(2),paddingRight:space(2)}),sizes[size]||sizes.default},Input=(0,emotion_styled_base_browser_esm.A)("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",COLORS.gray[900],";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(_ref16=>{let defaultArrowStyles,activeDragCursorStyles,{isDragging,dragCursor}=_ref16;return isDragging&&(defaultArrowStyles=(0,emotion_react_browser_esm.AH)("cursor:",dragCursor,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),isDragging&&dragCursor&&(activeDragCursorStyles=(0,emotion_react_browser_esm.AH)("&:active{cursor:",dragCursor,";}","")),(0,emotion_react_browser_esm.AH)(defaultArrowStyles," ",activeDragCursorStyles,";","")})," ",(_ref12=>{let{disabled}=_ref12;return disabled?(0,emotion_react_browser_esm.AH)({color:COLORS.ui.textDisabled},"",""):""})," ",(_ref13=>{let{inputSize:size}=_ref13;const sizes={default:"13px",small:"11px","__unstable-large":"13px"},fontSize=sizes[size]||sizes.default;return fontSize?(0,emotion_react_browser_esm.AH)("font-size:","16px",";@media ( min-width: 600px ){font-size:",fontSize,";}",""):""})," ",(props=>(0,emotion_react_browser_esm.AH)(getSizeConfig(props),"",""))," ",(_ref15=>{let{paddingInlineStart,paddingInlineEnd}=_ref15;return(0,emotion_react_browser_esm.AH)({paddingInlineStart,paddingInlineEnd},"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),labelMargin=_ref17=>{let{labelPosition}=_ref17,marginBottom=8;return"edge"!==labelPosition&&"side"!==labelPosition||(marginBottom=0),(0,emotion_react_browser_esm.AH)({marginTop:0,marginRight:0,marginBottom,marginLeft:0},"","")},BaseLabel=(0,emotion_styled_base_browser_esm.A)(text_component,{target:"em5sgkm4"})("&&&{",baseLabelTypography,";box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;",labelMargin," overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),Label=props=>(0,react.createElement)(BaseLabel,(0,helpers_esm_extends.A)({},props,{as:"label"})),LabelWrapper=(0,emotion_styled_base_browser_esm.A)(flex_item_component,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),BackdropUI=(0,emotion_styled_base_browser_esm.A)("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(_ref18=>{let boxShadow,{disabled,isFocused}=_ref18,borderColor=isFocused?COLORS.ui.borderFocus:COLORS.ui.border;return isFocused&&(boxShadow=`0 0 0 1px ${COLORS.ui.borderFocus} inset`),disabled&&(borderColor=COLORS.ui.borderDisabled),(0,emotion_react_browser_esm.AH)({boxShadow,borderColor,borderStyle:"solid",borderWidth:1},"","")})," ",rtl({paddingLeft:2}),";}"),Prefix=(0,emotion_styled_base_browser_esm.A)("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Suffix=(0,emotion_styled_base_browser_esm.A)("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const MemoizedBackdrop=(0,react.memo)((function Backdrop(_ref){let{disabled=!1,isFocused=!1}=_ref;return(0,react.createElement)(BackdropUI,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled,isFocused})})),backdrop=MemoizedBackdrop;function label_Label(_ref){let{children,hideLabelFromVision,htmlFor,...props}=_ref;return children?hideLabelFromVision?(0,react.createElement)(visually_hidden_component,{as:"label",htmlFor},children):(0,react.createElement)(Label,(0,helpers_esm_extends.A)({htmlFor},props),children):null}function InputBase(_ref,ref){let{__next36pxDefaultSize,__unstableInputWidth,children,className,disabled=!1,hideLabelFromVision=!1,labelPosition,id:idProp,isFocused=!1,label,prefix,size="default",suffix,...props}=_ref;const id=function useUniqueId(idProp){const instanceId=(0,use_instance_id.A)(InputBase);return idProp||`input-base-control-${instanceId}`}(idProp),hideLabel=hideLabelFromVision||!label,{paddingLeft,paddingRight}=getSizeConfig({inputSize:size,__next36pxDefaultSize}),prefixSuffixContextValue=(0,react.useMemo)((()=>({InputControlPrefixWrapper:{paddingLeft},InputControlSuffixWrapper:{paddingRight}})),[paddingLeft,paddingRight]);return(0,react.createElement)(Root,(0,helpers_esm_extends.A)({},props,function getUIFlexProps(labelPosition){const props={};switch(labelPosition){case"top":props.direction="column",props.gap=0;break;case"bottom":props.direction="column-reverse",props.gap=0;break;case"edge":props.justify="space-between"}return props}(labelPosition),{className,isFocused,labelPosition,ref}),(0,react.createElement)(LabelWrapper,null,(0,react.createElement)(label_Label,{className:"components-input-control__label",hideLabelFromVision,labelPosition,htmlFor:id},label)),(0,react.createElement)(Container,{__unstableInputWidth,className:"components-input-control__container",disabled,hideLabel,labelPosition},(0,react.createElement)(ContextSystemProvider,{value:prefixSuffixContextValue},prefix&&(0,react.createElement)(Prefix,{className:"components-input-control__prefix"},prefix),children,suffix&&(0,react.createElement)(Suffix,{className:"components-input-control__suffix"},suffix)),(0,react.createElement)(backdrop,{disabled,isFocused})))}const input_base=(0,react.forwardRef)(InputBase);const initialStateReducer=state=>state,initialInputControlState={error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""};function useInputControlStateReducer(){let stateReducer=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialStateReducer,initialState=arguments.length>1&&void 0!==arguments[1]?arguments[1]:initialInputControlState,onChangeHandler=arguments.length>2?arguments[2]:void 0;const[state,dispatch]=(0,react.useReducer)(function inputControlStateReducer(composedStateReducers){return(state,action)=>{const nextState={...state};switch(action.type){case CONTROL:return nextState.value=action.payload.value,nextState.isDirty=!1,nextState._event=void 0,nextState;case PRESS_UP:case PRESS_DOWN:nextState.isDirty=!1;break;case DRAG_START:nextState.isDragging=!0;break;case DRAG_END:nextState.isDragging=!1;break;case CHANGE:nextState.error=null,nextState.value=action.payload.value,state.isPressEnterToChange&&(nextState.isDirty=!0);break;case COMMIT:nextState.value=action.payload.value,nextState.isDirty=!1;break;case RESET:nextState.error=null,nextState.isDirty=!1,nextState.value=action.payload.value||state.initialValue;break;case INVALIDATE:nextState.error=action.payload.error}return nextState._event=action.payload.event,composedStateReducers(nextState,action)}}(stateReducer),function mergeInitialState(){let initialState=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialInputControlState;const{value}=initialState;return{...initialInputControlState,...initialState,initialValue:value}}(initialState)),createChangeEvent=type=>(nextValue,event)=>{dispatch({type,payload:{value:nextValue,event}})},createKeyEvent=type=>event=>{dispatch({type,payload:{event}})},createDragEvent=type=>payload=>{dispatch({type,payload})},change=createChangeEvent(CHANGE),reset=createChangeEvent(RESET),commit=createChangeEvent(COMMIT),dragStart=createDragEvent(DRAG_START),drag=createDragEvent(DRAG),dragEnd=createDragEvent(DRAG_END),pressUp=createKeyEvent(PRESS_UP),pressDown=createKeyEvent(PRESS_DOWN),pressEnter=createKeyEvent(PRESS_ENTER),currentState=(0,react.useRef)(state),refProps=(0,react.useRef)({value:initialState.value,onChangeHandler});return(0,react.useLayoutEffect)((()=>{currentState.current=state,refProps.current={value:initialState.value,onChangeHandler}})),(0,react.useLayoutEffect)((()=>{var _state$value;void 0===currentState.current._event||state.value===refProps.current.value||state.isDirty||refProps.current.onChangeHandler(null!==(_state$value=state.value)&&void 0!==_state$value?_state$value:"",{event:currentState.current._event})}),[state.value,state.isDirty]),(0,react.useLayoutEffect)((()=>{var _initialState$value;initialState.value===currentState.current.value||currentState.current.isDirty||dispatch({type:CONTROL,payload:{value:null!==(_initialState$value=initialState.value)&&void 0!==_initialState$value?_initialState$value:""}})}),[initialState.value]),{change,commit,dispatch,drag,dragEnd,dragStart,invalidate:(error,event)=>dispatch({type:INVALIDATE,payload:{error,event}}),pressDown,pressEnter,pressUp,reset,state}}const input_field_noop=()=>{};const ForwardedComponent=(0,react.forwardRef)((function InputField(_ref,ref){let{disabled=!1,dragDirection="n",dragThreshold=10,id,isDragEnabled=!1,isFocused,isPressEnterToChange=!1,onBlur=input_field_noop,onChange=input_field_noop,onDrag=input_field_noop,onDragEnd=input_field_noop,onDragStart=input_field_noop,onFocus=input_field_noop,onKeyDown=input_field_noop,onValidate=input_field_noop,size="default",setIsFocused,stateReducer=state=>state,value:valueProp,type,...props}=_ref;const{state,change,commit,drag,dragEnd,dragStart,invalidate,pressDown,pressEnter,pressUp,reset}=useInputControlStateReducer(stateReducer,{isDragEnabled,value:valueProp,isPressEnterToChange},onChange),{value,isDragging,isDirty}=state,wasDirtyOnBlur=(0,react.useRef)(!1),dragCursor=function useDragCursor(isDragging,dragDirection){const dragCursor=function getDragCursor(dragDirection){let dragCursor="ns-resize";switch(dragDirection){case"n":case"s":dragCursor="ns-resize";break;case"e":case"w":dragCursor="ew-resize"}return dragCursor}(dragDirection);return(0,react.useEffect)((()=>{document.documentElement.style.cursor=isDragging?dragCursor:null}),[isDragging,dragCursor]),dragCursor}(isDragging,dragDirection),handleOnCommit=event=>{const nextValue=event.currentTarget.value;try{onValidate(nextValue),commit(nextValue,event)}catch(err){invalidate(err,event)}},dragGestureProps=(0,use_gesture_react_esm.useDrag)((dragProps=>{const{distance,dragging,event,target}=dragProps;if(dragProps.event={...dragProps.event,target},distance){if(event.stopPropagation(),!dragging)return onDragEnd(dragProps),void dragEnd(dragProps);onDrag(dragProps),drag(dragProps),isDragging||(onDragStart(dragProps),dragStart(dragProps))}}),{axis:"e"===dragDirection||"w"===dragDirection?"x":"y",threshold:dragThreshold,enabled:isDragEnabled,pointer:{capture:!1}}),dragProps=isDragEnabled?dragGestureProps():{};let handleOnMouseDown;return"number"===type&&(handleOnMouseDown=event=>{var _props$onMouseDown;null===(_props$onMouseDown=props.onMouseDown)||void 0===_props$onMouseDown||_props$onMouseDown.call(props,event),event.currentTarget!==event.currentTarget.ownerDocument.activeElement&&event.currentTarget.focus()}),(0,react.createElement)(Input,(0,helpers_esm_extends.A)({},props,dragProps,{className:"components-input-control__input",disabled,dragCursor,isDragging,id,onBlur:event=>{onBlur(event),null==setIsFocused||setIsFocused(!1),!isDirty&&event.target.validity.valid||(wasDirtyOnBlur.current=!0,handleOnCommit(event))},onChange:event=>{const nextValue=event.target.value;change(nextValue,event)},onFocus:event=>{onFocus(event),null==setIsFocused||setIsFocused(!0)},onKeyDown:event=>{const{key}=event;switch(onKeyDown(event),key){case"ArrowUp":pressUp(event);break;case"ArrowDown":pressDown(event);break;case"Enter":pressEnter(event),isPressEnterToChange&&(event.preventDefault(),handleOnCommit(event));break;case"Escape":isPressEnterToChange&&isDirty&&(event.preventDefault(),reset(valueProp,event))}},onMouseDown:handleOnMouseDown,ref,inputSize:size,value,type}))})),input_field=ForwardedComponent,input_control_noop=()=>{};const InputControl=(0,react.forwardRef)((function UnforwardedInputControl(_ref,ref){let{__next36pxDefaultSize,__unstableStateReducer:stateReducer=(state=>state),__unstableInputWidth,className,disabled=!1,hideLabelFromVision=!1,id:idProp,isPressEnterToChange=!1,label,labelPosition="top",onChange=input_control_noop,onValidate=input_control_noop,onKeyDown=input_control_noop,prefix,size="default",suffix,value,...props}=_ref;const[isFocused,setIsFocused]=(0,react.useState)(!1),id=function input_control_useUniqueId(idProp){const instanceId=(0,use_instance_id.A)(InputControl);return idProp||`inspector-input-control-${instanceId}`}(idProp),classes=classnames_default()("components-input-control",className),draftHookProps=function useDraft(props){const refPreviousValue=(0,react.useRef)(props.value),[draft,setDraft]=(0,react.useState)({}),value=void 0!==draft.value?draft.value:props.value;return(0,react.useLayoutEffect)((()=>{const{current:previousValue}=refPreviousValue;refPreviousValue.current=props.value,void 0===draft.value||draft.isStale?draft.isStale&&props.value!==previousValue&&setDraft({}):setDraft({...draft,isStale:!0})}),[props.value,draft]),{value,onBlur:event=>{var _props$onBlur;setDraft({}),null===(_props$onBlur=props.onBlur)||void 0===_props$onBlur||_props$onBlur.call(props,event)},onChange:(nextValue,extra)=>{setDraft((current=>Object.assign(current,{value:nextValue,isStale:!1}))),props.onChange(nextValue,extra)}}}({value,onBlur:props.onBlur,onChange});return(0,react.createElement)(input_base,{__next36pxDefaultSize,__unstableInputWidth,className:classes,disabled,gap:3,hideLabelFromVision,id,isFocused,justify:"left",label,labelPosition,prefix,size,suffix},(0,react.createElement)(input_field,(0,helpers_esm_extends.A)({},props,{__next36pxDefaultSize,className:"components-input-control__input",disabled,id,isFocused,isPressEnterToChange,onKeyDown,onValidate,paddingInlineStart:prefix?space(2):void 0,paddingInlineEnd:suffix?space(2):void 0,ref,setIsFocused,size,stateReducer},draftHookProps)))})),input_control=InputControl;var number_control_styles_ref={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 htmlArrowStyles=_ref2=>{let{hideHTMLArrows}=_ref2;return hideHTMLArrows?number_control_styles_ref:""},number_control_styles_Input=(0,emotion_styled_base_browser_esm.A)(input_control,{target:"ep48uk90"})(htmlArrowStyles,";");function getNumber(value){const number=Number(value);return isNaN(number)?0:number}function add(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return args.reduce(((sum,arg)=>sum+getNumber(arg)),0)}function clamp(value,min,max){const baseValue=getNumber(value);return Math.max(min,Math.min(baseValue,max))}function roundClamp(){let min=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,max=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,step=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const baseValue=getNumber(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),stepValue=getNumber(step),precision=function getPrecision(value){const split=(value+"").split(".");return void 0!==split[1]?split[1].length:0}(step),clampedValue=clamp(Math.round(baseValue/stepValue)*stepValue,min,max);return precision?getNumber(clampedValue.toFixed(precision)):clampedValue}const number_control=(0,react.forwardRef)((function NumberControl(_ref,ref){let{__unstableStateReducer:stateReducerProp,className,dragDirection="n",hideHTMLArrows=!1,isDragEnabled=!0,isShiftStepEnabled=!0,label,max=1/0,min=-1/0,required=!1,shiftStep=10,step=1,type:typeProp="number",value:valueProp,...props}=_ref;const isStepAny="any"===step,baseStep=isStepAny?1:parseFloat(step),baseValue=roundClamp(0,min,max,baseStep),constrainValue=(value,stepOverride)=>isStepAny?Math.min(max,Math.max(min,value)):roundClamp(value,min,max,null!=stepOverride?stepOverride:baseStep),autoComplete="number"===typeProp?"off":null,classes=classnames_default()("components-number-control",className),numberControlStateReducer=(state,action)=>{const nextState={...state},{type,payload}=action,event=null==payload?void 0:payload.event,currentValue=nextState.value;if(type===PRESS_UP||type===PRESS_DOWN){const enableShift=event.shiftKey&&isShiftStepEnabled,incrementalValue=enableShift?parseFloat(shiftStep)*baseStep:baseStep;let nextValue=function isValueEmpty(value){const isEmptyString=""===value;return!isValueDefined(value)||isEmptyString}(currentValue)?baseValue:currentValue;null!=event&&event.preventDefault&&event.preventDefault(),type===PRESS_UP&&(nextValue=add(nextValue,incrementalValue)),type===PRESS_DOWN&&(nextValue=function subtract(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return args.reduce(((diff,arg,index)=>{const value=getNumber(arg);return 0===index?value:diff-value}),0)}(nextValue,incrementalValue)),nextState.value=constrainValue(nextValue,enableShift?incrementalValue:null)}if(type===DRAG&&isDragEnabled){const[x,y]=payload.delta,enableShift=payload.shiftKey&&isShiftStepEnabled,modifier=enableShift?parseFloat(shiftStep)*baseStep:baseStep;let directionModifier,delta;switch(dragDirection){case"n":delta=y,directionModifier=-1;break;case"e":delta=x,directionModifier=(0,_wordpress_i18n_build_module.V8)()?-1:1;break;case"s":delta=y,directionModifier=1;break;case"w":delta=x,directionModifier=(0,_wordpress_i18n_build_module.V8)()?1:-1}if(0!==delta){delta=Math.ceil(Math.abs(delta))*Math.sign(delta);const distance=delta*modifier*directionModifier;nextState.value=constrainValue(add(currentValue,distance),enableShift?modifier:null)}}if(type===PRESS_ENTER||type===COMMIT){const applyEmptyValue=!1===required&&""===currentValue;nextState.value=applyEmptyValue?currentValue:constrainValue(currentValue)}return nextState};return(0,react.createElement)(number_control_styles_Input,(0,helpers_esm_extends.A)({autoComplete,inputMode:"numeric"},props,{className:classes,dragDirection,hideHTMLArrows,isDragEnabled,label,max,min,ref,required,step,type:typeProp,value:valueProp,__unstableStateReducer:(state,action)=>{var _stateReducerProp;const baseState=numberControlStateReducer(state,action);return null!==(_stateReducerProp=null==stateReducerProp?void 0:stateReducerProp(baseState,action))&&void 0!==_stateReducerProp?_stateReducerProp:baseState}}))}));const unit_control_styles_Root=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1bagdl33"})("box-sizing:border-box;position:relative;&&& ",BackdropUI,"{transition:box-shadow 0.1s linear;}");var unit_control_styles_ref={name:"1y65o8",styles:"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"};const arrowStyles=_ref2=>{let{disableUnits}=_ref2;return disableUnits?"":unit_control_styles_ref},ValueInput=(0,emotion_styled_base_browser_esm.A)(number_control,{target:"e1bagdl32"})("&&&{input{appearance:none;-moz-appearance:textfield;display:block;width:100%;",arrowStyles,";}}"),baseUnitLabelStyles=_ref3=>{let{selectSize}=_ref3;const sizes={default:(0,emotion_react_browser_esm.AH)("box-sizing:border-box;padding:2px 1px;width:20px;color:",COLORS.darkGray[500],";font-size:8px;line-height:1;letter-spacing:-0.5px;text-transform:uppercase;text-align-last:center;",""),large:(0,emotion_react_browser_esm.AH)("box-sizing:border-box;min-width:24px;max-width:48px;height:24px;margin-inline-end:",space(2),";padding:",space(1),";color:",COLORS.ui.theme,";font-size:13px;line-height:1;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;","")};return"__unstable-large"===selectSize?sizes.large:sizes.default},UnitLabel=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",baseUnitLabelStyles,";color:",COLORS.gray[900],";}"),UnitSelect=(0,emotion_styled_base_browser_esm.A)("select",{target:"e1bagdl30"})("&&{appearance:none;background:transparent;border-radius:2px;border:none;display:block;outline:none;margin:0;min-height:auto;font-family:inherit;",baseUnitLabelStyles,";",(_ref4=>{let{selectSize="default"}=_ref4;const sizes={default:(0,emotion_react_browser_esm.AH)("height:100%;border:1px solid transparent;transition:box-shadow 0.1s linear,border 0.1s linear;",rtl({borderTopLeftRadius:0,borderBottomLeftRadius:0})()," &:not(:disabled):hover{background-color:",COLORS.lightGray[300],";}&:focus{border:1px solid ",COLORS.ui.borderFocus,";box-shadow:inset 0 0 0 ",config_values.borderWidth+" "+COLORS.ui.borderFocus,";outline-offset:0;outline:2px solid transparent;z-index:1;}",""),large:(0,emotion_react_browser_esm.AH)("display:flex;justify-content:center;align-items:center;&:hover{color:",COLORS.ui.borderFocus,";box-shadow:inset 0 0 0 ",config_values.borderWidth+" "+COLORS.ui.borderFocus,";outline:",config_values.borderWidth," solid transparent;}&:focus{box-shadow:0 0 0 ",config_values.borderWidthFocus+" "+COLORS.ui.borderFocus,";outline:",config_values.borderWidthFocus," solid transparent;}","")};return"__unstable-large"===selectSize?sizes.large:sizes.default}),";&:not( :disabled ){cursor:pointer;}}");function UnitSelectControl(_ref){let{className,isUnitSelectTabbable:isTabbable=!0,onChange,size="default",unit="px",units=CSS_UNITS,...props}=_ref;if(!hasUnits(units)||1===(null==units?void 0:units.length))return(0,react.createElement)(UnitLabel,{className:"components-unit-control__unit-label",selectSize:size},unit);const classes=classnames_default()("components-unit-control__select",className);return(0,react.createElement)(UnitSelect,(0,helpers_esm_extends.A)({className:classes,onChange:event=>{const{value:unitValue}=event.target,data=units.find((option=>option.value===unitValue));null==onChange||onChange(unitValue,{event,data})},selectSize:size,tabIndex:isTabbable?void 0:-1,value:unit},props),units.map((option=>(0,react.createElement)("option",{value:option.value,key:option.value},option.label))))}const defaultOptions={initial:void 0,fallback:""};const use_controlled_state=function useControlledState(currentState){let options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:defaultOptions;const{initial,fallback}={...defaultOptions,...options},[internalState,setInternalState]=(0,react.useState)(currentState),hasCurrentState=isValueDefined(currentState);(0,react.useEffect)((()=>{hasCurrentState&&internalState&&setInternalState(void 0)}),[hasCurrentState,internalState]);return[function getDefinedValue(){var _values$find;let fallbackValue=arguments.length>1?arguments[1]:void 0;return null!==(_values$find=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(isValueDefined))&&void 0!==_values$find?_values$find:fallbackValue}([currentState,internalState,initial],fallback),nextState=>{hasCurrentState||setInternalState(nextState)}]};const UnitControl=(0,react.forwardRef)((function UnforwardedUnitControl(unitControlProps,forwardedRef){const{__unstableStateReducer:stateReducerProp,autoComplete="off",children,className,disabled=!1,disableUnits=!1,isPressEnterToChange=!1,isResetValueOnUnitChange=!1,isUnitSelectTabbable=!0,label,onChange:onChangeProp,onUnitChange,size="default",style,unit:unitProp,units:unitsProp=CSS_UNITS,value:valueProp,onBlur:onBlurProp,...props}=unitControlProps;"unit"in unitControlProps&&(0,deprecated_build_module.A)("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const nonNullValueProp=null!=valueProp?valueProp:void 0,units=(0,react.useMemo)((()=>function getUnitsWithCurrentUnit(rawValue,legacyUnit){let units=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ALL_CSS_UNITS;const unitsToReturn=Array.isArray(units)?[...units]:[],[,currentUnit]=getParsedQuantityAndUnit(rawValue,legacyUnit,ALL_CSS_UNITS);return currentUnit&&!unitsToReturn.some((unit=>unit.value===currentUnit))&&allUnits[currentUnit]&&unitsToReturn.unshift(allUnits[currentUnit]),unitsToReturn}(nonNullValueProp,unitProp,unitsProp)),[nonNullValueProp,unitProp,unitsProp]),[parsedQuantity,parsedUnit]=getParsedQuantityAndUnit(nonNullValueProp,unitProp,units),[unit,setUnit]=use_controlled_state(1===units.length?units[0].value:unitProp,{initial:parsedUnit,fallback:""});(0,react.useEffect)((()=>{void 0!==parsedUnit&&setUnit(parsedUnit)}),[parsedUnit]);const refParsedQuantity=(0,react.useRef)(void 0),classes=classnames_default()("components-unit-control",className),mayUpdateUnit=event=>{if(!isNaN(Number(event.currentTarget.value)))return void(refParsedQuantity.current=void 0);const[validParsedQuantity,validParsedUnit]=getValidParsedQuantityAndUnit(event.currentTarget.value,units,parsedQuantity,unit);if(refParsedQuantity.current=validParsedQuantity,isPressEnterToChange&&validParsedUnit!==unit){const data=Array.isArray(units)?units.find((option=>option.value===validParsedUnit)):void 0;null==onUnitChange||onUnitChange(validParsedUnit,{event,data}),setUnit(validParsedUnit)}},unitControlStateReducer=(state,action)=>{const nextState={...state};var _refParsedQuantity$cu;action.type===COMMIT&&(void 0!==refParsedQuantity.current&&(nextState.value=(null!==(_refParsedQuantity$cu=refParsedQuantity.current)&&void 0!==_refParsedQuantity$cu?_refParsedQuantity$cu:"").toString(),refParsedQuantity.current=void 0));return nextState};let stateReducer=unitControlStateReducer;stateReducerProp&&(stateReducer=(state,action)=>{const baseState=unitControlStateReducer(state,action);return stateReducerProp(baseState,action)});const inputSuffix=disableUnits?null:(0,react.createElement)(UnitSelectControl,{"aria-label":(0,_wordpress_i18n_build_module.__)("Select unit"),disabled,isUnitSelectTabbable,onChange:(nextUnitValue,changeProps)=>{const{data}=changeProps;let nextValue=`${null!=parsedQuantity?parsedQuantity:""}${nextUnitValue}`;isResetValueOnUnitChange&&void 0!==(null==data?void 0:data.default)&&(nextValue=`${data.default}${nextUnitValue}`),null==onChangeProp||onChangeProp(nextValue,changeProps),null==onUnitChange||onUnitChange(nextUnitValue,changeProps),setUnit(nextUnitValue)},size,unit,units,onBlur:onBlurProp});let step=props.step;if(!step&&units){var _activeUnit$step;const activeUnit=units.find((option=>option.value===unit));step=null!==(_activeUnit$step=null==activeUnit?void 0:activeUnit.step)&&void 0!==_activeUnit$step?_activeUnit$step:1}return(0,react.createElement)(unit_control_styles_Root,{className:"components-unit-control-wrapper",style},(0,react.createElement)(ValueInput,(0,helpers_esm_extends.A)({"aria-label":label,type:isPressEnterToChange?"text":"number"},props,{autoComplete,className:classes,disabled,disableUnits,isPressEnterToChange,label,onBlur:event=>{mayUpdateUnit(event),null==onBlurProp||onBlurProp(event)},onKeyDown:event=>{const{key}=event;"Enter"===key&&mayUpdateUnit(event)},onChange:(nextQuantityValue,changeProps)=>{if(""===nextQuantityValue||null==nextQuantityValue)return void(null==onChangeProp||onChangeProp("",changeProps));const onChangeValue=getValidParsedQuantityAndUnit(nextQuantityValue,units,parsedQuantity,unit).join("");null==onChangeProp||onChangeProp(onChangeValue,changeProps)},ref:forwardedRef,size,suffix:inputSuffix,value:null!=parsedQuantity?parsedQuantity:"",step,__unstableStateReducer:stateReducer})))})),unit_control=UnitControl;const box_control_styles_Root=(0,emotion_styled_base_browser_esm.A)("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),Header=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"e7pk0lh5"})({name:"5bhc30",styles:"margin-bottom:8px"}),HeaderControlWrapper=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),UnitControlWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),LayoutContainer=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),Layout=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var box_control_styles_ref={name:"1ch9yvl",styles:"border-radius:0"},box_control_styles_ref2={name:"tg3mx0",styles:"border-radius:2px"};const unitControlBorderRadiusStyles=_ref3=>{let{isFirst,isLast,isOnly}=_ref3;return isFirst?rtl({borderTopRightRadius:0,borderBottomRightRadius:0})():isLast?rtl({borderTopLeftRadius:0,borderBottomLeftRadius:0})():isOnly?box_control_styles_ref2:box_control_styles_ref},unitControlMarginStyles=_ref4=>{let{isFirst,isOnly}=_ref4;return rtl({marginLeft:isFirst||isOnly?0:-1})()},box_control_styles_UnitControl=(0,emotion_styled_base_browser_esm.A)(unit_control,{target:"e7pk0lh0"})("max-width:60px;",unitControlBorderRadiusStyles,";",unitControlMarginStyles,";"),unit_control_noop=()=>{};function BoxUnitControl(_ref){let{isFirst,isLast,isOnly,onHoverOn=unit_control_noop,onHoverOff=unit_control_noop,label,value,...props}=_ref;const bindHoverGesture=(0,use_gesture_react_esm.useHover)((_ref2=>{let{event,...state}=_ref2;state.hovering?onHoverOn(event,state):onHoverOff(event,state)}));return(0,react.createElement)(UnitControlWrapper,bindHoverGesture(),(0,react.createElement)(unit_control_Tooltip,{text:label},(0,react.createElement)(box_control_styles_UnitControl,(0,helpers_esm_extends.A)({"aria-label":label,className:"component-box-control__unit-control",hideHTMLArrows:!0,isFirst,isLast,isOnly,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value},props))))}function unit_control_Tooltip(_ref3){let{children,text}=_ref3;return text?(0,react.createElement)(tooltip,{text,position:"top"},(0,react.createElement)("div",null,children)):children}const LABELS={all:(0,_wordpress_i18n_build_module.__)("All"),top:(0,_wordpress_i18n_build_module.__)("Top"),bottom:(0,_wordpress_i18n_build_module.__)("Bottom"),left:(0,_wordpress_i18n_build_module.__)("Left"),right:(0,_wordpress_i18n_build_module.__)("Right"),mixed:(0,_wordpress_i18n_build_module.__)("Mixed"),vertical:(0,_wordpress_i18n_build_module.__)("Vertical"),horizontal:(0,_wordpress_i18n_build_module.__)("Horizontal")},DEFAULT_VALUES={top:void 0,right:void 0,bottom:void 0,left:void 0},ALL_SIDES=["top","right","bottom","left"];function mode(arr){return arr.sort(((a,b)=>arr.filter((v=>v===a)).length-arr.filter((v=>v===b)).length)).pop()}function getAllValue(){let values=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},selectedUnits=arguments.length>1?arguments[1]:void 0;const parsedQuantitiesAndUnits=function normalizeSides(sides){const filteredSides=[];if(null==sides||!sides.length)return ALL_SIDES;if(sides.includes("vertical"))filteredSides.push("top","bottom");else if(sides.includes("horizontal"))filteredSides.push("left","right");else{const newSides=ALL_SIDES.filter((side=>sides.includes(side)));filteredSides.push(...newSides)}return filteredSides}(arguments.length>2&&void 0!==arguments[2]?arguments[2]:ALL_SIDES).map((side=>parseQuantityAndUnitFromRawValue(values[side]))),allParsedQuantities=parsedQuantitiesAndUnits.map((value=>{var _value$;return null!==(_value$=value[0])&&void 0!==_value$?_value$:""})),allParsedUnits=parsedQuantitiesAndUnits.map((value=>value[1])),commonQuantity=allParsedQuantities.every((v=>v===allParsedQuantities[0]))?allParsedQuantities[0]:"";let commonUnit;var _getAllUnitFallback;"number"==typeof commonQuantity?commonUnit=mode(allParsedUnits):commonUnit=null!==(_getAllUnitFallback=function getAllUnitFallback(selectedUnits){if(!selectedUnits||"object"!=typeof selectedUnits)return;const filteredUnits=Object.values(selectedUnits).filter(Boolean);return mode(filteredUnits)}(selectedUnits))&&void 0!==_getAllUnitFallback?_getAllUnitFallback:mode(allParsedUnits);return[commonQuantity,commonUnit].join("")}function isValuesMixed(){const allValue=getAllValue(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:ALL_SIDES);return isNaN(parseFloat(allValue))}function isValuesDefined(values){return void 0!==values&&Object.values(values).filter((value=>!!value&&/\d/.test(value))).length>0}function getInitialSide(isLinked,splitOnAxis){let initialSide="all";return isLinked||(initialSide=splitOnAxis?"vertical":"top"),initialSide}function applyValueToSides(currentValues,newValue,sides){const newValues={...currentValues};return null!=sides&&sides.length?sides.forEach((side=>{"vertical"===side?(newValues.top=newValue,newValues.bottom=newValue):"horizontal"===side?(newValues.left=newValue,newValues.right=newValue):newValues[side]=newValue})):ALL_SIDES.forEach((side=>newValues[side]=newValue)),newValues}const all_input_control_noop=()=>{};function AllInputControl(_ref){let{onChange=all_input_control_noop,onFocus=all_input_control_noop,onHoverOn=all_input_control_noop,onHoverOff=all_input_control_noop,values,sides,selectedUnits,setSelectedUnits,...props}=_ref;const allValue=getAllValue(values,selectedUnits,sides),isMixed=isValuesDefined(values)&&isValuesMixed(values,selectedUnits,sides),allPlaceholder=isMixed?LABELS.mixed:null;return(0,react.createElement)(BoxUnitControl,(0,helpers_esm_extends.A)({},props,{disableUnits:isMixed,isOnly:!0,value:allValue,onChange:next=>{const isNumeric=!isNaN(parseFloat(next)),nextValues=applyValueToSides(values,isNumeric?next:void 0,sides);onChange(nextValues)},onUnitChange:unit=>{const newUnits=applyValueToSides(selectedUnits,unit,sides);setSelectedUnits(newUnits)},onFocus:event=>{onFocus(event,{side:"all"})},onHoverOn:()=>{onHoverOn({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{onHoverOff({top:!1,bottom:!1,left:!1,right:!1})},placeholder:allPlaceholder}))}const input_controls_noop=()=>{};function BoxInputControls(_ref){let{onChange=input_controls_noop,onFocus=input_controls_noop,onHoverOn=input_controls_noop,onHoverOff=input_controls_noop,values,selectedUnits,setSelectedUnits,sides,...props}=_ref;const createHandleOnFocus=side=>event=>{onFocus(event,{side})},createHandleOnHoverOn=side=>()=>{onHoverOn({[side]:!0})},createHandleOnHoverOff=side=>()=>{onHoverOff({[side]:!1})},createHandleOnChange=side=>(next,_ref2)=>{let{event}=_ref2;const{altKey}=event,nextValues={...values},nextValue=!isNaN(parseFloat(next))?next:void 0;if(nextValues[side]=nextValue,altKey)switch(side){case"top":nextValues.bottom=nextValue;break;case"bottom":nextValues.top=nextValue;break;case"left":nextValues.right=nextValue;break;case"right":nextValues.left=nextValue}(nextValues=>{onChange(nextValues)})(nextValues)},createHandleOnUnitChange=side=>next=>{const newUnits={...selectedUnits};newUnits[side]=next,setSelectedUnits(newUnits)},filteredSides=null!=sides&&sides.length?ALL_SIDES.filter((side=>sides.includes(side))):ALL_SIDES,first=filteredSides[0],last=filteredSides[filteredSides.length-1],only=first===last&&first;return(0,react.createElement)(LayoutContainer,{className:"component-box-control__input-controls-wrapper"},(0,react.createElement)(Layout,{gap:0,align:"top",className:"component-box-control__input-controls"},filteredSides.map((side=>{const[parsedQuantity,parsedUnit]=parseQuantityAndUnitFromRawValue(values[side]),computedUnit=values[side]?parsedUnit:selectedUnits[side];return(0,react.createElement)(BoxUnitControl,(0,helpers_esm_extends.A)({},props,{isFirst:first===side,isLast:last===side,isOnly:only===side,value:[parsedQuantity,computedUnit].join(""),onChange:createHandleOnChange(side),onUnitChange:createHandleOnUnitChange(side),onFocus:createHandleOnFocus(side),onHoverOn:createHandleOnHoverOn(side),onHoverOff:createHandleOnHoverOff(side),label:LABELS[side],key:`box-control-${side}`}))}))))}const groupedSides=["vertical","horizontal"];function AxialInputControls(_ref){let{onChange,onFocus,onHoverOn,onHoverOff,values,selectedUnits,setSelectedUnits,sides,...props}=_ref;const createHandleOnFocus=side=>event=>{onFocus&&onFocus(event,{side})},createHandleOnHoverOn=side=>()=>{onHoverOn&&("vertical"===side&&onHoverOn({top:!0,bottom:!0}),"horizontal"===side&&onHoverOn({left:!0,right:!0}))},createHandleOnHoverOff=side=>()=>{onHoverOff&&("vertical"===side&&onHoverOff({top:!1,bottom:!1}),"horizontal"===side&&onHoverOff({left:!1,right:!1}))},createHandleOnChange=side=>next=>{if(!onChange)return;const nextValues={...values},nextValue=!isNaN(parseFloat(next))?next:void 0;"vertical"===side&&(nextValues.top=nextValue,nextValues.bottom=nextValue),"horizontal"===side&&(nextValues.left=nextValue,nextValues.right=nextValue),onChange(nextValues)},createHandleOnUnitChange=side=>next=>{const newUnits={...selectedUnits};"vertical"===side&&(newUnits.top=next,newUnits.bottom=next),"horizontal"===side&&(newUnits.left=next,newUnits.right=next),setSelectedUnits(newUnits)},filteredSides=null!=sides&&sides.length?groupedSides.filter((side=>sides.includes(side))):groupedSides,first=filteredSides[0],last=filteredSides[filteredSides.length-1],only=first===last&&first;return(0,react.createElement)(Layout,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},filteredSides.map((side=>{const[parsedQuantity,parsedUnit]=parseQuantityAndUnitFromRawValue("vertical"===side?values.top:values.left),selectedUnit="vertical"===side?selectedUnits.top:selectedUnits.left;return(0,react.createElement)(BoxUnitControl,(0,helpers_esm_extends.A)({},props,{isFirst:first===side,isLast:last===side,isOnly:only===side,value:[parsedQuantity,null!=selectedUnit?selectedUnit:parsedUnit].join(""),onChange:createHandleOnChange(side),onUnitChange:createHandleOnUnitChange(side),onFocus:createHandleOnFocus(side),onHoverOn:createHandleOnHoverOn(side),onHoverOff:createHandleOnHoverOff(side),label:LABELS[side],key:side}))})))}const box_control_icon_styles_Root=(0,emotion_styled_base_browser_esm.A)("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),Viewbox=(0,emotion_styled_base_browser_esm.A)("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),Stroke=(0,emotion_styled_base_browser_esm.A)("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(_ref=>{let{isFocused}=_ref;return(0,emotion_react_browser_esm.AH)({backgroundColor:"currentColor",opacity:isFocused?1:.3},"","")}),";"),VerticalStroke=(0,emotion_styled_base_browser_esm.A)(Stroke,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),HorizontalStroke=(0,emotion_styled_base_browser_esm.A)(Stroke,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),TopStroke=(0,emotion_styled_base_browser_esm.A)(HorizontalStroke,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),RightStroke=(0,emotion_styled_base_browser_esm.A)(VerticalStroke,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),BottomStroke=(0,emotion_styled_base_browser_esm.A)(HorizontalStroke,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),LeftStroke=(0,emotion_styled_base_browser_esm.A)(VerticalStroke,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"}),BASE_ICON_SIZE=24;function BoxControlIcon(_ref){let{size=24,side="all",sides,...props}=_ref;const hasSide=value=>!(value=>(null==sides?void 0:sides.length)&&!sides.includes(value))(value)&&("all"===side||side===value),top=hasSide("top")||hasSide("vertical"),right=hasSide("right")||hasSide("horizontal"),bottom=hasSide("bottom")||hasSide("vertical"),left=hasSide("left")||hasSide("horizontal"),scale=size/BASE_ICON_SIZE;return(0,react.createElement)(box_control_icon_styles_Root,(0,helpers_esm_extends.A)({style:{transform:`scale(${scale})`}},props),(0,react.createElement)(Viewbox,null,(0,react.createElement)(TopStroke,{isFocused:top}),(0,react.createElement)(RightStroke,{isFocused:right}),(0,react.createElement)(BottomStroke,{isFocused:bottom}),(0,react.createElement)(LeftStroke,{isFocused:left})))}const library_link=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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"})),link_off=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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"}));function LinkedButton(_ref){let{isLinked,...props}=_ref;const label=isLinked?(0,_wordpress_i18n_build_module.__)("Unlink Sides"):(0,_wordpress_i18n_build_module.__)("Link Sides");return(0,react.createElement)(tooltip,{text:label},(0,react.createElement)("span",null,(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({},props,{className:"component-box-control__linked-button",variant:isLinked?"primary":"secondary",isSmall:!0,icon:isLinked?library_link:link_off,iconSize:16,"aria-label":label}))))}const defaultInputProps={min:0},box_control_noop=()=>{};function BoxControl(_ref){let{id:idProp,inputProps=defaultInputProps,onChange=box_control_noop,label=(0,_wordpress_i18n_build_module.__)("Box Control"),values:valuesProp,units,sides,splitOnAxis=!1,allowReset=!0,resetValues=DEFAULT_VALUES}=_ref;const[values,setValues]=use_controlled_state(valuesProp,{fallback:DEFAULT_VALUES}),inputValues=values||DEFAULT_VALUES,hasInitialValue=isValuesDefined(valuesProp),hasOneSide=1===(null==sides?void 0:sides.length),[isDirty,setIsDirty]=(0,react.useState)(hasInitialValue),[isLinked,setIsLinked]=(0,react.useState)(!hasInitialValue||!isValuesMixed(inputValues)||hasOneSide),[side,setSide]=(0,react.useState)(getInitialSide(isLinked,splitOnAxis)),[selectedUnits,setSelectedUnits]=(0,react.useState)({top:parseQuantityAndUnitFromRawValue(null==valuesProp?void 0:valuesProp.top)[1],right:parseQuantityAndUnitFromRawValue(null==valuesProp?void 0:valuesProp.right)[1],bottom:parseQuantityAndUnitFromRawValue(null==valuesProp?void 0:valuesProp.bottom)[1],left:parseQuantityAndUnitFromRawValue(null==valuesProp?void 0:valuesProp.left)[1]}),id=function box_control_useUniqueId(idProp){const instanceId=(0,use_instance_id.A)(BoxControl,"inspector-box-control");return idProp||instanceId}(idProp),headingId=`${id}-heading`,inputControlProps={...inputProps,onChange:nextValues=>{onChange(nextValues),setValues(nextValues),setIsDirty(!0)},onFocus:(event,_ref2)=>{let{side:nextSide}=_ref2;setSide(nextSide)},isLinked,units,selectedUnits,setSelectedUnits,sides,values:inputValues};return(0,react.createElement)(box_control_styles_Root,{id,role:"group","aria-labelledby":headingId},(0,react.createElement)(Header,{className:"component-box-control__header"},(0,react.createElement)(flex_item_component,null,(0,react.createElement)(BaseControl.VisualLabel,{id:headingId},label)),allowReset&&(0,react.createElement)(flex_item_component,null,(0,react.createElement)(build_module_button,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{onChange(resetValues),setValues(resetValues),setSelectedUnits(resetValues),setIsDirty(!1)},disabled:!isDirty},(0,_wordpress_i18n_build_module.__)("Reset")))),(0,react.createElement)(HeaderControlWrapper,{className:"component-box-control__header-control-wrapper"},(0,react.createElement)(flex_item_component,null,(0,react.createElement)(BoxControlIcon,{side,sides})),isLinked&&(0,react.createElement)(flex_block_component,null,(0,react.createElement)(AllInputControl,(0,helpers_esm_extends.A)({"aria-label":label},inputControlProps))),!isLinked&&splitOnAxis&&(0,react.createElement)(flex_block_component,null,(0,react.createElement)(AxialInputControls,inputControlProps)),!hasOneSide&&(0,react.createElement)(flex_item_component,null,(0,react.createElement)(LinkedButton,{onClick:()=>{setIsLinked(!isLinked),setSide(getInitialSide(!isLinked,splitOnAxis))},isLinked}))),!isLinked&&!splitOnAxis&&(0,react.createElement)(BoxInputControls,inputControlProps))}var use_ref_effect=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js");const BlockRefs=(0,react.createContext)({refs:new Map,callbacks:new Map});function BlockRefsProvider(_ref){let{children}=_ref;const value=(0,react.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,react.createElement)(BlockRefs.Provider,{value},children)}function useBlockRefProvider(clientId){const{refs,callbacks}=(0,react.useContext)(BlockRefs),ref=(0,react.useRef)();return(0,react.useLayoutEffect)((()=>(refs.set(ref,clientId),()=>{refs.delete(ref)})),[clientId]),(0,use_ref_effect.A)((element=>{ref.current=element,callbacks.forEach(((id,setElement)=>{clientId===id&&setElement(element)}))}),[clientId])}function useBlockRef(clientId){const{refs}=(0,react.useContext)(BlockRefs),freshClientId=(0,react.useRef)();return freshClientId.current=clientId,(0,react.useMemo)((()=>({get current(){let element=null;for(const[ref,id]of refs.entries())id===freshClientId.current&&ref.current&&(element=ref.current);return element}})),[])}function useBlockElement(clientId){const{callbacks}=(0,react.useContext)(BlockRefs),ref=useBlockRef(clientId),[element,setElement]=(0,react.useState)(null);return(0,react.useLayoutEffect)((()=>{if(clientId)return callbacks.set(setElement,clientId),()=>{callbacks.delete(setElement)}}),[clientId]),ref.current||element}function isValueSpacingPreset(value){return!(null==value||!value.includes)&&("0"===value||value.includes("var:preset|spacing|"))}function getCustomValueFromPreset(value,spacingSizes){if(!isValueSpacingPreset(value))return value;const slug=getSpacingPresetSlug(value),spacingSize=spacingSizes.find((size=>String(size.slug)===slug));return null==spacingSize?void 0:spacingSize.size}function getSpacingPresetCssVar(value){if(!value)return;const slug=value.match(/var:preset\|spacing\|(.+)/);return slug?`var(--wp--preset--spacing--${slug[1]})`:value}function getSpacingPresetSlug(value){if(!value)return;if("0"===value||"default"===value)return value;const slug=value.match(/var:preset\|spacing\|(.+)/);return slug?slug[1]:void 0}const utils_LABELS={all:(0,i18n_build_module.__)("All sides"),top:(0,i18n_build_module.__)("Top"),bottom:(0,i18n_build_module.__)("Bottom"),left:(0,i18n_build_module.__)("Left"),right:(0,i18n_build_module.__)("Right"),mixed:(0,i18n_build_module.__)("Mixed"),vertical:(0,i18n_build_module.__)("Vertical"),horizontal:(0,i18n_build_module.__)("Horizontal")},utils_DEFAULT_VALUES={top:void 0,right:void 0,bottom:void 0,left:void 0},utils_ALL_SIDES=["top","right","bottom","left"];function utils_isValuesMixed(){let values=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},sides=arguments.length>1&&void 0!==arguments[1]?arguments[1]:utils_ALL_SIDES;return Object.values(values).length>=1&&Object.values(values).length<sides.length||new Set(Object.values(values)).size>1}function utils_isValuesDefined(values){return void 0!==values&&!(0,lodash.isEmpty)(Object.values(values).filter((value=>!!value&&/\d/.test(value))))}const blockedPaths=["color","border","typography","spacing"],deprecatedFlags={"color.palette":settings=>void 0===settings.colors?void 0:settings.colors,"color.gradients":settings=>void 0===settings.gradients?void 0:settings.gradients,"color.custom":settings=>void 0===settings.disableCustomColors?void 0:!settings.disableCustomColors,"color.customGradient":settings=>void 0===settings.disableCustomGradients?void 0:!settings.disableCustomGradients,"typography.fontSizes":settings=>void 0===settings.fontSizes?void 0:settings.fontSizes,"typography.customFontSize":settings=>void 0===settings.disableCustomFontSizes?void 0:!settings.disableCustomFontSizes,"typography.lineHeight":settings=>settings.enableCustomLineHeight,"spacing.units":settings=>{if(void 0!==settings.enableCustomUnits)return!0===settings.enableCustomUnits?["px","em","rem","vh","vw","%"]:settings.enableCustomUnits},"spacing.padding":settings=>settings.enableCustomSpacing},prefixedFlags={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"},removeCustomPrefixes=path=>prefixedFlags[path]||path;function use_setting_useSetting(path){const{name:blockName,clientId}=context_useBlockEditContext(),setting=use_select_useSelect((select=>{if(blockedPaths.includes(path))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let result;const normalizedPath=removeCustomPrefixes(path);[...select(store_store).getBlockParents(clientId),clientId].forEach((candidateClientId=>{const candidateBlockName=select(store_store).getBlockName(candidateClientId);if((0,build_module.pN)(candidateBlockName,"__experimentalSettings",!1)){var _get;const candidateAtts=select(store_store).getBlockAttributes(candidateClientId),candidateResult=null!==(_get=(0,lodash.get)(candidateAtts,`settings.blocks.${blockName}.${normalizedPath}`))&&void 0!==_get?_get:(0,lodash.get)(candidateAtts,`settings.${normalizedPath}`);void 0!==candidateResult&&(result=candidateResult)}}));const settings=select(store_store).getSettings();if(void 0===result){var _get2;const defaultsPath=`__experimentalFeatures.${normalizedPath}`,blockPath=`__experimentalFeatures.blocks.${blockName}.${normalizedPath}`;result=null!==(_get2=(0,lodash.get)(settings,blockPath))&&void 0!==_get2?_get2:(0,lodash.get)(settings,defaultsPath)}var _ref,_result$custom;if(void 0!==result)return build_module.UT[normalizedPath]?null!==(_ref=null!==(_result$custom=result.custom)&&void 0!==_result$custom?_result$custom:result.theme)&&void 0!==_ref?_ref:result.default:result;const deprecatedSettingsValue=deprecatedFlags[normalizedPath]?deprecatedFlags[normalizedPath](settings):void 0;return void 0!==deprecatedSettingsValue?deprecatedSettingsValue:"typography.dropCap"===normalizedPath||void 0}),[blockName,clientId,path]);return setting}function usePrevious(value){const ref=(0,react.useRef)();return(0,react.useEffect)((()=>{ref.current=value}),[value]),ref.current}const toolsPanelGrid={columns:columns=>(0,emotion_react_browser_esm.AH)("grid-template-columns:",`repeat( ${columns}, minmax(0, 1fr) )`,";",""),spacing:(0,emotion_react_browser_esm.AH)("column-gap:",space(2),";row-gap:",space(4),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},ToolsPanelHiddenInnerWrapper={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},ToolsPanelHeader=(0,emotion_react_browser_esm.AH)(toolsPanelGrid.item.fullWidth," gap:",space(2),";.components-dropdown-menu{margin:",space(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",space(6),";}",""),ToolsPanelHeading={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},ToolsPanelItem=(0,emotion_react_browser_esm.AH)(toolsPanelGrid.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",Wrapper,"{margin-bottom:0;",StyledField,":last-child{margin-bottom:0;}}",StyledHelp,"{margin-bottom:0;}&& ",LabelWrapper,"{label{line-height:1.4em;}}",""),ToolsPanelItemPlaceholder={name:"eivff4",styles:"display:none"},styles_DropdownMenu={name:"16gsvie",styles:"min-width:200px"},context_noop=()=>{},ToolsPanelContext=(0,react.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:context_noop,deregisterPanelItem:context_noop,flagItemCustomization:context_noop,areAllOptionalControlsHidden:!0}),useToolsPanelContext=()=>(0,react.useContext)(ToolsPanelContext);const tools_panel_item_component=contextConnect(((props,forwardedRef)=>{const{children,isShown,shouldRenderPlaceholder,...toolsPanelItemProps}=function useToolsPanelItem(props){var _menuItems$menuGroup,_menuItems$menuGroup2;const{className,hasValue,isShownByDefault,label,panelId,resetAllFilter,onDeselect,onSelect,...otherProps}=useContextSystem(props,"ToolsPanelItem"),{panelId:currentPanelId,menuItems,registerPanelItem,deregisterPanelItem,flagItemCustomization,isResetting,shouldRenderPlaceholderItems:shouldRenderPlaceholder,firstDisplayedItem,lastDisplayedItem,__experimentalFirstVisibleItemClass,__experimentalLastVisibleItemClass}=useToolsPanelContext(),hasValueCallback=(0,react.useCallback)(hasValue,[panelId]),resetAllFilterCallback=(0,react.useCallback)(resetAllFilter,[panelId]),previousPanelId=usePrevious(currentPanelId),hasMatchingPanel=currentPanelId===panelId||null===currentPanelId;(0,react.useEffect)((()=>(hasMatchingPanel&&null!==previousPanelId&&registerPanelItem({hasValue:hasValueCallback,isShownByDefault,label,resetAllFilter:resetAllFilterCallback,panelId}),()=>{(null===previousPanelId&&currentPanelId||currentPanelId===panelId)&&deregisterPanelItem(label)})),[currentPanelId,hasMatchingPanel,isShownByDefault,label,hasValueCallback,panelId,previousPanelId,resetAllFilterCallback]);const isValueSet=hasValue(),wasValueSet=usePrevious(isValueSet);(0,react.useEffect)((()=>{isShownByDefault&&isValueSet&&!wasValueSet&&flagItemCustomization(label)}),[isValueSet,wasValueSet,isShownByDefault,label]);const menuGroup=isShownByDefault?"default":"optional",isMenuItemChecked=null==menuItems||null===(_menuItems$menuGroup=menuItems[menuGroup])||void 0===_menuItems$menuGroup?void 0:_menuItems$menuGroup[label],wasMenuItemChecked=usePrevious(isMenuItemChecked);(0,react.useEffect)((()=>{!isResetting&&hasMatchingPanel&&(!isMenuItemChecked||isValueSet||wasMenuItemChecked||null==onSelect||onSelect(),!isMenuItemChecked&&wasMenuItemChecked&&(null==onDeselect||onDeselect()))}),[hasMatchingPanel,isMenuItemChecked,isResetting,isValueSet,wasMenuItemChecked]);const isShown=isShownByDefault?void 0!==(null==menuItems||null===(_menuItems$menuGroup2=menuItems[menuGroup])||void 0===_menuItems$menuGroup2?void 0:_menuItems$menuGroup2[label]):isMenuItemChecked,cx=useCx(),classes=(0,react.useMemo)((()=>cx(ToolsPanelItem,shouldRenderPlaceholder&&!isShown&&ToolsPanelItemPlaceholder,className,firstDisplayedItem===label&&__experimentalFirstVisibleItemClass,lastDisplayedItem===label&&__experimentalLastVisibleItemClass)),[isShown,shouldRenderPlaceholder,className,cx,firstDisplayedItem,lastDisplayedItem,__experimentalFirstVisibleItemClass,__experimentalLastVisibleItemClass]);return{...otherProps,isShown,shouldRenderPlaceholder,className:classes}}(props);return isShown?(0,react.createElement)(component,(0,helpers_esm_extends.A)({},toolsPanelItemProps,{ref:forwardedRef}),children):shouldRenderPlaceholder?(0,react.createElement)(component,(0,helpers_esm_extends.A)({},toolsPanelItemProps,{ref:forwardedRef})):null}),"ToolsPanelItem"),inspector_controls_groups={default:createSlotFill("InspectorControls"),advanced:createSlotFill("InspectorAdvancedControls"),border:createSlotFill("InspectorControlsBorder"),color:createSlotFill("InspectorControlsColor"),dimensions:createSlotFill("InspectorControlsDimensions"),typography:createSlotFill("InspectorControlsTypography")};var fill_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");function InspectorControlsFill(_ref){var _groups$group;let{__experimentalGroup:group="default",children}=_ref;const isDisplayed=useDisplayBlockControls(),Fill=null===(_groups$group=inspector_controls_groups[group])||void 0===_groups$group?void 0:_groups$group.Fill;return Fill?isDisplayed?(0,react.createElement)(style_provider,{document},(0,react.createElement)(Fill,null,(fillProps=>{const value=(0,lodash.isEmpty)(fillProps)?null:fillProps;return(0,react.createElement)(ToolsPanelContext.Provider,{value},children)}))):null:(void 0!==fill_process&&fill_process.env,null)}const library_reset=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M7 11.5h10V13H7z"})),library_check=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),library_plus=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),more_vertical=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),H_ALIGNMENTS={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-start",justify:"flex-end"},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"}},V_ALIGNMENTS={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-start",align:"flex-end"},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:{justify:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function useHStack(props){const{alignment="edge",children,direction,spacing=2,...otherProps}=useContextSystem(props,"HStack"),align=function getAlignmentProps(alignment){let direction=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";if(!isValueDefined(alignment))return{};const props="column"===direction?V_ALIGNMENTS:H_ALIGNMENTS;return alignment in props?props[alignment]:{align:alignment}}(alignment,direction),validChildren=function getValidChildren(children){return"string"==typeof children?[children]:react.Children.toArray(children).filter((child=>(0,react.isValidElement)(child)))}(children),clonedChildren=validChildren.map(((child,index)=>{if(hasConnectNamespace(child,["Spacer"])){const childElement=child,_key=childElement.key||`hstack-${index}`;return(0,react.createElement)(flex_item_component,(0,helpers_esm_extends.A)({isBlock:!0,key:_key},childElement.props))}return child}));return useFlex({children:clonedChildren,direction,justify:"center",...align,...otherProps,gap:spacing})}const h_stack_component=contextConnect((function UnconnectedHStack(props,forwardedRef){const hStackProps=useHStack(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},hStackProps,{ref:forwardedRef}))}),"HStack");const heading_component=contextConnect((function UnconnectedHeading(props,forwardedRef){const headerProps=function useHeading(props){const{as:asProp,level=2,...otherProps}=useContextSystem(props,"Heading"),as=asProp||`h${level}`,a11yProps={};return"string"==typeof as&&"h"!==as[0]&&(a11yProps.role="heading",a11yProps["aria-level"]="string"==typeof level?parseInt(level):level),{...useText({color:COLORS.gray[900],size:getHeadingFontSize(level),isBlock:!0,weight:config_values.fontWeightHeading,...otherProps}),...a11yProps,as}}(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},headerProps,{ref:forwardedRef}))}),"Heading");const DefaultControlsGroup=_ref=>{let{items,toggleItem}=_ref;return items.length?(0,react.createElement)(menu_group,null,items.map((_ref2=>{let[label,hasValue]=_ref2;return hasValue?(0,react.createElement)(menu_item,{key:label,role:"menuitem",icon:library_reset,label:(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Reset %s"),label),onClick:()=>{toggleItem(label),speak((0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("%s reset to default"),label),"assertive")}},label):(0,react.createElement)(menu_item,{key:label,role:"menuitemcheckbox",icon:library_check,isSelected:!0,"aria-disabled":!0},label)}))):null},OptionalControlsGroup=_ref3=>{let{items,toggleItem}=_ref3;return items.length?(0,react.createElement)(menu_group,null,items.map((_ref4=>{let[label,isSelected]=_ref4;const itemLabel=isSelected?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Hide and reset %s"),label):(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Show %s"),label);return(0,react.createElement)(menu_item,{key:label,icon:isSelected&&library_check,isSelected,label:itemLabel,onClick:()=>{speak(isSelected?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("%s hidden and reset to default"),label):(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("%s is now visible"),label),"assertive"),toggleItem(label)},role:"menuitemcheckbox"},label)}))):null},ConnectedToolsPanelHeader=contextConnect(((props,forwardedRef)=>{const{areAllOptionalControlsHidden,dropdownMenuClassName,hasMenuItems,headingClassName,label:labelText,menuItems,resetAll,toggleItem,...headerProps}=function useToolsPanelHeader(props){const{className,...otherProps}=useContextSystem(props,"ToolsPanelHeader"),cx=useCx(),classes=(0,react.useMemo)((()=>cx(ToolsPanelHeader,className)),[className,cx]),dropdownMenuClassName=(0,react.useMemo)((()=>cx(styles_DropdownMenu)),[cx]),headingClassName=(0,react.useMemo)((()=>cx(ToolsPanelHeading)),[cx]),{menuItems,hasMenuItems,areAllOptionalControlsHidden}=useToolsPanelContext();return{...otherProps,areAllOptionalControlsHidden,dropdownMenuClassName,hasMenuItems,headingClassName,menuItems,className:classes}}(props);if(!labelText)return null;const defaultItems=Object.entries((null==menuItems?void 0:menuItems.default)||{}),optionalItems=Object.entries((null==menuItems?void 0:menuItems.optional)||{}),dropDownMenuIcon=areAllOptionalControlsHidden?library_plus:more_vertical,dropDownMenuLabelText=(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module._x)("%s options","Button label to reveal tool panel options"),labelText),dropdownMenuDescriptionText=areAllOptionalControlsHidden?(0,_wordpress_i18n_build_module.__)("All options are currently hidden"):void 0,canResetAll=[...defaultItems,...optionalItems].some((_ref5=>{let[,isSelected]=_ref5;return isSelected}));return(0,react.createElement)(h_stack_component,(0,helpers_esm_extends.A)({},headerProps,{ref:forwardedRef}),(0,react.createElement)(heading_component,{level:2,className:headingClassName},labelText),hasMenuItems&&(0,react.createElement)(dropdown_menu,{icon:dropDownMenuIcon,label:dropDownMenuLabelText,menuProps:{className:dropdownMenuClassName},toggleProps:{isSmall:!0,describedBy:dropdownMenuDescriptionText}},(()=>(0,react.createElement)(react.Fragment,null,(0,react.createElement)(DefaultControlsGroup,{items:defaultItems,toggleItem}),(0,react.createElement)(OptionalControlsGroup,{items:optionalItems,toggleItem}),(0,react.createElement)(menu_group,null,(0,react.createElement)(menu_item,{"aria-disabled":!canResetAll,variant:"tertiary",onClick:()=>{canResetAll&&(resetAll(),speak((0,_wordpress_i18n_build_module.__)("All options reset"),"assertive"))}},(0,_wordpress_i18n_build_module.__)("Reset all")))))))}),"ToolsPanelHeader"),tools_panel_header_component=ConnectedToolsPanelHeader,generateMenuItems=_ref=>{let{panelItems,shouldReset,currentMenuItems}=_ref;const menuItems={default:{},optional:{}};return panelItems.forEach((_ref2=>{var _currentMenuItems$gro;let{hasValue,isShownByDefault,label}=_ref2;const group=isShownByDefault?"default":"optional",existingItemValue=null==currentMenuItems||null===(_currentMenuItems$gro=currentMenuItems[group])||void 0===_currentMenuItems$gro?void 0:_currentMenuItems$gro[label],value=void 0!==existingItemValue?existingItemValue:hasValue();menuItems[group][label]=!shouldReset&&value})),menuItems},isMenuItemTypeEmpty=obj=>obj&&0===Object.keys(obj).length;function useToolsPanel(props){const{className,resetAll,panelId,hasInnerWrapper,shouldRenderPlaceholderItems,__experimentalFirstVisibleItemClass,__experimentalLastVisibleItemClass,...otherProps}=useContextSystem(props,"ToolsPanel"),isResetting=(0,react.useRef)(!1),wasResetting=isResetting.current;(0,react.useEffect)((()=>{wasResetting&&(isResetting.current=!1)}),[wasResetting]);const[panelItems,setPanelItems]=(0,react.useState)([]),registerPanelItem=(0,react.useCallback)((item=>{setPanelItems((items=>{const newItems=[...items],existingIndex=newItems.findIndex((oldItem=>oldItem.label===item.label));return-1!==existingIndex&&newItems.splice(existingIndex,1),[...newItems,item]}))}),[setPanelItems]),deregisterPanelItem=(0,react.useCallback)((label=>{setPanelItems((items=>{const newItems=[...items],index=newItems.findIndex((item=>item.label===label));return-1!==index&&newItems.splice(index,1),newItems}))}),[setPanelItems]),[menuItems,setMenuItems]=(0,react.useState)({default:{},optional:{}});(0,react.useEffect)((()=>{setMenuItems((prevState=>generateMenuItems({panelItems,shouldReset:!1,currentMenuItems:prevState})))}),[generateMenuItems,panelItems,setMenuItems]);const flagItemCustomization=(0,react.useCallback)((function(label){let group=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";setMenuItems((items=>({...items,[group]:{...items[group],[label]:!0}})))}),[setMenuItems]),[areAllOptionalControlsHidden,setAreAllOptionalControlsHidden]=(0,react.useState)(!1);(0,react.useEffect)((()=>{if(isMenuItemTypeEmpty(null==menuItems?void 0:menuItems.default)&&!isMenuItemTypeEmpty(null==menuItems?void 0:menuItems.optional)){const allControlsHidden=!Object.entries(menuItems.optional).some((_ref3=>{let[,isSelected]=_ref3;return isSelected}));setAreAllOptionalControlsHidden(allControlsHidden)}}),[menuItems,setAreAllOptionalControlsHidden]);const cx=useCx(),classes=(0,react.useMemo)((()=>{const wrapperStyle=hasInnerWrapper&&(columns=2,(0,emotion_react_browser_esm.AH)(">div:not( :first-of-type ){display:grid;",toolsPanelGrid.columns(columns)," ",toolsPanelGrid.spacing," ",toolsPanelGrid.item.fullWidth,";}",""));var columns;const emptyStyle=isMenuItemTypeEmpty(null==menuItems?void 0:menuItems.default)&&areAllOptionalControlsHidden&&ToolsPanelHiddenInnerWrapper;return cx((columns=>(0,emotion_react_browser_esm.AH)(toolsPanelGrid.columns(columns)," ",toolsPanelGrid.spacing," border-top:",config_values.borderWidth," solid ",COLORS.gray[300],";margin-top:-1px;padding:",space(4),";",""))(2),wrapperStyle,emptyStyle,className)}),[areAllOptionalControlsHidden,className,cx,hasInnerWrapper,menuItems]),toggleItem=(0,react.useCallback)((label=>{const currentItem=panelItems.find((item=>item.label===label));if(!currentItem)return;const menuGroup=currentItem.isShownByDefault?"default":"optional",newMenuItems={...menuItems,[menuGroup]:{...menuItems[menuGroup],[label]:!menuItems[menuGroup][label]}};setMenuItems(newMenuItems)}),[menuItems,panelItems,setMenuItems]),resetAllItems=(0,react.useCallback)((()=>{if("function"==typeof resetAll){isResetting.current=!0;const filters=[];panelItems.forEach((item=>{item.resetAllFilter&&filters.push(item.resetAllFilter)})),resetAll(filters)}const resetMenuItems=generateMenuItems({panelItems,shouldReset:!0});setMenuItems(resetMenuItems)}),[generateMenuItems,isResetting.current,panelItems,resetAll,setMenuItems]),getFirstVisibleItemLabel=items=>{const optionalItems=menuItems.optional||{},firstItem=items.find((item=>item.isShownByDefault||!!optionalItems[item.label]));return null==firstItem?void 0:firstItem.label},firstDisplayedItem=getFirstVisibleItemLabel(panelItems),lastDisplayedItem=getFirstVisibleItemLabel([...panelItems].reverse());return{...otherProps,panelContext:(0,react.useMemo)((()=>({areAllOptionalControlsHidden,deregisterPanelItem,firstDisplayedItem,flagItemCustomization,hasMenuItems:!!panelItems.length,isResetting:isResetting.current,lastDisplayedItem,menuItems,panelId,registerPanelItem,shouldRenderPlaceholderItems,__experimentalFirstVisibleItemClass,__experimentalLastVisibleItemClass})),[areAllOptionalControlsHidden,deregisterPanelItem,firstDisplayedItem,flagItemCustomization,isResetting.current,lastDisplayedItem,menuItems,panelId,panelItems,registerPanelItem,shouldRenderPlaceholderItems,__experimentalFirstVisibleItemClass,__experimentalLastVisibleItemClass]),resetAllItems,toggleItem,className:classes}}const ALIGNMENTS={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 useGrid(props){const{align,alignment,className,columnGap,columns=2,gap=3,isInline=!1,justify,rowGap,rows,templateColumns,templateRows,...otherProps}=useContextSystem(props,"Grid"),column=useResponsiveValue(Array.isArray(columns)?columns:[columns]),row=useResponsiveValue(Array.isArray(rows)?rows:[rows]),gridTemplateColumns=templateColumns||!!columns&&`repeat( ${column}, 1fr )`,gridTemplateRows=templateRows||!!rows&&`repeat( ${row}, 1fr )`,cx=useCx();return{...otherProps,className:(0,react.useMemo)((()=>{const alignmentProps=function utils_getAlignmentProps(alignment){return alignment?ALIGNMENTS[alignment]:{}}(alignment),gridClasses=(0,emotion_react_browser_esm.AH)({alignItems:align,display:isInline?"inline-grid":"grid",gap:`calc( ${config_values.gridBase} * ${gap} )`,gridTemplateColumns:gridTemplateColumns||void 0,gridTemplateRows:gridTemplateRows||void 0,gridRowGap:rowGap,gridColumnGap:columnGap,justifyContent:justify,verticalAlign:isInline?"middle":void 0,...alignmentProps},"","");return cx(gridClasses,className)}),[align,alignment,className,columnGap,cx,gap,gridTemplateColumns,gridTemplateRows,isInline,justify,rowGap])}}const grid_component=contextConnect((function UnconnectedGrid(props,forwardedRef){const gridProps=useGrid(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},gridProps,{ref:forwardedRef}))}),"Grid"),tools_panel_component=contextConnect(((props,forwardedRef)=>{const{children,label,panelContext,resetAllItems,toggleItem,...toolsPanelProps}=useToolsPanel(props);return(0,react.createElement)(grid_component,(0,helpers_esm_extends.A)({},toolsPanelProps,{columns:2,ref:forwardedRef}),(0,react.createElement)(ToolsPanelContext.Provider,{value:panelContext},(0,react.createElement)(tools_panel_header_component,{label,resetAll:resetAllItems,toggleItem}),children))}),"ToolsPanel"),use_dispatch=storeNameOrDescriptor=>{const{dispatch}=use_registry_useRegistry();return void 0===storeNameOrDescriptor?dispatch:dispatch(storeNameOrDescriptor)},utils_identity=x=>x,cleanEmptyObject=object=>{if(null===object||"object"!=typeof object||Array.isArray(object))return object;const cleanedNestedObjects=(0,lodash.pickBy)((0,lodash.mapValues)(object,cleanEmptyObject),utils_identity);return(0,lodash.isEmpty)(cleanedNestedObjects)?void 0:cleanedNestedObjects};function immutableSet(object,path,value){return(0,lodash.setWith)(object?(0,lodash.clone)(object):{},path,value,lodash.clone)}function transformStyles(activeSupports,migrationPaths,result,source,index,results){var _source$;if((0,lodash.every)(activeSupports,(isActive=>!isActive)))return result;if(1===results.length&&result.innerBlocks.length===source.length)return result;let referenceBlockAttributes=null===(_source$=source[0])||void 0===_source$?void 0:_source$.attributes;if(results.length>1&&source.length>1){if(!source[index])return result;var _source$index;referenceBlockAttributes=null===(_source$index=source[index])||void 0===_source$index?void 0:_source$index.attributes}let returnBlock=result;return(0,lodash.forEach)(activeSupports,((isActive,support)=>{isActive&&migrationPaths[support].forEach((path=>{const styleValue=(0,lodash.get)(referenceBlockAttributes,path);styleValue&&(returnBlock={...returnBlock,attributes:immutableSet(returnBlock.attributes,path,styleValue)})}))})),returnBlock}function shouldSkipSerialization(blockType,featureSet,feature){const support=(0,build_module.bI)(blockType,featureSet),skipSerialization=null==support?void 0:support.__experimentalSkipSerialization;return Array.isArray(skipSerialization)?skipSerialization.includes(feature):skipSerialization}function BlockSupportToolsPanel(_ref){let{children,group,label}=_ref;const{updateBlockAttributes}=use_dispatch(store_store),{getBlockAttributes,getMultiSelectedBlockClientIds,getSelectedBlockClientId,hasMultiSelection}=use_select_useSelect(store_store),panelId=getSelectedBlockClientId(),resetAll=(0,react.useCallback)((function(){let resetFilters=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const newAttributes={},clientIds=hasMultiSelection()?getMultiSelectedBlockClientIds():[panelId];clientIds.forEach((clientId=>{const{style}=getBlockAttributes(clientId);let newBlockAttributes={style};resetFilters.forEach((resetFilter=>{newBlockAttributes={...newBlockAttributes,...resetFilter(newBlockAttributes)}})),newBlockAttributes={...newBlockAttributes,style:cleanEmptyObject(newBlockAttributes.style)},newAttributes[clientId]=newBlockAttributes})),updateBlockAttributes(clientIds,newAttributes,!0)}),[cleanEmptyObject,getBlockAttributes,getMultiSelectedBlockClientIds,hasMultiSelection,panelId,updateBlockAttributes]);return(0,react.createElement)(tools_panel_component,{className:`${group}-block-support-panel`,label,resetAll,key:panelId,panelId,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},children)}function BlockSupportSlotContainer(_ref){let{Slot,...props}=_ref;const toolsPanelContext=(0,react.useContext)(ToolsPanelContext);return(0,react.createElement)(Slot,(0,esm_extends.A)({},props,{fillProps:toolsPanelContext,bubblesVirtually:!0}))}var slot_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");function InspectorControlsSlot(_ref){var _groups$group;let{__experimentalGroup:group="default",label,...props}=_ref;const Slot=null===(_groups$group=inspector_controls_groups[group])||void 0===_groups$group?void 0:_groups$group.Slot,slot=useSlot(null==Slot?void 0:Slot.__unstableName);if(!Slot||!slot)return void 0!==slot_process&&slot_process.env,null;return Boolean(slot.fills&&slot.fills.length)?label?(0,react.createElement)(BlockSupportToolsPanel,{group,label},(0,react.createElement)(BlockSupportSlotContainer,(0,esm_extends.A)({},props,{Slot}))):(0,react.createElement)(Slot,(0,esm_extends.A)({},props,{bubblesVirtually:!0})):null}const InspectorControls=InspectorControlsFill;InspectorControls.Slot=InspectorControlsSlot;const InspectorAdvancedControls=props=>(0,react.createElement)(InspectorControlsFill,(0,esm_extends.A)({},props,{__experimentalGroup:"advanced"}));InspectorAdvancedControls.Slot=props=>(0,react.createElement)(InspectorControlsSlot,(0,esm_extends.A)({},props,{__experimentalGroup:"advanced"})),InspectorAdvancedControls.slotName="InspectorAdvancedControls";const inspector_controls=InspectorControls;const use_popover_scroll=function usePopoverScroll(scrollableRef){return(0,use_ref_effect.A)((node=>{if(!scrollableRef)return;function onWheel(event){const{deltaX,deltaY}=event;scrollableRef.current.scrollBy(deltaX,deltaY)}const options={passive:!0};return node.addEventListener("wheel",onWheel,options),()=>{node.removeEventListener("wheel",onWheel,options)}}),[scrollableRef])};const block_popover=(0,react.forwardRef)((function BlockPopover(_ref,ref){let{clientId,bottomClientId,children,__unstableRefreshSize,__unstableCoverTarget=!1,__unstablePopoverSlot,__unstableContentRef,...props}=_ref;const selectedElement=useBlockElement(clientId),lastSelectedElement=useBlockElement(null!=bottomClientId?bottomClientId:clientId),mergedRefs=(0,use_merge_refs.A)([ref,use_popover_scroll(__unstableContentRef)]),style=(0,react.useMemo)((()=>selectedElement&&lastSelectedElement===selectedElement?{position:"absolute",width:selectedElement.offsetWidth,height:selectedElement.offsetHeight}:{}),[selectedElement,lastSelectedElement,__unstableRefreshSize]);if(!selectedElement||bottomClientId&&!lastSelectedElement)return null;const anchorRef={top:selectedElement,bottom:lastSelectedElement};return(0,react.createElement)(popover,(0,esm_extends.A)({ref:mergedRefs,animate:!1,position:"top right left",focusOnMount:!1,anchorRef,__unstableSlotName:__unstablePopoverSlot||null,__unstableObserveElement:selectedElement,__unstableForcePosition:!0,__unstableShift:!0},props,{className:classnames_default()("block-editor-block-popover",props.className)}),__unstableCoverTarget&&(0,react.createElement)("div",{style},children),!__unstableCoverTarget&&children)})),utils_noop=()=>{};function floatClamp(value,min,max){return"number"!=typeof value?null:parseFloat(`${clamp(value,min,max)}`)}function reduceMotion(){let style;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition"){case"transition":style="transition-duration: 0ms;";break;case"animation":style="animation-duration: 1ms;";break;default:style="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${style};\n\t\t}\n\t`}const rangeHeight=()=>(0,emotion_react_browser_esm.AH)({height:30,minHeight:30},"",""),range_control_styles_Root=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1epgpqk14"})({name:"1se47kl",styles:"-webkit-tap-highlight-color:transparent;align-items:flex-start;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),range_control_styles_Wrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1epgpqk13"})("display:block;flex:1;position:relative;width:100%;",(_ref4=>{let{color=COLORS.ui.borderFocus}=_ref4;return(0,emotion_react_browser_esm.AH)({color},"","")}),";",rangeHeight,";",(_ref5=>{let{marks,__nextHasNoMarginBottom}=_ref5;return __nextHasNoMarginBottom?"":(0,emotion_react_browser_esm.AH)({marginBottom:marks?16:void 0},"","")}),";"),BeforeIconWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk12"})("display:flex;margin-top:",4,"px;",rtl({marginRight:6}),";"),AfterIconWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk11"})("display:flex;margin-top:",4,"px;",rtl({marginLeft:6}),";"),Rail=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk10"})("background-color:",COLORS.lightGray[600],";left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(_ref6=>{let{disabled,railColor}=_ref6,background=railColor||"";return disabled&&(background=COLORS.lightGray[400]),(0,emotion_react_browser_esm.AH)({background},"","")}),";"),Track=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk9"})("background-color:currentColor;border-radius:",4,"px;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(_ref7=>{let{disabled,trackColor}=_ref7,background=trackColor||"currentColor";return disabled&&(background=COLORS.lightGray[800]),(0,emotion_react_browser_esm.AH)({background},"","")}),";"),MarksWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk8"})({name:"l7tjj5",styles:"display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),Mark=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk7"})("height:",12,"px;left:0;position:absolute;top:-4px;width:1px;",(_ref8=>{let{disabled,isFilled}=_ref8,backgroundColor=isFilled?"currentColor":COLORS.lightGray[600];return disabled&&(backgroundColor=COLORS.lightGray[800]),(0,emotion_react_browser_esm.AH)({backgroundColor},"","")}),";"),MarkLabel=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk6"})("color:",COLORS.lightGray[600],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(_ref9=>{let{isFilled}=_ref9;return(0,emotion_react_browser_esm.AH)({color:isFilled?COLORS.darkGray[300]:COLORS.lightGray[600]},"","")}),";");var range_control_styles_ref3={name:"1sb75b3",styles:"background-color:var( --wp-admin-theme-color )"};const thumbColor=_ref10=>{let{disabled}=_ref10;return disabled?(0,emotion_react_browser_esm.AH)("background-color:",COLORS.lightGray[800],";",""):range_control_styles_ref3},ThumbWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk5"})("align-items:center;display:flex;height:",12,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",12,"px;border-radius:50%;",thumbColor,";",rtl({marginLeft:-10}),";",rtl({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),Thumb=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk4"})("align-items:center;border-radius:50%;height:100%;outline:0;position:absolute;user-select:none;width:100%;",thumbColor,";",(_ref11=>{let{isFocused}=_ref11;return isFocused?(0,emotion_react_browser_esm.AH)("&::before{content:' ';position:absolute;background-color:var( --wp-admin-theme-color );opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),InputRange=(0,emotion_styled_base_browser_esm.A)("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% + ",12,"px );");var range_control_styles_ref={name:"1cypxip",styles:"top:-80%"},range_control_styles_ref2={name:"1lr98c4",styles:"bottom:-80%"};const range_control_styles_Tooltip=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk2"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(_ref12=>{let{show}=_ref12;return(0,emotion_react_browser_esm.AH)({opacity:show?1:0},"","")}),";",(_ref13=>{let{position}=_ref13;return"bottom"===position?range_control_styles_ref2:range_control_styles_ref}),";",reduceMotion("transition"),";",rtl({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),InputNumber=(0,emotion_styled_base_browser_esm.A)(number_control,{target:"e1epgpqk1"})("display:inline-block;font-size:13px;margin-top:0;width:",space(16),"!important;input[type='number']&{",rangeHeight,";}",rtl({marginLeft:`${space(4)} !important`}),";"),ActionRightWrapper=(0,emotion_styled_base_browser_esm.A)("span",{target:"e1epgpqk0"})("display:block;margin-top:0;button,button.is-small{margin-left:0;",rangeHeight,";}",rtl({marginLeft:8}),";"),input_range_noop=()=>{};const input_range_ForwardedComponent=(0,react.forwardRef)((function input_range_InputRange(props,ref){const{describedBy,label,onHideTooltip=input_range_noop,onMouseLeave=input_range_noop,onMouseMove=input_range_noop,onShowTooltip=input_range_noop,value,...otherProps}=props,hoverInteractions=function useDebouncedHoverInteraction(settings){const{onHide=utils_noop,onMouseLeave=utils_noop,onMouseMove=utils_noop,onShow=utils_noop,timeout=300}=settings,[show,setShow]=(0,react.useState)(!1),timeoutRef=(0,react.useRef)(),setDebouncedTimeout=(0,react.useCallback)((callback=>{window.clearTimeout(timeoutRef.current),timeoutRef.current=window.setTimeout(callback,timeout)}),[timeout]),handleOnMouseMove=(0,react.useCallback)((event=>{onMouseMove(event),setDebouncedTimeout((()=>{show||(setShow(!0),onShow())}))}),[]),handleOnMouseLeave=(0,react.useCallback)((event=>{onMouseLeave(event),setDebouncedTimeout((()=>{setShow(!1),onHide()}))}),[]);return(0,react.useEffect)((()=>()=>{window.clearTimeout(timeoutRef.current)})),{onMouseMove:handleOnMouseMove,onMouseLeave:handleOnMouseLeave}}({onHide:onHideTooltip,onMouseLeave,onMouseMove,onShow:onShowTooltip});return(0,react.createElement)(InputRange,(0,helpers_esm_extends.A)({},otherProps,hoverInteractions,{"aria-describedby":describedBy,"aria-label":label,"aria-hidden":!1,ref,tabIndex:0,type:"range",value}))})),input_range=input_range_ForwardedComponent;function RangeMark(props){const{className,isFilled=!1,label,style={},...otherProps}=props,classes=classnames_default()("components-range-control__mark",isFilled&&"is-filled",className),labelClasses=classnames_default()("components-range-control__mark-label",isFilled&&"is-filled");return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(Mark,(0,helpers_esm_extends.A)({},otherProps,{"aria-hidden":"true",className:classes,isFilled,style})),label&&(0,react.createElement)(MarkLabel,{"aria-hidden":"true",className:labelClasses,isFilled,style},label))}function RangeRail(props){const{disabled=!1,marks=!1,min=0,max=100,step=1,value=0,...restProps}=props;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(Rail,(0,helpers_esm_extends.A)({disabled},restProps)),marks&&(0,react.createElement)(Marks,{disabled,marks,min,max,step,value}))}function Marks(props){const{disabled=!1,marks=!1,min=0,max=100,step:stepProp=1,value=0}=props,marksData=function useMarks(_ref){let{marks,min=0,max=100,step=1,value=0}=_ref;if(!marks)return[];const range=max-min;if(!Array.isArray(marks)){marks=[];const count=1+Math.round(range/step);for(;count>marks.push({value:step*marks.length+min}););}const placedMarks=[];return marks.forEach(((mark,index)=>{if(mark.value<min||mark.value>max)return;const key=`mark-${index}`,isFilled=mark.value<=value,offset=(mark.value-min)/range*100+"%",offsetStyle={[(0,_wordpress_i18n_build_module.V8)()?"right":"left"]:offset};placedMarks.push({...mark,isFilled,key,style:offsetStyle})})),placedMarks}({marks,min,max,step:"any"===stepProp?1:stepProp,value});return(0,react.createElement)(MarksWrapper,{"aria-hidden":"true",className:"components-range-control__marks"},marksData.map((mark=>(0,react.createElement)(RangeMark,(0,helpers_esm_extends.A)({},mark,{key:mark.key,"aria-hidden":"true",disabled})))))}function SimpleTooltip(props){const{className,inputRef,tooltipPosition,show=!1,style={},value=0,renderTooltipContent=v=>v,zIndex=100,...restProps}=props,position=function useTooltipPosition(_ref){let{inputRef,tooltipPosition}=_ref;const[position,setPosition]=(0,react.useState)(),setTooltipPosition=(0,react.useCallback)((()=>{inputRef&&inputRef.current&&setPosition(tooltipPosition)}),[tooltipPosition]);return(0,react.useEffect)((()=>{setTooltipPosition()}),[setTooltipPosition]),(0,react.useEffect)((()=>(window.addEventListener("resize",setTooltipPosition),()=>{window.removeEventListener("resize",setTooltipPosition)}))),position}({inputRef,tooltipPosition}),classes=classnames_default()("components-simple-tooltip",className),styles={...style,zIndex};return(0,react.createElement)(range_control_styles_Tooltip,(0,helpers_esm_extends.A)({},restProps,{"aria-hidden":show,className:classes,position,show,role:"tooltip",style:styles}),renderTooltipContent(value))}const range_control_noop=()=>{};const RangeControl=(0,react.forwardRef)((function UnforwardedRangeControl(props,forwardedRef){var _inputRef$current;const{__nextHasNoMarginBottom=!1,afterIcon,allowReset=!1,beforeIcon,className,color:colorProp=COLORS.ui.theme,currentInput,disabled=!1,help,hideLabelFromVision=!1,initialPosition,isShiftStepEnabled=!0,label,marks=!1,max=100,min=0,onBlur=range_control_noop,onChange=range_control_noop,onFocus=range_control_noop,onMouseLeave=range_control_noop,onMouseMove=range_control_noop,railColor,renderTooltipContent=v=>v,resetFallbackValue,shiftStep=10,showTooltip:showTooltipProp,step=1,trackColor,value:valueProp,withInputField=!0,...otherProps}=props,[value,setValue]=function useControlledRangeValue(settings){const{min,max,value:valueProp,initial}=settings,[state,setInternalState]=use_controlled_state(floatClamp(valueProp,min,max),{initial:floatClamp(null!=initial?initial:null,min,max),fallback:null});return[state,(0,react.useCallback)((nextValue=>{setInternalState(null===nextValue?null:floatClamp(nextValue,min,max))}),[min,max])]}({min,max,value:null!=valueProp?valueProp:null,initial:initialPosition}),isResetPendent=(0,react.useRef)(!1);let hasTooltip=showTooltipProp,hasInputField=withInputField;"any"===step&&(hasTooltip=!1,hasInputField=!1);const[showTooltip,setShowTooltip]=(0,react.useState)(hasTooltip),[isFocused,setIsFocused]=(0,react.useState)(!1),inputRef=(0,react.useRef)(),isCurrentlyFocused=null===(_inputRef$current=inputRef.current)||void 0===_inputRef$current?void 0:_inputRef$current.matches(":focus"),isThumbFocused=!disabled&&isFocused,isValueReset=null===value,inputSliderValue=isValueReset?"":void 0!==value?value:currentInput,rangeFillValue=isValueReset?(max-min)/2+min:value,fillValueOffset=`${clamp(isValueReset?50:(value-min)/(max-min)*100,0,100)}%`,classes=classnames_default()("components-range-control",className),wrapperClasses=classnames_default()("components-range-control__wrapper",!!marks&&"is-marked"),id=(0,use_instance_id.A)(UnforwardedRangeControl,"inspector-range-control"),describedBy=help?`${id}__help`:void 0,enableTooltip=!1!==hasTooltip&&Number.isFinite(value),handleOnReset=()=>{let resetValue=parseFloat(`${resetFallbackValue}`),onChangeResetValue=resetValue;isNaN(resetValue)&&(resetValue=null,onChangeResetValue=void 0),setValue(resetValue),onChange(onChangeResetValue)},offsetStyle={[(0,_wordpress_i18n_build_module.V8)()?"right":"left"]:fillValueOffset};return(0,react.createElement)(base_control,{__nextHasNoMarginBottom,className:classes,label,hideLabelFromVision,id:`${id}`,help},(0,react.createElement)(range_control_styles_Root,{className:"components-range-control__root"},beforeIcon&&(0,react.createElement)(BeforeIconWrapper,null,(0,react.createElement)(build_module_icon,{icon:beforeIcon})),(0,react.createElement)(range_control_styles_Wrapper,{__nextHasNoMarginBottom,className:wrapperClasses,color:colorProp,marks:!!marks},(0,react.createElement)(input_range,(0,helpers_esm_extends.A)({},otherProps,{className:"components-range-control__slider",describedBy,disabled,id:`${id}`,label,max,min,onBlur:event=>{onBlur(event),setIsFocused(!1),setShowTooltip(!1)},onChange:event=>{const nextValue=parseFloat(event.target.value);setValue(nextValue),onChange(nextValue)},onFocus:event=>{onFocus(event),setIsFocused(!0),setShowTooltip(!0)},onMouseMove,onMouseLeave,ref:(0,use_merge_refs.A)([inputRef,forwardedRef]),step,value:null!=inputSliderValue?inputSliderValue:void 0})),(0,react.createElement)(RangeRail,{"aria-hidden":!0,disabled,marks,max,min,railColor,step,value:rangeFillValue}),(0,react.createElement)(Track,{"aria-hidden":!0,className:"components-range-control__track",disabled,style:{width:fillValueOffset},trackColor}),(0,react.createElement)(ThumbWrapper,{style:offsetStyle,disabled},(0,react.createElement)(Thumb,{"aria-hidden":!0,isFocused:isThumbFocused,disabled})),enableTooltip&&(0,react.createElement)(SimpleTooltip,{className:"components-range-control__tooltip",inputRef,tooltipPosition:"bottom",renderTooltipContent,show:isCurrentlyFocused||showTooltip,style:offsetStyle,value})),afterIcon&&(0,react.createElement)(AfterIconWrapper,null,(0,react.createElement)(build_module_icon,{icon:afterIcon})),hasInputField&&(0,react.createElement)(InputNumber,{"aria-label":label,className:"components-range-control__number",disabled,inputMode:"decimal",isShiftStepEnabled,max,min,onBlur:()=>{isResetPendent.current&&(handleOnReset(),isResetPendent.current=!1)},onChange:next=>{let nextValue=parseFloat(next);setValue(nextValue),isNaN(nextValue)?allowReset&&(isResetPendent.current=!0):((nextValue<min||nextValue>max)&&(nextValue=floatClamp(nextValue,min,max)),onChange(nextValue),isResetPendent.current=!1)},shiftStep,step,value:inputSliderValue}),allowReset&&(0,react.createElement)(ActionRightWrapper,null,(0,react.createElement)(build_module_button,{className:"components-range-control__reset",disabled:disabled||void 0===value,variant:"secondary",isSmall:!0,onClick:handleOnReset},(0,_wordpress_i18n_build_module.__)("Reset")))))})),range_control=RangeControl;var downshift_esm=__webpack_require__("../../node_modules/.pnpm/downshift@6.1.12_react@17.0.2/node_modules/downshift/dist/downshift.esm.js");const icon=(0,react.forwardRef)((function icon_Icon({icon,size=24,...props},ref){return(0,react.cloneElement)(icon,{width:size,height:size,...props,ref})})),isDefined=o=>null!=o;const Spacer=contextConnect((function UnconnectedSpacer(props,forwardedRef){const spacerProps=function useSpacer(props){const{className,margin,marginBottom=2,marginLeft,marginRight,marginTop,marginX,marginY,padding,paddingBottom,paddingLeft,paddingRight,paddingTop,paddingX,paddingY,...otherProps}=useContextSystem(props,"Spacer");return{...otherProps,className:useCx()(isDefined(margin)&&(0,emotion_react_browser_esm.AH)("margin:",space(margin),";",""),isDefined(marginY)&&(0,emotion_react_browser_esm.AH)("margin-bottom:",space(marginY),";margin-top:",space(marginY),";",""),isDefined(marginX)&&(0,emotion_react_browser_esm.AH)("margin-left:",space(marginX),";margin-right:",space(marginX),";",""),isDefined(marginTop)&&(0,emotion_react_browser_esm.AH)("margin-top:",space(marginTop),";",""),isDefined(marginBottom)&&(0,emotion_react_browser_esm.AH)("margin-bottom:",space(marginBottom),";",""),isDefined(marginLeft)&&rtl({marginLeft:space(marginLeft)})(),isDefined(marginRight)&&rtl({marginRight:space(marginRight)})(),isDefined(padding)&&(0,emotion_react_browser_esm.AH)("padding:",space(padding),";",""),isDefined(paddingY)&&(0,emotion_react_browser_esm.AH)("padding-bottom:",space(paddingY),";padding-top:",space(paddingY),";",""),isDefined(paddingX)&&(0,emotion_react_browser_esm.AH)("padding-left:",space(paddingX),";padding-right:",space(paddingX),";",""),isDefined(paddingTop)&&(0,emotion_react_browser_esm.AH)("padding-top:",space(paddingTop),";",""),isDefined(paddingBottom)&&(0,emotion_react_browser_esm.AH)("padding-bottom:",space(paddingBottom),";",""),isDefined(paddingLeft)&&rtl({paddingLeft:space(paddingLeft)})(),isDefined(paddingRight)&&rtl({paddingRight:space(paddingRight)})(),className)}}(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},spacerProps,{ref:forwardedRef}))}),"Spacer"),spacer_component=Spacer;const input_suffix_wrapper=contextConnect((function UnconnectedInputControlSuffixWrapper(props,forwardedRef){const derivedProps=useContextSystem(props,"InputControlSuffixWrapper");return(0,react.createElement)(spacer_component,(0,helpers_esm_extends.A)({marginBottom:0},derivedProps,{ref:forwardedRef}))}),"InputControlSuffixWrapper"),Select=(0,emotion_styled_base_browser_esm.A)("select",{target:"e1mv6sxx2"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",COLORS.gray[900],";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;",(_ref=>{let{disabled}=_ref;return disabled?(0,emotion_react_browser_esm.AH)({color:COLORS.ui.textDisabled},"",""):""}),";",(_ref2=>{let{selectSize="default"}=_ref2;const fontSize={default:"13px",small:"11px","__unstable-large":"13px"}[selectSize];return fontSize?(0,emotion_react_browser_esm.AH)("font-size:","16px",";@media ( min-width: 600px ){font-size:",fontSize,";}",""):""}),";",(_ref3=>{let{__next36pxDefaultSize,selectSize="default"}=_ref3;const sizes={default:{height:36,minHeight:36,paddingTop:0,paddingBottom:0},small:{height:24,minHeight:24,paddingTop:0,paddingBottom:0},"__unstable-large":{height:40,minHeight:40,paddingTop:0,paddingBottom:0}};__next36pxDefaultSize||(sizes.default={height:30,minHeight:30,paddingTop:0,paddingBottom:0});const style=sizes[selectSize]||sizes.default;return(0,emotion_react_browser_esm.AH)(style,"","")}),";",(_ref4=>{let{__next36pxDefaultSize,selectSize="default"}=_ref4;const sizes={default:{paddingLeft:16,paddingRight:34},small:{paddingLeft:8,paddingRight:26},"__unstable-large":{paddingLeft:16,paddingRight:34}};return __next36pxDefaultSize||(sizes.default={paddingLeft:8,paddingRight:26}),rtl(sizes[selectSize]||sizes.default)}),";}"),DownArrowWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e1mv6sxx1"})("margin-inline-end:",space(-1),";line-height:0;"),InputControlSuffixWrapperWithClickThrough=(0,emotion_styled_base_browser_esm.A)(input_suffix_wrapper,{target:"e1mv6sxx0"})("position:absolute;pointer-events:none;",rtl({right:0}),";"),chevron_down=(0,react.createElement)(build_module_svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,react.createElement)(build_module_svg.wA,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),select_control_chevron_down=()=>(0,react.createElement)(InputControlSuffixWrapperWithClickThrough,null,(0,react.createElement)(DownArrowWrapper,null,(0,react.createElement)(icon,{icon:chevron_down,size:18}))),backCompatMinWidth=props=>props.__nextUnconstrainedWidth?"":(0,emotion_react_browser_esm.AH)(Container,"{min-width:130px;}",""),InputBaseWithBackCompatMinWidth=(0,emotion_styled_base_browser_esm.A)(input_base,{target:"eswuck60"})(backCompatMinWidth,";"),itemToString=item=>null==item?void 0:item.name,stateReducer=(_ref,_ref2)=>{let{selectedItem}=_ref,{type,changes,props:{items}}=_ref2;switch(type){case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:items[selectedItem?Math.min(items.indexOf(selectedItem)+1,items.length-1):0]};case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:items[selectedItem?Math.max(items.indexOf(selectedItem)-1,0):items.length-1]};default:return changes}};function CustomSelectControl(_ref3){var _menuProps$ariaActiv;let{__next36pxDefaultSize=!1,__nextUnconstrainedWidth=!1,className,hideLabelFromVision,label,describedBy,options:items,onChange:onSelectedItemChange,size="default",value:_selectedItem}=_ref3;const{getLabelProps,getToggleButtonProps,getMenuProps,getItemProps,isOpen,highlightedIndex,selectedItem}=(0,downshift_esm.WM)({initialSelectedItem:items[0],items,itemToString,onSelectedItemChange,...null!=_selectedItem?{selectedItem:_selectedItem}:void 0,stateReducer}),[isFocused,setIsFocused]=(0,react.useState)(!1);__nextUnconstrainedWidth||(0,deprecated_build_module.A)("Constrained width styles for wp.components.CustomSelectControl",{since:"6.1",version:"6.4",hint:"Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version"});const menuProps=getMenuProps({className:"components-custom-select-control__menu","aria-hidden":!isOpen}),onKeyDownHandler=(0,react.useCallback)((e=>{var _menuProps$onKeyDown;e.stopPropagation(),null==menuProps||null===(_menuProps$onKeyDown=menuProps.onKeyDown)||void 0===_menuProps$onKeyDown||_menuProps$onKeyDown.call(menuProps,e)}),[menuProps]);return null!==(_menuProps$ariaActiv=menuProps["aria-activedescendant"])&&void 0!==_menuProps$ariaActiv&&_menuProps$ariaActiv.startsWith("downshift-null")&&delete menuProps["aria-activedescendant"],(0,react.createElement)("div",{className:classnames_default()("components-custom-select-control",className)},hideLabelFromVision?(0,react.createElement)(visually_hidden_component,(0,helpers_esm_extends.A)({as:"label"},getLabelProps()),label):(0,react.createElement)(StyledLabel,getLabelProps({className:"components-custom-select-control__label"}),label),(0,react.createElement)(InputBaseWithBackCompatMinWidth,{__next36pxDefaultSize,__nextUnconstrainedWidth,isFocused:isOpen||isFocused,__unstableInputWidth:__nextUnconstrainedWidth?void 0:"auto",labelPosition:__nextUnconstrainedWidth?void 0:"top",size,suffix:(0,react.createElement)(select_control_chevron_down,null)},(0,react.createElement)(Select,(0,helpers_esm_extends.A)({as:"button",onFocus:()=>setIsFocused(!0),onBlur:()=>setIsFocused(!1),selectSize:size,__next36pxDefaultSize},getToggleButtonProps({"aria-label":label,"aria-labelledby":void 0,className:"components-custom-select-control__button",describedBy:function getDescribedBy(){return describedBy||(selectedItem?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Currently selected: %s"),selectedItem.name):(0,_wordpress_i18n_build_module.__)("No selection"))}()})),itemToString(selectedItem))),(0,react.createElement)("ul",(0,helpers_esm_extends.A)({},menuProps,{onKeyDown:onKeyDownHandler}),isOpen&&items.map(((item,index)=>(0,react.createElement)("li",getItemProps({item,index,key:item.key,className:classnames_default()(item.className,"components-custom-select-control__item",{"is-highlighted":index===highlightedIndex,"has-hint":!!item.__experimentalHint,"is-next-36px-default-size":__next36pxDefaultSize}),style:item.style}),item.name,item.__experimentalHint&&(0,react.createElement)("span",{className:"components-custom-select-control__item-hint"},item.__experimentalHint),item===selectedItem&&(0,react.createElement)(icon,{icon:library_check,className:"components-custom-select-control__item-icon"}))))))}const library_settings=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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,react.createElement)(build_module_svg.wA,{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"}));function SpacingInputControl(_ref){var _spacingSizes$current;let{spacingSizes,value,side,onChange,isMixed=!1,type,minimumCustomValue}=_ref,selectListSizes=spacingSizes;const showRangeControl=spacingSizes.length<=8,disableCustomSpacingSizes=use_select_useSelect((select=>{const editorSettings=select(store_store).getSettings();return null==editorSettings?void 0:editorSettings.disableCustomSpacingSizes})),[showCustomValueControl,setShowCustomValueControl]=(0,react.useState)(!disableCustomSpacingSizes&&void 0!==value&&!isValueSpacingPreset(value)),units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["px","em","rem"]});let currentValue=null;!showRangeControl&&!showCustomValueControl&&void 0!==value&&(!isValueSpacingPreset(value)||isValueSpacingPreset(value)&&isMixed)?(selectListSizes=[...spacingSizes,{name:isMixed?(0,i18n_build_module.__)("Mixed"):(0,i18n_build_module.nv)((0,i18n_build_module.__)("Custom (%s)"),value),slug:"custom",size:value}],currentValue=selectListSizes.length-1):isMixed||(currentValue=showCustomValueControl?getCustomValueFromPreset(value,spacingSizes):function getSliderValueFromPreset(presetValue,spacingSizes){if(void 0===presetValue)return 0;const slug=0===parseFloat(presetValue,10)?"0":getSpacingPresetSlug(presetValue),sliderValue=spacingSizes.findIndex((spacingSize=>String(spacingSize.slug)===slug));return-1!==sliderValue?sliderValue:NaN}(value,spacingSizes));const selectedUnit=(0,react.useMemo)((()=>parseQuantityAndUnitFromRawValue(currentValue)),[currentValue])[1]||units[0].value,customTooltipContent=newValue=>{var _spacingSizes$newValu;return void 0===value||null===(_spacingSizes$newValu=spacingSizes[newValue])||void 0===_spacingSizes$newValu?void 0:_spacingSizes$newValu.name},customRangeValue=parseInt(currentValue,10),getNewPresetValue=(newSize,controlType)=>{var _spacingSizes$newSize;const size=parseInt(newSize,10);if("selectList"===controlType){if(0===size)return;if(1===size)return"0"}else if(0===size)return"0";return`var:preset|spacing|${null===(_spacingSizes$newSize=spacingSizes[newSize])||void 0===_spacingSizes$newSize?void 0:_spacingSizes$newSize.slug}`},allPlaceholder=isMixed?(0,i18n_build_module.__)("Mixed"):null,currentValueHint=isMixed?(0,i18n_build_module.__)("Mixed"):customTooltipContent(currentValue),options=selectListSizes.map(((size,index)=>({key:index,name:size.name}))),marks=spacingSizes.map(((newValue,index)=>({value:index,label:void 0}))),ariaLabel=(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s %2$s"),utils_LABELS[side],null==type?void 0:type.toLowerCase()),showHint=showRangeControl&&!showCustomValueControl&&void 0!==currentValueHint;return(0,react.createElement)(react.Fragment,null,"all"!==side&&(0,react.createElement)(h_stack_component,{className:"components-spacing-sizes-control__side-labels"},(0,react.createElement)(text_component,{className:"components-spacing-sizes-control__side-label"},utils_LABELS[side]),showHint&&(0,react.createElement)(text_component,{className:"components-spacing-sizes-control__hint-single"},currentValueHint)),"all"===side&&showHint&&(0,react.createElement)(text_component,{className:"components-spacing-sizes-control__hint-all"},currentValueHint),!disableCustomSpacingSizes&&(0,react.createElement)(build_module_button,{label:showCustomValueControl?(0,i18n_build_module.__)("Use size preset"):(0,i18n_build_module.__)("Set custom size"),icon:library_settings,onClick:()=>{setShowCustomValueControl(!showCustomValueControl)},isPressed:showCustomValueControl,isSmall:!0,className:classnames_default()({"components-spacing-sizes-control__custom-toggle-all":"all"===side,"components-spacing-sizes-control__custom-toggle-single":"all"!==side}),iconSize:24}),showCustomValueControl&&(0,react.createElement)(react.Fragment,null,(0,react.createElement)(unit_control,{onChange:newSize=>onChange((newSize=>isNaN(parseFloat(newSize))?void 0:newSize)(newSize)),value:currentValue,units,min:minimumCustomValue,placeholder:allPlaceholder,disableUnits:isMixed,label:ariaLabel,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input"}),(0,react.createElement)(range_control,{value:customRangeValue,min:0,max:100,withInputField:!1,onChange:next=>{onChange([next,selectedUnit].join(""))},className:"components-spacing-sizes-control__custom-value-range"})),showRangeControl&&!showCustomValueControl&&(0,react.createElement)(range_control,{className:"components-spacing-sizes-control__range-control",value:currentValue,onChange:newSize=>onChange(getNewPresetValue(newSize)),onMouseDown:event=>{var _event$nativeEvent;(null==event||null===(_event$nativeEvent=event.nativeEvent)||void 0===_event$nativeEvent?void 0:_event$nativeEvent.offsetX)<35&&void 0===value&&onChange("0")},withInputField:!1,"aria-valuenow":currentValue,"aria-valuetext":null===(_spacingSizes$current=spacingSizes[currentValue])||void 0===_spacingSizes$current?void 0:_spacingSizes$current.name,renderTooltipContent:customTooltipContent,min:0,max:spacingSizes.length-1,marks,label:ariaLabel,hideLabelFromVision:!0}),!showRangeControl&&!showCustomValueControl&&(0,react.createElement)(CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:options.find((option=>option.key===currentValue))||"",onChange:selection=>{onChange(getNewPresetValue(selection.selectedItem.key,"selectList"))},options,label:ariaLabel,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0}))}function all_input_control_AllInputControl(_ref){let{onChange,values,sides,spacingSizes,type,minimumCustomValue}=_ref;const allValue=function getAllRawValue(){let values=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function utils_mode(arr){return arr.sort(((a,b)=>arr.filter((v=>v===a)).length-arr.filter((v=>v===b)).length)).pop()}(Object.values(values))}(values),isMixed=utils_isValuesDefined(values)&&utils_isValuesMixed(values,sides);return(0,react.createElement)(SpacingInputControl,{value:allValue,onChange:next=>{const nextValues=applyValueToSides(values,next,sides);onChange(nextValues)},side:"all",spacingSizes,isMixed,type,minimumCustomValue})}function input_controls_BoxInputControls(_ref){let{values,sides,onChange,spacingSizes,type,minimumCustomValue}=_ref;const filteredSides=null!=sides&&sides.length?utils_ALL_SIDES.filter((side=>sides.includes(side))):utils_ALL_SIDES,createHandleOnChange=side=>next=>{const nextValues={...values};nextValues[side]=next,onChange(nextValues)};return(0,react.createElement)(react.Fragment,null,filteredSides.map((side=>(0,react.createElement)(SpacingInputControl,{value:values[side],label:utils_LABELS[side],key:`spacing-sizes-control-${side}`,withInputField:!1,side,onChange:createHandleOnChange(side),spacingSizes,type,minimumCustomValue}))))}const axial_input_controls_groupedSides=["vertical","horizontal"];function axial_input_controls_AxialInputControls(_ref){let{onChange,values,sides,spacingSizes,type,minimumCustomValue}=_ref;const createHandleOnChange=side=>next=>{if(!onChange)return;const nextValues={...values};"vertical"===side&&(nextValues.top=next,nextValues.bottom=next),"horizontal"===side&&(nextValues.left=next,nextValues.right=next),onChange(nextValues)},filteredSides=null!=sides&&sides.length?axial_input_controls_groupedSides.filter((side=>sides.includes(side))):axial_input_controls_groupedSides;return(0,react.createElement)(react.Fragment,null,filteredSides.map((side=>{const axisValue="vertical"===side?values.top:values.left;return(0,react.createElement)(SpacingInputControl,{value:axisValue,onChange:createHandleOnChange(side),label:utils_LABELS[side],key:`spacing-sizes-control-${side}`,withInputField:!1,side,spacingSizes,type,minimumCustomValue})})))}function linked_button_LinkedButton(_ref){let{isLinked,onClick}=_ref;const label=isLinked?(0,i18n_build_module.__)("Unlink Sides"):(0,i18n_build_module.__)("Link Sides");return(0,react.createElement)(tooltip,{text:label},(0,react.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,react.createElement)(build_module_button,{variant:isLinked?"primary":"secondary",isSmall:!0,icon:isLinked?library_link:link_off,iconSize:16,"aria-label":label,onClick})))}function SpacingSizesControl(_ref){let{inputProps,onChange,label=(0,i18n_build_module.__)("Spacing Control"),values,sides,splitOnAxis=!1,useSelect,minimumCustomValue=0}=_ref;const spacingSizes=[{name:0,slug:"0",size:0},...use_setting_useSetting("spacing.spacingSizes")||[]];spacingSizes.length>8&&spacingSizes.unshift({name:(0,i18n_build_module.__)("Default"),slug:"default",size:void 0});const inputValues=values||utils_DEFAULT_VALUES,hasInitialValue=utils_isValuesDefined(values),hasOneSide=1===(null==sides?void 0:sides.length),[isLinked,setIsLinked]=(0,react.useState)(!hasInitialValue||!utils_isValuesMixed(inputValues,sides)||hasOneSide),inputControlProps={...inputProps,onChange:nextValue=>{const newValues={...values,...nextValue};onChange(newValues)},isLinked,sides,values:inputValues,spacingSizes,useSelect,type:label,minimumCustomValue};return(0,react.createElement)("fieldset",{role:"region",className:"component-spacing-sizes-control"},(0,react.createElement)(text_component,{as:"legend"},label),!hasOneSide&&(0,react.createElement)(linked_button_LinkedButton,{onClick:()=>{setIsLinked(!isLinked)},isLinked}),isLinked&&(0,react.createElement)(all_input_control_AllInputControl,(0,esm_extends.A)({"aria-label":label},inputControlProps)),!isLinked&&splitOnAxis&&(0,react.createElement)(axial_input_controls_AxialInputControls,inputControlProps),!isLinked&&!splitOnAxis&&(0,react.createElement)(input_controls_BoxInputControls,inputControlProps))}function hasMarginSupport(blockType){const support=(0,build_module.bI)(blockType,SPACING_SUPPORT_KEY);return!!(!0===support||null!=support&&support.margin)}function useIsMarginDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const isDisabled=!use_setting_useSetting("spacing.margin"),isInvalid=!useIsDimensionsSupportValid(blockName,"margin");return!hasMarginSupport(blockName)||isDisabled||isInvalid}function MarginEdit(props){var _style$spacing,_style$spacing2;const{name:blockName,attributes:{style},setAttributes}=props,spacingSizes=use_setting_useSetting("spacing.spacingSizes"),units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["%","px","em","rem","vw"]}),sides=useCustomSides(blockName,"margin"),splitOnAxis=sides&&sides.some((side=>AXIAL_SIDES.includes(side)));if(useIsMarginDisabled(props))return null;const onChange=next=>{const newStyle={...style,spacing:{...null==style?void 0:style.spacing,margin:next}};setAttributes({style:cleanEmptyObject(newStyle)})};return platform.select({web:(0,react.createElement)(react.Fragment,null,(!spacingSizes||0===(null==spacingSizes?void 0:spacingSizes.length))&&(0,react.createElement)(BoxControl,{values:null==style||null===(_style$spacing=style.spacing)||void 0===_style$spacing?void 0:_style$spacing.margin,onChange,label:(0,i18n_build_module.__)("Margin"),sides,units,allowReset:!1,splitOnAxis}),(null==spacingSizes?void 0:spacingSizes.length)>0&&(0,react.createElement)(SpacingSizesControl,{values:null==style||null===(_style$spacing2=style.spacing)||void 0===_style$spacing2?void 0:_style$spacing2.margin,onChange,label:(0,i18n_build_module.__)("Margin"),sides,units,allowReset:!1,splitOnAxis:!1})),native:null})}function MarginVisualizer(_ref2){var _attributes$style,_attributes$style$spa;let{clientId,attributes}=_ref2;const margin=null==attributes||null===(_attributes$style=attributes.style)||void 0===_attributes$style||null===(_attributes$style$spa=_attributes$style.spacing)||void 0===_attributes$style$spa?void 0:_attributes$style$spa.margin,spacingSizes=use_setting_useSetting("spacing.spacingSizes"),style=(0,react.useMemo)((()=>{const marginTop=null!=margin&&margin.top?getCustomValueFromPreset(null==margin?void 0:margin.top,spacingSizes):0,marginRight=null!=margin&&margin.right?getCustomValueFromPreset(null==margin?void 0:margin.right,spacingSizes):0,marginBottom=null!=margin&&margin.bottom?getCustomValueFromPreset(null==margin?void 0:margin.bottom,spacingSizes):0,marginLeft=null!=margin&&margin.left?getCustomValueFromPreset(null==margin?void 0:margin.left,spacingSizes):0;return{borderTopWidth:marginTop,borderRightWidth:marginRight,borderBottomWidth:marginBottom,borderLeftWidth:marginLeft,top:0!==marginTop?`-${marginTop}`:0,right:0!==marginRight?`-${marginRight}`:0,bottom:0!==marginBottom?`-${marginBottom}`:0,left:0!==marginLeft?`-${marginLeft}`:0}}),[margin]),[isActive,setIsActive]=(0,react.useState)(!1),valueRef=(0,react.useRef)(margin),timeoutRef=(0,react.useRef)(),clearTimer=()=>{timeoutRef.current&&window.clearTimeout(timeoutRef.current)};return(0,react.useEffect)((()=>((0,is_shallow_equal_build_module.Ay)(margin,valueRef.current)||(setIsActive(!0),valueRef.current=margin,clearTimer(),timeoutRef.current=setTimeout((()=>{setIsActive(!1)}),400)),()=>clearTimer())),[margin]),isActive?(0,react.createElement)(block_popover,{clientId,__unstableCoverTarget:!0,__unstableRefreshSize:margin},(0,react.createElement)("div",{className:"block-editor__padding-visualizer",style})):null}function hasPaddingSupport(blockType){const support=(0,build_module.bI)(blockType,SPACING_SUPPORT_KEY);return!!(!0===support||null!=support&&support.padding)}function useIsPaddingDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const isDisabled=!use_setting_useSetting("spacing.padding"),isInvalid=!useIsDimensionsSupportValid(blockName,"padding");return!hasPaddingSupport(blockName)||isDisabled||isInvalid}function PaddingEdit(props){var _style$spacing,_style$spacing2;const{name:blockName,attributes:{style},setAttributes}=props,spacingSizes=use_setting_useSetting("spacing.spacingSizes"),units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["%","px","em","rem","vw"]}),sides=useCustomSides(blockName,"padding"),splitOnAxis=sides&&sides.some((side=>AXIAL_SIDES.includes(side)));if(useIsPaddingDisabled(props))return null;const onChange=next=>{const newStyle={...style,spacing:{...null==style?void 0:style.spacing,padding:next}};setAttributes({style:cleanEmptyObject(newStyle)})};return platform.select({web:(0,react.createElement)(react.Fragment,null,(!spacingSizes||0===(null==spacingSizes?void 0:spacingSizes.length))&&(0,react.createElement)(BoxControl,{values:null==style||null===(_style$spacing=style.spacing)||void 0===_style$spacing?void 0:_style$spacing.padding,onChange,label:(0,i18n_build_module.__)("Padding"),sides,units,allowReset:!1,splitOnAxis}),(null==spacingSizes?void 0:spacingSizes.length)>0&&(0,react.createElement)(SpacingSizesControl,{values:null==style||null===(_style$spacing2=style.spacing)||void 0===_style$spacing2?void 0:_style$spacing2.padding,onChange,label:(0,i18n_build_module.__)("Padding"),sides,units,allowReset:!1,splitOnAxis})),native:null})}function PaddingVisualizer(_ref2){var _attributes$style,_attributes$style$spa;let{clientId,attributes}=_ref2;const padding=null==attributes||null===(_attributes$style=attributes.style)||void 0===_attributes$style||null===(_attributes$style$spa=_attributes$style.spacing)||void 0===_attributes$style$spa?void 0:_attributes$style$spa.padding,style=(0,react.useMemo)((()=>({borderTopWidth:isValueSpacingPreset(null==padding?void 0:padding.top)?getSpacingPresetCssVar(null==padding?void 0:padding.top):null==padding?void 0:padding.top,borderRightWidth:isValueSpacingPreset(null==padding?void 0:padding.right)?getSpacingPresetCssVar(null==padding?void 0:padding.right):null==padding?void 0:padding.right,borderBottomWidth:isValueSpacingPreset(null==padding?void 0:padding.bottom)?getSpacingPresetCssVar(null==padding?void 0:padding.bottom):null==padding?void 0:padding.bottom,borderLeftWidth:isValueSpacingPreset(null==padding?void 0:padding.left)?getSpacingPresetCssVar(null==padding?void 0:padding.left):null==padding?void 0:padding.left})),[padding]),[isActive,setIsActive]=(0,react.useState)(!1),valueRef=(0,react.useRef)(padding),timeoutRef=(0,react.useRef)(),clearTimer=()=>{timeoutRef.current&&window.clearTimeout(timeoutRef.current)};return(0,react.useEffect)((()=>((0,is_shallow_equal_build_module.Ay)(padding,valueRef.current)||(setIsActive(!0),valueRef.current=padding,clearTimer(),timeoutRef.current=setTimeout((()=>{setIsActive(!1)}),400)),()=>clearTimer())),[padding]),isActive?(0,react.createElement)(block_popover,{clientId,__unstableCoverTarget:!0,__unstableRefreshSize:padding},(0,react.createElement)("div",{className:"block-editor__padding-visualizer",style})):null}const SPACING_SUPPORT_KEY="spacing",dimensions_ALL_SIDES=["top","right","bottom","left"],AXIAL_SIDES=["vertical","horizontal"];function DimensionsPanel(props){const isGapDisabled=useIsGapDisabled(props),isPaddingDisabled=useIsPaddingDisabled(props),isMarginDisabled=useIsMarginDisabled(props),isDisabled=useIsDimensionsDisabled(props),isSupported=function hasDimensionsSupport(blockName){if("web"!==platform.OS)return!1;return hasGapSupport(blockName)||hasPaddingSupport(blockName)||hasMarginSupport(blockName)}(props.name),spacingSizes=use_setting_useSetting("spacing.spacingSizes");if(isDisabled||!isSupported)return null;const defaultSpacingControls=(0,build_module.bI)(props.name,[SPACING_SUPPORT_KEY,"__experimentalDefaultControls"]),createResetAllFilter=attribute=>newAttributes=>{var _newAttributes$style;return{...newAttributes,style:{...newAttributes.style,spacing:{...null===(_newAttributes$style=newAttributes.style)||void 0===_newAttributes$style?void 0:_newAttributes$style.spacing,[attribute]:void 0}}}};return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(inspector_controls,{__experimentalGroup:"dimensions"},!isPaddingDisabled&&(0,react.createElement)(tools_panel_item_component,{className:classnames_default()({"tools-panel-item-spacing":spacingSizes&&spacingSizes.length>0}),hasValue:()=>function hasPaddingValue(props){var _props$attributes$sty,_props$attributes$sty2;return void 0!==(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.spacing)||void 0===_props$attributes$sty2?void 0:_props$attributes$sty2.padding)}(props),label:(0,i18n_build_module.__)("Padding"),onDeselect:()=>function resetPadding(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,spacing:{...null==style?void 0:style.spacing,padding:void 0}})})}(props),resetAllFilter:createResetAllFilter("padding"),isShownByDefault:null==defaultSpacingControls?void 0:defaultSpacingControls.padding,panelId:props.clientId},(0,react.createElement)(PaddingEdit,props)),!isMarginDisabled&&(0,react.createElement)(tools_panel_item_component,{className:classnames_default()({"tools-panel-item-spacing":spacingSizes&&spacingSizes.length>0}),hasValue:()=>function hasMarginValue(props){var _props$attributes$sty,_props$attributes$sty2;return void 0!==(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.spacing)||void 0===_props$attributes$sty2?void 0:_props$attributes$sty2.margin)}(props),label:(0,i18n_build_module.__)("Margin"),onDeselect:()=>function resetMargin(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,spacing:{...null==style?void 0:style.spacing,margin:void 0}})})}(props),resetAllFilter:createResetAllFilter("margin"),isShownByDefault:null==defaultSpacingControls?void 0:defaultSpacingControls.margin,panelId:props.clientId},(0,react.createElement)(MarginEdit,props)),!isGapDisabled&&(0,react.createElement)(tools_panel_item_component,{hasValue:()=>function hasGapValue(props){var _props$attributes$sty,_props$attributes$sty2;return void 0!==(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.spacing)||void 0===_props$attributes$sty2?void 0:_props$attributes$sty2.blockGap)}(props),label:(0,i18n_build_module.__)("Block spacing"),onDeselect:()=>function resetGap(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:{...style,spacing:{...null==style?void 0:style.spacing,blockGap:void 0}}})}(props),resetAllFilter:createResetAllFilter("blockGap"),isShownByDefault:null==defaultSpacingControls?void 0:defaultSpacingControls.blockGap,panelId:props.clientId},(0,react.createElement)(GapEdit,props))),!isPaddingDisabled&&(0,react.createElement)(PaddingVisualizer,props),!isMarginDisabled&&(0,react.createElement)(MarginVisualizer,props))}const useIsDimensionsDisabled=function(){let props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const gapDisabled=useIsGapDisabled(props),paddingDisabled=useIsPaddingDisabled(props),marginDisabled=useIsMarginDisabled(props);return gapDisabled&&paddingDisabled&&marginDisabled};function useCustomSides(blockName,feature){var _support$feature;const support=(0,build_module.bI)(blockName,SPACING_SUPPORT_KEY);if(support&&"boolean"!=typeof support[feature])return Array.isArray(support[feature])?support[feature]:null!==(_support$feature=support[feature])&&void 0!==_support$feature&&_support$feature.sides?support[feature].sides:void 0}function useIsDimensionsSupportValid(blockName,feature){const sides=useCustomSides(blockName,feature);return!(sides&&sides.some((side=>dimensions_ALL_SIDES.includes(side)))&&sides.some((side=>AXIAL_SIDES.includes(side))))||(console.warn(`The ${feature} support for the "${blockName}" block can not be configured to support both axial and arbitrary sides.`),!1)}function hasGapSupport(blockType){const support=(0,build_module.bI)(blockType,SPACING_SUPPORT_KEY);return!!(!0===support||null!=support&&support.blockGap)}function getGapBoxControlValueFromStyle(blockGapValue){if(!blockGapValue)return null;const isValueString="string"==typeof blockGapValue;return{top:getSpacingPresetCssVar(isValueString?blockGapValue:null==blockGapValue?void 0:blockGapValue.top),left:getSpacingPresetCssVar(isValueString?blockGapValue:null==blockGapValue?void 0:blockGapValue.left)}}function useIsGapDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const isDisabled=!use_setting_useSetting("spacing.blockGap");return!hasGapSupport(blockName)||isDisabled}function GapEdit(props){var _style$spacing;const{clientId,attributes:{style},name:blockName,setAttributes}=props,units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["%","px","em","rem","vw"]}),sides=useCustomSides(blockName,"blockGap"),ref=useBlockRef(clientId);if(useIsGapDisabled(props))return null;const splitOnAxis=sides&&sides.some((side=>AXIAL_SIDES.includes(side))),onChange=next=>{var _window;let blockGap=next;next&&splitOnAxis&&(blockGap={...getGapBoxControlValueFromStyle(next)});const newStyle={...style,spacing:{...null==style?void 0:style.spacing,blockGap}};setAttributes({style:cleanEmptyObject(newStyle)});const isSafari=(null===(_window=window)||void 0===_window?void 0:_window.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var _ref$current$parentNo;ref.current&&isSafari&&(null===(_ref$current$parentNo=ref.current.parentNode)||void 0===_ref$current$parentNo||_ref$current$parentNo.replaceChild(ref.current,ref.current))},gapValue=getGapBoxControlValueFromStyle(null==style||null===(_style$spacing=style.spacing)||void 0===_style$spacing?void 0:_style$spacing.blockGap),boxControlGapValue=splitOnAxis?{...gapValue,right:null==gapValue?void 0:gapValue.left,bottom:null==gapValue?void 0:gapValue.top}:null==gapValue?void 0:gapValue.top;return platform.select({web:(0,react.createElement)(react.Fragment,null,splitOnAxis?(0,react.createElement)(BoxControl,{label:(0,i18n_build_module.__)("Block spacing"),min:0,onChange,units,sides,values:boxControlGapValue,allowReset:!1,splitOnAxis}):(0,react.createElement)(unit_control,{label:(0,i18n_build_module.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange,units,value:boxControlGapValue})),native:null})}const alignBottom=(0,react.createElement)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(svg.wA,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),alignCenter=(0,react.createElement)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(svg.wA,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),BLOCK_ALIGNMENTS_CONTROLS={top:{icon:(0,react.createElement)(svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(svg.wA,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,i18n_build_module._x)("Align top","Block vertical alignment setting")},center:{icon:alignCenter,title:(0,i18n_build_module._x)("Align middle","Block vertical alignment setting")},bottom:{icon:alignBottom,title:(0,i18n_build_module._x)("Align bottom","Block vertical alignment setting")}},DEFAULT_CONTROLS=["top","center","bottom"],POPOVER_PROPS={isAlternate:!0};const ui=function ui_BlockVerticalAlignmentUI(_ref){let{value,onChange,controls=DEFAULT_CONTROLS,isCollapsed=!0,isToolbar}=_ref;const activeAlignment=BLOCK_ALIGNMENTS_CONTROLS[value],defaultAlignmentControl=BLOCK_ALIGNMENTS_CONTROLS.top,UIComponent=isToolbar?toolbar_group:toolbar_dropdown_menu,extraProps=isToolbar?{isCollapsed}:{};return(0,react.createElement)(UIComponent,(0,esm_extends.A)({popoverProps:POPOVER_PROPS,icon:activeAlignment?activeAlignment.icon:defaultAlignmentControl.icon,label:(0,i18n_build_module._x)("Change vertical alignment","Block vertical alignment setting label"),controls:controls.map((control=>{return{...BLOCK_ALIGNMENTS_CONTROLS[control],isActive:value===control,role:isCollapsed?"menuitemradio":void 0,onClick:(align=control,()=>onChange(value===align?void 0:align))};var align}))},extraProps))},BlockVerticalAlignmentControl=props=>(0,react.createElement)(ui,(0,esm_extends.A)({},props,{isToolbar:!1})),icons={left:justify_left,center:justify_center,right:justify_right,"space-between":justify_space_between};const justify_content_control_ui=function ui_JustifyContentUI(_ref){let{allowedControls=["left","center","right","space-between"],isCollapsed=!0,onChange,value,popoverProps,isToolbar}=_ref;const handleClick=next=>{onChange(next===value?void 0:next)},icon=value?icons[value]:icons.left,allControls=[{name:"left",icon:justify_left,title:(0,i18n_build_module.__)("Justify items left"),isActive:"left"===value,onClick:()=>handleClick("left")},{name:"center",icon:justify_center,title:(0,i18n_build_module.__)("Justify items center"),isActive:"center"===value,onClick:()=>handleClick("center")},{name:"right",icon:justify_right,title:(0,i18n_build_module.__)("Justify items right"),isActive:"right"===value,onClick:()=>handleClick("right")},{name:"space-between",icon:justify_space_between,title:(0,i18n_build_module.__)("Space between items"),isActive:"space-between"===value,onClick:()=>handleClick("space-between")}],UIComponent=isToolbar?toolbar_group:toolbar_dropdown_menu,extraProps=isToolbar?{isCollapsed}:{};return(0,react.createElement)(UIComponent,(0,esm_extends.A)({icon,popoverProps,label:(0,i18n_build_module.__)("Change items justification"),controls:allControls.filter((elem=>allowedControls.includes(elem.name)))},extraProps))},JustifyContentControl=props=>(0,react.createElement)(justify_content_control_ui,(0,esm_extends.A)({},props,{isToolbar:!1})),justifyContentMap={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},alignItemsMap={left:"flex-start",right:"flex-end",center:"center"},verticalAlignmentMap={top:"flex-start",center:"center",bottom:"flex-end"},flexWrapOptions=["wrap","nowrap"],flex={name:"flex",label:(0,i18n_build_module.__)("Flex"),inspectorControls:function FlexLayoutInspectorControls(_ref){let{layout={},onChange,layoutBlockSupport={}}=_ref;const{allowOrientation=!0}=layoutBlockSupport;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(flex_component,null,(0,react.createElement)(flex_item_component,null,(0,react.createElement)(FlexLayoutJustifyContentControl,{layout,onChange})),(0,react.createElement)(flex_item_component,null,allowOrientation&&(0,react.createElement)(OrientationControl,{layout,onChange}))),(0,react.createElement)(FlexWrapControl,{layout,onChange}))},toolBarControls:function FlexLayoutToolbarControls(_ref2){let{layout={},onChange,layoutBlockSupport}=_ref2;if(null!=layoutBlockSupport&&layoutBlockSupport.allowSwitching)return null;const{allowVerticalAlignment=!0}=layoutBlockSupport;return(0,react.createElement)(block_controls,{group:"block",__experimentalShareWithChildBlocks:!0},(0,react.createElement)(FlexLayoutJustifyContentControl,{layout,onChange,isToolbar:!0}),allowVerticalAlignment&&"vertical"!==(null==layout?void 0:layout.orientation)&&(0,react.createElement)(FlexLayoutVerticalAlignmentControl,{layout,onChange,isToolbar:!0}))},getLayoutStyle:function getLayoutStyle(_ref3){var _style$spacing,_style$spacing2;let{selector,layout,style,blockName,hasBlockGapSupport,layoutDefinitions}=_ref3;const{orientation="horizontal"}=layout,blockGapValue=null!=style&&null!==(_style$spacing=style.spacing)&&void 0!==_style$spacing&&_style$spacing.blockGap&&!shouldSkipSerialization(blockName,"spacing","blockGap")?function getGapCSSValue(blockGapValue){let defaultValue=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const blockGapBoxControlValue=getGapBoxControlValueFromStyle(blockGapValue);if(!blockGapBoxControlValue)return null;const row=(null==blockGapBoxControlValue?void 0:blockGapBoxControlValue.top)||defaultValue,column=(null==blockGapBoxControlValue?void 0:blockGapBoxControlValue.left)||defaultValue;return row===column?row:`${row} ${column}`}(null==style||null===(_style$spacing2=style.spacing)||void 0===_style$spacing2?void 0:_style$spacing2.blockGap,"0.5em"):void 0,justifyContent=justifyContentMap[layout.justifyContent],flexWrap=flexWrapOptions.includes(layout.flexWrap)?layout.flexWrap:"wrap",verticalAlignment=verticalAlignmentMap[layout.verticalAlignment],alignItems=alignItemsMap[layout.justifyContent]||alignItemsMap.left;let output="";const rules=[];return flexWrap&&"wrap"!==flexWrap&&rules.push(`flex-wrap: ${flexWrap}`),"horizontal"===orientation?(verticalAlignment&&rules.push(`align-items: ${verticalAlignment}`),justifyContent&&rules.push(`justify-content: ${justifyContent}`)):(rules.push("flex-direction: column"),rules.push(`align-items: ${alignItems}`)),rules.length&&(output=`${appendSelectors(selector)} {\n\t\t\t\t${rules.join("; ")};\n\t\t\t}`),hasBlockGapSupport&&blockGapValue&&(output+=getBlockGapCSS(selector,layoutDefinitions,"flex",blockGapValue)),output},getOrientation(layout){const{orientation="horizontal"}=layout;return orientation},getAlignments:()=>[]};function FlexLayoutVerticalAlignmentControl(_ref4){let{layout,onChange,isToolbar=!1}=_ref4;const{verticalAlignment=verticalAlignmentMap.center}=layout,onVerticalAlignmentChange=value=>{onChange({...layout,verticalAlignment:value})};if(isToolbar)return(0,react.createElement)(BlockVerticalAlignmentControl,{onChange:onVerticalAlignmentChange,value:verticalAlignment});const verticalAlignmentOptions=[{value:"flex-start",label:(0,i18n_build_module.__)("Align items top")},{value:"center",label:(0,i18n_build_module.__)("Align items center")},{value:"flex-end",label:(0,i18n_build_module.__)("Align items bottom")}];return(0,react.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,react.createElement)("legend",null,(0,i18n_build_module.__)("Vertical alignment")),(0,react.createElement)("div",null,verticalAlignmentOptions.map(((value,icon,label)=>(0,react.createElement)(build_module_button,{key:value,label,icon,isPressed:verticalAlignment===value,onClick:()=>onVerticalAlignmentChange(value)})))))}function FlexLayoutJustifyContentControl(_ref5){let{layout,onChange,isToolbar=!1}=_ref5;const{justifyContent="left",orientation="horizontal"}=layout,onJustificationChange=value=>{onChange({...layout,justifyContent:value})},allowedControls=["left","center","right"];if("horizontal"===orientation&&allowedControls.push("space-between"),isToolbar)return(0,react.createElement)(JustifyContentControl,{allowedControls,value:justifyContent,onChange:onJustificationChange,popoverProps:{position:"bottom right",isAlternate:!0}});const justificationOptions=[{value:"left",icon:justify_left,label:(0,i18n_build_module.__)("Justify items left")},{value:"center",icon:justify_center,label:(0,i18n_build_module.__)("Justify items center")},{value:"right",icon:justify_right,label:(0,i18n_build_module.__)("Justify items right")}];return"horizontal"===orientation&&justificationOptions.push({value:"space-between",icon:justify_space_between,label:(0,i18n_build_module.__)("Space between items")}),(0,react.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,react.createElement)("legend",null,(0,i18n_build_module.__)("Justification")),(0,react.createElement)("div",null,justificationOptions.map((_ref6=>{let{value,icon,label}=_ref6;return(0,react.createElement)(build_module_button,{key:value,label,icon,isPressed:justifyContent===value,onClick:()=>onJustificationChange(value)})}))))}function FlexWrapControl(_ref7){let{layout,onChange}=_ref7;const{flexWrap="wrap"}=layout;return(0,react.createElement)(ToggleControl,{label:(0,i18n_build_module.__)("Allow to wrap to multiple lines"),onChange:value=>{onChange({...layout,flexWrap:value?"wrap":"nowrap"})},checked:"wrap"===flexWrap})}function OrientationControl(_ref8){let{layout,onChange}=_ref8;const{orientation="horizontal"}=layout;return(0,react.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,react.createElement)("legend",null,(0,i18n_build_module.__)("Orientation")),(0,react.createElement)(build_module_button,{label:(0,i18n_build_module.__)("Horizontal"),icon:arrow_right,isPressed:"horizontal"===orientation,onClick:()=>onChange({...layout,orientation:"horizontal"})}),(0,react.createElement)(build_module_button,{label:(0,i18n_build_module.__)("Vertical"),icon:arrow_down,isPressed:"vertical"===orientation,onClick:()=>onChange({...layout,orientation:"vertical"})}))}const flow={name:"default",label:(0,i18n_build_module.__)("Flow"),inspectorControls:function DefaultLayoutInspectorControls(){return null},toolBarControls:function DefaultLayoutToolbarControls(){return null},getLayoutStyle:function getLayoutStyle(_ref){var _style$spacing;let{selector,style,blockName,hasBlockGapSupport,layoutDefinitions}=_ref;const blockGapStyleValue=getGapBoxControlValueFromStyle(null==style||null===(_style$spacing=style.spacing)||void 0===_style$spacing?void 0:_style$spacing.blockGap),blockGapValue=null!=blockGapStyleValue&&blockGapStyleValue.top&&!shouldSkipSerialization(blockName,"spacing","blockGap")?null==blockGapStyleValue?void 0:blockGapStyleValue.top:"";let output="";return hasBlockGapSupport&&blockGapValue&&(output+=getBlockGapCSS(selector,layoutDefinitions,"default",blockGapValue)),output},getOrientation:()=>"vertical",getAlignments(layout){const alignmentInfo=getAlignmentsInfo(layout);if(void 0!==layout.alignments)return layout.alignments.includes("none")||layout.alignments.unshift("none"),layout.alignments.map((alignment=>({name:alignment,info:alignmentInfo[alignment]})));const{contentSize,wideSize}=layout,alignments=[{name:"left"},{name:"center"},{name:"right"}];return contentSize&&alignments.unshift({name:"full"}),wideSize&&alignments.unshift({name:"wide",info:alignmentInfo.wide}),alignments.unshift({name:"none",info:alignmentInfo.none}),alignments}},position_center=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})),stretch_wide=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})),VARIABLE_REFERENCE_PREFIX="var:",VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE="|",VARIABLE_PATH_SEPARATOR_TOKEN_STYLE="--";function generateRule(style,options,path,ruleKey){const styleValue=(0,lodash.get)(style,path);return styleValue?[{selector:null==options?void 0:options.selector,key:ruleKey,value:getCSSVarFromStyleValue(styleValue)}]:[]}function generateBoxRules(style,options,path,ruleKeys){let individualProperties=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["top","right","bottom","left"];const boxStyle=(0,lodash.get)(style,path);if(!boxStyle)return[];const rules=[];if("string"==typeof boxStyle)rules.push({selector:null==options?void 0:options.selector,key:ruleKeys.default,value:boxStyle});else{const sideRules=individualProperties.reduce(((acc,side)=>{const value=getCSSVarFromStyleValue((0,lodash.get)(boxStyle,[side]));return value&&acc.push({selector:null==options?void 0:options.selector,key:null==ruleKeys?void 0:ruleKeys.individual.replace("%s",upperFirst(side)),value}),acc}),[]);rules.push(...sideRules)}return rules}function getCSSVarFromStyleValue(styleValue){if("string"==typeof styleValue&&styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)){return`var(--wp--${styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE)})`}return styleValue}function upperFirst(_ref){let[firstLetter,...rest]=_ref;return firstLetter.toUpperCase()+rest.join("")}const color={name:"color",generate:function(style,options){return generateRule(style,options,arguments.length>2&&void 0!==arguments[2]?arguments[2]:["border","color"],arguments.length>3&&void 0!==arguments[3]?arguments[3]:"borderColor")}},radius={name:"radius",generate:(style,options)=>generateBoxRules(style,options,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])},borderStyle={name:"style",generate:function(style,options){return generateRule(style,options,arguments.length>2&&void 0!==arguments[2]?arguments[2]:["border","style"],arguments.length>3&&void 0!==arguments[3]?arguments[3]:"borderStyle")}},width={name:"width",generate:function(style,options){return generateRule(style,options,arguments.length>2&&void 0!==arguments[2]?arguments[2]:["border","width"],arguments.length>3&&void 0!==arguments[3]?arguments[3]:"borderWidth")}},borderDefinitionsWithIndividualStyles=[color,borderStyle,width],createBorderGenerateFunction=individualProperty=>(style,options)=>{var _style$border;const styleValue=null==style||null===(_style$border=style.border)||void 0===_style$border?void 0:_style$border[individualProperty];return styleValue?borderDefinitionsWithIndividualStyles.reduce(((acc,borderDefinition)=>{const key=borderDefinition.name;if(styleValue.hasOwnProperty(key)&&"function"==typeof borderDefinition.generate){const ruleKey=`border${upperFirst(individualProperty)}${upperFirst(key)}`;acc.push(...borderDefinition.generate(style,options,["border",individualProperty,key],ruleKey))}return acc}),[]):[]},borderTop={name:"borderTop",generate:createBorderGenerateFunction("top")},borderRight={name:"borderRight",generate:createBorderGenerateFunction("right")},borderBottom={name:"borderBottom",generate:createBorderGenerateFunction("bottom")},borderLeft={name:"borderLeft",generate:createBorderGenerateFunction("left")},background={name:"background",generate:(style,options)=>generateRule(style,options,["color","background"],"backgroundColor")},gradient={name:"gradient",generate:(style,options)=>generateRule(style,options,["color","gradient"],"background")},text_text={name:"text",generate:(style,options)=>generateRule(style,options,["color","text"],"color")},padding={name:"padding",generate:(style,options)=>generateBoxRules(style,options,["spacing","padding"],{default:"padding",individual:"padding%s"})},margin={name:"margin",generate:(style,options)=>generateBoxRules(style,options,["spacing","margin"],{default:"margin",individual:"margin%s"})},fontSize={name:"fontSize",generate:(style,options)=>generateRule(style,options,["typography","fontSize"],"fontSize")},fontStyle={name:"fontStyle",generate:(style,options)=>generateRule(style,options,["typography","fontStyle"],"fontStyle")},fontWeight={name:"fontWeight",generate:(style,options)=>generateRule(style,options,["typography","fontWeight"],"fontWeight")},fontFamily={name:"fontFamily",generate:(style,options)=>generateRule(style,options,["typography","fontFamily"],"fontFamily")},letterSpacing={name:"letterSpacing",generate:(style,options)=>generateRule(style,options,["typography","letterSpacing"],"letterSpacing")},lineHeight={name:"letterSpacing",generate:(style,options)=>generateRule(style,options,["typography","lineHeight"],"lineHeight")},textDecoration={name:"textDecoration",generate:(style,options)=>generateRule(style,options,["typography","textDecoration"],"textDecoration")},textTransform={name:"textTransform",generate:(style,options)=>generateRule(style,options,["typography","textTransform"],"textTransform")},styleDefinitions=[...[...borderDefinitionsWithIndividualStyles,radius,borderTop,borderRight,borderBottom,borderLeft],...[text_text,gradient,background],...[margin,padding],...[fontFamily,fontSize,fontStyle,fontWeight,letterSpacing,lineHeight,textDecoration,textTransform]];function compileCSS(style){let options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const rules=getCSSRules(style,options);if(null==options||!options.selector){const inlineRules=[];return rules.forEach((rule=>{inlineRules.push(`${(0,lodash.kebabCase)(rule.key)}: ${rule.value};`)})),inlineRules.join(" ")}const groupedRules=(0,lodash.groupBy)(rules,"selector");return Object.keys(groupedRules).reduce(((acc,subSelector)=>(acc.push(`${subSelector} { ${groupedRules[subSelector].map((rule=>`${(0,lodash.kebabCase)(rule.key)}: ${rule.value};`)).join(" ")} }`),acc)),[]).join("\n")}function getCSSRules(style){let options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const rules=[];return styleDefinitions.forEach((definition=>{"function"==typeof definition.generate&&rules.push(...definition.generate(style,options))})),rules}const constrained={name:"constrained",label:(0,i18n_build_module.__)("Constrained"),inspectorControls:function DefaultLayoutInspectorControls(_ref){let{layout,onChange}=_ref;const{wideSize,contentSize}=layout,units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["%","px","em","rem","vw"]});return(0,react.createElement)(react.Fragment,null,(0,react.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,react.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,react.createElement)(unit_control,{label:(0,i18n_build_module.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:contentSize||wideSize||"",onChange:nextWidth=>{nextWidth=0>parseFloat(nextWidth)?"0":nextWidth,onChange({...layout,contentSize:nextWidth})},units}),(0,react.createElement)(icon,{icon:position_center})),(0,react.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,react.createElement)(unit_control,{label:(0,i18n_build_module.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:wideSize||contentSize||"",onChange:nextWidth=>{nextWidth=0>parseFloat(nextWidth)?"0":nextWidth,onChange({...layout,wideSize:nextWidth})},units}),(0,react.createElement)(icon,{icon:stretch_wide}))),(0,react.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,react.createElement)(build_module_button,{variant:"secondary",isSmall:!0,disabled:!contentSize&&!wideSize,onClick:()=>onChange({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,i18n_build_module.__)("Reset"))),(0,react.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,i18n_build_module.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function DefaultLayoutToolbarControls(){return null},getLayoutStyle:function getLayoutStyle(_ref2){var _style$spacing,_style$spacing2;let{selector,layout={},style,blockName,hasBlockGapSupport,layoutDefinitions}=_ref2;const{contentSize,wideSize}=layout,blockGapStyleValue=getGapBoxControlValueFromStyle(null==style||null===(_style$spacing=style.spacing)||void 0===_style$spacing?void 0:_style$spacing.blockGap),blockGapValue=null!=blockGapStyleValue&&blockGapStyleValue.top&&!shouldSkipSerialization(blockName,"spacing","blockGap")?null==blockGapStyleValue?void 0:blockGapStyleValue.top:"";let output=contentSize||wideSize?`\n\t\t\t\t\t${appendSelectors(selector,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=contentSize?contentSize:wideSize};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\t\t\t\t\t${appendSelectors(selector,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=wideSize?wideSize:contentSize};\n\t\t\t\t\t}\n\t\t\t\t\t${appendSelectors(selector,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if(null!=style&&null!==(_style$spacing2=style.spacing)&&void 0!==_style$spacing2&&_style$spacing2.padding){getCSSRules(style).forEach((rule=>{"paddingRight"===rule.key?output+=`\n\t\t\t\t\t${appendSelectors(selector,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${rule.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===rule.key&&(output+=`\n\t\t\t\t\t${appendSelectors(selector,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${rule.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return hasBlockGapSupport&&blockGapValue&&(output+=getBlockGapCSS(selector,layoutDefinitions,"constrained",blockGapValue)),output},getOrientation:()=>"vertical",getAlignments(layout){const alignmentInfo=getAlignmentsInfo(layout);if(void 0!==layout.alignments)return layout.alignments.includes("none")||layout.alignments.unshift("none"),layout.alignments.map((alignment=>({name:alignment,info:alignmentInfo[alignment]})));const{contentSize,wideSize}=layout,alignments=[{name:"left"},{name:"center"},{name:"right"}];return contentSize&&alignments.unshift({name:"full"}),wideSize&&alignments.unshift({name:"wide",info:alignmentInfo.wide}),alignments.unshift({name:"none",info:alignmentInfo.none}),alignments}},layoutTypes=[flow,flex,constrained];function getLayoutType(){let name=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return layoutTypes.find((layoutType=>layoutType.name===name))}const defaultLayout={type:"default"},layout_Layout=(0,react.createContext)(defaultLayout),LayoutProvider=layout_Layout.Provider;function LayoutStyle(_ref){let{layout={},css,...props}=_ref;const layoutType=getLayoutType(layout.type),hasBlockGapSupport=null!==use_setting_useSetting("spacing.blockGap");if(layoutType){var _layoutType$getLayout;if(css)return(0,react.createElement)("style",null,css);const layoutStyle=null===(_layoutType$getLayout=layoutType.getLayoutStyle)||void 0===_layoutType$getLayout?void 0:_layoutType$getLayout.call(layoutType,{hasBlockGapSupport,layout,...props});if(layoutStyle)return(0,react.createElement)("style",null,layoutStyle)}return null}const use_available_alignments_DEFAULT_CONTROLS=["none","left","center","right","wide","full"],WIDE_CONTROLS=["wide","full"];function useAvailableAlignments(){let controls=arguments.length>0&&void 0!==arguments[0]?arguments[0]:use_available_alignments_DEFAULT_CONTROLS;controls.includes("none")||(controls=["none",...controls]);const{wideControlsEnabled=!1,themeSupportsLayout}=use_select_useSelect((select=>{const{getSettings}=select(store_store),settings=getSettings();return{wideControlsEnabled:settings.alignWide,themeSupportsLayout:settings.supportsLayout}}),[]),layout=function useLayout(){return(0,react.useContext)(layout_Layout)}(),layoutType=getLayoutType(null==layout?void 0:layout.type),layoutAlignments=layoutType.getAlignments(layout);if(themeSupportsLayout){const alignments=layoutAlignments.filter((_ref=>{let{name:alignmentName}=_ref;return controls.includes(alignmentName)}));return 1===alignments.length&&"none"===alignments[0].name?[]:alignments}if("default"!==layoutType.name&&"constrained"!==layoutType.name)return[];const{alignments:availableAlignments=use_available_alignments_DEFAULT_CONTROLS}=layout,enabledControls=controls.filter((control=>(layout.alignments||wideControlsEnabled||!WIDE_CONTROLS.includes(control))&&availableAlignments.includes(control))).map((enabledControl=>({name:enabledControl})));return 1===enabledControls.length&&"none"===enabledControls[0].name?[]:enabledControls}const align_none=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})),position_left=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})),position_right=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})),stretch_full_width=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})),constants_BLOCK_ALIGNMENTS_CONTROLS={none:{icon:align_none,title:(0,i18n_build_module._x)("None","Alignment option")},left:{icon:position_left,title:(0,i18n_build_module.__)("Align left")},center:{icon:position_center,title:(0,i18n_build_module.__)("Align center")},right:{icon:position_right,title:(0,i18n_build_module.__)("Align right")},wide:{icon:stretch_wide,title:(0,i18n_build_module.__)("Wide width")},full:{icon:stretch_full_width,title:(0,i18n_build_module.__)("Full width")}},constants_POPOVER_PROPS={isAlternate:!0};const block_alignment_control_ui=function ui_BlockAlignmentUI(_ref){let{value,onChange,controls,isToolbar,isCollapsed=!0}=_ref;const enabledControls=useAvailableAlignments(controls);if(!!!enabledControls.length)return null;function onChangeAlignment(align){onChange([value,"none"].includes(align)?void 0:align)}const activeAlignmentControl=constants_BLOCK_ALIGNMENTS_CONTROLS[value],defaultAlignmentControl=constants_BLOCK_ALIGNMENTS_CONTROLS.none,UIComponent=isToolbar?toolbar_group:toolbar_dropdown_menu,commonProps={popoverProps:constants_POPOVER_PROPS,icon:activeAlignmentControl?activeAlignmentControl.icon:defaultAlignmentControl.icon,label:(0,i18n_build_module.__)("Align"),toggleProps:{describedBy:(0,i18n_build_module.__)("Change alignment")}},extraProps=isToolbar?{isCollapsed,controls:enabledControls.map((_ref2=>{let{name:controlName}=_ref2;return{...constants_BLOCK_ALIGNMENTS_CONTROLS[controlName],isActive:value===controlName||!value&&"none"===controlName,role:isCollapsed?"menuitemradio":void 0,onClick:()=>onChangeAlignment(controlName)}}))}:{children:_ref3=>{let{onClose}=_ref3;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(menu_group,{className:"block-editor-block-alignment-control__menu-group"},enabledControls.map((_ref4=>{let{name:controlName,info}=_ref4;const{icon,title}=constants_BLOCK_ALIGNMENTS_CONTROLS[controlName],isSelected=controlName===value||!value&&"none"===controlName;return(0,react.createElement)(menu_item,{key:controlName,icon,iconPosition:"left",className:classnames_default()("components-dropdown-menu__menu-item",{"is-active":isSelected}),isSelected,onClick:()=>{onChangeAlignment(controlName),onClose()},role:"menuitemradio",info},title)}))))}};return(0,react.createElement)(UIComponent,(0,esm_extends.A)({},commonProps,extraProps))},BlockAlignmentControl=props=>(0,react.createElement)(block_alignment_control_ui,(0,esm_extends.A)({},props,{isToolbar:!1})),ALL_ALIGNMENTS=["left","center","right","wide","full"],WIDE_ALIGNMENTS=["wide","full"];function getValidAlignments(blockAlign){let validAlignments,hasWideBlockSupport=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],hasWideEnabled=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return validAlignments=Array.isArray(blockAlign)?ALL_ALIGNMENTS.filter((value=>blockAlign.includes(value))):!0===blockAlign?[...ALL_ALIGNMENTS]:[],!hasWideEnabled||!0===blockAlign&&!hasWideBlockSupport?(0,lodash.without)(validAlignments,...WIDE_ALIGNMENTS):validAlignments}const withToolbarControls=(0,create_higher_order_component.f)((BlockEdit=>props=>{const{name:blockName}=props,validAlignments=useAvailableAlignments(getValidAlignments((0,build_module.bI)(blockName,"align"),(0,build_module.pN)(blockName,"alignWide",!0))).map((_ref=>{let{name}=_ref;return name}));return(0,react.createElement)(react.Fragment,null,!!validAlignments.length&&(0,react.createElement)(block_controls,{group:"block",__experimentalShareWithChildBlocks:!0},(0,react.createElement)(BlockAlignmentControl,{value:props.attributes.align,onChange:nextAlign=>{if(!nextAlign){var _blockType$attributes,_blockType$attributes2;const blockType=(0,build_module.E7)(props.name);(null==blockType||null===(_blockType$attributes=blockType.attributes)||void 0===_blockType$attributes||null===(_blockType$attributes2=_blockType$attributes.align)||void 0===_blockType$attributes2?void 0:_blockType$attributes2.default)&&(nextAlign="")}props.setAttributes({align:nextAlign})},controls:validAlignments})),(0,react.createElement)(BlockEdit,props))}),"withToolbarControls"),withDataAlign=(0,create_higher_order_component.f)((BlockListBlock=>props=>{const{name,attributes}=props,{align}=attributes,validAlignments=useAvailableAlignments(getValidAlignments((0,build_module.bI)(name,"align"),(0,build_module.pN)(name,"alignWide",!0)));if(void 0===align)return(0,react.createElement)(BlockListBlock,props);let wrapperProps=props.wrapperProps;return validAlignments.some((alignment=>alignment.name===align))&&(wrapperProps={...wrapperProps,"data-align":align}),(0,react.createElement)(BlockListBlock,(0,esm_extends.A)({},props,{wrapperProps}))}));(0,hooks_build_module.U2)("blocks.registerBlockType","core/align/addAttribute",(function addAttribute(settings){return(0,lodash.has)(settings.attributes,["align","type"])||(0,build_module.pN)(settings,"align")&&(settings.attributes={...settings.attributes,align:{type:"string",enum:[...ALL_ALIGNMENTS,""]}}),settings})),(0,hooks_build_module.U2)("editor.BlockListBlock","core/editor/align/with-data-align",withDataAlign),(0,hooks_build_module.U2)("editor.BlockEdit","core/editor/align/with-toolbar-controls",withToolbarControls),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function addAssignedAlign(props,blockType,attributes){const{align}=attributes;return getValidAlignments((0,build_module.bI)(blockType,"align"),(0,build_module.pN)(blockType,"alignWide",!0)).includes(align)&&(props.className=classnames_default()(`align${align}`,props.className)),props})),(0,hooks_build_module.U2)("blocks.registerBlockType","core/lock/addAttribute",(function lock_addAttribute(settings){return(0,lodash.has)(settings.attributes,["lock","type"])||(settings.attributes={...settings.attributes,lock:{type:"object"}}),settings}));const TextControl=(0,react.forwardRef)((function UnforwardedTextControl(props,ref){const{label,hideLabelFromVision,value,help,className,onChange,type="text",...additionalProps}=props,id=`inspector-text-control-${(0,use_instance_id.A)(TextControl)}`;return(0,react.createElement)(base_control,{label,hideLabelFromVision,id,help,className},(0,react.createElement)("input",(0,helpers_esm_extends.A)({className:"components-text-control__input",type,id,value,onChange:event=>onChange(event.target.value),"aria-describedby":help?id+"__help":void 0,ref},additionalProps)))})),text_control=TextControl,library_external=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));const StyledIcon=(0,emotion_styled_base_browser_esm.A)(icon,{target:"esh4a730"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});const external_link=(0,react.forwardRef)((function UnforwardedExternalLink(props,ref){const{href,children,className,rel="",...additionalProps}=props,optimizedRel=[...new Set([...rel.split(" "),"external","noreferrer","noopener"].filter(Boolean))].join(" "),classes=classnames_default()("components-external-link",className),isInternalAnchor=!(null==href||!href.startsWith("#"));return(0,react.createElement)("a",(0,helpers_esm_extends.A)({},additionalProps,{className:classes,href,onClick:isInternalAnchor?event=>event.preventDefault():void 0,target:"_blank",rel:optimizedRel,ref}),children,(0,react.createElement)(visually_hidden_component,{as:"span"},(0,_wordpress_i18n_build_module.__)("(opens in a new tab)")),(0,react.createElement)(StyledIcon,{icon:library_external,className:"components-external-link__icon"}))}));var use_media_query=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-media-query/index.js");const hooks_use_reduced_motion=()=>(0,use_media_query.A)("(prefers-reduced-motion: reduce)"),chevron_up=(0,react.createElement)(build_module_svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,react.createElement)(build_module_svg.wA,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));const use_update_effect=function use_update_effect_useUpdateEffect(effect,deps){const mounted=(0,react.useRef)(!1);(0,react.useEffect)((()=>{if(mounted.current)return effect();mounted.current=!0}),deps)},body_noop=()=>{};const PanelBodyTitle=(0,react.forwardRef)(((_ref2,ref)=>{let{isOpened,icon,title,...props}=_ref2;return title?(0,react.createElement)("h2",{className:"components-panel__body-title"},(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({className:"components-panel__body-toggle","aria-expanded":isOpened,ref},props),(0,react.createElement)("span",{"aria-hidden":"true"},(0,react.createElement)(build_module_icon,{className:"components-panel__arrow",icon:isOpened?chevron_up:chevron_down})),title,icon&&(0,react.createElement)(build_module_icon,{icon,className:"components-panel__icon",size:20}))):null})),body_ForwardedComponent=(0,react.forwardRef)((function PanelBody(_ref,ref){let{buttonProps={},children,className,icon,initialOpen,onToggle=body_noop,opened,title,scrollAfterOpen=!0}=_ref;const[isOpened,setIsOpened]=use_controlled_state(opened,{initial:void 0===initialOpen||initialOpen}),nodeRef=(0,react.useRef)(),scrollBehavior=hooks_use_reduced_motion()?"auto":"smooth",scrollAfterOpenRef=(0,react.useRef)();scrollAfterOpenRef.current=scrollAfterOpen,use_update_effect((()=>{var _nodeRef$current;isOpened&&scrollAfterOpenRef.current&&null!==(_nodeRef$current=nodeRef.current)&&void 0!==_nodeRef$current&&_nodeRef$current.scrollIntoView&&nodeRef.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:scrollBehavior})}),[isOpened,scrollBehavior]);const classes=classnames_default()("components-panel__body",className,{"is-opened":isOpened});return(0,react.createElement)("div",{className:classes,ref:(0,use_merge_refs.A)([nodeRef,ref])},(0,react.createElement)(PanelBodyTitle,(0,helpers_esm_extends.A)({icon,isOpened,onClick:event=>{event.preventDefault();const next=!isOpened;setIsOpened(next),onToggle(next)},title},buttonProps)),"function"==typeof children?children({opened:isOpened}):isOpened&&children)}));body_ForwardedComponent.displayName="PanelBody";const body=body_ForwardedComponent,ANCHOR_REGEX=/[\s#]/g,ANCHOR_SCHEMA={type:"string",source:"attribute",attribute:"id",selector:"*"};const withInspectorControl=(0,create_higher_order_component.f)((BlockEdit=>props=>{if((0,build_module.pN)(props.name,"anchor")&&props.isSelected){const isWeb="web"===platform.OS,textControl=(0,react.createElement)(text_control,{className:"html-anchor-control",label:(0,i18n_build_module.__)("HTML anchor"),help:(0,react.createElement)(react.Fragment,null,(0,i18n_build_module.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, youll be able to link directly to this section of your page."),isWeb&&(0,react.createElement)(external_link,{href:(0,i18n_build_module.__)("https://wordpress.org/support/article/page-jumps/")},(0,i18n_build_module.__)("Learn more about anchors"))),value:props.attributes.anchor||"",placeholder:isWeb?null:(0,i18n_build_module.__)("Add an anchor"),onChange:nextValue=>{nextValue=nextValue.replace(ANCHOR_REGEX,"-"),props.setAttributes({anchor:nextValue})},autoCapitalize:"none",autoComplete:"off"});return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(BlockEdit,props),isWeb&&(0,react.createElement)(inspector_controls,{__experimentalGroup:"advanced"},textControl),!isWeb&&"core/heading"===props.name&&(0,react.createElement)(inspector_controls,null,(0,react.createElement)(body,{title:(0,i18n_build_module.__)("Heading settings")},textControl)))}return(0,react.createElement)(BlockEdit,props)}),"withInspectorControl");(0,hooks_build_module.U2)("blocks.registerBlockType","core/anchor/attribute",(function anchor_addAttribute(settings){return(0,lodash.has)(settings.attributes,["anchor","type"])||(0,build_module.pN)(settings,"anchor")&&(settings.attributes={...settings.attributes,anchor:ANCHOR_SCHEMA}),settings})),(0,hooks_build_module.U2)("editor.BlockEdit","core/editor/anchor/with-inspector-control",withInspectorControl),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function addSaveProps(extraProps,blockType,attributes){return(0,build_module.pN)(blockType,"anchor")&&(extraProps.id=""===attributes.anchor?null:attributes.anchor),extraProps}));const ARIA_LABEL_SCHEMA={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,hooks_build_module.U2)("blocks.registerBlockType","core/ariaLabel/attribute",(function aria_label_addAttribute(settings){var _settings$attributes,_settings$attributes$;return null!=settings&&null!==(_settings$attributes=settings.attributes)&&void 0!==_settings$attributes&&null!==(_settings$attributes$=_settings$attributes.ariaLabel)&&void 0!==_settings$attributes$&&_settings$attributes$.type||(0,build_module.pN)(settings,"ariaLabel")&&(settings.attributes={...settings.attributes,ariaLabel:ARIA_LABEL_SCHEMA}),settings})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function aria_label_addSaveProps(extraProps,blockType,attributes){return(0,build_module.pN)(blockType,"ariaLabel")&&(extraProps["aria-label"]=""===attributes.ariaLabel?null:attributes.ariaLabel),extraProps}));const custom_class_name_withInspectorControl=(0,create_higher_order_component.f)((BlockEdit=>props=>(0,build_module.pN)(props.name,"customClassName",!0)&&props.isSelected?(0,react.createElement)(react.Fragment,null,(0,react.createElement)(BlockEdit,props),(0,react.createElement)(inspector_controls,{__experimentalGroup:"advanced"},(0,react.createElement)(text_control,{autoComplete:"off",label:(0,i18n_build_module.__)("Additional CSS class(es)"),value:props.attributes.className||"",onChange:nextValue=>{props.setAttributes({className:""!==nextValue?nextValue:void 0})},help:(0,i18n_build_module.__)("Separate multiple classes with spaces.")}))):(0,react.createElement)(BlockEdit,props)),"withInspectorControl");(0,hooks_build_module.U2)("blocks.registerBlockType","core/custom-class-name/attribute",(function custom_class_name_addAttribute(settings){return(0,build_module.pN)(settings,"customClassName",!0)&&(settings.attributes={...settings.attributes,className:{type:"string"}}),settings})),(0,hooks_build_module.U2)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",custom_class_name_withInspectorControl),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function custom_class_name_addSaveProps(extraProps,blockType,attributes){return(0,build_module.pN)(blockType,"customClassName",!0)&&attributes.className&&(extraProps.className=classnames_default()(extraProps.className,attributes.className)),extraProps})),(0,hooks_build_module.U2)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function addTransforms(result,source,index,results){if(!(0,build_module.pN)(result.name,"customClassName",!0))return result;if(1===results.length&&result.innerBlocks.length===source.length)return result;if(1===results.length&&source.length>1||results.length>1&&1===source.length)return result;if(source[index]){var _source$index;const originClassName=null===(_source$index=source[index])||void 0===_source$index?void 0:_source$index.attributes.className;if(originClassName)return{...result,attributes:{...result.attributes,className:originClassName}}}return result})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function addGeneratedClassName(extraProps,blockType){return(0,build_module.pN)(blockType,"className",!0)&&("string"==typeof extraProps.className?extraProps.className=[...new Set([(0,build_module.KW)(blockType.name),...extraProps.className.split(" ")])].join(" ").trim():extraProps.className=(0,build_module.KW)(blockType.name)),extraProps}));var raw_html=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/raw-html.js");function withFilters(hookName){return(0,create_higher_order_component.f)((OriginalComponent=>{const namespace="core/with-filters/"+hookName;let FilteredComponent;class FilteredComponentRenderer extends react.Component{constructor(){super(...arguments),function ensureFilteredComponent(){void 0===FilteredComponent&&(FilteredComponent=(0,hooks_build_module.W5)(hookName,OriginalComponent))}()}componentDidMount(){FilteredComponentRenderer.instances.push(this),1===FilteredComponentRenderer.instances.length&&((0,hooks_build_module.ip)("hookRemoved",namespace,onHooksUpdated),(0,hooks_build_module.ip)("hookAdded",namespace,onHooksUpdated))}componentWillUnmount(){FilteredComponentRenderer.instances=(0,lodash.without)(FilteredComponentRenderer.instances,this),0===FilteredComponentRenderer.instances.length&&((0,hooks_build_module.V5)("hookRemoved",namespace),(0,hooks_build_module.V5)("hookAdded",namespace))}render(){return(0,react.createElement)(FilteredComponent,this.props)}}FilteredComponentRenderer.instances=[];const throttledForceUpdate=(0,lodash.debounce)((()=>{FilteredComponent=(0,hooks_build_module.W5)(hookName,OriginalComponent),FilteredComponentRenderer.instances.forEach((instance=>{instance.forceUpdate()}))}),16);function onHooksUpdated(updatedHookName){updatedHookName===hookName&&throttledForceUpdate()}return FilteredComponentRenderer}),"withFilters")}var pure=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/higher-order/pure/index.js");const with_select=mapSelectToProps=>(0,create_higher_order_component.f)((WrappedComponent=>(0,pure.A)((ownProps=>{const mergeProps=use_select_useSelect(((select,registry)=>mapSelectToProps(select,ownProps,registry)));return(0,react.createElement)(WrappedComponent,(0,helpers_esm_extends.A)({},ownProps,mergeProps))}))),"withSelect"),use_dispatch_with_map=(dispatchMap,deps)=>{const registry=use_registry_useRegistry(),currentDispatchMap=(0,react.useRef)(dispatchMap);return(0,use_isomorphic_layout_effect.A)((()=>{currentDispatchMap.current=dispatchMap})),(0,react.useMemo)((()=>{const currentDispatchProps=currentDispatchMap.current(registry.dispatch,registry);return(0,lodash.mapValues)(currentDispatchProps,((dispatcher,propName)=>("function"!=typeof dispatcher&&console.warn(`Property ${propName} returned from dispatchMap in useDispatchWithMap must be a function.`),function(){return currentDispatchMap.current(registry.dispatch,registry)[propName](...arguments)})))}),[registry,...deps])},with_dispatch=mapDispatchToProps=>(0,create_higher_order_component.f)((WrappedComponent=>ownProps=>{const dispatchProps=use_dispatch_with_map(((dispatch,registry)=>mapDispatchToProps(dispatch,ownProps,registry)),[]);return(0,react.createElement)(WrappedComponent,(0,helpers_esm_extends.A)({},ownProps,dispatchProps))}),"withDispatch");var compose=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/higher-order/compose.js");const if_condition=function ifCondition(predicate){return(0,create_higher_order_component.f)((WrappedComponent=>props=>predicate(props)?(0,react.createElement)(WrappedComponent,props):null),"ifCondition")};var safe_html=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/dom/safe-html.js");const block_context_Context=(0,react.createContext)({});function BlockContextProvider(_ref){let{value,children}=_ref;const context=(0,react.useContext)(block_context_Context),nextValue=(0,react.useMemo)((()=>({...context,...value})),[context,value]);return(0,react.createElement)(block_context_Context.Provider,{value:nextValue,children})}const block_context=block_context_Context,DEFAULT_BLOCK_CONTEXT={},edit=withFilters("editor.BlockEdit")((props=>{const{attributes={},name}=props,blockType=(0,build_module.E7)(name),blockContext=(0,react.useContext)(block_context),context=(0,react.useMemo)((()=>blockType&&blockType.usesContext?(0,lodash.pick)(blockContext,blockType.usesContext):DEFAULT_BLOCK_CONTEXT),[blockType,blockContext]);if(!blockType)return null;const Component=blockType.edit||blockType.save;if(blockType.apiVersion>1)return(0,react.createElement)(Component,(0,esm_extends.A)({},props,{context}));const generatedClassName=(0,build_module.pN)(blockType,"className",!0)?(0,build_module.KW)(name):null,className=classnames_default()(generatedClassName,attributes.className);return(0,react.createElement)(Component,(0,esm_extends.A)({},props,{context,className}))}));function BlockEdit(props){const{name,isSelected,clientId}=props,context={name,isSelected,clientId};return(0,react.createElement)(block_edit_context_Provider,{value:(0,react.useMemo)((()=>context),Object.values(context))},(0,react.createElement)(edit,props))}var use_focus_on_mount=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-on-mount/index.js"),use_constrained_tabbing=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-constrained-tabbing/index.js"),use_focus_return=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-return/index.js"),use_focus_outside=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-outside/index.js");const LIVE_REGION_ARIA_ROLES=new Set(["alert","status","log","marquee","timer"]);let hiddenElements=[],isHidden=!1;function hideApp(unhiddenElement){if(isHidden)return;const elements=document.body.children;(0,lodash.forEach)(elements,(element=>{element!==unhiddenElement&&function elementShouldBeHidden(element){const role=element.getAttribute("role");return!("SCRIPT"===element.tagName||element.hasAttribute("aria-hidden")||element.hasAttribute("aria-live")||LIVE_REGION_ARIA_ROLES.has(role))}(element)&&(element.setAttribute("aria-hidden","true"),hiddenElements.push(element))})),isHidden=!0}let openModalCount=0;const modal=(0,react.forwardRef)((function Modal(props,forwardedRef){const{bodyOpenClassName="modal-open",role="dialog",title=null,focusOnMount=!0,shouldCloseOnEsc=!0,shouldCloseOnClickOutside=!0,isDismissible=!0,aria={labelledby:null,describedby:null},onRequestClose,icon,closeButtonLabel,children,style,overlayClassName,className,contentLabel,onKeyDown,isFullScreen=!1,__experimentalHideHeader=!1}=props,ref=(0,react.useRef)(),instanceId=(0,use_instance_id.A)(Modal),headingId=title?`components-modal-header-${instanceId}`:aria.labelledby,focusOnMountRef=(0,use_focus_on_mount.A)(focusOnMount),constrainedTabbingRef=(0,use_constrained_tabbing.A)(),focusReturnRef=(0,use_focus_return.A)(),focusOutsideProps=(0,use_focus_outside.A)(onRequestClose),[hasScrolledContent,setHasScrolledContent]=(0,react.useState)(!1);(0,react.useEffect)((()=>(openModalCount++,1===openModalCount&&(hideApp(ref.current),document.body.classList.add(bodyOpenClassName)),()=>{openModalCount--,0===openModalCount&&(document.body.classList.remove(bodyOpenClassName),function showApp(){isHidden&&((0,lodash.forEach)(hiddenElements,(element=>{element.removeAttribute("aria-hidden")})),hiddenElements=[],isHidden=!1)}())})),[bodyOpenClassName]);const onContentContainerScroll=(0,react.useCallback)((e=>{var _e$target$scrollTop,_e$target;const scrollY=null!==(_e$target$scrollTop=null==e||null===(_e$target=e.target)||void 0===_e$target?void 0:_e$target.scrollTop)&&void 0!==_e$target$scrollTop?_e$target$scrollTop:-1;!hasScrolledContent&&scrollY>0?setHasScrolledContent(!0):hasScrolledContent&&scrollY<=0&&setHasScrolledContent(!1)}),[hasScrolledContent]);return(0,react_dom.createPortal)((0,react.createElement)("div",{ref:(0,use_merge_refs.A)([ref,forwardedRef]),className:classnames_default()("components-modal__screen-overlay",overlayClassName),onKeyDown:function handleEscapeKeyDown(event){shouldCloseOnEsc&&"Escape"===event.code&&!event.defaultPrevented&&(event.preventDefault(),onRequestClose&&onRequestClose(event))}},(0,react.createElement)(style_provider,{document},(0,react.createElement)("div",(0,helpers_esm_extends.A)({className:classnames_default()("components-modal__frame",className,{"is-full-screen":isFullScreen}),style,ref:(0,use_merge_refs.A)([constrainedTabbingRef,focusReturnRef,focusOnMountRef]),role,"aria-label":contentLabel,"aria-labelledby":contentLabel?null:headingId,"aria-describedby":aria.describedby,tabIndex:"-1"},shouldCloseOnClickOutside?focusOutsideProps:{},{onKeyDown}),(0,react.createElement)("div",{className:classnames_default()("components-modal__content",{"hide-header":__experimentalHideHeader,"has-scrolled-content":hasScrolledContent}),role:"document",onScroll:onContentContainerScroll},!__experimentalHideHeader&&(0,react.createElement)("div",{className:"components-modal__header"},(0,react.createElement)("div",{className:"components-modal__header-heading-container"},icon&&(0,react.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},icon),title&&(0,react.createElement)("h1",{id:headingId,className:"components-modal__header-heading"},title)),isDismissible&&(0,react.createElement)(build_module_button,{onClick:onRequestClose,icon:library_close.A,label:closeButtonLabel||(0,_wordpress_i18n_build_module.__)("Close dialog")})),children)))),document.body)})),more_horizontal=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));const warning=function Warning(_ref){let{className,actions,children,secondaryActions}=_ref;return(0,react.createElement)("div",{style:{display:"contents",all:"initial"}},(0,react.createElement)("div",{className:classnames_default()(className,"block-editor-warning")},(0,react.createElement)("div",{className:"block-editor-warning__contents"},(0,react.createElement)("p",{className:"block-editor-warning__message"},children),(react.Children.count(actions)>0||secondaryActions)&&(0,react.createElement)("div",{className:"block-editor-warning__actions"},react.Children.count(actions)>0&&react.Children.map(actions,((action,i)=>(0,react.createElement)("span",{key:i,className:"block-editor-warning__action"},action))),secondaryActions&&(0,react.createElement)(dropdown_menu,{className:"block-editor-warning__secondary",icon:more_horizontal,label:(0,i18n_build_module.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,react.createElement)(menu_group,null,secondaryActions.map(((item,pos)=>(0,react.createElement)(menu_item,{onClick:item.onClick,key:pos},item.title))))))))))};var character=__webpack_require__("../../node_modules/.pnpm/diff@4.0.2/node_modules/diff/lib/diff/character.js");function BlockView(_ref){let{title,rawContent,renderedContent,action,actionText,className}=_ref;return(0,react.createElement)("div",{className},(0,react.createElement)("div",{className:"block-editor-block-compare__content"},(0,react.createElement)("h2",{className:"block-editor-block-compare__heading"},title),(0,react.createElement)("div",{className:"block-editor-block-compare__html"},rawContent),(0,react.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,react.createElement)(raw_html.A,null,(0,safe_html.A)(renderedContent)))),(0,react.createElement)("div",{className:"block-editor-block-compare__action"},(0,react.createElement)(build_module_button,{variant:"secondary",tabIndex:"0",onClick:action},actionText)))}const block_compare=function BlockCompare(_ref){let{block,onKeep,onConvert,convertor,convertButtonText}=_ref;const converted=function getConvertedContent(convertedBlock){return(0,lodash.castArray)(convertedBlock).map((item=>(0,build_module.Z9)(item.name,item.attributes,item.innerBlocks))).join("")}(convertor(block)),difference=function getDifference(originalContent,newContent){return(0,character.JJ)(originalContent,newContent).map(((item,pos)=>{const classes=classnames_default()({"block-editor-block-compare__added":item.added,"block-editor-block-compare__removed":item.removed});return(0,react.createElement)("span",{key:pos,className:classes},item.value)}))}(block.originalContent,converted);return(0,react.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,react.createElement)(BlockView,{title:(0,i18n_build_module.__)("Current"),className:"block-editor-block-compare__current",action:onKeep,actionText:(0,i18n_build_module.__)("Convert to HTML"),rawContent:block.originalContent,renderedContent:block.originalContent}),(0,react.createElement)(BlockView,{title:(0,i18n_build_module.__)("After Conversion"),className:"block-editor-block-compare__converted",action:onConvert,actionText:convertButtonText,rawContent:difference,renderedContent:converted}))};const blockToBlocks=block=>(0,build_module.lh)({HTML:block.originalContent}),block_invalid_warning=(0,compose.A)([with_select(((select,_ref3)=>{let{clientId}=_ref3;return{block:select(store_store).getBlock(clientId)}})),with_dispatch(((dispatch,_ref4)=>{let{block}=_ref4;const{replaceBlock}=dispatch(store_store);return{convertToClassic(){replaceBlock(block.clientId,(block=>(0,build_module.Wv)("core/freeform",{content:block.originalContent}))(block))},convertToHTML(){replaceBlock(block.clientId,(block=>(0,build_module.Wv)("core/html",{content:block.originalContent}))(block))},convertToBlocks(){replaceBlock(block.clientId,blockToBlocks(block))},attemptBlockRecovery(){replaceBlock(block.clientId,(_ref2=>{let{name,attributes,innerBlocks}=_ref2;return(0,build_module.Wv)(name,attributes,innerBlocks)})(block))}}}))])((function BlockInvalidWarning(_ref){let{convertToHTML,convertToBlocks,convertToClassic,attemptBlockRecovery,block}=_ref;const hasHTMLBlock=!!(0,build_module.E7)("core/html"),[compare,setCompare]=(0,react.useState)(!1),onCompare=(0,react.useCallback)((()=>setCompare(!0)),[]),onCompareClose=(0,react.useCallback)((()=>setCompare(!1)),[]),hiddenActions=(0,react.useMemo)((()=>[{title:(0,i18n_build_module._x)("Resolve","imperative verb"),onClick:onCompare},hasHTMLBlock&&{title:(0,i18n_build_module.__)("Convert to HTML"),onClick:convertToHTML},{title:(0,i18n_build_module.__)("Convert to Classic Block"),onClick:convertToClassic}].filter(Boolean)),[onCompare,convertToHTML,convertToClassic]);return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(warning,{actions:[(0,react.createElement)(build_module_button,{key:"recover",onClick:attemptBlockRecovery,variant:"primary"},(0,i18n_build_module.__)("Attempt Block Recovery"))],secondaryActions:hiddenActions},(0,i18n_build_module.__)("This block contains unexpected or invalid content.")),compare&&(0,react.createElement)(modal,{title:(0,i18n_build_module.__)("Resolve Block"),onRequestClose:onCompareClose,className:"block-editor-block-compare"},(0,react.createElement)(block_compare,{block,onKeep:convertToHTML,onConvert:convertToBlocks,convertor:blockToBlocks,convertButtonText:(0,i18n_build_module.__)("Convert to Blocks")})))})),block_crash_warning_warning=(0,react.createElement)(warning,{className:"block-editor-block-list__block-crash-warning"},(0,i18n_build_module.__)("This block has encountered an error and cannot be previewed.")),block_crash_warning=()=>block_crash_warning_warning;class BlockCrashBoundary extends react.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const block_crash_boundary=BlockCrashBoundary;var lib=__webpack_require__("../../node_modules/.pnpm/react-autosize-textarea@7.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-autosize-textarea/lib/index.js");const block_html=function BlockHTML(_ref){let{clientId}=_ref;const[html,setHtml]=(0,react.useState)(""),block=use_select_useSelect((select=>select(store_store).getBlock(clientId)),[clientId]),{updateBlock}=use_dispatch(store_store);return(0,react.useEffect)((()=>{setHtml((0,build_module.F8)(block))}),[block]),(0,react.createElement)(lib.A,{className:"block-editor-block-list__block-html-textarea",value:html,onBlur:()=>{const blockType=(0,build_module.E7)(block.name);if(!blockType)return;const attributes=(0,build_module.Ph)(blockType,html,block.attributes),content=html||(0,build_module.Z9)(blockType,attributes),[isValid]=html?(0,build_module.YV)({...block,attributes,originalContent:content}):[!0];updateBlock(clientId,{attributes,originalContent:content,isValid}),html||setHtml({content})},onChange:event=>setHtml(event.target.value)})};var debounce=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/utils/debounce/index.js");function use_disabled_useDisabled(){let{isDisabled:isDisabledProp=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,use_ref_effect.A)((node=>{if(isDisabledProp)return;const updates=[],disable=()=>{node.childNodes.forEach((child=>{child instanceof HTMLElement&&(child.getAttribute("inert")||(child.setAttribute("inert","true"),updates.push((()=>{child.removeAttribute("inert")}))))}))},debouncedDisable=(0,debounce.s)(disable,0,{leading:!0});disable();const observer=new window.MutationObserver(debouncedDisable);return observer.observe(node,{childList:!0}),()=>{observer&&observer.disconnect(),debouncedDisable.cancel(),updates.forEach((update=>update()))}}),[isDisabledProp])}var __defProp=Object.defineProperty,globals_exports={};((target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})})(globals_exports,{assign:()=>react_spring_shared_modern_assign,colors:()=>colors,createStringInterpolator:()=>createStringInterpolator,skipAnimation:()=>skipAnimation,to:()=>to,willAdvance:()=>willAdvance});var updateQueue=makeQueue(),raf=fn=>schedule(fn,updateQueue),writeQueue=makeQueue();raf.write=fn=>schedule(fn,writeQueue);var onStartQueue=makeQueue();raf.onStart=fn=>schedule(fn,onStartQueue);var onFrameQueue=makeQueue();raf.onFrame=fn=>schedule(fn,onFrameQueue);var onFinishQueue=makeQueue();raf.onFinish=fn=>schedule(fn,onFinishQueue);var timeouts=[];raf.setTimeout=(handler,ms)=>{const time=raf.now()+ms,cancel=()=>{const i=timeouts.findIndex((t=>t.cancel==cancel));~i&&timeouts.splice(i,1),pendingCount-=~i?1:0},timeout={time,handler,cancel};return timeouts.splice(findTimeout(time),0,timeout),pendingCount+=1,start(),timeout};var findTimeout=time=>~(~timeouts.findIndex((t=>t.time>time))||~timeouts.length);raf.cancel=fn=>{onStartQueue.delete(fn),onFrameQueue.delete(fn),onFinishQueue.delete(fn),updateQueue.delete(fn),writeQueue.delete(fn)},raf.sync=fn=>{sync=!0,raf.batchedUpdates(fn),sync=!1},raf.throttle=fn=>{let lastArgs;function queuedFn(){try{fn(...lastArgs)}finally{lastArgs=null}}function throttled(...args){lastArgs=args,raf.onStart(queuedFn)}return throttled.handler=fn,throttled.cancel=()=>{onStartQueue.delete(queuedFn),lastArgs=null},throttled};var nativeRaf="undefined"!=typeof window?window.requestAnimationFrame:()=>{};raf.use=impl=>nativeRaf=impl,raf.now="undefined"!=typeof performance?()=>performance.now():Date.now,raf.batchedUpdates=fn=>fn(),raf.catch=console.error,raf.frameLoop="always",raf.advance=()=>{"demand"!==raf.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):update()};var ts=-1,pendingCount=0,sync=!1;function schedule(fn,queue){sync?(queue.delete(fn),fn(0)):(queue.add(fn),start())}function start(){ts<0&&(ts=0,"demand"!==raf.frameLoop&&nativeRaf(loop))}function loop(){~ts&&(nativeRaf(loop),raf.batchedUpdates(update))}function update(){const prevTs=ts;ts=raf.now();const count=findTimeout(ts);count&&(eachSafely(timeouts.splice(0,count),(t=>t.handler())),pendingCount-=count),pendingCount?(onStartQueue.flush(),updateQueue.flush(prevTs?Math.min(64,ts-prevTs):16.667),onFrameQueue.flush(),writeQueue.flush(),onFinishQueue.flush()):function stop(){ts=-1}()}function makeQueue(){let next=new Set,current=next;return{add(fn){pendingCount+=current!=next||next.has(fn)?0:1,next.add(fn)},delete:fn=>(pendingCount-=current==next&&next.has(fn)?1:0,next.delete(fn)),flush(arg){current.size&&(next=new Set,pendingCount-=current.size,eachSafely(current,(fn=>fn(arg)&&next.add(fn))),pendingCount+=next.size,current=next)}}}function eachSafely(values,each2){values.forEach((value=>{try{each2(value)}catch(e){raf.catch(e)}}))}function react_spring_shared_modern_noop(){}var is={arr:Array.isArray,obj:a=>!!a&&"Object"===a.constructor.name,fun:a=>"function"==typeof a,str:a=>"string"==typeof a,num:a=>"number"==typeof a,und:a=>void 0===a};function isEqual(a,b){if(is.arr(a)){if(!is.arr(b)||a.length!==b.length)return!1;for(let i=0;i<a.length;i++)if(a[i]!==b[i])return!1;return!0}return a===b}var react_spring_shared_modern_each=(obj,fn)=>obj.forEach(fn);function eachProp(obj,fn,ctx){if(is.arr(obj))for(let i=0;i<obj.length;i++)fn.call(ctx,obj[i],`${i}`);else for(const key in obj)obj.hasOwnProperty(key)&&fn.call(ctx,obj[key],key)}var toArray=a=>is.und(a)?[]:is.arr(a)?a:[a];function flush(queue,iterator){if(queue.size){const items=Array.from(queue);queue.clear(),react_spring_shared_modern_each(items,iterator)}}var createStringInterpolator,to,flushCalls=(queue,...args)=>flush(queue,(fn=>fn(...args))),isSSR=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),colors=null,skipAnimation=!1,willAdvance=react_spring_shared_modern_noop,react_spring_shared_modern_assign=globals=>{globals.to&&(to=globals.to),globals.now&&(raf.now=globals.now),void 0!==globals.colors&&(colors=globals.colors),null!=globals.skipAnimation&&(skipAnimation=globals.skipAnimation),globals.createStringInterpolator&&(createStringInterpolator=globals.createStringInterpolator),globals.requestAnimationFrame&&raf.use(globals.requestAnimationFrame),globals.batchedUpdates&&(raf.batchedUpdates=globals.batchedUpdates),globals.willAdvance&&(willAdvance=globals.willAdvance),globals.frameLoop&&(raf.frameLoop=globals.frameLoop)},startQueue=new Set,currentFrame=[],prevFrame=[],priority=0,frameLoop={get idle(){return!startQueue.size&&!currentFrame.length},start(animation){priority>animation.priority?(startQueue.add(animation),raf.onStart(flushStartQueue)):(startSafely(animation),raf(advance))},advance,sort(animation){if(priority)raf.onFrame((()=>frameLoop.sort(animation)));else{const prevIndex=currentFrame.indexOf(animation);~prevIndex&&(currentFrame.splice(prevIndex,1),startUnsafely(animation))}},clear(){currentFrame=[],startQueue.clear()}};function flushStartQueue(){startQueue.forEach(startSafely),startQueue.clear(),raf(advance)}function startSafely(animation){currentFrame.includes(animation)||startUnsafely(animation)}function startUnsafely(animation){currentFrame.splice(function findIndex(arr,test){const index=arr.findIndex(test);return index<0?arr.length:index}(currentFrame,(other=>other.priority>animation.priority)),0,animation)}function advance(dt){const nextFrame=prevFrame;for(let i=0;i<currentFrame.length;i++){const animation=currentFrame[i];priority=animation.priority,animation.idle||(willAdvance(animation),animation.advance(dt),animation.idle||nextFrame.push(animation))}return priority=0,(prevFrame=currentFrame).length=0,(currentFrame=nextFrame).length>0}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function call(...parts){return"\\(\\s*("+parts.join(")\\s*,\\s*(")+")\\s*\\)"}var rgb=new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),react_spring_shared_modern_rgba=new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl=new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla=new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6=/^#([0-9a-fA-F]{6})$/,hex8=/^#([0-9a-fA-F]{8})$/;function hue2rgb(p,q,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?p+6*(q-p)*t:t<.5?q:t<2/3?p+(q-p)*(2/3-t)*6:p}function hslToRgb(h,s,l){const q=l<.5?l*(1+s):l+s-l*s,p=2*l-q,r=hue2rgb(p,q,h+1/3),g=hue2rgb(p,q,h),b=hue2rgb(p,q,h-1/3);return Math.round(255*r)<<24|Math.round(255*g)<<16|Math.round(255*b)<<8}function parse255(str){const int=parseInt(str,10);return int<0?0:int>255?255:int}function parse360(str){return(parseFloat(str)%360+360)%360/360}function parse1(str){const num=parseFloat(str);return num<0?0:num>1?255:Math.round(255*num)}function parsePercentage(str){const int=parseFloat(str);return int<0?0:int>100?1:int/100}function colorToRgba(input){let int32Color=function normalizeColor(color){let match;return"number"==typeof color?color>>>0===color&&color>=0&&color<=4294967295?color:null:(match=hex6.exec(color))?parseInt(match[1]+"ff",16)>>>0:colors&&void 0!==colors[color]?colors[color]:(match=rgb.exec(color))?(parse255(match[1])<<24|parse255(match[2])<<16|parse255(match[3])<<8|255)>>>0:(match=react_spring_shared_modern_rgba.exec(color))?(parse255(match[1])<<24|parse255(match[2])<<16|parse255(match[3])<<8|parse1(match[4]))>>>0:(match=hex3.exec(color))?parseInt(match[1]+match[1]+match[2]+match[2]+match[3]+match[3]+"ff",16)>>>0:(match=hex8.exec(color))?parseInt(match[1],16)>>>0:(match=hex4.exec(color))?parseInt(match[1]+match[1]+match[2]+match[2]+match[3]+match[3]+match[4]+match[4],16)>>>0:(match=hsl.exec(color))?(255|hslToRgb(parse360(match[1]),parsePercentage(match[2]),parsePercentage(match[3])))>>>0:(match=hsla.exec(color))?(hslToRgb(parse360(match[1]),parsePercentage(match[2]),parsePercentage(match[3]))|parse1(match[4]))>>>0:null}(input);if(null===int32Color)return input;int32Color=int32Color||0;return`rgba(${(4278190080&int32Color)>>>24}, ${(16711680&int32Color)>>>16}, ${(65280&int32Color)>>>8}, ${(255&int32Color)/255})`}var createInterpolator=(range,output,extrapolate)=>{if(is.fun(range))return range;if(is.arr(range))return createInterpolator({range,output,extrapolate});if(is.str(range.output[0]))return createStringInterpolator(range);const config=range,outputRange=config.output,inputRange=config.range||[0,1],extrapolateLeft=config.extrapolateLeft||config.extrapolate||"extend",extrapolateRight=config.extrapolateRight||config.extrapolate||"extend",easing=config.easing||(t=>t);return input=>{const range2=function findRange(input,inputRange){for(var i=1;i<inputRange.length-1&&!(inputRange[i]>=input);++i);return i-1}(input,inputRange);return function interpolate(input,inputMin,inputMax,outputMin,outputMax,easing,extrapolateLeft,extrapolateRight,map){let result=map?map(input):input;if(result<inputMin){if("identity"===extrapolateLeft)return result;"clamp"===extrapolateLeft&&(result=inputMin)}if(result>inputMax){if("identity"===extrapolateRight)return result;"clamp"===extrapolateRight&&(result=inputMax)}if(outputMin===outputMax)return outputMin;if(inputMin===inputMax)return input<=inputMin?outputMin:outputMax;inputMin===-1/0?result=-result:inputMax===1/0?result-=inputMin:result=(result-inputMin)/(inputMax-inputMin);result=easing(result),outputMin===-1/0?result=-result:outputMax===1/0?result+=outputMin:result=result*(outputMax-outputMin)+outputMin;return result}(input,inputRange[range2],inputRange[range2+1],outputRange[range2],outputRange[range2+1],easing,extrapolateLeft,extrapolateRight,config.map)}};var c1=1.70158,c2=1.525*c1,c4=2*Math.PI/3,c5=2*Math.PI/4.5,bounceOut=x=>{const n1=7.5625,d1=2.75;return x<1/d1?n1*x*x:x<2/d1?n1*(x-=1.5/d1)*x+.75:x<2.5/d1?n1*(x-=2.25/d1)*x+.9375:n1*(x-=2.625/d1)*x+.984375},easings={linear:x=>x,easeInQuad:x=>x*x,easeOutQuad:x=>1-(1-x)*(1-x),easeInOutQuad:x=>x<.5?2*x*x:1-Math.pow(-2*x+2,2)/2,easeInCubic:x=>x*x*x,easeOutCubic:x=>1-Math.pow(1-x,3),easeInOutCubic:x=>x<.5?4*x*x*x:1-Math.pow(-2*x+2,3)/2,easeInQuart:x=>x*x*x*x,easeOutQuart:x=>1-Math.pow(1-x,4),easeInOutQuart:x=>x<.5?8*x*x*x*x:1-Math.pow(-2*x+2,4)/2,easeInQuint:x=>x*x*x*x*x,easeOutQuint:x=>1-Math.pow(1-x,5),easeInOutQuint:x=>x<.5?16*x*x*x*x*x:1-Math.pow(-2*x+2,5)/2,easeInSine:x=>1-Math.cos(x*Math.PI/2),easeOutSine:x=>Math.sin(x*Math.PI/2),easeInOutSine:x=>-(Math.cos(Math.PI*x)-1)/2,easeInExpo:x=>0===x?0:Math.pow(2,10*x-10),easeOutExpo:x=>1===x?1:1-Math.pow(2,-10*x),easeInOutExpo:x=>0===x?0:1===x?1:x<.5?Math.pow(2,20*x-10)/2:(2-Math.pow(2,-20*x+10))/2,easeInCirc:x=>1-Math.sqrt(1-Math.pow(x,2)),easeOutCirc:x=>Math.sqrt(1-Math.pow(x-1,2)),easeInOutCirc:x=>x<.5?(1-Math.sqrt(1-Math.pow(2*x,2)))/2:(Math.sqrt(1-Math.pow(-2*x+2,2))+1)/2,easeInBack:x=>2.70158*x*x*x-c1*x*x,easeOutBack:x=>1+2.70158*Math.pow(x-1,3)+c1*Math.pow(x-1,2),easeInOutBack:x=>x<.5?Math.pow(2*x,2)*(7.189819*x-c2)/2:(Math.pow(2*x-2,2)*((c2+1)*(2*x-2)+c2)+2)/2,easeInElastic:x=>0===x?0:1===x?1:-Math.pow(2,10*x-10)*Math.sin((10*x-10.75)*c4),easeOutElastic:x=>0===x?0:1===x?1:Math.pow(2,-10*x)*Math.sin((10*x-.75)*c4)+1,easeInOutElastic:x=>0===x?0:1===x?1:x<.5?-Math.pow(2,20*x-10)*Math.sin((20*x-11.125)*c5)/2:Math.pow(2,-20*x+10)*Math.sin((20*x-11.125)*c5)/2+1,easeInBounce:x=>1-bounceOut(1-x),easeOutBounce:bounceOut,easeInOutBounce:x=>x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2,steps:(steps2,direction="end")=>progress2=>{const expanded=(progress2="end"===direction?Math.min(progress2,.999):Math.max(progress2,.001))*steps2,rounded="end"===direction?Math.floor(expanded):Math.ceil(expanded);return min=0,max=1,v=rounded/steps2,Math.min(Math.max(v,min),max);var min,max,v}},$get=Symbol.for("FluidValue.get"),$observers=Symbol.for("FluidValue.observers"),hasFluidValue=arg=>Boolean(arg&&arg[$get]),getFluidValue=arg=>arg&&arg[$get]?arg[$get]():arg,getFluidObservers=target=>target[$observers]||null;function callFluidObservers(target,event){const observers=target[$observers];observers&&observers.forEach((observer2=>{!function callFluidObserver(observer2,event){observer2.eventObserved?observer2.eventObserved(event):observer2(event)}(observer2,event)}))}var FluidValue=class{constructor(get){if(!get&&!(get=this.get))throw Error("Unknown getter");setFluidGetter(this,get)}},setFluidGetter=(target,get)=>setHidden(target,$get,get);function addFluidObserver(target,observer2){if(target[$get]){let observers=target[$observers];observers||setHidden(target,$observers,observers=new Set),observers.has(observer2)||(observers.add(observer2),target.observerAdded&&target.observerAdded(observers.size,observer2))}return observer2}function removeFluidObserver(target,observer2){const observers=target[$observers];if(observers&&observers.has(observer2)){const count=observers.size-1;count?observers.delete(observer2):target[$observers]=null,target.observerRemoved&&target.observerRemoved(count,observer2)}}var namedColorRegex,setHidden=(target,key,value)=>Object.defineProperty(target,key,{value,writable:!0,configurable:!0}),numberRegex=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,colorRegex=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,unitRegex=new RegExp(`(${numberRegex.source})(%|[a-z]+)`,"i"),rgbaRegex=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,variableToRgba=input=>{const[token,fallback]=parseCSSVariable(input);if(!token||isSSR())return input;const value=window.getComputedStyle(document.documentElement).getPropertyValue(token);if(value)return value.trim();if(fallback&&fallback.startsWith("--")){const value2=window.getComputedStyle(document.documentElement).getPropertyValue(fallback);return value2||input}return fallback&&cssVariableRegex.test(fallback)?variableToRgba(fallback):fallback||input},parseCSSVariable=current=>{const match=cssVariableRegex.exec(current);if(!match)return[,];const[,token,fallback]=match;return[token,fallback]},rgbaRound=(_,p1,p2,p3,p4)=>`rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`,createStringInterpolator2=config=>{namedColorRegex||(namedColorRegex=colors?new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`,"g"):/^\b$/);const output=config.output.map((value=>getFluidValue(value).replace(cssVariableRegex,variableToRgba).replace(colorRegex,colorToRgba).replace(namedColorRegex,colorToRgba))),keyframes=output.map((value=>value.match(numberRegex).map(Number))),interpolators=keyframes[0].map(((_,i)=>keyframes.map((values=>{if(!(i in values))throw Error('The arity of each "output" value must be equal');return values[i]})))).map((output2=>createInterpolator({...config,output:output2})));return input=>{const missingUnit=!unitRegex.test(output[0])&&output.find((value=>unitRegex.test(value)))?.replace(numberRegex,"");let i=0;return output[0].replace(numberRegex,(()=>`${interpolators[i++](input)}${missingUnit||""}`)).replace(rgbaRegex,rgbaRound)}},prefix="react-spring: ",once=fn=>{const func=fn;let called=!1;if("function"!=typeof func)throw new TypeError(`${prefix}once requires a function parameter`);return(...args)=>{called||(func(...args),called=!0)}},warnInterpolate=once(console.warn);var warnDirectCall=once(console.warn);function isAnimatedString(value){return is.str(value)&&("#"==value[0]||/\d/.test(value)||!isSSR()&&cssVariableRegex.test(value)||value in(colors||{}))}var react_spring_shared_modern_useIsomorphicLayoutEffect=isSSR()?react.useEffect:react.useLayoutEffect,useIsMounted=()=>{const isMounted=(0,react.useRef)(!1);return react_spring_shared_modern_useIsomorphicLayoutEffect((()=>(isMounted.current=!0,()=>{isMounted.current=!1})),[]),isMounted};function react_spring_shared_modern_useForceUpdate(){const update2=(0,react.useState)()[1],isMounted=useIsMounted();return()=>{isMounted.current&&update2(Math.random())}}var useOnce=effect=>(0,react.useEffect)(effect,emptyDeps),emptyDeps=[];function usePrev(value){const prevRef=(0,react.useRef)();return(0,react.useEffect)((()=>{prevRef.current=value})),prevRef.current}var $node=Symbol.for("Animated:node"),getAnimated=owner=>owner&&owner[$node],setAnimated=(owner,node)=>{return obj=owner,key=$node,value=node,Object.defineProperty(obj,key,{value,writable:!0,configurable:!0});var obj,key,value},getPayload=owner=>owner&&owner[$node]&&owner[$node].getPayload(),Animated=class{constructor(){setAnimated(this,this)}getPayload(){return this.payload||[]}},AnimatedValue=class extends Animated{constructor(_value){super(),this._value=_value,this.done=!0,this.durationProgress=0,is.num(this._value)&&(this.lastPosition=this._value)}static create(value){return new AnimatedValue(value)}getPayload(){return[this]}getValue(){return this._value}setValue(value,step){return is.num(value)&&(this.lastPosition=value,step&&(value=Math.round(value/step)*step,this.done&&(this.lastPosition=value))),this._value!==value&&(this._value=value,!0)}reset(){const{done}=this;this.done=!1,is.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,done&&(this.lastVelocity=null),this.v0=null)}},AnimatedString=class extends AnimatedValue{constructor(value){super(0),this._string=null,this._toString=createInterpolator({output:[value,value]})}static create(value){return new AnimatedString(value)}getValue(){const value=this._string;return null==value?this._string=this._toString(this._value):value}setValue(value){if(is.str(value)){if(value==this._string)return!1;this._string=value,this._value=1}else{if(!super.setValue(value))return!1;this._string=null}return!0}reset(goal){goal&&(this._toString=createInterpolator({output:[this.getValue(),goal]})),this._value=0,super.reset()}},TreeContext={dependencies:null},AnimatedObject=class extends Animated{constructor(source){super(),this.source=source,this.setValue(source)}getValue(animated){const values={};return eachProp(this.source,((source,key)=>{var value;(value=source)&&value[$node]===value?values[key]=source.getValue(animated):hasFluidValue(source)?values[key]=getFluidValue(source):animated||(values[key]=source)})),values}setValue(source){this.source=source,this.payload=this._makePayload(source)}reset(){this.payload&&react_spring_shared_modern_each(this.payload,(node=>node.reset()))}_makePayload(source){if(source){const payload=new Set;return eachProp(source,this._addToPayload,payload),Array.from(payload)}}_addToPayload(source){TreeContext.dependencies&&hasFluidValue(source)&&TreeContext.dependencies.add(source);const payload=getPayload(source);payload&&react_spring_shared_modern_each(payload,(node=>this.add(node)))}},AnimatedArray=class extends AnimatedObject{constructor(source){super(source)}static create(source){return new AnimatedArray(source)}getValue(){return this.source.map((node=>node.getValue()))}setValue(source){const payload=this.getPayload();return source.length==payload.length?payload.map(((node,i)=>node.setValue(source[i]))).some(Boolean):(super.setValue(source.map(makeAnimated)),!0)}};function makeAnimated(value){return(isAnimatedString(value)?AnimatedString:AnimatedValue).create(value)}function getAnimatedType(value){const parentNode=getAnimated(value);return parentNode?parentNode.constructor:is.arr(value)?AnimatedArray:isAnimatedString(value)?AnimatedString:AnimatedValue}var withAnimated=(Component,host)=>{const hasInstance=!is.fun(Component)||Component.prototype&&Component.prototype.isReactComponent;return(0,react.forwardRef)(((givenProps,givenRef)=>{const instanceRef=(0,react.useRef)(null),ref=hasInstance&&(0,react.useCallback)((value=>{instanceRef.current=function updateRef(ref,value){ref&&(is.fun(ref)?ref(value):ref.current=value);return value}(givenRef,value)}),[givenRef]),[props,deps]=function getAnimatedState(props,host){const dependencies=new Set;TreeContext.dependencies=dependencies,props.style&&(props={...props,style:host.createAnimatedStyle(props.style)});return props=new AnimatedObject(props),TreeContext.dependencies=null,[props,dependencies]}(givenProps,host),forceUpdate=react_spring_shared_modern_useForceUpdate(),callback=()=>{const instance=instanceRef.current;if(hasInstance&&!instance)return;!1===(!!instance&&host.applyAnimatedValues(instance,props.getValue(!0)))&&forceUpdate()},observer=new PropsObserver(callback,deps),observerRef=(0,react.useRef)();react_spring_shared_modern_useIsomorphicLayoutEffect((()=>(observerRef.current=observer,react_spring_shared_modern_each(deps,(dep=>addFluidObserver(dep,observer))),()=>{observerRef.current&&(react_spring_shared_modern_each(observerRef.current.deps,(dep=>removeFluidObserver(dep,observerRef.current))),raf.cancel(observerRef.current.update))}))),(0,react.useEffect)(callback,[]),useOnce((()=>()=>{const observer2=observerRef.current;react_spring_shared_modern_each(observer2.deps,(dep=>removeFluidObserver(dep,observer2)))}));const usedProps=host.getComponentProps(props.getValue());return react.createElement(Component,{...usedProps,ref})}))},PropsObserver=class{constructor(update,deps){this.update=update,this.deps=deps}eventObserved(event){"change"==event.type&&raf.write(this.update)}};var cacheKey=Symbol.for("AnimatedComponent"),getDisplayName=arg=>is.str(arg)?arg:arg&&is.str(arg.displayName)?arg.displayName:is.fun(arg)&&arg.name||null;function callProp(value,...args){return is.fun(value)?value(...args):value}var matchProp=(value,key)=>!0===value||!!(key&&value&&(is.fun(value)?value(key):toArray(value).includes(key))),resolveProp=(prop,key)=>is.obj(prop)?key&&prop[key]:prop,getDefaultProp=(props,key)=>!0===props.default?props[key]:props.default?props.default[key]:void 0,noopTransform=value=>value,getDefaultProps=(props,transform=noopTransform)=>{let keys=DEFAULT_PROPS;props.default&&!0!==props.default&&(props=props.default,keys=Object.keys(props));const defaults2={};for(const key of keys){const value=transform(props[key],key);is.und(value)||(defaults2[key]=value)}return defaults2},DEFAULT_PROPS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],RESERVED_PROPS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function inferTo(props){const to2=function getForwardProps(props){const forward={};let count=0;if(eachProp(props,((value,prop)=>{RESERVED_PROPS[prop]||(forward[prop]=value,count++)})),count)return forward}(props);if(to2){const out={to:to2};return eachProp(props,((val,key)=>key in to2||(out[key]=val))),out}return{...props}}function computeGoal(value){return value=getFluidValue(value),is.arr(value)?value.map(computeGoal):isAnimatedString(value)?globals_exports.createStringInterpolator({range:[0,1],output:[value,value]})(1):value}function hasProps(props){for(const _ in props)return!0;return!1}function isAsyncTo(to2){return is.fun(to2)||is.arr(to2)&&is.obj(to2[0])}function detachRefs(ctrl,ref){ctrl.ref?.delete(ctrl),ref?.delete(ctrl)}function replaceRef(ctrl,ref){ref&&ctrl.ref!==ref&&(ctrl.ref?.delete(ctrl),ref.add(ctrl),ctrl.ref=ref)}var defaults={tension:170,friction:26,mass:1,damping:1,easing:easings.linear,clamp:!1},AnimationConfig=class{constructor(){this.velocity=0,Object.assign(this,defaults)}};function sanitizeConfig(config2,props){if(is.und(props.decay)){const isTensionConfig=!is.und(props.tension)||!is.und(props.friction);!isTensionConfig&&is.und(props.frequency)&&is.und(props.damping)&&is.und(props.mass)||(config2.duration=void 0,config2.decay=void 0),isTensionConfig&&(config2.frequency=void 0)}else config2.duration=void 0}var emptyArray=[],Animation=class{constructor(){this.changed=!1,this.values=emptyArray,this.toValues=null,this.fromValues=emptyArray,this.config=new AnimationConfig,this.immediate=!1}};function scheduleProps(callId,{key,props,defaultProps,state,actions}){return new Promise(((resolve,reject)=>{let delay,timeout,cancel=matchProp(props.cancel??defaultProps?.cancel,key);if(cancel)onStart();else{is.und(props.pause)||(state.paused=matchProp(props.pause,key));let pause=defaultProps?.pause;!0!==pause&&(pause=state.paused||matchProp(pause,key)),delay=callProp(props.delay||0,key),pause?(state.resumeQueue.add(onResume),actions.pause()):(actions.resume(),onResume())}function onPause(){state.resumeQueue.add(onResume),state.timeouts.delete(timeout),timeout.cancel(),delay=timeout.time-raf.now()}function onResume(){delay>0&&!globals_exports.skipAnimation?(state.delayed=!0,timeout=raf.setTimeout(onStart,delay),state.pauseQueue.add(onPause),state.timeouts.add(timeout)):onStart()}function onStart(){state.delayed&&(state.delayed=!1),state.pauseQueue.delete(onPause),state.timeouts.delete(timeout),callId<=(state.cancelId||0)&&(cancel=!0);try{actions.start({...props,callId,cancel},resolve)}catch(err){reject(err)}}}))}var getCombinedResult=(target,results)=>1==results.length?results[0]:results.some((result=>result.cancelled))?getCancelledResult(target.get()):results.every((result=>result.noop))?getNoopResult(target.get()):getFinishedResult(target.get(),results.every((result=>result.finished))),getNoopResult=value=>({value,noop:!0,finished:!0,cancelled:!1}),getFinishedResult=(value,finished,cancelled=!1)=>({value,finished,cancelled}),getCancelledResult=value=>({value,cancelled:!0,finished:!1});function runAsync(to2,props,state,target){const{callId,parentId,onRest}=props,{asyncTo:prevTo,promise:prevPromise}=state;return parentId||to2!==prevTo||props.reset?state.promise=(async()=>{state.asyncId=callId,state.asyncTo=to2;const defaultProps=getDefaultProps(props,((value,key)=>"onRest"===key?void 0:value));let preventBail,bail;const bailPromise=new Promise(((resolve,reject)=>(preventBail=resolve,bail=reject))),bailIfEnded=bailSignal=>{const bailResult=callId<=(state.cancelId||0)&&getCancelledResult(target)||callId!==state.asyncId&&getFinishedResult(target,!1);if(bailResult)throw bailSignal.result=bailResult,bail(bailSignal),bailSignal},animate=(arg1,arg2)=>{const bailSignal=new BailSignal,skipAnimationSignal=new SkipAnimationSignal;return(async()=>{if(globals_exports.skipAnimation)throw stopAsync(state),skipAnimationSignal.result=getFinishedResult(target,!1),bail(skipAnimationSignal),skipAnimationSignal;bailIfEnded(bailSignal);const props2=is.obj(arg1)?{...arg1}:{...arg2,to:arg1};props2.parentId=callId,eachProp(defaultProps,((value,key)=>{is.und(props2[key])&&(props2[key]=value)}));const result2=await target.start(props2);return bailIfEnded(bailSignal),state.paused&&await new Promise((resume=>{state.resumeQueue.add(resume)})),result2})()};let result;if(globals_exports.skipAnimation)return stopAsync(state),getFinishedResult(target,!1);try{let animating;animating=is.arr(to2)?(async queue=>{for(const props2 of queue)await animate(props2)})(to2):Promise.resolve(to2(animate,target.stop.bind(target))),await Promise.all([animating.then(preventBail),bailPromise]),result=getFinishedResult(target.get(),!0,!1)}catch(err){if(err instanceof BailSignal)result=err.result;else{if(!(err instanceof SkipAnimationSignal))throw err;result=err.result}}finally{callId==state.asyncId&&(state.asyncId=parentId,state.asyncTo=parentId?prevTo:void 0,state.promise=parentId?prevPromise:void 0)}return is.fun(onRest)&&raf.batchedUpdates((()=>{onRest(result,target,target.item)})),result})():prevPromise}function stopAsync(state,cancelId){flush(state.timeouts,(t=>t.cancel())),state.pauseQueue.clear(),state.resumeQueue.clear(),state.asyncId=state.asyncTo=state.promise=void 0,cancelId&&(state.cancelId=cancelId)}var BailSignal=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},SkipAnimationSignal=class extends Error{constructor(){super("SkipAnimationSignal")}},isFrameValue=value=>value instanceof FrameValue,nextId=1,FrameValue=class extends FluidValue{constructor(){super(...arguments),this.id=nextId++,this._priority=0}get priority(){return this._priority}set priority(priority){this._priority!=priority&&(this._priority=priority,this._onPriorityChange(priority))}get(){const node=getAnimated(this);return node&&node.getValue()}to(...args){return globals_exports.to(this,args)}interpolate(...args){return function deprecateInterpolate(){warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`)}(),globals_exports.to(this,args)}toJSON(){return this.get()}observerAdded(count){1==count&&this._attach()}observerRemoved(count){0==count&&this._detach()}_attach(){}_detach(){}_onChange(value,idle=!1){callFluidObservers(this,{type:"change",parent:this,value,idle})}_onPriorityChange(priority){this.idle||frameLoop.sort(this),callFluidObservers(this,{type:"priority",parent:this,priority})}},$P=Symbol.for("SpringPhase"),hasAnimated=target=>(1&target[$P])>0,isAnimating=target=>(2&target[$P])>0,isPaused=target=>(4&target[$P])>0,setActiveBit=(target,active)=>active?target[$P]|=3:target[$P]&=-3,setPausedBit=(target,paused)=>paused?target[$P]|=4:target[$P]&=-5,SpringValue=class extends FrameValue{constructor(arg1,arg2){if(super(),this.animation=new Animation,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!is.und(arg1)||!is.und(arg2)){const props=is.obj(arg1)?{...arg1}:{...arg2,from:arg1};is.und(props.default)&&(props.default=!0),this.start(props)}}get idle(){return!(isAnimating(this)||this._state.asyncTo)||isPaused(this)}get goal(){return getFluidValue(this.animation.to)}get velocity(){const node=getAnimated(this);return node instanceof AnimatedValue?node.lastVelocity||0:node.getPayload().map((node2=>node2.lastVelocity||0))}get hasAnimated(){return hasAnimated(this)}get isAnimating(){return isAnimating(this)}get isPaused(){return isPaused(this)}get isDelayed(){return this._state.delayed}advance(dt){let idle=!0,changed=!1;const anim=this.animation;let{toValues}=anim;const{config:config2}=anim,payload=getPayload(anim.to);!payload&&hasFluidValue(anim.to)&&(toValues=toArray(getFluidValue(anim.to))),anim.values.forEach(((node2,i)=>{if(node2.done)return;const to2=node2.constructor==AnimatedString?1:payload?payload[i].lastPosition:toValues[i];let finished=anim.immediate,position=to2;if(!finished){if(position=node2.lastPosition,config2.tension<=0)return void(node2.done=!0);let elapsed=node2.elapsedTime+=dt;const from=anim.fromValues[i],v0=null!=node2.v0?node2.v0:node2.v0=is.arr(config2.velocity)?config2.velocity[i]:config2.velocity;let velocity;const precision=config2.precision||(from==to2?.005:Math.min(1,.001*Math.abs(to2-from)));if(is.und(config2.duration))if(config2.decay){const decay=!0===config2.decay?.998:config2.decay,e=Math.exp(-(1-decay)*elapsed);position=from+v0/(1-decay)*(1-e),finished=Math.abs(node2.lastPosition-position)<=precision,velocity=v0*e}else{velocity=null==node2.lastVelocity?v0:node2.lastVelocity;const restVelocity=config2.restVelocity||precision/10,bounceFactor=config2.clamp?0:config2.bounce,canBounce=!is.und(bounceFactor),isGrowing=from==to2?node2.v0>0:from<to2;let isMoving,isBouncing=!1;const step=1,numSteps=Math.ceil(dt/step);for(let n=0;n<numSteps&&(isMoving=Math.abs(velocity)>restVelocity,isMoving||(finished=Math.abs(to2-position)<=precision,!finished));++n){canBounce&&(isBouncing=position==to2||position>to2==isGrowing,isBouncing&&(velocity=-velocity*bounceFactor,position=to2));velocity+=(1e-6*-config2.tension*(position-to2)+.001*-config2.friction*velocity)/config2.mass*step,position+=velocity*step}}else{let p=1;config2.duration>0&&(this._memoizedDuration!==config2.duration&&(this._memoizedDuration=config2.duration,node2.durationProgress>0&&(node2.elapsedTime=config2.duration*node2.durationProgress,elapsed=node2.elapsedTime+=dt)),p=(config2.progress||0)+elapsed/this._memoizedDuration,p=p>1?1:p<0?0:p,node2.durationProgress=p),position=from+config2.easing(p)*(to2-from),velocity=(position-node2.lastPosition)/dt,finished=1==p}node2.lastVelocity=velocity,Number.isNaN(position)&&(console.warn("Got NaN while animating:",this),finished=!0)}payload&&!payload[i].done&&(finished=!1),finished?node2.done=!0:idle=!1,node2.setValue(position,config2.round)&&(changed=!0)}));const node=getAnimated(this),currVal=node.getValue();if(idle){const finalVal=getFluidValue(anim.to);currVal===finalVal&&!changed||config2.decay?changed&&config2.decay&&this._onChange(currVal):(node.setValue(finalVal),this._onChange(finalVal)),this._stop()}else changed&&this._onChange(currVal)}set(value){return raf.batchedUpdates((()=>{this._stop(),this._focus(value),this._set(value)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(isAnimating(this)){const{to:to2,config:config2}=this.animation;raf.batchedUpdates((()=>{this._onStart(),config2.decay||this._set(to2,!1),this._stop()}))}return this}update(props){return(this.queue||(this.queue=[])).push(props),this}start(to2,arg2){let queue;return is.und(to2)?(queue=this.queue||[],this.queue=[]):queue=[is.obj(to2)?to2:{...arg2,to:to2}],Promise.all(queue.map((props=>this._update(props)))).then((results=>getCombinedResult(this,results)))}stop(cancel){const{to:to2}=this.animation;return this._focus(this.get()),stopAsync(this._state,cancel&&this._lastCallId),raf.batchedUpdates((()=>this._stop(to2,cancel))),this}reset(){this._update({reset:!0})}eventObserved(event){"change"==event.type?this._start():"priority"==event.type&&(this.priority=event.priority+1)}_prepareNode(props){const key=this.key||"";let{to:to2,from}=props;to2=is.obj(to2)?to2[key]:to2,(null==to2||isAsyncTo(to2))&&(to2=void 0),from=is.obj(from)?from[key]:from,null==from&&(from=void 0);const range={to:to2,from};return hasAnimated(this)||(props.reverse&&([to2,from]=[from,to2]),from=getFluidValue(from),is.und(from)?getAnimated(this)||this._set(to2):this._set(from)),range}_update({...props},isLoop){const{key,defaultProps}=this;props.default&&Object.assign(defaultProps,getDefaultProps(props,((value,prop)=>/^on/.test(prop)?resolveProp(value,key):value))),mergeActiveFn(this,props,"onProps"),sendEvent(this,"onProps",props,this);const range=this._prepareNode(props);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const state=this._state;return scheduleProps(++this._lastCallId,{key,props,defaultProps,state,actions:{pause:()=>{isPaused(this)||(setPausedBit(this,!0),flushCalls(state.pauseQueue),sendEvent(this,"onPause",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},resume:()=>{isPaused(this)&&(setPausedBit(this,!1),isAnimating(this)&&this._resume(),flushCalls(state.resumeQueue),sendEvent(this,"onResume",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},start:this._merge.bind(this,range)}}).then((result=>{if(props.loop&&result.finished&&(!isLoop||!result.noop)){const nextProps=createLoopUpdate(props);if(nextProps)return this._update(nextProps,!0)}return result}))}_merge(range,props,resolve){if(props.cancel)return this.stop(!0),resolve(getCancelledResult(this));const hasToProp=!is.und(range.to),hasFromProp=!is.und(range.from);if(hasToProp||hasFromProp){if(!(props.callId>this._lastToId))return resolve(getCancelledResult(this));this._lastToId=props.callId}const{key,defaultProps,animation:anim}=this,{to:prevTo,from:prevFrom}=anim;let{to:to2=prevTo,from=prevFrom}=range;!hasFromProp||hasToProp||props.default&&!is.und(to2)||(to2=from),props.reverse&&([to2,from]=[from,to2]);const hasFromChanged=!isEqual(from,prevFrom);hasFromChanged&&(anim.from=from),from=getFluidValue(from);const hasToChanged=!isEqual(to2,prevTo);hasToChanged&&this._focus(to2);const hasAsyncTo=isAsyncTo(props.to),{config:config2}=anim,{decay,velocity}=config2;(hasToProp||hasFromProp)&&(config2.velocity=0),props.config&&!hasAsyncTo&&function mergeConfig(config2,newConfig,defaultConfig){defaultConfig&&(sanitizeConfig(defaultConfig={...defaultConfig},newConfig),newConfig={...defaultConfig,...newConfig}),sanitizeConfig(config2,newConfig),Object.assign(config2,newConfig);for(const key in defaults)null==config2[key]&&(config2[key]=defaults[key]);let{frequency,damping}=config2;const{mass}=config2;return is.und(frequency)||(frequency<.01&&(frequency=.01),damping<0&&(damping=0),config2.tension=Math.pow(2*Math.PI/frequency,2)*mass,config2.friction=4*Math.PI*damping*mass/frequency),config2}(config2,callProp(props.config,key),props.config!==defaultProps.config?callProp(defaultProps.config,key):void 0);let node=getAnimated(this);if(!node||is.und(to2))return resolve(getFinishedResult(this,!0));const reset=is.und(props.reset)?hasFromProp&&!props.default:!is.und(from)&&matchProp(props.reset,key),value=reset?from:this.get(),goal=computeGoal(to2),isAnimatable=is.num(goal)||is.arr(goal)||isAnimatedString(goal),immediate=!hasAsyncTo&&(!isAnimatable||matchProp(defaultProps.immediate||props.immediate,key));if(hasToChanged){const nodeType=getAnimatedType(to2);if(nodeType!==node.constructor){if(!immediate)throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`);node=this._set(goal)}}const goalType=node.constructor;let started=hasFluidValue(to2),finished=!1;if(!started){const hasValueChanged=reset||!hasAnimated(this)&&hasFromChanged;(hasToChanged||hasValueChanged)&&(finished=isEqual(computeGoal(value),goal),started=!finished),(isEqual(anim.immediate,immediate)||immediate)&&isEqual(config2.decay,decay)&&isEqual(config2.velocity,velocity)||(started=!0)}if(finished&&isAnimating(this)&&(anim.changed&&!reset?started=!0:started||this._stop(prevTo)),!hasAsyncTo&&((started||hasFluidValue(prevTo))&&(anim.values=node.getPayload(),anim.toValues=hasFluidValue(to2)?null:goalType==AnimatedString?[1]:toArray(goal)),anim.immediate!=immediate&&(anim.immediate=immediate,immediate||reset||this._set(prevTo)),started)){const{onRest}=anim;react_spring_shared_modern_each(ACTIVE_EVENTS,(type=>mergeActiveFn(this,props,type)));const result=getFinishedResult(this,checkFinished(this,prevTo));flushCalls(this._pendingCalls,result),this._pendingCalls.add(resolve),anim.changed&&raf.batchedUpdates((()=>{anim.changed=!reset,onRest?.(result,this),reset?callProp(defaultProps.onRest,result):anim.onStart?.(result,this)}))}reset&&this._set(value),hasAsyncTo?resolve(runAsync(props.to,props,this._state,this)):started?this._start():isAnimating(this)&&!hasToChanged?this._pendingCalls.add(resolve):resolve(getNoopResult(value))}_focus(value){const anim=this.animation;value!==anim.to&&(getFluidObservers(this)&&this._detach(),anim.to=value,getFluidObservers(this)&&this._attach())}_attach(){let priority=0;const{to:to2}=this.animation;hasFluidValue(to2)&&(addFluidObserver(to2,this),isFrameValue(to2)&&(priority=to2.priority+1)),this.priority=priority}_detach(){const{to:to2}=this.animation;hasFluidValue(to2)&&removeFluidObserver(to2,this)}_set(arg,idle=!0){const value=getFluidValue(arg);if(!is.und(value)){const oldNode=getAnimated(this);if(!oldNode||!isEqual(value,oldNode.getValue())){const nodeType=getAnimatedType(value);oldNode&&oldNode.constructor==nodeType?oldNode.setValue(value):setAnimated(this,nodeType.create(value)),oldNode&&raf.batchedUpdates((()=>{this._onChange(value,idle)}))}}return getAnimated(this)}_onStart(){const anim=this.animation;anim.changed||(anim.changed=!0,sendEvent(this,"onStart",getFinishedResult(this,checkFinished(this,anim.to)),this))}_onChange(value,idle){idle||(this._onStart(),callProp(this.animation.onChange,value,this)),callProp(this.defaultProps.onChange,value,this),super._onChange(value,idle)}_start(){const anim=this.animation;getAnimated(this).reset(getFluidValue(anim.to)),anim.immediate||(anim.fromValues=anim.values.map((node=>node.lastPosition))),isAnimating(this)||(setActiveBit(this,!0),isPaused(this)||this._resume())}_resume(){globals_exports.skipAnimation?this.finish():frameLoop.start(this)}_stop(goal,cancel){if(isAnimating(this)){setActiveBit(this,!1);const anim=this.animation;react_spring_shared_modern_each(anim.values,(node=>{node.done=!0})),anim.toValues&&(anim.onChange=anim.onPause=anim.onResume=void 0),callFluidObservers(this,{type:"idle",parent:this});const result=cancel?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,goal??anim.to));flushCalls(this._pendingCalls,result),anim.changed&&(anim.changed=!1,sendEvent(this,"onRest",result,this))}}};function checkFinished(target,to2){const goal=computeGoal(to2);return isEqual(computeGoal(target.get()),goal)}function createLoopUpdate(props,loop=props.loop,to2=props.to){const loopRet=callProp(loop);if(loopRet){const overrides=!0!==loopRet&&inferTo(loopRet),reverse=(overrides||props).reverse,reset=!overrides||overrides.reset;return createUpdate({...props,loop,default:!1,pause:void 0,to:!reverse||isAsyncTo(to2)?to2:void 0,from:reset?props.from:void 0,reset,...overrides})}}function createUpdate(props){const{to:to2,from}=props=inferTo(props),keys=new Set;return is.obj(to2)&&findDefined(to2,keys),is.obj(from)&&findDefined(from,keys),props.keys=keys.size?Array.from(keys):null,props}function declareUpdate(props){const update2=createUpdate(props);return is.und(update2.default)&&(update2.default=getDefaultProps(update2)),update2}function findDefined(values,keys){eachProp(values,((value,key)=>null!=value&&keys.add(key)))}var ACTIVE_EVENTS=["onStart","onRest","onChange","onPause","onResume"];function mergeActiveFn(target,props,type){target.animation[type]=props[type]!==getDefaultProp(props,type)?resolveProp(props[type],target.key):void 0}function sendEvent(target,type,...args){target.animation[type]?.(...args),target.defaultProps[type]?.(...args)}var BATCHED_EVENTS=["onStart","onChange","onRest"],nextId2=1,Controller=class{constructor(props,flush3){this.id=nextId2++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),flush3&&(this._flush=flush3),props&&this.start({default:!0,...props})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((spring=>spring.idle&&!spring.isDelayed&&!spring.isPaused))}get item(){return this._item}set item(item){this._item=item}get(){const values={};return this.each(((spring,key)=>values[key]=spring.get())),values}set(values){for(const key in values){const value=values[key];is.und(value)||this.springs[key].set(value)}}update(props){return props&&this.queue.push(createUpdate(props)),this}start(props){let{queue}=this;return props?queue=toArray(props).map(createUpdate):this.queue=[],this._flush?this._flush(this,queue):(prepareKeys(this,queue),flushUpdateQueue(this,queue))}stop(arg,keys){if(arg!==!!arg&&(keys=arg),keys){const springs=this.springs;react_spring_shared_modern_each(toArray(keys),(key=>springs[key].stop(!!arg)))}else stopAsync(this._state,this._lastAsyncId),this.each((spring=>spring.stop(!!arg)));return this}pause(keys){if(is.und(keys))this.start({pause:!0});else{const springs=this.springs;react_spring_shared_modern_each(toArray(keys),(key=>springs[key].pause()))}return this}resume(keys){if(is.und(keys))this.start({pause:!1});else{const springs=this.springs;react_spring_shared_modern_each(toArray(keys),(key=>springs[key].resume()))}return this}each(iterator){eachProp(this.springs,iterator)}_onFrame(){const{onStart,onChange,onRest}=this._events,active=this._active.size>0,changed=this._changed.size>0;(active&&!this._started||changed&&!this._started)&&(this._started=!0,flush(onStart,(([onStart2,result])=>{result.value=this.get(),onStart2(result,this,this._item)})));const idle=!active&&this._started,values=changed||idle&&onRest.size?this.get():null;changed&&onChange.size&&flush(onChange,(([onChange2,result])=>{result.value=values,onChange2(result,this,this._item)})),idle&&(this._started=!1,flush(onRest,(([onRest2,result])=>{result.value=values,onRest2(result,this,this._item)})))}eventObserved(event){if("change"==event.type)this._changed.add(event.parent),event.idle||this._active.add(event.parent);else{if("idle"!=event.type)return;this._active.delete(event.parent)}raf.onFrame(this._onFrame)}};function flushUpdateQueue(ctrl,queue){return Promise.all(queue.map((props=>flushUpdate(ctrl,props)))).then((results=>getCombinedResult(ctrl,results)))}async function flushUpdate(ctrl,props,isLoop){const{keys,to:to2,from,loop,onRest,onResolve}=props,defaults2=is.obj(props.default)&&props.default;loop&&(props.loop=!1),!1===to2&&(props.to=null),!1===from&&(props.from=null);const asyncTo=is.arr(to2)||is.fun(to2)?to2:void 0;asyncTo?(props.to=void 0,props.onRest=void 0,defaults2&&(defaults2.onRest=void 0)):react_spring_shared_modern_each(BATCHED_EVENTS,(key=>{const handler=props[key];if(is.fun(handler)){const queue=ctrl._events[key];props[key]=({finished,cancelled})=>{const result2=queue.get(handler);result2?(finished||(result2.finished=!1),cancelled&&(result2.cancelled=!0)):queue.set(handler,{value:null,finished:finished||!1,cancelled:cancelled||!1})},defaults2&&(defaults2[key]=props[key])}}));const state=ctrl._state;props.pause===!state.paused?(state.paused=props.pause,flushCalls(props.pause?state.pauseQueue:state.resumeQueue)):state.paused&&(props.pause=!0);const promises=(keys||Object.keys(ctrl.springs)).map((key=>ctrl.springs[key].start(props))),cancel=!0===props.cancel||!0===getDefaultProp(props,"cancel");(asyncTo||cancel&&state.asyncId)&&promises.push(scheduleProps(++ctrl._lastAsyncId,{props,state,actions:{pause:react_spring_shared_modern_noop,resume:react_spring_shared_modern_noop,start(props2,resolve){cancel?(stopAsync(state,ctrl._lastAsyncId),resolve(getCancelledResult(ctrl))):(props2.onRest=onRest,resolve(runAsync(asyncTo,props2,state,ctrl)))}}})),state.paused&&await new Promise((resume=>{state.resumeQueue.add(resume)}));const result=getCombinedResult(ctrl,await Promise.all(promises));if(loop&&result.finished&&(!isLoop||!result.noop)){const nextProps=createLoopUpdate(props,loop,to2);if(nextProps)return prepareKeys(ctrl,[nextProps]),flushUpdate(ctrl,nextProps,!0)}return onResolve&&raf.batchedUpdates((()=>onResolve(result,ctrl,ctrl.item))),result}function getSprings(ctrl,props){const springs={...ctrl.springs};return props&&react_spring_shared_modern_each(toArray(props),(props2=>{is.und(props2.keys)&&(props2=createUpdate(props2)),is.obj(props2.to)||(props2={...props2,to:void 0}),prepareSprings(springs,props2,(key=>createSpring(key)))})),setSprings(ctrl,springs),springs}function setSprings(ctrl,springs){eachProp(springs,((spring,key)=>{ctrl.springs[key]||(ctrl.springs[key]=spring,addFluidObserver(spring,ctrl))}))}function createSpring(key,observer){const spring=new SpringValue;return spring.key=key,observer&&addFluidObserver(spring,observer),spring}function prepareSprings(springs,props,create){props.keys&&react_spring_shared_modern_each(props.keys,(key=>{(springs[key]||(springs[key]=create(key)))._prepareNode(props)}))}function prepareKeys(ctrl,queue){react_spring_shared_modern_each(queue,(props=>{prepareSprings(ctrl.springs,props,(key=>createSpring(key,ctrl)))}))}var SpringContext=({children,...props})=>{const inherited=(0,react.useContext)(ctx),pause=props.pause||!!inherited.pause,immediate=props.immediate||!!inherited.immediate;props=function react_spring_shared_modern_useMemoOne(getResult,inputs){const[initial]=(0,react.useState)((()=>({inputs,result:getResult()}))),committed=(0,react.useRef)(),prevCache=committed.current;let cache=prevCache;cache?Boolean(inputs&&cache.inputs&&function areInputsEqual(next,prev){if(next.length!==prev.length)return!1;for(let i=0;i<next.length;i++)if(next[i]!==prev[i])return!1;return!0}(inputs,cache.inputs))||(cache={inputs,result:getResult()}):cache=initial;return(0,react.useEffect)((()=>{committed.current=cache,prevCache==initial&&(initial.inputs=initial.result=void 0)}),[cache]),cache.result}((()=>({pause,immediate})),[pause,immediate]);const{Provider}=ctx;return react.createElement(Provider,{value:props},children)},ctx=function makeContext(target,init){return Object.assign(target,react.createContext(init)),target.Provider._context=target,target.Consumer._context=target,target}(SpringContext,{});SpringContext.Provider=ctx.Provider,SpringContext.Consumer=ctx.Consumer;var SpringRef=()=>{const current=[],SpringRef2=function(props){!function deprecateDirectCall(){warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}();const results=[];return react_spring_shared_modern_each(current,((ctrl,i)=>{if(is.und(props))results.push(ctrl.start());else{const update2=_getProps(props,ctrl,i);update2&&results.push(ctrl.start(update2))}})),results};SpringRef2.current=current,SpringRef2.add=function(ctrl){current.includes(ctrl)||current.push(ctrl)},SpringRef2.delete=function(ctrl){const i=current.indexOf(ctrl);~i&&current.splice(i,1)},SpringRef2.pause=function(){return react_spring_shared_modern_each(current,(ctrl=>ctrl.pause(...arguments))),this},SpringRef2.resume=function(){return react_spring_shared_modern_each(current,(ctrl=>ctrl.resume(...arguments))),this},SpringRef2.set=function(values){react_spring_shared_modern_each(current,((ctrl,i)=>{const update2=is.fun(values)?values(i,ctrl):values;update2&&ctrl.set(update2)}))},SpringRef2.start=function(props){const results=[];return react_spring_shared_modern_each(current,((ctrl,i)=>{if(is.und(props))results.push(ctrl.start());else{const update2=this._getProps(props,ctrl,i);update2&&results.push(ctrl.start(update2))}})),results},SpringRef2.stop=function(){return react_spring_shared_modern_each(current,(ctrl=>ctrl.stop(...arguments))),this},SpringRef2.update=function(props){return react_spring_shared_modern_each(current,((ctrl,i)=>ctrl.update(this._getProps(props,ctrl,i)))),this};const _getProps=function(arg,ctrl,index){return is.fun(arg)?arg(index,ctrl):arg};return SpringRef2._getProps=_getProps,SpringRef2};function useSprings(length,props,deps){const propsFn=is.fun(props)&&props;propsFn&&!deps&&(deps=[]);const ref=(0,react.useMemo)((()=>propsFn||3==arguments.length?SpringRef():void 0),[]),layoutId=(0,react.useRef)(0),forceUpdate=react_spring_shared_modern_useForceUpdate(),state=(0,react.useMemo)((()=>({ctrls:[],queue:[],flush(ctrl,updates2){const springs2=getSprings(ctrl,updates2);return layoutId.current>0&&!state.queue.length&&!Object.keys(springs2).some((key=>!ctrl.springs[key]))?flushUpdateQueue(ctrl,updates2):new Promise((resolve=>{setSprings(ctrl,springs2),state.queue.push((()=>{resolve(flushUpdateQueue(ctrl,updates2))})),forceUpdate()}))}})),[]),ctrls=(0,react.useRef)([...state.ctrls]),updates=[],prevLength=usePrev(length)||0;function declareUpdates(startIndex,endIndex){for(let i=startIndex;i<endIndex;i++){const ctrl=ctrls.current[i]||(ctrls.current[i]=new Controller(null,state.flush)),update2=propsFn?propsFn(i,ctrl):props[i];update2&&(updates[i]=declareUpdate(update2))}}(0,react.useMemo)((()=>{react_spring_shared_modern_each(ctrls.current.slice(length,prevLength),(ctrl=>{detachRefs(ctrl,ref),ctrl.stop(!0)})),ctrls.current.length=length,declareUpdates(prevLength,length)}),[length]),(0,react.useMemo)((()=>{declareUpdates(0,Math.min(prevLength,length))}),deps);const springs=ctrls.current.map(((ctrl,i)=>getSprings(ctrl,updates[i]))),context=(0,react.useContext)(SpringContext),prevContext=usePrev(context),hasContext=context!==prevContext&&hasProps(context);react_spring_shared_modern_useIsomorphicLayoutEffect((()=>{layoutId.current++,state.ctrls=ctrls.current;const{queue}=state;queue.length&&(state.queue=[],react_spring_shared_modern_each(queue,(cb=>cb()))),react_spring_shared_modern_each(ctrls.current,((ctrl,i)=>{ref?.add(ctrl),hasContext&&ctrl.start({default:context});const update2=updates[i];update2&&(replaceRef(ctrl,update2.ref),ctrl.ref?ctrl.queue.push(update2):ctrl.start(update2))}))})),useOnce((()=>()=>{react_spring_shared_modern_each(state.ctrls,(ctrl=>ctrl.stop(!0)))}));const values=springs.map((x=>({...x})));return ref?[values,ref]:values}function useSpring(props,deps){const isFn=is.fun(props),[[values],ref]=useSprings(1,isFn?props:[props],isFn?deps||[]:deps);return isFn||2==arguments.length?[values,ref]:values}var Interpolation=class extends FrameValue{constructor(source,args){super(),this.source=source,this.idle=!0,this._active=new Set,this.calc=createInterpolator(...args);const value=this._get(),nodeType=getAnimatedType(value);setAnimated(this,nodeType.create(value))}advance(_dt){const value=this._get();isEqual(value,this.get())||(getAnimated(this).setValue(value),this._onChange(value,this.idle)),!this.idle&&checkIdle(this._active)&&becomeIdle(this)}_get(){const inputs=is.arr(this.source)?this.source.map(getFluidValue):toArray(getFluidValue(this.source));return this.calc(...inputs)}_start(){this.idle&&!checkIdle(this._active)&&(this.idle=!1,react_spring_shared_modern_each(getPayload(this),(node=>{node.done=!1})),globals_exports.skipAnimation?(raf.batchedUpdates((()=>this.advance())),becomeIdle(this)):frameLoop.start(this))}_attach(){let priority=1;react_spring_shared_modern_each(toArray(this.source),(source=>{hasFluidValue(source)&&addFluidObserver(source,this),isFrameValue(source)&&(source.idle||this._active.add(source),priority=Math.max(priority,source.priority+1))})),this.priority=priority,this._start()}_detach(){react_spring_shared_modern_each(toArray(this.source),(source=>{hasFluidValue(source)&&removeFluidObserver(source,this)})),this._active.clear(),becomeIdle(this)}eventObserved(event){"change"==event.type?event.idle?this.advance():(this._active.add(event.parent),this._start()):"idle"==event.type?this._active.delete(event.parent):"priority"==event.type&&(this.priority=toArray(this.source).reduce(((highest,parent)=>Math.max(highest,(isFrameValue(parent)?parent.priority:0)+1)),0))}};function isIdle(source){return!1!==source.idle}function checkIdle(active){return!active.size||Array.from(active).every(isIdle)}function becomeIdle(self){self.idle||(self.idle=!0,react_spring_shared_modern_each(getPayload(self),(node=>{node.done=!0})),callFluidObservers(self,{type:"idle",parent:self}))}globals_exports.assign({createStringInterpolator:createStringInterpolator2,to:(source,args)=>new Interpolation(source,args)});frameLoop.advance;var isCustomPropRE=/^--/;function dangerousStyleValue(name,value){return null==value||"boolean"==typeof value||""===value?"":"number"!=typeof value||0===value||isCustomPropRE.test(name)||isUnitlessNumber.hasOwnProperty(name)&&isUnitlessNumber[name]?(""+value).trim():value+"px"}var attributeCache={};var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},prefixes=["Webkit","Ms","Moz","O"];isUnitlessNumber=Object.keys(isUnitlessNumber).reduce(((acc,prop)=>(prefixes.forEach((prefix=>acc[((prefix,key)=>prefix+key.charAt(0).toUpperCase()+key.substring(1))(prefix,prop)]=acc[prop])),acc)),isUnitlessNumber);var domTransforms=/^(matrix|translate|scale|rotate|skew)/,pxTransforms=/^(translate)/,degTransforms=/^(rotate|skew)/,addUnit=(value,unit)=>is.num(value)&&0!==value?value+unit:value,isValueIdentity=(value,id)=>is.arr(value)?value.every((v=>isValueIdentity(v,id))):is.num(value)?value===id:parseFloat(value)===id,AnimatedStyle=class extends AnimatedObject{constructor({x,y,z,...style}){const inputs=[],transforms=[];(x||y||z)&&(inputs.push([x||0,y||0,z||0]),transforms.push((xyz=>[`translate3d(${xyz.map((v=>addUnit(v,"px"))).join(",")})`,isValueIdentity(xyz,0)]))),eachProp(style,((value,key)=>{if("transform"===key)inputs.push([value||""]),transforms.push((transform=>[transform,""===transform]));else if(domTransforms.test(key)){if(delete style[key],is.und(value))return;const unit=pxTransforms.test(key)?"px":degTransforms.test(key)?"deg":"";inputs.push(toArray(value)),transforms.push("rotate3d"===key?([x2,y2,z2,deg])=>[`rotate3d(${x2},${y2},${z2},${addUnit(deg,unit)})`,isValueIdentity(deg,0)]:input=>[`${key}(${input.map((v=>addUnit(v,unit))).join(",")})`,isValueIdentity(input,key.startsWith("scale")?1:0)])}})),inputs.length&&(style.transform=new FluidTransform(inputs,transforms)),super(style)}},FluidTransform=class extends FluidValue{constructor(inputs,transforms){super(),this.inputs=inputs,this.transforms=transforms,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let transform="",identity=!0;return react_spring_shared_modern_each(this.inputs,((input,i)=>{const arg1=getFluidValue(input[0]),[t,id]=this.transforms[i](is.arr(arg1)?arg1:input.map(getFluidValue));transform+=" "+t,identity=identity&&id})),identity?"none":transform}observerAdded(count){1==count&&react_spring_shared_modern_each(this.inputs,(input=>react_spring_shared_modern_each(input,(value=>hasFluidValue(value)&&addFluidObserver(value,this)))))}observerRemoved(count){0==count&&react_spring_shared_modern_each(this.inputs,(input=>react_spring_shared_modern_each(input,(value=>hasFluidValue(value)&&removeFluidObserver(value,this)))))}eventObserved(event){"change"==event.type&&(this._value=null),callFluidObservers(this,event)}};globals_exports.assign({batchedUpdates:react_dom.unstable_batchedUpdates,createStringInterpolator:createStringInterpolator2,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var host=((components,{applyAnimatedValues=()=>!1,createAnimatedStyle=style=>new AnimatedObject(style),getComponentProps=props=>props}={})=>{const hostConfig={applyAnimatedValues,createAnimatedStyle,getComponentProps},animated=Component=>{const displayName=getDisplayName(Component)||"Anonymous";return(Component=is.str(Component)?animated[Component]||(animated[Component]=withAnimated(Component,hostConfig)):Component[cacheKey]||(Component[cacheKey]=withAnimated(Component,hostConfig))).displayName=`Animated(${displayName})`,Component};return eachProp(components,((Component,key)=>{is.arr(components)&&(key=getDisplayName(Component)),animated[key]=animated(Component)})),{animated}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function applyAnimatedValues(instance,props){if(!instance.nodeType||!instance.setAttribute)return!1;const isFilterElement="filter"===instance.nodeName||instance.parentNode&&"filter"===instance.parentNode.nodeName,{style,children,scrollTop,scrollLeft,viewBox,...attributes}=props,values=Object.values(attributes),names=Object.keys(attributes).map((name=>isFilterElement||instance.hasAttribute(name)?name:attributeCache[name]||(attributeCache[name]=name.replace(/([A-Z])/g,(n=>"-"+n.toLowerCase())))));void 0!==children&&(instance.textContent=children);for(const name in style)if(style.hasOwnProperty(name)){const value=dangerousStyleValue(name,style[name]);isCustomPropRE.test(name)?instance.style.setProperty(name,value):instance.style[name]=value}names.forEach(((name,i)=>{instance.setAttribute(name,values[i])})),void 0!==scrollTop&&(instance.scrollTop=scrollTop),void 0!==scrollLeft&&(instance.scrollLeft=scrollLeft),void 0!==viewBox&&instance.setAttribute("viewBox",viewBox)},createAnimatedStyle:style=>new AnimatedStyle(style),getComponentProps:({scrollTop,scrollLeft,...props})=>props}),assert_is_defined=(host.animated,__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/utils/assert-is-defined.js"));function getComputedStyle(element){return(0,assert_is_defined.e)(element.ownerDocument.defaultView,"element.ownerDocument.defaultView"),element.ownerDocument.defaultView.getComputedStyle(element)}function getScrollContainer(node){if(node){if(node.scrollHeight>node.clientHeight){const{overflowY}=getComputedStyle(node);if(/(auto|scroll)/.test(overflowY))return node}return node.ownerDocument===node.parentNode?node:getScrollContainer(node.parentNode)}}const counterReducer=state=>state+1,getAbsolutePosition=element=>({top:element.offsetTop,left:element.offsetLeft});const use_moving_animation=function useMovingAnimation(_ref){let{isSelected,adjustScrolling,enableAnimation,triggerAnimationOnChange}=_ref;const ref=(0,react.useRef)(),prefersReducedMotion=hooks_use_reduced_motion()||!enableAnimation,[triggeredAnimation,triggerAnimation]=(0,react.useReducer)(counterReducer,0),[finishedAnimation,endAnimation]=(0,react.useReducer)(counterReducer,0),[transform,setTransform]=(0,react.useState)({x:0,y:0}),previous=(0,react.useMemo)((()=>ref.current?getAbsolutePosition(ref.current):null),[triggerAnimationOnChange]),preserveScrollPosition=(0,react.useMemo)((()=>{if(!adjustScrolling||!ref.current)return()=>{};const scrollContainer=getScrollContainer(ref.current);if(!scrollContainer)return()=>{};const prevRect=ref.current.getBoundingClientRect();return()=>{const diff=ref.current.getBoundingClientRect().top-prevRect.top;diff&&(scrollContainer.scrollTop+=diff)}}),[triggerAnimationOnChange,adjustScrolling]);function onChange(_ref3){let{value}=_ref3,{x,y}=value;x=Math.round(x),y=Math.round(y),x===onChange.x&&y===onChange.y||(!function onFrameChange(_ref2){let{x,y}=_ref2;if(!ref.current)return;const isMoving=0===x&&0===y;ref.current.style.transformOrigin=isMoving?"":"center",ref.current.style.transform=isMoving?"":`translate3d(${x}px,${y}px,0)`,ref.current.style.zIndex=!isSelected||isMoving?"":"1",preserveScrollPosition()}({x,y}),onChange.x=x,onChange.y=y)}return(0,react.useLayoutEffect)((()=>{triggeredAnimation&&endAnimation()}),[triggeredAnimation]),(0,react.useLayoutEffect)((()=>{if(!previous)return;if(prefersReducedMotion)return void preserveScrollPosition();ref.current.style.transform="";const destination=getAbsolutePosition(ref.current);triggerAnimation(),setTransform({x:Math.round(previous.left-destination.left),y:Math.round(previous.top-destination.top)})}),[triggerAnimationOnChange]),onChange.x=0,onChange.y=0,useSpring({from:{x:transform.x,y:transform.y},to:{x:0,y:0},reset:triggeredAnimation!==finishedAnimation,config:{mass:5,tension:2e3,friction:200},immediate:prefersReducedMotion,onChange}),ref};function isTextField(node){return function isHTMLInputElement(node){return"INPUT"===(null==node?void 0:node.nodeName)}(node)&&node.type&&!["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"].includes(node.type)||"TEXTAREA"===node.nodeName||"true"===node.contentEditable}function isInputOrTextArea(element){return"INPUT"===element.tagName||"TEXTAREA"===element.tagName}function isFormElement(element){if(!element)return!1;const{tagName}=element;return isInputOrTextArea(element)||"BUTTON"===tagName||"SELECT"===tagName}function hiddenCaretRangeFromPoint(doc,x,y,container){const originalZIndex=container.style.zIndex,originalPosition=container.style.position,{position="static"}=getComputedStyle(container);"static"===position&&(container.style.position="relative"),container.style.zIndex="10000";const range=function caretRangeFromPoint(doc,x,y){if(doc.caretRangeFromPoint)return doc.caretRangeFromPoint(x,y);if(!doc.caretPositionFromPoint)return null;const point=doc.caretPositionFromPoint(x,y);if(!point)return null;const range=doc.createRange();return range.setStart(point.offsetNode,point.offset),range.collapse(!0),range}(doc,x,y);return container.style.zIndex=originalZIndex,container.style.position=originalPosition,range}function isRTL(element){return"rtl"===getComputedStyle(element).direction}function getRange(container,isReverse,x){const{ownerDocument}=container,isReverseDir=isRTL(container)?!isReverse:isReverse,containerRect=container.getBoundingClientRect();void 0===x?x=isReverse?containerRect.right-1:containerRect.left+1:x<=containerRect.left?x=containerRect.left+1:x>=containerRect.right&&(x=containerRect.right-1);return hiddenCaretRangeFromPoint(ownerDocument,x,isReverseDir?containerRect.bottom-1:containerRect.top+1,container)}function placeCaretAtEdge(container,isReverse,x){if(!container)return;if(container.focus(),isInputOrTextArea(container)){if("number"!=typeof container.selectionStart)return;return void(isReverse?(container.selectionStart=container.value.length,container.selectionEnd=container.value.length):(container.selectionStart=0,container.selectionEnd=0))}if(!container.isContentEditable)return;let range=getRange(container,isReverse,x);if(!(range&&range.startContainer&&container.contains(range.startContainer)||(container.scrollIntoView(isReverse),range=range=getRange(container,isReverse,x),range&&range.startContainer&&container.contains(range.startContainer))))return;const{ownerDocument}=container,{defaultView}=ownerDocument;(0,assert_is_defined.e)(defaultView,"defaultView");const selection=defaultView.getSelection();(0,assert_is_defined.e)(selection,"selection"),selection.removeAllRanges(),selection.addRange(range)}function placeCaretAtHorizontalEdge(container,isReverse){return placeCaretAtEdge(container,isReverse,void 0)}const BLOCK_SELECTOR=".block-editor-block-list__block",APPENDER_SELECTOR=".block-list-appender",BLOCK_APPENDER_CLASS=".block-editor-button-block-appender";function isInsideRootBlock(blockElement,element){return element.closest([BLOCK_SELECTOR,APPENDER_SELECTOR,BLOCK_APPENDER_CLASS].join(","))===blockElement}function getBlockClientId(node){for(;node&&node.nodeType!==node.ELEMENT_NODE;)node=node.parentNode;if(!node)return;const blockNode=node.closest(BLOCK_SELECTOR);return blockNode?blockNode.id.slice(6):void 0}function useFocusFirstElement(clientId){const ref=(0,react.useRef)(),initialPosition=function useInitialPosition(clientId){return use_select_useSelect((select=>{const{getSelectedBlocksInitialCaretPosition,isNavigationMode,isBlockSelected}=select(store_store);if(isBlockSelected(clientId)&&!isNavigationMode())return getSelectedBlocksInitialCaretPosition()}),[clientId])}(clientId),{isBlockSelected,isMultiSelecting}=use_select_useSelect(store_store);return(0,react.useEffect)((()=>{if(!isBlockSelected(clientId)||isMultiSelecting())return;if(null==initialPosition)return;if(!ref.current)return;const{ownerDocument}=ref.current;if(ref.current.contains(ownerDocument.activeElement))return;const textInputs=dom_build_module.XC.tabbable.find(ref.current).filter((node=>isTextField(node))),isReverse=-1===initialPosition,target=(isReverse?lodash.last:lodash.first)(textInputs)||ref.current;if(isInsideRootBlock(ref.current,target)){if(!ref.current.getAttribute("contenteditable")){const focusElement=dom_build_module.XC.tabbable.findNext(ref.current);if(focusElement&&isInsideRootBlock(ref.current,focusElement)&&isFormElement(focusElement))return void focusElement.focus()}placeCaretAtHorizontalEdge(target,isReverse)}else ref.current.focus()}),[initialPosition,clientId]),ref}function listener(event){if(event.defaultPrevented)return;const action="mouseover"===event.type?"add":"remove";event.preventDefault(),event.currentTarget.classList[action]("is-hovered")}function useIsHovered(){const isEnabled=use_select_useSelect((select=>{const{isNavigationMode,getSettings}=select(store_store);return isNavigationMode()||getSettings().outlineMode}),[]);return(0,use_ref_effect.A)((node=>{if(isEnabled)return node.addEventListener("mouseout",listener),node.addEventListener("mouseover",listener),()=>{node.removeEventListener("mouseout",listener),node.removeEventListener("mouseover",listener),node.classList.remove("is-hovered")}}),[isEnabled])}function useBlockClassNames(clientId){return use_select_useSelect((select=>{const{isBlockBeingDragged,isBlockHighlighted,isBlockSelected,isBlockMultiSelected,getBlockName,getSettings,hasSelectedInnerBlock,isTyping,__unstableIsFullySelected}=select(store_store),{outlineMode}=getSettings(),isDragging=isBlockBeingDragged(clientId),isSelected=isBlockSelected(clientId),name=getBlockName(clientId),isAncestorOfSelectedBlock=hasSelectedInnerBlock(clientId,!0),isMultiSelected=isBlockMultiSelected(clientId);return classnames_default()({"is-selected":isSelected,"is-highlighted":isBlockHighlighted(clientId),"is-multi-selected":isMultiSelected,"is-partially-selected":isMultiSelected&&!__unstableIsFullySelected(),"is-reusable":(0,build_module.tk)((0,build_module.E7)(name)),"is-dragging":isDragging,"has-child-selected":isAncestorOfSelectedBlock,"remove-outline":isSelected&&outlineMode&&isTyping()})}),[clientId])}function useBlockDefaultClassName(clientId){return use_select_useSelect((select=>{const name=select(store_store).getBlockName(clientId),blockType=(0,build_module.E7)(name);if((null==blockType?void 0:blockType.apiVersion)>1)return(0,build_module.KW)(name)}),[clientId])}function useBlockCustomClassName(clientId){return use_select_useSelect((select=>{const{getBlockName,getBlockAttributes}=select(store_store),attributes=getBlockAttributes(clientId);if(null==attributes||!attributes.className)return;const blockType=(0,build_module.E7)(getBlockName(clientId));return(null==blockType?void 0:blockType.apiVersion)>1?attributes.className:void 0}),[clientId])}function useBlockMovingModeClassNames(clientId){return use_select_useSelect((select=>{const{hasBlockMovingClientId,canInsertBlockType,getBlockName,getBlockRootClientId,isBlockSelected}=select(store_store);if(!isBlockSelected(clientId))return;const movingClientId=hasBlockMovingClientId();return movingClientId?classnames_default()("is-block-moving-mode",{"can-insert-moving-block":canInsertBlockType(getBlockName(movingClientId),getBlockRootClientId(clientId))}):void 0}),[clientId])}function useFocusHandler(clientId){const{isBlockSelected}=use_select_useSelect(store_store),{selectBlock,selectionChange}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{function onFocus(event){node.parentElement.closest('[contenteditable="true"]')||(isBlockSelected(clientId)?event.target.isContentEditable||selectionChange(clientId):isInsideRootBlock(node,event.target)&&selectBlock(clientId))}return node.addEventListener("focusin",onFocus),()=>{node.removeEventListener("focusin",onFocus)}}),[isBlockSelected,selectBlock])}function useEventHandlers(clientId){const isSelected=use_select_useSelect((select=>select(store_store).isBlockSelected(clientId)),[clientId]),{getBlockRootClientId,getBlockIndex}=use_select_useSelect(store_store),{insertDefaultBlock,removeBlock}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{if(isSelected)return node.addEventListener("keydown",onKeyDown),node.addEventListener("dragstart",onDragStart),()=>{node.removeEventListener("keydown",onKeyDown),node.removeEventListener("dragstart",onDragStart)};function onKeyDown(event){const{keyCode,target}=event;keyCode!==keycodes_build_module.Fm&&keyCode!==keycodes_build_module.G_&&keyCode!==keycodes_build_module.SJ||target!==node||isTextField(target)||(event.preventDefault(),keyCode===keycodes_build_module.Fm?insertDefaultBlock({},getBlockRootClientId(clientId),getBlockIndex(clientId)+1):removeBlock(clientId))}function onDragStart(event){event.preventDefault()}}),[clientId,isSelected,getBlockRootClientId,getBlockIndex,insertDefaultBlock,removeBlock])}function useNavModeExit(clientId){const{isNavigationMode,isBlockSelected}=use_select_useSelect(store_store),{setNavigationMode,selectBlock}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{function onMouseDown(event){isNavigationMode()&&!event.defaultPrevented&&(event.preventDefault(),isBlockSelected(clientId)?setNavigationMode(!1):selectBlock(clientId))}return node.addEventListener("mousedown",onMouseDown),()=>{node.addEventListener("mousedown",onMouseDown)}}),[clientId,isNavigationMode,isBlockSelected,setNavigationMode])}function useIntersectionObserver(){const observer=(0,react.useContext)(block_list_IntersectionObserver);return(0,use_ref_effect.A)((node=>{if(observer)return observer.observe(node),()=>{observer.unobserve(node)}}),[observer])}var use_block_props_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");const BLOCK_ANIMATION_THRESHOLD=200;function useBlockProps(){let props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml,__unstableIsDisabled=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId,className,wrapperProps={},isAligned}=(0,react.useContext)(BlockListBlockContext),{index,mode,name,blockApiVersion,blockTitle,isPartOfSelection,adjustScrolling,enableAnimation}=use_select_useSelect((select=>{const{getBlockIndex,getBlockMode,getBlockName,isTyping,getGlobalBlockCount,isBlockSelected,isBlockMultiSelected,isAncestorMultiSelected,isFirstMultiSelectedBlock}=select(store_store),isSelected=isBlockSelected(clientId),isPartOfMultiSelection=isBlockMultiSelected(clientId)||isAncestorMultiSelected(clientId),blockName=getBlockName(clientId),blockType=(0,build_module.E7)(blockName);return{index:getBlockIndex(clientId),mode:getBlockMode(clientId),name:blockName,blockApiVersion:(null==blockType?void 0:blockType.apiVersion)||1,blockTitle:null==blockType?void 0:blockType.title,isPartOfSelection:isSelected||isPartOfMultiSelection,adjustScrolling:isSelected||isFirstMultiSelectedBlock(clientId),enableAnimation:!isTyping()&&getGlobalBlockCount()<=BLOCK_ANIMATION_THRESHOLD}}),[clientId]),blockLabel=(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block: %s"),blockTitle),htmlSuffix="html"!==mode||__unstableIsHtml?"":"-visual",mergedRefs=(0,use_merge_refs.A)([props.ref,useFocusFirstElement(clientId),useBlockRefProvider(clientId),useFocusHandler(clientId),useEventHandlers(clientId),useNavModeExit(clientId),useIsHovered(),useIntersectionObserver(),use_moving_animation({isSelected:isPartOfSelection,adjustScrolling,enableAnimation,triggerAnimationOnChange:index}),use_disabled_useDisabled({isDisabled:!__unstableIsDisabled})]),blockEditContext=context_useBlockEditContext();return blockApiVersion<2&&clientId===blockEditContext.clientId&&void 0!==use_block_props_process&&use_block_props_process.env,{...wrapperProps,...props,ref:mergedRefs,id:`block-${clientId}${htmlSuffix}`,tabIndex:0,role:"document","aria-label":blockLabel,"data-block":clientId,"data-type":name,"data-title":blockTitle,className:classnames_default()(classnames_default()("block-editor-block-list__block",{"wp-block":!isAligned}),className,props.className,wrapperProps.className,useBlockClassNames(clientId),useBlockDefaultClassName(clientId),useBlockCustomClassName(clientId),useBlockMovingModeClassNames(clientId)),style:{...wrapperProps.style,...props.style}}}useBlockProps.save=build_module.cV;const BlockListBlockContext=(0,react.createContext)();function Block(_ref){let{children,isHtml,...props}=_ref;return(0,react.createElement)("div",useBlockProps(props,{__unstableIsHtml:isHtml}),children)}const applyWithSelect=with_select(((select,_ref3)=>{let{clientId,rootClientId}=_ref3;const{isBlockSelected,getBlockMode,isSelectionEnabled,getTemplateLock,__unstableGetBlockWithoutInnerBlocks,canRemoveBlock,canMoveBlock}=select(store_store),block=__unstableGetBlockWithoutInnerBlocks(clientId),isSelected=isBlockSelected(clientId),templateLock=getTemplateLock(rootClientId),canRemove=canRemoveBlock(clientId,rootClientId),canMove=canMoveBlock(clientId,rootClientId),{name,attributes,isValid}=block||{};return{mode:getBlockMode(clientId),isSelectionEnabled:isSelectionEnabled(),isLocked:!!templateLock,canRemove,canMove,block,name,attributes,isValid,isSelected}})),applyWithDispatch=with_dispatch(((dispatch,ownProps,_ref4)=>{let{select}=_ref4;const{updateBlockAttributes,insertBlocks,mergeBlocks,replaceBlocks,toggleSelection,__unstableMarkLastChangeAsPersistent}=dispatch(store_store);return{setAttributes(newAttributes){const{getMultiSelectedBlockClientIds}=select(store_store),multiSelectedBlockClientIds=getMultiSelectedBlockClientIds(),{clientId}=ownProps,clientIds=multiSelectedBlockClientIds.length?multiSelectedBlockClientIds:[clientId];updateBlockAttributes(clientIds,newAttributes)},onInsertBlocks(blocks,index){const{rootClientId}=ownProps;insertBlocks(blocks,index,rootClientId)},onInsertBlocksAfter(blocks){const{clientId,rootClientId}=ownProps,{getBlockIndex}=select(store_store),index=getBlockIndex(clientId);insertBlocks(blocks,index+1,rootClientId)},onMerge(forward){const{clientId,rootClientId}=ownProps,{getPreviousBlockClientId,getNextBlockClientId,getBlock}=select(store_store);if(forward){const nextBlockClientId=getNextBlockClientId(clientId);nextBlockClientId&&mergeBlocks(clientId,nextBlockClientId)}else{const previousBlockClientId=getPreviousBlockClientId(clientId);if(previousBlockClientId)mergeBlocks(previousBlockClientId,clientId);else if(rootClientId){const replacement=(0,build_module.bh)(getBlock(rootClientId),"*");replacement&&replacement.length&&replaceBlocks(rootClientId,replacement,0)}}},onReplace(blocks,indexToSelect,initialPosition){blocks.length&&!(0,build_module.Xw)(blocks[blocks.length-1])&&__unstableMarkLastChangeAsPersistent(),replaceBlocks([ownProps.clientId],blocks,indexToSelect,initialPosition)},toggleSelection(selectionEnabled){toggleSelection(selectionEnabled)}}})),block_list_block=(0,compose.A)(pure.A,applyWithSelect,applyWithDispatch,if_condition((_ref5=>{let{block}=_ref5;return!!block})),withFilters("editor.BlockListBlock"))((function BlockListBlock(_ref2){var _wrapperProps;let{block:{__unstableBlockSource},mode,isLocked,canRemove,clientId,isSelected,isSelectionEnabled,className,name,isValid,attributes,wrapperProps,setAttributes,onReplace,onInsertBlocksAfter,onMerge,toggleSelection}=_ref2;const themeSupportsLayout=use_select_useSelect((select=>{const{getSettings}=select(store_store);return getSettings().supportsLayout}),[]),{removeBlock}=use_dispatch(store_store),onRemove=(0,react.useCallback)((()=>removeBlock(clientId)),[clientId]);let blockEdit=(0,react.createElement)(BlockEdit,{name,isSelected,attributes,setAttributes,insertBlocksAfter:isLocked?void 0:onInsertBlocksAfter,onReplace:canRemove?onReplace:void 0,onRemove:canRemove?onRemove:void 0,mergeBlocks:canRemove?onMerge:void 0,clientId,isSelectionEnabled,toggleSelection});const blockType=(0,build_module.E7)(name);null!=blockType&&blockType.getEditWrapperProps&&(wrapperProps=function mergeWrapperProps(propsA,propsB){const newProps={...propsA,...propsB};return null!=propsA&&propsA.className&&null!=propsB&&propsB.className&&(newProps.className=classnames_default()(propsA.className,propsB.className)),null!=propsA&&propsA.style&&null!=propsB&&propsB.style&&(newProps.style={...propsA.style,...propsB.style}),newProps}(wrapperProps,blockType.getEditWrapperProps(attributes)));const isAligned=wrapperProps&&!!wrapperProps["data-align"]&&!themeSupportsLayout;let block;if(isAligned&&(blockEdit=(0,react.createElement)("div",{className:"wp-block","data-align":wrapperProps["data-align"]},blockEdit)),isValid)block="html"===mode?(0,react.createElement)(react.Fragment,null,(0,react.createElement)("div",{style:{display:"none"}},blockEdit),(0,react.createElement)(Block,{isHtml:!0},(0,react.createElement)(block_html,{clientId}))):(null==blockType?void 0:blockType.apiVersion)>1?blockEdit:(0,react.createElement)(Block,wrapperProps,blockEdit);else{const saveContent=__unstableBlockSource?(0,build_module.Kx)(__unstableBlockSource):(0,build_module.Z9)(blockType,attributes);block=(0,react.createElement)(Block,{className:"has-warning"},(0,react.createElement)(block_invalid_warning,{clientId}),(0,react.createElement)(raw_html.A,null,(0,safe_html.A)(saveContent)))}const value={clientId,className:null!==(_wrapperProps=wrapperProps)&&void 0!==_wrapperProps&&_wrapperProps["data-align"]&&themeSupportsLayout?classnames_default()(className,`align${wrapperProps["data-align"]}`):className,wrapperProps:(0,lodash.omit)(wrapperProps,["data-align"]),isAligned},memoizedValue=(0,react.useMemo)((()=>value),Object.values(value));return(0,react.createElement)(BlockListBlockContext.Provider,{value:memoizedValue},(0,react.createElement)(block_crash_boundary,{fallback:(0,react.createElement)(Block,{className:"has-warning"},(0,react.createElement)(block_crash_warning,null))},block))}));var html_entities_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+html-entities@3.24.0/node_modules/@wordpress/html-entities/build-module/index.js");const close_small=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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"})),library_search=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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 search_control=(0,react.forwardRef)((function SearchControl(_ref,forwardedRef){let{className,onChange,onKeyDown,value,label,placeholder=(0,_wordpress_i18n_build_module.__)("Search"),hideLabelFromVision=!0,help,onClose}=_ref;const searchRef=(0,react.useRef)(),id=`components-search-control-${(0,use_instance_id.A)(SearchControl)}`;return(0,react.createElement)(base_control,{label,id,hideLabelFromVision,help,className:classnames_default()(className,"components-search-control")},(0,react.createElement)("div",{className:"components-search-control__input-wrapper"},(0,react.createElement)("input",{ref:(0,use_merge_refs.A)([searchRef,forwardedRef]),className:"components-search-control__input",id,type:"search",placeholder,onChange:event=>onChange(event.target.value),onKeyDown,autoComplete:"off",value:value||""}),(0,react.createElement)("div",{className:"components-search-control__icon"},onClose?(0,react.createElement)(build_module_button,{icon:close_small,label:(0,_wordpress_i18n_build_module.__)("Close search"),onClick:onClose}):value?(0,react.createElement)(build_module_button,{icon:close_small,label:(0,_wordpress_i18n_build_module.__)("Reset search"),onClick:()=>{onChange(""),searchRef.current.focus()}}):(0,react.createElement)(icon,{icon:library_search}))))}));let indoc,offset,output,stack;const tokenizer=/<(\/)?(\w+)\s*(\/)?>/g;function createFrame(element,tokenStart,tokenLength,prevOffset,leadingTextStart){return{element,tokenStart,tokenLength,prevOffset,leadingTextStart,children:[]}}const isValidConversionMap=conversionMap=>{const isObject="object"==typeof conversionMap,values=isObject&&Object.values(conversionMap);return isObject&&values.length&&values.every((element=>(0,react.isValidElement)(element)))};function proceed(conversionMap){const next=function nextToken(){const matches=tokenizer.exec(indoc);if(null===matches)return["no-more-tokens"];const startedAt=matches.index,[match,isClosing,name,isSelfClosed]=matches,length=match.length;if(isSelfClosed)return["self-closed",name,startedAt,length];if(isClosing)return["closer",name,startedAt,length];return["opener",name,startedAt,length]}(),[tokenType,name,startOffset,tokenLength]=next,stackDepth=stack.length,leadingTextStart=startOffset>offset?offset:null;if(!conversionMap[name])return addText(),!1;switch(tokenType){case"no-more-tokens":if(0!==stackDepth){const{leadingTextStart:stackLeadingText,tokenStart}=stack.pop();output.push(indoc.substr(stackLeadingText,tokenStart))}return addText(),!1;case"self-closed":return 0===stackDepth?(null!==leadingTextStart&&output.push(indoc.substr(leadingTextStart,startOffset-leadingTextStart)),output.push(conversionMap[name]),offset=startOffset+tokenLength,!0):(addChild(createFrame(conversionMap[name],startOffset,tokenLength)),offset=startOffset+tokenLength,!0);case"opener":return stack.push(createFrame(conversionMap[name],startOffset,tokenLength,startOffset+tokenLength,leadingTextStart)),offset=startOffset+tokenLength,!0;case"closer":if(1===stackDepth)return function closeOuterElement(endOffset){const{element,leadingTextStart,prevOffset,tokenStart,children}=stack.pop(),text=endOffset?indoc.substr(prevOffset,endOffset-prevOffset):indoc.substr(prevOffset);text&&children.push(text);null!==leadingTextStart&&output.push(indoc.substr(leadingTextStart,tokenStart-leadingTextStart));output.push((0,react.cloneElement)(element,null,...children))}(startOffset),offset=startOffset+tokenLength,!0;const stackTop=stack.pop(),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);return frame.children=stackTop.children,addChild(frame),offset=startOffset+tokenLength,!0;default:return addText(),!1}}function addText(){const length=indoc.length-offset;0!==length&&output.push(indoc.substr(offset,length))}function addChild(frame){const{element,tokenStart,tokenLength,prevOffset,children}=frame,parent=stack[stack.length-1],text=indoc.substr(parent.prevOffset,tokenStart-parent.prevOffset);text&&parent.children.push(text),parent.children.push((0,react.cloneElement)(element,null,...children)),parent.prevOffset=prevOffset||tokenStart+tokenLength}const create_interpolate_element=(interpolatedString,conversionMap)=>{if(indoc=interpolatedString,offset=0,output=[],stack=[],tokenizer.lastIndex=0,!isValidConversionMap(conversionMap))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(proceed(conversionMap));return(0,react.createElement)(react.Fragment,null,...output)},library_tip=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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 build_module_tip=function Tip(props){const{children}=props;return(0,react.createElement)("div",{className:"components-tip"},(0,react.createElement)(icon,{icon:library_tip}),(0,react.createElement)("p",null,children))},globalTips=[create_interpolate_element((0,i18n_build_module.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,react.createElement)("kbd",null)}),create_interpolate_element((0,i18n_build_module.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,react.createElement)("kbd",null)}),create_interpolate_element((0,i18n_build_module.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,react.createElement)("kbd",null)}),(0,i18n_build_module.__)("Drag files into the editor to automatically insert media blocks."),(0,i18n_build_module.__)("Change a block's type by pressing the block icon on the toolbar.")];const tips=function Tips(){const[randomIndex]=(0,react.useState)(Math.floor(Math.random()*globalTips.length));return(0,react.createElement)(build_module_tip,null,globalTips[randomIndex])},block_default=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));const block_icon=(0,react.memo)((function BlockIcon(_ref){var _icon;let{icon,showColors=!1,className}=_ref;"block-default"===(null===(_icon=icon)||void 0===_icon?void 0:_icon.src)&&(icon={src:block_default});const renderedIcon=(0,react.createElement)(build_module_icon,{icon:icon&&icon.src?icon.src:icon}),style=showColors?{backgroundColor:icon&&icon.background,color:icon&&icon.foreground}:{};return(0,react.createElement)("span",{style,className:classnames_default()("block-editor-block-icon",className,{"has-colors":showColors})},renderedIcon)}));const block_card=function BlockCard(_ref){let{title,icon,description,blockType}=_ref;return blockType&&((0,deprecated_build_module.A)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title,icon,description}=blockType)),(0,react.createElement)("div",{className:"block-editor-block-card"},(0,react.createElement)(block_icon,{icon,showColors:!0}),(0,react.createElement)("div",{className:"block-editor-block-card__content"},(0,react.createElement)("h2",{className:"block-editor-block-card__title"},title),(0,react.createElement)("span",{className:"block-editor-block-card__description"},description)))},with_registry=(0,create_higher_order_component.f)((OriginalComponent=>props=>(0,react.createElement)(RegistryConsumer,null,(registry=>(0,react.createElement)(OriginalComponent,(0,helpers_esm_extends.A)({},props,{registry}))))),"withRegistry");var build_module_registry=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@7.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/registry.js");const withRegistryProvider=(0,create_higher_order_component.f)((WrappedComponent=>with_registry((_ref=>{let{useSubRegistry=!0,registry,...props}=_ref;if(!useSubRegistry)return(0,react.createElement)(WrappedComponent,(0,esm_extends.A)({registry},props));const[subRegistry,setSubRegistry]=(0,react.useState)(null);return(0,react.useEffect)((()=>{const newRegistry=(0,build_module_registry.I)({},registry);newRegistry.registerStore("core/block-editor",storeConfig),setSubRegistry(newRegistry)}),[registry]),subRegistry?(0,react.createElement)(registry_provider_context,{value:subRegistry},(0,react.createElement)(WrappedComponent,(0,esm_extends.A)({registry:subRegistry},props))):null}))),"withRegistryProvider"),use_block_sync_noop=()=>{};function useBlockSync(_ref){let{clientId=null,value:controlledBlocks,selection:controlledSelection,onChange=use_block_sync_noop,onInput=use_block_sync_noop}=_ref;const registry=use_registry_useRegistry(),{resetBlocks,resetSelection,replaceInnerBlocks,setHasControlledInnerBlocks,__unstableMarkNextChangeAsNotPersistent}=registry.dispatch(store_store),{getBlockName,getBlocks}=registry.select(store_store),isControlled=use_select_useSelect((select=>!clientId||select(store_store).areInnerBlocksControlled(clientId)),[clientId]),pendingChanges=(0,react.useRef)({incoming:null,outgoing:[]}),subscribed=(0,react.useRef)(!1),setControlledBlocks=()=>{controlledBlocks&&(__unstableMarkNextChangeAsNotPersistent(),clientId?registry.batch((()=>{setHasControlledInnerBlocks(clientId,!0);const storeBlocks=controlledBlocks.map((block=>(0,build_module.JB)(block)));subscribed.current&&(pendingChanges.current.incoming=storeBlocks),__unstableMarkNextChangeAsNotPersistent(),replaceInnerBlocks(clientId,storeBlocks)})):(subscribed.current&&(pendingChanges.current.incoming=controlledBlocks),resetBlocks(controlledBlocks)))},onInputRef=(0,react.useRef)(onInput),onChangeRef=(0,react.useRef)(onChange);(0,react.useEffect)((()=>{onInputRef.current=onInput,onChangeRef.current=onChange}),[onInput,onChange]),(0,react.useEffect)((()=>{pendingChanges.current.outgoing.includes(controlledBlocks)?(0,lodash.last)(pendingChanges.current.outgoing)===controlledBlocks&&(pendingChanges.current.outgoing=[]):getBlocks(clientId)!==controlledBlocks&&(pendingChanges.current.outgoing=[],setControlledBlocks(),controlledSelection&&resetSelection(controlledSelection.selectionStart,controlledSelection.selectionEnd,controlledSelection.initialPosition))}),[controlledBlocks,clientId]),(0,react.useEffect)((()=>{isControlled||(pendingChanges.current.outgoing=[],setControlledBlocks())}),[isControlled]),(0,react.useEffect)((()=>{const{getSelectionStart,getSelectionEnd,getSelectedBlocksInitialCaretPosition,isLastBlockChangePersistent,__unstableIsLastBlockChangeIgnored,areInnerBlocksControlled}=registry.select(store_store);let blocks=getBlocks(clientId),isPersistent=isLastBlockChangePersistent(),previousAreBlocksDifferent=!1;subscribed.current=!0;const unsubscribe=registry.subscribe((()=>{if(null!==clientId&&null===getBlockName(clientId))return;if(!(!clientId||areInnerBlocksControlled(clientId)))return;const newIsPersistent=isLastBlockChangePersistent(),newBlocks=getBlocks(clientId),areBlocksDifferent=newBlocks!==blocks;if(blocks=newBlocks,areBlocksDifferent&&(pendingChanges.current.incoming||__unstableIsLastBlockChangeIgnored()))return pendingChanges.current.incoming=null,void(isPersistent=newIsPersistent);if(areBlocksDifferent||previousAreBlocksDifferent&&!areBlocksDifferent&&newIsPersistent&&!isPersistent){isPersistent=newIsPersistent,pendingChanges.current.outgoing.push(blocks);(isPersistent?onChangeRef.current:onInputRef.current)(blocks,{selection:{selectionStart:getSelectionStart(),selectionEnd:getSelectionEnd(),initialPosition:getSelectedBlocksInitialCaretPosition()}})}previousAreBlocksDifferent=areBlocksDifferent}));return()=>unsubscribe()}),[registry,clientId])}const provider=withRegistryProvider((function provider_BlockEditorProvider(props){const{children,settings}=props,{updateSettings}=use_dispatch(store_store);return(0,react.useEffect)((()=>{updateSettings(settings)}),[settings]),useBlockSync(props),(0,react.createElement)(BlockRefsProvider,null,children)}));const StyledWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e13jgla80"})({name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"}),disabled_Context=(0,react.createContext)(!1),{Consumer:disabled_Consumer,Provider:disabled_Provider}=disabled_Context;function Disabled(_ref){let{className,children,isDisabled=!0,...props}=_ref;const ref=use_disabled_useDisabled();return isDisabled?(0,react.createElement)(disabled_Provider,{value:!0},(0,react.createElement)(StyledWrapper,(0,helpers_esm_extends.A)({ref,className:classnames_default()(className,"components-disabled")},props),children)):(0,react.createElement)(disabled_Provider,{value:!1},children)}Disabled.Context=disabled_Context,Disabled.Consumer=disabled_Consumer;const disabled=Disabled;function LiveBlockPreview(_ref){let{onClick}=_ref;return(0,react.createElement)("div",{tabIndex:0,role:"button",onClick,onKeyPress:onClick},(0,react.createElement)(disabled,null,(0,react.createElement)(BlockList,null)))}const extractSize=(entry,boxProp,sizeType)=>entry[boxProp]?entry[boxProp][0]?entry[boxProp][0][sizeType]:entry[boxProp][sizeType]:"contentBoxSize"===boxProp?entry.contentRect["inlineSize"===sizeType?"width":"height"]:void 0;function useResizeObserver(){let opts=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const onResize=opts.onResize,onResizeRef=(0,react.useRef)(void 0);onResizeRef.current=onResize;const round=opts.round||Math.round,resizeObserverRef=(0,react.useRef)(),[size,setSize]=(0,react.useState)({width:void 0,height:void 0}),didUnmount=(0,react.useRef)(!1);(0,react.useEffect)((()=>()=>{didUnmount.current=!0}),[]);const previous=(0,react.useRef)({width:void 0,height:void 0}),refCallback=function useResolvedElement(subscriber,refOrElement){const callbackRefElement=(0,react.useRef)(null),lastReportRef=(0,react.useRef)(null),cleanupRef=(0,react.useRef)(),callSubscriber=(0,react.useCallback)((()=>{let element=null;callbackRefElement.current?element=callbackRefElement.current:refOrElement&&(element=refOrElement instanceof HTMLElement?refOrElement:refOrElement.current),lastReportRef.current&&lastReportRef.current.element===element&&lastReportRef.current.reporter===callSubscriber||(cleanupRef.current&&(cleanupRef.current(),cleanupRef.current=null),lastReportRef.current={reporter:callSubscriber,element},element&&(cleanupRef.current=subscriber(element)))}),[refOrElement,subscriber]);return(0,react.useEffect)((()=>{callSubscriber()}),[callSubscriber]),(0,react.useCallback)((element=>{callbackRefElement.current=element,callSubscriber()}),[callSubscriber])}((0,react.useCallback)((element=>(resizeObserverRef.current&&resizeObserverRef.current.box===opts.box&&resizeObserverRef.current.round===round||(resizeObserverRef.current={box:opts.box,round,instance:new ResizeObserver((entries=>{const entry=entries[0];let boxProp="borderBoxSize";boxProp="border-box"===opts.box?"borderBoxSize":"device-pixel-content-box"===opts.box?"devicePixelContentBoxSize":"contentBoxSize";const reportedWidth=extractSize(entry,boxProp,"inlineSize"),reportedHeight=extractSize(entry,boxProp,"blockSize"),newWidth=reportedWidth?round(reportedWidth):void 0,newHeight=reportedHeight?round(reportedHeight):void 0;if(previous.current.width!==newWidth||previous.current.height!==newHeight){const newSize={width:newWidth,height:newHeight};previous.current.width=newWidth,previous.current.height=newHeight,onResizeRef.current?onResizeRef.current(newSize):didUnmount.current||setSize(newSize)}}))}),resizeObserverRef.current.instance.observe(element,{box:opts.box}),()=>{resizeObserverRef.current&&resizeObserverRef.current.instance.unobserve(element)})),[opts.box,round]),opts.ref);return(0,react.useMemo)((()=>({ref:refCallback,width:size.width,height:size.height})),[refCallback,size?size.width:null,size?size.height:null])}function useResizeAware(){const{ref,width,height}=useResizeObserver(),sizes=(0,react.useMemo)((()=>({width:null!=width?width:null,height:null!=height?height:null})),[width,height]);return[(0,react.createElement)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1},"aria-hidden":"true",ref}),sizes]}function useBlockSelectionClearer(){const{hasSelectedBlock,hasMultiSelection}=use_select_useSelect(store_store),{clearSelectedBlock}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{function onMouseDown(event){(hasSelectedBlock()||hasMultiSelection())&&event.target===node&&clearSelectedBlock()}return node.addEventListener("mousedown",onMouseDown),()=>{node.removeEventListener("mousedown",onMouseDown)}}),[hasSelectedBlock,hasMultiSelection,clearSelectedBlock])}function selector(select){const{isMultiSelecting,getMultiSelectedBlockClientIds,hasMultiSelection,getSelectedBlockClientId,getSelectedBlocksInitialCaretPosition,__unstableIsFullySelected}=select(store_store);return{isMultiSelecting:isMultiSelecting(),multiSelectedBlockClientIds:getMultiSelectedBlockClientIds(),hasMultiSelection:hasMultiSelection(),selectedBlockClientId:getSelectedBlockClientId(),initialPosition:getSelectedBlocksInitialCaretPosition(),isFullSelection:__unstableIsFullySelected()}}function useMultiSelection(){const{initialPosition,isMultiSelecting,multiSelectedBlockClientIds,hasMultiSelection,selectedBlockClientId,isFullSelection}=use_select_useSelect(selector,[]);return(0,use_ref_effect.A)((node=>{const{ownerDocument}=node,{defaultView}=ownerDocument;if(null==initialPosition)return;if(!hasMultiSelection||isMultiSelecting)return;const{length}=multiSelectedBlockClientIds;length<2||isFullSelection&&(node.contentEditable=!0,node.focus(),defaultView.getSelection().removeAllRanges())}),[hasMultiSelection,isMultiSelecting,multiSelectedBlockClientIds,selectedBlockClientId,initialPosition,isFullSelection])}function getRectangleFromRange(range){if(!range.collapsed){const rects=Array.from(range.getClientRects());if(1===rects.length)return rects[0];const filteredRects=rects.filter((_ref=>{let{width}=_ref;return width>1}));if(0===filteredRects.length)return range.getBoundingClientRect();if(1===filteredRects.length)return filteredRects[0];let{top:furthestTop,bottom:furthestBottom,left:furthestLeft,right:furthestRight}=filteredRects[0];for(const{top,bottom,left,right}of filteredRects)top<furthestTop&&(furthestTop=top),bottom>furthestBottom&&(furthestBottom=bottom),left<furthestLeft&&(furthestLeft=left),right>furthestRight&&(furthestRight=right);return new window.DOMRect(furthestLeft,furthestTop,furthestRight-furthestLeft,furthestBottom-furthestTop)}const{startContainer}=range,{ownerDocument}=startContainer;if("BR"===startContainer.nodeName){const{parentNode}=startContainer;(0,assert_is_defined.e)(parentNode,"parentNode");const index=Array.from(parentNode.childNodes).indexOf(startContainer);(0,assert_is_defined.e)(ownerDocument,"ownerDocument"),(range=ownerDocument.createRange()).setStart(parentNode,index),range.setEnd(parentNode,index)}const rects=range.getClientRects();if(rects.length>1)return null;let rect=rects[0];if(!rect){(0,assert_is_defined.e)(ownerDocument,"ownerDocument");const padNode=ownerDocument.createTextNode("");(range=range.cloneRange()).insertNode(padNode),rect=range.getClientRects()[0],(0,assert_is_defined.e)(padNode.parentNode,"padNode.parentNode"),padNode.parentNode.removeChild(padNode)}return rect}function isEdge(container,isReverse){let onlyVertical=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(isInputOrTextArea(container)&&"number"==typeof container.selectionStart)return container.selectionStart===container.selectionEnd&&(isReverse?0===container.selectionStart:container.value.length===container.selectionStart);if(!container.isContentEditable)return!0;const{ownerDocument}=container,{defaultView}=ownerDocument;(0,assert_is_defined.e)(defaultView,"defaultView");const selection=defaultView.getSelection();if(!selection||!selection.rangeCount)return!1;const range=selection.getRangeAt(0),collapsedRange=range.cloneRange(),isForward=function isSelectionForward(selection){const{anchorNode,focusNode,anchorOffset,focusOffset}=selection;(0,assert_is_defined.e)(anchorNode,"anchorNode"),(0,assert_is_defined.e)(focusNode,"focusNode");const position=anchorNode.compareDocumentPosition(focusNode);return!(position&anchorNode.DOCUMENT_POSITION_PRECEDING)&&(!!(position&anchorNode.DOCUMENT_POSITION_FOLLOWING)||0!==position||anchorOffset<=focusOffset)}(selection),isCollapsed=selection.isCollapsed;isCollapsed||collapsedRange.collapse(!isForward);const collapsedRangeRect=getRectangleFromRange(collapsedRange),rangeRect=getRectangleFromRange(range);if(!collapsedRangeRect||!rangeRect)return!1;const rangeHeight=function getRangeHeight(range){const rects=Array.from(range.getClientRects());if(!rects.length)return;const highestTop=Math.min(...rects.map((_ref=>{let{top}=_ref;return top}))),lowestBottom=Math.max(...rects.map((_ref2=>{let{bottom}=_ref2;return bottom})));return lowestBottom-highestTop}(range);if(!isCollapsed&&rangeHeight&&rangeHeight>collapsedRangeRect.height&&isForward===isReverse)return!1;const isReverseDir=isRTL(container)?!isReverse:isReverse,containerRect=container.getBoundingClientRect(),testRange=hiddenCaretRangeFromPoint(ownerDocument,isReverseDir?containerRect.left+1:containerRect.right-1,isReverse?containerRect.top+1:containerRect.bottom-1,container);if(!testRange)return!1;const testRect=getRectangleFromRange(testRange);if(!testRect)return!1;const verticalSide=isReverse?"top":"bottom",horizontalSide=isReverseDir?"left":"right",verticalDiff=testRect[verticalSide]-rangeRect[verticalSide],horizontalDiff=testRect[horizontalSide]-collapsedRangeRect[horizontalSide],hasVerticalDiff=Math.abs(verticalDiff)<=1,hasHorizontalDiff=Math.abs(horizontalDiff)<=1;return onlyVertical?hasVerticalDiff:hasVerticalDiff&&hasHorizontalDiff}function isVerticalEdge(container,isReverse){return isEdge(container,isReverse,!0)}function isHorizontalEdge(container,isReverse){return isEdge(container,isReverse)}function getClosestTabbable(target,isReverse,containerElement,onlyVertical){let targetRect,focusableNodes=dom_build_module.XC.focusable.find(containerElement);return isReverse&&focusableNodes.reverse(),focusableNodes=focusableNodes.slice(focusableNodes.indexOf(target)+1),onlyVertical&&(targetRect=target.getBoundingClientRect()),focusableNodes.find((function isTabCandidate(node){if(!dom_build_module.XC.tabbable.isTabbableIndex(node))return!1;if(node.isContentEditable&&"true"!==node.contentEditable)return!1;if(onlyVertical){const nodeRect=node.getBoundingClientRect();if(nodeRect.left>=targetRect.right||nodeRect.right<=targetRect.left)return!1}return!0}))}function useArrowNav(){const{getMultiSelectedBlocksStartClientId,getMultiSelectedBlocksEndClientId,getSettings,hasMultiSelection,__unstableIsFullySelected}=use_select_useSelect(store_store),{selectBlock}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{let verticalRect;function onMouseDown(){verticalRect=null}function onKeyDown(event){const{keyCode,target}=event,isUp=keyCode===keycodes_build_module.UP,isDown=keyCode===keycodes_build_module.PX,isLeft=keyCode===keycodes_build_module.M3,isRight=keyCode===keycodes_build_module.NS,isReverse=isUp||isLeft,isHorizontal=isLeft||isRight,isVertical=isUp||isDown,isNav=isHorizontal||isVertical,isShift=event.shiftKey,hasModifier=isShift||event.ctrlKey||event.altKey||event.metaKey,isNavEdge=isVertical?isVerticalEdge:isHorizontalEdge,{ownerDocument}=node,{defaultView}=ownerDocument;if(hasMultiSelection()){if(!__unstableIsFullySelected())return;if(event.defaultPrevented)return;if(!isNav)return;if(isShift)return;return event.preventDefault(),void(isReverse?selectBlock(getMultiSelectedBlocksStartClientId()):selectBlock(getMultiSelectedBlocksEndClientId(),-1))}if(isVertical?verticalRect||(verticalRect=function computeCaretRect(win){const selection=win.getSelection();(0,assert_is_defined.e)(selection,"selection");const range=selection.rangeCount?selection.getRangeAt(0):null;return range?getRectangleFromRange(range):null}(defaultView)):verticalRect=null,event.defaultPrevented)return;if(!isNav)return;if(!function isNavigationCandidate(element,keyCode,hasModifier){if((keyCode===keycodes_build_module.UP||keyCode===keycodes_build_module.PX)&&!hasModifier)return!0;const{tagName}=element;if("INPUT"===tagName)return["button","checkbox","color","file","image","radio","reset","submit"].includes(element.getAttribute("type"));return"TEXTAREA"!==tagName}(target,keyCode,hasModifier))return;const isReverseDir=isRTL(target)?!isReverse:isReverse,{keepCaretInsideBlock}=getSettings();if(isShift)(function isClosestTabbableABlock(target,isReverse){const closestTabbable=getClosestTabbable(target,isReverse,node);return closestTabbable&&getBlockClientId(closestTabbable)})(target,isReverse)&&isNavEdge(target,isReverse)&&(node.contentEditable=!0,node.focus());else if(isVertical&&isVerticalEdge(target,isReverse)&&!keepCaretInsideBlock){const closestTabbable=getClosestTabbable(target,isReverse,node,!0);closestTabbable&&(!function placeCaretAtVerticalEdge(container,isReverse,rect){return placeCaretAtEdge(container,isReverse,null==rect?void 0:rect.left)}(closestTabbable,isReverse,verticalRect),event.preventDefault())}else if(isHorizontal&&defaultView.getSelection().isCollapsed&&isHorizontalEdge(target,isReverseDir)&&!keepCaretInsideBlock){placeCaretAtHorizontalEdge(getClosestTabbable(target,isReverseDir,node),isReverse),event.preventDefault()}}return node.addEventListener("mousedown",onMouseDown),node.addEventListener("keydown",onKeyDown),()=>{node.removeEventListener("mousedown",onMouseDown),node.removeEventListener("keydown",onKeyDown)}}),[])}function isDeepChild(query,container,propName){let candidate=container;do{if(query===candidate)return!0;candidate=candidate[propName]}while(candidate);return!1}const build_module_store_reducer=function reducer_reducer(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"REGISTER_SHORTCUT":return{...state,[action.name]:{category:action.category,keyCombination:action.keyCombination,aliases:action.aliases,description:action.description}};case"UNREGISTER_SHORTCUT":const{[action.name]:actionName,...remainingState}=state;return remainingState}return state};function registerShortcut(_ref){let{name,category,description,keyCombination,aliases}=_ref;return{type:"REGISTER_SHORTCUT",name,category,keyCombination,aliases,description}}function unregisterShortcut(name){return{type:"UNREGISTER_SHORTCUT",name}}const selectors_EMPTY_ARRAY=[],FORMATTING_METHODS={display:keycodes_build_module.dz,raw:keycodes_build_module.JF,ariaLabel:keycodes_build_module._A};function getKeyCombinationRepresentation(shortcut,representation){return shortcut?shortcut.modifier?FORMATTING_METHODS[representation][shortcut.modifier](shortcut.character):shortcut.character:null}function getShortcutKeyCombination(state,name){return state[name]?state[name].keyCombination:null}function getShortcutRepresentation(state,name){let representation=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";return getKeyCombinationRepresentation(getShortcutKeyCombination(state,name),representation)}function getShortcutDescription(state,name){return state[name]?state[name].description:null}function getShortcutAliases(state,name){return state[name]&&state[name].aliases?state[name].aliases:selectors_EMPTY_ARRAY}const getAllShortcutKeyCombinations=(0,rememo.A)(((state,name)=>[getShortcutKeyCombination(state,name),...getShortcutAliases(state,name)].filter(Boolean)),((state,name)=>[state[name]])),getAllShortcutRawKeyCombinations=(0,rememo.A)(((state,name)=>getAllShortcutKeyCombinations(state,name).map((combination=>getKeyCombinationRepresentation(combination,"raw")))),((state,name)=>[state[name]])),getCategoryShortcuts=(0,rememo.A)(((state,categoryName)=>Object.entries(state).filter((_ref=>{let[,shortcut]=_ref;return shortcut.category===categoryName})).map((_ref2=>{let[name]=_ref2;return name}))),(state=>[state])),build_module_store_store=(0,redux_store.A)("core/keyboard-shortcuts",{reducer:build_module_store_reducer,actions:build_module_store_actions_namespaceObject,selectors:build_module_store_selectors_namespaceObject});function useShortcutEventMatch(){const{getAllShortcutKeyCombinations}=use_select_useSelect(build_module_store_store);return function isMatch(name,event){return getAllShortcutKeyCombinations(name).some((_ref=>{let{modifier,character}=_ref;return keycodes_build_module.kx[modifier](event,character)}))}}(0,data_build_module.kz)(build_module_store_store);const context_context=(0,react.createContext)();function useShortcut(name,callback){let{isDisabled}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const shortcuts=(0,react.useContext)(context_context),isMatch=useShortcutEventMatch(),callbackRef=(0,react.useRef)();callbackRef.current=callback,(0,react.useEffect)((()=>{if(!isDisabled)return shortcuts.current.add(_callback),()=>{shortcuts.current.delete(_callback)};function _callback(event){isMatch(name,event)&&callbackRef.current(event)}}),[name,isDisabled])}const{Provider:shortcut_provider_Provider}=context_context;function useSelectAll(){const{getBlockOrder,getSelectedBlockClientIds,getBlockRootClientId}=use_select_useSelect(store_store),{multiSelect,selectBlock}=use_dispatch(store_store),isMatch=useShortcutEventMatch();return(0,use_ref_effect.A)((node=>{function onKeyDown(event){if(!isMatch("core/block-editor/select-all",event))return;const selectedClientIds=getSelectedBlockClientIds();if(selectedClientIds.length<2&&!function isEntirelySelected(element){if(isInputOrTextArea(element))return 0===element.selectionStart&&element.value.length===element.selectionEnd;if(!element.isContentEditable)return!0;const{ownerDocument}=element,{defaultView}=ownerDocument;(0,assert_is_defined.e)(defaultView,"defaultView");const selection=defaultView.getSelection();(0,assert_is_defined.e)(selection,"selection");const range=selection.rangeCount?selection.getRangeAt(0):null;if(!range)return!0;const{startContainer,endContainer,startOffset,endOffset}=range;if(startContainer===element&&endContainer===element&&0===startOffset&&endOffset===element.childNodes.length)return!0;const lastChild=element.lastChild;(0,assert_is_defined.e)(lastChild,"lastChild");const endContainerContentLength=endContainer.nodeType===endContainer.TEXT_NODE?endContainer.data.length:endContainer.childNodes.length;return isDeepChild(startContainer,element,"firstChild")&&isDeepChild(endContainer,element,"lastChild")&&0===startOffset&&endOffset===endContainerContentLength}(event.target))return;const[firstSelectedClientId]=selectedClientIds,rootClientId=getBlockRootClientId(firstSelectedClientId);let blockClientIds=getBlockOrder(rootClientId);selectedClientIds.length===blockClientIds.length&&(blockClientIds=getBlockOrder(getBlockRootClientId(rootClientId)));const firstClientId=(0,lodash.first)(blockClientIds),lastClientId=(0,lodash.last)(blockClientIds);firstClientId!==lastClientId?(multiSelect(firstClientId,lastClientId),event.preventDefault()):selectBlock(firstClientId)}return node.addEventListener("keydown",onKeyDown),()=>{node.removeEventListener("keydown",onKeyDown)}}),[])}function setContentEditableWrapper(node,value){node.contentEditable=value,value&&node.focus()}function useDragSelection(){const{startMultiSelect,stopMultiSelect}=use_dispatch(store_store),{isSelectionEnabled,hasMultiSelection,isDraggingBlocks}=use_select_useSelect(store_store);return(0,use_ref_effect.A)((node=>{const{ownerDocument}=node,{defaultView}=ownerDocument;let anchorElement,rafId;function onMouseUp(){stopMultiSelect(),defaultView.removeEventListener("mouseup",onMouseUp),rafId=defaultView.requestAnimationFrame((()=>{if(hasMultiSelection())return;setContentEditableWrapper(node,!1);const selection=defaultView.getSelection();if(selection.rangeCount){const{commonAncestorContainer}=selection.getRangeAt(0);anchorElement.contains(commonAncestorContainer)&&anchorElement.focus()}}))}function onMouseLeave(_ref){let{buttons,target}=_ref;isDraggingBlocks()||1===buttons&&target.getAttribute("contenteditable")&&isSelectionEnabled()&&(anchorElement=ownerDocument.activeElement,startMultiSelect(),defaultView.addEventListener("mouseup",onMouseUp),setContentEditableWrapper(node,!0))}return node.addEventListener("mouseout",onMouseLeave),()=>{node.removeEventListener("mouseout",onMouseLeave),defaultView.removeEventListener("mouseup",onMouseUp),defaultView.cancelAnimationFrame(rafId)}}),[startMultiSelect,stopMultiSelect,isSelectionEnabled,hasMultiSelection])}function use_selection_observer_setContentEditableWrapper(node,value){node.contentEditable=value,value&&node.focus()}function useSelectionObserver(){const{multiSelect,selectBlock,selectionChange}=use_dispatch(store_store),{getBlockParents,getBlockSelectionStart}=use_select_useSelect(store_store);return(0,use_ref_effect.A)((node=>{const{ownerDocument}=node,{defaultView}=ownerDocument;function onSelectionChange(event){const selection=defaultView.getSelection();if(!selection.rangeCount)return;const isClickShift=event.shiftKey&&"mouseup"===event.type;if(selection.isCollapsed&&!isClickShift)return void use_selection_observer_setContentEditableWrapper(node,!1);let startClientId=getBlockClientId(function extractSelectionStartNode(selection){const{anchorNode,anchorOffset}=selection;return anchorNode.nodeType===anchorNode.TEXT_NODE||0===anchorOffset?anchorNode:anchorNode.childNodes[anchorOffset-1]}(selection)),endClientId=getBlockClientId(function extractSelectionEndNode(selection){const{focusNode,focusOffset}=selection;return focusNode.nodeType===focusNode.TEXT_NODE||focusOffset===focusNode.childNodes.length?focusNode:focusNode.childNodes[focusOffset]}(selection));if(isClickShift){const selectedClientId=getBlockSelectionStart(),clickedClientId=getBlockClientId(event.target),focusNodeIsNonSelectable=clickedClientId!==endClientId;(startClientId===endClientId&&selection.isCollapsed||!endClientId||focusNodeIsNonSelectable)&&(endClientId=clickedClientId),startClientId!==selectedClientId&&(startClientId=selectedClientId)}if(void 0===startClientId&&void 0===endClientId)return void use_selection_observer_setContentEditableWrapper(node,!1);if(startClientId===endClientId)selectBlock(startClientId);else{const startPath=[...getBlockParents(startClientId),startClientId],endPath=[...getBlockParents(endClientId),endClientId],depth=function findDepth(a,b){let depth=0;for(;a[depth]===b[depth];)depth++;return depth}(startPath,endPath);multiSelect(startPath[depth],endPath[depth])}}function addListeners(){ownerDocument.addEventListener("selectionchange",onSelectionChange),defaultView.addEventListener("mouseup",onSelectionChange)}function removeListeners(){ownerDocument.removeEventListener("selectionchange",onSelectionChange),defaultView.removeEventListener("mouseup",onSelectionChange)}function resetListeners(){removeListeners(),addListeners()}return addListeners(),node.addEventListener("focusin",resetListeners),()=>{removeListeners(),node.removeEventListener("focusin",resetListeners)}}),[multiSelect,selectBlock,selectionChange,getBlockParents])}function useClickSelection(){const{selectBlock}=use_dispatch(store_store),{isSelectionEnabled,getBlockSelectionStart,hasMultiSelection}=use_select_useSelect(store_store);return(0,use_ref_effect.A)((node=>{function onMouseDown(event){if(!isSelectionEnabled()||0!==event.button)return;const startClientId=getBlockSelectionStart(),clickedClientId=getBlockClientId(event.target);event.shiftKey?startClientId!==clickedClientId&&(node.contentEditable=!0,node.focus()):hasMultiSelection()&&selectBlock(clickedClientId)}return node.addEventListener("mousedown",onMouseDown),()=>{node.removeEventListener("mousedown",onMouseDown)}}),[selectBlock,isSelectionEnabled,getBlockSelectionStart,hasMultiSelection])}function useInput(){const{__unstableIsFullySelected,getSelectedBlockClientIds,__unstableIsSelectionMergeable,hasMultiSelection}=use_select_useSelect(store_store),{replaceBlocks,__unstableSplitSelection,removeBlocks,__unstableDeleteSelection,__unstableExpandSelection}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{function onBeforeInput(event){var _event$inputType;hasMultiSelection()&&null!==(_event$inputType=event.inputType)&&void 0!==_event$inputType&&_event$inputType.startsWith("format")&&event.preventDefault()}function onKeyDown(event){event.defaultPrevented||hasMultiSelection()&&(event.keyCode===keycodes_build_module.Fm?(node.contentEditable=!1,event.preventDefault(),__unstableIsFullySelected()?replaceBlocks(getSelectedBlockClientIds(),(0,build_module.Wv)((0,build_module.K$)())):__unstableSplitSelection()):event.keyCode===keycodes_build_module.G_||event.keyCode===keycodes_build_module.SJ?(node.contentEditable=!1,event.preventDefault(),__unstableIsFullySelected()?removeBlocks(getSelectedBlockClientIds()):__unstableIsSelectionMergeable()?__unstableDeleteSelection(event.keyCode===keycodes_build_module.SJ):__unstableExpandSelection()):1!==event.key.length||event.metaKey||event.ctrlKey||(node.contentEditable=!1,__unstableIsSelectionMergeable()?__unstableDeleteSelection(event.keyCode===keycodes_build_module.SJ):(event.preventDefault(),node.ownerDocument.defaultView.getSelection().removeAllRanges())))}function onCompositionStart(event){hasMultiSelection()&&(node.contentEditable=!1,__unstableIsSelectionMergeable()?__unstableDeleteSelection():(event.preventDefault(),node.ownerDocument.defaultView.getSelection().removeAllRanges()))}return node.addEventListener("beforeinput",onBeforeInput),node.addEventListener("keydown",onKeyDown),node.addEventListener("compositionstart",onCompositionStart),()=>{node.removeEventListener("beforeinput",onBeforeInput),node.removeEventListener("keydown",onKeyDown),node.removeEventListener("compositionstart",onCompositionStart)}}),[])}function useWritingFlow(){const[before,ref,after]=function useTabNav(){const container=(0,react.useRef)(),focusCaptureBeforeRef=(0,react.useRef)(),focusCaptureAfterRef=(0,react.useRef)(),lastFocus=(0,react.useRef)(),{hasMultiSelection,getSelectedBlockClientId,getBlockCount}=use_select_useSelect(store_store),{setNavigationMode}=use_dispatch(store_store),focusCaptureTabIndex=use_select_useSelect((select=>select(store_store).isNavigationMode()),[])?void 0:"0",noCapture=(0,react.useRef)();function onFocusCapture(event){if(noCapture.current)noCapture.current=null;else if(hasMultiSelection())container.current.focus();else if(getSelectedBlockClientId())lastFocus.current.focus();else{setNavigationMode(!0);const action=event.target.compareDocumentPosition(container.current)&event.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";dom_build_module.XC.tabbable[action](event.target).focus()}}const before=(0,react.createElement)("div",{ref:focusCaptureBeforeRef,tabIndex:focusCaptureTabIndex,onFocus:onFocusCapture}),after=(0,react.createElement)("div",{ref:focusCaptureAfterRef,tabIndex:focusCaptureTabIndex,onFocus:onFocusCapture}),ref=(0,use_ref_effect.A)((node=>{function onKeyDown(event){if(event.defaultPrevented)return;if(event.keyCode===keycodes_build_module._f)return event.preventDefault(),void setNavigationMode(!0);if(event.keyCode!==keycodes_build_module.wn)return;const isShift=event.shiftKey,direction=isShift?"findPrevious":"findNext";if(!hasMultiSelection()&&!getSelectedBlockClientId())return void(event.target===node&&setNavigationMode(!0));if((isFormElement(event.target)||event.target.getAttribute("data-block")===getSelectedBlockClientId())&&isFormElement(dom_build_module.XC.tabbable[direction](event.target)))return;const next=isShift?focusCaptureBeforeRef:focusCaptureAfterRef;noCapture.current=!0,next.current.focus({preventScroll:!0})}function onFocusOut(event){lastFocus.current=event.target;const{ownerDocument}=node;event.relatedTarget||ownerDocument.activeElement!==ownerDocument.body||0!==getBlockCount()||node.focus()}function preventScrollOnTab(event){var _event$target;if(event.keyCode!==keycodes_build_module.wn)return;if("region"===(null===(_event$target=event.target)||void 0===_event$target?void 0:_event$target.getAttribute("role")))return;if(container.current===event.target)return;const direction=event.shiftKey?"findPrevious":"findNext",target=dom_build_module.XC.tabbable[direction](event.target);target!==focusCaptureBeforeRef.current&&target!==focusCaptureAfterRef.current||(event.preventDefault(),target.focus({preventScroll:!0}))}const{ownerDocument}=node,{defaultView}=ownerDocument;return defaultView.addEventListener("keydown",preventScrollOnTab),node.addEventListener("keydown",onKeyDown),node.addEventListener("focusout",onFocusOut),()=>{defaultView.removeEventListener("keydown",preventScrollOnTab),node.removeEventListener("keydown",onKeyDown),node.removeEventListener("focusout",onFocusOut)}}),[]);return[before,(0,use_merge_refs.A)([container,ref]),after]}(),hasMultiSelection=use_select_useSelect((select=>select(store_store).hasMultiSelection()),[]);return[before,(0,use_merge_refs.A)([ref,useInput(),useDragSelection(),useSelectionObserver(),useClickSelection(),useMultiSelection(),useSelectAll(),useArrowNav(),(0,use_ref_effect.A)((node=>{if(node.tabIndex=-1,node.contentEditable=hasMultiSelection,hasMultiSelection)return node.setAttribute("aria-label",(0,i18n_build_module.__)("Multiple selected blocks")),()=>{node.removeAttribute("aria-label")}}),[hasMultiSelection])]),after]}const writing_flow=(0,react.forwardRef)((function WritingFlow(_ref,forwardedRef){let{children,...props}=_ref;const[before,ref,after]=useWritingFlow();return(0,react.createElement)(react.Fragment,null,before,(0,react.createElement)("div",(0,esm_extends.A)({},props,{ref:(0,use_merge_refs.A)([ref,forwardedRef]),className:classnames_default()(props.className,"block-editor-writing-flow")}),children),after)})),BODY_CLASS_NAME="editor-styles-wrapper",BLOCK_PREFIX="wp-block";function useParsedAssets(html){return(0,react.useMemo)((()=>{const doc=document.implementation.createHTMLDocument("");return doc.body.innerHTML=html,Array.from(doc.body.children)}),[html])}const iframe=(0,react.forwardRef)((function Iframe(_ref3,ref){let{contentRef,children,head,tabIndex=0,assets,...props}=_ref3;const[,forceRender]=(0,react.useReducer)((()=>({}))),[iframeDocument,setIframeDocument]=(0,react.useState)(),[bodyClasses,setBodyClasses]=(0,react.useState)([]),styles=useParsedAssets(null==assets?void 0:assets.styles),scripts=useParsedAssets(null==assets?void 0:assets.scripts),clearerRef=useBlockSelectionClearer(),[before,writingFlowRef,after]=useWritingFlow(),setRef=(0,use_ref_effect.A)((node=>{function setDocumentIfReady(){const{contentDocument,ownerDocument}=node,{readyState,documentElement}=contentDocument;return("interactive"===readyState||"complete"===readyState)&&(function bubbleEvents(doc){const{defaultView}=doc,{frameElement}=defaultView;function bubbleEvent(event){const constructorName=Object.getPrototypeOf(event).constructor.name,Constructor=window[constructorName],init={};for(const key in event)init[key]=event[key];if(event instanceof defaultView.MouseEvent){const rect=frameElement.getBoundingClientRect();init.clientX+=rect.left,init.clientY+=rect.top}const newEvent=new Constructor(event.type,init);!frameElement.dispatchEvent(newEvent)&&event.preventDefault()}const eventTypes=["dragover"];for(const name of eventTypes)doc.addEventListener(name,bubbleEvent)}(contentDocument),setIframeDocument(contentDocument),clearerRef(documentElement),setBodyClasses(Array.from(ownerDocument.body.classList).filter((name=>name.startsWith("admin-color-")||name.startsWith("post-type-")||"wp-embed-responsive"===name))),contentDocument.dir=ownerDocument.dir,documentElement.removeChild(contentDocument.head),documentElement.removeChild(contentDocument.body),!0)}return node.addEventListener("load",setDocumentIfReady),()=>node.removeEventListener("load",setDocumentIfReady)}),[]),headRef=(0,use_ref_effect.A)((element=>{scripts.reduce(((promise,script)=>promise.then((()=>async function loadScript(head,_ref2){let{id,src}=_ref2;return new Promise(((resolve,reject)=>{const script=head.ownerDocument.createElement("script");script.id=id,src?(script.src=src,script.onload=()=>resolve(),script.onerror=()=>reject()):resolve(),head.appendChild(script)}))}(element,script)))),Promise.resolve()).finally((()=>{forceRender()}))}),[]),bodyRef=(0,use_merge_refs.A)([contentRef,clearerRef,writingFlowRef]),styleCompatibilityRef=function useStylesCompatibility(){return(0,use_ref_effect.A)((node=>{Array.from(document.styleSheets).forEach((styleSheet=>{try{styleSheet.cssRules}catch(e){return}const{ownerNode,cssRules}=styleSheet;if(!cssRules)return;if("LINK"!==ownerNode.tagName)return;if("wp-reset-editor-styles-css"===ownerNode.id)return;const isMatch=function matchFromRules(_cssRules){return Array.from(_cssRules).find((_ref=>{let{selectorText,conditionText,cssRules:__cssRules}=_ref;return conditionText?matchFromRules(__cssRules):selectorText&&(selectorText.includes(`.${BODY_CLASS_NAME}`)||selectorText.includes(`.${BLOCK_PREFIX}`))}))}(cssRules);if(isMatch&&!node.ownerDocument.getElementById(ownerNode.id)){node.appendChild(ownerNode.cloneNode(!0));const inlineCssId=ownerNode.id.replace("-css","-inline-css"),inlineCssElement=document.getElementById(inlineCssId);inlineCssElement&&node.appendChild(inlineCssElement.cloneNode(!0))}}))}),[])}();return head=(0,react.createElement)(react.Fragment,null,(0,react.createElement)("style",null,"body{margin:0}"),styles.map((_ref4=>{let{tagName,href,id,rel,media,textContent}=_ref4;const TagName=tagName.toLowerCase();return"style"===TagName?(0,react.createElement)(TagName,{id,key:id},textContent):(0,react.createElement)(TagName,{href,id,rel,media,key:id})})),head),(0,react.createElement)(react.Fragment,null,tabIndex>=0&&before,(0,react.createElement)("iframe",(0,esm_extends.A)({},props,{ref:(0,use_merge_refs.A)([ref,setRef]),tabIndex,srcDoc:"<!doctype html>",title:(0,i18n_build_module.__)("Editor canvas")}),iframeDocument&&(0,react_dom.createPortal)((0,react.createElement)(react.Fragment,null,(0,react.createElement)("head",{ref:headRef},head),(0,react.createElement)("body",{ref:bodyRef,className:classnames_default()(BODY_CLASS_NAME,...bodyClasses)},(0,react.createElement)("div",{style:{display:"none"},ref:styleCompatibilityRef}),(0,react.createElement)(style_provider,{document:iframeDocument},children))),iframeDocument.documentElement)),tabIndex>=0&&after)}));var a11y=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/a11y.mjs"),traverse=__webpack_require__("../../node_modules/.pnpm/traverse@0.6.7/node_modules/traverse/index.js"),traverse_default=__webpack_require__.n(traverse);const commentre=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function parse(css,options){options=options||{};let lineno=1,column=1;function updatePosition(str){const lines=str.match(/\n/g);lines&&(lineno+=lines.length);const i=str.lastIndexOf("\n");column=~i?str.length-i:column+str.length}function position(){const start={line:lineno,column};return function(node){return node.position=new Position(start),whitespace(),node}}function Position(start){this.start=start,this.end={line:lineno,column},this.source=options.source}Position.prototype.content=css;const errorsList=[];function error(msg){const err=new Error(options.source+":"+lineno+":"+column+": "+msg);if(err.reason=msg,err.filename=options.source,err.line=lineno,err.column=column,err.source=css,!options.silent)throw err;errorsList.push(err)}function open(){return match(/^{\s*/)}function close(){return match(/^}/)}function rules(){let node;const accumulator=[];for(whitespace(),comments(accumulator);css.length&&"}"!==css.charAt(0)&&(node=atrule()||rule());)!1!==node&&(accumulator.push(node),comments(accumulator));return accumulator}function match(re){const m=re.exec(css);if(!m)return;const str=m[0];return updatePosition(str),css=css.slice(str.length),m}function whitespace(){match(/^\s*/)}function comments(accumulator){let c;for(accumulator=accumulator||[];c=comment();)!1!==c&&accumulator.push(c);return accumulator}function comment(){const pos=position();if("/"!==css.charAt(0)||"*"!==css.charAt(1))return;let i=2;for(;""!==css.charAt(i)&&("*"!==css.charAt(i)||"/"!==css.charAt(i+1));)++i;if(i+=2,""===css.charAt(i-1))return error("End of comment missing");const str=css.slice(2,i-2);return column+=2,updatePosition(str),css=css.slice(i),column+=2,pos({type:"comment",comment:str})}function selector(){const m=match(/^([^{]+)/);if(m)return trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(matched){return matched.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(s){return s.replace(/\u200C/g,",")}))}function declaration(){const pos=position();let prop=match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!prop)return;if(prop=trim(prop[0]),!match(/^:\s*/))return error("property missing ':'");const val=match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),ret=pos({type:"declaration",property:prop.replace(commentre,""),value:val?trim(val[0]).replace(commentre,""):""});return match(/^[;\s]*/),ret}function declarations(){const decls=[];if(!open())return error("missing '{'");let decl;for(comments(decls);decl=declaration();)!1!==decl&&(decls.push(decl),comments(decls));return close()?decls:error("missing '}'")}function keyframe(){let m;const vals=[],pos=position();for(;m=match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)vals.push(m[1]),match(/^,\s*/);if(vals.length)return pos({type:"keyframe",values:vals,declarations:declarations()})}const atimport=_compileAtrule("import"),atcharset=_compileAtrule("charset"),atnamespace=_compileAtrule("namespace");function _compileAtrule(name){const re=new RegExp("^@"+name+"\\s*([^;]+);");return function(){const pos=position(),m=match(re);if(!m)return;const ret={type:name};return ret[name]=m[1].trim(),pos(ret)}}function atrule(){if("@"===css[0])return function atkeyframes(){const pos=position();let m=match(/^@([-\w]+)?keyframes\s*/);if(!m)return;const vendor=m[1];if(m=match(/^([-\w]+)\s*/),!m)return error("@keyframes missing name");const name=m[1];if(!open())return error("@keyframes missing '{'");let frame,frames=comments();for(;frame=keyframe();)frames.push(frame),frames=frames.concat(comments());return close()?pos({type:"keyframes",name,vendor,keyframes:frames}):error("@keyframes missing '}'")}()||function atmedia(){const pos=position(),m=match(/^@media *([^{]+)/);if(!m)return;const media=trim(m[1]);if(!open())return error("@media missing '{'");const style=comments().concat(rules());return close()?pos({type:"media",media,rules:style}):error("@media missing '}'")}()||function atcustommedia(){const pos=position(),m=match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(m)return pos({type:"custom-media",name:trim(m[1]),media:trim(m[2])})}()||function atsupports(){const pos=position(),m=match(/^@supports *([^{]+)/);if(!m)return;const supports=trim(m[1]);if(!open())return error("@supports missing '{'");const style=comments().concat(rules());return close()?pos({type:"supports",supports,rules:style}):error("@supports missing '}'")}()||atimport()||atcharset()||atnamespace()||function atdocument(){const pos=position(),m=match(/^@([-\w]+)?document *([^{]+)/);if(!m)return;const vendor=trim(m[1]),doc=trim(m[2]);if(!open())return error("@document missing '{'");const style=comments().concat(rules());return close()?pos({type:"document",document:doc,vendor,rules:style}):error("@document missing '}'")}()||function atpage(){const pos=position();if(!match(/^@page */))return;const sel=selector()||[];if(!open())return error("@page missing '{'");let decl,decls=comments();for(;decl=declaration();)decls.push(decl),decls=decls.concat(comments());return close()?pos({type:"page",selectors:sel,declarations:decls}):error("@page missing '}'")}()||function athost(){const pos=position();if(!match(/^@host\s*/))return;if(!open())return error("@host missing '{'");const style=comments().concat(rules());return close()?pos({type:"host",rules:style}):error("@host missing '}'")}()||function atfontface(){const pos=position();if(!match(/^@font-face\s*/))return;if(!open())return error("@font-face missing '{'");let decl,decls=comments();for(;decl=declaration();)decls.push(decl),decls=decls.concat(comments());return close()?pos({type:"font-face",declarations:decls}):error("@font-face missing '}'")}()}function rule(){const pos=position(),sel=selector();return sel?(comments(),pos({type:"rule",selectors:sel,declarations:declarations()})):error("selector missing")}return addParent(function stylesheet(){const rulesList=rules();return{type:"stylesheet",stylesheet:{source:options.source,rules:rulesList,parsingErrors:errorsList}}}())}function trim(str){return str?str.replace(/^\s+|\s+$/g,""):""}function addParent(obj,parent){const isNode=obj&&"string"==typeof obj.type,childParent=isNode?obj:parent;for(const k in obj){const value=obj[k];Array.isArray(value)?value.forEach((function(v){addParent(v,childParent)})):value&&"object"==typeof value&&addParent(value,childParent)}return isNode&&Object.defineProperty(obj,"parent",{configurable:!0,writable:!0,enumerable:!1,value:parent||null}),obj}var inherits_browser=__webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"),inherits_browser_default=__webpack_require__.n(inherits_browser);const compiler=Compiler;function Compiler(opts){this.options=opts||{}}Compiler.prototype.emit=function(str){return str},Compiler.prototype.visit=function(node){return this[node.type](node)},Compiler.prototype.mapVisit=function(nodes,delim){let buf="";delim=delim||"";for(let i=0,length=nodes.length;i<length;i++)buf+=this.visit(nodes[i]),delim&&i<length-1&&(buf+=this.emit(delim));return buf};const compress=compress_Compiler;function compress_Compiler(options){compiler.call(this,options)}inherits_browser_default()(compress_Compiler,compiler),compress_Compiler.prototype.compile=function(node){return node.stylesheet.rules.map(this.visit,this).join("")},compress_Compiler.prototype.comment=function(node){return this.emit("",node.position)},compress_Compiler.prototype.import=function(node){return this.emit("@import "+node.import+";",node.position)},compress_Compiler.prototype.media=function(node){return this.emit("@media "+node.media,node.position)+this.emit("{")+this.mapVisit(node.rules)+this.emit("}")},compress_Compiler.prototype.document=function(node){const doc="@"+(node.vendor||"")+"document "+node.document;return this.emit(doc,node.position)+this.emit("{")+this.mapVisit(node.rules)+this.emit("}")},compress_Compiler.prototype.charset=function(node){return this.emit("@charset "+node.charset+";",node.position)},compress_Compiler.prototype.namespace=function(node){return this.emit("@namespace "+node.namespace+";",node.position)},compress_Compiler.prototype.supports=function(node){return this.emit("@supports "+node.supports,node.position)+this.emit("{")+this.mapVisit(node.rules)+this.emit("}")},compress_Compiler.prototype.keyframes=function(node){return this.emit("@"+(node.vendor||"")+"keyframes "+node.name,node.position)+this.emit("{")+this.mapVisit(node.keyframes)+this.emit("}")},compress_Compiler.prototype.keyframe=function(node){const decls=node.declarations;return this.emit(node.values.join(","),node.position)+this.emit("{")+this.mapVisit(decls)+this.emit("}")},compress_Compiler.prototype.page=function(node){const sel=node.selectors.length?node.selectors.join(", "):"";return this.emit("@page "+sel,node.position)+this.emit("{")+this.mapVisit(node.declarations)+this.emit("}")},compress_Compiler.prototype["font-face"]=function(node){return this.emit("@font-face",node.position)+this.emit("{")+this.mapVisit(node.declarations)+this.emit("}")},compress_Compiler.prototype.host=function(node){return this.emit("@host",node.position)+this.emit("{")+this.mapVisit(node.rules)+this.emit("}")},compress_Compiler.prototype["custom-media"]=function(node){return this.emit("@custom-media "+node.name+" "+node.media+";",node.position)},compress_Compiler.prototype.rule=function(node){const decls=node.declarations;return decls.length?this.emit(node.selectors.join(","),node.position)+this.emit("{")+this.mapVisit(decls)+this.emit("}"):""},compress_Compiler.prototype.declaration=function(node){return this.emit(node.property+":"+node.value,node.position)+this.emit(";")};const stringify_identity=identity_Compiler;function identity_Compiler(options){options=options||{},compiler.call(this,options),this.indentation=options.indent}inherits_browser_default()(identity_Compiler,compiler),identity_Compiler.prototype.compile=function(node){return this.stylesheet(node)},identity_Compiler.prototype.stylesheet=function(node){return this.mapVisit(node.stylesheet.rules,"\n\n")},identity_Compiler.prototype.comment=function(node){return this.emit(this.indent()+"/*"+node.comment+"*/",node.position)},identity_Compiler.prototype.import=function(node){return this.emit("@import "+node.import+";",node.position)},identity_Compiler.prototype.media=function(node){return this.emit("@media "+node.media,node.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(node.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},identity_Compiler.prototype.document=function(node){const doc="@"+(node.vendor||"")+"document "+node.document;return this.emit(doc,node.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(node.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},identity_Compiler.prototype.charset=function(node){return this.emit("@charset "+node.charset+";",node.position)},identity_Compiler.prototype.namespace=function(node){return this.emit("@namespace "+node.namespace+";",node.position)},identity_Compiler.prototype.supports=function(node){return this.emit("@supports "+node.supports,node.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(node.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},identity_Compiler.prototype.keyframes=function(node){return this.emit("@"+(node.vendor||"")+"keyframes "+node.name,node.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(node.keyframes,"\n")+this.emit(this.indent(-1)+"}")},identity_Compiler.prototype.keyframe=function(node){const decls=node.declarations;return this.emit(this.indent())+this.emit(node.values.join(", "),node.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(decls,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},identity_Compiler.prototype.page=function(node){const sel=node.selectors.length?node.selectors.join(", ")+" ":"";return this.emit("@page "+sel,node.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(node.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},identity_Compiler.prototype["font-face"]=function(node){return this.emit("@font-face ",node.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(node.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},identity_Compiler.prototype.host=function(node){return this.emit("@host",node.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(node.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},identity_Compiler.prototype["custom-media"]=function(node){return this.emit("@custom-media "+node.name+" "+node.media+";",node.position)},identity_Compiler.prototype.rule=function(node){const indent=this.indent(),decls=node.declarations;return decls.length?this.emit(node.selectors.map((function(s){return indent+s})).join(",\n"),node.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(decls,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},identity_Compiler.prototype.declaration=function(node){return this.emit(this.indent())+this.emit(node.property+": "+node.value,node.position)+this.emit(";")},identity_Compiler.prototype.indent=function(level){return this.level=this.level||1,null!==level?(this.level+=level,""):Array(this.level).join(this.indentation||" ")};const transform_styles_traverse=function traverseCSS(css,callback){try{const parsed=parse(css),updated=traverse_default().map(parsed,(function(node){if(!node)return node;const updatedNode=callback(node);return this.update(updatedNode)}));return function stringify(node,options){return((options=options||{}).compress?new compress(options):new stringify_identity(options)).compile(node)}(updated)}catch(err){return console.warn("Error while traversing the CSS: "+err),null}};function isValidURL(meta){return 0!==meta.value.indexOf("data:")&&0!==meta.value.indexOf("#")&&(!function isAbsolutePath(filePath){return/^\/(?!\/)/.test(filePath)}(meta.value)&&!function isRemotePath(filePath){return/^(?:https?:)?\/\//.test(filePath)}(meta.value))}function getResourcePath(str,baseURL){return new URL(str,baseURL).toString()}const url_rewrite=rootURL=>node=>{if("declaration"===node.type){const updatedURLs=function getURLs(value){const reg=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let match;const URLs=[];for(;null!==(match=reg.exec(value));){const meta={source:match[0],before:match[1],quote:match[2],value:match[3],after:match[4]};isValidURL(meta)&&URLs.push(meta)}return URLs}(node.value).map(function processURL(baseURL){return meta=>({...meta,newUrl:"url("+meta.before+meta.quote+getResourcePath(meta.value,baseURL)+meta.quote+meta.after+")"})}(rootURL));return{...node,value:(raw=node.value,URLs=updatedURLs,URLs.forEach((item=>{raw=raw.replace(item.source,item.newUrl)})),raw)}}var raw,URLs;return node},IS_ROOT_TAG=/^(body|html|:root).*$/,transforms_wrap=function(namespace){let ignore=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return node=>{const updateSelector=selector=>ignore.includes(selector.trim())?selector:selector.match(IS_ROOT_TAG)?selector.replace(/^(body|html|:root)/,namespace):namespace+" "+selector;return"rule"===node.type?{...node,selectors:node.selectors.map(updateSelector)}:node}},transform_styles=function(styles){let wrapperClassName=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,lodash.map)(styles,(_ref=>{let{css,baseURL}=_ref;const transforms=[];return wrapperClassName&&transforms.push(transforms_wrap(wrapperClassName)),baseURL&&transforms.push(url_rewrite(baseURL)),transforms.length?transform_styles_traverse(css,(0,compose.A)(transforms)):css}))},EDITOR_STYLES_SELECTOR=".editor-styles-wrapper";function useDarkThemeBodyClassName(styles){return(0,react.useCallback)((node=>{if(!node)return;const{ownerDocument}=node,{defaultView,body}=ownerDocument,canvas=ownerDocument.querySelector(EDITOR_STYLES_SELECTOR);let backgroundColor;if(canvas)backgroundColor=defaultView.getComputedStyle(canvas,null).getPropertyValue("background-color");else{const tempCanvas=ownerDocument.createElement("div");tempCanvas.classList.add("editor-styles-wrapper"),body.appendChild(tempCanvas),backgroundColor=defaultView.getComputedStyle(tempCanvas,null).getPropertyValue("background-color"),body.removeChild(tempCanvas)}const colordBackgroundColor=(0,node_modules_colord.Mj)(backgroundColor);colordBackgroundColor.luminance()>.5||0===colordBackgroundColor.alpha()?body.classList.remove("is-dark-theme"):body.classList.add("is-dark-theme")}),[styles])}function EditorStyles(_ref){let{styles}=_ref;const transformedStyles=(0,react.useMemo)((()=>transform_styles(styles,EDITOR_STYLES_SELECTOR)),[styles]);return(0,react.createElement)(react.Fragment,null,(0,react.createElement)("style",{ref:useDarkThemeBodyClassName(styles)}),transformedStyles.map(((css,index)=>(0,react.createElement)("style",{key:index},css))))}function DuotoneStylesheet(_ref){let{selector,id}=_ref;const css=`\n${selector} {\n\tfilter: url( #${id} );\n}\n`;return(0,react.createElement)("style",null,css)}function DuotoneUnsetStylesheet(_ref2){let{selector}=_ref2;const css=`\n${selector} {\n\tfilter: none;\n}\n`;return(0,react.createElement)("style",null,css)}function DuotoneFilter(_ref3){let{id,colors}=_ref3;const values=function getValuesFromColors(){const values={r:[],g:[],b:[],a:[]};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((color=>{const rgbColor=(0,node_modules_colord.Mj)(color).toRgb();values.r.push(rgbColor.r/255),values.g.push(rgbColor.g/255),values.b.push(rgbColor.b/255),values.a.push(rgbColor.a)})),values}(colors);return(0,react.createElement)(svg.t4,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,react.createElement)("defs",null,(0,react.createElement)("filter",{id},(0,react.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,react.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,react.createElement)("feFuncR",{type:"table",tableValues:values.r.join(" ")}),(0,react.createElement)("feFuncG",{type:"table",tableValues:values.g.join(" ")}),(0,react.createElement)("feFuncB",{type:"table",tableValues:values.b.join(" ")}),(0,react.createElement)("feFuncA",{type:"table",tableValues:values.a.join(" ")})),(0,react.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function PresetDuotoneFilter(_ref4){let{preset}=_ref4;return(0,react.createElement)(DuotoneFilter,{id:`wp-duotone-${preset.slug}`,colors:preset.colors})}let MemoizedBlockList;(0,node_modules_colord.X$)([names.A,a11y.A]);const auto=function AutoBlockPreview(_ref){let{viewportWidth,__experimentalPadding,__experimentalMinHeight}=_ref;const[containerResizeListener,{width:containerWidth}]=useResizeAware(),[contentResizeListener,{height:contentHeight}]=useResizeAware(),{styles,assets,duotone}=use_select_useSelect((select=>{var _settings$__experimen,_settings$__experimen2;const settings=select(store_store).getSettings();return{styles:settings.styles,assets:settings.__unstableResolvedAssets,duotone:null===(_settings$__experimen=settings.__experimentalFeatures)||void 0===_settings$__experimen||null===(_settings$__experimen2=_settings$__experimen.color)||void 0===_settings$__experimen2?void 0:_settings$__experimen2.duotone}}),[]),editorStyles=(0,react.useMemo)((()=>styles?[...styles,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:styles),[styles]),svgFilters=(0,react.useMemo)((()=>{var _duotone$default,_duotone$theme;return[...null!==(_duotone$default=null==duotone?void 0:duotone.default)&&void 0!==_duotone$default?_duotone$default:[],...null!==(_duotone$theme=null==duotone?void 0:duotone.theme)&&void 0!==_duotone$theme?_duotone$theme:[]]}),[duotone]);MemoizedBlockList=MemoizedBlockList||(0,pure.A)(BlockList);const scale=containerWidth/viewportWidth;return(0,react.createElement)("div",{className:"block-editor-block-preview__container"},containerResizeListener,(0,react.createElement)(disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${scale})`,height:contentHeight*scale,maxHeight:contentHeight>2e3?2e3*scale:void 0,minHeight:__experimentalMinHeight}},(0,react.createElement)(iframe,{head:(0,react.createElement)(EditorStyles,{styles:editorStyles}),assets,contentRef:(0,use_ref_effect.A)((bodyElement=>{const{ownerDocument:{documentElement}}=bodyElement;documentElement.classList.add("block-editor-block-preview__content-iframe"),documentElement.style.position="absolute",documentElement.style.width="100%",bodyElement.style.padding=__experimentalPadding+"px",bodyElement.style.position="relative"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:viewportWidth,height:contentHeight,pointerEvents:"none",maxHeight:2e3,minHeight:0!==scale&&scale<1&&__experimentalMinHeight?__experimentalMinHeight/scale:__experimentalMinHeight}},contentResizeListener,svgFilters.map((preset=>(0,react.createElement)(PresetDuotoneFilter,{preset,key:preset.slug}))),(0,react.createElement)(MemoizedBlockList,{renderAppender:!1}))))};const block_preview=(0,react.memo)((function BlockPreview(_ref){let{blocks,__experimentalPadding=0,viewportWidth=1200,__experimentalLive=!1,__experimentalOnClick,__experimentalMinHeight}=_ref;const originalSettings=use_select_useSelect((select=>select(store_store).getSettings()),[]),settings=(0,react.useMemo)((()=>{const _settings={...originalSettings};return _settings.__experimentalBlockPatterns=[],_settings}),[originalSettings]),renderedBlocks=(0,react.useMemo)((()=>(0,lodash.castArray)(blocks)),[blocks]);return blocks&&0!==blocks.length?(0,react.createElement)(provider,{value:renderedBlocks,settings},__experimentalLive?(0,react.createElement)(LiveBlockPreview,{onClick:__experimentalOnClick}):(0,react.createElement)(auto,{viewportWidth,__experimentalPadding,__experimentalMinHeight})):null}));const preview_panel=function InserterPreviewPanel(_ref){var _example$viewportWidt;let{item}=_ref;const{name,title,icon,description,initialAttributes,example}=item,isReusable=(0,build_module.tk)(item);return(0,react.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,react.createElement)("div",{className:"block-editor-inserter__preview"},isReusable||example?(0,react.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,react.createElement)(block_preview,{__experimentalPadding:16,viewportWidth:null!==(_example$viewportWidt=null==example?void 0:example.viewportWidth)&&void 0!==_example$viewportWidt?_example$viewportWidt:500,blocks:example?(0,build_module.KL)(item.name,{attributes:{...example.attributes,...initialAttributes},innerBlocks:example.innerBlocks}):(0,build_module.Wv)(name,initialAttributes)})):(0,react.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,i18n_build_module.__)("No Preview Available."))),!isReusable&&(0,react.createElement)(block_card,{title,icon,description}))};const use_async_list=function useAsyncList(list){let config=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1};const{step=1}=config,[current,setCurrent]=(0,react.useState)([]);return(0,react.useEffect)((()=>{let firstItems=function getFirstItemsPresentInState(list,state){const firstItems=[];for(let i=0;i<list.length;i++){const item=list[i];if(!state.includes(item))break;firstItems.push(item)}return firstItems}(list,current);firstItems.length<step&&(firstItems=firstItems.concat(list.slice(firstItems.length,step))),setCurrent(firstItems);let nextIndex=firstItems.length;const asyncQueue=(0,priority_queue_build_module.y)(),append=()=>{list.length<=nextIndex||(setCurrent((state=>[...state,...list.slice(nextIndex,nextIndex+step)])),nextIndex+=step,asyncQueue.add({},append))};return asyncQueue.add({},append),()=>asyncQueue.reset()}),[list]),current};const truncate_component=contextConnect((function UnconnectedTruncate(props,forwardedRef){const truncateProps=useTruncate(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({as:"span"},truncateProps,{ref:forwardedRef}))}),"Truncate");var build_module_platform=__webpack_require__("../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/platform.js"),CompositeItem=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Composite/CompositeItem.js");const inserter_listbox_context=(0,react.createContext)();const inserter_listbox_item=(0,react.forwardRef)((function InserterListboxItem(_ref,ref){let{isFirst,as:Component,children,...props}=_ref;const state=(0,react.useContext)(inserter_listbox_context);return(0,react.createElement)(CompositeItem.l,(0,esm_extends.A)({ref,state,role:"option",focusable:!0},props),(htmlProps=>{const propsWithTabIndex={...htmlProps,tabIndex:isFirst?0:htmlProps.tabIndex};return Component?(0,react.createElement)(Component,propsWithTabIndex,children):"function"==typeof children?children(propsWithTabIndex):(0,react.createElement)(build_module_button,propsWithTabIndex,children)}))})),bodyClass="is-dragging-components-draggable";function Draggable(_ref){let{children,onDragStart,onDragOver,onDragEnd,cloneClassname,elementId,transferData,__experimentalTransferDataType:transferDataType="text",__experimentalDragComponent:dragComponent}=_ref;const dragComponentRef=(0,react.useRef)(null),cleanup=(0,react.useRef)((()=>{}));return(0,react.useEffect)((()=>()=>{cleanup.current()}),[]),(0,react.createElement)(react.Fragment,null,children({onDraggableStart:function start(event){const{ownerDocument}=event.target;event.dataTransfer.setData(transferDataType,JSON.stringify(transferData));const cloneWrapper=ownerDocument.createElement("div");cloneWrapper.style.top=0,cloneWrapper.style.left=0;const dragImage=ownerDocument.createElement("div");"function"==typeof event.dataTransfer.setDragImage&&(dragImage.classList.add("components-draggable__invisible-drag-image"),ownerDocument.body.appendChild(dragImage),event.dataTransfer.setDragImage(dragImage,0,0)),cloneWrapper.classList.add("components-draggable__clone"),cloneClassname&&cloneWrapper.classList.add(cloneClassname);let x=0,y=0;if(dragComponentRef.current){x=event.clientX,y=event.clientY,cloneWrapper.style.transform=`translate( ${x}px, ${y}px )`;const clonedDragComponent=ownerDocument.createElement("div");clonedDragComponent.innerHTML=dragComponentRef.current.innerHTML,cloneWrapper.appendChild(clonedDragComponent),ownerDocument.body.appendChild(cloneWrapper)}else{const element=ownerDocument.getElementById(elementId),elementRect=element.getBoundingClientRect(),elementWrapper=element.parentNode,elementTopOffset=parseInt(elementRect.top,10),elementLeftOffset=parseInt(elementRect.left,10);cloneWrapper.style.width=`${elementRect.width+0}px`;const clone=element.cloneNode(!0);clone.id=`clone-${elementId}`,x=elementLeftOffset-0,y=elementTopOffset-0,cloneWrapper.style.transform=`translate( ${x}px, ${y}px )`,Array.from(clone.querySelectorAll("iframe")).forEach((child=>child.parentNode.removeChild(child))),cloneWrapper.appendChild(clone),elementWrapper.appendChild(cloneWrapper)}let cursorLeft=event.clientX,cursorTop=event.clientY;const throttledDragOver=(0,lodash.throttle)((function over(e){if(cursorLeft===e.clientX&&cursorTop===e.clientY)return;const nextX=x+e.clientX-cursorLeft,nextY=y+e.clientY-cursorTop;cloneWrapper.style.transform=`translate( ${nextX}px, ${nextY}px )`,cursorLeft=e.clientX,cursorTop=e.clientY,x=nextX,y=nextY,onDragOver&&onDragOver(e)}),16);let timerId;ownerDocument.addEventListener("dragover",throttledDragOver),ownerDocument.body.classList.add(bodyClass),event.persist(),onDragStart&&(timerId=setTimeout((()=>onDragStart(event)))),cleanup.current=()=>{cloneWrapper&&cloneWrapper.parentNode&&cloneWrapper.parentNode.removeChild(cloneWrapper),dragImage&&dragImage.parentNode&&dragImage.parentNode.removeChild(dragImage),ownerDocument.body.classList.remove(bodyClass),ownerDocument.removeEventListener("dragover",throttledDragOver),clearTimeout(timerId)}},onDraggableEnd:function end(event){event.preventDefault(),cleanup.current(),onDragEnd&&onDragEnd(event)}}),dragComponent&&(0,react.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:dragComponentRef},dragComponent))}const drag_handle=(0,react.createElement)(build_module_svg.t4,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function BlockDraggableChip(_ref){let{count,icon}=_ref;return(0,react.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,react.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,react.createElement)(flex_component,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,react.createElement)(flex_item_component,null,icon?(0,react.createElement)(block_icon,{icon}):(0,i18n_build_module.nv)((0,i18n_build_module._n)("%d block","%d blocks",count),count)),(0,react.createElement)(flex_item_component,null,(0,react.createElement)(block_icon,{icon:drag_handle})))))}const inserter_draggable_blocks=_ref=>{let{isEnabled,blocks,icon,children}=_ref;const transferData={type:"inserter",blocks};return(0,react.createElement)(Draggable,{__experimentalTransferDataType:"wp-blocks",transferData,__experimentalDragComponent:(0,react.createElement)(BlockDraggableChip,{count:blocks.length,icon})},(_ref2=>{let{onDraggableStart,onDraggableEnd}=_ref2;return children({draggable:isEnabled,onDragStart:isEnabled?onDraggableStart:void 0,onDragEnd:isEnabled?onDraggableEnd:void 0})}))};const inserter_list_item=(0,react.memo)((function InserterListItem(_ref){let{className,isFirst,item,onSelect,onHover,isDraggable,...props}=_ref;const isDragging=(0,react.useRef)(!1),itemIconStyle=item.icon?{backgroundColor:item.icon.background,color:item.icon.foreground}:{},blocks=(0,react.useMemo)((()=>[(0,build_module.Wv)(item.name,item.initialAttributes,(0,build_module.to)(item.innerBlocks))]),[item.name,item.initialAttributes,item.initialAttributes]);return(0,react.createElement)(inserter_draggable_blocks,{isEnabled:isDraggable&&!item.disabled,blocks,icon:item.icon},(_ref2=>{let{draggable,onDragStart,onDragEnd}=_ref2;return(0,react.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable,onDragStart:event=>{isDragging.current=!0,onDragStart&&(onHover(null),onDragStart(event))},onDragEnd:event=>{isDragging.current=!1,onDragEnd&&onDragEnd(event)}},(0,react.createElement)(inserter_listbox_item,(0,esm_extends.A)({isFirst,className:classnames_default()("block-editor-block-types-list__item",className),disabled:item.isDisabled,onClick:event=>{event.preventDefault(),onSelect(item,(0,build_module_platform.H)()?event.metaKey:event.ctrlKey),onHover(null)},onKeyDown:event=>{const{keyCode}=event;keyCode===keycodes_build_module.Fm&&(event.preventDefault(),onSelect(item,(0,build_module_platform.H)()?event.metaKey:event.ctrlKey),onHover(null))},onFocus:()=>{isDragging.current||onHover(item)},onMouseEnter:()=>{isDragging.current||onHover(item)},onMouseLeave:()=>onHover(null),onBlur:()=>onHover(null)},props),(0,react.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:itemIconStyle},(0,react.createElement)(block_icon,{icon:item.icon,showColors:!0})),(0,react.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,react.createElement)(truncate_component,{numberOfLines:3},item.title))))}))}));const group=(0,react.forwardRef)((function InserterListboxGroup(props,ref){const[shouldSpeak,setShouldSpeak]=(0,react.useState)(!1);return(0,react.useEffect)((()=>{shouldSpeak&&speak((0,i18n_build_module.__)("Use left and right arrow keys to move through blocks"))}),[shouldSpeak]),(0,react.createElement)("div",(0,esm_extends.A)({ref,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{setShouldSpeak(!0)},onBlur:event=>{!event.currentTarget.contains(event.relatedTarget)&&setShouldSpeak(!1)}},props))}));var _rollupPluginBabelHelpers_1f0bf8c2=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/_rollupPluginBabelHelpers-1f0bf8c2.js"),createComponent=__webpack_require__("../../node_modules/.pnpm/reakit-system@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-system/es/createComponent.js"),createHook=__webpack_require__("../../node_modules/.pnpm/reakit-system@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-system/es/createHook.js"),useForkRef=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/useForkRef.js"),useIsomorphicEffect=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/useIsomorphicEffect.js"),findEnabledItemById_8ddca752=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/findEnabledItemById-8ddca752.js"),_keys_6742f591=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/__keys-6742f591.js"),Id=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Id/Id.js"),Role=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Role/Role.js"),useGroup=(0,createHook.a)({name:"Group",compose:Role.I,keys:[],useProps:function useProps(_,htmlProps){return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({role:"group"},htmlProps)}}),useCompositeGroup=((0,createComponent.a)({as:"div",useHook:useGroup}),(0,createHook.a)({name:"CompositeGroup",compose:[useGroup,Id.W],keys:_keys_6742f591.a,propsAreEqual:function propsAreEqual(prev,next){if(!next.id||prev.id!==next.id)return useGroup.unstable_propsAreEqual(prev,next);var prevCurrentId=prev.currentId,prevProps=(prev.unstable_moves,(0,_rollupPluginBabelHelpers_1f0bf8c2._)(prev,["currentId","unstable_moves"])),nextCurrentId=next.currentId,nextProps=(next.unstable_moves,(0,_rollupPluginBabelHelpers_1f0bf8c2._)(next,["currentId","unstable_moves"]));if(prev.items&&next.items){var prevCurrentItem=(0,findEnabledItemById_8ddca752.f)(prev.items,prevCurrentId),nextCurrentItem=(0,findEnabledItemById_8ddca752.f)(next.items,nextCurrentId),prevGroupId=null==prevCurrentItem?void 0:prevCurrentItem.groupId,nextGroupId=null==nextCurrentItem?void 0:nextCurrentItem.groupId;if(next.id===nextGroupId||next.id===prevGroupId)return!1}return useGroup.unstable_propsAreEqual(prevProps,nextProps)},useProps:function useProps(options,_ref){var htmlRef=_ref.ref,htmlProps=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref,["ref"]),ref=(0,react.useRef)(null),id=options.id;return(0,useIsomorphicEffect.o)((function(){var _options$registerGrou;if(id)return null===(_options$registerGrou=options.registerGroup)||void 0===_options$registerGrou||_options$registerGrou.call(options,{id,ref}),function(){var _options$unregisterGr;null===(_options$unregisterGr=options.unregisterGroup)||void 0===_options$unregisterGr||_options$unregisterGr.call(options,id)}}),[id,options.registerGroup,options.unregisterGroup]),(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({ref:(0,useForkRef.N)(ref,htmlRef)},htmlProps)}})),CompositeGroup=(0,createComponent.a)({as:"div",useHook:useCompositeGroup});const inserter_listbox_row=(0,react.forwardRef)((function InserterListboxRow(props,ref){const state=(0,react.useContext)(inserter_listbox_context);return(0,react.createElement)(CompositeGroup,(0,esm_extends.A)({state,role:"presentation",ref},props))}));const block_types_list=function BlockTypesList(_ref){let{items=[],onSelect,onHover=()=>{},children,label,isDraggable=!0}=_ref;return(0,react.createElement)(group,{className:"block-editor-block-types-list","aria-label":label},function chunk(array,size){const chunks=[];for(let i=0,j=array.length;i<j;i+=size)chunks.push(array.slice(i,i+size));return chunks}(items,3).map(((row,i)=>(0,react.createElement)(inserter_listbox_row,{key:i},row.map(((item,j)=>(0,react.createElement)(inserter_list_item,{key:item.id,item,className:(0,build_module.HK)(item.id),onSelect,onHover,isDraggable:isDraggable&&!item.isDisabled,isFirst:0===i&&0===j})))))),children)};const panel=function InserterPanel(_ref){let{title,icon,children}=_ref;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,react.createElement)("h2",{className:"block-editor-inserter__panel-title"},title),(0,react.createElement)(build_module_icon,{icon})),(0,react.createElement)("div",{className:"block-editor-inserter__panel-content"},children))},use_block_types_state=(rootClientId,onInsert)=>{const{categories,collections,items}=use_select_useSelect((select=>{const{getInserterItems}=select(store_store),{getCategories,getCollections}=select(build_module.M_);return{categories:getCategories(),collections:getCollections(),items:getInserterItems(rootClientId)}}),[rootClientId]),onSelectItem=(0,react.useCallback)(((_ref,shouldFocusBlock)=>{let{name,initialAttributes,innerBlocks}=_ref;const insertedBlock=(0,build_module.Wv)(name,initialAttributes,(0,build_module.to)(innerBlocks));onInsert(insertedBlock,void 0,shouldFocusBlock)}),[onInsert]);return[items,categories,collections,onSelectItem]};var CompositeState=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Composite/CompositeState.js");const inserter_listbox=function InserterListbox(_ref){let{children}=_ref;const compositeState=(0,CompositeState.A)({shift:!0,wrap:"horizontal"});return(0,react.createElement)(inserter_listbox_context.Provider,{value:compositeState},children)},block_types_tab_EMPTY_ARRAY=[];const block_types_tab=function BlockTypesTab(_ref){let{rootClientId,onInsert,onHover,showMostUsedBlocks}=_ref;const[items,categories,collections,onSelectItem]=use_block_types_state(rootClientId,onInsert),suggestedItems=(0,react.useMemo)((()=>(0,lodash.orderBy)(items,["frecency"],["desc"]).slice(0,6)),[items]),uncategorizedItems=(0,react.useMemo)((()=>items.filter((item=>!item.category))),[items]),itemsPerCategory=(0,react.useMemo)((()=>(0,lodash.flow)((itemList=>itemList.filter((item=>item.category&&"reusable"!==item.category))),(itemList=>(0,lodash.groupBy)(itemList,"category")))(items)),[items]),itemsPerCollection=(0,react.useMemo)((()=>{const result={...collections};return Object.keys(collections).forEach((namespace=>{result[namespace]=items.filter((item=>(item=>item.name.split("/")[0])(item)===namespace)),0===result[namespace].length&&delete result[namespace]})),result}),[items,collections]);(0,react.useEffect)((()=>()=>onHover(null)),[]);const currentlyRenderedCategories=use_async_list(categories),didRenderAllCategories=categories.length===currentlyRenderedCategories.length,collectionEntries=(0,react.useMemo)((()=>Object.entries(collections)),[collections]),currentlyRenderedCollections=use_async_list(didRenderAllCategories?collectionEntries:block_types_tab_EMPTY_ARRAY);return(0,react.createElement)(inserter_listbox,null,(0,react.createElement)("div",null,showMostUsedBlocks&&!!suggestedItems.length&&(0,react.createElement)(panel,{title:(0,i18n_build_module._x)("Most used","blocks")},(0,react.createElement)(block_types_list,{items:suggestedItems,onSelect:onSelectItem,onHover,label:(0,i18n_build_module._x)("Most used","blocks")})),(0,lodash.map)(currentlyRenderedCategories,(category=>{const categoryItems=itemsPerCategory[category.slug];return categoryItems&&categoryItems.length?(0,react.createElement)(panel,{key:category.slug,title:category.title,icon:category.icon},(0,react.createElement)(block_types_list,{items:categoryItems,onSelect:onSelectItem,onHover,label:category.title})):null})),didRenderAllCategories&&uncategorizedItems.length>0&&(0,react.createElement)(panel,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,i18n_build_module.__)("Uncategorized")},(0,react.createElement)(block_types_list,{items:uncategorizedItems,onSelect:onSelectItem,onHover,label:(0,i18n_build_module.__)("Uncategorized")})),(0,lodash.map)(currentlyRenderedCollections,(_ref2=>{let[namespace,collection]=_ref2;const collectionItems=itemsPerCollection[namespace];return collectionItems&&collectionItems.length?(0,react.createElement)(panel,{key:namespace,title:collection.title,icon:collection.icon},(0,react.createElement)(block_types_list,{items:collectionItems,onSelect:onSelectItem,onHover,label:collection.title})):null}))))},select_control_noop=()=>{};const SelectControl=(0,react.forwardRef)((function UnforwardedSelectControl(_ref,ref){let{className,disabled=!1,help,hideLabelFromVision,id:idProp,label,multiple=!1,onBlur=select_control_noop,onChange=select_control_noop,onFocus=select_control_noop,options=[],size="default",value:valueProp,labelPosition="top",children,prefix,suffix,__next36pxDefaultSize=!1,__nextHasNoMarginBottom=!1,...props}=_ref;const[isFocused,setIsFocused]=(0,react.useState)(!1),id=function select_control_useUniqueId(idProp){const instanceId=(0,use_instance_id.A)(SelectControl);return idProp||`inspector-select-control-${instanceId}`}(idProp),helpId=help?`${id}__help`:void 0;if(!(null!=options&&options.length||children))return null;const classes=classnames_default()("components-select-control",className);return(0,react.createElement)(base_control,{help,id,__nextHasNoMarginBottom},(0,react.createElement)(input_base,{className:classes,disabled,hideLabelFromVision,id,isFocused,label,size,suffix:suffix||(0,react.createElement)(select_control_chevron_down,null),prefix,labelPosition,__next36pxDefaultSize},(0,react.createElement)(Select,(0,helpers_esm_extends.A)({},props,{__next36pxDefaultSize,"aria-describedby":helpId,className:"components-select-control__input",disabled,id,multiple,onBlur:event=>{onBlur(event),setIsFocused(!1)},onChange:event=>{if(multiple){const selectedOptions=Array.from(event.target.options).filter((_ref2=>{let{selected}=_ref2;return selected})),newValues=selectedOptions.map((_ref3=>{let{value}=_ref3;return value}));onChange(newValues)}else onChange(event.target.value,{event})},onFocus:event=>{onFocus(event),setIsFocused(!0)},ref,selectSize:size,value:valueProp}),children||options.map(((option,index)=>{const key=option.id||`${option.label}-${option.value}-${index}`;return(0,react.createElement)("option",{key,value:option.value,disabled:option.disabled},option.label)})))))})),select_control=SelectControl;const pattern_panel=function PatternInserterPanel(_ref){let{selectedCategory,patternCategories,onClickCategory,openPatternExplorer}=_ref;const isMobile=(0,use_viewport_match.A)("medium","<"),className=classnames_default()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,react.createElement)(flex_component,{justify:"space-between",align:"start",gap:"4",className},(0,react.createElement)(flex_item_component,{isBlock:!0},(0,react.createElement)(select_control,{className:"block-editor-inserter__panel-dropdown",label:(0,i18n_build_module.__)("Filter patterns"),hideLabelFromVision:!0,value:selectedCategory.name,onChange:selected=>{onClickCategory(patternCategories.find((patternCategory=>selected===patternCategory.name)))},onBlur:event=>{null!=event&&event.relatedTarget||event.stopPropagation()},options:(()=>{const options=[];return patternCategories.map((patternCategory=>options.push({value:patternCategory.name,label:patternCategory.label}))),options})()})),!isMobile&&(0,react.createElement)(flex_item_component,null,(0,react.createElement)(build_module_button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,i18n_build_module.__)("Explore all patterns"),onClick:()=>openPatternExplorer()},(0,i18n_build_module._x)("Explore","Label for showing all block patterns"))))};var redux=__webpack_require__("../../node_modules/.pnpm/redux@4.2.1/node_modules/redux/es/redux.js"),equivalent_key_map=__webpack_require__("../../node_modules/.pnpm/equivalent-key-map@0.2.2/node_modules/equivalent-key-map/equivalent-key-map.js"),equivalent_key_map_default=__webpack_require__.n(equivalent_key_map);var rungen_dist=__webpack_require__("../../node_modules/.pnpm/rungen@0.3.2/node_modules/rungen/dist/index.js"),is_promise=__webpack_require__("../../node_modules/.pnpm/is-promise@4.0.0/node_modules/is-promise/index.mjs"),is_plain_object=__webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs");function isAction(object){return(0,is_plain_object.Q)(object)&&"string"==typeof object.type}function createRuntime(controls={},dispatch){const rungenControls=Object.entries(controls).map((([actionType,control])=>(value,next,iterate,yieldNext,yieldError)=>{if(!function isActionOfType(object,expectedType){return isAction(object)&&object.type===expectedType}(value,actionType))return!1;const routine=control(value);return(0,is_promise.A)(routine)?routine.then(yieldNext,yieldError):yieldNext(routine),!0}));rungenControls.push(((value,next)=>!!isAction(value)&&(dispatch(value),next(),!0)));const rungenRuntime=(0,rungen_dist.create)(rungenControls);return action=>new Promise(((resolve,reject)=>rungenRuntime(action,(result=>{isAction(result)&&dispatch(result),resolve(result)}),reject)))}function createMiddleware(controls={}){return store=>{const runtime=createRuntime(controls,store.dispatch);return next=>action=>function isGenerator(object){return!!object&&"function"==typeof object[Symbol.iterator]&&"function"==typeof object.next}(action)?runtime(action):next(action)}}const basePipe=(reverse=!1)=>(...funcs)=>(...args)=>{const functions=funcs.flat();return reverse&&functions.reverse(),functions.reduce(((prev,func)=>[func(...prev)]),args)[0]},higher_order_compose=(basePipe(),basePipe(!0));function createRegistryControl(registryControl){return registryControl.isRegistryControl=!0,registryControl}const builtinControls={"@@data/SELECT":createRegistryControl((registry=>({storeKey,selectorName,args})=>registry.select(storeKey)[selectorName](...args))),"@@data/RESOLVE_SELECT":createRegistryControl((registry=>({storeKey,selectorName,args})=>{const method=registry.select(storeKey)[selectorName].hasResolver?"resolveSelect":"select";return registry[method](storeKey)[selectorName](...args)})),"@@data/DISPATCH":createRegistryControl((registry=>({storeKey,actionName,args})=>registry.dispatch(storeKey)[actionName](...args)))};var implementation_process=__webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");const CORE_MODULES_USING_PRIVATE_APIS=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/interface","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews"],registeredPrivateApis=[];let allowReRegistration;try{allowReRegistration=!implementation_process.env.IS_WORDPRESS_CORE}catch(error){allowReRegistration=!0}function lock(object,privateData){if(!object)throw new Error("Cannot lock an undefined object.");__private in object||(object[__private]={}),lockedData.set(object[__private],privateData)}function unlock(object){if(!object)throw new Error("Cannot unlock an undefined object.");if(!(__private in object))throw new Error("Cannot unlock an object that was not locked before. ");return lockedData.get(object[__private])}const lockedData=new WeakMap,__private=Symbol("Private API ID");const{lock:lock_unlock_lock,unlock:lock_unlock_unlock}=((consent,moduleName)=>{if(!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName))throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!allowReRegistration&&registeredPrivateApis.includes(moduleName))throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress."!==consent)throw new Error("You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.");return registeredPrivateApis.push(moduleName),{lock,unlock}})("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/data"),promise_middleware=()=>next=>action=>(0,is_promise.A)(action)?action.then((resolvedAction=>{if(resolvedAction)return next(resolvedAction)})):next(action),resolvers_cache_middleware=(registry,storeName)=>()=>next=>action=>{const resolvers=registry.select(storeName).getCachedResolvers();return Object.entries(resolvers).forEach((([selectorName,resolversByArgs])=>{const resolver=registry.stores[storeName]?.resolvers?.[selectorName];resolver&&resolver.shouldInvalidate&&resolversByArgs.forEach(((value,args)=>{void 0!==value&&("finished"!==value.status&&"error"!==value.status||resolver.shouldInvalidate(action,...args)&&registry.dispatch(storeName).invalidateResolution(selectorName,args))}))})),next(action)};function createThunkMiddleware(args){return()=>next=>action=>"function"==typeof action?action(args):next(action)}function selectorArgsToStateKey(args){if(null==args)return[];const len=args.length;let idx=len;for(;idx>0&&void 0===args[idx-1];)idx--;return idx===len?args:args.slice(0,idx)}const subKeysIsResolved=(actionProperty="selectorName",reducer=>(state={},action)=>{const key=action[actionProperty];if(void 0===key)return state;const nextKeyState=reducer(state[key],action);return nextKeyState===state[key]?state:{...state,[key]:nextKeyState}})(((state=new(equivalent_key_map_default()),action)=>{switch(action.type){case"START_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.set(selectorArgsToStateKey(action.args),{status:"resolving"}),nextState}case"FINISH_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.set(selectorArgsToStateKey(action.args),{status:"finished"}),nextState}case"FAIL_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.set(selectorArgsToStateKey(action.args),{status:"error",error:action.error}),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);return action.args.forEach(((resolutionArgs,idx)=>{const resolutionState={status:"error",error:void 0},error=action.errors[idx];error&&(resolutionState.error=error),nextState.set(selectorArgsToStateKey(resolutionArgs),resolutionState)})),nextState}case"INVALIDATE_RESOLUTION":{const nextState=new(equivalent_key_map_default())(state);return nextState.delete(selectorArgsToStateKey(action.args)),nextState}}return state}));var actionProperty;const metadata_reducer=(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},logged=Object.create(null);function deprecated(feature,options={}){const{since,version,alternative,plugin,link,hint}=options,message=`${feature} is deprecated${since?` since version ${since}`:""}${version?` and will be removed${plugin?` from ${plugin}`:""} in version ${version}`:""}.${alternative?` Please use ${alternative} instead.`:""}${link?` See: ${link}`:""}${hint?` Note: ${hint}`:""}`;message in logged||((0,hooks_build_module.Eo)("deprecated",feature,options,message),console.warn(message),logged[message]=!0)}function getResolutionState(state,selectorName,args){const map=state[selectorName];if(map)return map.get(selectorArgsToStateKey(args))}function getIsResolving(state,selectorName,args){deprecated("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&&"resolving"===resolutionState.status}function hasStartedResolution(state,selectorName,args){return void 0!==getResolutionState(state,selectorName,args)}function hasFinishedResolution(state,selectorName,args){const status=getResolutionState(state,selectorName,args)?.status;return"finished"===status||"error"===status}function hasResolutionFailed(state,selectorName,args){return"error"===getResolutionState(state,selectorName,args)?.status}function getResolutionError(state,selectorName,args){const resolutionState=getResolutionState(state,selectorName,args);return"error"===resolutionState?.status?resolutionState.error:null}function isResolving(state,selectorName,args){return"resolving"===getResolutionState(state,selectorName,args)?.status}function getCachedResolvers(state){return state}function hasResolvingSelectors(state){return Object.values(state).some((selectorState=>Array.from(selectorState._map.values()).some((resolution=>"resolving"===resolution[1]?.status))))}const countSelectorsByStatus=(0,rememo.A)((state=>{const selectorsByStatus={};return Object.values(state).forEach((selectorState=>Array.from(selectorState._map.values()).forEach((resolution=>{var _resolution$1$status;const currentStatus=null!==(_resolution$1$status=resolution[1]?.status)&&void 0!==_resolution$1$status?_resolution$1$status:"error";selectorsByStatus[currentStatus]||(selectorsByStatus[currentStatus]=0),selectorsByStatus[currentStatus]++})))),selectorsByStatus}),(state=>[state]));function startResolution(selectorName,args){return{type:"START_RESOLUTION",selectorName,args}}function finishResolution(selectorName,args){return{type:"FINISH_RESOLUTION",selectorName,args}}function failResolution(selectorName,args,error){return{type:"FAIL_RESOLUTION",selectorName,args,error}}function startResolutions(selectorName,args){return{type:"START_RESOLUTIONS",selectorName,args}}function finishResolutions(selectorName,args){return{type:"FINISH_RESOLUTIONS",selectorName,args}}function failResolutions(selectorName,args,errors){return{type:"FAIL_RESOLUTIONS",selectorName,args,errors}}function invalidateResolution(selectorName,args){return{type:"INVALIDATE_RESOLUTION",selectorName,args}}function invalidateResolutionForStore(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function invalidateResolutionForStoreSelector(selectorName){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName}}const trimUndefinedValues=array=>{const result=[...array];for(let i=result.length-1;i>=0;i--)void 0===result[i]&&result.splice(i,1);return result},mapValues=(obj,callback)=>Object.fromEntries(Object.entries(null!=obj?obj:{}).map((([key,value])=>[key,callback(value,key)]))),devToolsReplacer=(key,state)=>state instanceof Map?Object.fromEntries(state):state instanceof window.HTMLElement?null:state;function createBindingCache(bind){const cache=new WeakMap;return{get(item,itemName){let boundItem=cache.get(item);return boundItem||(boundItem=bind(item,itemName),cache.set(item,boundItem)),boundItem}}}function createReduxStore(key,options){const privateActions={},privateSelectors={},privateRegistrationFunctions={privateActions,registerPrivateActions:actions=>{Object.assign(privateActions,actions)},privateSelectors,registerPrivateSelectors:selectors=>{Object.assign(privateSelectors,selectors)}},storeDescriptor={name:key,instantiate:registry=>{const listeners=new Set,reducer=options.reducer,store=function instantiateReduxStore(key,options,registry,thunkArgs){const controls={...options.controls,...builtinControls},normalizedControls=mapValues(controls,(control=>control.isRegistryControl?control(registry):control)),middlewares=[resolvers_cache_middleware(registry,key),promise_middleware,createMiddleware(normalizedControls),createThunkMiddleware(thunkArgs)],enhancers=[(0,redux.Tw)(...middlewares)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:key,instanceId:key,serialize:{replacer:devToolsReplacer}}));const{reducer,initialState}=options,enhancedReducer=function combineReducers(reducers){const keys=Object.keys(reducers);return function combinedReducer(state={},action){const nextState={};let hasChanged=!1;for(const key of keys){const reducer=reducers[key],prevStateForKey=state[key],nextStateForKey=reducer(prevStateForKey,action);nextState[key]=nextStateForKey,hasChanged=hasChanged||nextStateForKey!==prevStateForKey}return hasChanged?nextState:state}}({metadata:metadata_reducer,root:reducer});return(0,redux.y$)(enhancedReducer,{root:initialState},higher_order_compose(enhancers))}(key,options,registry,{registry,get dispatch(){return thunkActions},get select(){return thunkSelectors},get resolveSelect(){return getResolveSelectors()}});lock_unlock_lock(store,privateRegistrationFunctions);const resolversCache=function createResolversCache(){const cache={};return{isRunning:(selectorName,args)=>cache[selectorName]&&cache[selectorName].get(trimUndefinedValues(args)),clear(selectorName,args){cache[selectorName]&&cache[selectorName].delete(trimUndefinedValues(args))},markAsRunning(selectorName,args){cache[selectorName]||(cache[selectorName]=new(equivalent_key_map_default())),cache[selectorName].set(trimUndefinedValues(args),!0)}}}();function bindAction(action){return(...args)=>Promise.resolve(store.dispatch(action(...args)))}const actions={...mapValues(metadata_actions_namespaceObject,bindAction),...mapValues(options.actions,bindAction)},boundPrivateActions=createBindingCache(bindAction),allActions=new Proxy((()=>{}),{get:(target,prop)=>{const privateAction=privateActions[prop];return privateAction?boundPrivateActions.get(privateAction,prop):actions[prop]}}),thunkActions=new Proxy(allActions,{apply:(target,thisArg,[action])=>store.dispatch(action)});lock_unlock_lock(actions,allActions);const resolvers=options.resolvers?function mapResolvers(resolvers){return mapValues(resolvers,(resolver=>resolver.fulfill?resolver:{...resolver,fulfill:resolver}))}(options.resolvers):{};function bindSelector(selector,selectorName){selector.isRegistrySelector&&(selector.registry=registry);const boundSelector=(...args)=>{args=normalize(selector,args);const state=store.__unstableOriginalGetState();return selector.isRegistrySelector&&(selector.registry=registry),selector(state.root,...args)};boundSelector.__unstableNormalizeArgs=selector.__unstableNormalizeArgs;const resolver=resolvers[selectorName];return resolver?function mapSelectorWithResolver(selector,selectorName,resolver,store,resolversCache){function fulfillSelector(args){const state=store.getState();if(resolversCache.isRunning(selectorName,args)||"function"==typeof resolver.isFulfilled&&resolver.isFulfilled(state,...args))return;const{metadata}=store.__unstableOriginalGetState();hasStartedResolution(metadata,selectorName,args)||(resolversCache.markAsRunning(selectorName,args),setTimeout((async()=>{resolversCache.clear(selectorName,args),store.dispatch(startResolution(selectorName,args));try{const action=resolver.fulfill(...args);action&&await store.dispatch(action),store.dispatch(finishResolution(selectorName,args))}catch(error){store.dispatch(failResolution(selectorName,args,error))}}),0))}const selectorResolver=(...args)=>(fulfillSelector(args=normalize(selector,args)),selector(...args));return selectorResolver.hasResolver=!0,selectorResolver}(boundSelector,selectorName,resolver,store,resolversCache):(boundSelector.hasResolver=!1,boundSelector)}const selectors={...mapValues(metadata_selectors_namespaceObject,(function bindMetadataSelector(metaDataSelector){const boundSelector=(...args)=>{const state=store.__unstableOriginalGetState(),originalSelectorName=args&&args[0],originalSelectorArgs=args&&args[1],targetSelector=options?.selectors?.[originalSelectorName];return originalSelectorName&&targetSelector&&(args[1]=normalize(targetSelector,originalSelectorArgs)),metaDataSelector(state.metadata,...args)};return boundSelector.hasResolver=!1,boundSelector})),...mapValues(options.selectors,bindSelector)},boundPrivateSelectors=createBindingCache(bindSelector);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]}}),thunkSelectors=new Proxy(allSelectors,{apply:(target,thisArg,[selector])=>selector(store.__unstableOriginalGetState())});lock_unlock_lock(selectors,allSelectors);const resolveSelectors=function mapResolveSelectors(selectors,store){const{getIsResolving,hasStartedResolution,hasFinishedResolution,hasResolutionFailed,isResolving,getCachedResolvers,getResolutionState,getResolutionError,hasResolvingSelectors,countSelectorsByStatus,...storeSelectors}=selectors;return mapValues(storeSelectors,((selector,selectorName)=>selector.hasResolver?(...args)=>new Promise(((resolve,reject)=>{const hasFinished=()=>selectors.hasFinishedResolution(selectorName,args),finalize=result=>{if(selectors.hasResolutionFailed(selectorName,args)){const error=selectors.getResolutionError(selectorName,args);reject(error)}else resolve(result)},getResult=()=>selector.apply(null,args),result=getResult();if(hasFinished())return finalize(result);const unsubscribe=store.subscribe((()=>{hasFinished()&&(unsubscribe(),finalize(getResult()))}))})):async(...args)=>selector.apply(null,args)))}(selectors,store),suspendSelectors=function mapSuspendSelectors(selectors,store){return mapValues(selectors,((selector,selectorName)=>selector.hasResolver?(...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((()=>{selectors.hasFinishedResolution(selectorName,args)&&(resolve(),unsubscribe())}))}))}:selector))}(selectors,store),getResolveSelectors=()=>resolveSelectors;store.__unstableOriginalGetState=store.getState,store.getState=()=>store.__unstableOriginalGetState().root;const subscribe=store&&(listener=>(listeners.add(listener),()=>listeners.delete(listener)));let lastState=store.__unstableOriginalGetState();return store.subscribe((()=>{const state=store.__unstableOriginalGetState(),hasChanged=state!==lastState;if(lastState=state,hasChanged)for(const listener of listeners)listener()})),{reducer,store,actions,selectors,resolvers,getSelectors:()=>selectors,getResolveSelectors,getSuspendSelectors:()=>suspendSelectors,getActions:()=>actions,subscribe}}};return lock_unlock_lock(storeDescriptor,privateRegistrationFunctions),storeDescriptor}function normalize(selector,args){return selector.__unstableNormalizeArgs&&"function"==typeof selector.__unstableNormalizeArgs&&args?.length?selector.__unstableNormalizeArgs(args):args}const build_module_store={name:"core/data",instantiate(registry){const getCoreDataSelector=selectorName=>(key,...args)=>registry.select(key)[selectorName](...args),getCoreDataAction=actionName=>(key,...args)=>registry.dispatch(key)[actionName](...args);return{getSelectors:()=>Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map((selectorName=>[selectorName,getCoreDataSelector(selectorName)]))),getActions:()=>Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map((actionName=>[actionName,getCoreDataAction(actionName)]))),subscribe:()=>()=>()=>{}}}};function createEmitter(){let isPaused=!1,isPending=!1;const listeners=new Set,notifyListeners=()=>Array.from(listeners).forEach((listener=>listener()));return{get isPaused(){return isPaused},subscribe:listener=>(listeners.add(listener),()=>listeners.delete(listener)),pause(){isPaused=!0},resume(){isPaused=!1,isPending&&(isPending=!1,notifyListeners())},emit(){isPaused?isPending=!0:notifyListeners()}}}function getStoreName(storeNameOrDescriptor){return"string"==typeof storeNameOrDescriptor?storeNameOrDescriptor:storeNameOrDescriptor.name}const build_module_default_registry=function createRegistry(storeConfigs={},parent=null){const stores={},emitter=createEmitter();let listeningStores=null;function globalListener(){emitter.emit()}function registerStoreInstance(name,createStore){if(stores[name])return console.error('Store "'+name+'" is already registered.'),stores[name];const store=createStore();if("function"!=typeof store.getSelectors)throw new TypeError("store.getSelectors must be a function");if("function"!=typeof store.getActions)throw new TypeError("store.getActions must be a function");if("function"!=typeof store.subscribe)throw new TypeError("store.subscribe must be a function");store.emitter=createEmitter();const currentSubscribe=store.subscribe;if(store.subscribe=listener=>{const unsubscribeFromEmitter=store.emitter.subscribe(listener),unsubscribeFromStore=currentSubscribe((()=>{store.emitter.isPaused?store.emitter.emit():listener()}));return()=>{unsubscribeFromStore?.(),unsubscribeFromEmitter?.()}},stores[name]=store,store.subscribe(globalListener),parent)try{lock_unlock_unlock(store.store).registerPrivateActions(lock_unlock_unlock(parent).privateActionsOf(name)),lock_unlock_unlock(store.store).registerPrivateSelectors(lock_unlock_unlock(parent).privateSelectorsOf(name))}catch(e){}return store}let registry={batch:function batch(callback){emitter.isPaused?callback():(emitter.pause(),Object.values(stores).forEach((store=>store.emitter.pause())),callback(),emitter.resume(),Object.values(stores).forEach((store=>store.emitter.resume())))},stores,namespaces:stores,subscribe:(listener,storeNameOrDescriptor)=>{if(!storeNameOrDescriptor)return emitter.subscribe(listener);const storeName=getStoreName(storeNameOrDescriptor),store=stores[storeName];return store?store.subscribe(listener):parent?parent.subscribe(listener,storeNameOrDescriptor):emitter.subscribe(listener)},select:function select(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor);listeningStores?.add(storeName);const store=stores[storeName];return store?store.getSelectors():parent?.select(storeName)},resolveSelect:function resolveSelect(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor);listeningStores?.add(storeName);const store=stores[storeName];return store?store.getResolveSelectors():parent&&parent.resolveSelect(storeName)},suspendSelect:function suspendSelect(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor);listeningStores?.add(storeName);const store=stores[storeName];return store?store.getSuspendSelectors():parent&&parent.suspendSelect(storeName)},dispatch:function dispatch(storeNameOrDescriptor){const storeName=getStoreName(storeNameOrDescriptor),store=stores[storeName];return store?store.getActions():parent&&parent.dispatch(storeName)},use:function use(plugin,options){if(!plugin)return;return registry={...registry,...plugin(registry,options)},registry},register:function register(store){registerStoreInstance(store.name,(()=>store.instantiate(registry)))},registerGenericStore:function registerGenericStore(name,store){deprecated("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),registerStoreInstance(name,(()=>store))},registerStore:function registerStore(storeName,options){if(!options.reducer)throw new TypeError("Must specify store reducer");return registerStoreInstance(storeName,(()=>createReduxStore(storeName,options).instantiate(registry))).store},__unstableMarkListeningStores:function __unstableMarkListeningStores(callback,ref){listeningStores=new Set;try{return callback.call(this)}finally{ref.current=Array.from(listeningStores),listeningStores=null}}};registry.register(build_module_store);for(const[name,config]of Object.entries(storeConfigs))registry.register(createReduxStore(name,config));parent&&parent.subscribe(globalListener);const registryWithPlugins=function withPlugins(attributes){return Object.fromEntries(Object.entries(attributes).map((([key,attribute])=>"function"!=typeof attribute?[key,attribute]:[key,function(){return registry[key].apply(null,arguments)}])))}(registry);return lock_unlock_lock(registryWithPlugins,{privateActionsOf:name=>{try{return lock_unlock_unlock(stores[name].store).privateActions}catch(e){return{}}},privateSelectorsOf:name=>{try{return lock_unlock_unlock(stores[name].store).privateSelectors}catch(e){return{}}}}),registryWithPlugins}(),register=(build_module_default_registry.resolveSelect,build_module_default_registry.suspendSelect,build_module_default_registry.subscribe,build_module_default_registry.registerGenericStore,build_module_default_registry.registerStore,build_module_default_registry.use,build_module_default_registry.register),on_sub_key=actionProperty=>reducer=>function(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;const key=action[actionProperty];if(void 0===key)return state;const nextKeyState=reducer(state[key],action);return nextKeyState===state[key]?state:{...state,[key]:nextKeyState}},notices=on_sub_key("context")((function(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"CREATE_NOTICE":return[...state.filter((_ref=>{let{id}=_ref;return id!==action.notice.id})),action.notice];case"REMOVE_NOTICE":return state.filter((_ref2=>{let{id}=_ref2;return id!==action.id}))}return state})),DEFAULT_CONTEXT="global",DEFAULT_STATUS="info";let uniqueId=0;function createNotice(){let status=arguments.length>0&&void 0!==arguments[0]?arguments[0]:DEFAULT_STATUS,content=arguments.length>1?arguments[1]:void 0,options=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{speak=!0,isDismissible=!0,context=DEFAULT_CONTEXT,id=`${context}${++uniqueId}`,actions=[],type="default",__unstableHTML,icon=null,explicitDismiss=!1,onDismiss}=options;return content=String(content),{type:"CREATE_NOTICE",context,notice:{id,status,content,spokenMessage:speak?content:null,__unstableHTML,isDismissible,actions,type,icon,explicitDismiss,onDismiss}}}function createSuccessNotice(content,options){return createNotice("success",content,options)}function createInfoNotice(content,options){return createNotice("info",content,options)}function createErrorNotice(content,options){return createNotice("error",content,options)}function createWarningNotice(content,options){return createNotice("warning",content,options)}function removeNotice(id){return{type:"REMOVE_NOTICE",id,context:arguments.length>1&&void 0!==arguments[1]?arguments[1]:DEFAULT_CONTEXT}}const DEFAULT_NOTICES=[];function getNotices(state){return state[arguments.length>1&&void 0!==arguments[1]?arguments[1]:DEFAULT_CONTEXT]||DEFAULT_NOTICES}const notices_build_module_store_store=createReduxStore("core/notices",{reducer:notices,actions:notices_build_module_store_actions_namespaceObject,selectors:notices_build_module_store_selectors_namespaceObject});register(notices_build_module_store_store);const use_patterns_state=(onInsert,rootClientId)=>{const{patternCategories,patterns}=use_select_useSelect((select=>{const{__experimentalGetAllowedPatterns,getSettings}=select(store_store);return{patterns:__experimentalGetAllowedPatterns(rootClientId),patternCategories:getSettings().__experimentalBlockPatternCategories}}),[rootClientId]),{createSuccessNotice}=use_dispatch(notices_build_module_store_store),onClickPattern=(0,react.useCallback)(((pattern,blocks)=>{onInsert((0,lodash.map)(blocks,(block=>(0,build_module.JB)(block))),pattern.name),createSuccessNotice((0,i18n_build_module.nv)((0,i18n_build_module.__)('Block pattern "%s" inserted.'),pattern.title),{type:"snackbar"})}),[]);return[patterns,patternCategories,onClickPattern]};var Composite=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Composite/Composite.js");function BlockPattern(_ref){let{isDraggable,pattern,onClick,composite}=_ref;const{blocks,viewportWidth}=pattern,descriptionId=`block-editor-block-patterns-list__item-description-${(0,use_instance_id.A)(BlockPattern)}`;return(0,react.createElement)(inserter_draggable_blocks,{isEnabled:isDraggable,blocks},(_ref2=>{let{draggable,onDragStart,onDragEnd}=_ref2;return(0,react.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":pattern.title,"aria-describedby":pattern.description?descriptionId:void 0,draggable,onDragStart,onDragEnd},(0,react.createElement)(CompositeItem.l,(0,esm_extends.A)({role:"option",as:"div"},composite,{className:"block-editor-block-patterns-list__item",onClick:()=>onClick(pattern,blocks)}),(0,react.createElement)(block_preview,{blocks,viewportWidth}),(0,react.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},pattern.title),!!pattern.description&&(0,react.createElement)(visually_hidden_component,{id:descriptionId},pattern.description)))}))}function BlockPatternPlaceholder(){return(0,react.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const block_patterns_list=function BlockPatternList(_ref3){let{isDraggable,blockPatterns,shownPatterns,onClickPattern,orientation,label=(0,i18n_build_module.__)("Block Patterns")}=_ref3;const composite=(0,CompositeState.A)({orientation});return(0,react.createElement)(Composite.e,(0,esm_extends.A)({},composite,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":label}),blockPatterns.map((pattern=>shownPatterns.includes(pattern)?(0,react.createElement)(BlockPattern,{key:pattern.name,pattern,onClick:onClickPattern,isDraggable,composite}):(0,react.createElement)(BlockPatternPlaceholder,{key:pattern.name}))))};function PatternCategoriesList(_ref){let{selectedCategory,patternCategories,onClickCategory}=_ref;const baseClassName="block-editor-block-patterns-explorer__sidebar";return(0,react.createElement)("div",{className:`${baseClassName}__categories-list`},patternCategories.map((_ref2=>{let{name,label}=_ref2;return(0,react.createElement)(build_module_button,{key:name,label,className:`${baseClassName}__categories-list__item`,isPressed:selectedCategory===name,onClick:()=>{onClickCategory(name)}},label)})))}function PatternsExplorerSearch(_ref3){let{filterValue,setFilterValue}=_ref3;return(0,react.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,react.createElement)(search_control,{onChange:setFilterValue,value:filterValue,label:(0,i18n_build_module.__)("Search for patterns"),placeholder:(0,i18n_build_module.__)("Search")}))}const sidebar=function PatternExplorerSidebar(_ref4){let{selectedCategory,patternCategories,onClickCategory,filterValue,setFilterValue}=_ref4;return(0,react.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,react.createElement)(PatternsExplorerSearch,{filterValue,setFilterValue}),!filterValue&&(0,react.createElement)(PatternCategoriesList,{selectedCategory,patternCategories,onClickCategory}))};const no_results=function InserterNoResults(){return(0,react.createElement)("div",{className:"block-editor-inserter__no-results"},(0,react.createElement)(icon,{className:"block-editor-inserter__no-results-icon",icon:block_default}),(0,react.createElement)("p",null,(0,i18n_build_module.__)("No results found.")))};const use_insertion_point=function useInsertionPoint(_ref){let{rootClientId="",insertionIndex,clientId,isAppender,onSelect,shouldFocusBlock=!0}=_ref;const{getSelectedBlock}=use_select_useSelect(store_store),{destinationRootClientId,destinationIndex}=use_select_useSelect((select=>{const{getSelectedBlockClientId,getBlockRootClientId,getBlockIndex,getBlockOrder}=select(store_store),selectedBlockClientId=getSelectedBlockClientId();let _destinationIndex,_destinationRootClientId=rootClientId;return void 0!==insertionIndex?_destinationIndex=insertionIndex:clientId?_destinationIndex=getBlockIndex(clientId):!isAppender&&selectedBlockClientId?(_destinationRootClientId=getBlockRootClientId(selectedBlockClientId),_destinationIndex=getBlockIndex(selectedBlockClientId)+1):_destinationIndex=getBlockOrder(_destinationRootClientId).length,{destinationRootClientId:_destinationRootClientId,destinationIndex:_destinationIndex}}),[rootClientId,insertionIndex,clientId,isAppender]),{replaceBlocks,insertBlocks,showInsertionPoint,hideInsertionPoint}=use_dispatch(store_store),onInsertBlocks=(0,react.useCallback)((function(blocks,meta){let shouldForceFocusBlock=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const selectedBlock=getSelectedBlock();!isAppender&&selectedBlock&&(0,build_module.Xw)(selectedBlock)?replaceBlocks(selectedBlock.clientId,blocks,null,shouldFocusBlock||shouldForceFocusBlock?0:null,meta):insertBlocks(blocks,destinationIndex,destinationRootClientId,!0,shouldFocusBlock||shouldForceFocusBlock?0:null,meta);speak((0,i18n_build_module.nv)((0,i18n_build_module._n)("%d block added.","%d blocks added.",(0,lodash.castArray)(blocks).length),(0,lodash.castArray)(blocks).length)),onSelect&&onSelect()}),[isAppender,getSelectedBlock,replaceBlocks,insertBlocks,destinationRootClientId,destinationIndex,onSelect,shouldFocusBlock]),onToggleInsertionPoint=(0,react.useCallback)((show=>{show?showInsertionPoint(destinationRootClientId,destinationIndex):hideInsertionPoint()}),[showInsertionPoint,hideInsertionPoint,destinationRootClientId,destinationIndex]);return[destinationRootClientId,onInsertBlocks,onToggleInsertionPoint]};var dist_es2015=__webpack_require__("../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js"),remove_accents=__webpack_require__("../../node_modules/.pnpm/remove-accents@0.4.4/node_modules/remove-accents/index.js"),remove_accents_default=__webpack_require__.n(remove_accents);const defaultGetName=item=>item.name||"",defaultGetTitle=item=>item.title,defaultGetDescription=item=>item.description||"",defaultGetKeywords=item=>item.keywords||[],defaultGetCategory=item=>item.category,defaultGetCollection=()=>null;function normalizeSearchInput(){let input=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return input=remove_accents_default()(input),input=input.replace(/^\//,""),input=input.toLowerCase(),input}function extractWords(){let input=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,dist_es2015.W)(input).split(" ").filter(Boolean)}const getNormalizedSearchTerms=function(){return extractWords(normalizeSearchInput(arguments.length>0&&void 0!==arguments[0]?arguments[0]:""))},searchItems=function(){let items=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],searchInput=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",config=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===getNormalizedSearchTerms(searchInput).length)return items;const rankedItems=items.map((item=>[item,getItemSearchRank(item,searchInput,config)])).filter((_ref=>{let[,rank]=_ref;return rank>0}));return rankedItems.sort(((_ref2,_ref3)=>{let[,rank1]=_ref2,[,rank2]=_ref3;return rank2-rank1})),rankedItems.map((_ref4=>{let[item]=_ref4;return item}))};function getItemSearchRank(item,searchTerm){let config=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName=defaultGetName,getTitle=defaultGetTitle,getDescription=defaultGetDescription,getKeywords=defaultGetKeywords,getCategory=defaultGetCategory,getCollection=defaultGetCollection}=config,name=getName(item),title=getTitle(item),description=getDescription(item),keywords=getKeywords(item),category=getCategory(item),collection=getCollection(item),normalizedSearchInput=normalizeSearchInput(searchTerm),normalizedTitle=normalizeSearchInput(title);let rank=0;if(normalizedSearchInput===normalizedTitle)rank+=30;else if(normalizedTitle.startsWith(normalizedSearchInput))rank+=20;else{const terms=[name,title,description,...keywords,category,collection].join(" ");0===((unmatchedTerms,unprocessedTerms)=>unmatchedTerms.filter((term=>!getNormalizedSearchTerms(unprocessedTerms).some((unprocessedTerm=>unprocessedTerm.includes(term))))))(extractWords(normalizedSearchInput),terms).length&&(rank+=10)}if(0!==rank&&name.startsWith("core/")){rank+=name!==item.id?1:2}return rank}function PatternsListHeader(_ref){let{filterValue,filteredBlockPatternsLength}=_ref;return filterValue?(0,react.createElement)(heading_component,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,i18n_build_module.nv)((0,i18n_build_module._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',filteredBlockPatternsLength),filteredBlockPatternsLength,filterValue)):null}const patterns_list=function PatternList(_ref2){let{filterValue,selectedCategory,patternCategories}=_ref2;const debouncedSpeak=(0,use_debounce.A)(speak,500),[destinationRootClientId,onInsertBlocks]=use_insertion_point({shouldFocusBlock:!0}),[allPatterns,,onSelectBlockPattern]=use_patterns_state(onInsertBlocks,destinationRootClientId),registeredPatternCategories=(0,react.useMemo)((()=>patternCategories.map((patternCategory=>patternCategory.name))),[patternCategories]),filteredBlockPatterns=(0,react.useMemo)((()=>filterValue?searchItems(allPatterns,filterValue):allPatterns.filter((pattern=>{var _pattern$categories,_pattern$categories2;return"uncategorized"===selectedCategory?!(null!==(_pattern$categories=pattern.categories)&&void 0!==_pattern$categories&&_pattern$categories.length)||pattern.categories.every((category=>!registeredPatternCategories.includes(category))):null===(_pattern$categories2=pattern.categories)||void 0===_pattern$categories2?void 0:_pattern$categories2.includes(selectedCategory)}))),[filterValue,selectedCategory,allPatterns]);(0,react.useEffect)((()=>{if(!filterValue)return;const count=filteredBlockPatterns.length,resultsFoundMessage=(0,i18n_build_module.nv)((0,i18n_build_module._n)("%d result found.","%d results found.",count),count);debouncedSpeak(resultsFoundMessage)}),[filterValue,debouncedSpeak]);const currentShownPatterns=use_async_list(filteredBlockPatterns,{step:2}),hasItems=!(null==filteredBlockPatterns||!filteredBlockPatterns.length);return(0,react.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},hasItems&&(0,react.createElement)(PatternsListHeader,{filterValue,filteredBlockPatternsLength:filteredBlockPatterns.length}),(0,react.createElement)(inserter_listbox,null,!hasItems&&(0,react.createElement)(no_results,null),hasItems&&(0,react.createElement)(block_patterns_list,{shownPatterns:currentShownPatterns,blockPatterns:filteredBlockPatterns,onClickPattern:onSelectBlockPattern,isDraggable:!1})))};function PatternsExplorer(_ref){let{initialCategory,patternCategories}=_ref;const[filterValue,setFilterValue]=(0,react.useState)(""),[selectedCategory,setSelectedCategory]=(0,react.useState)(null==initialCategory?void 0:initialCategory.name);return(0,react.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,react.createElement)(sidebar,{selectedCategory,patternCategories,onClickCategory:setSelectedCategory,filterValue,setFilterValue}),(0,react.createElement)(patterns_list,{filterValue,selectedCategory,patternCategories}))}const explorer=function PatternsExplorerModal(_ref2){let{onModalClose,...restProps}=_ref2;return(0,react.createElement)(modal,{title:(0,i18n_build_module.__)("Patterns"),closeLabel:(0,i18n_build_module.__)("Close"),onRequestClose:onModalClose,isFullScreen:!0},(0,react.createElement)(PatternsExplorer,restProps))};function BlockPatternsCategory(_ref){let{rootClientId,onInsert,selectedCategory,populatedCategories}=_ref;const[allPatterns,,onClick]=use_patterns_state(onInsert,rootClientId),getPatternIndex=(0,react.useCallback)((pattern=>{var _pattern$categories;if(null===(_pattern$categories=pattern.categories)||void 0===_pattern$categories||!_pattern$categories.length)return 1/0;const indexedCategories=populatedCategories.reduce(((accumulator,_ref2,index)=>{let{name}=_ref2;return accumulator[name]=index,accumulator}),{});return Math.min(...pattern.categories.map((cat=>void 0!==indexedCategories[cat]?indexedCategories[cat]:1/0)))}),[populatedCategories]),currentCategoryPatterns=(0,react.useMemo)((()=>allPatterns.filter((pattern=>{var _pattern$categories2;return"uncategorized"===selectedCategory.name?getPatternIndex(pattern)===1/0:null===(_pattern$categories2=pattern.categories)||void 0===_pattern$categories2?void 0:_pattern$categories2.includes(selectedCategory.name)}))),[allPatterns,selectedCategory]),orderedPatterns=(0,react.useMemo)((()=>currentCategoryPatterns.sort(((a,b)=>getPatternIndex(a)-getPatternIndex(b)))),[currentCategoryPatterns,getPatternIndex]),currentShownPatterns=use_async_list(orderedPatterns);return currentCategoryPatterns.length?(0,react.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,react.createElement)(block_patterns_list,{shownPatterns:currentShownPatterns,blockPatterns:currentCategoryPatterns,onClickPattern:onClick,label:selectedCategory.label,orientation:"vertical",isDraggable:!0})):null}const block_patterns_tab=function BlockPatternsTabs(_ref3){let{rootClientId,onInsert,onClickCategory,selectedCategory}=_ref3;const[showPatternsExplorer,setShowPatternsExplorer]=(0,react.useState)(!1),[allPatterns,allCategories]=use_patterns_state(),hasRegisteredCategory=(0,react.useCallback)((pattern=>!(!pattern.categories||!pattern.categories.length)&&pattern.categories.some((cat=>allCategories.some((category=>category.name===cat))))),[allCategories]),populatedCategories=(0,react.useMemo)((()=>{const categories=allCategories.filter((category=>allPatterns.some((pattern=>{var _pattern$categories3;return null===(_pattern$categories3=pattern.categories)||void 0===_pattern$categories3?void 0:_pattern$categories3.includes(category.name)})))).sort(((_ref4,_ref5)=>{let{name:currentName}=_ref4,{name:nextName}=_ref5;return[currentName,nextName].includes("featured")?"featured"===currentName?-1:1:0}));return allPatterns.some((pattern=>!hasRegisteredCategory(pattern)))&&!categories.find((category=>"uncategorized"===category.name))&&categories.push({name:"uncategorized",label:(0,i18n_build_module._x)("Uncategorized")}),categories}),[allPatterns,allCategories]),patternCategory=selectedCategory||populatedCategories[0];return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(pattern_panel,{selectedCategory:patternCategory,patternCategories:populatedCategories,onClickCategory,openPatternExplorer:()=>setShowPatternsExplorer(!0)}),!showPatternsExplorer&&(0,react.createElement)(BlockPatternsCategory,{rootClientId,onInsert,selectedCategory:patternCategory,populatedCategories}),showPatternsExplorer&&(0,react.createElement)(explorer,{initialCategory:patternCategory,patternCategories:populatedCategories,onModalClose:()=>setShowPatternsExplorer(!1)}))};function safeDecodeURIComponent(uriComponent){try{return decodeURIComponent(uriComponent)}catch(uriComponentError){return uriComponent}}function getQueryArgs(url){return(function getQueryString(url){let query;try{query=new URL(url,"http://example.com").search.substring(1)}catch(error){}if(query)return query}(url)||"").replace(/\+/g,"%20").split("&").reduce(((accumulator,keyValue)=>{const[key,value=""]=keyValue.split("=").filter(Boolean).map(safeDecodeURIComponent);if(key){!function setPath(object,path,value){const length=path.length,lastIndex=length-1;for(let i=0;i<length;i++){let key=path[i];!key&&Array.isArray(object)&&(key=object.length.toString()),key=["__proto__","constructor","prototype"].includes(key)?key.toUpperCase():key;const isNextKeyArrayIndex=!isNaN(Number(path[i+1]));object[key]=i===lastIndex?value:object[key]||(isNextKeyArrayIndex?[]:{}),Array.isArray(object[key])&&!isNextKeyArrayIndex&&(object[key]={...object[key]}),object=object[key]}}(accumulator,key.replace(/\]/g,"").split("["),value)}return accumulator}),Object.create(null))}function addQueryArgs(url="",args){if(!args||!Object.keys(args).length)return url;let baseUrl=url;const queryStringIndex=url.indexOf("?");return-1!==queryStringIndex&&(args=Object.assign(getQueryArgs(url),args),baseUrl=baseUrl.substr(0,queryStringIndex)),baseUrl+"?"+function buildQueryString(data){let string="";const stack=Object.entries(data);let pair;for(;pair=stack.shift();){let[key,value]=pair;if(Array.isArray(value)||value&&value.constructor===Object){const valuePairs=Object.entries(value).reverse();for(const[member,memberValue]of valuePairs)stack.unshift([`${key}[${member}]`,memberValue])}else void 0!==value&&(null===value&&(value=""),string+="&"+[key,value].map(encodeURIComponent).join("="))}return string.substr(1)}(args)}function ReusableBlocksList(_ref){let{onHover,onInsert,rootClientId}=_ref;const[items,,,onSelectItem]=use_block_types_state(rootClientId,onInsert),filteredItems=(0,react.useMemo)((()=>items.filter((_ref2=>{let{category}=_ref2;return"reusable"===category}))),[items]);return 0===filteredItems.length?(0,react.createElement)(no_results,null):(0,react.createElement)(panel,{title:(0,i18n_build_module.__)("Reusable blocks")},(0,react.createElement)(block_types_list,{items:filteredItems,onSelect:onSelectItem,onHover,label:(0,i18n_build_module.__)("Reusable blocks")}))}const reusable_blocks_tab=function ReusableBlocksTab(_ref3){let{rootClientId,onInsert,onHover}=_ref3;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(ReusableBlocksList,{onHover,onInsert,rootClientId}),(0,react.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,react.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:addQueryArgs("edit.php",{post_type:"wp_block"})},(0,i18n_build_module.__)("Manage Reusable blocks"))))},{Fill:__unstableInserterMenuExtension,Slot:inserter_menu_extension_Slot}=createSlotFill("__unstableInserterMenuExtension");__unstableInserterMenuExtension.Slot=inserter_menu_extension_Slot;const inserter_menu_extension=__unstableInserterMenuExtension,search_results_EMPTY_ARRAY=[];const search_results=function InserterSearchResults(_ref){let{filterValue,onSelect,onHover,rootClientId,clientId,isAppender,__experimentalInsertionIndex,maxBlockPatterns,maxBlockTypes,showBlockDirectory=!1,isDraggable=!0,shouldFocusBlock=!0,prioritizePatterns}=_ref;const debouncedSpeak=(0,use_debounce.A)(speak,500),[destinationRootClientId,onInsertBlocks]=use_insertion_point({onSelect,rootClientId,clientId,isAppender,insertionIndex:__experimentalInsertionIndex,shouldFocusBlock}),[blockTypes,blockTypeCategories,blockTypeCollections,onSelectBlockType]=use_block_types_state(destinationRootClientId,onInsertBlocks),[patterns,,onSelectBlockPattern]=use_patterns_state(onInsertBlocks,destinationRootClientId),filteredBlockPatterns=(0,react.useMemo)((()=>{if(0===maxBlockPatterns)return[];const results=searchItems(patterns,filterValue);return void 0!==maxBlockPatterns?results.slice(0,maxBlockPatterns):results}),[filterValue,patterns,maxBlockPatterns]);let maxBlockTypesToShow=maxBlockTypes;prioritizePatterns&&filteredBlockPatterns.length>2&&(maxBlockTypesToShow=0);const filteredBlockTypes=(0,react.useMemo)((()=>{if(0===maxBlockTypesToShow)return[];const results=(items=(0,lodash.orderBy)(blockTypes,["frecency"],["desc"]),categories=blockTypeCategories,collections=blockTypeCollections,0===getNormalizedSearchTerms(searchInput=filterValue).length?items:searchItems(items,searchInput,{getCategory:item=>{var _find;return null===(_find=(0,lodash.find)(categories,{slug:item.category}))||void 0===_find?void 0:_find.title},getCollection:item=>{var _collections$item$nam;return null===(_collections$item$nam=collections[item.name.split("/")[0]])||void 0===_collections$item$nam?void 0:_collections$item$nam.title}}));var items,categories,collections,searchInput;return void 0!==maxBlockTypesToShow?results.slice(0,maxBlockTypesToShow):results}),[filterValue,blockTypes,blockTypeCategories,blockTypeCollections,maxBlockTypes]);(0,react.useEffect)((()=>{if(!filterValue)return;const count=filteredBlockTypes.length+filteredBlockPatterns.length,resultsFoundMessage=(0,i18n_build_module.nv)((0,i18n_build_module._n)("%d result found.","%d results found.",count),count);debouncedSpeak(resultsFoundMessage)}),[filterValue,debouncedSpeak]);const currentShownBlockTypes=use_async_list(filteredBlockTypes,{step:9}),currentShownPatterns=use_async_list(currentShownBlockTypes.length===filteredBlockTypes.length?filteredBlockPatterns:search_results_EMPTY_ARRAY),hasItems=!(0,lodash.isEmpty)(filteredBlockTypes)||!(0,lodash.isEmpty)(filteredBlockPatterns),blocksUI=!!filteredBlockTypes.length&&(0,react.createElement)(panel,{title:(0,react.createElement)(visually_hidden_component,null,(0,i18n_build_module.__)("Blocks"))},(0,react.createElement)(block_types_list,{items:currentShownBlockTypes,onSelect:onSelectBlockType,onHover,label:(0,i18n_build_module.__)("Blocks"),isDraggable})),patternsUI=!!filteredBlockPatterns.length&&(0,react.createElement)(panel,{title:(0,react.createElement)(visually_hidden_component,null,(0,i18n_build_module.__)("Block Patterns"))},(0,react.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,react.createElement)(block_patterns_list,{shownPatterns:currentShownPatterns,blockPatterns:filteredBlockPatterns,onClickPattern:onSelectBlockPattern,isDraggable})));return(0,react.createElement)(inserter_listbox,null,!showBlockDirectory&&!hasItems&&(0,react.createElement)(no_results,null),prioritizePatterns?patternsUI:blocksUI,!!filteredBlockTypes.length&&!!filteredBlockPatterns.length&&(0,react.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),prioritizePatterns?blocksUI:patternsUI,showBlockDirectory&&(0,react.createElement)(inserter_menu_extension.Slot,{fillProps:{onSelect:onSelectBlockType,onHover,filterValue,hasItems,rootClientId:destinationRootClientId}},(fills=>fills.length?fills:hasItems?null:(0,react.createElement)(no_results,null))))},tab_panel_noop=()=>{},TabButton=_ref=>{let{tabId,onClick,children,selected,...rest}=_ref;return(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({role:"tab",tabIndex:selected?null:-1,"aria-selected":selected,id:tabId,onClick},rest),children)};function TabPanel(_ref2){var _selectedTab$name;let{className,children,tabs,initialTabName,orientation="horizontal",activeClass="is-active",onSelect=tab_panel_noop}=_ref2;const instanceId=(0,use_instance_id.A)(TabPanel,"tab-panel"),[selected,setSelected]=(0,react.useState)(null),handleClick=tabKey=>{setSelected(tabKey),onSelect(tabKey)},selectedTab=(0,lodash.find)(tabs,{name:selected}),selectedId=`${instanceId}-${null!==(_selectedTab$name=null==selectedTab?void 0:selectedTab.name)&&void 0!==_selectedTab$name?_selectedTab$name:"none"}`;return(0,react.useEffect)((()=>{(0,lodash.find)(tabs,{name:selected})||setSelected(initialTabName||(tabs.length>0?tabs[0].name:null))}),[tabs]),(0,react.createElement)("div",{className},(0,react.createElement)(navigable_container_menu,{role:"tablist",orientation,onNavigate:(childIndex,child)=>{child.click()},className:"components-tab-panel__tabs"},tabs.map((tab=>(0,react.createElement)(TabButton,{className:classnames_default()("components-tab-panel__tabs-item",tab.className,{[activeClass]:tab.name===selected}),tabId:`${instanceId}-${tab.name}`,"aria-controls":`${instanceId}-${tab.name}-view`,selected:tab.name===selected,key:tab.name,onClick:(0,lodash.partial)(handleClick,tab.name)},tab.title)))),selectedTab&&(0,react.createElement)("div",{key:selectedId,"aria-labelledby":selectedId,role:"tabpanel",id:`${selectedId}-view`,className:"components-tab-panel__tab-content"},children(selectedTab)))}const blocksTab={name:"blocks",title:(0,i18n_build_module.__)("Blocks")},patternsTab={name:"patterns",title:(0,i18n_build_module.__)("Patterns")},reusableBlocksTab={name:"reusable",title:(0,i18n_build_module.__)("Reusable")};const tabs=function InserterTabs(_ref){let{children,showPatterns=!1,showReusableBlocks=!1,onSelect}=_ref;const tabs=(0,react.useMemo)((()=>{const tempTabs=[blocksTab];return showPatterns&&tempTabs.push(patternsTab),showReusableBlocks&&tempTabs.push(reusableBlocksTab),tempTabs}),[blocksTab,showPatterns,patternsTab,showReusableBlocks,reusableBlocksTab]);return(0,react.createElement)(TabPanel,{className:"block-editor-inserter__tabs",tabs,onSelect},children)};const inserter_menu=(0,react.forwardRef)((function InserterMenu(_ref,ref){let{rootClientId,clientId,isAppender,__experimentalInsertionIndex,onSelect,showInserterHelpPanel,showMostUsedBlocks,__experimentalFilterValue="",shouldFocusBlock=!0}=_ref;const[filterValue,setFilterValue]=(0,react.useState)(__experimentalFilterValue),[hoveredItem,setHoveredItem]=(0,react.useState)(null),[selectedPatternCategory,setSelectedPatternCategory]=(0,react.useState)(null),[destinationRootClientId,onInsertBlocks,onToggleInsertionPoint]=use_insertion_point({rootClientId,clientId,isAppender,insertionIndex:__experimentalInsertionIndex,shouldFocusBlock}),{showPatterns,hasReusableBlocks}=use_select_useSelect((select=>{var _getSettings$__experi;const{__experimentalGetAllowedPatterns,getSettings}=select(store_store);return{showPatterns:!!__experimentalGetAllowedPatterns(destinationRootClientId).length,hasReusableBlocks:!(null===(_getSettings$__experi=getSettings().__experimentalReusableBlocks)||void 0===_getSettings$__experi||!_getSettings$__experi.length)}}),[destinationRootClientId]),onInsert=(0,react.useCallback)(((blocks,meta,shouldForceFocusBlock)=>{onInsertBlocks(blocks,meta,shouldForceFocusBlock),onSelect()}),[onInsertBlocks,onSelect]),onInsertPattern=(0,react.useCallback)(((blocks,patternName)=>{onInsertBlocks(blocks,{patternName}),onSelect()}),[onInsertBlocks,onSelect]),onHover=(0,react.useCallback)((item=>{onToggleInsertionPoint(!!item),setHoveredItem(item)}),[onToggleInsertionPoint,setHoveredItem]),onClickPatternCategory=(0,react.useCallback)((patternCategory=>{setSelectedPatternCategory(patternCategory)}),[setSelectedPatternCategory]),blocksTab=(0,react.useMemo)((()=>(0,react.createElement)(react.Fragment,null,(0,react.createElement)("div",{className:"block-editor-inserter__block-list"},(0,react.createElement)(block_types_tab,{rootClientId:destinationRootClientId,onInsert,onHover,showMostUsedBlocks})),showInserterHelpPanel&&(0,react.createElement)("div",{className:"block-editor-inserter__tips"},(0,react.createElement)(visually_hidden_component,{as:"h2"},(0,i18n_build_module.__)("A tip for using the block editor")),(0,react.createElement)(tips,null)))),[destinationRootClientId,onInsert,onHover,filterValue,showMostUsedBlocks,showInserterHelpPanel]),patternsTab=(0,react.useMemo)((()=>(0,react.createElement)(block_patterns_tab,{rootClientId:destinationRootClientId,onInsert:onInsertPattern,onClickCategory:onClickPatternCategory,selectedCategory:selectedPatternCategory})),[destinationRootClientId,onInsertPattern,onClickPatternCategory,selectedPatternCategory]),reusableBlocksTab=(0,react.useMemo)((()=>(0,react.createElement)(reusable_blocks_tab,{rootClientId:destinationRootClientId,onInsert,onHover})),[destinationRootClientId,onInsert,onHover]),getCurrentTab=(0,react.useCallback)((tab=>"blocks"===tab.name?blocksTab:"patterns"===tab.name?patternsTab:reusableBlocksTab),[blocksTab,patternsTab,reusableBlocksTab]),searchRef=(0,react.useRef)();return(0,react.useImperativeHandle)(ref,(()=>({focusSearch:()=>{searchRef.current.focus()}}))),(0,react.createElement)("div",{className:"block-editor-inserter__menu"},(0,react.createElement)("div",{className:"block-editor-inserter__main-area"},(0,react.createElement)("div",{className:"block-editor-inserter__content"},(0,react.createElement)(search_control,{className:"block-editor-inserter__search",onChange:value=>{hoveredItem&&setHoveredItem(null),setFilterValue(value)},value:filterValue,label:(0,i18n_build_module.__)("Search for blocks and patterns"),placeholder:(0,i18n_build_module.__)("Search"),ref:searchRef}),!!filterValue&&(0,react.createElement)(search_results,{filterValue,onSelect,onHover,rootClientId,clientId,isAppender,__experimentalInsertionIndex,showBlockDirectory:!0,shouldFocusBlock}),!filterValue&&(showPatterns||hasReusableBlocks)&&(0,react.createElement)(tabs,{showPatterns,showReusableBlocks:hasReusableBlocks},getCurrentTab),!filterValue&&!showPatterns&&!hasReusableBlocks&&blocksTab)),showInserterHelpPanel&&hoveredItem&&(0,react.createElement)(preview_panel,{item:hoveredItem}))}));function QuickInserter(_ref){let{onSelect,rootClientId,clientId,isAppender,prioritizePatterns}=_ref;const[filterValue,setFilterValue]=(0,react.useState)(""),[destinationRootClientId,onInsertBlocks]=use_insertion_point({onSelect,rootClientId,clientId,isAppender}),[blockTypes]=use_block_types_state(destinationRootClientId,onInsertBlocks),[patterns]=use_patterns_state(onInsertBlocks,destinationRootClientId),{setInserterIsOpened,insertionIndex}=use_select_useSelect((select=>{const{getSettings,getBlockIndex,getBlockCount}=select(store_store),settings=getSettings(),index=getBlockIndex(clientId),blockCount=getBlockCount();return{setInserterIsOpened:settings.__experimentalSetIsInserterOpened,insertionIndex:-1===index?blockCount:index}}),[clientId]),showPatterns=patterns.length&&(!!filterValue||prioritizePatterns),showSearch=showPatterns&&patterns.length>6||blockTypes.length>6;(0,react.useEffect)((()=>{setInserterIsOpened&&setInserterIsOpened(!1)}),[setInserterIsOpened]);let maxBlockPatterns=0;return showPatterns&&(maxBlockPatterns=prioritizePatterns?4:2),(0,react.createElement)("div",{className:classnames_default()("block-editor-inserter__quick-inserter",{"has-search":showSearch,"has-expand":setInserterIsOpened})},showSearch&&(0,react.createElement)(search_control,{className:"block-editor-inserter__search",value:filterValue,onChange:value=>{setFilterValue(value)},label:(0,i18n_build_module.__)("Search for blocks and patterns"),placeholder:(0,i18n_build_module.__)("Search")}),(0,react.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,react.createElement)(search_results,{filterValue,onSelect,rootClientId,clientId,isAppender,maxBlockPatterns,maxBlockTypes:6,isDraggable:!1,prioritizePatterns})),setInserterIsOpened&&(0,react.createElement)(build_module_button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{setInserterIsOpened({rootClientId,insertionIndex,filterValue})},"aria-label":(0,i18n_build_module.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,i18n_build_module.__)("Browse all")))}const defaultRenderToggle=_ref=>{let label,{onToggle,disabled,isOpen,blockTitle,hasSingleBlockType,toggleProps={},prioritizePatterns}=_ref;label=hasSingleBlockType?(0,i18n_build_module.nv)((0,i18n_build_module._x)("Add %s","directly add the only allowed block"),blockTitle):prioritizePatterns?(0,i18n_build_module.__)("Add pattern"):(0,i18n_build_module._x)("Add block","Generic label for block inserter button");const{onClick,...rest}=toggleProps;return(0,react.createElement)(build_module_button,(0,esm_extends.A)({icon:library_plus,label,tooltipPosition:"bottom",onClick:function handleClick(event){onToggle&&onToggle(event),onClick&&onClick(event)},className:"block-editor-inserter__toggle","aria-haspopup":!hasSingleBlockType&&"true","aria-expanded":!hasSingleBlockType&&isOpen,disabled},rest))};class Inserter extends react.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(isOpen){const{onToggle}=this.props;onToggle&&onToggle(isOpen)}renderToggle(_ref2){let{onToggle,isOpen}=_ref2;const{disabled,blockTitle,hasSingleBlockType,directInsertBlock,toggleProps,hasItems,renderToggle=defaultRenderToggle,prioritizePatterns}=this.props;return renderToggle({onToggle,isOpen,disabled:disabled||!hasItems,blockTitle,hasSingleBlockType,directInsertBlock,toggleProps,prioritizePatterns})}renderContent(_ref3){let{onClose}=_ref3;const{rootClientId,clientId,isAppender,showInserterHelpPanel,__experimentalIsQuick:isQuick,prioritizePatterns}=this.props;return isQuick?(0,react.createElement)(QuickInserter,{onSelect:()=>{onClose()},rootClientId,clientId,isAppender,prioritizePatterns}):(0,react.createElement)(inserter_menu,{onSelect:()=>{onClose()},rootClientId,clientId,isAppender,showInserterHelpPanel})}render(){const{position,hasSingleBlockType,directInsertBlock,insertOnlyAllowedBlock,__experimentalIsQuick:isQuick,onSelectOrClose}=this.props;return hasSingleBlockType||directInsertBlock?this.renderToggle({onToggle:insertOnlyAllowedBlock}):(0,react.createElement)(Dropdown,{className:"block-editor-inserter",contentClassName:classnames_default()("block-editor-inserter__popover",{"is-quick":isQuick}),position,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,i18n_build_module.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:onSelectOrClose})}}const inserter=(0,compose.A)([with_select(((select,_ref4)=>{var _getBlockVariations;let{clientId,rootClientId}=_ref4;const{getBlockRootClientId,hasInserterItems,__experimentalGetAllowedBlocks,__experimentalGetDirectInsertBlock,getBlockIndex,getBlockCount,getSettings}=select(store_store),{getBlockVariations}=select(build_module.M_);rootClientId=rootClientId||getBlockRootClientId(clientId)||void 0;const allowedBlocks=__experimentalGetAllowedBlocks(rootClientId),directInsertBlock=__experimentalGetDirectInsertBlock(rootClientId),index=getBlockIndex(clientId),blockCount=getBlockCount(),settings=getSettings(),hasSingleBlockType=1===(null==allowedBlocks?void 0:allowedBlocks.length)&&0===(null===(_getBlockVariations=getBlockVariations(allowedBlocks[0].name,"inserter"))||void 0===_getBlockVariations?void 0:_getBlockVariations.length);let allowedBlockType=!1;return hasSingleBlockType&&(allowedBlockType=allowedBlocks[0]),{hasItems:hasInserterItems(rootClientId),hasSingleBlockType,blockTitle:allowedBlockType?allowedBlockType.title:"",allowedBlockType,directInsertBlock,rootClientId,prioritizePatterns:settings.__experimentalPreferPatternsOnRoot&&!rootClientId&&index>0&&(index<blockCount||0===blockCount)}})),with_dispatch(((dispatch,ownProps,_ref5)=>{let{select}=_ref5;return{insertOnlyAllowedBlock(){const{rootClientId,clientId,isAppender,hasSingleBlockType,allowedBlockType,directInsertBlock,onSelectOrClose}=ownProps;if(!hasSingleBlockType&&!directInsertBlock)return;const{insertBlock}=dispatch(store_store);let blockToInsert;if(directInsertBlock){const newAttributes=function getAdjacentBlockAttributes(attributesToCopy){const{getBlock,getPreviousBlockClientId}=select(store_store);if(!attributesToCopy||!clientId&&!rootClientId)return{};const result={};let adjacentAttributes={};if(clientId){const currentBlock=getBlock(clientId),previousBlock=getBlock(getPreviousBlockClientId(clientId));(null==currentBlock?void 0:currentBlock.name)===(null==previousBlock?void 0:previousBlock.name)&&(adjacentAttributes=(null==previousBlock?void 0:previousBlock.attributes)||{})}else{var _parentBlock$innerBlo;const parentBlock=getBlock(rootClientId);if(null!=parentBlock&&null!==(_parentBlock$innerBlo=parentBlock.innerBlocks)&&void 0!==_parentBlock$innerBlo&&_parentBlock$innerBlo.length){const lastInnerBlock=parentBlock.innerBlocks[parentBlock.innerBlocks.length-1];directInsertBlock&&(null==directInsertBlock?void 0:directInsertBlock.name)===lastInnerBlock.name&&(adjacentAttributes=lastInnerBlock.attributes)}}return attributesToCopy.forEach((attribute=>{adjacentAttributes.hasOwnProperty(attribute)&&(result[attribute]=adjacentAttributes[attribute])})),result}(directInsertBlock.attributesToCopy);blockToInsert=(0,build_module.Wv)(directInsertBlock.name,{...directInsertBlock.attributes||{},...newAttributes})}else blockToInsert=(0,build_module.Wv)(allowedBlockType.name);insertBlock(blockToInsert,function getInsertionIndex(){const{getBlockIndex,getBlockSelectionEnd,getBlockOrder,getBlockRootClientId}=select(store_store);if(clientId)return getBlockIndex(clientId);const end=getBlockSelectionEnd();return!isAppender&&end&&getBlockRootClientId(end)===rootClientId?getBlockIndex(end)+1:getBlockOrder(rootClientId).length}(),rootClientId),onSelectOrClose&&onSelectOrClose();speak((0,i18n_build_module.nv)((0,i18n_build_module.__)("%s block added"),allowedBlockType.title))}}})),if_condition((_ref6=>{let{hasItems,isAppender,rootClientId,clientId}=_ref6;return hasItems||!isAppender&&!rootClientId&&!clientId}))])(Inserter);const default_block_appender=(0,compose.A)(with_select(((select,ownProps)=>{const{getBlockCount,getSettings,getTemplateLock}=select(store_store),isEmpty=!getBlockCount(ownProps.rootClientId),{bodyPlaceholder}=getSettings();return{showPrompt:isEmpty,isLocked:!!getTemplateLock(ownProps.rootClientId),placeholder:bodyPlaceholder}})),with_dispatch(((dispatch,ownProps)=>{const{insertDefaultBlock,startTyping}=dispatch(store_store);return{onAppend(){const{rootClientId}=ownProps;insertDefaultBlock(void 0,rootClientId),startTyping()}}})))((function DefaultBlockAppender(_ref){let{isLocked,onAppend,showPrompt,placeholder,rootClientId}=_ref;if(isLocked)return null;const value=(0,html_entities_build_module.S)(placeholder)||(0,i18n_build_module.__)("Type / to choose a block");return(0,react.createElement)("div",{"data-root-client-id":rootClientId||"",className:classnames_default()("block-editor-default-block-appender",{"has-visible-prompt":showPrompt})},(0,react.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,i18n_build_module.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:event=>{keycodes_build_module.Fm!==event.keyCode&&keycodes_build_module.t6!==event.keyCode||onAppend()},onClick:()=>onAppend(),onFocus:()=>{showPrompt&&onAppend()}},showPrompt?value:"\ufeff"),(0,react.createElement)(inserter,{rootClientId,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function ButtonBlockAppender(_ref,ref){let{rootClientId,className,onFocus,tabIndex}=_ref;return(0,react.createElement)(inserter,{position:"bottom center",rootClientId,__experimentalIsQuick:!0,renderToggle:_ref2=>{let label,{onToggle,disabled,isOpen,blockTitle,hasSingleBlockType}=_ref2;label=hasSingleBlockType?(0,i18n_build_module.nv)((0,i18n_build_module._x)("Add %s","directly add the only allowed block"),blockTitle):(0,i18n_build_module._x)("Add block","Generic label for block inserter button");const isToggleButton=!hasSingleBlockType;let inserterButton=(0,react.createElement)(build_module_button,{ref,onFocus,tabIndex,className:classnames_default()(className,"block-editor-button-block-appender"),onClick:onToggle,"aria-haspopup":isToggleButton?"true":void 0,"aria-expanded":isToggleButton?isOpen:void 0,disabled,label},!hasSingleBlockType&&(0,react.createElement)(visually_hidden_component,{as:"span"},label),(0,react.createElement)(icon,{icon:library_plus}));return(isToggleButton||hasSingleBlockType)&&(inserterButton=(0,react.createElement)(tooltip,{text:label},inserterButton)),inserterButton},isAppender:!0})}(0,react.forwardRef)(((props,ref)=>((0,deprecated_build_module.A)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),ButtonBlockAppender(props,ref))));const button_block_appender=(0,react.forwardRef)(ButtonBlockAppender);const block_list_appender=with_select(((select,_ref2)=>{let{rootClientId}=_ref2;const{canInsertBlockType,getTemplateLock,getSelectedBlockClientId}=select(store_store);return{isLocked:!!getTemplateLock(rootClientId),canInsertDefaultBlock:canInsertBlockType((0,build_module.K$)(),rootClientId),selectedBlockClientId:getSelectedBlockClientId()}}))((function BlockListAppender(_ref){let appender,{rootClientId,canInsertDefaultBlock,isLocked,renderAppender:CustomAppender,className,selectedBlockClientId,tagName:TagName="div"}=_ref;if(isLocked||!1===CustomAppender)return null;if(CustomAppender)appender=(0,react.createElement)(CustomAppender,null);else{if(!(selectedBlockClientId===rootClientId||!rootClientId&&!selectedBlockClientId))return null;appender=canInsertDefaultBlock?(0,react.createElement)(default_block_appender,{rootClientId}):(0,react.createElement)(button_block_appender,{rootClientId,className:"block-list-appender__toggle"})}return(0,react.createElement)(TagName,{tabIndex:-1,className:classnames_default()("block-list-appender wp-block",className),contentEditable:!1,"data-block":!0},appender)}));(0,react.createContext)();const inbetween=function BlockPopoverInbetween(_ref){let{previousClientId,nextClientId,children,__unstablePopoverSlot,__unstableContentRef,...props}=_ref;const{orientation,rootClientId,isVisible}=use_select_useSelect((select=>{var _getBlockListSettings;const{getBlockListSettings,getBlockRootClientId,isBlockVisible}=select(store_store),_rootClientId=getBlockRootClientId(previousClientId);return{orientation:(null===(_getBlockListSettings=getBlockListSettings(_rootClientId))||void 0===_getBlockListSettings?void 0:_getBlockListSettings.orientation)||"vertical",rootClientId:_rootClientId,isVisible:isBlockVisible(previousClientId)&&isBlockVisible(nextClientId)}}),[previousClientId]),previousElement=useBlockElement(previousClientId),nextElement=useBlockElement(nextClientId),isVertical="vertical"===orientation,style=(0,react.useMemo)((()=>{if(!previousElement&&!nextElement||!isVisible)return{};const previousRect=previousElement?previousElement.getBoundingClientRect():null,nextRect=nextElement?nextElement.getBoundingClientRect():null;if(isVertical)return{width:previousElement?previousElement.offsetWidth:nextElement.offsetWidth,height:nextRect&&previousRect?nextRect.top-previousRect.bottom:0};let width=0;return previousRect&&nextRect&&(width=(0,i18n_build_module.V8)()?previousRect.left-nextRect.right:nextRect.left-previousRect.right),{width,height:previousElement?previousElement.offsetHeight:nextElement.offsetHeight}}),[previousElement,nextElement,isVertical]),getAnchorRect=(0,react.useCallback)((()=>{if(!previousElement&&!nextElement||!isVisible)return{};const{ownerDocument}=previousElement||nextElement,previousRect=previousElement?previousElement.getBoundingClientRect():null,nextRect=nextElement?nextElement.getBoundingClientRect():null;return isVertical?(0,i18n_build_module.V8)()?{top:previousRect?previousRect.bottom:nextRect.top,left:previousRect?previousRect.right:nextRect.right,right:previousRect?previousRect.left:nextRect.left,bottom:nextRect?nextRect.top:previousRect.bottom,height:0,width:0,ownerDocument}:{top:previousRect?previousRect.bottom:nextRect.top,left:previousRect?previousRect.left:nextRect.left,right:previousRect?previousRect.right:nextRect.right,bottom:nextRect?nextRect.top:previousRect.bottom,height:0,width:0,ownerDocument}:(0,i18n_build_module.V8)()?{top:previousRect?previousRect.top:nextRect.top,left:previousRect?previousRect.left:nextRect.right,right:nextRect?nextRect.right:previousRect.left,bottom:previousRect?previousRect.bottom:nextRect.bottom,height:0,width:0,ownerDocument}:{top:previousRect?previousRect.top:nextRect.top,left:previousRect?previousRect.right:nextRect.left,right:nextRect?nextRect.left:previousRect.right,bottom:previousRect?previousRect.bottom:nextRect.bottom,height:0,width:0,ownerDocument}}),[previousElement,nextElement]),popoverScrollRef=use_popover_scroll(__unstableContentRef);return(previousElement||nextElement)&&isVisible?(0,react.createElement)(popover,(0,esm_extends.A)({ref:popoverScrollRef,animate:!1,getAnchorRect,focusOnMount:!1,__unstableSlotName:__unstablePopoverSlot||null,key:nextClientId+"--"+rootClientId},props,{className:classnames_default()("block-editor-block-popover","block-editor-block-popover__inbetween",props.className),__unstableForcePosition:!0}),(0,react.createElement)("div",{style},children)):null},insertion_point_InsertionPointOpenRef=(0,react.createContext)();function InsertionPointPopover(_ref){let{__unstablePopoverSlot,__unstableContentRef}=_ref;const{selectBlock,hideInsertionPoint}=use_dispatch(store_store),openRef=(0,react.useContext)(insertion_point_InsertionPointOpenRef),ref=(0,react.useRef)(),{orientation,previousClientId,nextClientId,rootClientId,isInserterShown}=use_select_useSelect((select=>{var _getBlockListSettings;const{getBlockOrder,getBlockListSettings,getBlockInsertionPoint,isBlockBeingDragged,getPreviousBlockClientId,getNextBlockClientId}=select(store_store),insertionPoint=getBlockInsertionPoint(),order=getBlockOrder(insertionPoint.rootClientId);if(!order.length)return{};let _previousClientId=order[insertionPoint.index-1],_nextClientId=order[insertionPoint.index];for(;isBlockBeingDragged(_previousClientId);)_previousClientId=getPreviousBlockClientId(_previousClientId);for(;isBlockBeingDragged(_nextClientId);)_nextClientId=getNextBlockClientId(_nextClientId);return{previousClientId:_previousClientId,nextClientId:_nextClientId,orientation:(null===(_getBlockListSettings=getBlockListSettings(insertionPoint.rootClientId))||void 0===_getBlockListSettings?void 0:_getBlockListSettings.orientation)||"vertical",rootClientId:insertionPoint.rootClientId,isInserterShown:null==insertionPoint?void 0:insertionPoint.__unstableWithInserter}}),[]),isVertical="vertical"===orientation,disableMotion=hooks_use_reduced_motion();const lineVariants={start:{...isVertical?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...isVertical?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:isInserterShown?.4:0}},hover:{...isVertical?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},inserterVariants={start:{scale:disableMotion?1:0},rest:{scale:1,transition:{delay:.2}}},className=classnames_default()("block-editor-block-list__insertion-point","is-"+orientation);return(0,react.createElement)(inbetween,{previousClientId,nextClientId,__unstablePopoverSlot,__unstableContentRef},(0,react.createElement)(motion.P.div,{layout:!disableMotion,initial:disableMotion?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref,tabIndex:-1,onClick:function onClick(event){event.target===ref.current&&nextClientId&&selectBlock(nextClientId,-1)},onFocus:function onFocus(event){event.target!==ref.current&&(openRef.current=!0)},className:classnames_default()(className,{"is-with-inserter":isInserterShown}),onHoverEnd:function maybeHideInserterPoint(event){event.target!==ref.current||openRef.current||hideInsertionPoint()}},(0,react.createElement)(motion.P.div,{variants:lineVariants,className:"block-editor-block-list__insertion-point-indicator"}),isInserterShown&&(0,react.createElement)(motion.P.div,{variants:inserterVariants,className:classnames_default()("block-editor-block-list__insertion-point-inserter")},(0,react.createElement)(inserter,{position:"bottom center",clientId:nextClientId,rootClientId,__experimentalIsQuick:!0,onToggle:isOpen=>{openRef.current=isOpen},onSelectOrClose:()=>{openRef.current=!1}}))))}function InsertionPoint(_ref2){let{children,...props}=_ref2;const isVisible=use_select_useSelect((select=>select(store_store).isBlockInsertionPointVisible()),[]);return(0,react.createElement)(insertion_point_InsertionPointOpenRef.Provider,{value:(0,react.useRef)(!1)},isVisible&&(0,react.createElement)(InsertionPointPopover,props),children)}function useInBetweenInserter(){const openRef=(0,react.useContext)(insertion_point_InsertionPointOpenRef),hasReducedUI=use_select_useSelect((select=>select(store_store).getSettings().hasReducedUI),[]),{getBlockListSettings,getBlockRootClientId,getBlockIndex,isBlockInsertionPointVisible,isMultiSelecting,getSelectedBlockClientIds,getTemplateLock}=use_select_useSelect(store_store),{showInsertionPoint,hideInsertionPoint}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{if(!hasReducedUI)return node.addEventListener("mousemove",onMouseMove),()=>{node.removeEventListener("mousemove",onMouseMove)};function onMouseMove(event){var _getBlockListSettings,_element$parentElemen;if(openRef.current)return;if(isMultiSelecting())return;if(!event.target.classList.contains("block-editor-block-list__layout"))return void(isBlockInsertionPointVisible()&&hideInsertionPoint());let rootClientId;if(!event.target.classList.contains("is-root-container")){rootClientId=(event.target.getAttribute("data-block")?event.target:event.target.closest("[data-block]")).getAttribute("data-block")}if(getTemplateLock(rootClientId))return;const orientation=(null===(_getBlockListSettings=getBlockListSettings(rootClientId))||void 0===_getBlockListSettings?void 0:_getBlockListSettings.orientation)||"vertical",rect=event.target.getBoundingClientRect(),offsetTop=event.clientY-rect.top,offsetLeft=event.clientX-rect.left;let element=Array.from(event.target.children).find((blockEl=>blockEl.classList.contains("wp-block")&&"vertical"===orientation&&blockEl.offsetTop>offsetTop||blockEl.classList.contains("wp-block")&&"horizontal"===orientation&&blockEl.offsetLeft>offsetLeft));if(!element)return;if(!element.id&&(element=element.firstElementChild,!element))return;if(null===(_element$parentElemen=element.parentElement)||void 0===_element$parentElemen?void 0:_element$parentElemen.closest(".block-editor-block-content-overlay"))return;const clientId=element.id.slice(6);if(!clientId)return;if(getSelectedBlockClientIds().includes(clientId))return;const elementRect=element.getBoundingClientRect();if("horizontal"===orientation&&(event.clientY>elementRect.bottom||event.clientY<elementRect.top)||"vertical"===orientation&&(event.clientX>elementRect.right||event.clientX<elementRect.left))return void(isBlockInsertionPointVisible()&&hideInsertionPoint());const index=getBlockIndex(clientId);0!==index?showInsertionPoint(rootClientId,index,{__unstableWithInserter:!0}):isBlockInsertionPointVisible()&&hideInsertionPoint()}}),[openRef,getBlockListSettings,getBlockRootClientId,getBlockIndex,isBlockInsertionPointVisible,isMultiSelecting,showInsertionPoint,hideInsertionPoint,getSelectedBlockClientIds])}const requestIdleCallback="undefined"==typeof window?callback=>{setTimeout((()=>callback(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,cancelIdleCallback="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function useBlockDisplayInformation(clientId){return use_select_useSelect((select=>{if(!clientId)return null;const{getBlockName,getBlockAttributes}=select(store_store),{getBlockType,getActiveBlockVariation}=select(build_module.M_),blockName=getBlockName(clientId),blockType=getBlockType(blockName);if(!blockType)return null;const attributes=getBlockAttributes(clientId),match=getActiveBlockVariation(blockName,attributes),blockTypeInfo={title:blockType.title,icon:blockType.icon,description:blockType.description,anchor:null==attributes?void 0:attributes.anchor};return match?{title:match.title||blockType.title,icon:match.icon||blockType.icon,description:match.description||blockType.description,anchor:null==attributes?void 0:attributes.anchor}:blockTypeInfo}),[clientId])}function useBlockDisplayTitle(_ref){let{clientId,maximumLength,context}=_ref;const{attributes,name,reusableBlockTitle}=use_select_useSelect((select=>{if(!clientId)return{};const{getBlockName,getBlockAttributes,__experimentalGetReusableBlockTitle}=select(store_store),blockName=getBlockName(clientId);if(!blockName)return{};const isReusable=(0,build_module.tk)((0,build_module.E7)(blockName));return{attributes:getBlockAttributes(clientId),name:blockName,reusableBlockTitle:isReusable&&__experimentalGetReusableBlockTitle(getBlockAttributes(clientId).ref)}}),[clientId]),blockInformation=useBlockDisplayInformation(clientId);if(!name||!blockInformation)return null;const blockType=(0,build_module.E7)(name),blockLabel=blockType?(0,build_module.Y0)(blockType,attributes,context):null,label=reusableBlockTitle||blockLabel,blockTitle=label&&label!==blockType.title?label:blockInformation.title;if(maximumLength&&maximumLength>0&&blockTitle.length>maximumLength){const omission="...";return blockTitle.slice(0,maximumLength-omission.length)+omission}return blockTitle}function BlockTitle(_ref){let{clientId,maximumLength,context}=_ref;return useBlockDisplayTitle({clientId,maximumLength,context})}const block_draggable=_ref=>{let{children,clientIds,cloneClassname,onDragStart,onDragEnd}=_ref;const{srcRootClientId,isDraggable,icon}=use_select_useSelect((select=>{var _getBlockType;const{canMoveBlocks,getBlockRootClientId,getBlockName}=select(store_store),rootClientId=getBlockRootClientId(clientIds[0]),blockName=getBlockName(clientIds[0]);return{srcRootClientId:rootClientId,isDraggable:canMoveBlocks(clientIds,rootClientId),icon:null===(_getBlockType=(0,build_module.E7)(blockName))||void 0===_getBlockType?void 0:_getBlockType.icon}}),[clientIds]),isDragging=(0,react.useRef)(!1),[startScrolling,scrollOnDragOver,stopScrolling]=function useScrollWhenDragging(){const dragStartY=(0,react.useRef)(null),velocityY=(0,react.useRef)(null),scrollParentY=(0,react.useRef)(null),scrollEditorInterval=(0,react.useRef)(null);return(0,react.useEffect)((()=>()=>{scrollEditorInterval.current&&(clearInterval(scrollEditorInterval.current),scrollEditorInterval.current=null)}),[]),[(0,react.useCallback)((event=>{dragStartY.current=event.clientY,scrollParentY.current=getScrollContainer(event.target),scrollEditorInterval.current=setInterval((()=>{if(scrollParentY.current&&velocityY.current){const newTop=scrollParentY.current.scrollTop+velocityY.current;scrollParentY.current.scroll({top:newTop})}}),25)}),[]),(0,react.useCallback)((event=>{if(!scrollParentY.current)return;const scrollParentHeight=scrollParentY.current.offsetHeight,offsetDragStartPosition=dragStartY.current-scrollParentY.current.offsetTop,offsetDragPosition=event.clientY-scrollParentY.current.offsetTop;if(event.clientY>offsetDragStartPosition){const moveableDistance=Math.max(scrollParentHeight-offsetDragStartPosition-50,0),distancePercentage=Math.max(offsetDragPosition-offsetDragStartPosition-50,0)/moveableDistance;velocityY.current=25*distancePercentage}else if(event.clientY<offsetDragStartPosition){const moveableDistance=Math.max(offsetDragStartPosition-50,0),distancePercentage=Math.max(offsetDragStartPosition-offsetDragPosition-50,0)/moveableDistance;velocityY.current=-25*distancePercentage}else velocityY.current=0}),[]),()=>{dragStartY.current=null,scrollParentY.current=null,scrollEditorInterval.current&&(clearInterval(scrollEditorInterval.current),scrollEditorInterval.current=null)}]}(),{startDraggingBlocks,stopDraggingBlocks}=use_dispatch(store_store);if((0,react.useEffect)((()=>()=>{isDragging.current&&stopDraggingBlocks()}),[]),!isDraggable)return children({isDraggable:!1});const transferData={type:"block",srcClientIds:clientIds,srcRootClientId};return(0,react.createElement)(Draggable,{cloneClassname,__experimentalTransferDataType:"wp-blocks",transferData,onDragStart:event=>{startDraggingBlocks(clientIds),isDragging.current=!0,startScrolling(event),onDragStart&&onDragStart()},onDragOver:scrollOnDragOver,onDragEnd:()=>{stopDraggingBlocks(),isDragging.current=!1,stopScrolling(),onDragEnd&&onDragEnd()},__experimentalDragComponent:(0,react.createElement)(BlockDraggableChip,{count:clientIds.length,icon})},(_ref2=>{let{onDraggableStart,onDraggableEnd}=_ref2;return children({draggable:!0,onDragStart:onDraggableStart,onDragEnd:onDraggableEnd})}))};const block_selection_button=function BlockSelectionButton(_ref){let{clientId,rootClientId}=_ref;const blockInformation=useBlockDisplayInformation(clientId),selected=use_select_useSelect((select=>{var _getBlockListSettings;const{getBlock,getBlockIndex,hasBlockMovingClientId,getBlockListSettings}=select(store_store),index=getBlockIndex(clientId),{name,attributes}=getBlock(clientId);return{index,name,attributes,blockMovingMode:hasBlockMovingClientId(),orientation:null===(_getBlockListSettings=getBlockListSettings(rootClientId))||void 0===_getBlockListSettings?void 0:_getBlockListSettings.orientation}}),[clientId,rootClientId]),{index,name,attributes,blockMovingMode,orientation}=selected,{setNavigationMode,removeBlock}=use_dispatch(store_store),ref=(0,react.useRef)(),blockType=(0,build_module.E7)(name),label=(0,build_module.wZ)(blockType,attributes,index+1,orientation);(0,react.useEffect)((()=>{ref.current.focus(),speak(label)}),[label]);const blockElement=useBlockElement(clientId),{hasBlockMovingClientId,getBlockIndex,getBlockRootClientId,getClientIdsOfDescendants,getSelectedBlockClientId,getMultiSelectedBlocksEndClientId,getPreviousBlockClientId,getNextBlockClientId}=use_select_useSelect(store_store),{selectBlock,clearSelectedBlock,setBlockMovingClientId,moveBlockToPosition}=use_dispatch(store_store),classNames=classnames_default()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!blockMovingMode}),dragHandleLabel=(0,i18n_build_module.__)("Drag");return(0,react.createElement)("div",{className:classNames},(0,react.createElement)(flex_component,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,react.createElement)(flex_item_component,null,(0,react.createElement)(block_icon,{icon:null==blockInformation?void 0:blockInformation.icon,showColors:!0})),(0,react.createElement)(flex_item_component,null,(0,react.createElement)(block_draggable,{clientIds:[clientId]},(draggableProps=>(0,react.createElement)(build_module_button,(0,esm_extends.A)({icon:drag_handle,className:"block-selection-button_drag-handle","aria-hidden":"true",label:dragHandleLabel,tabIndex:"-1"},draggableProps))))),(0,react.createElement)(flex_item_component,null,(0,react.createElement)(build_module_button,{ref,onClick:()=>setNavigationMode(!1),onKeyDown:function onKeyDown(event){const{keyCode}=event,isUp=keyCode===keycodes_build_module.UP,isDown=keyCode===keycodes_build_module.PX,isLeft=keyCode===keycodes_build_module.M3,isRight=keyCode===keycodes_build_module.NS,isTab=keyCode===keycodes_build_module.wn,isEscape=keyCode===keycodes_build_module._f,isEnter=keyCode===keycodes_build_module.Fm,isSpace=keyCode===keycodes_build_module.t6,isShift=event.shiftKey;if(keyCode===keycodes_build_module.G_||keyCode===keycodes_build_module.SJ)return removeBlock(clientId),void event.preventDefault();const selectedBlockClientId=getSelectedBlockClientId(),selectionEndClientId=getMultiSelectedBlocksEndClientId(),selectionBeforeEndClientId=getPreviousBlockClientId(selectionEndClientId||selectedBlockClientId),selectionAfterEndClientId=getNextBlockClientId(selectionEndClientId||selectedBlockClientId),navigateUp=isTab&&isShift||isUp,navigateDown=isTab&&!isShift||isDown,navigateOut=isLeft,navigateIn=isRight;let focusedBlockUid;if(navigateUp)focusedBlockUid=selectionBeforeEndClientId;else if(navigateDown)focusedBlockUid=selectionAfterEndClientId;else if(navigateOut){var _getBlockRootClientId;focusedBlockUid=null!==(_getBlockRootClientId=getBlockRootClientId(selectedBlockClientId))&&void 0!==_getBlockRootClientId?_getBlockRootClientId:selectedBlockClientId}else if(navigateIn){var _getClientIdsOfDescen;focusedBlockUid=null!==(_getClientIdsOfDescen=getClientIdsOfDescendants([selectedBlockClientId])[0])&&void 0!==_getClientIdsOfDescen?_getClientIdsOfDescen:selectedBlockClientId}const startingBlockClientId=hasBlockMovingClientId();if(isEscape&&startingBlockClientId&&!event.defaultPrevented&&(setBlockMovingClientId(null),event.preventDefault()),(isEnter||isSpace)&&startingBlockClientId){const sourceRoot=getBlockRootClientId(startingBlockClientId),destRoot=getBlockRootClientId(selectedBlockClientId),sourceBlockIndex=getBlockIndex(startingBlockClientId);let destinationBlockIndex=getBlockIndex(selectedBlockClientId);sourceBlockIndex<destinationBlockIndex&&sourceRoot===destRoot&&(destinationBlockIndex-=1),moveBlockToPosition(startingBlockClientId,sourceRoot,destRoot,destinationBlockIndex),selectBlock(startingBlockClientId),setBlockMovingClientId(null)}if(navigateDown||navigateUp||navigateOut||navigateIn)if(focusedBlockUid)event.preventDefault(),selectBlock(focusedBlockUid);else if(isTab&&selectedBlockClientId){let nextTabbable;if(navigateDown){nextTabbable=blockElement;do{nextTabbable=dom_build_module.XC.tabbable.findNext(nextTabbable)}while(nextTabbable&&blockElement.contains(nextTabbable));nextTabbable||(nextTabbable=blockElement.ownerDocument.defaultView.frameElement,nextTabbable=dom_build_module.XC.tabbable.findNext(nextTabbable))}else nextTabbable=dom_build_module.XC.tabbable.findPrevious(blockElement);nextTabbable&&(event.preventDefault(),nextTabbable.focus(),clearSelectedBlock())}},label,showTooltip:!1,className:"block-selection-button_select-button"},(0,react.createElement)(BlockTitle,{clientId,maximumLength:35})))))};var ToolbarState=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Toolbar/ToolbarState.js"),Toolbar=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Toolbar/Toolbar.js");const toolbar_container=(0,react.forwardRef)((function ToolbarContainer(_ref,ref){let{label,...props}=_ref;const toolbarState=(0,ToolbarState.S)({loop:!0,baseId:props.id,rtl:(0,_wordpress_i18n_build_module.V8)()});return(0,react.createElement)(toolbar_context.Provider,{value:toolbarState},(0,react.createElement)(Toolbar.M,(0,helpers_esm_extends.A)({ref,"aria-label":label},toolbarState,props)))}));const toolbar=(0,react.forwardRef)((function toolbar_Toolbar(_ref,ref){let{className,label,...props}=_ref;if(!label)return(0,deprecated_build_module.A)("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,react.createElement)(toolbar_group,(0,helpers_esm_extends.A)({},props,{className}));const finalClassName=classnames_default()("components-accessible-toolbar",className);return(0,react.createElement)(toolbar_container,(0,helpers_esm_extends.A)({className:finalClassName,label,ref},props))}));function getAllToolbarItemsIn(container){return Array.from(container.querySelectorAll("[data-toolbar-item]"))}function useToolbarFocus(ref,focusOnMount,isAccessibleToolbar,defaultIndex,onIndexChange){const[initialFocusOnMount]=(0,react.useState)(focusOnMount),[initialIndex]=(0,react.useState)(defaultIndex),focusToolbar=(0,react.useCallback)((()=>{!function focusFirstTabbableIn(container){const[firstTabbable]=dom_build_module.XC.tabbable.find(container);firstTabbable&&firstTabbable.focus({preventScroll:!0})}(ref.current)}),[]);useShortcut("core/block-editor/focus-toolbar",focusToolbar),(0,react.useEffect)((()=>{initialFocusOnMount&&focusToolbar()}),[isAccessibleToolbar,initialFocusOnMount,focusToolbar]),(0,react.useEffect)((()=>{let raf=0;return initialIndex&&!initialFocusOnMount&&(raf=window.requestAnimationFrame((()=>{const items=getAllToolbarItemsIn(ref.current),index=initialIndex||0;items[index]&&function hasFocusWithin(container){return container.contains(container.ownerDocument.activeElement)}(ref.current)&&items[index].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(raf),!onIndexChange||!ref.current)return;const index=getAllToolbarItemsIn(ref.current).findIndex((item=>0===item.tabIndex));onIndexChange(index)}}),[initialIndex,initialFocusOnMount])}const navigable_toolbar=function NavigableToolbar(_ref){let{children,focusOnMount,__experimentalInitialIndex:initialIndex,__experimentalOnIndexChange:onIndexChange,...props}=_ref;const ref=(0,react.useRef)(),isAccessibleToolbar=function useIsAccessibleToolbar(ref){const[isAccessibleToolbar,setIsAccessibleToolbar]=(0,react.useState)(!0),determineIsAccessibleToolbar=(0,react.useCallback)((()=>{const onlyToolbarItem=function hasOnlyToolbarItem(elements){return!elements.some((element=>!("toolbarItem"in element.dataset)))}(dom_build_module.XC.tabbable.find(ref.current));onlyToolbarItem||(0,deprecated_build_module.A)("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),setIsAccessibleToolbar(onlyToolbarItem)}),[]);return(0,react.useLayoutEffect)((()=>{const observer=new window.MutationObserver(determineIsAccessibleToolbar);return observer.observe(ref.current,{childList:!0,subtree:!0}),()=>observer.disconnect()}),[isAccessibleToolbar]),isAccessibleToolbar}(ref);return useToolbarFocus(ref,focusOnMount,isAccessibleToolbar,initialIndex,onIndexChange),isAccessibleToolbar?(0,react.createElement)(toolbar,(0,esm_extends.A)({label:props["aria-label"],ref},props),children):(0,react.createElement)(navigable_container_menu,(0,esm_extends.A)({orientation:"horizontal",role:"toolbar",ref},props),children)},chevron_right=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),chevron_left=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),getMovementDirection=(moveDirection,orientation)=>"up"===moveDirection?"horizontal"===orientation?(0,i18n_build_module.V8)()?"right":"left":"up":"down"===moveDirection?"horizontal"===orientation?(0,i18n_build_module.V8)()?"left":"right":"down":null;function getBlockMoverDescription(selectedCount,type,firstIndex,isFirst,isLast,dir,orientation){const position=firstIndex+1;if(selectedCount>1)return function getMultiBlockMoverDescription(selectedCount,firstIndex,isFirst,isLast,dir,orientation){const position=firstIndex+1;if(isFirst&&isLast)return(0,i18n_build_module.__)("All blocks are selected, and cannot be moved");if(dir>0&&!isLast){const movementDirection=getMovementDirection("down",orientation);if("down"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$d blocks from position %2$d down by one place"),selectedCount,position);if("left"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$d blocks from position %2$d left by one place"),selectedCount,position);if("right"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$d blocks from position %2$d right by one place"),selectedCount,position)}if(dir>0&&isLast){const movementDirection=getMovementDirection("down",orientation);if("down"===movementDirection)return(0,i18n_build_module.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===movementDirection)return(0,i18n_build_module.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===movementDirection)return(0,i18n_build_module.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(dir<0&&!isFirst){const movementDirection=getMovementDirection("up",orientation);if("up"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$d blocks from position %2$d up by one place"),selectedCount,position);if("left"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$d blocks from position %2$d left by one place"),selectedCount,position);if("right"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$d blocks from position %2$d right by one place"),selectedCount,position)}if(dir<0&&isFirst){const movementDirection=getMovementDirection("up",orientation);if("up"===movementDirection)return(0,i18n_build_module.__)("Blocks cannot be moved up as they are already at the top");if("left"===movementDirection)return(0,i18n_build_module.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===movementDirection)return(0,i18n_build_module.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(selectedCount,firstIndex,isFirst,isLast,dir,orientation);if(isFirst&&isLast)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %s is the only block, and cannot be moved"),type);if(dir>0&&!isLast){const movementDirection=getMovementDirection("down",orientation);if("down"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$s block from position %2$d down to position %3$d"),type,position,position+1);if("left"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$s block from position %2$d left to position %3$d"),type,position,position+1);if("right"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$s block from position %2$d right to position %3$d"),type,position,position+1)}if(dir>0&&isLast){const movementDirection=getMovementDirection("down",orientation);if("down"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %1$s is at the end of the content and cant be moved down"),type);if("left"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %1$s is at the end of the content and cant be moved left"),type);if("right"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %1$s is at the end of the content and cant be moved right"),type)}if(dir<0&&!isFirst){const movementDirection=getMovementDirection("up",orientation);if("up"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$s block from position %2$d up to position %3$d"),type,position,position-1);if("left"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$s block from position %2$d left to position %3$d"),type,position,position-1);if("right"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Move %1$s block from position %2$d right to position %3$d"),type,position,position-1)}if(dir<0&&isFirst){const movementDirection=getMovementDirection("up",orientation);if("up"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %1$s is at the beginning of the content and cant be moved up"),type);if("left"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %1$s is at the beginning of the content and cant be moved left"),type);if("right"===movementDirection)return(0,i18n_build_module.nv)((0,i18n_build_module.__)("Block %1$s is at the beginning of the content and cant be moved right"),type)}}const getArrowIcon=(direction,orientation)=>"up"===direction?"horizontal"===orientation?(0,i18n_build_module.V8)()?chevron_right:chevron_left:chevron_up:"down"===direction?"horizontal"===orientation?(0,i18n_build_module.V8)()?chevron_left:chevron_right:chevron_down:null,getMovementDirectionLabel=(moveDirection,orientation)=>"up"===moveDirection?"horizontal"===orientation?(0,i18n_build_module.V8)()?(0,i18n_build_module.__)("Move right"):(0,i18n_build_module.__)("Move left"):(0,i18n_build_module.__)("Move up"):"down"===moveDirection?"horizontal"===orientation?(0,i18n_build_module.V8)()?(0,i18n_build_module.__)("Move left"):(0,i18n_build_module.__)("Move right"):(0,i18n_build_module.__)("Move down"):null,BlockMoverButton=(0,react.forwardRef)(((_ref,ref)=>{let{clientIds,direction,orientation:moverOrientation,...props}=_ref;const instanceId=(0,use_instance_id.A)(BlockMoverButton),blocksCount=(0,lodash.castArray)(clientIds).length,{blockType,isDisabled,rootClientId,isFirst,isLast,firstIndex,orientation="vertical"}=use_select_useSelect((select=>{const{getBlockIndex,getBlockRootClientId,getBlockOrder,getBlock,getBlockListSettings}=select(store_store),normalizedClientIds=(0,lodash.castArray)(clientIds),firstClientId=(0,lodash.first)(normalizedClientIds),blockRootClientId=getBlockRootClientId(firstClientId),firstBlockIndex=getBlockIndex(firstClientId),lastBlockIndex=getBlockIndex((0,lodash.last)(normalizedClientIds)),blockOrder=getBlockOrder(blockRootClientId),block=getBlock(firstClientId),isFirstBlock=0===firstBlockIndex,isLastBlock=lastBlockIndex===blockOrder.length-1,{orientation:blockListOrientation}=getBlockListSettings(blockRootClientId)||{};return{blockType:block?(0,build_module.E7)(block.name):null,isDisabled:"up"===direction?isFirstBlock:isLastBlock,rootClientId:blockRootClientId,firstIndex:firstBlockIndex,isFirst:isFirstBlock,isLast:isLastBlock,orientation:moverOrientation||blockListOrientation}}),[clientIds,direction]),{moveBlocksDown,moveBlocksUp}=use_dispatch(store_store),moverFunction="up"===direction?moveBlocksUp:moveBlocksDown,descriptionId=`block-editor-block-mover-button__description-${instanceId}`;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(build_module_button,(0,esm_extends.A)({ref,className:classnames_default()("block-editor-block-mover-button",`is-${direction}-button`),icon:getArrowIcon(direction,orientation),label:getMovementDirectionLabel(direction,orientation),"aria-describedby":descriptionId},props,{onClick:isDisabled?null:event=>{moverFunction(clientIds,rootClientId),props.onClick&&props.onClick(event)},disabled:isDisabled,__experimentalIsFocusable:!0})),(0,react.createElement)(visually_hidden_component,{id:descriptionId},getBlockMoverDescription(blocksCount,blockType&&blockType.title,firstIndex,isFirst,isLast,"up"===direction?-1:1,orientation)))})),BlockMoverUpButton=(0,react.forwardRef)(((props,ref)=>(0,react.createElement)(BlockMoverButton,(0,esm_extends.A)({direction:"up",ref},props)))),BlockMoverDownButton=(0,react.forwardRef)(((props,ref)=>(0,react.createElement)(BlockMoverButton,(0,esm_extends.A)({direction:"down",ref},props))));const block_mover=function BlockMover(_ref){let{clientIds,hideDragHandle}=_ref;const{canMove,rootClientId,isFirst,isLast,orientation}=use_select_useSelect((select=>{var _getBlockListSettings;const{getBlockIndex,getBlockListSettings,canMoveBlocks,getBlockOrder,getBlockRootClientId}=select(store_store),normalizedClientIds=(0,lodash.castArray)(clientIds),firstClientId=(0,lodash.first)(normalizedClientIds),_rootClientId=getBlockRootClientId((0,lodash.first)(normalizedClientIds)),firstIndex=getBlockIndex(firstClientId),lastIndex=getBlockIndex((0,lodash.last)(normalizedClientIds)),blockOrder=getBlockOrder(_rootClientId);return{canMove:canMoveBlocks(clientIds,_rootClientId),rootClientId:_rootClientId,isFirst:0===firstIndex,isLast:lastIndex===blockOrder.length-1,orientation:null===(_getBlockListSettings=getBlockListSettings(_rootClientId))||void 0===_getBlockListSettings?void 0:_getBlockListSettings.orientation}}),[clientIds]);if(!canMove||isFirst&&isLast&&!rootClientId)return null;const dragHandleLabel=(0,i18n_build_module.__)("Drag");return(0,react.createElement)(toolbar_group,{className:classnames_default()("block-editor-block-mover",{"is-horizontal":"horizontal"===orientation})},!hideDragHandle&&(0,react.createElement)(block_draggable,{clientIds},(draggableProps=>(0,react.createElement)(build_module_button,(0,esm_extends.A)({icon:drag_handle,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:dragHandleLabel,tabIndex:"-1"},draggableProps)))),(0,react.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,react.createElement)(toolbar_item,null,(itemProps=>(0,react.createElement)(BlockMoverUpButton,(0,esm_extends.A)({clientIds},itemProps)))),(0,react.createElement)(toolbar_item,null,(itemProps=>(0,react.createElement)(BlockMoverDownButton,(0,esm_extends.A)({clientIds},itemProps))))))},{clearTimeout:utils_clearTimeout,setTimeout:utils_setTimeout}=window,block_toolbar_utils_noop=()=>{},DEBOUNCE_TIMEOUT=200;function useDebouncedShowMovers(_ref){let{ref,isFocused,debounceTimeout=DEBOUNCE_TIMEOUT,onChange=block_toolbar_utils_noop}=_ref;const[showMovers,setShowMovers]=(0,react.useState)(!1),timeoutRef=(0,react.useRef)(),handleOnChange=nextIsFocused=>{null!=ref&&ref.current&&setShowMovers(nextIsFocused),onChange(nextIsFocused)},shouldHideMovers=()=>{const isHovered=(null==ref?void 0:ref.current)&&ref.current.matches(":hover");return!isFocused&&!isHovered},clearTimeoutRef=()=>{const timeout=timeoutRef.current;timeout&&utils_clearTimeout&&utils_clearTimeout(timeout)};return(0,react.useEffect)((()=>()=>{handleOnChange(!1),clearTimeoutRef()}),[]),{showMovers,debouncedShowMovers:event=>{event&&event.stopPropagation(),clearTimeoutRef(),showMovers||handleOnChange(!0)},debouncedHideMovers:event=>{event&&event.stopPropagation(),clearTimeoutRef(),timeoutRef.current=utils_setTimeout((()=>{shouldHideMovers()&&handleOnChange(!1)}),debounceTimeout)}}}function useShowMoversGestures(_ref2){let{ref,debounceTimeout=DEBOUNCE_TIMEOUT,onChange=block_toolbar_utils_noop}=_ref2;const[isFocused,setIsFocused]=(0,react.useState)(!1),{showMovers,debouncedShowMovers,debouncedHideMovers}=useDebouncedShowMovers({ref,debounceTimeout,isFocused,onChange}),registerRef=(0,react.useRef)(!1),isFocusedWithin=()=>(null==ref?void 0:ref.current)&&ref.current.contains(ref.current.ownerDocument.activeElement);return(0,react.useEffect)((()=>{const node=ref.current,handleOnFocus=()=>{isFocusedWithin()&&(setIsFocused(!0),debouncedShowMovers())},handleOnBlur=()=>{isFocusedWithin()||(setIsFocused(!1),debouncedHideMovers())};return node&&!registerRef.current&&(node.addEventListener("focus",handleOnFocus,!0),node.addEventListener("blur",handleOnBlur,!0),registerRef.current=!0),()=>{node&&(node.removeEventListener("focus",handleOnFocus),node.removeEventListener("blur",handleOnBlur))}}),[ref,registerRef,setIsFocused,debouncedShowMovers,debouncedHideMovers]),{showMovers,gestures:{onMouseMove:debouncedShowMovers,onMouseLeave:debouncedHideMovers}}}function BlockParentSelector(){const{selectBlock,toggleBlockHighlight}=use_dispatch(store_store),{firstParentClientId,shouldHide,hasReducedUI}=use_select_useSelect((select=>{const{getBlockName,getBlockParents,getSelectedBlockClientId,getSettings}=select(store_store),{hasBlockSupport}=select(build_module.M_),parents=getBlockParents(getSelectedBlockClientId()),_firstParentClientId=parents[parents.length-1],parentBlockName=getBlockName(_firstParentClientId),_parentBlockType=(0,build_module.E7)(parentBlockName),settings=getSettings();return{firstParentClientId:_firstParentClientId,shouldHide:!hasBlockSupport(_parentBlockType,"__experimentalParentSelector",!0),hasReducedUI:settings.hasReducedUI}}),[]),blockInformation=useBlockDisplayInformation(firstParentClientId),nodeRef=(0,react.useRef)(),{gestures:showMoversGestures}=useShowMoversGestures({ref:nodeRef,onChange(isFocused){isFocused&&hasReducedUI||toggleBlockHighlight(firstParentClientId,isFocused)}});return shouldHide||void 0===firstParentClientId?null:(0,react.createElement)("div",(0,esm_extends.A)({className:"block-editor-block-parent-selector",key:firstParentClientId,ref:nodeRef},showMoversGestures),(0,react.createElement)(toolbar_button,{className:"block-editor-block-parent-selector__button",onClick:()=>selectBlock(firstParentClientId),label:(0,i18n_build_module.nv)((0,i18n_build_module.__)("Select %s"),blockInformation.title),showTooltip:!0,icon:(0,react.createElement)(block_icon,{icon:blockInformation.icon})}))}const library_copy=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function PreviewBlockPopover(_ref){let{blocks}=_ref;return(0,react.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,react.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,react.createElement)(popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,react.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,react.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,i18n_build_module.__)("Preview")),(0,react.createElement)(block_preview,{viewportWidth:500,blocks})))))}const block_transformations_menu=_ref=>{let{className,possibleBlockTransformations,onSelect,blocks}=_ref;const[hoveredTransformItemName,setHoveredTransformItemName]=(0,react.useState)();return(0,react.createElement)(menu_group,{label:(0,i18n_build_module.__)("Transform to"),className},hoveredTransformItemName&&(0,react.createElement)(PreviewBlockPopover,{blocks:(0,build_module.bh)(blocks,hoveredTransformItemName)}),possibleBlockTransformations.map((item=>{const{name,icon,title,isDisabled}=item;return(0,react.createElement)(menu_item,{key:name,className:(0,build_module.HK)(name),onClick:event=>{event.preventDefault(),onSelect(name)},disabled:isDisabled,onMouseLeave:()=>setHoveredTransformItemName(null),onMouseEnter:()=>setHoveredTransformItemName(name)},(0,react.createElement)(block_icon,{icon,showColors:!0}),title)})))};class TokenList{constructor(initialValue=""){this.value=initialValue,this._currentValue,this._valueAsArray}entries(...args){return this._valueAsArray.entries(...args)}forEach(...args){return this._valueAsArray.forEach(...args)}keys(...args){return this._valueAsArray.keys(...args)}values(...args){return this._valueAsArray.values(...args)}get value(){return this._currentValue}set value(value){value=String(value),this._valueAsArray=[...new Set(value.split(/\s+/g).filter(Boolean))],this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(index){return this._valueAsArray[index]}contains(item){return-1!==this._valueAsArray.indexOf(item)}add(...items){this.value+=" "+items.join(" ")}remove(...items){this.value=this._valueAsArray.filter((val=>!items.includes(val))).join(" ")}toggle(token,force){return void 0===force&&(force=!this.contains(token)),force?this.add(token):this.remove(token),force}replace(token,newToken){return!!this.contains(token)&&(this.remove(token),this.add(newToken),!0)}supports(){return!0}}function getRenderedStyles(styles){return styles&&0!==styles.length?function getDefaultStyle(styles){return(0,lodash.find)(styles,"isDefault")}(styles)?styles:[{name:"default",label:(0,i18n_build_module._x)("Default","block style"),isDefault:!0},...styles]:[]}function useStylesForBlocks(_ref){let{clientId,onSwitch}=_ref;const{styles,block,blockType,className}=use_select_useSelect((select=>{const{getBlock}=select(store_store),block=getBlock(clientId);if(!block)return{};const blockType=(0,build_module.E7)(block.name),{getBlockStyles}=select(build_module.M_);return{block,blockType,styles:getBlockStyles(block.name),className:block.attributes.className||""}}),[clientId]),{updateBlockAttributes}=use_dispatch(store_store),stylesToRender=getRenderedStyles(styles),activeStyle=function getActiveStyle(styles,className){for(const style of new TokenList(className).values()){if(-1===style.indexOf("is-style-"))continue;const potentialStyleName=style.substring(9),activeStyle=(0,lodash.find)(styles,{name:potentialStyleName});if(activeStyle)return activeStyle}return(0,lodash.find)(styles,"isDefault")}(stylesToRender,className),genericPreviewBlock=function useGenericPreviewBlock(block,type){return(0,react.useMemo)((()=>{const example=null==type?void 0:type.example,blockName=null==type?void 0:type.name;return example&&blockName?(0,build_module.KL)(blockName,{attributes:example.attributes,innerBlocks:example.innerBlocks}):block?(0,build_module.JB)(block):void 0}),[null!=type&&type.example?null==block?void 0:block.name:block,type])}(block,blockType);return{onSelect:style=>{const styleClassName=function replaceActiveStyle(className,activeStyle,newStyle){const list=new TokenList(className);return activeStyle&&list.remove("is-style-"+activeStyle.name),list.add("is-style-"+newStyle.name),list.value}(className,activeStyle,style);updateBlockAttributes(clientId,{className:styleClassName}),onSwitch()},stylesToRender,activeStyle,genericPreviewBlock,className}}const menu_items_noop=()=>{};function BlockStylesMenuItems(_ref){let{clientId,onSwitch=menu_items_noop}=_ref;const{onSelect,stylesToRender,activeStyle}=useStylesForBlocks({clientId,onSwitch});return stylesToRender&&0!==stylesToRender.length?(0,react.createElement)(react.Fragment,null,stylesToRender.map((style=>{const menuItemText=style.label||style.name;return(0,react.createElement)(menu_item,{key:style.name,icon:activeStyle.name===style.name?library_check:null,onClick:()=>onSelect(style)},(0,react.createElement)(text_component,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},menuItemText))}))):null}function BlockStylesMenu(_ref){let{hoveredBlock,onSwitch}=_ref;const{clientId}=hoveredBlock;return(0,react.createElement)(menu_group,{label:(0,i18n_build_module.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,react.createElement)(BlockStylesMenuItems,{clientId,onSwitch}))}const getMatchingBlockByName=function(block,selectedBlockName){let consumedBlocks=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId,name,innerBlocks=[]}=block;if(!consumedBlocks.has(clientId)){if(name===selectedBlockName)return block;for(const innerBlock of innerBlocks){const match=getMatchingBlockByName(innerBlock,selectedBlockName,consumedBlocks);if(match)return match}}},transformMatchingBlock=(match,selectedBlock)=>{const retainedBlockAttributes=((name,attributes)=>{const contentAttributes=(0,build_module.GJ)(name,"content");return null!=contentAttributes&&contentAttributes.length?contentAttributes.reduce(((_accumulator,attribute)=>(attributes[attribute]&&(_accumulator[attribute]=attributes[attribute]),_accumulator)),{}):attributes})(selectedBlock.name,selectedBlock.attributes);match.attributes={...match.attributes,...retainedBlockAttributes}},use_transformed_patterns=(patterns,selectedBlocks)=>(0,react.useMemo)((()=>patterns.reduce(((accumulator,_pattern)=>{const transformedBlocks=((selectedBlocks,patternBlocks)=>{const _patternBlocks=patternBlocks.map((block=>(0,build_module.JB)(block))),consumedBlocks=new Set;for(const selectedBlock of selectedBlocks){let isMatch=!1;for(const patternBlock of _patternBlocks){const match=getMatchingBlockByName(patternBlock,selectedBlock.name,consumedBlocks);if(match){isMatch=!0,consumedBlocks.add(match.clientId),transformMatchingBlock(match,selectedBlock);break}}if(!isMatch)return}return _patternBlocks})(selectedBlocks,_pattern.blocks);return transformedBlocks&&accumulator.push({..._pattern,transformedBlocks}),accumulator}),[])),[patterns,selectedBlocks]);function PreviewPatternsPopover(_ref2){let{patterns,onSelect}=_ref2;return(0,react.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,react.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,react.createElement)(popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,react.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,react.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,i18n_build_module.__)("Preview")),(0,react.createElement)(BlockPatternsList,{patterns,onSelect})))))}function BlockPatternsList(_ref3){let{patterns,onSelect}=_ref3;const composite=(0,CompositeState.A)();return(0,react.createElement)(Composite.e,(0,esm_extends.A)({},composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,i18n_build_module.__)("Patterns list")}),patterns.map((pattern=>(0,react.createElement)(pattern_transformations_menu_BlockPattern,{key:pattern.name,pattern,onSelect,composite}))))}function pattern_transformations_menu_BlockPattern(_ref4){let{pattern,onSelect,composite}=_ref4;const baseClassName="block-editor-block-switcher__preview-patterns-container",descriptionId=(0,use_instance_id.A)(pattern_transformations_menu_BlockPattern,`${baseClassName}-list__item-description`);return(0,react.createElement)("div",{className:`${baseClassName}-list__list-item`,"aria-label":pattern.title,"aria-describedby":pattern.description?descriptionId:void 0},(0,react.createElement)(CompositeItem.l,(0,esm_extends.A)({role:"option",as:"div"},composite,{className:`${baseClassName}-list__item`,onClick:()=>onSelect(pattern.transformedBlocks)}),(0,react.createElement)(block_preview,{blocks:pattern.transformedBlocks,viewportWidth:pattern.viewportWidth||500}),(0,react.createElement)("div",{className:`${baseClassName}-list__item-title`},pattern.title)),!!pattern.description&&(0,react.createElement)(visually_hidden_component,{id:descriptionId},pattern.description))}const pattern_transformations_menu=function PatternTransformationsMenu(_ref){let{blocks,patterns:statePatterns,onSelect}=_ref;const[showTransforms,setShowTransforms]=(0,react.useState)(!1),patterns=use_transformed_patterns(statePatterns,blocks);return patterns.length?(0,react.createElement)(menu_group,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},showTransforms&&(0,react.createElement)(PreviewPatternsPopover,{patterns,onSelect}),(0,react.createElement)(menu_item,{onClick:event=>{event.preventDefault(),setShowTransforms(!showTransforms)},icon:chevron_right},(0,i18n_build_module.__)("Patterns"))):null},BlockSwitcherDropdownMenu=_ref=>{let{clientIds,blocks}=_ref;const{replaceBlocks}=use_dispatch(store_store),blockInformation=useBlockDisplayInformation(blocks[0].clientId),{possibleBlockTransformations,canRemove,hasBlockStyles,icon,patterns}=use_select_useSelect((select=>{const{getBlockRootClientId,getBlockTransformItems,__experimentalGetPatternTransformItems}=select(store_store),{getBlockStyles,getBlockType}=select(build_module.M_),{canRemoveBlocks}=select(store_store),rootClientId=getBlockRootClientId((0,lodash.castArray)(clientIds)[0]),[{name:firstBlockName}]=blocks,_isSingleBlockSelected=1===blocks.length,styles=_isSingleBlockSelected&&getBlockStyles(firstBlockName);let _icon;if(_isSingleBlockSelected)_icon=null==blockInformation?void 0:blockInformation.icon;else{var _getBlockType;const isSelectionOfSameType=1===new Set(blocks.map((_ref2=>{let{name}=_ref2;return name}))).size;_icon=isSelectionOfSameType?null===(_getBlockType=getBlockType(firstBlockName))||void 0===_getBlockType?void 0:_getBlockType.icon:library_copy}return{possibleBlockTransformations:getBlockTransformItems(blocks,rootClientId),canRemove:canRemoveBlocks(clientIds,rootClientId),hasBlockStyles:!(null==styles||!styles.length),icon:_icon,patterns:__experimentalGetPatternTransformItems(blocks,rootClientId)}}),[clientIds,blocks,null==blockInformation?void 0:blockInformation.icon]),blockTitle=useBlockDisplayTitle({clientId:Array.isArray(clientIds)?clientIds[0]:clientIds,maximumLength:35}),isReusable=1===blocks.length&&(0,build_module.tk)(blocks[0]),isTemplate=1===blocks.length&&(0,build_module.gc)(blocks[0]),hasPossibleBlockTransformations=!!possibleBlockTransformations.length&&canRemove&&!isTemplate,hasPatternTransformation=!(null==patterns||!patterns.length)&&canRemove;if(!hasBlockStyles&&!hasPossibleBlockTransformations)return(0,react.createElement)(toolbar_group,null,(0,react.createElement)(toolbar_button,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:blockTitle,icon:(0,react.createElement)(react.Fragment,null,(0,react.createElement)(block_icon,{icon,showColors:!0}),(isReusable||isTemplate)&&(0,react.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},blockTitle))}));const blockSwitcherLabel=blockTitle,blockSwitcherDescription=1===blocks.length?(0,i18n_build_module.nv)((0,i18n_build_module.__)("%s: Change block type or style"),blockTitle):(0,i18n_build_module.nv)((0,i18n_build_module._n)("Change type of %d block","Change type of %d blocks",blocks.length),blocks.length),showDropDown=hasBlockStyles||hasPossibleBlockTransformations||hasPatternTransformation;return(0,react.createElement)(toolbar_group,null,(0,react.createElement)(toolbar_item,null,(toggleProps=>(0,react.createElement)(dropdown_menu,{className:"block-editor-block-switcher",label:blockSwitcherLabel,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,react.createElement)(react.Fragment,null,(0,react.createElement)(block_icon,{icon,className:"block-editor-block-switcher__toggle",showColors:!0}),(isReusable||isTemplate)&&(0,react.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},blockTitle)),toggleProps:{describedBy:blockSwitcherDescription,...toggleProps},menuProps:{orientation:"both"}},(_ref3=>{let{onClose}=_ref3;return showDropDown&&(0,react.createElement)("div",{className:"block-editor-block-switcher__container"},hasPatternTransformation&&(0,react.createElement)(pattern_transformations_menu,{blocks,patterns,onSelect:transformedBlocks=>{(transformedBlocks=>{replaceBlocks(clientIds,transformedBlocks)})(transformedBlocks),onClose()}}),hasPossibleBlockTransformations&&(0,react.createElement)(block_transformations_menu,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations,blocks,onSelect:name=>{(name=>{replaceBlocks(clientIds,(0,build_module.bh)(blocks,name))})(name),onClose()}}),hasBlockStyles&&(0,react.createElement)(BlockStylesMenu,{hoveredBlock:blocks[0],onSwitch:onClose}))})))))},block_switcher=_ref4=>{let{clientIds}=_ref4;const blocks=use_select_useSelect((select=>select(store_store).getBlocksByClientId(clientIds)),[clientIds]);return!blocks.length||blocks.some((block=>!block))?null:(0,react.createElement)(BlockSwitcherDropdownMenu,{clientIds,blocks})},{Fill:__unstableBlockToolbarLastItem,Slot:block_toolbar_last_item_Slot}=createSlotFill("__unstableBlockToolbarLastItem");__unstableBlockToolbarLastItem.Slot=block_toolbar_last_item_Slot;const block_toolbar_last_item=__unstableBlockToolbarLastItem;var dist_clipboard=__webpack_require__("../../node_modules/.pnpm/clipboard@2.0.11/node_modules/clipboard/dist/clipboard.js"),clipboard_default=__webpack_require__.n(dist_clipboard);function useUpdatedRef(value){const ref=(0,react.useRef)(value);return ref.current=value,ref}function useCopyToClipboard(text,onSuccess){const textRef=useUpdatedRef(text),onSuccessRef=useUpdatedRef(onSuccess);return(0,use_ref_effect.A)((node=>{const clipboard=new(clipboard_default())(node,{text:()=>"function"==typeof textRef.current?textRef.current():textRef.current||""});return clipboard.on("success",(_ref=>{let{clearSelection}=_ref;clearSelection(),node.focus(),onSuccessRef.current&&onSuccessRef.current()})),()=>{clipboard.destroy()}}),[])}function useNotifyCopy(){const{getBlockName}=use_select_useSelect(store_store),{getBlockType}=use_select_useSelect(build_module.M_),{createSuccessNotice}=use_dispatch(notices_build_module_store_store);return(0,react.useCallback)(((eventType,selectedBlockClientIds)=>{let notice="";if(1===selectedBlockClientIds.length){var _getBlockType;const clientId=selectedBlockClientIds[0],title=null===(_getBlockType=getBlockType(getBlockName(clientId)))||void 0===_getBlockType?void 0:_getBlockType.title;notice="copy"===eventType?(0,i18n_build_module.nv)((0,i18n_build_module.__)('Copied "%s" to clipboard.'),title):(0,i18n_build_module.nv)((0,i18n_build_module.__)('Moved "%s" to clipboard.'),title)}else notice="copy"===eventType?(0,i18n_build_module.nv)((0,i18n_build_module._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",selectedBlockClientIds.length),selectedBlockClientIds.length):(0,i18n_build_module.nv)((0,i18n_build_module._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",selectedBlockClientIds.length),selectedBlockClientIds.length);createSuccessNotice(notice,{type:"snackbar"})}),[])}function BlockActions(_ref){let{clientIds,children,__experimentalUpdateSelection:updateSelection}=_ref;const{canInsertBlockType,getBlockRootClientId,getBlocksByClientId,canMoveBlocks,canRemoveBlocks}=use_select_useSelect(store_store),{getDefaultBlockName,getGroupingBlockName}=use_select_useSelect(build_module.M_),blocks=getBlocksByClientId(clientIds),rootClientId=getBlockRootClientId(clientIds[0]),canDuplicate=(0,lodash.every)(blocks,(block=>!!block&&(0,build_module.pN)(block.name,"multiple",!0)&&canInsertBlockType(block.name,rootClientId))),canInsertDefaultBlock=canInsertBlockType(getDefaultBlockName(),rootClientId),canMove=canMoveBlocks(clientIds,rootClientId),canRemove=canRemoveBlocks(clientIds,rootClientId),{removeBlocks,replaceBlocks,duplicateBlocks,insertAfterBlock,insertBeforeBlock,flashBlock,setBlockMovingClientId,setNavigationMode,selectBlock}=use_dispatch(store_store),notifyCopy=useNotifyCopy();return children({canDuplicate,canInsertDefaultBlock,canMove,canRemove,rootClientId,blocks,onDuplicate:()=>duplicateBlocks(clientIds,updateSelection),onRemove:()=>removeBlocks(clientIds,updateSelection),onInsertBefore(){insertBeforeBlock((0,lodash.first)((0,lodash.castArray)(clientIds)))},onInsertAfter(){insertAfterBlock((0,lodash.last)((0,lodash.castArray)(clientIds)))},onMoveTo(){setNavigationMode(!0),selectBlock(clientIds[0]),setBlockMovingClientId(clientIds[0])},onGroup(){if(!blocks.length)return;const groupingBlockName=getGroupingBlockName(),newBlocks=(0,build_module.bh)(blocks,groupingBlockName);newBlocks&&replaceBlocks(clientIds,newBlocks)},onUngroup(){if(!blocks.length)return;const innerBlocks=blocks[0].innerBlocks;innerBlocks.length&&replaceBlocks(clientIds,innerBlocks)},onCopy(){const selectedBlockClientIds=blocks.map((_ref2=>{let{clientId}=_ref2;return clientId}));1===blocks.length&&flashBlock(selectedBlockClientIds[0]),notifyCopy("copy",selectedBlockClientIds)}})}const block_mode_toggle_noop=()=>{};const block_mode_toggle=(0,compose.A)([with_select(((select,_ref2)=>{let{clientId}=_ref2;const{getBlock,getBlockMode,getSettings}=select(store_store),block=getBlock(clientId),isCodeEditingEnabled=getSettings().codeEditingEnabled;return{mode:getBlockMode(clientId),blockType:block?(0,build_module.E7)(block.name):null,isCodeEditingEnabled}})),with_dispatch(((dispatch,_ref3)=>{let{onToggle=block_mode_toggle_noop,clientId}=_ref3;return{onToggleMode(){dispatch(store_store).toggleBlockMode(clientId),onToggle()}}}))])((function BlockModeToggle(_ref){let{blockType,mode,onToggleMode,small=!1,isCodeEditingEnabled=!0}=_ref;if(!blockType||!(0,build_module.pN)(blockType,"html",!0)||!isCodeEditingEnabled)return null;const label="visual"===mode?(0,i18n_build_module.__)("Edit as HTML"):(0,i18n_build_module.__)("Edit visually");return(0,react.createElement)(menu_item,{onClick:onToggleMode},!small&&label)}));const block_html_convert_button=(0,compose.A)(with_select(((select,_ref)=>{let{clientId}=_ref;const block=select(store_store).getBlock(clientId);return{block,shouldRender:block&&"core/html"===block.name}})),with_dispatch(((dispatch,_ref2)=>{let{block}=_ref2;return{onClick:()=>dispatch(store_store).replaceBlocks(block.clientId,(0,build_module.lh)({HTML:(0,build_module.F8)(block)}))}})))((function BlockConvertButton(_ref){let{shouldRender,onClick,small}=_ref;if(!shouldRender)return null;const label=(0,i18n_build_module.__)("Convert to Blocks");return(0,react.createElement)(menu_item,{onClick},!small&&label)})),{Fill:__unstableBlockSettingsMenuFirstItem,Slot:block_settings_menu_first_item_Slot}=createSlotFill("__unstableBlockSettingsMenuFirstItem");__unstableBlockSettingsMenuFirstItem.Slot=block_settings_menu_first_item_Slot;const block_settings_menu_first_item=__unstableBlockSettingsMenuFirstItem;function useConvertToGroupButtonProps(){const{clientIds,isGroupable,isUngroupable,blocksSelection,groupingBlockName}=use_select_useSelect((select=>{var _blocksSelection$;const{getBlockRootClientId,getBlocksByClientId,canInsertBlockType,getSelectedBlockClientIds}=select(store_store),{getGroupingBlockName}=select(build_module.M_),_clientIds=getSelectedBlockClientIds(),_groupingBlockName=getGroupingBlockName(),groupingBlockAvailable=canInsertBlockType(_groupingBlockName,null!=_clientIds&&_clientIds.length?getBlockRootClientId(_clientIds[0]):void 0),_blocksSelection=getBlocksByClientId(_clientIds),isSingleGroupingBlock=1===_blocksSelection.length&&(null===(_blocksSelection$=_blocksSelection[0])||void 0===_blocksSelection$?void 0:_blocksSelection$.name)===_groupingBlockName;return{clientIds:_clientIds,isGroupable:groupingBlockAvailable&&_blocksSelection.length,isUngroupable:isSingleGroupingBlock&&!!_blocksSelection[0].innerBlocks.length,blocksSelection:_blocksSelection,groupingBlockName:_groupingBlockName}}),[]);return{clientIds,isGroupable,isUngroupable,blocksSelection,groupingBlockName}}function ConvertToGroupButton(_ref){let{clientIds,isGroupable,isUngroupable,blocksSelection,groupingBlockName,onClose=()=>{}}=_ref;const{replaceBlocks}=use_dispatch(store_store);return isGroupable||isUngroupable?(0,react.createElement)(react.Fragment,null,isGroupable&&(0,react.createElement)(menu_item,{onClick:()=>{(()=>{const newBlocks=(0,build_module.bh)(blocksSelection,groupingBlockName);newBlocks&&replaceBlocks(clientIds,newBlocks)})(),onClose()}},(0,i18n_build_module._x)("Group","verb")),isUngroupable&&(0,react.createElement)(menu_item,{onClick:()=>{(()=>{const innerBlocks=blocksSelection[0].innerBlocks;innerBlocks.length&&replaceBlocks(clientIds,innerBlocks)})(),onClose()}},(0,i18n_build_module._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function useBlockLock(clientId){return use_select_useSelect((select=>{const{canEditBlock,canMoveBlock,canRemoveBlock,canLockBlockType,getBlockName,getBlockRootClientId}=select(store_store),rootClientId=getBlockRootClientId(clientId),canEdit=canEditBlock(clientId),canMove=canMoveBlock(clientId,rootClientId),canRemove=canRemoveBlock(clientId,rootClientId);return{canEdit,canMove,canRemove,canLock:canLockBlockType(getBlockName(clientId)),isLocked:!canEdit||!canMove||!canRemove}}),[clientId])}const library_unlock=(0,react.createElement)(build_module_svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,react.createElement)(build_module_svg.wA,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})),library_lock=(0,react.createElement)(build_module_svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,react.createElement)(build_module_svg.wA,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));const checkbox_control=function CheckboxControl(props){const{label,className,heading,checked,indeterminate,help,onChange,...additionalProps}=props;heading&&(0,deprecated_build_module.A)("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[showCheckedIcon,setShowCheckedIcon]=(0,react.useState)(!1),[showIndeterminateIcon,setShowIndeterminateIcon]=(0,react.useState)(!1),ref=(0,use_ref_effect.A)((node=>{node&&(node.indeterminate=!!indeterminate,setShowCheckedIcon(node.matches(":checked")),setShowIndeterminateIcon(node.matches(":indeterminate")))}),[checked,indeterminate]),id=`inspector-checkbox-control-${(0,use_instance_id.A)(CheckboxControl)}`;return(0,react.createElement)(base_control,{label:heading,id,help,className:classnames_default()("components-checkbox-control",className)},(0,react.createElement)("span",{className:"components-checkbox-control__input-container"},(0,react.createElement)("input",(0,helpers_esm_extends.A)({ref,id,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:event=>onChange(event.target.checked),checked,"aria-describedby":help?id+"__help":void 0},additionalProps)),showIndeterminateIcon?(0,react.createElement)(icon,{icon:library_reset,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,showCheckedIcon?(0,react.createElement)(icon,{icon:library_check,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,react.createElement)("label",{className:"components-checkbox-control__label",htmlFor:id},label))};function getTemplateLockValue(lock){return lock.remove&&lock.move?"all":!(!lock.remove||lock.move)&&"insert"}function BlockLockModal(_ref){let{clientId,onClose}=_ref;const[lock,setLock]=(0,react.useState)({move:!1,remove:!1}),{canEdit,canMove,canRemove}=useBlockLock(clientId),{isReusable,templateLock,hasTemplateLock}=use_select_useSelect((select=>{var _getBlockAttributes,_blockType$attributes;const{getBlockName,getBlockAttributes}=select(store_store),blockName=getBlockName(clientId),blockType=(0,build_module.E7)(blockName);return{isReusable:(0,build_module.tk)(blockType),templateLock:null===(_getBlockAttributes=getBlockAttributes(clientId))||void 0===_getBlockAttributes?void 0:_getBlockAttributes.templateLock,hasTemplateLock:!(null==blockType||null===(_blockType$attributes=blockType.attributes)||void 0===_blockType$attributes||!_blockType$attributes.templateLock)}}),[clientId]),[applyTemplateLock,setApplyTemplateLock]=(0,react.useState)(!!templateLock),{updateBlockAttributes}=use_dispatch(store_store),blockInformation=useBlockDisplayInformation(clientId),instanceId=(0,use_instance_id.A)(BlockLockModal,"block-editor-block-lock-modal__options-title");(0,react.useEffect)((()=>{setLock({move:!canMove,remove:!canRemove,...isReusable?{edit:!canEdit}:{}})}),[canEdit,canMove,canRemove,isReusable]);const isAllChecked=Object.values(lock).every(Boolean),isMixed=Object.values(lock).some(Boolean)&&!isAllChecked;return(0,react.createElement)(modal,{title:(0,i18n_build_module.nv)((0,i18n_build_module.__)("Lock %s"),blockInformation.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,i18n_build_module.__)("Close"),onRequestClose:onClose},(0,react.createElement)("p",null,(0,i18n_build_module.__)("Choose specific attributes to restrict or lock all available options.")),(0,react.createElement)("form",{onSubmit:event=>{event.preventDefault(),updateBlockAttributes([clientId],{lock,templateLock:applyTemplateLock?getTemplateLockValue(lock):void 0}),onClose()}},(0,react.createElement)("div",{role:"group","aria-labelledby":instanceId,className:"block-editor-block-lock-modal__options"},(0,react.createElement)(checkbox_control,{className:"block-editor-block-lock-modal__options-title",label:(0,react.createElement)("span",{id:instanceId},(0,i18n_build_module.__)("Lock all")),checked:isAllChecked,indeterminate:isMixed,onChange:newValue=>setLock({move:newValue,remove:newValue,...isReusable?{edit:newValue}:{}})}),(0,react.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},isReusable&&(0,react.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,react.createElement)(checkbox_control,{label:(0,react.createElement)(react.Fragment,null,(0,i18n_build_module.__)("Restrict editing"),(0,react.createElement)(build_module_icon,{icon:lock.edit?library_lock:library_unlock})),checked:!!lock.edit,onChange:edit=>setLock((prevLock=>({...prevLock,edit})))})),(0,react.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,react.createElement)(checkbox_control,{label:(0,react.createElement)(react.Fragment,null,(0,i18n_build_module.__)("Disable movement"),(0,react.createElement)(build_module_icon,{icon:lock.move?library_lock:library_unlock})),checked:lock.move,onChange:move=>setLock((prevLock=>({...prevLock,move})))})),(0,react.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,react.createElement)(checkbox_control,{label:(0,react.createElement)(react.Fragment,null,(0,i18n_build_module.__)("Prevent removal"),(0,react.createElement)(build_module_icon,{icon:lock.remove?library_lock:library_unlock})),checked:lock.remove,onChange:remove=>setLock((prevLock=>({...prevLock,remove})))}))),hasTemplateLock&&(0,react.createElement)(ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,i18n_build_module.__)("Apply to all blocks inside"),checked:applyTemplateLock,disabled:lock.move&&!lock.remove,onChange:()=>setApplyTemplateLock(!applyTemplateLock)})),(0,react.createElement)(flex_component,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,react.createElement)(flex_item_component,null,(0,react.createElement)(build_module_button,{variant:"tertiary",onClick:onClose},(0,i18n_build_module.__)("Cancel"))),(0,react.createElement)(flex_item_component,null,(0,react.createElement)(build_module_button,{variant:"primary",type:"submit"},(0,i18n_build_module.__)("Apply"))))))}function BlockLockMenuItem(_ref){let{clientId}=_ref;const{canLock,isLocked}=useBlockLock(clientId),[isModalOpen,toggleModal]=(0,react.useReducer)((isActive=>!isActive),!1);if(!canLock)return null;const label=isLocked?(0,i18n_build_module.__)("Unlock"):(0,i18n_build_module.__)("Lock");return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(menu_item,{icon:isLocked?library_unlock:library_lock,onClick:toggleModal},label),isModalOpen&&(0,react.createElement)(BlockLockModal,{clientId,onClose:toggleModal}))}const{Fill:block_settings_menu_controls_Fill,Slot:block_settings_menu_controls_Slot}=createSlotFill("BlockSettingsMenuControls");function BlockSettingsMenuControls(_ref2){let{...props}=_ref2;return(0,react.createElement)(style_provider,{document},(0,react.createElement)(block_settings_menu_controls_Fill,props))}BlockSettingsMenuControls.Slot=_ref=>{let{fillProps,clientIds=null}=_ref;const{selectedBlocks,selectedClientIds,canRemove}=use_select_useSelect((select=>{const{getBlocksByClientId,getSelectedBlockClientIds,canRemoveBlocks}=select(store_store),ids=null!==clientIds?clientIds:getSelectedBlockClientIds();return{selectedBlocks:(0,lodash.map)(getBlocksByClientId(ids).filter(Boolean),(block=>block.name)),selectedClientIds:ids,canRemove:canRemoveBlocks(ids)}}),[clientIds]),{canLock}=useBlockLock(selectedClientIds[0]),showLockButton=1===selectedClientIds.length&&canLock,convertToGroupButtonProps=useConvertToGroupButtonProps(),{isGroupable,isUngroupable}=convertToGroupButtonProps,showConvertToGroupButton=(isGroupable||isUngroupable)&&canRemove;return(0,react.createElement)(block_settings_menu_controls_Slot,{fillProps:{...fillProps,selectedBlocks,selectedClientIds}},(fills=>!(null!=fills&&fills.length)>0&&!showConvertToGroupButton&&!showLockButton?null:(0,react.createElement)(menu_group,null,showLockButton&&(0,react.createElement)(BlockLockMenuItem,{clientId:selectedClientIds[0]}),fills,showConvertToGroupButton&&(0,react.createElement)(ConvertToGroupButton,(0,esm_extends.A)({},convertToGroupButtonProps,{onClose:null==fillProps?void 0:fillProps.onClose})))))};const block_settings_menu_controls=BlockSettingsMenuControls,block_settings_dropdown_noop=()=>{},block_settings_dropdown_POPOVER_PROPS={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function CopyMenuItem(_ref){let{blocks,onCopy}=_ref;const ref=useCopyToClipboard((()=>(0,build_module.lK)(blocks)),onCopy),copyMenuItemLabel=blocks.length>1?(0,i18n_build_module.__)("Copy blocks"):(0,i18n_build_module.__)("Copy block");return(0,react.createElement)(menu_item,{ref},copyMenuItemLabel)}const block_settings_dropdown=function BlockSettingsDropdown(_ref2){let{clientIds,__experimentalSelectBlock,children,...props}=_ref2;const blockClientIds=(0,lodash.castArray)(clientIds),count=blockClientIds.length,firstBlockClientId=blockClientIds[0],{firstParentClientId,hasReducedUI,onlyBlock,parentBlockType,previousBlockClientId,nextBlockClientId,selectedBlockClientIds}=use_select_useSelect((select=>{const{getBlockCount,getBlockName,getBlockParents,getPreviousBlockClientId,getNextBlockClientId,getSelectedBlockClientIds,getSettings}=select(store_store),parents=getBlockParents(firstBlockClientId),_firstParentClientId=parents[parents.length-1],parentBlockName=getBlockName(_firstParentClientId);return{firstParentClientId:_firstParentClientId,hasReducedUI:getSettings().hasReducedUI,onlyBlock:1===getBlockCount(),parentBlockType:(0,build_module.E7)(parentBlockName),previousBlockClientId:getPreviousBlockClientId(firstBlockClientId),nextBlockClientId:getNextBlockClientId(firstBlockClientId),selectedBlockClientIds:getSelectedBlockClientIds()}}),[firstBlockClientId]),shortcuts=use_select_useSelect((select=>{const{getShortcutRepresentation}=select(build_module_store_store);return{duplicate:getShortcutRepresentation("core/block-editor/duplicate"),remove:getShortcutRepresentation("core/block-editor/remove"),insertAfter:getShortcutRepresentation("core/block-editor/insert-after"),insertBefore:getShortcutRepresentation("core/block-editor/insert-before")}}),[]),{selectBlock,toggleBlockHighlight}=use_dispatch(store_store),updateSelectionAfterDuplicate=(0,react.useCallback)(__experimentalSelectBlock?async clientIdsPromise=>{const ids=await clientIdsPromise;ids&&ids[0]&&__experimentalSelectBlock(ids[0])}:block_settings_dropdown_noop,[__experimentalSelectBlock]),blockTitle=useBlockDisplayTitle({clientId:firstBlockClientId,maximumLength:25}),updateSelectionAfterRemove=(0,react.useCallback)(__experimentalSelectBlock?()=>{const blockToSelect=previousBlockClientId||nextBlockClientId;blockToSelect&&selectedBlockClientIds.includes(firstBlockClientId)&&!selectedBlockClientIds.includes(blockToSelect)&&__experimentalSelectBlock(blockToSelect)}:block_settings_dropdown_noop,[__experimentalSelectBlock,previousBlockClientId,nextBlockClientId,selectedBlockClientIds]),label=(0,i18n_build_module.nv)((0,i18n_build_module.__)("Remove %s"),blockTitle),removeBlockLabel=1===count?label:(0,i18n_build_module.__)("Remove blocks"),selectParentButtonRef=(0,react.useRef)(),{gestures:showParentOutlineGestures}=useShowMoversGestures({ref:selectParentButtonRef,onChange(isFocused){isFocused&&hasReducedUI||toggleBlockHighlight(firstParentClientId,isFocused)}});return(0,react.createElement)(BlockActions,{clientIds,__experimentalUpdateSelection:!__experimentalSelectBlock},(_ref3=>{let{canDuplicate,canInsertDefaultBlock,canMove,canRemove,onDuplicate,onInsertAfter,onInsertBefore,onRemove,onCopy,onMoveTo,blocks}=_ref3;return(0,react.createElement)(dropdown_menu,(0,esm_extends.A)({icon:more_vertical,label:(0,i18n_build_module.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:block_settings_dropdown_POPOVER_PROPS,noIcons:!0},props),(_ref4=>{let{onClose}=_ref4;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(menu_group,null,(0,react.createElement)(block_settings_menu_first_item.Slot,{fillProps:{onClose}}),void 0!==firstParentClientId&&(0,react.createElement)(menu_item,(0,esm_extends.A)({},showParentOutlineGestures,{ref:selectParentButtonRef,icon:(0,react.createElement)(block_icon,{icon:parentBlockType.icon}),onClick:()=>selectBlock(firstParentClientId)}),(0,i18n_build_module.nv)((0,i18n_build_module.__)("Select parent block (%s)"),parentBlockType.title)),1===count&&(0,react.createElement)(block_html_convert_button,{clientId:firstBlockClientId}),(0,react.createElement)(CopyMenuItem,{blocks,onCopy}),canDuplicate&&(0,react.createElement)(menu_item,{onClick:(0,lodash.flow)(onClose,onDuplicate,updateSelectionAfterDuplicate),shortcut:shortcuts.duplicate},(0,i18n_build_module.__)("Duplicate")),canInsertDefaultBlock&&(0,react.createElement)(react.Fragment,null,(0,react.createElement)(menu_item,{onClick:(0,lodash.flow)(onClose,onInsertBefore),shortcut:shortcuts.insertBefore},(0,i18n_build_module.__)("Insert before")),(0,react.createElement)(menu_item,{onClick:(0,lodash.flow)(onClose,onInsertAfter),shortcut:shortcuts.insertAfter},(0,i18n_build_module.__)("Insert after"))),canMove&&!onlyBlock&&(0,react.createElement)(menu_item,{onClick:(0,lodash.flow)(onClose,onMoveTo)},(0,i18n_build_module.__)("Move to")),1===count&&(0,react.createElement)(block_mode_toggle,{clientId:firstBlockClientId,onToggle:onClose})),(0,react.createElement)(block_settings_menu_controls.Slot,{fillProps:{onClose},clientIds}),"function"==typeof children?children({onClose}):react.Children.map((child=>(0,react.cloneElement)(child,{onClose}))),canRemove&&(0,react.createElement)(menu_group,null,(0,react.createElement)(menu_item,{onClick:(0,lodash.flow)(onClose,onRemove,updateSelectionAfterRemove),shortcut:shortcuts.remove},removeBlockLabel)))}))}))};const block_settings_menu=function BlockSettingsMenu(_ref){let{clientIds,...props}=_ref;return(0,react.createElement)(toolbar_group,null,(0,react.createElement)(toolbar_item,null,(toggleProps=>(0,react.createElement)(block_settings_dropdown,(0,esm_extends.A)({clientIds,toggleProps},props)))))};function BlockLockToolbar(_ref){let{clientId}=_ref;const blockInformation=useBlockDisplayInformation(clientId),{canEdit,canMove,canRemove,canLock}=useBlockLock(clientId),[isModalOpen,toggleModal]=(0,react.useReducer)((isActive=>!isActive),!1);return canLock?canEdit&&canMove&&canRemove?null:(0,react.createElement)(react.Fragment,null,(0,react.createElement)(toolbar_group,{className:"block-editor-block-lock-toolbar"},(0,react.createElement)(toolbar_button,{icon:library_lock,label:(0,i18n_build_module.nv)((0,i18n_build_module.__)("Unlock %s"),blockInformation.title),onClick:toggleModal})),isModalOpen&&(0,react.createElement)(BlockLockModal,{clientId,onClose:toggleModal})):null}const library_group=(0,react.createElement)(build_module_svg.t4,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,react.createElement)(build_module_svg.wA,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})),library_row=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z"})),library_stack=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})),layouts={group:void 0,row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};const convert_to_group_buttons_toolbar=function BlockGroupToolbar(){const{blocksSelection,clientIds,groupingBlockName,isGroupable}=useConvertToGroupButtonProps(),{replaceBlocks}=use_dispatch(store_store),{canRemove,variations}=use_select_useSelect((select=>{const{canRemoveBlocks}=select(store_store),{getBlockVariations}=select(build_module.M_);return{canRemove:canRemoveBlocks(clientIds),variations:getBlockVariations(groupingBlockName,"transform")}}),[clientIds,groupingBlockName]),onConvertToGroup=function(){let layout=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"group";const newBlocks=(0,build_module.bh)(blocksSelection,groupingBlockName);newBlocks&&newBlocks.length>0&&(newBlocks[0].attributes.layout=layouts[layout],replaceBlocks(clientIds,newBlocks))};if(!isGroupable||!canRemove)return null;const canInsertRow=!!variations.find((_ref=>{let{name}=_ref;return"group-row"===name})),canInsertStack=!!variations.find((_ref2=>{let{name}=_ref2;return"group-stack"===name}));return(0,react.createElement)(toolbar_group,null,(0,react.createElement)(toolbar_button,{icon:library_group,label:(0,i18n_build_module._x)("Group","verb"),onClick:onConvertToGroup}),canInsertRow&&(0,react.createElement)(toolbar_button,{icon:library_row,label:(0,i18n_build_module._x)("Row","single horizontal line"),onClick:()=>onConvertToGroup("row")}),canInsertStack&&(0,react.createElement)(toolbar_button,{icon:library_stack,label:(0,i18n_build_module._x)("Stack","verb"),onClick:()=>onConvertToGroup("stack")}))};function BlockEditVisuallyButton(_ref){let{clientIds}=_ref;const clientId=1===clientIds.length?clientIds[0]:void 0,canEditVisually=use_select_useSelect((select=>!!clientId&&"html"===select(store_store).getBlockMode(clientId)),[clientId]),{toggleBlockMode}=use_dispatch(store_store);return canEditVisually?(0,react.createElement)(toolbar_group,null,(0,react.createElement)(toolbar_button,{onClick:()=>{toggleBlockMode(clientId)}},(0,i18n_build_module.__)("Edit visually"))):null}const block_name_context=(0,react.createContext)(""),block_toolbar=_ref=>{let{hideDragHandle}=_ref;const{blockClientIds,blockClientId,blockType,hasFixedToolbar,hasReducedUI,isValid,isVisual}=use_select_useSelect((select=>{const{getBlockName,getBlockMode,getSelectedBlockClientIds,isBlockValid,getBlockRootClientId,getSettings}=select(store_store),selectedBlockClientIds=getSelectedBlockClientIds(),selectedBlockClientId=selectedBlockClientIds[0],blockRootClientId=getBlockRootClientId(selectedBlockClientId),settings=getSettings();return{blockClientIds:selectedBlockClientIds,blockClientId:selectedBlockClientId,blockType:selectedBlockClientId&&(0,build_module.E7)(getBlockName(selectedBlockClientId)),hasFixedToolbar:settings.hasFixedToolbar,hasReducedUI:settings.hasReducedUI,rootClientId:blockRootClientId,isValid:selectedBlockClientIds.every((id=>isBlockValid(id))),isVisual:selectedBlockClientIds.every((id=>"visual"===getBlockMode(id)))}}),[]),{toggleBlockHighlight}=use_dispatch(store_store),nodeRef=(0,react.useRef)(),{showMovers,gestures:showMoversGestures}=useShowMoversGestures({ref:nodeRef,onChange(isFocused){isFocused&&hasReducedUI||toggleBlockHighlight(blockClientId,isFocused)}}),displayHeaderToolbar=(0,use_viewport_match.A)("medium","<")||hasFixedToolbar;if(blockType&&!(0,build_module.pN)(blockType,"__experimentalToolbar",!0))return null;const shouldShowMovers=displayHeaderToolbar||showMovers;if(0===blockClientIds.length)return null;const shouldShowVisualToolbar=isValid&&isVisual,isMultiToolbar=blockClientIds.length>1,classes=classnames_default()("block-editor-block-toolbar",shouldShowMovers&&"is-showing-movers");return(0,react.createElement)("div",{className:classes},!isMultiToolbar&&!displayHeaderToolbar&&(0,react.createElement)(BlockParentSelector,{clientIds:blockClientIds}),(0,react.createElement)("div",(0,esm_extends.A)({ref:nodeRef},showMoversGestures),(shouldShowVisualToolbar||isMultiToolbar)&&(0,react.createElement)(toolbar_group,{className:"block-editor-block-toolbar__block-controls"},(0,react.createElement)(block_switcher,{clientIds:blockClientIds}),!isMultiToolbar&&(0,react.createElement)(BlockLockToolbar,{clientId:blockClientIds[0]}),(0,react.createElement)(block_mover,{clientIds:blockClientIds,hideDragHandle:hideDragHandle||hasReducedUI}))),shouldShowVisualToolbar&&isMultiToolbar&&(0,react.createElement)(convert_to_group_buttons_toolbar,null),shouldShowVisualToolbar&&(0,react.createElement)(react.Fragment,null,(0,react.createElement)(block_controls.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,react.createElement)(block_controls.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,react.createElement)(block_controls.Slot,{className:"block-editor-block-toolbar__slot"}),(0,react.createElement)(block_controls.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,react.createElement)(block_controls.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,react.createElement)(block_name_context.Provider,{value:null==blockType?void 0:blockType.name},(0,react.createElement)(block_toolbar_last_item.Slot,null))),(0,react.createElement)(BlockEditVisuallyButton,{clientIds:blockClientIds}),(0,react.createElement)(block_settings_menu,{clientIds:blockClientIds}))};const block_contextual_toolbar=function BlockContextualToolbar(_ref){let{focusOnMount,isFixed,...props}=_ref;const{blockType,hasParents,showParentSelector}=use_select_useSelect((select=>{const{getBlockName,getBlockParents,getSelectedBlockClientIds}=select(store_store),{getBlockType}=select(build_module.M_),selectedBlockClientIds=getSelectedBlockClientIds(),selectedBlockClientId=selectedBlockClientIds[0],parents=getBlockParents(selectedBlockClientId),parentBlockType=getBlockType(getBlockName(parents[parents.length-1]));return{blockType:selectedBlockClientId&&getBlockType(getBlockName(selectedBlockClientId)),hasParents:parents.length,showParentSelector:parentBlockType&&(0,build_module.pN)(parentBlockType,"__experimentalParentSelector",!0)&&selectedBlockClientIds.length<=1}}),[]);if(blockType&&!(0,build_module.pN)(blockType,"__experimentalToolbar",!0))return null;const classes=classnames_default()("block-editor-block-contextual-toolbar",{"has-parent":hasParents&&showParentSelector,"is-fixed":isFixed});return(0,react.createElement)(navigable_toolbar,(0,esm_extends.A)({focusOnMount,className:classes,"aria-label":(0,i18n_build_module.__)("Block tools")},props),(0,react.createElement)(block_toolbar,{hideDragHandle:isFixed}))},use_block_toolbar_popover_props_DEFAULT_PROPS={__unstableForcePosition:!0,__unstableShift:!0},RESTRICTED_HEIGHT_PROPS={__unstableForcePosition:!1,__unstableShift:!1};function getProps(contentElement,selectedBlockElement,toolbarHeight){if(!contentElement||!selectedBlockElement)return use_block_toolbar_popover_props_DEFAULT_PROPS;const blockRect=selectedBlockElement.getBoundingClientRect(),contentRect=contentElement.getBoundingClientRect();return blockRect.top-contentRect.top>toolbarHeight?use_block_toolbar_popover_props_DEFAULT_PROPS:RESTRICTED_HEIGHT_PROPS}function selected_block_popover_selector(select){const{isNavigationMode,isMultiSelecting,hasMultiSelection,isTyping,getSettings,getLastMultiSelectedBlockClientId}=select(store_store);return{isNavigationMode:isNavigationMode(),isMultiSelecting:isMultiSelecting(),isTyping:isTyping(),hasFixedToolbar:getSettings().hasFixedToolbar,lastClientId:hasMultiSelection()?getLastMultiSelectedBlockClientId():null}}function SelectedBlockPopover(_ref){let{clientId,rootClientId,isEmptyDefaultBlock,capturingClientId,__unstablePopoverSlot,__unstableContentRef}=_ref;const{isNavigationMode,isMultiSelecting,isTyping,hasFixedToolbar,lastClientId}=use_select_useSelect(selected_block_popover_selector,[]),isInsertionPointVisible=use_select_useSelect((select=>{const{isBlockInsertionPointVisible,getBlockInsertionPoint,getBlockOrder}=select(store_store);if(!isBlockInsertionPointVisible())return!1;const insertionPoint=getBlockInsertionPoint();return getBlockOrder(insertionPoint.rootClientId)[insertionPoint.index]===clientId}),[clientId]),isLargeViewport=(0,use_viewport_match.A)("medium"),isToolbarForced=(0,react.useRef)(!1),{stopTyping}=use_dispatch(store_store),shouldShowBreadcrumb=isNavigationMode,shouldShowContextualToolbar=!isNavigationMode&&!hasFixedToolbar&&isLargeViewport&&!isMultiSelecting&&!(!isTyping&&!isNavigationMode&&isEmptyDefaultBlock)&&!isTyping;useShortcut("core/block-editor/focus-toolbar",(()=>{isToolbarForced.current=!0,stopTyping(!0)}),{isDisabled:!!(isNavigationMode||shouldShowContextualToolbar||hasFixedToolbar||isEmptyDefaultBlock)}),(0,react.useEffect)((()=>{isToolbarForced.current=!1}));const initialToolbarItemIndexRef=(0,react.useRef)(),popoverProps=function useBlockToolbarPopoverProps(_ref){let{contentElement,clientId}=_ref;const selectedBlockElement=useBlockElement(clientId),[toolbarHeight,setToolbarHeight]=(0,react.useState)(0),[props,setProps]=(0,react.useState)((()=>getProps(contentElement,selectedBlockElement,toolbarHeight))),blockIndex=use_select_useSelect((select=>select(store_store).getBlockIndex(clientId)),[clientId]),popoverRef=(0,use_ref_effect.A)((popoverNode=>{setToolbarHeight(popoverNode.offsetHeight)}),[]),updateProps=(0,react.useCallback)((()=>setProps(getProps(contentElement,selectedBlockElement,toolbarHeight))),[contentElement,selectedBlockElement,toolbarHeight]);return(0,react.useLayoutEffect)(updateProps,[blockIndex,updateProps]),(0,react.useLayoutEffect)((()=>{var _contentElement$owner,_contentView$addEvent,_selectedBlockElement;if(!contentElement||!selectedBlockElement)return;const contentView=null==contentElement||null===(_contentElement$owner=contentElement.ownerDocument)||void 0===_contentElement$owner?void 0:_contentElement$owner.defaultView;let resizeObserver;null==contentView||null===(_contentView$addEvent=contentView.addEventHandler)||void 0===_contentView$addEvent||_contentView$addEvent.call(contentView,"resize",updateProps);const blockView=null==selectedBlockElement||null===(_selectedBlockElement=selectedBlockElement.ownerDocument)||void 0===_selectedBlockElement?void 0:_selectedBlockElement.defaultView;return blockView.ResizeObserver&&(resizeObserver=new blockView.ResizeObserver(updateProps),resizeObserver.observe(selectedBlockElement)),()=>{var _contentView$removeEv;null==contentView||null===(_contentView$removeEv=contentView.removeEventHandler)||void 0===_contentView$removeEv||_contentView$removeEv.call(contentView,"resize",updateProps),resizeObserver&&resizeObserver.disconnect()}}),[updateProps,contentElement,selectedBlockElement]),{...props,ref:popoverRef}}({contentElement:null==__unstableContentRef?void 0:__unstableContentRef.current,clientId});return shouldShowBreadcrumb||shouldShowContextualToolbar?(0,react.createElement)(block_popover,(0,esm_extends.A)({clientId:capturingClientId||clientId,bottomClientId:lastClientId,className:classnames_default()("block-editor-block-list__block-popover",{"is-insertion-point-visible":isInsertionPointVisible}),__unstablePopoverSlot,__unstableContentRef},popoverProps),shouldShowContextualToolbar&&(0,react.createElement)(block_contextual_toolbar,{focusOnMount:isToolbarForced.current,__experimentalInitialIndex:initialToolbarItemIndexRef.current,__experimentalOnIndexChange:index=>{initialToolbarItemIndexRef.current=index},key:clientId}),shouldShowBreadcrumb&&(0,react.createElement)(block_selection_button,{clientId,rootClientId})):null}function wrapperSelector(select){const{getSelectedBlockClientId,getFirstMultiSelectedBlockClientId,getBlockRootClientId,getBlock,getBlockParents,__experimentalGetBlockListSettingsForBlocks}=select(store_store),clientId=getSelectedBlockClientId()||getFirstMultiSelectedBlockClientId();if(!clientId)return;const{name,attributes={}}=getBlock(clientId)||{},blockParentsClientIds=getBlockParents(clientId),parentBlockListSettings=__experimentalGetBlockListSettingsForBlocks(blockParentsClientIds),capturingClientId=(0,lodash.find)(blockParentsClientIds,(parentClientId=>{var _parentBlockListSetti;return null===(_parentBlockListSetti=parentBlockListSettings[parentClientId])||void 0===_parentBlockListSetti?void 0:_parentBlockListSetti.__experimentalCaptureToolbars}));return{clientId,rootClientId:getBlockRootClientId(clientId),name,isEmptyDefaultBlock:name&&(0,build_module.Xw)({name,attributes}),capturingClientId}}function WrappedBlockPopover(_ref2){let{__unstablePopoverSlot,__unstableContentRef}=_ref2;const selected=use_select_useSelect(wrapperSelector,[]);if(!selected)return null;const{clientId,rootClientId,name,isEmptyDefaultBlock,capturingClientId}=selected;return name?(0,react.createElement)(SelectedBlockPopover,{clientId,rootClientId,isEmptyDefaultBlock,capturingClientId,__unstablePopoverSlot,__unstableContentRef}):null}function BlockToolsBackCompat(_ref){let{children}=_ref;const openRef=(0,react.useContext)(insertion_point_InsertionPointOpenRef),isDisabled=(0,react.useContext)(disabled.Context);return openRef||isDisabled?children:((0,deprecated_build_module.A)('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,react.createElement)(InsertionPoint,{__unstablePopoverSlot:"block-toolbar"},(0,react.createElement)(WrappedBlockPopover,{__unstablePopoverSlot:"block-toolbar"}),children))}const with_client_id=(0,create_higher_order_component.f)((WrappedComponent=>props=>{const{clientId}=context_useBlockEditContext();return(0,react.createElement)(WrappedComponent,(0,esm_extends.A)({},props,{clientId}))}),"withClientId"),inner_blocks_button_block_appender=with_client_id((_ref=>{let{clientId,showSeparator,isFloating,onAddBlock,isToggle}=_ref;return(0,react.createElement)(button_block_appender,{className:classnames_default()({"block-list-appender__toggle":isToggle}),rootClientId:clientId,showSeparator,isFloating,onAddBlock})})),inner_blocks_default_block_appender=(0,compose.A)([with_client_id,with_select(((select,_ref2)=>{let{clientId}=_ref2;const{getBlockOrder}=select(store_store),blockClientIds=getBlockOrder(clientId);return{lastBlockClientId:(0,lodash.last)(blockClientIds)}}))])((_ref=>{let{clientId}=_ref;return(0,react.createElement)(default_block_appender,{rootClientId:clientId})}));const BLOCK_CONTEXT_CACHE=new WeakMap;const throttle=(func,wait,options)=>{let leading=!0,trailing=!0;return options&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),(0,debounce.s)(func,wait,{leading,trailing,maxWait:wait})};function useFreshRef(value){const ref=(0,react.useRef)();return ref.current=value,ref}function useDropZone(_ref){let{isDisabled,onDrop:_onDrop,onDragStart:_onDragStart,onDragEnter:_onDragEnter,onDragLeave:_onDragLeave,onDragEnd:_onDragEnd,onDragOver:_onDragOver}=_ref;const onDropRef=useFreshRef(_onDrop),onDragStartRef=useFreshRef(_onDragStart),onDragEnterRef=useFreshRef(_onDragEnter),onDragLeaveRef=useFreshRef(_onDragLeave),onDragEndRef=useFreshRef(_onDragEnd),onDragOverRef=useFreshRef(_onDragOver);return(0,use_ref_effect.A)((element=>{if(isDisabled)return;let isDragging=!1;const{ownerDocument}=element;function maybeDragStart(event){isDragging||(isDragging=!0,ownerDocument.addEventListener("dragend",maybeDragEnd),ownerDocument.addEventListener("mousemove",maybeDragEnd),onDragStartRef.current&&onDragStartRef.current(event))}function onDragEnter(event){event.preventDefault(),element.contains(event.relatedTarget)||onDragEnterRef.current&&onDragEnterRef.current(event)}function onDragOver(event){!event.defaultPrevented&&onDragOverRef.current&&onDragOverRef.current(event),event.preventDefault()}function onDragLeave(event){(function isElementInZone(targetToCheck){const{defaultView}=ownerDocument;if(!(targetToCheck&&defaultView&&targetToCheck instanceof defaultView.HTMLElement&&element.contains(targetToCheck)))return!1;let elementToCheck=targetToCheck;do{if(elementToCheck.dataset.isDropZone)return elementToCheck===element}while(elementToCheck=elementToCheck.parentElement);return!1})(event.relatedTarget)||onDragLeaveRef.current&&onDragLeaveRef.current(event)}function onDrop(event){event.defaultPrevented||(event.preventDefault(),event.dataTransfer&&event.dataTransfer.files.length,onDropRef.current&&onDropRef.current(event),maybeDragEnd(event))}function maybeDragEnd(event){isDragging&&(isDragging=!1,ownerDocument.removeEventListener("dragend",maybeDragEnd),ownerDocument.removeEventListener("mousemove",maybeDragEnd),onDragEndRef.current&&onDragEndRef.current(event))}return element.dataset.isDropZone="true",element.addEventListener("drop",onDrop),element.addEventListener("dragenter",onDragEnter),element.addEventListener("dragover",onDragOver),element.addEventListener("dragleave",onDragLeave),ownerDocument.addEventListener("dragenter",maybeDragStart),()=>{delete element.dataset.isDropZone,element.removeEventListener("drop",onDrop),element.removeEventListener("dragenter",onDragEnter),element.removeEventListener("dragover",onDragOver),element.removeEventListener("dragleave",onDragLeave),ownerDocument.removeEventListener("dragend",maybeDragEnd),ownerDocument.removeEventListener("mousemove",maybeDragEnd),ownerDocument.removeEventListener("dragenter",maybeDragStart)}}),[isDisabled])}function onBlockDrop(targetRootClientId,targetBlockIndex,getBlockIndex,getClientIdsOfDescendants,moveBlocksToPosition,insertBlocks,clearSelectedBlock){return event=>{const{srcRootClientId:sourceRootClientId,srcClientIds:sourceClientIds,type:dropType,blocks}=function parseDropEvent(event){let result={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!event.dataTransfer)return result;try{result=Object.assign(result,JSON.parse(event.dataTransfer.getData("wp-blocks")))}catch(err){return result}return result}(event);if("inserter"===dropType){clearSelectedBlock();const blocksToInsert=blocks.map((block=>(0,build_module.JB)(block)));insertBlocks(blocksToInsert,targetBlockIndex,targetRootClientId,!0,null)}if("block"===dropType){const sourceBlockIndex=getBlockIndex(sourceClientIds[0]);if(sourceRootClientId===targetRootClientId&&sourceBlockIndex===targetBlockIndex)return;if(sourceClientIds.includes(targetRootClientId)||getClientIdsOfDescendants(sourceClientIds).some((id=>id===targetRootClientId)))return;const isAtSameLevel=sourceRootClientId===targetRootClientId,draggedBlockCount=sourceClientIds.length;moveBlocksToPosition(sourceClientIds,sourceRootClientId,targetRootClientId,isAtSameLevel&&sourceBlockIndex<targetBlockIndex?targetBlockIndex-draggedBlockCount:targetBlockIndex)}}}function useOnBlockDrop(targetRootClientId,targetBlockIndex){const hasUploadPermissions=use_select_useSelect((select=>select(store_store).getSettings().mediaUpload),[]),{canInsertBlockType,getBlockIndex,getClientIdsOfDescendants}=use_select_useSelect(store_store),{insertBlocks,moveBlocksToPosition,updateBlockAttributes,clearSelectedBlock}=use_dispatch(store_store),_onDrop=onBlockDrop(targetRootClientId,targetBlockIndex,getBlockIndex,getClientIdsOfDescendants,moveBlocksToPosition,insertBlocks,clearSelectedBlock),_onFilesDrop=function onFilesDrop(targetRootClientId,targetBlockIndex,hasUploadPermissions,updateBlockAttributes,canInsertBlockType,insertBlocks){return files=>{if(!hasUploadPermissions)return;const transformation=(0,build_module.wG)((0,build_module.XD)("from"),(transform=>"files"===transform.type&&canInsertBlockType(transform.blockName,targetRootClientId)&&transform.isMatch(files)));if(transformation){const blocks=transformation.transform(files,updateBlockAttributes);insertBlocks(blocks,targetBlockIndex,targetRootClientId)}}}(targetRootClientId,targetBlockIndex,hasUploadPermissions,updateBlockAttributes,canInsertBlockType,insertBlocks),_onHTMLDrop=function onHTMLDrop(targetRootClientId,targetBlockIndex,insertBlocks){return HTML=>{const blocks=(0,build_module.Gk)({HTML,mode:"BLOCKS"});blocks.length&&insertBlocks(blocks,targetBlockIndex,targetRootClientId)}}(targetRootClientId,targetBlockIndex,insertBlocks);return event=>{const files=function getFilesFromDataTransfer(dataTransfer){const files=Array.from(dataTransfer.files);return Array.from(dataTransfer.items).forEach((item=>{const file=item.getAsFile();file&&!files.find((_ref=>{let{name,type,size}=_ref;return name===file.name&&type===file.type&&size===file.size}))&&files.push(file)})),files}(event.dataTransfer),html=event.dataTransfer.getData("text/html");html?_onHTMLDrop(html):files.length?_onFilesDrop(files):_onDrop(event)}}function getDistanceToNearestEdge(point,rect){let candidateDistance,candidateEdge;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"]).forEach((edge=>{const distance=function getDistanceFromPointToEdge(point,rect,edge){const isHorizontal="top"===edge||"bottom"===edge,{x,y}=point,pointLateralPosition=isHorizontal?x:y,pointForwardPosition=isHorizontal?y:x,edgeStart=isHorizontal?rect.left:rect.top,edgeEnd=isHorizontal?rect.right:rect.bottom,edgeForwardPosition=rect[edge];let edgeLateralPosition;return edgeLateralPosition=pointLateralPosition>=edgeStart&&pointLateralPosition<=edgeEnd?pointLateralPosition:pointLateralPosition<edgeEnd?edgeStart:edgeEnd,Math.sqrt((pointLateralPosition-edgeLateralPosition)**2+(pointForwardPosition-edgeForwardPosition)**2)}(point,rect,edge);(void 0===candidateDistance||distance<candidateDistance)&&(candidateDistance=distance,candidateEdge=edge)})),[candidateDistance,candidateEdge]}function useBlockDropZone(){let{rootClientId:targetRootClientId=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[targetBlockIndex,setTargetBlockIndex]=(0,react.useState)(null),isLockedAll=use_select_useSelect((select=>{const{getTemplateLock}=select(store_store);return"all"===getTemplateLock(targetRootClientId)}),[targetRootClientId]),{getBlockListSettings}=use_select_useSelect(store_store),{showInsertionPoint,hideInsertionPoint}=use_dispatch(store_store),onBlockDrop=useOnBlockDrop(targetRootClientId,targetBlockIndex),throttled=function useThrottle(fn,wait,options){const throttled=(0,use_memo_one_esm.MA)((()=>throttle(fn,null!=wait?wait:0,options)),[fn,wait,options]);return(0,react.useEffect)((()=>()=>throttled.cancel()),[throttled]),throttled}((0,react.useCallback)(((event,currentTarget)=>{var _getBlockListSettings;const targetIndex=function getNearestBlockIndex(elements,position,orientation){const allowedEdges="horizontal"===orientation?["left","right"]:["top","bottom"],isRightToLeft=(0,i18n_build_module.V8)();let candidateIndex,candidateDistance;return elements.forEach(((element,index)=>{const rect=element.getBoundingClientRect(),[distance,edge]=getDistanceToNearestEdge(position,rect,allowedEdges);(void 0===candidateDistance||distance<candidateDistance)&&(candidateDistance=distance,candidateIndex=index+("bottom"===edge||!isRightToLeft&&"right"===edge||isRightToLeft&&"left"===edge?1:0))})),candidateIndex}(Array.from(currentTarget.children).filter((element=>element.classList.contains("wp-block"))),{x:event.clientX,y:event.clientY},null===(_getBlockListSettings=getBlockListSettings(targetRootClientId))||void 0===_getBlockListSettings?void 0:_getBlockListSettings.orientation);setTargetBlockIndex(void 0===targetIndex?0:targetIndex),null!==targetIndex&&showInsertionPoint(targetRootClientId,targetIndex)}),[]),200);return useDropZone({isDisabled:isLockedAll,onDrop:onBlockDrop,onDragOver(event){throttled(event,event.currentTarget)},onDragLeave(){throttled.cancel(),hideInsertionPoint(),setTargetBlockIndex(null)},onDragEnd(){throttled.cancel(),hideInsertionPoint(),setTargetBlockIndex(null)}})}function UncontrolledInnerBlocks(props){const{clientId,allowedBlocks,__experimentalDefaultBlock,__experimentalDirectInsert,template,templateLock,wrapperRef,templateInsertUpdatesSelection,__experimentalCaptureToolbars:captureToolbars,__experimentalAppenderTagName,renderAppender,orientation,placeholder,__experimentalLayout}=props;!function useNestedSettingsUpdate(clientId,allowedBlocks,__experimentalDefaultBlock,__experimentalDirectInsert,templateLock,captureToolbars,orientation,layout){const{updateBlockListSettings}=use_dispatch(store_store),{blockListSettings,parentLock}=use_select_useSelect((select=>{const rootClientId=select(store_store).getBlockRootClientId(clientId);return{blockListSettings:select(store_store).getBlockListSettings(clientId),parentLock:select(store_store).getTemplateLock(rootClientId)}}),[clientId]),_allowedBlocks=(0,react.useMemo)((()=>allowedBlocks),allowedBlocks);(0,react.useLayoutEffect)((()=>{const newSettings={allowedBlocks:_allowedBlocks,templateLock:void 0===templateLock?parentLock:templateLock};if(void 0!==captureToolbars&&(newSettings.__experimentalCaptureToolbars=captureToolbars),void 0!==orientation)newSettings.orientation=orientation;else{const layoutType=getLayoutType(null==layout?void 0:layout.type);newSettings.orientation=layoutType.getOrientation(layout)}void 0!==__experimentalDefaultBlock&&(newSettings.__experimentalDefaultBlock=__experimentalDefaultBlock),void 0!==__experimentalDirectInsert&&(newSettings.__experimentalDirectInsert=__experimentalDirectInsert),(0,is_shallow_equal_build_module.Ay)(blockListSettings,newSettings)||updateBlockListSettings(clientId,newSettings)}),[clientId,blockListSettings,_allowedBlocks,__experimentalDefaultBlock,__experimentalDirectInsert,templateLock,parentLock,captureToolbars,orientation,updateBlockListSettings,layout])}(clientId,allowedBlocks,__experimentalDefaultBlock,__experimentalDirectInsert,templateLock,captureToolbars,orientation,__experimentalLayout),function useInnerBlockTemplateSync(clientId,template,templateLock,templateInsertUpdatesSelection){const{getSelectedBlocksInitialCaretPosition}=use_select_useSelect(store_store),{replaceInnerBlocks}=use_dispatch(store_store),innerBlocks=use_select_useSelect((select=>select(store_store).getBlocks(clientId)),[clientId]),existingTemplate=(0,react.useRef)(null);(0,react.useLayoutEffect)((()=>{if((0===innerBlocks.length||"all"===templateLock)&&!(0,lodash.isEqual)(template,existingTemplate.current)){existingTemplate.current=template;const nextBlocks=(0,build_module.Nk)(innerBlocks,template);(0,lodash.isEqual)(nextBlocks,innerBlocks)||replaceInnerBlocks(clientId,nextBlocks,0===innerBlocks.length&&templateInsertUpdatesSelection&&0!==nextBlocks.length,getSelectedBlocksInitialCaretPosition())}}),[innerBlocks,template,templateLock,clientId])}(clientId,template,templateLock,templateInsertUpdatesSelection);const context=use_select_useSelect((select=>{const block=select(store_store).getBlock(clientId),blockType=(0,build_module.E7)(block.name);if(blockType&&blockType.providesContext)return function getBlockContext(attributes,blockType){BLOCK_CONTEXT_CACHE.has(blockType)||BLOCK_CONTEXT_CACHE.set(blockType,new WeakMap);const blockTypeCache=BLOCK_CONTEXT_CACHE.get(blockType);if(!blockTypeCache.has(attributes)){const context=(0,lodash.mapValues)(blockType.providesContext,(attributeName=>attributes[attributeName]));blockTypeCache.set(attributes,context)}return blockTypeCache.get(attributes)}(block.attributes,blockType)}),[clientId]);return(0,react.createElement)(BlockContextProvider,{value:context},(0,react.createElement)(block_list_BlockListItems,{rootClientId:clientId,renderAppender,__experimentalAppenderTagName,__experimentalLayout,wrapperRef,placeholder}))}function ControlledInnerBlocks(props){return useBlockSync(props),(0,react.createElement)(UncontrolledInnerBlocks,props)}const ForwardedInnerBlocks=(0,react.forwardRef)(((props,ref)=>{const innerBlocksProps=useInnerBlocksProps({ref},props);return(0,react.createElement)("div",{className:"block-editor-inner-blocks"},(0,react.createElement)("div",innerBlocksProps))}));function useInnerBlocksProps(){let props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId}=context_useBlockEditContext(),isSmallScreen=(0,use_viewport_match.A)("medium","<"),{__experimentalCaptureToolbars,hasOverlay}=use_select_useSelect((select=>{if(!clientId)return{};const{getBlockName,isBlockSelected,hasSelectedInnerBlock,isNavigationMode}=select(store_store),blockName=getBlockName(clientId),enableClickThrough=isNavigationMode()||isSmallScreen;return{__experimentalCaptureToolbars:select(build_module.M_).hasBlockSupport(blockName,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==blockName&&!isBlockSelected(clientId)&&!hasSelectedInnerBlock(clientId,!0)&&enableClickThrough}}),[clientId,isSmallScreen]),ref=(0,use_merge_refs.A)([props.ref,useBlockDropZone({rootClientId:clientId})]),innerBlocksProps={__experimentalCaptureToolbars,...options},InnerBlocks=innerBlocksProps.value&&innerBlocksProps.onChange?ControlledInnerBlocks:UncontrolledInnerBlocks;return{...props,ref,className:classnames_default()(props.className,"block-editor-block-list__layout",{"has-overlay":hasOverlay}),children:clientId?(0,react.createElement)(InnerBlocks,(0,esm_extends.A)({},innerBlocksProps,{clientId})):(0,react.createElement)(block_list_BlockListItems,options)}}useInnerBlocksProps.save=build_module.v9,ForwardedInnerBlocks.DefaultBlockAppender=inner_blocks_default_block_appender,ForwardedInnerBlocks.ButtonBlockAppender=inner_blocks_button_block_appender,ForwardedInnerBlocks.Content=()=>useInnerBlocksProps.save().children;const elementContext=(0,react.createContext)(),block_list_IntersectionObserver=(0,react.createContext)();function block_list_Root(_ref){let{className,...settings}=_ref;const[element,setElement]=(0,react.useState)(),isLargeViewport=(0,use_viewport_match.A)("medium"),{isOutlineMode,isFocusMode,isNavigationMode}=use_select_useSelect((select=>{const{getSettings,isNavigationMode:_isNavigationMode}=select(store_store),{outlineMode,focusMode}=getSettings();return{isOutlineMode:outlineMode,isFocusMode:focusMode,isNavigationMode:_isNavigationMode()}}),[]),{setBlockVisibility}=use_dispatch(store_store),intersectionObserver=(0,react.useMemo)((()=>{const{IntersectionObserver:Observer}=window;if(Observer)return new Observer((entries=>{const updates={};for(const entry of entries){updates[entry.target.getAttribute("data-block")]=entry.isIntersecting}setBlockVisibility(updates)}))}),[]),innerBlocksProps=useInnerBlocksProps({ref:(0,use_merge_refs.A)([useBlockSelectionClearer(),useInBetweenInserter(),setElement]),className:classnames_default()("is-root-container",className,{"is-outline-mode":isOutlineMode,"is-focus-mode":isFocusMode&&isLargeViewport,"is-navigate-mode":isNavigationMode})},settings);return(0,react.createElement)(elementContext.Provider,{value:element},(0,react.createElement)(block_list_IntersectionObserver.Provider,{value:intersectionObserver},(0,react.createElement)("div",innerBlocksProps)))}function BlockList(settings){return function usePreParsePatterns(){const patterns=use_select_useSelect((_select=>_select(store_store).getSettings().__experimentalBlockPatterns),[]);return(0,react.useEffect)((()=>{if(null==patterns||!patterns.length)return;let handle,index=-1;const callback=()=>{index++,index>=patterns.length||((0,data_build_module.Lt)(store_store).__experimentalGetParsedPattern(patterns[index].name),handle=requestIdleCallback(callback))};return handle=requestIdleCallback(callback),()=>cancelIdleCallback(handle)}),[patterns]),null}(),(0,react.createElement)(BlockToolsBackCompat,null,(0,react.createElement)(block_edit_context_Provider,{value:DEFAULT_BLOCK_EDIT_CONTEXT},(0,react.createElement)(block_list_Root,settings)))}function Items(_ref2){let{placeholder,rootClientId,renderAppender,__experimentalAppenderTagName,__experimentalLayout:layout=defaultLayout}=_ref2;const{order,selectedBlocks,visibleBlocks}=use_select_useSelect((select=>{const{getBlockOrder,getSelectedBlockClientIds,__unstableGetVisibleBlocks}=select(store_store);return{order:getBlockOrder(rootClientId),selectedBlocks:getSelectedBlockClientIds(),visibleBlocks:__unstableGetVisibleBlocks()}}),[rootClientId]);return(0,react.createElement)(LayoutProvider,{value:layout},order.map((clientId=>(0,react.createElement)(async_mode_provider_context,{key:clientId,value:!visibleBlocks.has(clientId)&&!selectedBlocks.includes(clientId)},(0,react.createElement)(block_list_block,{rootClientId,clientId})))),order.length<1&&placeholder,(0,react.createElement)(block_list_appender,{tagName:__experimentalAppenderTagName,rootClientId,renderAppender}))}function block_list_BlockListItems(props){return(0,react.createElement)(async_mode_provider_context,{value:!1},(0,react.createElement)(Items,props))}BlockList.__unstableElementContext=elementContext;const sides=["top","right","bottom","left"],borderProps=["color","style","width"],isEmptyBorder=border=>!border||!borderProps.some((prop=>void 0!==border[prop])),hasSplitBorders=function(){let border=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(border).some((side=>-1!==sides.indexOf(side)))},hasMixedBorders=borders=>{if(!hasSplitBorders(borders))return!1;const shorthandBorders=sides.map((side=>getShorthandBorderStyle(null==borders?void 0:borders[side])));return!shorthandBorders.every((border=>border===shorthandBorders[0]))},getShorthandBorderStyle=(border,fallbackBorder)=>{if(isEmptyBorder(border))return fallbackBorder;const{color:fallbackColor,style:fallbackStyle,width:fallbackWidth}=fallbackBorder||{},{color=fallbackColor,style=fallbackStyle,width=fallbackWidth}=border;return[width,!!width&&"0"!==width||!!color?style||"solid":style,color].filter(Boolean).join(" ")};const BorderBoxControl=(0,emotion_react_browser_esm.AH)("",""),LinkedBorderControl={name:"82a6rk",styles:"flex:1"},BorderBoxStyleWithFallback=border=>{const{color=COLORS.gray[200],style="solid",width=config_values.borderWidth}=border||{};return`${color} ${!!width&&"0"!==width||!!color?style||"solid":style} ${width!==config_values.borderWidth?`clamp(1px, ${width}, 10px)`:width}`},CenteredBorderControl={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};function useBorderBoxControlLinkedButton(props){const{className,__next36pxDefaultSize=!1,...otherProps}=useContextSystem(props,"BorderBoxControlLinkedButton"),cx=useCx();return{...otherProps,className:(0,react.useMemo)((()=>cx((__next36pxDefaultSize=>(0,emotion_react_browser_esm.AH)("flex:0;flex-basis:36px;margin-top:",__next36pxDefaultSize?"6px":"3px",";",""))(__next36pxDefaultSize),className)),[className,cx,__next36pxDefaultSize])}}const border_box_control_linked_button_component=contextConnect(((props,forwardedRef)=>{const{className,isLinked,...buttonProps}=useBorderBoxControlLinkedButton(props),label=isLinked?(0,_wordpress_i18n_build_module.__)("Unlink sides"):(0,_wordpress_i18n_build_module.__)("Link sides");return(0,react.createElement)(tooltip,{text:label},(0,react.createElement)(component,{className},(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({},buttonProps,{variant:isLinked?"primary":"secondary",isSmall:!0,icon:isLinked?library_link:link_off,iconSize:16,"aria-label":label,ref:forwardedRef}))))}),"BorderBoxControlLinkedButton");function useBorderBoxControlVisualizer(props){const{className,value,__next36pxDefaultSize=!1,...otherProps}=useContextSystem(props,"BorderBoxControlVisualizer"),cx=useCx(),rtlWatchResult=rtl.watch();return{...otherProps,className:(0,react.useMemo)((()=>cx(((borders,__next36pxDefaultSize)=>(0,emotion_react_browser_esm.AH)("position:absolute;top:",__next36pxDefaultSize?"18px":"15px",";right:30px;bottom:",__next36pxDefaultSize?"18px":"15px",";left:30px;border-top:",BorderBoxStyleWithFallback(null==borders?void 0:borders.top),";border-bottom:",BorderBoxStyleWithFallback(null==borders?void 0:borders.bottom),";",rtl({borderLeft:BorderBoxStyleWithFallback(null==borders?void 0:borders.left)})()," ",rtl({borderRight:BorderBoxStyleWithFallback(null==borders?void 0:borders.right)})(),";",""))(value,__next36pxDefaultSize),className)),[cx,className,value,__next36pxDefaultSize,rtlWatchResult]),value}}const border_box_control_visualizer_component=contextConnect(((props,forwardedRef)=>{const{value,...otherProps}=useBorderBoxControlVisualizer(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},otherProps,{ref:forwardedRef}))}),"BorderBoxControlVisualizer"),line_solid=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M5 11.25h14v1.5H5z"})),line_dashed=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),line_dotted=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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 styles_labelStyles={name:"f3vz0n",styles:"font-weight:500"},focusBoxShadow=(0,emotion_react_browser_esm.AH)("box-shadow:inset 0 0 0 ",config_values.borderWidth," ",COLORS.ui.borderFocus,";",""),borderControl=(0,emotion_react_browser_esm.AH)("border:0;padding:0;margin:0;",boxSizingReset,";",""),styles_wrapperWidth=(0,emotion_react_browser_esm.AH)(unit_control_styles_Root,"{flex:0 0 auto;}","");var styles_ref={name:"6g24ce",styles:"height:16px;width:16px"};const colorIndicatorWrapper=(border,__next36pxDefaultSize)=>{const{style}=border||{};return(0,emotion_react_browser_esm.AH)("border-radius:9999px;border:2px solid transparent;",style?(border=>{const{color,style}=border||{},fallbackColor=style&&"none"!==style?COLORS.gray[300]:void 0;return(0,emotion_react_browser_esm.AH)("border-style:","none"===style?"solid":style,";border-color:",color||fallbackColor,";","")})(border):void 0," width:",__next36pxDefaultSize?"28px":"22px",";height:",__next36pxDefaultSize?"28px":"22px",";padding:",__next36pxDefaultSize?"2px":"1px",";&>span{",__next36pxDefaultSize?"":styles_ref," 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);}","")},borderControlPopoverControls=(0,emotion_react_browser_esm.AH)("width:",228,"px;>div:first-of-type>",StyledLabel,"{margin-bottom:0;",styles_labelStyles,";}&& ",StyledLabel,"+button:not( .has-text ){min-width:24px;padding:0;}",""),borderControlPopoverContent=(0,emotion_react_browser_esm.AH)("",""),borderColorIndicator=(0,emotion_react_browser_esm.AH)("",""),resetButton=(0,emotion_react_browser_esm.AH)("justify-content:center;width:100%;&&{border-top:",config_values.borderWidth," solid ",COLORS.gray[200],";border-top-left-radius:0;border-top-right-radius:0;height:46px;}",""),borderControlStylePicker=(0,emotion_react_browser_esm.AH)(StyledLabel,"{",styles_labelStyles,";}",""),borderStyleButton={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"};const BORDER_STYLES=[{label:(0,_wordpress_i18n_build_module.__)("Solid"),icon:line_solid,value:"solid"},{label:(0,_wordpress_i18n_build_module.__)("Dashed"),icon:line_dashed,value:"dashed"},{label:(0,_wordpress_i18n_build_module.__)("Dotted"),icon:line_dotted,value:"dotted"}],component_Label=props=>{const{label,hideLabelFromVision}=props;return label?hideLabelFromVision?(0,react.createElement)(visually_hidden_component,{as:"label"},label):(0,react.createElement)(StyledLabel,null,label):null},ConnectedBorderControlStylePicker=contextConnect(((props,forwardedRef)=>{const{buttonClassName,hideLabelFromVision,label,onChange,value,...otherProps}=function useBorderControlStylePicker(props){const{className,...otherProps}=useContextSystem(props,"BorderControlStylePicker"),cx=useCx();return{...otherProps,className:(0,react.useMemo)((()=>cx(borderControlStylePicker,className)),[className,cx]),buttonClassName:(0,react.useMemo)((()=>cx(borderStyleButton)),[cx])}}(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},otherProps,{ref:forwardedRef}),(0,react.createElement)(component_Label,{label,hideLabelFromVision}),(0,react.createElement)(flex_component,{justify:"flex-start",gap:1},BORDER_STYLES.map((borderStyle=>(0,react.createElement)(build_module_button,{key:borderStyle.value,className:buttonClassName,icon:borderStyle.icon,isSmall:!0,isPressed:borderStyle.value===value,onClick:()=>onChange(borderStyle.value===value?void 0:borderStyle.value),"aria-label":borderStyle.label,label:borderStyle.label,showTooltip:!0})))))}),"BorderControlStylePicker"),border_control_style_picker_component=ConnectedBorderControlStylePicker;const color_indicator=(0,react.forwardRef)((function UnforwardedColorIndicator(props,forwardedRef){const{className,colorValue,...additionalProps}=props;return(0,react.createElement)("span",(0,helpers_esm_extends.A)({className:classnames_default()("component-color-indicator",className),style:{background:colorValue},ref:forwardedRef},additionalProps))})),NumberControlWrapper=(0,emotion_styled_base_browser_esm.A)(number_control,{target:"ez9hsf47"})(Container,"{width:",space(24),";}"),styles_SelectControl=(0,emotion_styled_base_browser_esm.A)(select_control,{target:"ez9hsf46"})("margin-left:",space(-2),";width:5em;",BackdropUI,"{display:none;}"),styles_RangeControl=(0,emotion_styled_base_browser_esm.A)(range_control,{target:"ez9hsf45"})("flex:1;margin-right:",space(2),";",StyledField,"{margin-bottom:0;}"),interactiveHueStyles=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${space(2)} );\n\tmargin-left: ${space(1)};\n}`,AuxiliaryColorArtefactWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"ez9hsf44"})("padding-top:",space(2),";padding-right:0;padding-left:0;padding-bottom:0;"),AuxiliaryColorArtefactHStackHeader=(0,emotion_styled_base_browser_esm.A)(h_stack_component,{target:"ez9hsf43"})("padding-left:",space(4),";padding-right:",space(4),";"),ColorInputWrapper=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"ez9hsf42"})("padding-top:",space(4),";padding-left:",space(4),";padding-right:",space(3),";padding-bottom:",space(5),";"),ColorfulWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"ez9hsf41"})(boxSizingReset,";width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;overflow:hidden;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",space(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",space(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 ",config_values.borderWidthFocus," #fff;}",interactiveHueStyles," ",StyledField,"{margin-bottom:0;}"),CopyButton=(0,emotion_styled_base_browser_esm.A)(build_module_button,{target:"ez9hsf40"})("&&&&&{min-width:",space(6),";padding:0;>svg{margin-right:0;}}");__webpack_require__("../../node_modules/.pnpm/reakit-warning@0.6.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-warning/es/index.js");var useSealedState=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/useSealedState.js"),shallowEqual=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/shallowEqual.js"),dom=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/dom.js"),lib_popper=__webpack_require__("../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/popper.js"),IdState=__webpack_require__("../../node_modules/.pnpm/reakit@1.3.11_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit/es/Id/IdState.js");function useDisclosureState(initialState){void 0===initialState&&(initialState={});var _useSealedState=(0,useSealedState.N)(initialState),_useSealedState$visib=_useSealedState.visible,initialVisible=void 0!==_useSealedState$visib&&_useSealedState$visib,_useSealedState$anima=_useSealedState.animated,initialAnimated=void 0!==_useSealedState$anima&&_useSealedState$anima,sealed=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_useSealedState,["visible","animated"]),id=(0,IdState.t)(sealed),_React$useState=(0,react.useState)(initialVisible),visible=_React$useState[0],setVisible=_React$useState[1],_React$useState2=(0,react.useState)(initialAnimated),animated=_React$useState2[0],setAnimated=_React$useState2[1],_React$useState3=(0,react.useState)(!1),animating=_React$useState3[0],setAnimating=_React$useState3[1],lastVisible=function useLastValue(value){var lastValue=(0,react.useRef)(null);return(0,useIsomorphicEffect.o)((function(){lastValue.current=value}),[value]),lastValue}(visible),visibleHasChanged=null!=lastVisible.current&&lastVisible.current!==visible;animated&&!animating&&visibleHasChanged&&setAnimating(!0),(0,react.useEffect)((function(){if("number"==typeof animated&&animating){var timeout=setTimeout((function(){return setAnimating(!1)}),animated);return function(){clearTimeout(timeout)}}return function(){}}),[animated,animating]);var show=(0,react.useCallback)((function(){return setVisible(!0)}),[]),hide=(0,react.useCallback)((function(){return setVisible(!1)}),[]),toggle=(0,react.useCallback)((function(){return setVisible((function(v){return!v}))}),[]),stopAnimation=(0,react.useCallback)((function(){return setAnimating(!1)}),[]);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},id),{},{visible,animated,animating,show,hide,toggle,setVisible,setAnimated,stopAnimation})}var isSafari=(0,dom.p)("Mac")&&!(0,dom.p)("Chrome")&&(0,dom.p)("Safari");function applyStyles(styles){return function(prevStyles){return styles&&!(0,shallowEqual.b)(prevStyles,styles)?styles:prevStyles}}function usePopoverState(initialState){void 0===initialState&&(initialState={});var _useSealedState=(0,useSealedState.N)(initialState),_useSealedState$gutte=_useSealedState.gutter,gutter=void 0===_useSealedState$gutte?12:_useSealedState$gutte,_useSealedState$place=_useSealedState.placement,sealedPlacement=void 0===_useSealedState$place?"bottom":_useSealedState$place,_useSealedState$unsta=_useSealedState.unstable_flip,flip=void 0===_useSealedState$unsta||_useSealedState$unsta,sealedOffset=_useSealedState.unstable_offset,_useSealedState$unsta2=_useSealedState.unstable_preventOverflow,preventOverflow=void 0===_useSealedState$unsta2||_useSealedState$unsta2,_useSealedState$unsta3=_useSealedState.unstable_fixed,fixed=void 0!==_useSealedState$unsta3&&_useSealedState$unsta3,_useSealedState$modal=_useSealedState.modal,modal=void 0!==_useSealedState$modal&&_useSealedState$modal,sealed=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_useSealedState,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),popper=(0,react.useRef)(null),referenceRef=(0,react.useRef)(null),popoverRef=(0,react.useRef)(null),arrowRef=(0,react.useRef)(null),_React$useState=(0,react.useState)(sealedPlacement),originalPlacement=_React$useState[0],place=_React$useState[1],_React$useState2=(0,react.useState)(sealedPlacement),placement=_React$useState2[0],setPlacement=_React$useState2[1],offset=(0,react.useState)(sealedOffset||[0,gutter])[0],_React$useState4=(0,react.useState)({position:"fixed",left:"100%",top:"100%"}),popoverStyles=_React$useState4[0],setPopoverStyles=_React$useState4[1],_React$useState5=(0,react.useState)({}),arrowStyles=_React$useState5[0],setArrowStyles=_React$useState5[1],dialog=function useDialogState(initialState){void 0===initialState&&(initialState={});var _useSealedState=(0,useSealedState.N)(initialState),_useSealedState$modal=_useSealedState.modal,initialModal=void 0===_useSealedState$modal||_useSealedState$modal,disclosure=useDisclosureState((0,_rollupPluginBabelHelpers_1f0bf8c2._)(_useSealedState,["modal"])),_React$useState=(0,react.useState)(initialModal),modal=_React$useState[0],setModal=_React$useState[1],disclosureRef=(0,react.useRef)(null);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},disclosure),{},{modal,setModal,unstable_disclosureRef:disclosureRef})}((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({modal},sealed)),update=(0,react.useCallback)((function(){return!!popper.current&&(popper.current.forceUpdate(),!0)}),[]),updateState=(0,react.useCallback)((function(state){state.placement&&setPlacement(state.placement),state.styles&&(setPopoverStyles(applyStyles(state.styles.popper)),arrowRef.current&&setArrowStyles(applyStyles(state.styles.arrow)))}),[]);return(0,useIsomorphicEffect.o)((function(){return referenceRef.current&&popoverRef.current&&(popper.current=(0,lib_popper.n4)(referenceRef.current,popoverRef.current,{placement:originalPlacement,strategy:fixed?"fixed":"absolute",onFirstUpdate:isSafari?updateState:void 0,modifiers:[{name:"eventListeners",enabled:dialog.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:flip,options:{padding:8}},{name:"offset",options:{offset}},{name:"preventOverflow",enabled:preventOverflow,options:{tetherOffset:function tetherOffset(){var _arrowRef$current;return(null===(_arrowRef$current=arrowRef.current)||void 0===_arrowRef$current?void 0:_arrowRef$current.clientWidth)||0}}},{name:"arrow",enabled:!!arrowRef.current,options:{element:arrowRef.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:dialog.visible&&!0,fn:function fn(_ref){var state=_ref.state;return updateState(state)}}]})),function(){popper.current&&(popper.current.destroy(),popper.current=null)}}),[originalPlacement,fixed,dialog.visible,flip,offset,preventOverflow]),(0,react.useEffect)((function(){if(dialog.visible){var id=window.requestAnimationFrame((function(){var _popper$current;null===(_popper$current=popper.current)||void 0===_popper$current||_popper$current.forceUpdate()}));return function(){window.cancelAnimationFrame(id)}}}),[dialog.visible]),(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},dialog),{},{unstable_referenceRef:referenceRef,unstable_popoverRef:popoverRef,unstable_arrowRef:arrowRef,unstable_popoverStyles:popoverStyles,unstable_arrowStyles:arrowStyles,unstable_update:update,unstable_originalPlacement:originalPlacement,placement,place})}var globalState={currentTooltipId:null,listeners:new Set,subscribe:function subscribe(listener){var _this=this;return this.listeners.add(listener),function(){_this.listeners.delete(listener)}},show:function show(id){this.currentTooltipId=id,this.listeners.forEach((function(listener){return listener(id)}))},hide:function hide(id){this.currentTooltipId===id&&(this.currentTooltipId=null,this.listeners.forEach((function(listener){return listener(null)})))}};var useLiveRef=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/useLiveRef.js"),TOOLTIP_STATE_KEYS=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],TOOLTIP_KEYS=[].concat(TOOLTIP_STATE_KEYS,["unstable_portal"]),TOOLTIP_REFERENCE_KEYS=TOOLTIP_STATE_KEYS,useTooltipReference=(0,createHook.a)({name:"TooltipReference",compose:Role.I,keys:TOOLTIP_REFERENCE_KEYS,useProps:function useProps(options,_ref){var htmlRef=_ref.ref,htmlOnFocus=_ref.onFocus,htmlOnBlur=_ref.onBlur,htmlOnMouseEnter=_ref.onMouseEnter,htmlOnMouseLeave=_ref.onMouseLeave,htmlProps=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),onFocusRef=(0,useLiveRef.h)(htmlOnFocus),onBlurRef=(0,useLiveRef.h)(htmlOnBlur),onMouseEnterRef=(0,useLiveRef.h)(htmlOnMouseEnter),onMouseLeaveRef=(0,useLiveRef.h)(htmlOnMouseLeave),onFocus=(0,react.useCallback)((function(event){var _onFocusRef$current,_options$show;null===(_onFocusRef$current=onFocusRef.current)||void 0===_onFocusRef$current||_onFocusRef$current.call(onFocusRef,event),event.defaultPrevented||null===(_options$show=options.show)||void 0===_options$show||_options$show.call(options)}),[options.show]),onBlur=(0,react.useCallback)((function(event){var _onBlurRef$current,_options$hide;null===(_onBlurRef$current=onBlurRef.current)||void 0===_onBlurRef$current||_onBlurRef$current.call(onBlurRef,event),event.defaultPrevented||null===(_options$hide=options.hide)||void 0===_options$hide||_options$hide.call(options)}),[options.hide]),onMouseEnter=(0,react.useCallback)((function(event){var _onMouseEnterRef$curr,_options$show2;null===(_onMouseEnterRef$curr=onMouseEnterRef.current)||void 0===_onMouseEnterRef$curr||_onMouseEnterRef$curr.call(onMouseEnterRef,event),event.defaultPrevented||null===(_options$show2=options.show)||void 0===_options$show2||_options$show2.call(options)}),[options.show]),onMouseLeave=(0,react.useCallback)((function(event){var _onMouseLeaveRef$curr,_options$hide2;null===(_onMouseLeaveRef$curr=onMouseLeaveRef.current)||void 0===_onMouseLeaveRef$curr||_onMouseLeaveRef$curr.call(onMouseLeaveRef,event),event.defaultPrevented||null===(_options$hide2=options.hide)||void 0===_options$hide2||_options$hide2.call(options)}),[options.hide]);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({ref:(0,useForkRef.N)(options.unstable_referenceRef,htmlRef),tabIndex:0,onFocus,onBlur,onMouseEnter,onMouseLeave,"aria-describedby":options.baseId},htmlProps)}}),TooltipReference=(0,createComponent.a)({as:"div",useHook:useTooltipReference});const TooltipContext=(0,react.createContext)({});var getDocument=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/getDocument.js"),isSelfTarget=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/isSelfTarget.js"),DISCLOSURE_CONTENT_KEYS=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],useDisclosureContent=(0,createHook.a)({name:"DisclosureContent",compose:Role.I,keys:DISCLOSURE_CONTENT_KEYS,useProps:function useProps(options,_ref){var htmlOnTransitionEnd=_ref.onTransitionEnd,htmlOnAnimationEnd=_ref.onAnimationEnd,htmlStyle=_ref.style,htmlProps=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref,["onTransitionEnd","onAnimationEnd","style"]),animating=options.animated&&options.animating,_React$useState=(0,react.useState)(null),transition=_React$useState[0],setTransition=_React$useState[1],hidden=!options.visible&&!animating,style=hidden?(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({display:"none"},htmlStyle):htmlStyle,onTransitionEndRef=(0,useLiveRef.h)(htmlOnTransitionEnd),onAnimationEndRef=(0,useLiveRef.h)(htmlOnAnimationEnd),raf=(0,react.useRef)(0);(0,react.useEffect)((function(){if(options.animated)return raf.current=window.requestAnimationFrame((function(){raf.current=window.requestAnimationFrame((function(){options.visible?setTransition("enter"):setTransition(animating?"leave":null)}))})),function(){return window.cancelAnimationFrame(raf.current)}}),[options.animated,options.visible,animating]);var onEnd=(0,react.useCallback)((function(event){var _options$stopAnimatio;(0,isSelfTarget.u)(event)&&(animating&&!0===options.animated&&(null===(_options$stopAnimatio=options.stopAnimation)||void 0===_options$stopAnimatio||_options$stopAnimatio.call(options)))}),[options.animated,animating,options.stopAnimation]),onTransitionEnd=(0,react.useCallback)((function(event){var _onTransitionEndRef$c;null===(_onTransitionEndRef$c=onTransitionEndRef.current)||void 0===_onTransitionEndRef$c||_onTransitionEndRef$c.call(onTransitionEndRef,event),onEnd(event)}),[onEnd]),onAnimationEnd=(0,react.useCallback)((function(event){var _onAnimationEndRef$cu;null===(_onAnimationEndRef$cu=onAnimationEndRef.current)||void 0===_onAnimationEndRef$cu||_onAnimationEndRef$cu.call(onAnimationEndRef,event),onEnd(event)}),[onEnd]);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({id:options.baseId,"data-enter":"enter"===transition?"":void 0,"data-leave":"leave"===transition?"":void 0,onTransitionEnd,onAnimationEnd,hidden,style},htmlProps)}}),canUseDOM=((0,createComponent.a)({as:"div",useHook:useDisclosureContent}),__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/canUseDOM.js"));function getBodyElement(){return canUseDOM.S?document.body:null}var PortalContext=(0,react.createContext)(getBodyElement());function Portal(_ref){var children=_ref.children,context=(0,react.useContext)(PortalContext)||getBodyElement(),hostNode=(0,react.useState)((function(){if(canUseDOM.S){var element=document.createElement("div");return element.className=Portal.__className,element}return null}))[0];return(0,useIsomorphicEffect.o)((function(){if(hostNode&&context)return context.appendChild(hostNode),function(){context.removeChild(hostNode)}}),[hostNode,context]),hostNode?(0,react_dom.createPortal)((0,react.createElement)(PortalContext.Provider,{value:hostNode},children),hostNode):null}function globallyHideTooltipOnEscape(event){event.defaultPrevented||"Escape"===event.key&&globalState.show(null)}Portal.__className="__reakit-portal",Portal.__selector="."+Portal.__className;var useTooltip=(0,createHook.a)({name:"Tooltip",compose:useDisclosureContent,keys:TOOLTIP_KEYS,useOptions:function useOptions(_ref){var _ref$unstable_portal=_ref.unstable_portal,unstable_portal=void 0===_ref$unstable_portal||_ref$unstable_portal,options=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref,["unstable_portal"]);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({unstable_portal},options)},useProps:function useProps(options,_ref2){var htmlRef=_ref2.ref,htmlStyle=_ref2.style,htmlWrapElement=_ref2.wrapElement,htmlProps=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref2,["ref","style","wrapElement"]);(0,react.useEffect)((function(){var _options$unstable_pop;(0,getDocument.Y)(null===(_options$unstable_pop=options.unstable_popoverRef)||void 0===_options$unstable_pop?void 0:_options$unstable_pop.current).addEventListener("keydown",globallyHideTooltipOnEscape)}),[]);var wrapElement=(0,react.useCallback)((function(element){return options.unstable_portal&&(element=(0,react.createElement)(Portal,null,element)),htmlWrapElement?htmlWrapElement(element):element}),[options.unstable_portal,htmlWrapElement]);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({ref:(0,useForkRef.N)(options.unstable_popoverRef,htmlRef),role:"tooltip",style:(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},options.unstable_popoverStyles),{},{pointerEvents:"none"},htmlStyle),wrapElement},htmlProps)}}),Tooltip_Tooltip=(0,createComponent.a)({as:"div",memo:!0,useHook:useTooltip});const shortcut_component=contextConnect((function component_Shortcut(props,forwardedRef){const{as:asProp="span",shortcut,className,...otherProps}=useContextSystem(props,"Shortcut");if(!shortcut)return null;let displayText,ariaLabel;return"string"==typeof shortcut?displayText=shortcut:(displayText=shortcut.display,ariaLabel=shortcut.ariaLabel),(0,react.createElement)(component,(0,helpers_esm_extends.A)({as:asProp,className,"aria-label":ariaLabel,ref:forwardedRef},otherProps),displayText)}),"Shortcut");const TooltipContent=(0,emotion_react_browser_esm.AH)("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",config_values.transitionDurationFastest," ease;font-size:",config_values.fontSize,";&[data-enter]{opacity:1;}",""),TooltipPopoverView=(0,emotion_styled_base_browser_esm.A)("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",COLORS.white,";padding:4px 8px;"),TooltipShortcut=(0,emotion_styled_base_browser_esm.A)(shortcut_component,{target:"e7tfjmw0"})("display:inline-block;margin-left:",space(1),";"),{TooltipPopoverView:content_TooltipPopoverView}=tooltip_styles_namespaceObject;const tooltip_content=contextConnect((function content_TooltipContent(props,forwardedRef){const{children,className,...otherProps}=useContextSystem(props,"TooltipContent"),{tooltip}=(0,react.useContext)(TooltipContext),classes=useCx()(TooltipContent,className);return(0,react.createElement)(Tooltip_Tooltip,(0,helpers_esm_extends.A)({as:component},otherProps,tooltip,{className:classes,ref:forwardedRef}),(0,react.createElement)(content_TooltipPopoverView,null,children))}),"TooltipContent");const ConnectedTooltip=contextConnect((function component_Tooltip(props,forwardedRef){const{animated=!0,animationDuration=160,baseId,children,content,focusable=!0,gutter=4,id,modal=!0,placement,visible=!1,shortcut,...otherProps}=useContextSystem(props,"Tooltip"),tooltip=function useTooltipState(initialState){void 0===initialState&&(initialState={});var _useSealedState=(0,useSealedState.N)(initialState),_useSealedState$place=_useSealedState.placement,placement=void 0===_useSealedState$place?"top":_useSealedState$place,_useSealedState$unsta=_useSealedState.unstable_timeout,initialTimeout=void 0===_useSealedState$unsta?0:_useSealedState$unsta,sealed=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_useSealedState,["placement","unstable_timeout"]),_React$useState=(0,react.useState)(initialTimeout),timeout=_React$useState[0],setTimeout=_React$useState[1],showTimeout=(0,react.useRef)(null),hideTimeout=(0,react.useRef)(null),_usePopoverState=usePopoverState((0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},sealed),{},{placement})),popover=(_usePopoverState.modal,_usePopoverState.setModal,(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_usePopoverState,["modal","setModal"])),clearTimeouts=(0,react.useCallback)((function(){null!==showTimeout.current&&window.clearTimeout(showTimeout.current),null!==hideTimeout.current&&window.clearTimeout(hideTimeout.current)}),[]),hide=(0,react.useCallback)((function(){clearTimeouts(),popover.hide(),hideTimeout.current=window.setTimeout((function(){globalState.hide(popover.baseId)}),timeout)}),[clearTimeouts,popover.hide,timeout,popover.baseId]),show=(0,react.useCallback)((function(){clearTimeouts(),!timeout||globalState.currentTooltipId?(globalState.show(popover.baseId),popover.show()):(globalState.show(null),showTimeout.current=window.setTimeout((function(){globalState.show(popover.baseId),popover.show()}),timeout))}),[clearTimeouts,timeout,popover.show,popover.baseId]);return(0,react.useEffect)((function(){return globalState.subscribe((function(id){id!==popover.baseId&&(clearTimeouts(),popover.visible&&popover.hide())}))}),[popover.baseId,clearTimeouts,popover.visible,popover.hide]),(0,react.useEffect)((function(){return function(){clearTimeouts(),globalState.hide(popover.baseId)}}),[clearTimeouts,popover.baseId]),(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},popover),{},{hide,show,unstable_timeout:timeout,unstable_setTimeout:setTimeout})}({animated:animated?animationDuration:void 0,baseId:baseId||id,gutter,placement,visible,...otherProps}),contextProps=(0,react.useMemo)((()=>({tooltip})),[tooltip]);return(0,react.createElement)(TooltipContext.Provider,{value:contextProps},content&&(0,react.createElement)(tooltip_content,{unstable_portal:modal,ref:forwardedRef},content,shortcut&&(0,react.createElement)(TooltipShortcut,{shortcut})),children&&(0,react.createElement)(TooltipReference,(0,helpers_esm_extends.A)({},tooltip,children.props,{ref:null==children?void 0:children.ref}),(referenceProps=>(focusable||(referenceProps.tabIndex=void 0),(0,react.cloneElement)(children,referenceProps)))))}),"Tooltip"),tooltip_component=ConnectedTooltip,ColorCopyButton=props=>{const{color,colorType}=props,[copiedColor,setCopiedColor]=(0,react.useState)(null),copyTimer=(0,react.useRef)(),copyRef=useCopyToClipboard((()=>{switch(colorType){case"hsl":return color.toHslString();case"rgb":return color.toRgbString();default:return color.toHex()}}),(()=>{copyTimer.current&&clearTimeout(copyTimer.current),setCopiedColor(color.toHex()),copyTimer.current=setTimeout((()=>{setCopiedColor(null),copyTimer.current=void 0}),3e3)}));return(0,react.useEffect)((()=>()=>{copyTimer.current&&clearTimeout(copyTimer.current)}),[]),(0,react.createElement)(tooltip_component,{content:(0,react.createElement)(text_component,{color:"white"},copiedColor===color.toHex()?(0,_wordpress_i18n_build_module.__)("Copied!"):(0,_wordpress_i18n_build_module.__)("Copy")),placement:"bottom"},(0,react.createElement)(CopyButton,{isSmall:!0,ref:copyRef,icon:library_copy,showTooltip:!1}))},InputWithSlider=_ref=>{let{min,max,label,abbreviation,onChange,value}=_ref;return(0,react.createElement)(h_stack_component,{spacing:4},(0,react.createElement)(NumberControlWrapper,{min,max,label,hideLabelFromVision:!0,value,onChange,prefix:(0,react.createElement)(spacer_component,{as:text_component,paddingLeft:space(4),color:COLORS.ui.theme,lineHeight:1},abbreviation),hideHTMLArrows:!0,size:"__unstable-large"}),(0,react.createElement)(styles_RangeControl,{label,hideLabelFromVision:!0,min,max,value,onChange,withInputField:!1}))},RgbInput=_ref=>{let{color,onChange,enableAlpha}=_ref;const{r,g,b,a}=color.toRgb();return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(InputWithSlider,{min:0,max:255,label:"Red",abbreviation:"R",value:r,onChange:nextR=>onChange((0,node_modules_colord.Mj)({r:nextR,g,b,a}))}),(0,react.createElement)(InputWithSlider,{min:0,max:255,label:"Green",abbreviation:"G",value:g,onChange:nextG=>onChange((0,node_modules_colord.Mj)({r,g:nextG,b,a}))}),(0,react.createElement)(InputWithSlider,{min:0,max:255,label:"Blue",abbreviation:"B",value:b,onChange:nextB=>onChange((0,node_modules_colord.Mj)({r,g,b:nextB,a}))}),enableAlpha&&(0,react.createElement)(InputWithSlider,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a),onChange:nextA=>onChange((0,node_modules_colord.Mj)({r,g,b,a:nextA/100}))}))},HslInput=_ref=>{let{color,onChange,enableAlpha}=_ref;const{h,s,l,a}=color.toHsl();return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(InputWithSlider,{min:0,max:359,label:"Hue",abbreviation:"H",value:h,onChange:nextH=>{onChange((0,node_modules_colord.Mj)({h:nextH,s,l,a}))}}),(0,react.createElement)(InputWithSlider,{min:0,max:100,label:"Saturation",abbreviation:"S",value:s,onChange:nextS=>{onChange((0,node_modules_colord.Mj)({h,s:nextS,l,a}))}}),(0,react.createElement)(InputWithSlider,{min:0,max:100,label:"Lightness",abbreviation:"L",value:l,onChange:nextL=>{onChange((0,node_modules_colord.Mj)({h,s,l:nextL,a}))}}),enableAlpha&&(0,react.createElement)(InputWithSlider,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*a),onChange:nextA=>{onChange((0,node_modules_colord.Mj)({h,s,l,a:nextA/100}))}}))},HexInput=_ref=>{let{color,onChange,enableAlpha}=_ref;return(0,react.createElement)(InputControl,{prefix:(0,react.createElement)(spacer_component,{as:text_component,marginLeft:space(4),color:COLORS.ui.theme,lineHeight:1},"#"),value:color.toHex().slice(1).toUpperCase(),onChange:nextValue=>{if(!nextValue)return;const hexValue=nextValue.startsWith("#")?nextValue:"#"+nextValue;onChange((0,node_modules_colord.Mj)(hexValue))},maxLength:enableAlpha?9:7,label:(0,_wordpress_i18n_build_module.__)("Hex color"),hideLabelFromVision:!0,size:"__unstable-large",__unstableStateReducer:(state,action)=>{var _action$payload,_action$payload$event,_state$value,_state$value2;const nativeEvent=null===(_action$payload=action.payload)||void 0===_action$payload||null===(_action$payload$event=_action$payload.event)||void 0===_action$payload$event?void 0:_action$payload$event.nativeEvent;if("insertFromPaste"!==(null==nativeEvent?void 0:nativeEvent.inputType))return{...state};const value=null!==(_state$value=state.value)&&void 0!==_state$value&&_state$value.startsWith("#")?state.value.slice(1).toUpperCase():null===(_state$value2=state.value)||void 0===_state$value2?void 0:_state$value2.toUpperCase();return{...state,value}},__unstableInputWidth:"9em"})},ColorInput=_ref=>{let{colorType,color,onChange,enableAlpha}=_ref;const props={color,onChange,enableAlpha};switch(colorType){case"hsl":return(0,react.createElement)(HslInput,props);case"rgb":return(0,react.createElement)(RgbInput,props);default:return(0,react.createElement)(HexInput,props)}};var react_colorful_dist=__webpack_require__("../../node_modules/.pnpm/react-colorful@5.6.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-colorful/dist/index.mjs");const Picker=_ref=>{let{color,enableAlpha,onChange}=_ref;const Component=enableAlpha?react_colorful_dist.p9:react_colorful_dist.gy,rgbColor=(0,react.useMemo)((()=>color.toRgbString()),[color]);return(0,react.createElement)(Component,{color:rgbColor,onChange:nextColor=>{onChange((0,node_modules_colord.Mj)(nextColor))}})};(0,node_modules_colord.X$)([names.A]);const options=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],ConnectedColorPicker=contextConnect(((props,forwardedRef)=>{const{enableAlpha=!1,color:colorProp,onChange,defaultValue="#fff",copyFormat,...divProps}=useContextSystem(props,"ColorPicker"),[color,setColor]=function useControlledValue(_ref){let{defaultValue,onChange,value:valueProp}=_ref;const hasValue=void 0!==valueProp,initialValue=hasValue?valueProp:defaultValue,[state,setState]=(0,react.useState)(initialValue);let setValue;return setValue=hasValue&&"function"==typeof onChange?onChange:hasValue||"function"!=typeof onChange?setState:nextValue=>{onChange(nextValue),setState(nextValue)},[hasValue?valueProp:state,setValue]}({onChange,value:colorProp,defaultValue}),safeColordColor=(0,react.useMemo)((()=>(0,node_modules_colord.Mj)(color||"")),[color]),debouncedSetColor=(0,use_debounce.A)(setColor),handleChange=(0,react.useCallback)((nextValue=>{debouncedSetColor(nextValue.toHex())}),[debouncedSetColor]),[colorType,setColorType]=(0,react.useState)(copyFormat||"hex");return(0,react.createElement)(ColorfulWrapper,(0,helpers_esm_extends.A)({ref:forwardedRef},divProps),(0,react.createElement)(Picker,{onChange:handleChange,color:safeColordColor,enableAlpha}),(0,react.createElement)(AuxiliaryColorArtefactWrapper,null,(0,react.createElement)(AuxiliaryColorArtefactHStackHeader,{justify:"space-between"},(0,react.createElement)(styles_SelectControl,{options,value:colorType,onChange:nextColorType=>setColorType(nextColorType),label:(0,_wordpress_i18n_build_module.__)("Color format"),hideLabelFromVision:!0}),(0,react.createElement)(ColorCopyButton,{color:safeColordColor,colorType:copyFormat||colorType})),(0,react.createElement)(ColorInputWrapper,{direction:"column",gap:2},(0,react.createElement)(ColorInput,{colorType,color:safeColordColor,onChange:handleChange,enableAlpha}))))}),"ColorPicker"),color_picker_component=ConnectedColorPicker;function getColorFromLegacyProps(color){if(void 0!==color)return"string"==typeof color?color:color.hex?color.hex:void 0}const transformColorStringToLegacyColor=memize_default()((color=>{const colordColor=(0,node_modules_colord.Mj)(color),hex=colordColor.toHex(),rgb=colordColor.toRgb(),hsv=colordColor.toHsv(),hsl=colordColor.toHsl();return{hex,rgb,hsv,hsl,source:"hex",oldHue:hsl.h}}));const LegacyAdapter=props=>(0,react.createElement)(color_picker_component,function use_deprecated_props_useDeprecatedProps(props){const{onChangeComplete}=props,legacyChangeHandler=(0,react.useCallback)((color=>{onChangeComplete(transformColorStringToLegacyColor(color))}),[onChangeComplete]);return function isLegacyProps(props){var _props$color;return void 0!==props.onChangeComplete||void 0!==props.disableAlpha||"string"==typeof(null===(_props$color=props.color)||void 0===_props$color?void 0:_props$color.hex)}(props)?{color:getColorFromLegacyProps(props.color),enableAlpha:!props.disableAlpha,onChange:legacyChangeHandler}:{...props,color:props.color,enableAlpha:props.enableAlpha,onChange:props.onChange}}(props));function CircularOptionPicker(_ref5){let{actions,className,options,children}=_ref5;return(0,react.createElement)("div",{className:classnames_default()("components-circular-option-picker",className)},(0,react.createElement)("div",{className:"components-circular-option-picker__swatches"},options),children,actions&&(0,react.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},actions))}CircularOptionPicker.Option=function Option(_ref){let{className,isSelected,selectedIconProps,tooltipText,...additionalProps}=_ref;const optionButton=(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({isPressed:isSelected,className:"components-circular-option-picker__option"},additionalProps));return(0,react.createElement)("div",{className:classnames_default()(className,"components-circular-option-picker__option-wrapper")},tooltipText?(0,react.createElement)(tooltip,{text:tooltipText},optionButton):optionButton,isSelected&&(0,react.createElement)(icon,(0,helpers_esm_extends.A)({icon:library_check},selectedIconProps||{})))},CircularOptionPicker.ButtonAction=function ButtonAction(_ref4){let{className,children,...additionalProps}=_ref4;return(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({className:classnames_default()("components-circular-option-picker__clear",className),variant:"tertiary"},additionalProps),children)},CircularOptionPicker.DropdownLinkAction=function DropdownLinkAction(_ref2){let{buttonProps,className,dropdownProps,linkText}=_ref2;return(0,react.createElement)(Dropdown,(0,helpers_esm_extends.A)({className:classnames_default()("components-circular-option-picker__dropdown-link-action",className),renderToggle:_ref3=>{let{isOpen,onToggle}=_ref3;return(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({"aria-expanded":isOpen,"aria-haspopup":"true",onClick:onToggle,variant:"link"},buttonProps),linkText)}},dropdownProps))};const v_stack_component=contextConnect((function UnconnectedVStack(props,forwardedRef){const vStackProps=function useVStack(props){const{expanded=!1,...otherProps}=useContextSystem(props,"VStack");return useHStack({direction:"column",expanded,...otherProps})}(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({},vStackProps,{ref:forwardedRef}))}),"VStack");const ColorHeading=(0,emotion_styled_base_browser_esm.A)(heading_component,{target:"e1uu5br00"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"});function SinglePalette(_ref){let{className,clearColor,colors,onChange,value,actions}=_ref;const colorOptions=(0,react.useMemo)((()=>colors.map(((_ref2,index)=>{let{color,name}=_ref2;const colordColor=(0,node_modules_colord.Mj)(color),isSelected=value===color;return(0,react.createElement)(CircularOptionPicker.Option,{key:`${color}-${index}`,isSelected,selectedIconProps:isSelected?{fill:colordColor.contrast()>colordColor.contrast("#000")?"#fff":"#000"}:{},tooltipText:name||(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Color code: %s"),color),style:{backgroundColor:color,color},onClick:isSelected?clearColor:()=>onChange(color),"aria-label":name?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Color: %s"),name):(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Color code: %s"),color)})}))),[colors,value,onChange,clearColor]);return(0,react.createElement)(CircularOptionPicker,{className,options:colorOptions,actions})}function MultiplePalettes(_ref3){let{className,clearColor,colors,onChange,value,actions}=_ref3;return(0,react.createElement)(v_stack_component,{spacing:3,className},colors.map(((_ref4,index)=>{let{name,colors:colorPalette}=_ref4;return(0,react.createElement)(v_stack_component,{spacing:2,key:index},(0,react.createElement)(ColorHeading,null,name),(0,react.createElement)(SinglePalette,{clearColor,colors:colorPalette,onChange,value,actions:colors.length===index+1?actions:null}))})))}function CustomColorPickerDropdown(_ref5){let{isRenderedInSidebar,popoverProps:receivedPopoverProps,...props}=_ref5;const popoverProps=(0,react.useMemo)((()=>({__unstableShift:!0,...isRenderedInSidebar?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...receivedPopoverProps})),[isRenderedInSidebar,receivedPopoverProps]);return(0,react.createElement)(Dropdown,(0,helpers_esm_extends.A)({contentClassName:"components-color-palette__custom-color-dropdown-content",popoverProps},props))}(0,node_modules_colord.X$)([names.A,a11y.A]);const extractColorNameFromCurrentValue=function(currentValue){let colors=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],showMultiplePalettes=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!currentValue)return"";const currentValueIsCssVariable=/^var\(/.test(currentValue),normalizedCurrentValue=currentValueIsCssVariable?currentValue:(0,node_modules_colord.Mj)(currentValue).toHex(),colorPalettes=showMultiplePalettes?colors:[{colors}];for(const{colors:paletteColors}of colorPalettes)for(const{name:colorName,color:colorValue}of paletteColors){if(normalizedCurrentValue===(currentValueIsCssVariable?colorValue:(0,node_modules_colord.Mj)(colorValue).toHex()))return colorName}return(0,_wordpress_i18n_build_module.__)("Custom")},showTransparentBackground=currentValue=>void 0===currentValue||0===(0,node_modules_colord.Mj)(currentValue).alpha();function ColorPalette(_ref6){let{clearable=!0,className,colors,disableCustomColors=!1,enableAlpha,onChange,value,__experimentalHasMultipleOrigins=!1,__experimentalIsRenderedInSidebar=!1}=_ref6;const clearColor=(0,react.useCallback)((()=>onChange(void 0)),[onChange]),showMultiplePalettes=__experimentalHasMultipleOrigins&&(null==colors?void 0:colors.length),Component=showMultiplePalettes?MultiplePalettes:SinglePalette,colordColor=(0,node_modules_colord.Mj)(value),valueWithoutLeadingHash=null!=value&&value.startsWith("#")?value.substring(1):null!=value?value:"",buttonLabelName=(0,react.useMemo)((()=>extractColorNameFromCurrentValue(value,colors,showMultiplePalettes)),[value,colors,showMultiplePalettes]),customColorAccessibleLabel=valueWithoutLeadingHash?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),buttonLabelName,valueWithoutLeadingHash):(0,_wordpress_i18n_build_module.__)("Custom color picker.");return(0,react.createElement)(v_stack_component,{spacing:3,className},!disableCustomColors&&(0,react.createElement)(CustomColorPickerDropdown,{isRenderedInSidebar:__experimentalIsRenderedInSidebar,renderContent:()=>(0,react.createElement)(LegacyAdapter,{color:value,onChange:color=>onChange(color),enableAlpha}),renderToggle:_ref7=>{let{isOpen,onToggle}=_ref7;return(0,react.createElement)(flex_component,{as:"button",justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":isOpen,"aria-haspopup":"true",onClick:onToggle,"aria-label":customColorAccessibleLabel,style:showTransparentBackground(value)?{color:"#000"}:{background:value,color:colordColor.contrast()>colordColor.contrast("#000")?"#fff":"#000"}},(0,react.createElement)(flex_item_component,{isBlock:!0,as:truncate_component,className:"components-color-palette__custom-color-name"},buttonLabelName),(0,react.createElement)(flex_item_component,{as:"span",className:"components-color-palette__custom-color-value"},valueWithoutLeadingHash))}}),(0,react.createElement)(Component,{clearable,clearColor,colors,onChange,value,actions:!!clearable&&(0,react.createElement)(CircularOptionPicker.ButtonAction,{onClick:clearColor},(0,_wordpress_i18n_build_module.__)("Clear"))}))}function useBorderControlDropdown(props){const{border,className,colors,onChange,previousStyleSelection,__next36pxDefaultSize,...otherProps}=useContextSystem(props,"BorderControlDropdown"),[widthValue]=parseQuantityAndUnitFromRawValue(null==border?void 0:border.width),hasZeroWidth=0===widthValue,cx=useCx(),classes=(0,react.useMemo)((()=>cx((0,emotion_react_browser_esm.AH)("background:#fff;&&>button{height:100%;padding:",space(.75),";",rtl({borderRadius:"2px 0 0 2px"},{borderRadius:"0 2px 2px 0"})()," border:",config_values.borderWidth," solid ",COLORS.ui.border,";&:focus,&:hover:not( :disabled ){",focusBoxShadow," border-color:",COLORS.ui.borderFocus,";z-index:1;position:relative;}}",""),className)),[className,cx]),indicatorClassName=(0,react.useMemo)((()=>cx(borderColorIndicator)),[cx]),indicatorWrapperClassName=(0,react.useMemo)((()=>cx(colorIndicatorWrapper(border,__next36pxDefaultSize))),[border,cx,__next36pxDefaultSize]),popoverControlsClassName=(0,react.useMemo)((()=>cx(borderControlPopoverControls)),[cx]),popoverContentClassName=(0,react.useMemo)((()=>cx(borderControlPopoverContent)),[cx]),resetButtonClassName=(0,react.useMemo)((()=>cx(resetButton)),[cx]);return{...otherProps,border,className:classes,colors,indicatorClassName,indicatorWrapperClassName,onColorChange:color=>{const style="none"===(null==border?void 0:border.style)?previousStyleSelection:null==border?void 0:border.style,width=hasZeroWidth&&color?"1px":null==border?void 0:border.width;onChange({color,style,width})},onStyleChange:style=>{const width=hasZeroWidth&&style?"1px":null==border?void 0:border.width;onChange({...border,style,width})},onReset:()=>{onChange({...border,color:void 0,style:void 0})},popoverContentClassName,popoverControlsClassName,resetButtonClassName}}const DropdownContentWrapperDiv=(0,emotion_styled_base_browser_esm.A)("div",{target:"eovvns30"})("margin-left:",space(-2),";margin-right:",space(-2),";&:first-of-type{margin-top:",space(-2),";}&:last-of-type{margin-bottom:",space(-2),";}",(_ref=>{let{paddingSize="small"}=_ref;if("none"===paddingSize)return;const paddingValues={small:space(2),medium:space(4)};return(0,emotion_react_browser_esm.AH)("padding:",paddingValues[paddingSize]||paddingValues.small,";","")}),";");const dropdown_content_wrapper=contextConnect((function UnconnectedDropdownContentWrapper(props,forwardedRef){const{paddingSize="small",...derivedProps}=useContextSystem(props,"DropdownContentWrapper");return(0,react.createElement)(DropdownContentWrapperDiv,(0,helpers_esm_extends.A)({},derivedProps,{paddingSize,ref:forwardedRef}))}),"DropdownContentWrapper"),component_noop=()=>{},ConnectedBorderControlDropdown=contextConnect(((props,forwardedRef)=>{const{__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,border,colors,disableCustomColors,enableAlpha,indicatorClassName,indicatorWrapperClassName,onReset,onColorChange,onStyleChange,popoverContentClassName,popoverControlsClassName,resetButtonClassName,showDropdownHeader,enableStyle=!0,__unstablePopoverProps,...otherProps}=useBorderControlDropdown(props),{color,style}=border||{},colorObject=((colorValue,colors,hasMultipleColorOrigins)=>{if(colorValue&&colors){if(hasMultipleColorOrigins){let matchedColor;return colors.some((origin=>origin.colors.some((color=>color.color===colorValue&&(matchedColor=color,!0))))),matchedColor}return colors.find((color=>color.color===colorValue))}})(color,colors,!!__experimentalHasMultipleOrigins),toggleAriaLabel=((colorValue,colorObject,style,isStyleEnabled)=>isStyleEnabled?colorObject?style?(0,_wordpress_i18n_build_module.nv)('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".',colorObject.name,colorObject.color,style):(0,_wordpress_i18n_build_module.nv)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',colorObject.name,colorObject.color):colorValue?style?(0,_wordpress_i18n_build_module.nv)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',colorValue,style):(0,_wordpress_i18n_build_module.nv)('Border color and style picker. The currently selected color has a value of "%1$s".',colorValue):(0,_wordpress_i18n_build_module.__)("Border color and style picker."):colorObject?(0,_wordpress_i18n_build_module.nv)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',colorObject.name,colorObject.color):colorValue?(0,_wordpress_i18n_build_module.nv)('Border color picker. The currently selected color has a value of "%1$s".',colorValue):(0,_wordpress_i18n_build_module.__)("Border color picker."))(color,colorObject,style,enableStyle),showResetButton=color||style&&"none"!==style,dropdownPosition=__experimentalIsRenderedInSidebar?"bottom left":void 0;return(0,react.createElement)(Dropdown,(0,helpers_esm_extends.A)({renderToggle:_ref=>{let{onToggle=component_noop}=_ref;return(0,react.createElement)(build_module_button,{onClick:onToggle,variant:"tertiary","aria-label":toggleAriaLabel,position:dropdownPosition,label:(0,_wordpress_i18n_build_module.__)("Border color and style picker"),showTooltip:!0},(0,react.createElement)("span",{className:indicatorWrapperClassName},(0,react.createElement)(color_indicator,{className:indicatorClassName,colorValue:color})))},renderContent:_ref2=>{let{onClose}=_ref2;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(dropdown_content_wrapper,{paddingSize:"medium"},(0,react.createElement)(v_stack_component,{className:popoverControlsClassName,spacing:6},showDropdownHeader?(0,react.createElement)(h_stack_component,null,(0,react.createElement)(StyledLabel,null,(0,_wordpress_i18n_build_module.__)("Border color")),(0,react.createElement)(build_module_button,{isSmall:!0,label:(0,_wordpress_i18n_build_module.__)("Close border color"),icon:close_small,onClick:onClose})):void 0,(0,react.createElement)(ColorPalette,{className:popoverContentClassName,value:color,onChange:onColorChange,colors,disableCustomColors,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,clearable:!1,enableAlpha}),enableStyle&&(0,react.createElement)(border_control_style_picker_component,{label:(0,_wordpress_i18n_build_module.__)("Style"),value:style,onChange:onStyleChange}))),showResetButton&&(0,react.createElement)(dropdown_content_wrapper,{paddingSize:"none"},(0,react.createElement)(build_module_button,{className:resetButtonClassName,variant:"tertiary",onClick:()=>{onReset(),onClose()}},(0,_wordpress_i18n_build_module.__)("Reset to default"))))},popoverProps:{...__unstablePopoverProps}},otherProps,{ref:forwardedRef}))}),"BorderControlDropdown"),border_control_dropdown_component=ConnectedBorderControlDropdown;function useBorderControl(props){const{className,isCompact,onChange,shouldSanitizeBorder=!0,value:border,width,__next36pxDefaultSize=!1,...otherProps}=useContextSystem(props,"BorderControl"),[widthValue,originalWidthUnit]=parseQuantityAndUnitFromRawValue(null==border?void 0:border.width),widthUnit=originalWidthUnit||"px",hadPreviousZeroWidth=0===widthValue,[colorSelection,setColorSelection]=(0,react.useState)(),[styleSelection,setStyleSelection]=(0,react.useState)(),onBorderChange=(0,react.useCallback)((newBorder=>{if(shouldSanitizeBorder)return onChange((border=>{const hasNoWidth=void 0===(null==border?void 0:border.width)||""===border.width,hasNoColor=void 0===(null==border?void 0:border.color);if(!hasNoWidth||!hasNoColor)return border})(newBorder));onChange(newBorder)}),[onChange,shouldSanitizeBorder]),onWidthChange=(0,react.useCallback)((newWidth=>{const newWidthValue=""===newWidth?void 0:newWidth,[parsedValue]=parseQuantityAndUnitFromRawValue(newWidth),hasZeroWidth=0===parsedValue,updatedBorder={...border,width:newWidthValue};hasZeroWidth&&!hadPreviousZeroWidth&&(setColorSelection(null==border?void 0:border.color),setStyleSelection(null==border?void 0:border.style),updatedBorder.color=void 0,updatedBorder.style="none"),!hasZeroWidth&&hadPreviousZeroWidth&&(void 0===updatedBorder.color&&(updatedBorder.color=colorSelection),"none"===updatedBorder.style&&(updatedBorder.style=styleSelection)),onBorderChange(updatedBorder)}),[border,hadPreviousZeroWidth,colorSelection,styleSelection,onBorderChange]),onSliderChange=(0,react.useCallback)((value=>{onWidthChange(`${value}${widthUnit}`)}),[onWidthChange,widthUnit]),cx=useCx(),classes=(0,react.useMemo)((()=>cx(borderControl,className)),[className,cx]),wrapperWidth=isCompact?"90px":width,innerWrapperClassName=(0,react.useMemo)((()=>{const widthStyle=!!wrapperWidth&&styles_wrapperWidth,heightStyle=(__next36pxDefaultSize=>(0,emotion_react_browser_esm.AH)("height:",__next36pxDefaultSize?"36px":"30px",";",""))(__next36pxDefaultSize);return cx((0,emotion_react_browser_esm.AH)(unit_control_styles_Root,"{flex:1 1 40%;}&& ",UnitSelect,"{min-height:0;}",""),widthStyle,heightStyle)}),[wrapperWidth,cx,__next36pxDefaultSize]),sliderClassName=(0,react.useMemo)((()=>cx((0,emotion_react_browser_esm.AH)("flex:1 1 60%;",rtl({marginRight:space(3)})()," ",StyledField,"{margin-bottom:0;font-size:0;display:flex;}",""))),[cx]);return{...otherProps,className:classes,innerWrapperClassName,inputWidth:wrapperWidth,onBorderChange,onSliderChange,onWidthChange,previousStyleSelection:styleSelection,sliderClassName,value:border,widthUnit,widthValue,__next36pxDefaultSize}}const BorderLabel=props=>{const{label,hideLabelFromVision}=props;return label?hideLabelFromVision?(0,react.createElement)(visually_hidden_component,{as:"legend"},label):(0,react.createElement)(StyledLabel,{as:"legend"},label):null},BorderControl=contextConnect(((props,forwardedRef)=>{const{colors,disableCustomColors,enableAlpha,enableStyle=!0,hideLabelFromVision,innerWrapperClassName,inputWidth,label,onBorderChange,onSliderChange,onWidthChange,placeholder,__unstablePopoverProps,previousStyleSelection,showDropdownHeader,sliderClassName,value:border,widthUnit,widthValue,withSlider,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize,...otherProps}=useBorderControl(props);return(0,react.createElement)(component,(0,helpers_esm_extends.A)({as:"fieldset"},otherProps,{ref:forwardedRef}),(0,react.createElement)(BorderLabel,{label,hideLabelFromVision}),(0,react.createElement)(h_stack_component,{spacing:3,className:innerWrapperClassName},(0,react.createElement)(unit_control,{prefix:(0,react.createElement)(border_control_dropdown_component,{border,colors,__unstablePopoverProps,disableCustomColors,enableAlpha,enableStyle,onChange:onBorderChange,previousStyleSelection,showDropdownHeader,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize}),label:(0,_wordpress_i18n_build_module.__)("Border width"),hideLabelFromVision:!0,min:0,onChange:onWidthChange,value:(null==border?void 0:border.width)||"",placeholder,__unstableInputWidth:inputWidth}),withSlider&&(0,react.createElement)(range_control,{label:(0,_wordpress_i18n_build_module.__)("Border width"),hideLabelFromVision:!0,className:sliderClassName,initialPosition:0,max:100,min:0,onChange:onSliderChange,step:["px","%"].includes(widthUnit)?1:.1,value:widthValue||void 0,withInputField:!1})))}),"BorderControl"),border_control_component=BorderControl;function useBorderBoxControlSplitControls(props){const{className,...otherProps}=useContextSystem(props,"BorderBoxControlSplitControls"),cx=useCx(),rtlWatchResult=rtl.watch(),classes=(0,react.useMemo)((()=>cx((0,emotion_react_browser_esm.AH)("position:relative;flex:1;",rtl({marginRight:space(3)},{marginLeft:space(3)})(),";",""),className)),[cx,className,rtlWatchResult]);return{...otherProps,centeredClassName:(0,react.useMemo)((()=>cx(CenteredBorderControl,className)),[cx,className]),className:classes,rightAlignedClassName:(0,react.useMemo)((()=>cx((0,emotion_react_browser_esm.AH)(rtl({marginLeft:"auto"},{marginRight:"auto"})(),";",""),className)),[cx,className,rtlWatchResult])}}const ConnectedBorderBoxControlSplitControls=contextConnect(((props,forwardedRef)=>{const{centeredClassName,colors,disableCustomColors,enableAlpha,enableStyle,onChange,popoverPlacement,popoverOffset,rightAlignedClassName,value,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize,...otherProps}=useBorderBoxControlSplitControls(props),containerRef=(0,react.useRef)(),mergedRef=(0,use_merge_refs.A)([containerRef,forwardedRef]),popoverProps=popoverPlacement?{placement:popoverPlacement,offset:popoverOffset,anchorRef:containerRef,__unstableShift:!0}:void 0,sharedBorderControlProps={colors,disableCustomColors,enableAlpha,enableStyle,isCompact:!0,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize};return(0,react.createElement)(grid_component,(0,helpers_esm_extends.A)({},otherProps,{ref:mergedRef,gap:4}),(0,react.createElement)(border_box_control_visualizer_component,{value,__next36pxDefaultSize}),(0,react.createElement)(border_control_component,(0,helpers_esm_extends.A)({className:centeredClassName,hideLabelFromVision:!0,label:(0,_wordpress_i18n_build_module.__)("Top border"),onChange:newBorder=>onChange(newBorder,"top"),__unstablePopoverProps:popoverProps,value:null==value?void 0:value.top},sharedBorderControlProps)),(0,react.createElement)(border_control_component,(0,helpers_esm_extends.A)({hideLabelFromVision:!0,label:(0,_wordpress_i18n_build_module.__)("Left border"),onChange:newBorder=>onChange(newBorder,"left"),__unstablePopoverProps:popoverProps,value:null==value?void 0:value.left},sharedBorderControlProps)),(0,react.createElement)(border_control_component,(0,helpers_esm_extends.A)({className:rightAlignedClassName,hideLabelFromVision:!0,label:(0,_wordpress_i18n_build_module.__)("Right border"),onChange:newBorder=>onChange(newBorder,"right"),__unstablePopoverProps:popoverProps,value:null==value?void 0:value.right},sharedBorderControlProps)),(0,react.createElement)(border_control_component,(0,helpers_esm_extends.A)({className:centeredClassName,hideLabelFromVision:!0,label:(0,_wordpress_i18n_build_module.__)("Bottom border"),onChange:newBorder=>onChange(newBorder,"bottom"),__unstablePopoverProps:popoverProps,value:null==value?void 0:value.bottom},sharedBorderControlProps)))}),"BorderBoxControlSplitControls"),border_box_control_split_controls_component=ConnectedBorderBoxControlSplitControls;function useBorderBoxControl(props){const{className,onChange,value,...otherProps}=useContextSystem(props,"BorderBoxControl"),mixedBorders=hasMixedBorders(value),splitBorders=hasSplitBorders(value),linkedValue=splitBorders?(borders=>{if(!borders)return;const colors=[],styles=[],widths=[];sides.forEach((side=>{var _borders$side,_borders$side2,_borders$side3;colors.push(null===(_borders$side=borders[side])||void 0===_borders$side?void 0:_borders$side.color),styles.push(null===(_borders$side2=borders[side])||void 0===_borders$side2?void 0:_borders$side2.style),widths.push(null===(_borders$side3=borders[side])||void 0===_borders$side3?void 0:_borders$side3.width)}));const allColorsMatch=colors.every((value=>value===colors[0])),allStylesMatch=styles.every((value=>value===styles[0])),allWidthsMatch=widths.every((value=>value===widths[0]));return{color:allColorsMatch?colors[0]:void 0,style:allStylesMatch?styles[0]:void 0,width:allWidthsMatch?widths[0]:void 0}})(value):value,splitValue=splitBorders?value:(border=>{if(border&&!isEmptyBorder(border))return{top:border,right:border,bottom:border,left:border}})(value),[isLinked,setIsLinked]=(0,react.useState)(!mixedBorders),cx=useCx(),classes=(0,react.useMemo)((()=>cx(BorderBoxControl,className)),[cx,className]),linkedControlClassName=(0,react.useMemo)((()=>cx(LinkedBorderControl)),[cx]);return{...otherProps,className:classes,hasMixedBorders:mixedBorders,isLinked,linkedControlClassName,onLinkedChange:newBorder=>{if(!newBorder)return onChange(void 0);if(!mixedBorders||(border=>!!border&&borderProps.every((prop=>void 0!==border[prop])))(newBorder))return onChange(isEmptyBorder(newBorder)?void 0:newBorder);const changes=((original,updated)=>{const diff={};return original.color!==updated.color&&(diff.color=updated.color),original.style!==updated.style&&(diff.style=updated.style),original.width!==updated.width&&(diff.width=updated.width),diff})(linkedValue,newBorder),updatedBorders={top:{...null==value?void 0:value.top,...changes},right:{...null==value?void 0:value.right,...changes},bottom:{...null==value?void 0:value.bottom,...changes},left:{...null==value?void 0:value.left,...changes}};if(hasMixedBorders(updatedBorders))return onChange(updatedBorders);const filteredResult=isEmptyBorder(updatedBorders.top)?void 0:updatedBorders.top;onChange(filteredResult)},onSplitChange:(newBorder,side)=>{const updatedBorders={...splitValue,[side]:newBorder};hasMixedBorders(updatedBorders)?onChange(updatedBorders):onChange(newBorder)},toggleLinked:()=>setIsLinked(!isLinked),linkedValue,splitValue}}const component_BorderLabel=props=>{const{label,hideLabelFromVision}=props;return label?hideLabelFromVision?(0,react.createElement)(visually_hidden_component,{as:"label"},label):(0,react.createElement)(StyledLabel,null,label):null},ConnectedBorderBoxControl=contextConnect(((props,forwardedRef)=>{const{className,colors,disableCustomColors,enableAlpha,enableStyle,hasMixedBorders,hideLabelFromVision,isLinked,label,linkedControlClassName,linkedValue,onLinkedChange,onSplitChange,popoverPlacement,popoverOffset,splitValue,toggleLinked,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize=!1,...otherProps}=useBorderBoxControl(props),containerRef=(0,react.useRef)(),mergedRef=(0,use_merge_refs.A)([containerRef,forwardedRef]),popoverProps=popoverPlacement?{placement:popoverPlacement,offset:popoverOffset,anchorRef:containerRef,__unstableShift:!0}:void 0;return(0,react.createElement)(component,(0,helpers_esm_extends.A)({className},otherProps,{ref:mergedRef}),(0,react.createElement)(component_BorderLabel,{label,hideLabelFromVision}),(0,react.createElement)(h_stack_component,{alignment:"start",expanded:!0,spacing:0},isLinked?(0,react.createElement)(border_control_component,{className:linkedControlClassName,colors,disableCustomColors,enableAlpha,enableStyle,onChange:onLinkedChange,placeholder:hasMixedBorders?(0,_wordpress_i18n_build_module.__)("Mixed"):void 0,__unstablePopoverProps:popoverProps,shouldSanitizeBorder:!1,value:linkedValue,withSlider:!0,width:"110px",__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize}):(0,react.createElement)(border_box_control_split_controls_component,{colors,disableCustomColors,enableAlpha,enableStyle,onChange:onSplitChange,popoverPlacement,popoverOffset,value:splitValue,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,__next36pxDefaultSize}),(0,react.createElement)(border_box_control_linked_button_component,{onClick:toggleLinked,isLinked,__next36pxDefaultSize})))}),"BorderBoxControl"),border_box_control_component=ConnectedBorderBoxControl;function border_radius_control_utils_mode(inputArray){return[...inputArray].sort(((a,b)=>inputArray.filter((v=>v===b)).length-inputArray.filter((v=>v===a)).length)).shift()}function getAllUnit(){let selectedUnits=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat,...cornerUnits}=selectedUnits;return flat||border_radius_control_utils_mode(Object.values(cornerUnits).filter(Boolean))||"px"}function utils_getAllValue(){let values=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof values)return values;const parsedQuantitiesAndUnits=Object.values(values).map((value=>parseQuantityAndUnitFromRawValue(value))),allValues=parsedQuantitiesAndUnits.map((value=>{var _value$;return null!==(_value$=value[0])&&void 0!==_value$?_value$:""})),allUnits=parsedQuantitiesAndUnits.map((value=>value[1])),value=allValues.every((v=>v===allValues[0]))?allValues[0]:"",unit=border_radius_control_utils_mode(allUnits);return 0===value||value?`${value}${unit}`:void 0}function hasMixedValues(){let values=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const allValue=utils_getAllValue(values);return"string"!=typeof values&&isNaN(parseFloat(allValue))}function hasDefinedValues(values){if(!values)return!1;if("string"==typeof values)return!0;return!!Object.values(values).filter((value=>!!value||0===value)).length}function border_radius_control_all_input_control_AllInputControl(_ref){let{onChange,selectedUnits,setSelectedUnits,values,...props}=_ref,allValue=utils_getAllValue(values);void 0===allValue&&(allValue=getAllUnit(selectedUnits));const isMixed=hasDefinedValues(values)&&hasMixedValues(values),allPlaceholder=isMixed?(0,i18n_build_module.__)("Mixed"):null;return(0,react.createElement)(unit_control,(0,esm_extends.A)({},props,{"aria-label":(0,i18n_build_module.__)("Border radius"),disableUnits:isMixed,isOnly:!0,value:allValue,onChange:next=>{const isNumeric=!isNaN(parseFloat(next));onChange(isNumeric?next:void 0)},onUnitChange:unit=>{setSelectedUnits({topLeft:unit,topRight:unit,bottomLeft:unit,bottomRight:unit})},placeholder:allPlaceholder}))}const CORNERS={topLeft:(0,i18n_build_module.__)("Top left"),topRight:(0,i18n_build_module.__)("Top right"),bottomLeft:(0,i18n_build_module.__)("Bottom left"),bottomRight:(0,i18n_build_module.__)("Bottom right")};function border_radius_control_input_controls_BoxInputControls(_ref){let{onChange,selectedUnits,setSelectedUnits,values:valuesProp,...props}=_ref;const createHandleOnChange=corner=>next=>{if(!onChange)return;const nextValue=!isNaN(parseFloat(next))?next:void 0;onChange({...values,[corner]:nextValue})},values="string"!=typeof valuesProp?valuesProp:{topLeft:valuesProp,topRight:valuesProp,bottomLeft:valuesProp,bottomRight:valuesProp};return(0,react.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(CORNERS).map((_ref2=>{let[corner,label]=_ref2;const[parsedQuantity,parsedUnit]=parseQuantityAndUnitFromRawValue(values[corner]),computedUnit=values[corner]?parsedUnit:selectedUnits[corner]||selectedUnits.flat;return(0,react.createElement)(tooltip,{text:label,position:"top",key:corner},(0,react.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,react.createElement)(unit_control,(0,esm_extends.A)({},props,{"aria-label":label,value:[parsedQuantity,computedUnit].join(""),onChange:createHandleOnChange(corner),onUnitChange:(side=corner,next=>{const newUnits={...selectedUnits};newUnits[side]=next,setSelectedUnits(newUnits)})}))));var side})))}function border_radius_control_linked_button_LinkedButton(_ref){let{isLinked,...props}=_ref;const label=isLinked?(0,i18n_build_module.__)("Unlink Radii"):(0,i18n_build_module.__)("Link Radii");return(0,react.createElement)(tooltip,{text:label},(0,react.createElement)(build_module_button,(0,esm_extends.A)({},props,{className:"component-border-radius-control__linked-button",isPrimary:isLinked,isSecondary:!isLinked,isSmall:!0,icon:isLinked?library_link:link_off,iconSize:16,"aria-label":label})))}const border_radius_control_DEFAULT_VALUES={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},MIN_BORDER_RADIUS_VALUE=0,MAX_BORDER_RADIUS_VALUES={px:100,em:20,rem:20};function BorderRadiusControl(_ref){let{onChange,values}=_ref;const[isLinked,setIsLinked]=(0,react.useState)(!hasDefinedValues(values)||!hasMixedValues(values)),[selectedUnits,setSelectedUnits]=(0,react.useState)({flat:"string"==typeof values?parseQuantityAndUnitFromRawValue(values)[1]:void 0,topLeft:parseQuantityAndUnitFromRawValue(null==values?void 0:values.topLeft)[1],topRight:parseQuantityAndUnitFromRawValue(null==values?void 0:values.topRight)[1],bottomLeft:parseQuantityAndUnitFromRawValue(null==values?void 0:values.bottomLeft)[1],bottomRight:parseQuantityAndUnitFromRawValue(null==values?void 0:values.bottomRight)[1]}),units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["px","em","rem"]}),unit=getAllUnit(selectedUnits),unitConfig=units&&units.find((item=>item.value===unit)),step=(null==unitConfig?void 0:unitConfig.step)||1,[allValue]=parseQuantityAndUnitFromRawValue(utils_getAllValue(values));return(0,react.createElement)("fieldset",{className:"components-border-radius-control"},(0,react.createElement)(base_control.VisualLabel,{as:"legend"},(0,i18n_build_module.__)("Radius")),(0,react.createElement)("div",{className:"components-border-radius-control__wrapper"},isLinked?(0,react.createElement)(react.Fragment,null,(0,react.createElement)(border_radius_control_all_input_control_AllInputControl,{className:"components-border-radius-control__unit-control",values,min:MIN_BORDER_RADIUS_VALUE,onChange,selectedUnits,setSelectedUnits,units}),(0,react.createElement)(range_control,{label:(0,i18n_build_module.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=allValue?allValue:"",min:MIN_BORDER_RADIUS_VALUE,max:MAX_BORDER_RADIUS_VALUES[unit],initialPosition:0,withInputField:!1,onChange:next=>{onChange(void 0!==next?`${next}${unit}`:void 0)},step})):(0,react.createElement)(border_radius_control_input_controls_BoxInputControls,{min:MIN_BORDER_RADIUS_VALUE,onChange,selectedUnits,setSelectedUnits,values:values||border_radius_control_DEFAULT_VALUES,units}),(0,react.createElement)(border_radius_control_linked_button_LinkedButton,{onClick:()=>setIsLinked(!isLinked),isLinked})))}function BorderRadiusEdit(props){var _style$border;const{attributes:{style},setAttributes}=props;return(0,react.createElement)(BorderRadiusControl,{values:null==style||null===(_style$border=style.border)||void 0===_style$border?void 0:_style$border.radius,onChange:newRadius=>{const newStyle=cleanEmptyObject({...style,border:{...null==style?void 0:style.border,radius:newRadius}});setAttributes({style:newStyle})}})}(0,node_modules_colord.X$)([names.A,a11y.A]);const utils_getColorObjectByAttributeValues=(colors,definedColor,customColor)=>{if(definedColor){const colorObj=(0,lodash.find)(colors,{slug:definedColor});if(colorObj)return colorObj}return{color:customColor}},getColorObjectByColorValue=(colors,colorValue)=>(0,lodash.find)(colors,{color:colorValue});function utils_getColorClassName(colorContextName,colorSlug){if(colorContextName&&colorSlug)return`has-${(0,lodash.kebabCase)(colorSlug)}-${colorContextName}`}function use_multiple_origin_colors_and_gradients_useMultipleOriginColorsAndGradients(){const colorGradientSettings=function useCommonSingleMultipleSelects(){return{disableCustomColors:!use_setting_useSetting("color.custom"),disableCustomGradients:!use_setting_useSetting("color.customGradient")}}(),customColors=use_setting_useSetting("color.palette.custom"),themeColors=use_setting_useSetting("color.palette.theme"),defaultColors=use_setting_useSetting("color.palette.default"),shouldDisplayDefaultColors=use_setting_useSetting("color.defaultPalette");colorGradientSettings.colors=(0,react.useMemo)((()=>{const result=[];return themeColors&&themeColors.length&&result.push({name:(0,i18n_build_module._x)("Theme","Indicates this palette comes from the theme."),colors:themeColors}),shouldDisplayDefaultColors&&defaultColors&&defaultColors.length&&result.push({name:(0,i18n_build_module._x)("Default","Indicates this palette comes from WordPress."),colors:defaultColors}),customColors&&customColors.length&&result.push({name:(0,i18n_build_module._x)("Custom","Indicates this palette comes from the theme."),colors:customColors}),result}),[defaultColors,themeColors,customColors]);const customGradients=use_setting_useSetting("color.gradients.custom"),themeGradients=use_setting_useSetting("color.gradients.theme"),defaultGradients=use_setting_useSetting("color.gradients.default"),shouldDisplayDefaultGradients=use_setting_useSetting("color.defaultGradients");return colorGradientSettings.gradients=(0,react.useMemo)((()=>{const result=[];return themeGradients&&themeGradients.length&&result.push({name:(0,i18n_build_module._x)("Theme","Indicates this palette comes from the theme."),gradients:themeGradients}),shouldDisplayDefaultGradients&&defaultGradients&&defaultGradients.length&&result.push({name:(0,i18n_build_module._x)("Default","Indicates this palette comes from WordPress."),gradients:defaultGradients}),customGradients&&customGradients.length&&result.push({name:(0,i18n_build_module._x)("Custom","Indicates this palette is created by the user."),gradients:customGradients}),result}),[customGradients,themeGradients,defaultGradients]),colorGradientSettings}const BORDER_SUPPORT_KEY="__experimentalBorder",borderSides=["top","right","bottom","left"],hasBorderValue=props=>{const{borderColor,style}=props.attributes;return(border=>{if(!border)return!1;if(hasSplitBorders(border))return!sides.every((side=>isEmptyBorder(border[side])));return!isEmptyBorder(border)})(null==style?void 0:style.border)||!!borderColor},resetBorderFilter=newAttributes=>{var _newAttributes$style,_newAttributes$style$;return{...newAttributes,borderColor:void 0,style:{...newAttributes.style,border:{radius:null===(_newAttributes$style=newAttributes.style)||void 0===_newAttributes$style||null===(_newAttributes$style$=_newAttributes$style.border)||void 0===_newAttributes$style$?void 0:_newAttributes$style$.radius}}}},getColorByProperty=(colors,property,value)=>{let matchedColor;return colors.some((origin=>origin.colors.some((color=>color[property]===value&&(matchedColor=color,!0))))),matchedColor},border_getMultiOriginColor=_ref2=>{let{colors,namedColor,customColor}=_ref2;if(namedColor){const colorObject=getColorByProperty(colors,"slug",namedColor);if(colorObject)return colorObject}if(!customColor)return{color:void 0};const colorObject=getColorByProperty(colors,"color",customColor);return colorObject||{color:customColor}};function getColorSlugFromVariable(value){const namedColor=/var:preset\|color\|(.+)/.exec(value);return namedColor&&namedColor[1]?namedColor[1]:null}function BorderPanel(props){const{attributes,clientId,setAttributes}=props,{style}=attributes,{colors}=use_multiple_origin_colors_and_gradients_useMultipleOriginColorsAndGradients(),isSupported=hasBorderSupport(props.name),isColorSupported=use_setting_useSetting("border.color")&&hasBorderSupport(props.name,"color"),isRadiusSupported=use_setting_useSetting("border.radius")&&hasBorderSupport(props.name,"radius"),isStyleSupported=use_setting_useSetting("border.style")&&hasBorderSupport(props.name,"style"),isWidthSupported=use_setting_useSetting("border.width")&&hasBorderSupport(props.name,"width");if([!isColorSupported,!isRadiusSupported,!isStyleSupported,!isWidthSupported].every(Boolean)||!isSupported)return null;const defaultBorderControls=(0,build_module.bI)(props.name,[BORDER_SUPPORT_KEY,"__experimentalDefaultControls"]),showBorderByDefault=(null==defaultBorderControls?void 0:defaultBorderControls.color)||(null==defaultBorderControls?void 0:defaultBorderControls.width),hydratedBorder=((attributes,colors)=>{const{borderColor,style}=attributes,{border:borderStyles}=style||{};if(borderColor){const{color}=border_getMultiOriginColor({colors,namedColor:borderColor});return color?{...borderStyles,color}:borderStyles}if(!borderStyles)return borderStyles;const hydratedBorderStyles={...borderStyles};return borderSides.forEach((side=>{var _hydratedBorderStyles;const colorSlug=getColorSlugFromVariable(null===(_hydratedBorderStyles=hydratedBorderStyles[side])||void 0===_hydratedBorderStyles?void 0:_hydratedBorderStyles.color);if(colorSlug){const{color}=border_getMultiOriginColor({colors,namedColor:colorSlug});hydratedBorderStyles[side]={...hydratedBorderStyles[side],color}}})),hydratedBorderStyles})(attributes,colors);return(0,react.createElement)(inspector_controls,{__experimentalGroup:"border"},(isWidthSupported||isColorSupported)&&(0,react.createElement)(tools_panel_item_component,{hasValue:()=>hasBorderValue(props),label:(0,i18n_build_module.__)("Border"),onDeselect:()=>(_ref=>{var _style$border;let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({borderColor:void 0,style:{...style,border:cleanEmptyObject({radius:null==style||null===(_style$border=style.border)||void 0===_style$border?void 0:_style$border.radius})}})})(props),isShownByDefault:showBorderByDefault,resetAllFilter:resetBorderFilter,panelId:clientId},(0,react.createElement)(border_box_control_component,{colors,enableAlpha:!0,enableStyle:isStyleSupported,onChange:newBorder=>{var _style$border2;let newBorderColor,newBorderStyles={...newBorder};if(hasSplitBorders(newBorder))newBorderStyles={top:{...newBorder.top},right:{...newBorder.right},bottom:{...newBorder.bottom},left:{...newBorder.left}},borderSides.forEach((side=>{var _newBorder$side;if(null!==(_newBorder$side=newBorder[side])&&void 0!==_newBorder$side&&_newBorder$side.color){var _newBorder$side2;const colorObject=border_getMultiOriginColor({colors,customColor:null===(_newBorder$side2=newBorder[side])||void 0===_newBorder$side2?void 0:_newBorder$side2.color});colorObject.slug&&(newBorderStyles[side].color=`var:preset|color|${colorObject.slug}`)}}));else if(null!=newBorder&&newBorder.color){const customColor=null==newBorder?void 0:newBorder.color,colorObject=border_getMultiOriginColor({colors,customColor});colorObject.slug&&(newBorderColor=colorObject.slug,newBorderStyles.color=void 0)}const newStyle=cleanEmptyObject({...style,border:{radius:null==style||null===(_style$border2=style.border)||void 0===_style$border2?void 0:_style$border2.radius,...newBorderStyles}});setAttributes({style:newStyle,borderColor:newBorderColor})},popoverOffset:40,popoverPlacement:"left-start",value:hydratedBorder,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0})),isRadiusSupported&&(0,react.createElement)(tools_panel_item_component,{hasValue:()=>function hasBorderRadiusValue(props){var _props$attributes$sty,_props$attributes$sty2;const borderRadius=null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.border)||void 0===_props$attributes$sty2?void 0:_props$attributes$sty2.radius;return"object"==typeof borderRadius?Object.entries(borderRadius).some(Boolean):!!borderRadius}(props),label:(0,i18n_build_module.__)("Radius"),onDeselect:()=>function resetBorderRadius(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:removeBorderAttribute(style,"radius")})}(props),isShownByDefault:null==defaultBorderControls?void 0:defaultBorderControls.radius,resetAllFilter:newAttributes=>{var _newAttributes$style2;return{...newAttributes,style:{...newAttributes.style,border:{...null===(_newAttributes$style2=newAttributes.style)||void 0===_newAttributes$style2?void 0:_newAttributes$style2.border,radius:void 0}}}},panelId:clientId},(0,react.createElement)(BorderRadiusEdit,props)))}function hasBorderSupport(blockName){let feature=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==platform.OS)return!1;const support=(0,build_module.bI)(blockName,BORDER_SUPPORT_KEY);return!0===support||("any"===feature?!!(null!=support&&support.color||null!=support&&support.radius||null!=support&&support.width||null!=support&&support.style):!(null==support||!support[feature]))}function removeBorderAttribute(style,attribute){return cleanEmptyObject({...style,border:{...null==style?void 0:style.border,[attribute]:void 0}})}function border_addSaveProps(props,blockType,attributes){if(!hasBorderSupport(blockType,"color")||shouldSkipSerialization(blockType,BORDER_SUPPORT_KEY,"color"))return props;const borderClasses=function border_getBorderClasses(attributes){var _style$border3;const{borderColor,style}=attributes,borderColorClass=utils_getColorClassName("border-color",borderColor);return classnames_default()({"has-border-color":borderColor||(null==style||null===(_style$border3=style.border)||void 0===_style$border3?void 0:_style$border3.color),[borderColorClass]:!!borderColorClass})}(attributes),newClassName=classnames_default()(props.className,borderClasses);return props.className=newClassName||void 0,props}const withBorderColorPaletteStyles=(0,create_higher_order_component.f)((BlockListBlock=>props=>{var _style$border4,_style$border4$top,_style$border5,_style$border5$right,_style$border6,_style$border6$bottom,_style$border7,_style$border7$left,_props$wrapperProps;const{name,attributes}=props,{borderColor,style}=attributes,{colors}=use_multiple_origin_colors_and_gradients_useMultipleOriginColorsAndGradients();if(!hasBorderSupport(name,"color")||shouldSkipSerialization(name,BORDER_SUPPORT_KEY,"color"))return(0,react.createElement)(BlockListBlock,props);const{color:borderColorValue}=border_getMultiOriginColor({colors,namedColor:borderColor}),{color:borderTopColor}=border_getMultiOriginColor({colors,namedColor:getColorSlugFromVariable(null==style||null===(_style$border4=style.border)||void 0===_style$border4||null===(_style$border4$top=_style$border4.top)||void 0===_style$border4$top?void 0:_style$border4$top.color)}),{color:borderRightColor}=border_getMultiOriginColor({colors,namedColor:getColorSlugFromVariable(null==style||null===(_style$border5=style.border)||void 0===_style$border5||null===(_style$border5$right=_style$border5.right)||void 0===_style$border5$right?void 0:_style$border5$right.color)}),{color:borderBottomColor}=border_getMultiOriginColor({colors,namedColor:getColorSlugFromVariable(null==style||null===(_style$border6=style.border)||void 0===_style$border6||null===(_style$border6$bottom=_style$border6.bottom)||void 0===_style$border6$bottom?void 0:_style$border6$bottom.color)}),{color:borderLeftColor}=border_getMultiOriginColor({colors,namedColor:getColorSlugFromVariable(null==style||null===(_style$border7=style.border)||void 0===_style$border7||null===(_style$border7$left=_style$border7.left)||void 0===_style$border7$left?void 0:_style$border7$left.color)}),extraStyles={borderTopColor:borderTopColor||borderColorValue,borderRightColor:borderRightColor||borderColorValue,borderBottomColor:borderBottomColor||borderColorValue,borderLeftColor:borderLeftColor||borderColorValue};let wrapperProps=props.wrapperProps;return wrapperProps={...props.wrapperProps,style:{...null===(_props$wrapperProps=props.wrapperProps)||void 0===_props$wrapperProps?void 0:_props$wrapperProps.style,...extraStyles}},(0,react.createElement)(BlockListBlock,(0,esm_extends.A)({},props,{wrapperProps}))}));function use_gradient_experimentalGetGradientClass(gradientSlug){if(gradientSlug)return`has-${gradientSlug}-gradient-background`}function use_gradient_getGradientValueBySlug(gradients,slug){const gradient=(0,lodash.find)(gradients,["slug",slug]);return gradient&&gradient.gradient}function getGradientSlugByValue(gradients,value){const gradient=function __experimentalGetGradientObjectByGradientValue(gradients,value){return(0,lodash.find)(gradients,["gradient",value])}(gradients,value);return gradient&&gradient.slug}(0,hooks_build_module.U2)("blocks.registerBlockType","core/border/addAttributes",(function addAttributes(settings){return hasBorderSupport(settings,"color")?settings.attributes.borderColor?settings:{...settings,attributes:{...settings.attributes,borderColor:{type:"string"}}}:settings})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/border/addSaveProps",border_addSaveProps),(0,hooks_build_module.U2)("blocks.registerBlockType","core/border/addEditProps",(function addEditProps(settings){if(!hasBorderSupport(settings,"color")||shouldSkipSerialization(settings,BORDER_SUPPORT_KEY,"color"))return settings;const existingGetEditWrapperProps=settings.getEditWrapperProps;return settings.getEditWrapperProps=attributes=>{let props={};return existingGetEditWrapperProps&&(props=existingGetEditWrapperProps(attributes)),border_addSaveProps(props,settings,attributes)},settings})),(0,hooks_build_module.U2)("editor.BlockListBlock","core/border/with-border-color-palette-styles",withBorderColorPaletteStyles);const deprecatedBottomMargin=_ref=>{let{__nextHasNoMarginBottom}=_ref;return __nextHasNoMarginBottom?"":(0,emotion_react_browser_esm.AH)("margin-bottom:",space(2),";","")},angle_picker_control_styles_Root=(0,emotion_styled_base_browser_esm.A)(flex_component,{target:"e65ony43"})(deprecatedBottomMargin,";"),CircleRoot=(0,emotion_styled_base_browser_esm.A)("div",{target:"e65ony42"})("border-radius:50%;border:",config_values.borderWidth," solid ",COLORS.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;"),CircleIndicatorWrapper=(0,emotion_styled_base_browser_esm.A)("div",{target:"e65ony41"})({name:"1bhd2sw",styles:"box-sizing:border-box;position:relative;width:100%;height:100%"}),CircleIndicator=(0,emotion_styled_base_browser_esm.A)("div",{target:"e65ony40"})("background:",COLORS.ui.theme,";border-radius:50%;border:",3,"px solid ",COLORS.ui.theme,";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-",16,"px;width:0px;");const angle_circle=function AngleCircle(_ref){let{value,onChange,...props}=_ref;const angleCircleRef=(0,react.useRef)(),angleCircleCenter=(0,react.useRef)(),previousCursorValue=(0,react.useRef)(),changeAngleToPosition=event=>{const{x:centerX,y:centerY}=angleCircleCenter.current;event.preventDefault(),event.target.focus(),onChange(function getAngle(centerX,centerY,pointX,pointY){const y=pointY-centerY,x=pointX-centerX,angleInRadians=Math.atan2(y,x),angleInDeg=Math.round(angleInRadians*(180/Math.PI))+90;if(angleInDeg<0)return 360+angleInDeg;return angleInDeg}(centerX,centerY,event.clientX,event.clientY))},{startDrag,isDragging}=function useDragging(_ref){let{onDragStart,onDragMove,onDragEnd}=_ref;const[isDragging,setIsDragging]=(0,react.useState)(!1),eventsRef=(0,react.useRef)({onDragStart,onDragMove,onDragEnd});(0,use_isomorphic_layout_effect.A)((()=>{eventsRef.current.onDragStart=onDragStart,eventsRef.current.onDragMove=onDragMove,eventsRef.current.onDragEnd=onDragEnd}),[onDragStart,onDragMove,onDragEnd]);const onMouseMove=(0,react.useCallback)((event=>eventsRef.current.onDragMove&&eventsRef.current.onDragMove(event)),[]),endDrag=(0,react.useCallback)((event=>{eventsRef.current.onDragEnd&&eventsRef.current.onDragEnd(event),document.removeEventListener("mousemove",onMouseMove),document.removeEventListener("mouseup",endDrag),setIsDragging(!1)}),[]),startDrag=(0,react.useCallback)((event=>{eventsRef.current.onDragStart&&eventsRef.current.onDragStart(event),document.addEventListener("mousemove",onMouseMove),document.addEventListener("mouseup",endDrag),setIsDragging(!0)}),[]);return(0,react.useEffect)((()=>()=>{isDragging&&(document.removeEventListener("mousemove",onMouseMove),document.removeEventListener("mouseup",endDrag))}),[isDragging]),{startDrag,endDrag,isDragging}}({onDragStart:event=>{(()=>{const rect=angleCircleRef.current.getBoundingClientRect();angleCircleCenter.current={x:rect.x+rect.width/2,y:rect.y+rect.height/2}})(),changeAngleToPosition(event)},onDragMove:changeAngleToPosition,onDragEnd:changeAngleToPosition});return(0,react.useEffect)((()=>{isDragging?(void 0===previousCursorValue.current&&(previousCursorValue.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=previousCursorValue.current||null,previousCursorValue.current=void 0)}),[isDragging]),(0,react.createElement)(CircleRoot,(0,helpers_esm_extends.A)({ref:angleCircleRef,onMouseDown:startDrag,className:"components-angle-picker-control__angle-circle",style:isDragging?{cursor:"grabbing"}:void 0},props),(0,react.createElement)(CircleIndicatorWrapper,{style:value?{transform:`rotate(${value}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,react.createElement)(CircleIndicator,{className:"components-angle-picker-control__angle-circle-indicator"})))};function AnglePickerControl(_ref){let{__nextHasNoMarginBottom=!1,className,label=(0,_wordpress_i18n_build_module.__)("Angle"),onChange,value}=_ref;const classes=classnames_default()("components-angle-picker-control",className);return(0,react.createElement)(angle_picker_control_styles_Root,{__nextHasNoMarginBottom,className:classes,gap:4},(0,react.createElement)(flex_block_component,null,(0,react.createElement)(number_control,{label,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:unprocessedValue=>{const inputValue=""!==unprocessedValue?parseInt(unprocessedValue,10):0;onChange(inputValue)},size:"__unstable-large",step:"1",value,hideHTMLArrows:!0,suffix:(0,react.createElement)(spacer_component,{as:text_component,marginBottom:0,marginRight:space(3),style:{color:"var( --wp-admin-theme-color )"}},"°")})),(0,react.createElement)(flex_item_component,{style:{marginBottom:space(1),marginTop:"auto"}},(0,react.createElement)(angle_circle,{"aria-hidden":"true",value,onChange})))}const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT=10,MINIMUM_DISTANCE_BETWEEN_POINTS=0,KEYBOARD_CONTROL_POINT_VARIATION=MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;function clampPercent(value){return Math.max(0,Math.min(100,value))}function updateControlPoint(points,index,newPoint){const newValue=points.slice();return newValue[index]=newPoint,newValue}function updateControlPointPosition(points,index,newPosition){if(function isOverlapping(value,initialIndex,newPosition){let minDistance=arguments.length>3&&void 0!==arguments[3]?arguments[3]:MINIMUM_DISTANCE_BETWEEN_POINTS;const initialPosition=value[initialIndex].position,minPosition=Math.min(initialPosition,newPosition),maxPosition=Math.max(initialPosition,newPosition);return value.some(((_ref,index)=>{let{position}=_ref;return index!==initialIndex&&(Math.abs(position-newPosition)<minDistance||minPosition<position&&position<maxPosition)}))}(points,index,newPosition))return points;return updateControlPoint(points,index,{...points[index],position:newPosition})}function updateControlPointColor(points,index,newColor){return updateControlPoint(points,index,{...points[index],color:newColor})}function getHorizontalRelativeGradientPosition(mouseXCoordinate,containerElement){if(!containerElement)return;const{x,width}=containerElement.getBoundingClientRect(),absolutePositionValue=mouseXCoordinate-x;return Math.round(clampPercent(100*absolutePositionValue/width))}function ControlPointButton(_ref){let{isOpen,position,color,...additionalProps}=_ref;const descriptionId=`components-custom-gradient-picker__control-point-button-description-${(0,use_instance_id.A)(ControlPointButton)}`;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(build_module_button,(0,helpers_esm_extends.A)({"aria-label":(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Gradient control point at position %1$s%% with color code %2$s."),position,color),"aria-describedby":descriptionId,"aria-haspopup":"true","aria-expanded":isOpen,className:classnames_default()("components-custom-gradient-picker__control-point-button",{"is-active":isOpen})},additionalProps)),(0,react.createElement)(visually_hidden_component,{id:descriptionId},(0,_wordpress_i18n_build_module.__)("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 GradientColorPickerDropdown(_ref2){let{isRenderedInSidebar,className,...props}=_ref2;const popoverProps=(0,react.useMemo)((()=>({placement:"bottom",offset:8})),[]),mergedClassName=classnames_default()("components-custom-gradient-picker__control-point-dropdown",className);return(0,react.createElement)(CustomColorPickerDropdown,(0,helpers_esm_extends.A)({isRenderedInSidebar,popoverProps,className:mergedClassName},props))}function ControlPoints(_ref3){let{disableRemove,disableAlpha,gradientPickerDomRef,ignoreMarkerPosition,value:controlPoints,onChange,onStartControlPointChange,onStopControlPointChange,__experimentalIsRenderedInSidebar}=_ref3;const controlPointMoveState=(0,react.useRef)(),onMouseMove=event=>{const relativePosition=getHorizontalRelativeGradientPosition(event.clientX,gradientPickerDomRef.current),{initialPosition,index,significantMoveHappened}=controlPointMoveState.current;!significantMoveHappened&&Math.abs(initialPosition-relativePosition)>=5&&(controlPointMoveState.current.significantMoveHappened=!0),onChange(updateControlPointPosition(controlPoints,index,relativePosition))},cleanEventListeners=()=>{window&&window.removeEventListener&&controlPointMoveState.current&&controlPointMoveState.current.listenersActivated&&(window.removeEventListener("mousemove",onMouseMove),window.removeEventListener("mouseup",cleanEventListeners),onStopControlPointChange(),controlPointMoveState.current.listenersActivated=!1)},cleanEventListenersRef=(0,react.useRef)();return cleanEventListenersRef.current=cleanEventListeners,(0,react.useEffect)((()=>()=>{cleanEventListenersRef.current()}),[]),controlPoints.map(((point,index)=>{const initialPosition=null==point?void 0:point.position;return ignoreMarkerPosition!==initialPosition&&(0,react.createElement)(GradientColorPickerDropdown,{isRenderedInSidebar:__experimentalIsRenderedInSidebar,key:index,onClose:onStopControlPointChange,renderToggle:_ref4=>{let{isOpen,onToggle}=_ref4;return(0,react.createElement)(ControlPointButton,{key:index,onClick:()=>{controlPointMoveState.current&&controlPointMoveState.current.significantMoveHappened||(isOpen?onStopControlPointChange():onStartControlPointChange(),onToggle())},onMouseDown:()=>{window&&window.addEventListener&&(controlPointMoveState.current={initialPosition,index,significantMoveHappened:!1,listenersActivated:!0},onStartControlPointChange(),window.addEventListener("mousemove",onMouseMove),window.addEventListener("mouseup",cleanEventListeners))},onKeyDown:event=>{"ArrowLeft"===event.code?(event.stopPropagation(),onChange(updateControlPointPosition(controlPoints,index,clampPercent(point.position-KEYBOARD_CONTROL_POINT_VARIATION)))):"ArrowRight"===event.code&&(event.stopPropagation(),onChange(updateControlPointPosition(controlPoints,index,clampPercent(point.position+KEYBOARD_CONTROL_POINT_VARIATION))))},isOpen,position:point.position,color:point.color})},renderContent:_ref5=>{let{onClose}=_ref5;return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(LegacyAdapter,{enableAlpha:!disableAlpha,color:point.color,onChange:color=>{onChange(updateControlPointColor(controlPoints,index,(0,node_modules_colord.Mj)(color).toRgbString()))}}),!disableRemove&&controlPoints.length>2&&(0,react.createElement)(h_stack_component,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,react.createElement)(build_module_button,{onClick:()=>{onChange(function removeControlPoint(points,index){return points.filter(((point,pointIndex)=>pointIndex!==index))}(controlPoints,index)),onClose()},variant:"link"},(0,_wordpress_i18n_build_module.__)("Remove Control Point"))))},style:{left:`${point.position}%`,transform:"translateX( -50% )"}})}))}ControlPoints.InsertPoint=function InsertPoint(_ref6){let{value:controlPoints,onChange,onOpenInserter,onCloseInserter,insertPosition,disableAlpha,__experimentalIsRenderedInSidebar}=_ref6;const[alreadyInsertedPoint,setAlreadyInsertedPoint]=(0,react.useState)(!1);return(0,react.createElement)(GradientColorPickerDropdown,{isRenderedInSidebar:__experimentalIsRenderedInSidebar,className:"components-custom-gradient-picker__inserter",onClose:()=>{onCloseInserter()},renderToggle:_ref7=>{let{isOpen,onToggle}=_ref7;return(0,react.createElement)(build_module_button,{"aria-expanded":isOpen,"aria-haspopup":"true",onClick:()=>{isOpen?onCloseInserter():(setAlreadyInsertedPoint(!1),onOpenInserter()),onToggle()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:library_plus})},renderContent:()=>(0,react.createElement)(LegacyAdapter,{enableAlpha:!disableAlpha,onChange:color=>{alreadyInsertedPoint?onChange(function updateControlPointColorByPosition(points,position,newColor){const index=points.findIndex((point=>point.position===position));return updateControlPointColor(points,index,newColor)}(controlPoints,insertPosition,(0,node_modules_colord.Mj)(color).toRgbString())):(onChange(function addControlPoint(points,position,color){const nextIndex=points.findIndex((point=>point.position>position)),newPoint={color,position},newPoints=points.slice();return newPoints.splice(nextIndex-1,0,newPoint),newPoints}(controlPoints,insertPosition,(0,node_modules_colord.Mj)(color).toRgbString())),setAlreadyInsertedPoint(!0))}}),style:null!==insertPosition?{left:`${insertPosition}%`,transform:"translateX( -50% )"}:void 0})};const control_points=ControlPoints;function customGradientBarReducer(state,action){switch(action.type){case"MOVE_INSERTER":if("IDLE"===state.id||"MOVING_INSERTER"===state.id)return{id:"MOVING_INSERTER",insertPosition:action.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===state.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===state.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:state.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===state.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===state.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===state.id)return{id:"IDLE"}}return state}const customGradientBarReducerInitialState={id:"IDLE"};function CustomGradientBar(_ref){let{background,hasGradient,value:controlPoints,onChange,disableInserter=!1,disableAlpha=!1,__experimentalIsRenderedInSidebar}=_ref;const gradientMarkersContainerDomRef=(0,react.useRef)(),[gradientBarState,gradientBarStateDispatch]=(0,react.useReducer)(customGradientBarReducer,customGradientBarReducerInitialState),onMouseEnterAndMove=event=>{const insertPosition=getHorizontalRelativeGradientPosition(event.clientX,gradientMarkersContainerDomRef.current);(0,lodash.some)(controlPoints,(_ref2=>{let{position}=_ref2;return Math.abs(insertPosition-position)<MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT}))?"MOVING_INSERTER"===gradientBarState.id&&gradientBarStateDispatch({type:"STOP_INSERTER_MOVE"}):gradientBarStateDispatch({type:"MOVE_INSERTER",insertPosition})},isMovingInserter="MOVING_INSERTER"===gradientBarState.id,isInsertingControlPoint="INSERTING_CONTROL_POINT"===gradientBarState.id;return(0,react.createElement)("div",{className:classnames_default()("components-custom-gradient-picker__gradient-bar",{"has-gradient":hasGradient}),onMouseEnter:onMouseEnterAndMove,onMouseMove:onMouseEnterAndMove,style:{background},onMouseLeave:()=>{gradientBarStateDispatch({type:"STOP_INSERTER_MOVE"})}},(0,react.createElement)("div",{ref:gradientMarkersContainerDomRef,className:"components-custom-gradient-picker__markers-container"},!disableInserter&&(isMovingInserter||isInsertingControlPoint)&&(0,react.createElement)(control_points.InsertPoint,{__experimentalIsRenderedInSidebar,disableAlpha,insertPosition:gradientBarState.insertPosition,value:controlPoints,onChange,onOpenInserter:()=>{gradientBarStateDispatch({type:"OPEN_INSERTER"})},onCloseInserter:()=>{gradientBarStateDispatch({type:"CLOSE_INSERTER"})}}),(0,react.createElement)(control_points,{__experimentalIsRenderedInSidebar,disableAlpha,disableRemove:disableInserter,gradientPickerDomRef:gradientMarkersContainerDomRef,ignoreMarkerPosition:isInsertingControlPoint?gradientBarState.insertPosition:void 0,value:controlPoints,onChange,onStartControlPointChange:()=>{gradientBarStateDispatch({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{gradientBarStateDispatch({type:"STOP_CONTROL_CHANGE"})}})))}var node=__webpack_require__("../../node_modules/.pnpm/gradient-parser@0.1.5/node_modules/gradient-parser/build/node.js");const DEFAULT_GRADIENT="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",HORIZONTAL_GRADIENT_ORIENTATION={type:"angular",value:90},GRADIENT_OPTIONS=[{value:"linear-gradient",label:(0,_wordpress_i18n_build_module.__)("Linear")},{value:"radial-gradient",label:(0,_wordpress_i18n_build_module.__)("Radial")}],DIRECTIONAL_ORIENTATION_ANGLE_MAP={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 serializeGradientColorStop(_ref2){let{type,value,length}=_ref2;return`${function serializeGradientColor(_ref){let{type,value}=_ref;return"literal"===type?value:"hex"===type?`#${value}`:`${type}(${value.join(",")})`}({type,value})} ${function serializeGradientPosition(position){if(!position)return"";const{value,type}=position;return`${value}${type}`}(length)}`}function serializeGradient(_ref3){let{type,orientation,colorStops}=_ref3;const serializedOrientation=function serializeGradientOrientation(orientation){if(orientation&&"angular"===orientation.type)return`${orientation.value}deg`}(orientation);return`${type}(${[serializedOrientation,...colorStops.sort(((colorStop1,colorStop2)=>{var _colorStop1$length$va,_colorStop1$length,_colorStop2$length$va,_colorStop2$length;return(null!==(_colorStop1$length$va=null==colorStop1||null===(_colorStop1$length=colorStop1.length)||void 0===_colorStop1$length?void 0:_colorStop1$length.value)&&void 0!==_colorStop1$length$va?_colorStop1$length$va:0)-(null!==(_colorStop2$length$va=null==colorStop2||null===(_colorStop2$length=colorStop2.length)||void 0===_colorStop2$length?void 0:_colorStop2$length.value)&&void 0!==_colorStop2$length$va?_colorStop2$length$va:0)})).map(serializeGradientColorStop)].filter(Boolean).join(",")})`}function hasUnsupportedLength(item){return void 0===item.length||"%"!==item.length.type}function getStopCssColor(colorStop){switch(colorStop.type){case"hex":return`#${colorStop.value}`;case"literal":return colorStop.value;case"rgb":case"rgba":return`${colorStop.type}(${colorStop.value.join(",")})`;default:return"transparent"}}(0,node_modules_colord.X$)([names.A]);const SelectWrapper=(0,emotion_styled_base_browser_esm.A)(flex_block_component,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),AccessoryWrapper=(0,emotion_styled_base_browser_esm.A)(flex_block_component,{target:"e99xvul0"})({name:"1gvx10y",styles:"flex-grow:5"}),GradientAnglePicker=_ref=>{var _gradientAST$orientat,_gradientAST$orientat2;let{gradientAST,hasGradient,onChange}=_ref;const angle=null!==(_gradientAST$orientat=null==gradientAST||null===(_gradientAST$orientat2=gradientAST.orientation)||void 0===_gradientAST$orientat2?void 0:_gradientAST$orientat2.value)&&void 0!==_gradientAST$orientat?_gradientAST$orientat:180;return(0,react.createElement)(AnglePickerControl,{__nextHasNoMarginBottom:!0,onChange:newAngle=>{onChange(serializeGradient({...gradientAST,orientation:{type:"angular",value:newAngle}}))},labelPosition:"top",value:hasGradient?angle:""})},GradientTypePicker=_ref2=>{let{gradientAST,hasGradient,onChange}=_ref2;const{type}=gradientAST;return(0,react.createElement)(select_control,{__nextHasNoMarginBottom:!0,className:"components-custom-gradient-picker__type-picker",label:(0,_wordpress_i18n_build_module.__)("Type"),labelPosition:"top",onChange:next=>{"linear-gradient"===next&&onChange(serializeGradient({...gradientAST,...gradientAST.orientation?{}:{orientation:HORIZONTAL_GRADIENT_ORIENTATION},type:"linear-gradient"})),"radial-gradient"===next&&(()=>{const{orientation,...restGradientAST}=gradientAST;onChange(serializeGradient({...restGradientAST,type:"radial-gradient"}))})()},options:GRADIENT_OPTIONS,size:"__unstable-large",value:hasGradient&&type})};function CustomGradientPicker(_ref3){let{__nextHasNoMargin=!1,value,onChange,__experimentalIsRenderedInSidebar}=_ref3;const gradientAST=function getGradientAstWithDefault(value){var _gradientAST$orientat;let gradientAST;try{gradientAST=node.parse(value)[0],gradientAST.value=value}catch(error){gradientAST=node.parse(DEFAULT_GRADIENT)[0],gradientAST.value=DEFAULT_GRADIENT}if("directional"===(null===(_gradientAST$orientat=gradientAST.orientation)||void 0===_gradientAST$orientat?void 0:_gradientAST$orientat.type)&&(gradientAST.orientation.type="angular",gradientAST.orientation.value=DIRECTIONAL_ORIENTATION_ANGLE_MAP[gradientAST.orientation.value].toString()),gradientAST.colorStops.some(hasUnsupportedLength)){const{colorStops}=gradientAST,step=100/(colorStops.length-1);colorStops.forEach(((stop,index)=>{stop.length={value:step*index,type:"%"}})),gradientAST.value=serializeGradient(gradientAST)}return gradientAST}(value),background=function getLinearGradientRepresentation(gradientAST){return serializeGradient({type:"linear-gradient",orientation:HORIZONTAL_GRADIENT_ORIENTATION,colorStops:gradientAST.colorStops})}(gradientAST),hasGradient=gradientAST.value!==DEFAULT_GRADIENT,controlPoints=gradientAST.colorStops.map((colorStop=>({color:getStopCssColor(colorStop),position:parseInt(colorStop.length.value)})));return(0,react.createElement)(v_stack_component,{spacing:5,className:classnames_default()("components-custom-gradient-picker",{"is-next-has-no-margin":__nextHasNoMargin})},(0,react.createElement)(CustomGradientBar,{__experimentalIsRenderedInSidebar,background,hasGradient,value:controlPoints,onChange:newControlPoints=>{onChange(serializeGradient(function getGradientAstWithControlPoints(gradientAST,newControlPoints){return{...gradientAST,colorStops:newControlPoints.map((_ref=>{let{position,color}=_ref;const{r,g,b,a}=(0,node_modules_colord.Mj)(color).toRgb();return{length:{type:"%",value:null==position?void 0:position.toString()},type:a<1?"rgba":"rgb",value:a<1?[r,g,b,a]:[r,g,b]}}))}}(gradientAST,newControlPoints)))}}),(0,react.createElement)(flex_component,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,react.createElement)(SelectWrapper,null,(0,react.createElement)(GradientTypePicker,{gradientAST,hasGradient,onChange})),(0,react.createElement)(AccessoryWrapper,null,"linear-gradient"===gradientAST.type&&(0,react.createElement)(GradientAnglePicker,{gradientAST,hasGradient,onChange}))))}function SingleOrigin(_ref){let{className,clearGradient,gradients,onChange,value,actions,content}=_ref;const gradientOptions=(0,react.useMemo)((()=>(0,lodash.map)(gradients,(_ref2=>{let{gradient,name}=_ref2;return(0,react.createElement)(CircularOptionPicker.Option,{key:gradient,value:gradient,isSelected:value===gradient,tooltipText:name||(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Gradient code: %s"),gradient),style:{color:"rgba( 0,0,0,0 )",background:gradient},onClick:value===gradient?clearGradient:()=>onChange(gradient),"aria-label":name?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Gradient: %s"),name):(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Gradient code: %s"),gradient)})}))),[gradients,value,onChange,clearGradient]);return(0,react.createElement)(CircularOptionPicker,{className,options:gradientOptions,actions},content)}function MultipleOrigin(_ref3){let{className,clearGradient,gradients,onChange,value,actions,content}=_ref3;return(0,react.createElement)(v_stack_component,{spacing:3,className},gradients.map(((_ref4,index)=>{let{name,gradients:gradientSet}=_ref4;return(0,react.createElement)(v_stack_component,{spacing:2,key:index},(0,react.createElement)(ColorHeading,null,name),(0,react.createElement)(SingleOrigin,(0,helpers_esm_extends.A)({clearGradient,gradients:gradientSet,onChange,value},gradients.length===index+1?{actions,content}:{})))})))}function GradientPicker(_ref5){let{__nextHasNoMargin=!1,className,gradients,onChange,value,clearable=!0,disableCustomGradients=!1,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar}=_ref5;const clearGradient=(0,react.useCallback)((()=>onChange(void 0)),[onChange]),Component=__experimentalHasMultipleOrigins&&null!=gradients&&gradients.length?MultipleOrigin:SingleOrigin,deprecatedMarginSpacerProps=__nextHasNoMargin?{}:{marginTop:3};return(0,react.createElement)(Component,{className,clearable,clearGradient,gradients,onChange,value,actions:clearable&&((null==gradients?void 0:gradients.length)||!disableCustomGradients)&&(0,react.createElement)(CircularOptionPicker.ButtonAction,{onClick:clearGradient},(0,_wordpress_i18n_build_module.__)("Clear")),content:!disableCustomGradients&&(0,react.createElement)(spacer_component,(0,helpers_esm_extends.A)({marginTop:null!=gradients&&gradients.length?3:0,marginBottom:0},deprecatedMarginSpacerProps),(0,react.createElement)(CustomGradientPicker,{__nextHasNoMargin,__experimentalIsRenderedInSidebar,value,onChange}))})}const colorsAndGradientKeys=["colors","disableCustomColors","gradients","disableCustomGradients"],TAB_COLOR={name:"color",title:"Solid",value:"color"},TAB_GRADIENT={name:"gradient",title:"Gradient",value:"gradient"},TABS_SETTINGS=[TAB_COLOR,TAB_GRADIENT];function ColorGradientControlInner(_ref){let{colors,gradients,disableCustomColors,disableCustomGradients,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,className,label,onColorChange,onGradientChange,colorValue,gradientValue,clearable,showTitle=!0,enableAlpha}=_ref;const canChooseAColor=onColorChange&&(!(0,lodash.isEmpty)(colors)||!disableCustomColors),canChooseAGradient=onGradientChange&&(!(0,lodash.isEmpty)(gradients)||!disableCustomGradients);if(!canChooseAColor&&!canChooseAGradient)return null;const tabPanels={[TAB_COLOR.value]:(0,react.createElement)(ColorPalette,{value:colorValue,onChange:canChooseAGradient?newColor=>{onColorChange(newColor),onGradientChange()}:onColorChange,colors,disableCustomColors,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,clearable,enableAlpha}),[TAB_GRADIENT.value]:(0,react.createElement)(GradientPicker,{value:gradientValue,onChange:canChooseAColor?newGradient=>{onGradientChange(newGradient),onColorChange()}:onGradientChange,gradients,disableCustomGradients,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,clearable})},renderPanelType=type=>(0,react.createElement)("div",{className:"block-editor-color-gradient-control__panel"},tabPanels[type]);return(0,react.createElement)(base_control,{__nextHasNoMarginBottom:!0,className:classnames_default()("block-editor-color-gradient-control",className)},(0,react.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,react.createElement)(v_stack_component,{spacing:1},showTitle&&(0,react.createElement)("legend",null,(0,react.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,react.createElement)(base_control.VisualLabel,null,label))),canChooseAColor&&canChooseAGradient&&(0,react.createElement)(TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:TABS_SETTINGS,initialTabName:gradientValue?TAB_GRADIENT.value:!!canChooseAColor&&TAB_COLOR.value},(tab=>renderPanelType(tab.value))),!canChooseAGradient&&renderPanelType(TAB_COLOR.value),!canChooseAColor&&renderPanelType(TAB_GRADIENT.value))))}function ColorGradientControlSelect(props){const colorGradientSettings={};return colorGradientSettings.colors=use_setting_useSetting("color.palette"),colorGradientSettings.gradients=use_setting_useSetting("color.gradients"),colorGradientSettings.disableCustomColors=!use_setting_useSetting("color.custom"),colorGradientSettings.disableCustomGradients=!use_setting_useSetting("color.customGradient"),(0,react.createElement)(ColorGradientControlInner,(0,esm_extends.A)({},colorGradientSettings,props))}const control=function ColorGradientControl(props){return(0,lodash.every)(colorsAndGradientKeys,(key=>props.hasOwnProperty(key)))?(0,react.createElement)(ColorGradientControlInner,props):(0,react.createElement)(ColorGradientControlSelect,props)},WithToolsPanelItem=_ref=>{let{setting,children,panelId,...props}=_ref;return(0,react.createElement)(tools_panel_item_component,(0,esm_extends.A)({hasValue:()=>!!setting.colorValue||!!setting.gradientValue,label:setting.label,onDeselect:()=>{setting.colorValue?setting.onColorChange():setting.gradientValue&&setting.onGradientChange()},isShownByDefault:void 0===setting.isShownByDefault||setting.isShownByDefault},props,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId,resetAllFilter:setting.resetAllFilter}),children)},LabeledColorIndicator=_ref2=>{let{colorValue,label}=_ref2;return(0,react.createElement)(h_stack_component,{justify:"flex-start"},(0,react.createElement)(color_indicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue}),(0,react.createElement)(flex_item_component,{className:"block-editor-panel-color-gradient-settings__color-name",title:label},label))},renderToggle=settings=>_ref3=>{let{onToggle,isOpen}=_ref3;const{colorValue,label}=settings,toggleProps={onClick:onToggle,className:classnames_default()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":isOpen}),"aria-expanded":isOpen};return(0,react.createElement)(build_module_button,toggleProps,(0,react.createElement)(LabeledColorIndicator,{colorValue,label}))};function ColorGradientSettingsDropdown(_ref4){let popoverProps,{colors,disableCustomColors,disableCustomGradients,enableAlpha,gradients,settings,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,...props}=_ref4;return __experimentalIsRenderedInSidebar&&(popoverProps={placement:"left-start",offset:36,__unstableShift:!0}),(0,react.createElement)(react.Fragment,null,settings.map(((setting,index)=>{var _setting$gradientValu;const controlProps={clearable:!1,colorValue:setting.colorValue,colors,disableCustomColors,disableCustomGradients,enableAlpha,gradientValue:setting.gradientValue,gradients,label:setting.label,onColorChange:setting.onColorChange,onGradientChange:setting.onGradientChange,showTitle:!1,__experimentalHasMultipleOrigins,__experimentalIsRenderedInSidebar,...setting},toggleSettings={colorValue:null!==(_setting$gradientValu=setting.gradientValue)&&void 0!==_setting$gradientValu?_setting$gradientValu:setting.colorValue,label:setting.label};return setting&&(0,react.createElement)(WithToolsPanelItem,(0,esm_extends.A)({key:index,setting},props),(0,react.createElement)(Dropdown,{popoverProps,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:renderToggle(toggleSettings),renderContent:()=>(0,react.createElement)(dropdown_content_wrapper,{paddingSize:"none"},(0,react.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,react.createElement)(control,controlProps)))}))})))}var build_module_serialize=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/serialize.js");const notice_noop=()=>{};function getDefaultPoliteness(status){switch(status){case"success":case"warning":case"info":return"polite";default:return"assertive"}}const notice=function Notice(_ref){let{className,status="info",children,spokenMessage=children,onRemove=notice_noop,isDismissible=!0,actions=[],politeness=getDefaultPoliteness(status),__unstableHTML,onDismiss=notice_noop}=_ref;!function useSpokenMessage(message,politeness){const spokenMessage="string"==typeof message?message:(0,build_module_serialize.Ay)(message);(0,react.useEffect)((()=>{spokenMessage&&speak(spokenMessage,politeness)}),[spokenMessage,politeness])}(spokenMessage,politeness);const classes=classnames_default()(className,"components-notice","is-"+status,{"is-dismissible":isDismissible});return __unstableHTML&&(children=(0,react.createElement)(raw_html.A,null,children)),(0,react.createElement)("div",{className:classes},(0,react.createElement)("div",{className:"components-notice__content"},children,(0,react.createElement)("div",{className:"components-notice__actions"},actions.map(((_ref2,index)=>{let{className:buttonCustomClasses,label,isPrimary,variant,noDefaultClasses=!1,onClick,url}=_ref2,computedVariant=variant;return"primary"===variant||noDefaultClasses||(computedVariant=url?"link":"secondary"),void 0===computedVariant&&isPrimary&&(computedVariant="primary"),(0,react.createElement)(build_module_button,{key:index,href:url,variant:computedVariant,onClick:url?void 0:onClick,className:classnames_default()("components-notice__action",buttonCustomClasses)},label)})))),isDismissible&&(0,react.createElement)(build_module_button,{className:"components-notice__dismiss",icon:library_close.A,label:(0,_wordpress_i18n_build_module.__)("Dismiss this notice"),onClick:event=>{var _event$preventDefault;null==event||null===(_event$preventDefault=event.preventDefault)||void 0===_event$preventDefault||_event$preventDefault.call(event),onDismiss(),onRemove()},showTooltip:!1}))};(0,node_modules_colord.X$)([names.A,a11y.A]);const contrast_checker=function ContrastChecker(_ref){let{backgroundColor,fallbackBackgroundColor,fallbackTextColor,fallbackLinkColor,fontSize,isLargeText,textColor,linkColor,enableAlphaChecker=!1}=_ref;const currentBackgroundColor=backgroundColor||fallbackBackgroundColor;if(!currentBackgroundColor)return null;const currentTextColor=textColor||fallbackTextColor,currentLinkColor=linkColor||fallbackLinkColor;if(!currentTextColor&&!currentLinkColor)return null;const textColors=[{color:currentTextColor,description:(0,i18n_build_module.__)("text color")},{color:currentLinkColor,description:(0,i18n_build_module.__)("link color")}],colordBackgroundColor=(0,node_modules_colord.Mj)(currentBackgroundColor),backgroundColorHasTransparency=colordBackgroundColor.alpha()<1,backgroundColorBrightness=colordBackgroundColor.brightness(),isReadableOptions={level:"AA",size:isLargeText||!1!==isLargeText&&fontSize>=24?"large":"small"};let message="",speakMessage="";for(const item of textColors){if(!item.color)continue;const colordTextColor=(0,node_modules_colord.Mj)(item.color),isColordTextReadable=colordTextColor.isReadable(colordBackgroundColor,isReadableOptions),textHasTransparency=colordTextColor.alpha()<1;if(!isColordTextReadable){if(backgroundColorHasTransparency||textHasTransparency)continue;message=backgroundColorBrightness<colordTextColor.brightness()?(0,i18n_build_module.nv)((0,i18n_build_module.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),item.description):(0,i18n_build_module.nv)((0,i18n_build_module.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),item.description),speakMessage=(0,i18n_build_module.__)("This color combination may be hard for people to read.");break}textHasTransparency&&enableAlphaChecker&&(message=(0,i18n_build_module.__)("Transparent text may be hard for people to read."),speakMessage=(0,i18n_build_module.__)("Transparent text may be hard for people to read."))}return message?(speak(speakMessage),(0,react.createElement)("div",{className:"block-editor-contrast-checker"},(0,react.createElement)(notice,{spokenMessage:null,status:"warning",isDismissible:!1},message))):null};function color_panel_getComputedStyle(node){return node.ownerDocument.defaultView.getComputedStyle(node)}function ColorPanel(_ref){let{enableAlpha=!1,settings,clientId,enableContrastChecking=!0}=_ref;const[detectedBackgroundColor,setDetectedBackgroundColor]=(0,react.useState)(),[detectedColor,setDetectedColor]=(0,react.useState)(),[detectedLinkColor,setDetectedLinkColor]=(0,react.useState)(),ref=useBlockRef(clientId);(0,react.useEffect)((()=>{var _ref$current;if(!enableContrastChecking)return;if(!ref.current)return;setDetectedColor(color_panel_getComputedStyle(ref.current).color);const firstLinkElement=null===(_ref$current=ref.current)||void 0===_ref$current?void 0:_ref$current.querySelector("a");firstLinkElement&&firstLinkElement.innerText&&setDetectedLinkColor(color_panel_getComputedStyle(firstLinkElement).color);let backgroundColorNode=ref.current,backgroundColor=color_panel_getComputedStyle(backgroundColorNode).backgroundColor;for(;"rgba(0, 0, 0, 0)"===backgroundColor&&backgroundColorNode.parentNode&&backgroundColorNode.parentNode.nodeType===backgroundColorNode.parentNode.ELEMENT_NODE;)backgroundColorNode=backgroundColorNode.parentNode,backgroundColor=color_panel_getComputedStyle(backgroundColorNode).backgroundColor;setDetectedBackgroundColor(backgroundColor)}));const colorGradientSettings=use_multiple_origin_colors_and_gradients_useMultipleOriginColorsAndGradients();return(0,react.createElement)(inspector_controls,{__experimentalGroup:"color"},(0,react.createElement)(ColorGradientSettingsDropdown,(0,esm_extends.A)({enableAlpha,panelId:clientId,settings,__experimentalIsItemGroup:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},colorGradientSettings)),enableContrastChecking&&(0,react.createElement)(contrast_checker,{backgroundColor:detectedBackgroundColor,textColor:detectedColor,enableAlphaChecker:enableAlpha,linkColor:detectedLinkColor}))}const COLOR_SUPPORT_KEY="color",hasColorSupport=blockType=>{const colorSupport=(0,build_module.bI)(blockType,COLOR_SUPPORT_KEY);return colorSupport&&(!0===colorSupport.link||!0===colorSupport.gradient||!1!==colorSupport.background||!1!==colorSupport.text)},hasLinkColorSupport=blockType=>{if("web"!==platform.OS)return!1;const colorSupport=(0,build_module.bI)(blockType,COLOR_SUPPORT_KEY);return null!==colorSupport&&"object"==typeof colorSupport&&!!colorSupport.link},hasGradientSupport=blockType=>{const colorSupport=(0,build_module.bI)(blockType,COLOR_SUPPORT_KEY);return null!==colorSupport&&"object"==typeof colorSupport&&!!colorSupport.gradients},hasBackgroundColorSupport=blockType=>{const colorSupport=(0,build_module.bI)(blockType,COLOR_SUPPORT_KEY);return colorSupport&&!1!==colorSupport.background},hasTextColorSupport=blockType=>{const colorSupport=(0,build_module.bI)(blockType,COLOR_SUPPORT_KEY);return colorSupport&&!1!==colorSupport.text},clearColorFromStyles=(path,style)=>cleanEmptyObject(immutableSet(style,path,void 0)),resetAllTextFilter=attributes=>({textColor:void 0,style:clearColorFromStyles(["color","text"],attributes.style)}),resetAllLinkFilter=attributes=>({style:clearColorFromStyles(["elements","link","color","text"],attributes.style)}),clearBackgroundAndGradient=attributes=>{var _attributes$style;return{backgroundColor:void 0,gradient:void 0,style:{...attributes.style,color:{...null===(_attributes$style=attributes.style)||void 0===_attributes$style?void 0:_attributes$style.color,background:void 0,gradient:void 0}}}};function color_addSaveProps(props,blockType,attributes){var _style$color,_style$color2,_style$color3,_style$color4,_style$elements,_style$elements$link;if(!hasColorSupport(blockType)||shouldSkipSerialization(blockType,COLOR_SUPPORT_KEY))return props;const hasGradient=hasGradientSupport(blockType),{backgroundColor,textColor,gradient,style}=attributes,shouldSerialize=feature=>!shouldSkipSerialization(blockType,COLOR_SUPPORT_KEY,feature),textClass=shouldSerialize("text")?utils_getColorClassName("color",textColor):void 0,gradientClass=shouldSerialize("gradients")?use_gradient_experimentalGetGradientClass(gradient):void 0,backgroundClass=shouldSerialize("background")?utils_getColorClassName("background-color",backgroundColor):void 0,serializeHasBackground=shouldSerialize("background")||shouldSerialize("gradients"),hasBackground=backgroundColor||(null==style||null===(_style$color=style.color)||void 0===_style$color?void 0:_style$color.background)||hasGradient&&(gradient||(null==style||null===(_style$color2=style.color)||void 0===_style$color2?void 0:_style$color2.gradient)),newClassName=classnames_default()(props.className,textClass,gradientClass,{[backgroundClass]:!(hasGradient&&null!=style&&null!==(_style$color3=style.color)&&void 0!==_style$color3&&_style$color3.gradient||!backgroundClass),"has-text-color":shouldSerialize("text")&&(textColor||(null==style||null===(_style$color4=style.color)||void 0===_style$color4?void 0:_style$color4.text)),"has-background":serializeHasBackground&&hasBackground,"has-link-color":shouldSerialize("link")&&(null==style||null===(_style$elements=style.elements)||void 0===_style$elements||null===(_style$elements$link=_style$elements.link)||void 0===_style$elements$link?void 0:_style$elements$link.color)});return props.className=newClassName||void 0,props}const getLinkColorFromAttributeValue=(colors,value)=>{const attributeParsed=/var:preset\|color\|(.+)/.exec(value);return attributeParsed&&attributeParsed[1]?utils_getColorObjectByAttributeValues(colors,attributeParsed[1]).color:value};function ColorEdit(props){var _style$color6,_style$color7,_style$color8,_style$elements2,_style$elements2$link,_style$elements2$link2,_style$elements3,_style$elements3$link,_style$elements3$link2;const{name:blockName,attributes}=props,userPalette=use_setting_useSetting("color.palette.custom"),themePalette=use_setting_useSetting("color.palette.theme"),defaultPalette=use_setting_useSetting("color.palette.default"),allSolids=(0,react.useMemo)((()=>[...userPalette||[],...themePalette||[],...defaultPalette||[]]),[userPalette,themePalette,defaultPalette]),userGradientPalette=use_setting_useSetting("color.gradients.custom"),themeGradientPalette=use_setting_useSetting("color.gradients.theme"),defaultGradientPalette=use_setting_useSetting("color.gradients.default"),allGradients=(0,react.useMemo)((()=>[...userGradientPalette||[],...themeGradientPalette||[],...defaultGradientPalette||[]]),[userGradientPalette,themeGradientPalette,defaultGradientPalette]),areCustomSolidsEnabled=use_setting_useSetting("color.custom"),areCustomGradientsEnabled=use_setting_useSetting("color.customGradient"),isBackgroundEnabled=use_setting_useSetting("color.background"),isLinkEnabled=use_setting_useSetting("color.link"),isTextEnabled=use_setting_useSetting("color.text"),solidsEnabled=areCustomSolidsEnabled||!themePalette||(null==themePalette?void 0:themePalette.length)>0,gradientsEnabled=areCustomGradientsEnabled||!themeGradientPalette||(null==themeGradientPalette?void 0:themeGradientPalette.length)>0,localAttributes=(0,react.useRef)(attributes);if((0,react.useEffect)((()=>{localAttributes.current=attributes}),[attributes]),!hasColorSupport(blockName))return null;const hasLinkColor=hasLinkColorSupport(blockName)&&isLinkEnabled&&solidsEnabled,hasTextColor=hasTextColorSupport(blockName)&&isTextEnabled&&solidsEnabled,hasBackgroundColor=hasBackgroundColorSupport(blockName)&&isBackgroundEnabled&&solidsEnabled,hasGradientColor=hasGradientSupport(blockName)&&gradientsEnabled;if(!(hasLinkColor||hasTextColor||hasBackgroundColor||hasGradientColor))return null;const{style,textColor,backgroundColor,gradient}=attributes;let gradientValue;if(hasGradientColor&&gradient)gradientValue=use_gradient_getGradientValueBySlug(allGradients,gradient);else if(hasGradientColor){var _style$color5;gradientValue=null==style||null===(_style$color5=style.color)||void 0===_style$color5?void 0:_style$color5.gradient}const onChangeColor=name=>value=>{var _localAttributes$curr,_localAttributes$curr2;const colorObject=getColorObjectByColorValue(allSolids,value),attributeName=name+"Color",newStyle={...localAttributes.current.style,color:{...null===(_localAttributes$curr=localAttributes.current)||void 0===_localAttributes$curr||null===(_localAttributes$curr2=_localAttributes$curr.style)||void 0===_localAttributes$curr2?void 0:_localAttributes$curr2.color,[name]:null!=colorObject&&colorObject.slug?void 0:value}},newNamedColor=null!=colorObject&&colorObject.slug?colorObject.slug:void 0,newAttributes={style:cleanEmptyObject(newStyle),[attributeName]:newNamedColor};props.setAttributes(newAttributes),localAttributes.current={...localAttributes.current,...newAttributes}},defaultColorControls=(0,build_module.bI)(props.name,[COLOR_SUPPORT_KEY,"__experimentalDefaultControls"]),enableContrastChecking=!("web"!==platform.OS||gradient||null!=style&&null!==(_style$color6=style.color)&&void 0!==_style$color6&&_style$color6.gradient||!1===(0,build_module.bI)(props.name,[COLOR_SUPPORT_KEY,"enableContrastChecker"]));return(0,react.createElement)(ColorPanel,{enableContrastChecking,clientId:props.clientId,enableAlpha:!0,settings:[...hasTextColor?[{label:(0,i18n_build_module.__)("Text"),onColorChange:onChangeColor("text"),colorValue:utils_getColorObjectByAttributeValues(allSolids,textColor,null==style||null===(_style$color7=style.color)||void 0===_style$color7?void 0:_style$color7.text).color,isShownByDefault:null==defaultColorControls?void 0:defaultColorControls.text,resetAllFilter:resetAllTextFilter}]:[],...hasBackgroundColor||hasGradientColor?[{label:(0,i18n_build_module.__)("Background"),onColorChange:hasBackgroundColor?onChangeColor("background"):void 0,colorValue:utils_getColorObjectByAttributeValues(allSolids,backgroundColor,null==style||null===(_style$color8=style.color)||void 0===_style$color8?void 0:_style$color8.background).color,gradientValue,onGradientChange:hasGradientColor?value=>{const slug=getGradientSlugByValue(allGradients,value);let newAttributes;if(slug){var _localAttributes$curr3,_localAttributes$curr4,_localAttributes$curr5;const newStyle={...null===(_localAttributes$curr3=localAttributes.current)||void 0===_localAttributes$curr3?void 0:_localAttributes$curr3.style,color:{...null===(_localAttributes$curr4=localAttributes.current)||void 0===_localAttributes$curr4||null===(_localAttributes$curr5=_localAttributes$curr4.style)||void 0===_localAttributes$curr5?void 0:_localAttributes$curr5.color,gradient:void 0}};newAttributes={style:cleanEmptyObject(newStyle),gradient:slug}}else{var _localAttributes$curr6,_localAttributes$curr7,_localAttributes$curr8;const newStyle={...null===(_localAttributes$curr6=localAttributes.current)||void 0===_localAttributes$curr6?void 0:_localAttributes$curr6.style,color:{...null===(_localAttributes$curr7=localAttributes.current)||void 0===_localAttributes$curr7||null===(_localAttributes$curr8=_localAttributes$curr7.style)||void 0===_localAttributes$curr8?void 0:_localAttributes$curr8.color,gradient:value}};newAttributes={style:cleanEmptyObject(newStyle),gradient:void 0}}props.setAttributes(newAttributes),localAttributes.current={...localAttributes.current,...newAttributes}}:void 0,isShownByDefault:null==defaultColorControls?void 0:defaultColorControls.background,resetAllFilter:clearBackgroundAndGradient}]:[],...hasLinkColor?[{label:(0,i18n_build_module.__)("Link"),onColorChange:value=>{var _localAttributes$curr9;const colorObject=getColorObjectByColorValue(allSolids,value),newLinkColorValue=null!=colorObject&&colorObject.slug?`var:preset|color|${colorObject.slug}`:value,newStyle=cleanEmptyObject(immutableSet(null===(_localAttributes$curr9=localAttributes.current)||void 0===_localAttributes$curr9?void 0:_localAttributes$curr9.style,["elements","link","color","text"],newLinkColorValue));props.setAttributes({style:newStyle}),localAttributes.current={...localAttributes.current,style:newStyle}},colorValue:getLinkColorFromAttributeValue(allSolids,null==style||null===(_style$elements2=style.elements)||void 0===_style$elements2||null===(_style$elements2$link=_style$elements2.link)||void 0===_style$elements2$link||null===(_style$elements2$link2=_style$elements2$link.color)||void 0===_style$elements2$link2?void 0:_style$elements2$link2.text),clearable:!(null==style||null===(_style$elements3=style.elements)||void 0===_style$elements3||null===(_style$elements3$link=_style$elements3.link)||void 0===_style$elements3$link||null===(_style$elements3$link2=_style$elements3$link.color)||void 0===_style$elements3$link2||!_style$elements3$link2.text),isShownByDefault:null==defaultColorControls?void 0:defaultColorControls.link,resetAllFilter:resetAllLinkFilter}]:[]]})}const withColorPaletteStyles=(0,create_higher_order_component.f)((BlockListBlock=>props=>{var _props$wrapperProps;const{name,attributes}=props,{backgroundColor,textColor}=attributes,userPalette=use_setting_useSetting("color.palette.custom")||[],themePalette=use_setting_useSetting("color.palette.theme")||[],defaultPalette=use_setting_useSetting("color.palette.default")||[],colors=(0,react.useMemo)((()=>[...userPalette||[],...themePalette||[],...defaultPalette||[]]),[userPalette,themePalette,defaultPalette]);if(!hasColorSupport(name)||shouldSkipSerialization(name,COLOR_SUPPORT_KEY))return(0,react.createElement)(BlockListBlock,props);const extraStyles={};var _getColorObjectByAttr,_getColorObjectByAttr2;textColor&&!shouldSkipSerialization(name,COLOR_SUPPORT_KEY,"text")&&(extraStyles.color=null===(_getColorObjectByAttr=utils_getColorObjectByAttributeValues(colors,textColor))||void 0===_getColorObjectByAttr?void 0:_getColorObjectByAttr.color);backgroundColor&&!shouldSkipSerialization(name,COLOR_SUPPORT_KEY,"background")&&(extraStyles.backgroundColor=null===(_getColorObjectByAttr2=utils_getColorObjectByAttributeValues(colors,backgroundColor))||void 0===_getColorObjectByAttr2?void 0:_getColorObjectByAttr2.color);let wrapperProps=props.wrapperProps;return wrapperProps={...props.wrapperProps,style:{...extraStyles,...null===(_props$wrapperProps=props.wrapperProps)||void 0===_props$wrapperProps?void 0:_props$wrapperProps.style}},(0,react.createElement)(BlockListBlock,(0,esm_extends.A)({},props,{wrapperProps}))})),MIGRATION_PATHS={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,hooks_build_module.U2)("blocks.registerBlockType","core/color/addAttribute",(function color_addAttributes(settings){return hasColorSupport(settings)?(settings.attributes.backgroundColor||Object.assign(settings.attributes,{backgroundColor:{type:"string"}}),settings.attributes.textColor||Object.assign(settings.attributes,{textColor:{type:"string"}}),hasGradientSupport(settings)&&!settings.attributes.gradient&&Object.assign(settings.attributes,{gradient:{type:"string"}}),settings):settings})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/color/addSaveProps",color_addSaveProps),(0,hooks_build_module.U2)("blocks.registerBlockType","core/color/addEditProps",(function color_addEditProps(settings){if(!hasColorSupport(settings)||shouldSkipSerialization(settings,COLOR_SUPPORT_KEY))return settings;const existingGetEditWrapperProps=settings.getEditWrapperProps;return settings.getEditWrapperProps=attributes=>{let props={};return existingGetEditWrapperProps&&(props=existingGetEditWrapperProps(attributes)),color_addSaveProps(props,settings,attributes)},settings})),(0,hooks_build_module.U2)("editor.BlockListBlock","core/color/with-color-palette-styles",withColorPaletteStyles),(0,hooks_build_module.U2)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function color_addTransforms(result,source,index,results){const destinationBlockType=result.name;return transformStyles({linkColor:hasLinkColorSupport(destinationBlockType),textColor:hasTextColorSupport(destinationBlockType),backgroundColor:hasBackgroundColorSupport(destinationBlockType),gradient:hasGradientSupport(destinationBlockType)},MIGRATION_PATHS,result,source,index,results)}));const FONT_STYLES=[{name:(0,i18n_build_module._x)("Regular","font style"),value:"normal"},{name:(0,i18n_build_module._x)("Italic","font style"),value:"italic"}],FONT_WEIGHTS=[{name:(0,i18n_build_module._x)("Thin","font weight"),value:"100"},{name:(0,i18n_build_module._x)("Extra Light","font weight"),value:"200"},{name:(0,i18n_build_module._x)("Light","font weight"),value:"300"},{name:(0,i18n_build_module._x)("Regular","font weight"),value:"400"},{name:(0,i18n_build_module._x)("Medium","font weight"),value:"500"},{name:(0,i18n_build_module._x)("Semi Bold","font weight"),value:"600"},{name:(0,i18n_build_module._x)("Bold","font weight"),value:"700"},{name:(0,i18n_build_module._x)("Extra Bold","font weight"),value:"800"},{name:(0,i18n_build_module._x)("Black","font weight"),value:"900"}],getFontAppearanceLabel=(hasFontStyles,hasFontWeights)=>hasFontStyles?hasFontWeights?(0,i18n_build_module.__)("Appearance"):(0,i18n_build_module.__)("Font style"):(0,i18n_build_module.__)("Font weight");function FontAppearanceControl(props){const{onChange,hasFontStyles=!0,hasFontWeights=!0,value:{fontStyle,fontWeight},...otherProps}=props,hasStylesOrWeights=hasFontStyles||hasFontWeights,label=getFontAppearanceLabel(hasFontStyles,hasFontWeights),defaultOption={key:"default",name:(0,i18n_build_module.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},selectOptions=(0,react.useMemo)((()=>hasFontStyles&&hasFontWeights?(()=>{const combinedOptions=[defaultOption];return FONT_STYLES.forEach((_ref=>{let{name:styleName,value:styleValue}=_ref;FONT_WEIGHTS.forEach((_ref2=>{let{name:weightName,value:weightValue}=_ref2;const optionName="normal"===styleValue?weightName:(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s %2$s"),weightName,styleName);combinedOptions.push({key:`${styleValue}-${weightValue}`,name:optionName,style:{fontStyle:styleValue,fontWeight:weightValue}})}))})),combinedOptions})():hasFontStyles?(()=>{const combinedOptions=[defaultOption];return FONT_STYLES.forEach((_ref3=>{let{name,value}=_ref3;combinedOptions.push({key:value,name,style:{fontStyle:value,fontWeight:void 0}})})),combinedOptions})():(()=>{const combinedOptions=[defaultOption];return FONT_WEIGHTS.forEach((_ref4=>{let{name,value}=_ref4;combinedOptions.push({key:value,name,style:{fontStyle:void 0,fontWeight:value}})})),combinedOptions})()),[props.options]),currentSelection=selectOptions.find((option=>option.style.fontStyle===fontStyle&&option.style.fontWeight===fontWeight))||selectOptions[0];return hasStylesOrWeights&&(0,react.createElement)(CustomSelectControl,(0,esm_extends.A)({},otherProps,{className:"components-font-appearance-control",label,describedBy:currentSelection?hasFontStyles?hasFontWeights?(0,i18n_build_module.nv)((0,i18n_build_module.__)("Currently selected font appearance: %s"),currentSelection.name):(0,i18n_build_module.nv)((0,i18n_build_module.__)("Currently selected font style: %s"),currentSelection.name):(0,i18n_build_module.nv)((0,i18n_build_module.__)("Currently selected font weight: %s"),currentSelection.name):(0,i18n_build_module.__)("No selected font appearance"),options:selectOptions,value:currentSelection,onChange:_ref5=>{let{selectedItem}=_ref5;return onChange(selectedItem.style)},__nextUnconstrainedWidth:!0}))}const line_height_control=_ref=>{let{value:lineHeight,onChange,__nextHasNoMarginBottom=!1,__unstableInputWidth="60px",...otherProps}=_ref;const isDefined=function isLineHeightDefined(lineHeight){return void 0!==lineHeight&&""!==lineHeight}(lineHeight),value=isDefined?lineHeight:"";__nextHasNoMarginBottom||(0,deprecated_build_module.A)("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const deprecatedStyles=__nextHasNoMarginBottom?void 0:{marginBottom:24};return(0,react.createElement)("div",{className:"block-editor-line-height-control",style:deprecatedStyles},(0,react.createElement)(number_control,(0,esm_extends.A)({},otherProps,{__unstableInputWidth,__unstableStateReducer:(state,action)=>{var _action$payload$event;const wasTypedOrPasted=["insertText","insertFromPaste"].includes(null===(_action$payload$event=action.payload.event.nativeEvent)||void 0===_action$payload$event?void 0:_action$payload$event.inputType),value=((nextValue,wasTypedOrPasted)=>{if(isDefined)return nextValue;switch(`${nextValue}`){case"0.1":return 1.6;case"0":return wasTypedOrPasted?nextValue:1.4;case"":return 1.5;default:return nextValue}})(state.value,wasTypedOrPasted);return{...state,value}},onChange,label:(0,i18n_build_module.__)("Line height"),placeholder:1.5,step:.1,value,min:0})))},LINE_HEIGHT_SUPPORT_KEY="typography.lineHeight";function LineHeightEdit(props){var _style$typography;const{attributes:{style},setAttributes}=props;return(0,react.createElement)(line_height_control,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==style||null===(_style$typography=style.typography)||void 0===_style$typography?void 0:_style$typography.lineHeight,onChange:newLineHeightValue=>{const newStyle={...style,typography:{...null==style?void 0:style.typography,lineHeight:newLineHeightValue}};setAttributes({style:cleanEmptyObject(newStyle)})}})}function useIsLineHeightDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const isDisabled=!use_setting_useSetting("typography.lineHeight");return!(0,build_module.pN)(blockName,LINE_HEIGHT_SUPPORT_KEY)||isDisabled}const FONT_STYLE_SUPPORT_KEY="typography.__experimentalFontStyle",FONT_WEIGHT_SUPPORT_KEY="typography.__experimentalFontWeight";function FontAppearanceEdit(props){var _style$typography,_style$typography2;const{attributes:{style},setAttributes}=props,hasFontStyles=!useIsFontStyleDisabled(props),hasFontWeights=!useIsFontWeightDisabled(props),fontStyle=null==style||null===(_style$typography=style.typography)||void 0===_style$typography?void 0:_style$typography.fontStyle,fontWeight=null==style||null===(_style$typography2=style.typography)||void 0===_style$typography2?void 0:_style$typography2.fontWeight;return(0,react.createElement)(FontAppearanceControl,{onChange:newStyles=>{setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,fontStyle:newStyles.fontStyle,fontWeight:newStyles.fontWeight}})})},hasFontStyles,hasFontWeights,value:{fontStyle,fontWeight}})}function useIsFontStyleDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const styleSupport=(0,build_module.pN)(blockName,FONT_STYLE_SUPPORT_KEY),hasFontStyles=use_setting_useSetting("typography.fontStyle");return!styleSupport||!hasFontStyles}function useIsFontWeightDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const weightSupport=(0,build_module.pN)(blockName,FONT_WEIGHT_SUPPORT_KEY),hasFontWeights=use_setting_useSetting("typography.fontWeight");return!weightSupport||!hasFontWeights}function useIsFontAppearanceDisabled(props){const stylesDisabled=useIsFontStyleDisabled(props),weightsDisabled=useIsFontWeightDisabled(props);return stylesDisabled&&weightsDisabled}function FontFamilyControl(_ref){let{value="",onChange,fontFamilies,...props}=_ref;const blockLevelFontFamilies=use_setting_useSetting("typography.fontFamilies");if(fontFamilies||(fontFamilies=blockLevelFontFamilies),(0,lodash.isEmpty)(fontFamilies))return null;const options=[{value:"",label:(0,i18n_build_module.__)("Default")},...fontFamilies.map((_ref2=>{let{fontFamily,name}=_ref2;return{value:fontFamily,label:name||fontFamily}}))];return(0,react.createElement)(select_control,(0,esm_extends.A)({label:(0,i18n_build_module.__)("Font"),options,value,onChange,labelPosition:"top"},props))}const FONT_FAMILY_SUPPORT_KEY="typography.__experimentalFontFamily";function font_family_addSaveProps(props,blockType,attributes){if(!(0,build_module.pN)(blockType,FONT_FAMILY_SUPPORT_KEY))return props;if(shouldSkipSerialization(blockType,TYPOGRAPHY_SUPPORT_KEY,"fontFamily"))return props;if(null==attributes||!attributes.fontFamily)return props;const classes=new TokenList(props.className);classes.add(`has-${(0,lodash.kebabCase)(null==attributes?void 0:attributes.fontFamily)}-font-family`);const newClassName=classes.value;return props.className=newClassName||void 0,props}function FontFamilyEdit(_ref){var _find;let{setAttributes,attributes:{fontFamily}}=_ref;const fontFamilies=use_setting_useSetting("typography.fontFamilies"),value=null===(_find=(0,lodash.find)(fontFamilies,(_ref2=>{let{slug}=_ref2;return fontFamily===slug})))||void 0===_find?void 0:_find.fontFamily;return(0,react.createElement)(FontFamilyControl,{className:"block-editor-hooks-font-family-control",fontFamilies,value,onChange:function onChange(newValue){const predefinedFontFamily=(0,lodash.find)(fontFamilies,(_ref3=>{let{fontFamily:f}=_ref3;return f===newValue}));setAttributes({fontFamily:null==predefinedFontFamily?void 0:predefinedFontFamily.slug})}})}function useIsFontFamilyDisabled(_ref4){let{name}=_ref4;const fontFamilies=use_setting_useSetting("typography.fontFamilies");return!fontFamilies||0===fontFamilies.length||!(0,build_module.pN)(name,FONT_FAMILY_SUPPORT_KEY)}(0,hooks_build_module.U2)("blocks.registerBlockType","core/fontFamily/addAttribute",(function font_family_addAttributes(settings){return(0,build_module.pN)(settings,FONT_FAMILY_SUPPORT_KEY)?(settings.attributes.fontFamily||Object.assign(settings.attributes,{fontFamily:{type:"string"}}),settings):settings})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",font_family_addSaveProps),(0,hooks_build_module.U2)("blocks.registerBlockType","core/fontFamily/addEditProps",(function font_family_addEditProps(settings){if(!(0,build_module.pN)(settings,FONT_FAMILY_SUPPORT_KEY))return settings;const existingGetEditWrapperProps=settings.getEditWrapperProps;return settings.getEditWrapperProps=attributes=>{let props={};return existingGetEditWrapperProps&&(props=existingGetEditWrapperProps(attributes)),font_family_addSaveProps(props,settings,attributes)},settings}));const utils_getFontSize=(fontSizes,fontSizeAttribute,customFontSizeAttribute)=>{if(fontSizeAttribute){const fontSizeObject=(0,lodash.find)(fontSizes,{slug:fontSizeAttribute});if(fontSizeObject)return fontSizeObject}return{size:customFontSizeAttribute}};var useCreateElement=__webpack_require__("../../node_modules/.pnpm/reakit-system@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-system/es/useCreateElement.js"),RADIO_STATE_KEYS=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],RADIO_KEYS=[].concat(RADIO_STATE_KEYS,["value","checked","unstable_checkOnFocus"]),RADIO_GROUP_KEYS=RADIO_STATE_KEYS,useRadioGroup=(0,createHook.a)({name:"RadioGroup",compose:Composite.T,keys:RADIO_GROUP_KEYS,useProps:function useProps(_,htmlProps){return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({role:"radiogroup"},htmlProps)}}),RadioGroup=(0,createComponent.a)({as:"div",useHook:useRadioGroup,useCreateElement:function useCreateElement$1(type,props,children){return(0,useCreateElement.U)(type,props,children)}});const styles_border=(0,emotion_react_browser_esm.AH)("border-color:",COLORS.ui.border,";&:hover{border-color:",COLORS.ui.borderHover,";}",""),toggleGroupControlSize=size=>(0,emotion_react_browser_esm.AH)("min-height:",{default:"36px","__unstable-large":"40px"}[size],";",""),toggle_group_control_styles_block={name:"7whenc",styles:"display:flex;width:100%"},BackdropView=(0,emotion_styled_base_browser_esm.A)("div",{target:"eakva830"})("background:",COLORS.gray[900],";border-radius:",config_values.controlBorderRadius,";box-shadow:",config_values.toggleGroupControlBackdropBoxShadow,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",config_values.transitionDurationFast," ease;",reduceMotion("transition")," z-index:1;");const toggle_group_control_backdrop=(0,react.memo)((function ToggleGroupControlBackdrop(_ref){let{containerRef,containerWidth,isAdaptiveWidth,state}=_ref;const[left,setLeft]=(0,react.useState)(0),[width,setWidth]=(0,react.useState)(0),[canAnimate,setCanAnimate]=(0,react.useState)(!1),[renderBackdrop,setRenderBackdrop]=(0,react.useState)(!1);return(0,react.useEffect)((()=>{const containerNode=null==containerRef?void 0:containerRef.current;if(!containerNode)return;const targetNode=containerNode.querySelector(`[data-value="${state}"]`);if(setRenderBackdrop(!!targetNode),!targetNode)return;const dimensionsRequestId=window.setTimeout((()=>{const{width:offsetWidth,x}=targetNode.getBoundingClientRect(),{x:parentX}=containerNode.getBoundingClientRect();setLeft(x-parentX-1),setWidth(offsetWidth)}),100);let animationRequestId;return canAnimate||(animationRequestId=window.requestAnimationFrame((()=>{setCanAnimate(!0)}))),()=>{window.clearTimeout(dimensionsRequestId),window.cancelAnimationFrame(animationRequestId)}}),[canAnimate,containerRef,containerWidth,state,isAdaptiveWidth]),renderBackdrop?(0,react.createElement)(BackdropView,{role:"presentation",style:{transform:`translateX(${left}px)`,transition:canAnimate?void 0:"none",width}}):null})),ToggleGroupControlContext=(0,react.createContext)({}),toggle_group_control_context=ToggleGroupControlContext,toggle_group_control_component_noop=()=>{};const component_ToggleGroupControl=contextConnect((function UnconnectedToggleGroupControl(props,forwardedRef){const{__nextHasNoMarginBottom=!1,className,isAdaptiveWidth=!1,isBlock=!1,__experimentalIsIconGroup=!1,label,hideLabelFromVision=!1,help,onChange=toggle_group_control_component_noop,size="default",value,children,...otherProps}=useContextSystem(props,"ToggleGroupControl"),cx=useCx(),containerRef=(0,react.useRef)(),[resizeListener,sizes]=useResizeAware(),radio=function useRadioState(initialState){void 0===initialState&&(initialState={});var _useSealedState=(0,useSealedState.N)(initialState),initialValue=_useSealedState.state,_useSealedState$loop=_useSealedState.loop,loop=void 0===_useSealedState$loop||_useSealedState$loop,sealed=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_useSealedState,["state","loop"]),_React$useState=(0,react.useState)(initialValue),state=_React$useState[0],setState=_React$useState[1],composite=(0,CompositeState.A)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},sealed),{},{loop}));return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({},composite),{},{state,setState})}({baseId:(0,use_instance_id.A)(component_ToggleGroupControl,"toggle-group-control").toString(),state:value}),previousValue=usePrevious(value);use_update_effect((()=>{previousValue!==radio.state&&onChange(radio.state)}),[radio.state]),use_update_effect((()=>{value!==radio.state&&radio.setState(value)}),[value]);const classes=(0,react.useMemo)((()=>cx((_ref=>{let{size}=_ref;return(0,emotion_react_browser_esm.AH)("background:",COLORS.ui.background,";border:1px solid transparent;border-radius:",config_values.controlBorderRadius,";display:inline-flex;min-width:0;padding:2px;position:relative;transition:transform ",config_values.transitionDurationFastest," linear;",reduceMotion("transition")," ",toggleGroupControlSize(size)," &:focus-within{border-color:",COLORS.ui.borderFocus,";box-shadow:",config_values.controlBoxShadowFocus,";outline:none;z-index:1;}","")})({size}),!__experimentalIsIconGroup&&styles_border,isBlock&&toggle_group_control_styles_block,className)),[className,cx,isBlock,__experimentalIsIconGroup,size]);return(0,react.createElement)(base_control,{help,__nextHasNoMarginBottom},(0,react.createElement)(toggle_group_control_context.Provider,{value:{...radio,isBlock:!isAdaptiveWidth,size}},!hideLabelFromVision&&(0,react.createElement)("div",null,(0,react.createElement)(base_control.VisualLabel,null,label)),(0,react.createElement)(RadioGroup,(0,helpers_esm_extends.A)({},radio,{"aria-label":label,as:component,className:classes},otherProps,{ref:(0,use_merge_refs.A)([containerRef,forwardedRef])}),resizeListener,(0,react.createElement)(toggle_group_control_backdrop,(0,helpers_esm_extends.A)({},radio,{containerRef,containerWidth:sizes.width,isAdaptiveWidth})),children)))}),"ToggleGroupControl"),toggle_group_control_component=component_ToggleGroupControl;var createEvent=__webpack_require__("../../node_modules/.pnpm/reakit-utils@0.15.2_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/reakit-utils/es/createEvent.js");function getChecked(options){return void 0!==options.checked?options.checked:void 0!==options.value&&options.state===options.value}function fireChange(element,onChange){var event=(0,createEvent.l)(element,"change");Object.defineProperties(event,{type:{value:"change"},target:{value:element},currentTarget:{value:element}}),null==onChange||onChange(event)}var useRadio=(0,createHook.a)({name:"Radio",compose:CompositeItem.k,keys:RADIO_KEYS,useOptions:function useOptions(_ref,_ref2){var _options$value,value=_ref2.value,checked=_ref2.checked,_ref$unstable_clickOn=_ref.unstable_clickOnEnter,unstable_clickOnEnter=void 0!==_ref$unstable_clickOn&&_ref$unstable_clickOn,_ref$unstable_checkOn=_ref.unstable_checkOnFocus,unstable_checkOnFocus=void 0===_ref$unstable_checkOn||_ref$unstable_checkOn,options=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref,["unstable_clickOnEnter","unstable_checkOnFocus"]);return(0,_rollupPluginBabelHelpers_1f0bf8c2.a)((0,_rollupPluginBabelHelpers_1f0bf8c2.a)({checked,unstable_clickOnEnter,unstable_checkOnFocus},options),{},{value:null!=(_options$value=options.value)?_options$value:value})},useProps:function useProps(options,_ref3){var htmlRef=_ref3.ref,htmlOnChange=_ref3.onChange,htmlOnClick=_ref3.onClick,htmlProps=(0,_rollupPluginBabelHelpers_1f0bf8c2._)(_ref3,["ref","onChange","onClick"]),ref=(0,react.useRef)(null),_React$useState3=(0,react.useState)(!0),isNativeRadio=_React$useState3[0],setIsNativeRadio=_React$useState3[1],checked=getChecked(options),isCurrentItemRef=(0,useLiveRef.h)(options.currentId===options.id),onChangeRef=(0,useLiveRef.h)(htmlOnChange),onClickRef=(0,useLiveRef.h)(htmlOnClick);!function useInitialChecked(options){var initialChecked=(0,react.useState)((function(){return getChecked(options)}))[0],initialCurrentId=(0,react.useState)(options.currentId)[0],id=options.id,setCurrentId=options.setCurrentId;(0,react.useEffect)((function(){initialChecked&&id&&initialCurrentId!==id&&(null==setCurrentId||setCurrentId(id))}),[initialChecked,id,setCurrentId,initialCurrentId])}(options),(0,react.useEffect)((function(){var element=ref.current;element&&("INPUT"===element.tagName&&"radio"===element.type||setIsNativeRadio(!1))}),[]);var onChange=(0,react.useCallback)((function(event){var _onChangeRef$current,_options$setState;null===(_onChangeRef$current=onChangeRef.current)||void 0===_onChangeRef$current||_onChangeRef$current.call(onChangeRef,event),event.defaultPrevented||options.disabled||null===(_options$setState=options.setState)||void 0===_options$setState||_options$setState.call(options,options.value)}),[options.disabled,options.setState,options.value]),onClick=(0,react.useCallback)((function(event){var _onClickRef$current;null===(_onClickRef$current=onClickRef.current)||void 0===_onClickRef$current||_onClickRef$current.call(onClickRef,event),event.defaultPrevented||isNativeRadio||fireChange(event.currentTarget,onChange)}),[onChange,isNativeRadio]);return(0,react.useEffect)((function(){var element=ref.current;element&&options.unstable_moves&&isCurrentItemRef.current&&options.unstable_checkOnFocus&&fireChange(element,onChange)}),[options.unstable_moves,options.unstable_checkOnFocus,onChange]),(0,_rollupPluginBabelHelpers_1f0bf8c2.a)({ref:(0,useForkRef.N)(ref,htmlRef),role:isNativeRadio?void 0:"radio",type:isNativeRadio?"radio":void 0,value:isNativeRadio?options.value:void 0,name:isNativeRadio?options.baseId:void 0,"aria-checked":checked,checked,onChange,onClick},htmlProps)}}),Radio=(0,createComponent.a)({as:"input",memo:!0,useHook:useRadio});const LabelView=(0,emotion_styled_base_browser_esm.A)("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),labelBlock={name:"82a6rk",styles:"flex:1"},buttonView=(0,emotion_react_browser_esm.AH)("align-items:center;appearance:none;background:transparent;border:none;border-radius:",config_values.controlBorderRadius,";color:",COLORS.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;transition:background ",config_values.transitionDurationFast," linear,color ",config_values.transitionDurationFast," linear,font-weight 60ms linear;",reduceMotion("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",config_values.toggleGroupControlBackgroundColor,";}",""),buttonActive=(0,emotion_react_browser_esm.AH)("color:",COLORS.white,";&:active{background:transparent;}",""),ButtonContentView=(0,emotion_styled_base_browser_esm.A)("div",{target:"et6ln9s0"})("font-size:",config_values.fontSize,";line-height:1;"),styles_isIcon=_ref=>{let{size}=_ref;return(0,emotion_react_browser_esm.AH)("width:",{default:"30px","__unstable-large":"34px"}[size],";padding-left:0;padding-right:0;","")},{ButtonContentView:component_ButtonContentView,LabelView:component_LabelView}=toggle_group_control_option_base_styles_namespaceObject,WithToolTip=_ref=>{let{showTooltip,text,children}=_ref;return showTooltip&&text?(0,react.createElement)(tooltip,{text,position:"top center"},children):(0,react.createElement)(react.Fragment,null,children)};const ConnectedToggleGroupControlOptionBase=contextConnect((function ToggleGroupControlOptionBase(props,forwardedRef){const toggleGroupControlContext=(0,react.useContext)(ToggleGroupControlContext),buttonProps=useContextSystem({...props,id:(0,use_instance_id.A)(ToggleGroupControlOptionBase,toggleGroupControlContext.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{className,isBlock=!1,isIcon=!1,value,children,size="default",showTooltip=!1,...radioProps}={...toggleGroupControlContext,...buttonProps},isActive=radioProps.state===value,cx=useCx(),labelViewClasses=cx(isBlock&&labelBlock),classes=cx(buttonView,isIcon&&styles_isIcon({size}),className,isActive&&buttonActive);return(0,react.createElement)(component_LabelView,{className:labelViewClasses,"data-active":isActive},(0,react.createElement)(WithToolTip,{showTooltip,text:radioProps["aria-label"]},(0,react.createElement)(Radio,(0,helpers_esm_extends.A)({},radioProps,{as:"button","aria-label":radioProps["aria-label"],className:classes,"data-value":value,ref:forwardedRef,value}),(0,react.createElement)(component_ButtonContentView,null,children))))}),"ToggleGroupControlOptionBase"),toggle_group_control_option_base_component=ConnectedToggleGroupControlOptionBase;const toggle_group_control_option_component=(0,react.forwardRef)((function UnforwardedToggleGroupControlOption(props,ref){const{label,...restProps}=props,optionLabel=restProps["aria-label"]||label;return(0,react.createElement)(toggle_group_control_option_base_component,(0,helpers_esm_extends.A)({},restProps,{"aria-label":optionLabel,ref}),label)})),DEFAULT_FONT_SIZE_OPTION={slug:"default",name:(0,_wordpress_i18n_build_module.__)("Default")},CUSTOM_FONT_SIZE_OPTION={slug:"custom",name:(0,_wordpress_i18n_build_module.__)("Custom")},FONT_SIZES_ALIASES=[(0,_wordpress_i18n_build_module.__)("S"),(0,_wordpress_i18n_build_module.__)("M"),(0,_wordpress_i18n_build_module.__)("L"),(0,_wordpress_i18n_build_module.__)("XL"),(0,_wordpress_i18n_build_module.__)("XXL")];function isSimpleCssValue(value){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(value)}function getFontSizeOptions(useSelectControl,optionsArray,disableCustomFontSizes){return disableCustomFontSizes&&!optionsArray.length?null:useSelectControl?function getSelectOptions(optionsArray,disableCustomFontSizes){const options=[DEFAULT_FONT_SIZE_OPTION,...optionsArray,...disableCustomFontSizes?[]:[CUSTOM_FONT_SIZE_OPTION]];return options.map((_ref=>{let{slug,name,size}=_ref;return{key:slug,name,size,__experimentalHint:size&&isSimpleCssValue(size)&&parseFloat(size)}}))}(optionsArray,disableCustomFontSizes):function getToggleGroupOptions(optionsArray){let labelAliases=arguments.length>1&&void 0!==arguments[1]?arguments[1]:FONT_SIZES_ALIASES;return optionsArray.map(((_ref2,index)=>{let{slug,size,name}=_ref2;return{key:slug,value:size,label:labelAliases[index],name}}))}(optionsArray)}const MaybeVStack=_ref=>{let{__nextHasNoMarginBottom,children}=_ref;return __nextHasNoMarginBottom?(0,react.createElement)(v_stack_component,{spacing:6,children}):children};const font_size_picker=(0,react.forwardRef)((function FontSizePicker(_ref2,ref){var _fontSizes$,_value$endsWith;let{__nextHasNoMarginBottom=!1,fallbackFontSize,fontSizes=[],disableCustomFontSizes=!1,onChange,size="default",value,withSlider=!1,withReset=!0}=_ref2;const hasUnits=[typeof value,typeof(null==fontSizes||null===(_fontSizes$=fontSizes[0])||void 0===_fontSizes$?void 0:_fontSizes$.size)].includes("string"),noUnitsValue=hasUnits?parseInt(value):value,isPixelValue="number"==typeof value||(null==value||null===(_value$endsWith=value.endsWith)||void 0===_value$endsWith?void 0:_value$endsWith.call(value,"px")),units=useCustomUnits({availableUnits:["px","em","rem"]}),fontSizesContainComplexValues=fontSizes.some((_ref3=>{let{size:sizeArg}=_ref3;return!isSimpleCssValue(sizeArg)})),shouldUseSelectControl=fontSizes.length>5,options=(0,react.useMemo)((()=>getFontSizeOptions(shouldUseSelectControl,fontSizes,disableCustomFontSizes)),[shouldUseSelectControl,fontSizes,disableCustomFontSizes]),selectedOption=function getSelectedOption(fontSizes,value){return value?fontSizes.find((font=>font.size===value))||CUSTOM_FONT_SIZE_OPTION:DEFAULT_FONT_SIZE_OPTION}(fontSizes,value),isCustomValue="custom"===selectedOption.slug,[showCustomValueControl,setShowCustomValueControl]=(0,react.useState)(!disableCustomFontSizes&&isCustomValue),headerHint=(0,react.useMemo)((()=>{if(showCustomValueControl)return`(${(0,_wordpress_i18n_build_module.__)("Custom")})`;if(isCustomValue)return isSimpleCssValue(value)&&`(${value})`;if(shouldUseSelectControl)return isSimpleCssValue(null==selectedOption?void 0:selectedOption.size)&&`(${null==selectedOption?void 0:selectedOption.size})`;let hint=selectedOption.name;if(!fontSizesContainComplexValues&&"string"==typeof selectedOption.size){const[,unit]=function splitValueAndUnitFromSize(size){const[numericValue,unit]=`${size}`.match(/[\d\.]+|\D+/g);return!isNaN(parseFloat(numericValue))&&isFinite(numericValue)?[numericValue,unit]:[]}(selectedOption.size);hint+=`(${unit})`}return hint}),[showCustomValueControl,null==selectedOption?void 0:selectedOption.name,null==selectedOption?void 0:selectedOption.size,value,isCustomValue,shouldUseSelectControl,fontSizesContainComplexValues]);if(!options)return null;const currentFontSizeSR=(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Currently selected font size: %s"),selectedOption.name),baseClassName="components-font-size-picker";return(0,react.createElement)("fieldset",(0,helpers_esm_extends.A)({className:baseClassName},ref?{}:{ref}),(0,react.createElement)(visually_hidden_component,{as:"legend"},(0,_wordpress_i18n_build_module.__)("Font size")),(0,react.createElement)(h_stack_component,{className:`${baseClassName}__header`},(0,react.createElement)(BaseControl.VisualLabel,null,(0,_wordpress_i18n_build_module.__)("Size"),headerHint&&(0,react.createElement)("span",{className:`${baseClassName}__header__hint`},headerHint)),!disableCustomFontSizes&&(0,react.createElement)(build_module_button,{label:showCustomValueControl?(0,_wordpress_i18n_build_module.__)("Use size preset"):(0,_wordpress_i18n_build_module.__)("Set custom size"),icon:library_settings,onClick:()=>{setShowCustomValueControl(!showCustomValueControl)},isPressed:showCustomValueControl,isSmall:!0})),(0,react.createElement)(MaybeVStack,{__nextHasNoMarginBottom},(0,react.createElement)("div",{className:classnames_default()(`${baseClassName}__controls`,{"is-next-has-no-margin-bottom":__nextHasNoMarginBottom})},!!fontSizes.length&&shouldUseSelectControl&&!showCustomValueControl&&(0,react.createElement)(CustomSelectControl,{__nextUnconstrainedWidth:!0,className:`${baseClassName}__select`,label:(0,_wordpress_i18n_build_module.__)("Font size"),hideLabelFromVision:!0,describedBy:currentFontSizeSR,options,value:options.find((option=>option.key===selectedOption.slug)),onChange:_ref4=>{let{selectedItem}=_ref4;onChange(hasUnits?selectedItem.size:Number(selectedItem.size)),"custom"===selectedItem.key&&setShowCustomValueControl(!0)},size}),!shouldUseSelectControl&&!showCustomValueControl&&(0,react.createElement)(toggle_group_control_component,{__nextHasNoMarginBottom,label:(0,_wordpress_i18n_build_module.__)("Font size"),hideLabelFromVision:!0,value,onChange:newValue=>{onChange(hasUnits?newValue:Number(newValue))},isBlock:!0,size},options.map((option=>(0,react.createElement)(toggle_group_control_option_component,{key:option.key,value:option.value,label:option.label,"aria-label":option.name,showTooltip:!0})))),!withSlider&&!disableCustomFontSizes&&showCustomValueControl&&(0,react.createElement)(flex_component,{justify:"space-between",className:`${baseClassName}__custom-size-control`},(0,react.createElement)(flex_item_component,{isBlock:!0},(0,react.createElement)(unit_control,{label:(0,_wordpress_i18n_build_module.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value,onChange:nextSize=>{0!==parseFloat(nextSize)&&nextSize?onChange(hasUnits?nextSize:parseInt(nextSize,10)):onChange(void 0)},size,units:hasUnits?units:[]})),withReset&&(0,react.createElement)(flex_item_component,{isBlock:!0},(0,react.createElement)(build_module_button,{className:"components-color-palette__clear",disabled:void 0===value,onClick:()=>{onChange(void 0)},isSmall:!0,variant:"secondary"},(0,_wordpress_i18n_build_module.__)("Reset"))))),withSlider&&(0,react.createElement)(range_control,{__nextHasNoMarginBottom,className:`${baseClassName}__custom-input`,label:(0,_wordpress_i18n_build_module.__)("Custom Size"),value:isPixelValue&&noUnitsValue||"",initialPosition:fallbackFontSize,onChange:newValue=>{onChange(hasUnits?newValue+"px":newValue)},min:12,max:100})))}));const font_sizes_font_size_picker=function font_size_picker_FontSizePicker(props){const fontSizes=use_setting_useSetting("typography.fontSizes"),disableCustomFontSizes=!use_setting_useSetting("typography.customFontSize");return(0,react.createElement)(font_size_picker,(0,esm_extends.A)({},props,{fontSizes,disableCustomFontSizes}))},FONT_SIZE_SUPPORT_KEY="typography.fontSize";function font_size_addSaveProps(props,blockType,attributes){if(!(0,build_module.pN)(blockType,FONT_SIZE_SUPPORT_KEY))return props;if(shouldSkipSerialization(blockType,TYPOGRAPHY_SUPPORT_KEY,"fontSize"))return props;const classes=new TokenList(props.className);classes.add(function getFontSizeClass(fontSizeSlug){if(fontSizeSlug)return`has-${(0,lodash.kebabCase)(fontSizeSlug)}-font-size`}(attributes.fontSize));const newClassName=classes.value;return props.className=newClassName||void 0,props}function FontSizeEdit(props){var _style$typography,_style$typography2;const{attributes:{fontSize,style},setAttributes}=props,fontSizes=use_setting_useSetting("typography.fontSizes"),fontSizeObject=utils_getFontSize(fontSizes,fontSize,null==style||null===(_style$typography=style.typography)||void 0===_style$typography?void 0:_style$typography.fontSize),fontSizeValue=(null==fontSizeObject?void 0:fontSizeObject.size)||(null==style||null===(_style$typography2=style.typography)||void 0===_style$typography2?void 0:_style$typography2.fontSize)||fontSize;return(0,react.createElement)(font_sizes_font_size_picker,{onChange:value=>{const fontSizeSlug=function getFontSizeObjectByValue(fontSizes,value){const fontSizeObject=(0,lodash.find)(fontSizes,{size:value});return fontSizeObject||{size:value}}(fontSizes,value).slug;setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,fontSize:fontSizeSlug?void 0:value}}),fontSize:fontSizeSlug})},value:fontSizeValue,withReset:!1})}function useIsFontSizeDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const fontSizes=use_setting_useSetting("typography.fontSizes"),hasFontSizes=!(null==fontSizes||!fontSizes.length);return!(0,build_module.pN)(blockName,FONT_SIZE_SUPPORT_KEY)||!hasFontSizes}const withFontSizeInlineStyles=(0,create_higher_order_component.f)((BlockListBlock=>props=>{var _style$typography4,_style$typography5;const fontSizes=use_setting_useSetting("typography.fontSizes"),{name:blockName,attributes:{fontSize,style},wrapperProps}=props;if(!(0,build_module.pN)(blockName,FONT_SIZE_SUPPORT_KEY)||shouldSkipSerialization(blockName,TYPOGRAPHY_SUPPORT_KEY,"fontSize")||!fontSize||null!=style&&null!==(_style$typography4=style.typography)&&void 0!==_style$typography4&&_style$typography4.fontSize)return(0,react.createElement)(BlockListBlock,props);const fontSizeValue=utils_getFontSize(fontSizes,fontSize,null==style||null===(_style$typography5=style.typography)||void 0===_style$typography5?void 0:_style$typography5.fontSize).size,newProps={...props,wrapperProps:{...wrapperProps,style:{fontSize:fontSizeValue,...null==wrapperProps?void 0:wrapperProps.style}}};return(0,react.createElement)(BlockListBlock,newProps)}),"withFontSizeInlineStyles"),font_size_MIGRATION_PATHS={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,hooks_build_module.U2)("blocks.registerBlockType","core/font/addAttribute",(function font_size_addAttributes(settings){return(0,build_module.pN)(settings,FONT_SIZE_SUPPORT_KEY)?(settings.attributes.fontSize||Object.assign(settings.attributes,{fontSize:{type:"string"}}),settings):settings})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/font/addSaveProps",font_size_addSaveProps),(0,hooks_build_module.U2)("blocks.registerBlockType","core/font/addEditProps",(function font_size_addEditProps(settings){if(!(0,build_module.pN)(settings,FONT_SIZE_SUPPORT_KEY))return settings;const existingGetEditWrapperProps=settings.getEditWrapperProps;return settings.getEditWrapperProps=attributes=>{let props={};return existingGetEditWrapperProps&&(props=existingGetEditWrapperProps(attributes)),font_size_addSaveProps(props,settings,attributes)},settings})),(0,hooks_build_module.U2)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",withFontSizeInlineStyles),(0,hooks_build_module.U2)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function font_size_addTransforms(result,source,index,results){const destinationBlockType=result.name;return transformStyles({fontSize:(0,build_module.pN)(destinationBlockType,FONT_SIZE_SUPPORT_KEY)},font_size_MIGRATION_PATHS,result,source,index,results)}));const format_underline=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),format_strikethrough=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})),TEXT_DECORATIONS=[{name:(0,i18n_build_module.__)("Underline"),value:"underline",icon:format_underline},{name:(0,i18n_build_module.__)("Strikethrough"),value:"line-through",icon:format_strikethrough}];function TextDecorationControl(_ref){let{value,onChange}=_ref;return(0,react.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,react.createElement)(base_control.VisualLabel,{as:"legend"},(0,i18n_build_module.__)("Decoration")),(0,react.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},TEXT_DECORATIONS.map((textDecoration=>(0,react.createElement)(build_module_button,{key:textDecoration.value,icon:textDecoration.icon,isSmall:!0,isPressed:textDecoration.value===value,onClick:()=>onChange(textDecoration.value===value?void 0:textDecoration.value),"aria-label":textDecoration.name})))))}const TEXT_DECORATION_SUPPORT_KEY="typography.__experimentalTextDecoration";function TextDecorationEdit(props){var _style$typography;const{attributes:{style},setAttributes}=props;return(0,react.createElement)(TextDecorationControl,{value:null==style||null===(_style$typography=style.typography)||void 0===_style$typography?void 0:_style$typography.textDecoration,onChange:function onChange(newDecoration){setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,textDecoration:newDecoration}})})}})}function useIsTextDecorationDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const notSupported=!(0,build_module.pN)(blockName,TEXT_DECORATION_SUPPORT_KEY),hasTextDecoration=use_setting_useSetting("typography.textDecoration");return notSupported||!hasTextDecoration}const format_uppercase=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),format_lowercase=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),format_capitalize=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),TEXT_TRANSFORMS=[{name:(0,i18n_build_module.__)("Uppercase"),value:"uppercase",icon:format_uppercase},{name:(0,i18n_build_module.__)("Lowercase"),value:"lowercase",icon:format_lowercase},{name:(0,i18n_build_module.__)("Capitalize"),value:"capitalize",icon:format_capitalize}];function TextTransformControl(_ref){let{value,onChange}=_ref;return(0,react.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,react.createElement)(base_control.VisualLabel,{as:"legend"},(0,i18n_build_module.__)("Letter case")),(0,react.createElement)("div",{className:"block-editor-text-transform-control__buttons"},TEXT_TRANSFORMS.map((textTransform=>(0,react.createElement)(build_module_button,{key:textTransform.value,icon:textTransform.icon,isSmall:!0,isPressed:value===textTransform.value,"aria-label":textTransform.name,onClick:()=>onChange(value===textTransform.value?void 0:textTransform.value)})))))}const TEXT_TRANSFORM_SUPPORT_KEY="typography.__experimentalTextTransform";function TextTransformEdit(props){var _style$typography;const{attributes:{style},setAttributes}=props;return(0,react.createElement)(TextTransformControl,{value:null==style||null===(_style$typography=style.typography)||void 0===_style$typography?void 0:_style$typography.textTransform,onChange:function onChange(newTransform){setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,textTransform:newTransform}})})}})}function useIsTextTransformDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const notSupported=!(0,build_module.pN)(blockName,TEXT_TRANSFORM_SUPPORT_KEY),hasTextTransforms=use_setting_useSetting("typography.textTransform");return notSupported||!hasTextTransforms}function LetterSpacingControl(_ref){let{value,onChange,__unstableInputWidth="60px",...otherProps}=_ref;const units=useCustomUnits({availableUnits:use_setting_useSetting("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,react.createElement)(unit_control,(0,esm_extends.A)({},otherProps,{label:(0,i18n_build_module.__)("Letter spacing"),value,__unstableInputWidth,units,onChange}))}const LETTER_SPACING_SUPPORT_KEY="typography.__experimentalLetterSpacing";function LetterSpacingEdit(props){var _style$typography;const{attributes:{style},setAttributes}=props;return(0,react.createElement)(LetterSpacingControl,{value:null==style||null===(_style$typography=style.typography)||void 0===_style$typography?void 0:_style$typography.letterSpacing,onChange:function onChange(newSpacing){setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,letterSpacing:newSpacing}})})},__unstableInputWidth:"100%"})}function useIsLetterSpacingDisabled(){let{name:blockName}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const notSupported=!(0,build_module.pN)(blockName,LETTER_SPACING_SUPPORT_KEY),hasLetterSpacing=use_setting_useSetting("typography.letterSpacing");return notSupported||!hasLetterSpacing}const TYPOGRAPHY_SUPPORT_KEY="typography",TYPOGRAPHY_SUPPORT_KEYS=[LINE_HEIGHT_SUPPORT_KEY,FONT_SIZE_SUPPORT_KEY,FONT_STYLE_SUPPORT_KEY,FONT_WEIGHT_SUPPORT_KEY,FONT_FAMILY_SUPPORT_KEY,TEXT_DECORATION_SUPPORT_KEY,TEXT_TRANSFORM_SUPPORT_KEY,LETTER_SPACING_SUPPORT_KEY];function TypographyPanel(props){const{clientId}=props,isFontFamilyDisabled=useIsFontFamilyDisabled(props),isFontSizeDisabled=useIsFontSizeDisabled(props),isFontAppearanceDisabled=useIsFontAppearanceDisabled(props),isLineHeightDisabled=useIsLineHeightDisabled(props),isTextDecorationDisabled=useIsTextDecorationDisabled(props),isTextTransformDisabled=useIsTextTransformDisabled(props),isLetterSpacingDisabled=useIsLetterSpacingDisabled(props),hasFontStyles=!useIsFontStyleDisabled(props),hasFontWeights=!useIsFontWeightDisabled(props),isDisabled=function useIsTypographyDisabled(){let props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const configs=[useIsFontAppearanceDisabled(props),useIsFontSizeDisabled(props),useIsLineHeightDisabled(props),useIsFontFamilyDisabled(props),useIsTextDecorationDisabled(props),useIsTextTransformDisabled(props),useIsLetterSpacingDisabled(props)];return configs.filter(Boolean).length===configs.length}(props),isSupported=hasTypographySupport(props.name);if(isDisabled||!isSupported)return null;const defaultControls=(0,build_module.bI)(props.name,[TYPOGRAPHY_SUPPORT_KEY,"__experimentalDefaultControls"]),createResetAllFilter=attribute=>newAttributes=>{var _newAttributes$style;return{...newAttributes,style:{...newAttributes.style,typography:{...null===(_newAttributes$style=newAttributes.style)||void 0===_newAttributes$style?void 0:_newAttributes$style.typography,[attribute]:void 0}}}};return(0,react.createElement)(inspector_controls,{__experimentalGroup:"typography"},!isFontFamilyDisabled&&(0,react.createElement)(tools_panel_item_component,{hasValue:()=>function hasFontFamilyValue(props){return!!props.attributes.fontFamily}(props),label:(0,i18n_build_module.__)("Font family"),onDeselect:()=>function resetFontFamily(_ref5){let{setAttributes}=_ref5;setAttributes({fontFamily:void 0})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.fontFamily,resetAllFilter:newAttributes=>({...newAttributes,fontFamily:void 0}),panelId:clientId},(0,react.createElement)(FontFamilyEdit,props)),!isFontSizeDisabled&&(0,react.createElement)(tools_panel_item_component,{hasValue:()=>function hasFontSizeValue(props){var _style$typography3;const{fontSize,style}=props.attributes;return!!fontSize||!(null==style||null===(_style$typography3=style.typography)||void 0===_style$typography3||!_style$typography3.fontSize)}(props),label:(0,i18n_build_module.__)("Font size"),onDeselect:()=>function resetFontSize(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({fontSize:void 0,style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,fontSize:void 0}})})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.fontSize,resetAllFilter:newAttributes=>{var _newAttributes$style2;return{...newAttributes,fontSize:void 0,style:{...newAttributes.style,typography:{...null===(_newAttributes$style2=newAttributes.style)||void 0===_newAttributes$style2?void 0:_newAttributes$style2.typography,fontSize:void 0}}}},panelId:clientId},(0,react.createElement)(FontSizeEdit,props)),!isFontAppearanceDisabled&&(0,react.createElement)(tools_panel_item_component,{className:"single-column",hasValue:()=>function hasFontAppearanceValue(props){var _props$attributes$sty;const{fontStyle,fontWeight}=(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty?void 0:_props$attributes$sty.typography)||{};return!!fontStyle||!!fontWeight}(props),label:getFontAppearanceLabel(hasFontStyles,hasFontWeights),onDeselect:()=>function resetFontAppearance(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,fontStyle:void 0,fontWeight:void 0}})})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.fontAppearance,resetAllFilter:newAttributes=>{var _newAttributes$style3;return{...newAttributes,style:{...newAttributes.style,typography:{...null===(_newAttributes$style3=newAttributes.style)||void 0===_newAttributes$style3?void 0:_newAttributes$style3.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:clientId},(0,react.createElement)(FontAppearanceEdit,props)),!isLineHeightDisabled&&(0,react.createElement)(tools_panel_item_component,{className:"single-column",hasValue:()=>function hasLineHeightValue(props){var _props$attributes$sty,_props$attributes$sty2;return!(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.typography)||void 0===_props$attributes$sty2||!_props$attributes$sty2.lineHeight)}(props),label:(0,i18n_build_module.__)("Line height"),onDeselect:()=>function resetLineHeight(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,lineHeight:void 0}})})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.lineHeight,resetAllFilter:createResetAllFilter("lineHeight"),panelId:clientId},(0,react.createElement)(LineHeightEdit,props)),!isTextDecorationDisabled&&(0,react.createElement)(tools_panel_item_component,{className:"single-column",hasValue:()=>function hasTextDecorationValue(props){var _props$attributes$sty,_props$attributes$sty2;return!(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.typography)||void 0===_props$attributes$sty2||!_props$attributes$sty2.textDecoration)}(props),label:(0,i18n_build_module.__)("Decoration"),onDeselect:()=>function resetTextDecoration(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,textDecoration:void 0}})})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.textDecoration,resetAllFilter:createResetAllFilter("textDecoration"),panelId:clientId},(0,react.createElement)(TextDecorationEdit,props)),!isTextTransformDisabled&&(0,react.createElement)(tools_panel_item_component,{className:"single-column",hasValue:()=>function hasTextTransformValue(props){var _props$attributes$sty,_props$attributes$sty2;return!(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.typography)||void 0===_props$attributes$sty2||!_props$attributes$sty2.textTransform)}(props),label:(0,i18n_build_module.__)("Letter case"),onDeselect:()=>function resetTextTransform(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,textTransform:void 0}})})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.textTransform,resetAllFilter:createResetAllFilter("textTransform"),panelId:clientId},(0,react.createElement)(TextTransformEdit,props)),!isLetterSpacingDisabled&&(0,react.createElement)(tools_panel_item_component,{className:"single-column",hasValue:()=>function hasLetterSpacingValue(props){var _props$attributes$sty,_props$attributes$sty2;return!(null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.typography)||void 0===_props$attributes$sty2||!_props$attributes$sty2.letterSpacing)}(props),label:(0,i18n_build_module.__)("Letter spacing"),onDeselect:()=>function resetLetterSpacing(_ref){let{attributes={},setAttributes}=_ref;const{style}=attributes;setAttributes({style:cleanEmptyObject({...style,typography:{...null==style?void 0:style.typography,letterSpacing:void 0}})})}(props),isShownByDefault:null==defaultControls?void 0:defaultControls.letterSpacing,resetAllFilter:createResetAllFilter("letterSpacing"),panelId:clientId},(0,react.createElement)(LetterSpacingEdit,props)))}const hasTypographySupport=blockName=>TYPOGRAPHY_SUPPORT_KEYS.some((key=>(0,build_module.pN)(blockName,key)));const styleSupportKeys=[...TYPOGRAPHY_SUPPORT_KEYS,BORDER_SUPPORT_KEY,COLOR_SUPPORT_KEY,SPACING_SUPPORT_KEY],hasStyleSupport=blockType=>styleSupportKeys.some((key=>(0,build_module.pN)(blockType,key)));function style_getInlineStyles(){const output={};return getCSSRules(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).forEach((rule=>{output[rule.key]=rule.value})),output}const skipSerializationPathsEdit={[`${BORDER_SUPPORT_KEY}.__experimentalSkipSerialization`]:["border"],[`${COLOR_SUPPORT_KEY}.__experimentalSkipSerialization`]:[COLOR_SUPPORT_KEY],[`${TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]:[TYPOGRAPHY_SUPPORT_KEY],[`${SPACING_SUPPORT_KEY}.__experimentalSkipSerialization`]:["spacing"]},skipSerializationPathsSave={...skipSerializationPathsEdit,[`${SPACING_SUPPORT_KEY}`]:["spacing.blockGap"]},renamedFeatures={gradients:"gradient"};function style_addSaveProps(props,blockType,attributes){let skipPaths=arguments.length>3&&void 0!==arguments[3]?arguments[3]:skipSerializationPathsSave;if(!hasStyleSupport(blockType))return props;let{style}=attributes;return Object.entries(skipPaths).forEach((_ref=>{let[indicator,path]=_ref;const skipSerialization=(0,build_module.bI)(blockType,indicator);!0===skipSerialization&&(style=(0,lodash.omit)(style,path)),Array.isArray(skipSerialization)&&skipSerialization.forEach((featureName=>{const feature=renamedFeatures[featureName]||featureName;style=(0,lodash.omit)(style,[[...path,feature]])}))})),props.style={...style_getInlineStyles(style),...props.style},props}const withBlockControls=(0,create_higher_order_component.f)((BlockEdit=>props=>{const shouldDisplayControls=useDisplayBlockControls();return(0,react.createElement)(react.Fragment,null,shouldDisplayControls&&(0,react.createElement)(react.Fragment,null,(0,react.createElement)(ColorEdit,props),(0,react.createElement)(TypographyPanel,props),(0,react.createElement)(BorderPanel,props),(0,react.createElement)(DimensionsPanel,props)),(0,react.createElement)(BlockEdit,props))}),"withToolbarControls"),withElementsStyles=(0,create_higher_order_component.f)((BlockListBlock=>props=>{var _props$attributes$sty2,_props$attributes$sty3;const blockElementsContainerIdentifier=`wp-elements-${(0,use_instance_id.A)(BlockListBlock)}`,skipLinkColorSerialization=shouldSkipSerialization(props.name,COLOR_SUPPORT_KEY,"link"),styles=(0,react.useMemo)((()=>{var _props$attributes$sty;const rawElementsStyles=null===(_props$attributes$sty=props.attributes.style)||void 0===_props$attributes$sty?void 0:_props$attributes$sty.elements,elementCssRules=[];if(rawElementsStyles&&Object.keys(rawElementsStyles).length>0){var _rawElementsStyles$li;const filteredElementsStyles={...rawElementsStyles,link:{...rawElementsStyles.link,color:skipLinkColorSerialization||null===(_rawElementsStyles$li=rawElementsStyles.link)||void 0===_rawElementsStyles$li?void 0:_rawElementsStyles$li.color}};for(const[elementName,elementStyles]of Object.entries(filteredElementsStyles)){const cssRule=compileCSS(elementStyles,{selector:`.editor-styles-wrapper .${blockElementsContainerIdentifier} ${build_module.dB[elementName]}`});cssRule&&elementCssRules.push(cssRule)}}return elementCssRules.length>0?elementCssRules:void 0}),[null===(_props$attributes$sty2=props.attributes.style)||void 0===_props$attributes$sty2?void 0:_props$attributes$sty2.elements]),element=(0,react.useContext)(BlockList.__unstableElementContext);return(0,react.createElement)(react.Fragment,null,styles&&element&&(0,react_dom.createPortal)((0,react.createElement)("style",{dangerouslySetInnerHTML:{__html:styles}}),element),(0,react.createElement)(BlockListBlock,(0,esm_extends.A)({},props,{className:null!==(_props$attributes$sty3=props.attributes.style)&&void 0!==_props$attributes$sty3&&_props$attributes$sty3.elements?classnames_default()(props.className,blockElementsContainerIdentifier):props.className})))}));(0,hooks_build_module.U2)("blocks.registerBlockType","core/style/addAttribute",(function style_addAttribute(settings){return hasStyleSupport(settings)?(settings.attributes.style||Object.assign(settings.attributes,{style:{type:"object"}}),settings):settings})),(0,hooks_build_module.U2)("blocks.getSaveContent.extraProps","core/style/addSaveProps",style_addSaveProps),(0,hooks_build_module.U2)("blocks.registerBlockType","core/style/addEditProps",(function style_addEditProps(settings){if(!hasStyleSupport(settings))return settings;const existingGetEditWrapperProps=settings.getEditWrapperProps;return settings.getEditWrapperProps=attributes=>{let props={};return existingGetEditWrapperProps&&(props=existingGetEditWrapperProps(attributes)),style_addSaveProps(props,settings,attributes,skipSerializationPathsEdit)},settings})),(0,hooks_build_module.U2)("editor.BlockEdit","core/style/with-block-controls",withBlockControls),(0,hooks_build_module.U2)("editor.BlockListBlock","core/editor/with-elements-styles",withElementsStyles);(0,hooks_build_module.U2)("blocks.registerBlockType","core/settings/addAttribute",(function settings_addAttribute(settings){var _settings$attributes,blockType;return blockType=settings,(0,build_module.pN)(blockType,"__experimentalSettings",!1)?(null!=settings&&null!==(_settings$attributes=settings.attributes)&&void 0!==_settings$attributes&&_settings$attributes.settings||(settings.attributes={...settings.attributes,settings:{type:"object"}}),settings):settings}));const library_swatch=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{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 getGradientFromCSSColors(){let colors=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],angle=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const l=100/colors.length;return`linear-gradient( ${angle}, ${colors.map(((c,i)=>`${c} ${i*l}%, ${c} ${(i+1)*l}%`)).join(", ")} )`}(0,node_modules_colord.X$)([names.A]);const duotone_swatch=function DuotoneSwatch(_ref){let{values}=_ref;return values?(0,react.createElement)(color_indicator,{colorValue:getGradientFromCSSColors(values,"135deg")}):(0,react.createElement)(build_module_icon,{icon:library_swatch})};function ColorOption(_ref){let{label,value,colors,disableCustomColors,enableAlpha,onChange}=_ref;const[isOpen,setIsOpen]=(0,react.useState)(!1);return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(build_module_button,{className:"components-color-list-picker__swatch-button",onClick:()=>setIsOpen((prev=>!prev))},(0,react.createElement)(h_stack_component,{justify:"flex-start",spacing:2},value?(0,react.createElement)(color_indicator,{colorValue:value,className:"components-color-list-picker__swatch-color"}):(0,react.createElement)(build_module_icon,{icon:library_swatch}),(0,react.createElement)("span",null,label))),isOpen&&(0,react.createElement)(ColorPalette,{className:"components-color-list-picker__color-picker",colors,value,clearable:!1,onChange,disableCustomColors,enableAlpha}))}const color_list_picker=function ColorListPicker(_ref2){let{colors,labels,value=[],disableCustomColors,enableAlpha,onChange}=_ref2;return(0,react.createElement)("div",{className:"components-color-list-picker"},labels.map(((label,index)=>(0,react.createElement)(ColorOption,{key:index,label,value:value[index],colors,disableCustomColors,enableAlpha,onChange:newColor=>{const newColors=value.slice();newColors[index]=newColor,onChange(newColors)}}))))},PLACEHOLDER_VALUES=["#333","#CCC"];function CustomDuotoneBar(_ref){let{value,onChange}=_ref;const hasGradient=!!value,values=hasGradient?value:PLACEHOLDER_VALUES,background=getGradientFromCSSColors(values),controlPoints=function getColorStopsFromColors(colors){return colors.map(((color,i)=>({position:100*i/(colors.length-1),color})))}(values);return(0,react.createElement)(CustomGradientBar,{disableInserter:!0,background,hasGradient,value:controlPoints,onChange:newColorStops=>{const newValue=function getColorsFromColorStops(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((_ref4=>{let{color}=_ref4;return color}))}(newColorStops);onChange(newValue)}})}const duotone_picker=function DuotonePicker(_ref){let{clearable=!0,unsetable=!0,colorPalette,duotonePalette,disableCustomColors,disableCustomDuotone,value,onChange}=_ref;const[defaultDark,defaultLight]=(0,react.useMemo)((()=>function getDefaultColors(palette){return!palette||palette.length<2?["#000","#fff"]:palette.map((_ref=>{let{color}=_ref;return{color,brightness:(0,node_modules_colord.Mj)(color).brightness()}})).reduce(((_ref2,current)=>{let[min,max]=_ref2;return[current.brightness<=min.brightness?current:min,current.brightness>=max.brightness?current:max]}),[{brightness:1},{brightness:0}]).map((_ref3=>{let{color}=_ref3;return color}))}(colorPalette)),[colorPalette]),isUnset="unset"===value,unsetOption=(0,react.createElement)(CircularOptionPicker.Option,{key:"unset",value:"unset",isSelected:isUnset,tooltipText:(0,_wordpress_i18n_build_module.__)("Unset"),className:"components-duotone-picker__color-indicator",onClick:()=>{onChange(isUnset?void 0:"unset")}}),options=duotonePalette.map((_ref2=>{let{colors,slug,name}=_ref2;const style={background:getGradientFromCSSColors(colors,"135deg"),color:"transparent"},tooltipText=null!=name?name:(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Duotone code: %s"),slug),label=name?(0,_wordpress_i18n_build_module.nv)((0,_wordpress_i18n_build_module.__)("Duotone: %s"),name):tooltipText,isSelected=(0,lodash.isEqual)(colors,value);return(0,react.createElement)(CircularOptionPicker.Option,{key:slug,value:colors,isSelected,"aria-label":label,tooltipText,style,onClick:()=>{onChange(isSelected?void 0:colors)}})}));return(0,react.createElement)(CircularOptionPicker,{options:unsetable?[unsetOption,...options]:options,actions:!!clearable&&(0,react.createElement)(CircularOptionPicker.ButtonAction,{onClick:()=>onChange(void 0)},(0,_wordpress_i18n_build_module.__)("Clear"))},(0,react.createElement)(spacer_component,{paddingTop:4},(0,react.createElement)(v_stack_component,{spacing:3},!disableCustomColors&&!disableCustomDuotone&&(0,react.createElement)(CustomDuotoneBar,{value:isUnset?void 0:value,onChange}),!disableCustomDuotone&&(0,react.createElement)(color_list_picker,{labels:[(0,_wordpress_i18n_build_module.__)("Shadows"),(0,_wordpress_i18n_build_module.__)("Highlights")],colors:colorPalette,value:isUnset?void 0:value,disableCustomColors,enableAlpha:!0,onChange:newColors=>{newColors[0]||(newColors[0]=defaultDark),newColors[1]||(newColors[1]=defaultLight);const newValue=newColors.length>=2?newColors:void 0;onChange(newValue)}}))))},library_filter=(0,react.createElement)(build_module_svg.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react.createElement)(build_module_svg.wA,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));const duotone_control=function DuotoneControl(_ref){let toolbarIcon,{colorPalette,duotonePalette,disableCustomColors,disableCustomDuotone,value,onChange}=_ref;return toolbarIcon="unset"===value?(0,react.createElement)(color_indicator,{className:"block-editor-duotone-control__unset-indicator"}):value?(0,react.createElement)(duotone_swatch,{values:value}):(0,react.createElement)(icon,{icon:library_filter}),(0,react.createElement)(Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,i18n_build_module.__)("Duotone"),isAlternate:!0},renderToggle:_ref2=>{let{isOpen,onToggle}=_ref2;return(0,react.createElement)(toolbar_button,{showTooltip:!0,onClick:onToggle,"aria-haspopup":"true","aria-expanded":isOpen,onKeyDown:event=>{isOpen||event.keyCode!==keycodes_build_module.PX||(event.preventDefault(),onToggle())},label:(0,i18n_build_module.__)("Apply duotone filter"),icon:toolbarIcon})},renderContent:()=>(0,react.createElement)(menu_group,{label:(0,i18n_build_module.__)("Duotone")},(0,react.createElement)("div",{className:"block-editor-duotone-control__description"},(0,i18n_build_module.__)("Create a two-tone color effect without losing your original image.")),(0,react.createElement)(duotone_picker,{colorPalette,duotonePalette,disableCustomColors,disableCustomDuotone,value,onChange}))})},duotone_EMPTY_ARRAY=[];function InlineDuotone(_ref){let{selector,id,colors}=_ref;return"unset"===colors?(0,react.createElement)(DuotoneUnsetStylesheet,{selector}):(0,react.createElement)(react.Fragment,null,(0,react.createElement)(DuotoneFilter,{id,colors}),(0,react.createElement)(DuotoneStylesheet,{id,selector}))}function useMultiOriginPresets(_ref2){let{presetSetting,defaultSetting}=_ref2;const disableDefault=!use_setting_useSetting(defaultSetting),userPresets=use_setting_useSetting(`${presetSetting}.custom`)||duotone_EMPTY_ARRAY,themePresets=use_setting_useSetting(`${presetSetting}.theme`)||duotone_EMPTY_ARRAY,defaultPresets=use_setting_useSetting(`${presetSetting}.default`)||duotone_EMPTY_ARRAY;return(0,react.useMemo)((()=>[...userPresets,...themePresets,...disableDefault?duotone_EMPTY_ARRAY:defaultPresets]),[disableDefault,userPresets,themePresets,defaultPresets])}function DuotonePanel(_ref3){var _style$color;let{attributes,setAttributes}=_ref3;const style=null==attributes?void 0:attributes.style,duotone=null==style||null===(_style$color=style.color)||void 0===_style$color?void 0:_style$color.duotone,duotonePalette=useMultiOriginPresets({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),colorPalette=useMultiOriginPresets({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),disableCustomColors=!use_setting_useSetting("color.custom"),disableCustomDuotone=!use_setting_useSetting("color.customDuotone")||0===(null==colorPalette?void 0:colorPalette.length)&&disableCustomColors;return 0===(null==duotonePalette?void 0:duotonePalette.length)&&disableCustomDuotone?null:(0,react.createElement)(block_controls,{group:"block",__experimentalShareWithChildBlocks:!0},(0,react.createElement)(duotone_control,{duotonePalette,colorPalette,disableCustomDuotone,disableCustomColors,value:duotone,onChange:newDuotone=>{const newStyle={...style,color:{...null==style?void 0:style.color,duotone:newDuotone}};setAttributes({style:newStyle})}}))}(0,node_modules_colord.X$)([names.A]);const withDuotoneControls=(0,create_higher_order_component.f)((BlockEdit=>props=>{const hasDuotoneSupport=(0,build_module.pN)(props.name,"color.__experimentalDuotone");return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(BlockEdit,props),hasDuotoneSupport&&(0,react.createElement)(DuotonePanel,props))}),"withDuotoneControls");const withDuotoneStyles=(0,create_higher_order_component.f)((BlockListBlock=>props=>{var _props$attributes,_props$attributes$sty,_props$attributes$sty2;const duotoneSupport=(0,build_module.bI)(props.name,"color.__experimentalDuotone"),colors=null==props||null===(_props$attributes=props.attributes)||void 0===_props$attributes||null===(_props$attributes$sty=_props$attributes.style)||void 0===_props$attributes$sty||null===(_props$attributes$sty2=_props$attributes$sty.color)||void 0===_props$attributes$sty2?void 0:_props$attributes$sty2.duotone;if(!duotoneSupport||!colors)return(0,react.createElement)(BlockListBlock,props);const id=`wp-duotone-${(0,use_instance_id.A)(BlockListBlock)}`,selectorsGroup=function scopeSelector(scope,selector){const scopes=scope.split(","),selectors=selector.split(","),selectorsScoped=[];return scopes.forEach((outer=>{selectors.forEach((inner=>{selectorsScoped.push(`${outer.trim()} ${inner.trim()}`)}))})),selectorsScoped.join(", ")}(`.editor-styles-wrapper .${id}`,duotoneSupport),className=classnames_default()(null==props?void 0:props.className,id),element=(0,react.useContext)(BlockList.__unstableElementContext);return(0,react.createElement)(react.Fragment,null,element&&(0,react_dom.createPortal)((0,react.createElement)(InlineDuotone,{selector:selectorsGroup,id,colors}),element),(0,react.createElement)(BlockListBlock,(0,esm_extends.A)({},props,{className})))}),"withDuotoneStyles");(0,hooks_build_module.U2)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function addDuotoneAttributes(settings){return(0,build_module.pN)(settings,"color.__experimentalDuotone")?(settings.attributes.style||Object.assign(settings.attributes,{style:{type:"object"}}),settings):settings})),(0,hooks_build_module.U2)("editor.BlockEdit","core/editor/duotone/with-editor-controls",withDuotoneControls),(0,hooks_build_module.U2)("editor.BlockListBlock","core/editor/duotone/with-styles",withDuotoneStyles);const button_group=(0,react.forwardRef)((function UnforwardedButtonGroup(props,ref){const{className,...restProps}=props,classes=classnames_default()("components-button-group",className);return(0,react.createElement)("div",(0,helpers_esm_extends.A)({ref,role:"group",className:classes},restProps))}));function LayoutPanel(_ref){let{setAttributes,attributes,name:blockName}=_ref;const{layout}=attributes,defaultThemeLayout=use_setting_useSetting("layout"),themeSupportsLayout=use_select_useSelect((select=>{const{getSettings}=select(store_store);return getSettings().supportsLayout}),[]),layoutBlockSupport=(0,build_module.bI)(blockName,"__experimentalLayout",{}),{allowSwitching,allowEditing=!0,allowInheriting=!0,default:defaultBlockLayout}=layoutBlockSupport;if(!allowEditing)return null;const showInheritToggle=!(!allowInheriting||!defaultThemeLayout||null!=layout&&layout.type&&"default"!==(null==layout?void 0:layout.type)&&"constrained"!==(null==layout?void 0:layout.type)&&(null==layout||!layout.inherit)),usedLayout=layout||defaultBlockLayout||{},{inherit=!1,type="default",contentSize=null}=usedLayout;if(("default"===type||"constrained"===type)&&!themeSupportsLayout)return null;const layoutType=getLayoutType(type),constrainedType=getLayoutType("constrained"),onChangeLayout=newLayout=>setAttributes({layout:newLayout});return(0,react.createElement)(react.Fragment,null,(0,react.createElement)(inspector_controls,null,(0,react.createElement)(body,{title:(0,i18n_build_module.__)("Layout")},showInheritToggle&&(0,react.createElement)(react.Fragment,null,(0,react.createElement)(ToggleControl,{label:(0,i18n_build_module.__)("Inner blocks respect content width"),checked:"constrained"===(null==layoutType?void 0:layoutType.name)||!!inherit||!!contentSize,onChange:()=>setAttributes({layout:{type:"constrained"===(null==layoutType?void 0:layoutType.name)?"default":"constrained"}})}),(0,react.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},inherit||"constrained"===(null==layoutType?void 0:layoutType.name)?(0,i18n_build_module.__)("Nested blocks use theme content width with options for full and wide widths."):(0,i18n_build_module.__)("Nested blocks will fill the width of this container."))),!inherit&&allowSwitching&&(0,react.createElement)(LayoutTypeSwitcher,{type,onChange:newType=>setAttributes({layout:{type:newType}})}),layoutType&&"default"!==layoutType.name&&(0,react.createElement)(layoutType.inspectorControls,{layout:usedLayout,onChange:onChangeLayout,layoutBlockSupport}),constrainedType&&!!contentSize&&(0,react.createElement)(constrainedType.inspectorControls,{layout:usedLayout,onChange:onChangeLayout,layoutBlockSupport}))),!inherit&&layoutType&&(0,react.createElement)(layoutType.toolBarControls,{layout:usedLayout,onChange:onChangeLayout,layoutBlockSupport}))}function LayoutTypeSwitcher(_ref2){let{type,onChange}=_ref2;return(0,react.createElement)(button_group,null,function getLayoutTypes(){return layoutTypes}().map((_ref3=>{let{name,label}=_ref3;return(0,react.createElement)(build_module_button,{key:name,isPressed:type===name,onClick:()=>onChange(name)},label)})))}const withInspectorControls=(0,create_higher_order_component.f)((BlockEdit=>props=>{const{name:blockName}=props;return[(0,build_module.pN)(blockName,"__experimentalLayout")&&(0,react.createElement)(LayoutPanel,(0,esm_extends.A)({key:"layout"},props)),(0,react.createElement)(BlockEdit,(0,esm_extends.A)({key:"edit"},props))]}),"withInspectorControls"),withLayoutStyles=(0,create_higher_order_component.f)((BlockListBlock=>props=>{const{name,attributes}=props,hasLayoutBlockSupport=(0,build_module.pN)(name,"__experimentalLayout"),disableLayoutStyles=use_select_useSelect((select=>{const{getSettings}=select(store_store);return!!getSettings().disableLayoutStyles})),shouldRenderLayoutStyles=hasLayoutBlockSupport&&!disableLayoutStyles,id=(0,use_instance_id.A)(BlockListBlock),defaultThemeLayout=use_setting_useSetting("layout")||{},element=(0,react.useContext)(BlockList.__unstableElementContext),{layout}=attributes,{default:defaultBlockLayout}=(0,build_module.bI)(name,"__experimentalLayout")||{},usedLayout=null!=layout&&layout.inherit||null!=layout&&layout.contentSize||null!=layout&&layout.wideSize?{...layout,type:"constrained"}:layout||defaultBlockLayout||{},layoutClasses=hasLayoutBlockSupport?function useLayoutClasses(layout,layoutDefinitions){var _layoutDefinitions;const rootPaddingAlignment=use_select_useSelect((select=>{var _getSettings$__experi;const{getSettings}=select(store_store);return null===(_getSettings$__experi=getSettings().__experimentalFeatures)||void 0===_getSettings$__experi?void 0:_getSettings$__experi.useRootPaddingAwareAlignments}),[]),layoutClassnames=[];var _layoutDefinitions2;return null!=layoutDefinitions&&null!==(_layoutDefinitions=layoutDefinitions[(null==layout?void 0:layout.type)||"default"])&&void 0!==_layoutDefinitions&&_layoutDefinitions.className&&layoutClassnames.push(null==layoutDefinitions||null===(_layoutDefinitions2=layoutDefinitions[(null==layout?void 0:layout.type)||"default"])||void 0===_layoutDefinitions2?void 0:_layoutDefinitions2.className),(null!=layout&&layout.inherit||null!=layout&&layout.contentSize)&&rootPaddingAlignment&&layoutClassnames.push("has-global-padding"),null!=layout&&layout.orientation&&layoutClassnames.push(`is-${(0,lodash.kebabCase)(layout.orientation)}`),null!=layout&&layout.justifyContent&&layoutClassnames.push(`is-content-justification-${(0,lodash.kebabCase)(layout.justifyContent)}`),null!=layout&&layout.flexWrap&&"nowrap"===layout.flexWrap&&layoutClassnames.push("is-nowrap"),layoutClassnames}(usedLayout,null==defaultThemeLayout?void 0:defaultThemeLayout.definitions):null,selector=`.${(0,build_module.KW)(name)}.wp-container-${id}`,hasBlockGapSupport=null!==use_setting_useSetting("spacing.blockGap");let css;if(shouldRenderLayoutStyles){var _fullLayoutType$getLa;const fullLayoutType=getLayoutType((null==usedLayout?void 0:usedLayout.type)||"default");css=null==fullLayoutType||null===(_fullLayoutType$getLa=fullLayoutType.getLayoutStyle)||void 0===_fullLayoutType$getLa?void 0:_fullLayoutType$getLa.call(fullLayoutType,{blockName:name,selector,layout:usedLayout,layoutDefinitions:null==defaultThemeLayout?void 0:defaultThemeLayout.definitions,style:null==attributes?void 0:attributes.style,hasBlockGapSupport})}const className=classnames_default()(null==props?void 0:props.className,{[`wp-container-${id}`]:shouldRenderLayoutStyles&&!!css},layoutClasses);return(0,react.createElement)(react.Fragment,null,shouldRenderLayoutStyles&&element&&!!css&&(0,react_dom.createPortal)((0,react.createElement)(LayoutStyle,{blockName:name,selector,css,layout:usedLayout,style:null==attributes?void 0:attributes.style}),element),(0,react.createElement)(BlockListBlock,(0,esm_extends.A)({},props,{className})))}));(0,hooks_build_module.U2)("blocks.registerBlockType","core/layout/addAttribute",(function layout_addAttribute(settings){return(0,lodash.has)(settings.attributes,["layout","type"])||(0,build_module.pN)(settings,"__experimentalLayout")&&(settings.attributes={...settings.attributes,layout:{type:"object"}}),settings})),(0,hooks_build_module.U2)("editor.BlockListBlock","core/editor/layout/with-layout-styles",withLayoutStyles),(0,hooks_build_module.U2)("editor.BlockEdit","core/editor/layout/with-inspector-controls",withInspectorControls);function BlockTools(_ref){let{children,__unstableContentRef,...props}=_ref;const isLargeViewport=(0,use_viewport_match.A)("medium"),hasFixedToolbar=use_select_useSelect((select=>select(store_store).getSettings().hasFixedToolbar),[]),isMatch=useShortcutEventMatch(),{getSelectedBlockClientIds,getBlockRootClientId}=use_select_useSelect(store_store),{duplicateBlocks,removeBlocks,insertAfterBlock,insertBeforeBlock,clearSelectedBlock,moveBlocksUp,moveBlocksDown}=use_dispatch(store_store);return(0,react.createElement)("div",(0,esm_extends.A)({},props,{onKeyDown:function onKeyDown(event){if(!event.defaultPrevented)if(isMatch("core/block-editor/move-up",event)){const clientIds=getSelectedBlockClientIds();if(clientIds.length){event.preventDefault();const rootClientId=getBlockRootClientId((0,lodash.first)(clientIds));moveBlocksUp(clientIds,rootClientId)}}else if(isMatch("core/block-editor/move-down",event)){const clientIds=getSelectedBlockClientIds();if(clientIds.length){event.preventDefault();const rootClientId=getBlockRootClientId((0,lodash.first)(clientIds));moveBlocksDown(clientIds,rootClientId)}}else if(isMatch("core/block-editor/duplicate",event)){const clientIds=getSelectedBlockClientIds();clientIds.length&&(event.preventDefault(),duplicateBlocks(clientIds))}else if(isMatch("core/block-editor/remove",event)){const clientIds=getSelectedBlockClientIds();clientIds.length&&(event.preventDefault(),removeBlocks(clientIds))}else if(isMatch("core/block-editor/insert-after",event)){const clientIds=getSelectedBlockClientIds();clientIds.length&&(event.preventDefault(),insertAfterBlock((0,lodash.last)(clientIds)))}else if(isMatch("core/block-editor/insert-before",event)){const clientIds=getSelectedBlockClientIds();clientIds.length&&(event.preventDefault(),insertBeforeBlock((0,lodash.first)(clientIds)))}else if(isMatch("core/block-editor/unselect",event)){getSelectedBlockClientIds().length&&(event.preventDefault(),clearSelectedBlock(),event.target.ownerDocument.defaultView.getSelection().removeAllRanges(),null==__unstableContentRef||__unstableContentRef.current.focus())}}}),(0,react.createElement)(InsertionPoint,{__unstableContentRef},(hasFixedToolbar||!isLargeViewport)&&(0,react.createElement)(block_contextual_toolbar,{isFixed:!0}),(0,react.createElement)(WrappedBlockPopover,{__unstableContentRef}),(0,react.createElement)(popover.Slot,{name:"block-toolbar",ref:use_popover_scroll(__unstableContentRef)}),children,(0,react.createElement)(popover.Slot,{name:"__unstable-block-tools-after",ref:use_popover_scroll(__unstableContentRef)})))}const KEY_DOWN_ELIGIBLE_KEY_CODES=new Set([keycodes_build_module.UP,keycodes_build_module.NS,keycodes_build_module.PX,keycodes_build_module.M3,keycodes_build_module.Fm,keycodes_build_module.G_]);function useTypingObserver(){const{isTyping,hasInlineToolbar}=use_select_useSelect((select=>{const{isTyping:_isTyping,getSettings}=select(store_store);return{isTyping:_isTyping(),hasInlineToolbar:getSettings().hasInlineToolbar}}),[]),{startTyping,stopTyping}=use_dispatch(store_store),ref1=function useMouseMoveTypingReset(){const isTyping=use_select_useSelect((select=>select(store_store).isTyping()),[]),{stopTyping}=use_dispatch(store_store);return(0,use_ref_effect.A)((node=>{if(!isTyping)return;const{ownerDocument}=node;let lastClientX,lastClientY;function stopTypingOnMouseMove(event){const{clientX,clientY}=event;lastClientX&&lastClientY&&(lastClientX!==clientX||lastClientY!==clientY)&&stopTyping(),lastClientX=clientX,lastClientY=clientY}return ownerDocument.addEventListener("mousemove",stopTypingOnMouseMove),()=>{ownerDocument.removeEventListener("mousemove",stopTypingOnMouseMove)}}),[isTyping,stopTyping])}(),ref2=(0,use_ref_effect.A)((node=>{const{ownerDocument}=node,{defaultView}=ownerDocument,selection=defaultView.getSelection();if(isTyping){let timerId;function stopTypingOnNonTextField(event){const{target}=event;timerId=defaultView.setTimeout((()=>{isTextField(target)||stopTyping()}))}function stopTypingOnEscapeKey(event){const{keyCode}=event;keyCode!==keycodes_build_module._f&&keyCode!==keycodes_build_module.wn||stopTyping()}function stopTypingOnSelectionUncollapse(){selection.isCollapsed||stopTyping()}return node.addEventListener("focus",stopTypingOnNonTextField),node.addEventListener("keydown",stopTypingOnEscapeKey),hasInlineToolbar||ownerDocument.addEventListener("selectionchange",stopTypingOnSelectionUncollapse),()=>{defaultView.clearTimeout(timerId),node.removeEventListener("focus",stopTypingOnNonTextField),node.removeEventListener("keydown",stopTypingOnEscapeKey),ownerDocument.removeEventListener("selectionchange",stopTypingOnSelectionUncollapse)}}function startTypingInTextField(event){const{type,target}=event;isTextField(target)&&node.contains(target)&&("keydown"!==type||function isKeyDownEligibleForStartTyping(event){const{keyCode,shiftKey}=event;return!shiftKey&&KEY_DOWN_ELIGIBLE_KEY_CODES.has(keyCode)}(event))&&startTyping()}return node.addEventListener("keypress",startTypingInTextField),node.addEventListener("keydown",startTypingInTextField),()=>{node.removeEventListener("keypress",startTypingInTextField),node.removeEventListener("keydown",startTypingInTextField)}}),[isTyping,hasInlineToolbar,startTyping,stopTyping]);return(0,use_merge_refs.A)([ref1,ref2])}const observe_typing=function ObserveTyping(_ref){let{children}=_ref;return(0,react.createElement)("div",{ref:useTypingObserver()},children)}},"../../node_modules/.pnpm/@wordpress+blocks@11.21.0_react@17.0.2/node_modules/@wordpress/blocks/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{dB:()=>__EXPERIMENTAL_ELEMENTS,UT:()=>__EXPERIMENTAL_PATHS_WITH_MERGE,Eb:()=>__experimentalCloneSanitizedBlock,wZ:()=>getAccessibleBlockLabel,GJ:()=>__experimentalGetBlockAttributesNamesByRole,Y0:()=>getBlockLabel,cV:()=>getBlockProps,v9:()=>getInnerBlocksProps,JB:()=>cloneBlock,Wv:()=>createBlock,to:()=>createBlocksFromInnerBlocksTemplate,V6:()=>doBlocksMatchTemplate,wG:()=>findTransform,Ph:()=>getBlockAttributes,F8:()=>getBlockInnerHTML,KW:()=>getBlockDefaultClassName,KL:()=>getBlockFromExample,HK:()=>getBlockMenuDefaultClassName,bI:()=>getBlockSupport,XD:()=>getBlockTransforms,E7:()=>getBlockType,li:()=>getBlockTypes,oO:()=>getBlockVariations,K$:()=>getDefaultBlockName,Fk:()=>getPossibleBlockTransformations,Z9:()=>getSaveContent,pN:()=>hasBlockSupport,tk:()=>isReusableBlock,gc:()=>isTemplatePart,Xw:()=>utils_isUnmodifiedDefaultBlock,qg:()=>parser_parse,Gk:()=>pasteHandler,lh:()=>rawHandler,lK:()=>serializer_serialize,Kx:()=>serializeRawBlock,M_:()=>store,bh:()=>switchToBlockType,Nk:()=>synchronizeBlocksWithTemplate,YV:()=>validateBlock});var selectors_namespaceObject={};__webpack_require__.r(selectors_namespaceObject),__webpack_require__.d(selectors_namespaceObject,{__experimentalGetUnprocessedBlockTypes:()=>__experimentalGetUnprocessedBlockTypes,__experimentalHasContentRoleAttribute:()=>__experimentalHasContentRoleAttribute,getActiveBlockVariation:()=>getActiveBlockVariation,getBlockStyles:()=>getBlockStyles,getBlockSupport:()=>selectors_getBlockSupport,getBlockType:()=>selectors_getBlockType,getBlockTypes:()=>selectors_getBlockTypes,getBlockVariations:()=>selectors_getBlockVariations,getCategories:()=>getCategories,getChildBlockNames:()=>selectors_getChildBlockNames,getCollections:()=>getCollections,getDefaultBlockName:()=>selectors_getDefaultBlockName,getDefaultBlockVariation:()=>getDefaultBlockVariation,getFreeformFallbackBlockName:()=>getFreeformFallbackBlockName,getGroupingBlockName:()=>selectors_getGroupingBlockName,getUnregisteredFallbackBlockName:()=>getUnregisteredFallbackBlockName,hasBlockSupport:()=>selectors_hasBlockSupport,hasChildBlocks:()=>selectors_hasChildBlocks,hasChildBlocksWithInserterSupport:()=>selectors_hasChildBlocksWithInserterSupport,isMatchingSearchTerm:()=>isMatchingSearchTerm});var actions_namespaceObject={};__webpack_require__.r(actions_namespaceObject),__webpack_require__.d(actions_namespaceObject,{__experimentalReapplyBlockTypeFilters:()=>__experimentalReapplyBlockTypeFilters,__experimentalRegisterBlockType:()=>__experimentalRegisterBlockType,addBlockCollection:()=>addBlockCollection,addBlockStyles:()=>addBlockStyles,addBlockTypes:()=>addBlockTypes,addBlockVariations:()=>addBlockVariations,removeBlockCollection:()=>removeBlockCollection,removeBlockStyles:()=>removeBlockStyles,removeBlockTypes:()=>removeBlockTypes,removeBlockVariations:()=>removeBlockVariations,setCategories:()=>setCategories,setDefaultBlockName:()=>actions_setDefaultBlockName,setFreeformFallbackBlockName:()=>setFreeformFallbackBlockName,setGroupingBlockName:()=>actions_setGroupingBlockName,setUnregisteredFallbackBlockName:()=>setUnregisteredFallbackBlockName,updateCategory:()=>updateCategory});var redux_store=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@7.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/redux-store/index.js"),build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@7.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/index.js"),lodash=__webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"),i18n_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.57.0/node_modules/@wordpress/i18n/build-module/index.js"),colord=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs"),names=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs"),a11y=__webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/a11y.mjs"),react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),safe_html=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/dom/safe-html.js");const DEPRECATED_ENTRY_KEYS=["attributes","supports","save","migrate","isEligible","apiVersion"],__EXPERIMENTAL_ELEMENTS={link:"a",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},__EXPERIMENTAL_PATHS_WITH_MERGE={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0};function registration_getFreeformContentHandlerName(){return(0,build_module.Lt)(store).getFreeformFallbackBlockName()}function getUnregisteredTypeHandlerName(){return(0,build_module.Lt)(store).getUnregisteredFallbackBlockName()}function getDefaultBlockName(){return(0,build_module.Lt)(store).getDefaultBlockName()}function getBlockType(name){var _select;return null===(_select=(0,build_module.Lt)(store))||void 0===_select?void 0:_select.getBlockType(name)}function getBlockTypes(){return(0,build_module.Lt)(store).getBlockTypes()}function getBlockSupport(nameOrType,feature,defaultSupports){return(0,build_module.Lt)(store).getBlockSupport(nameOrType,feature,defaultSupports)}function hasBlockSupport(nameOrType,feature,defaultSupports){return(0,build_module.Lt)(store).hasBlockSupport(nameOrType,feature,defaultSupports)}function isReusableBlock(blockOrType){return"core/block"===(null==blockOrType?void 0:blockOrType.name)}function isTemplatePart(blockOrType){return"core/template-part"===blockOrType.name}const getBlockVariations=(blockName,scope)=>(0,build_module.Lt)(store).getBlockVariations(blockName,scope);var v4=__webpack_require__("../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js"),hooks_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@3.57.0/node_modules/@wordpress/hooks/build-module/index.js");function createBlock(name){let innerBlocks=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const sanitizedAttributes=__experimentalSanitizeBlockAttributes(name,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return{clientId:(0,v4.A)(),name,isValid:!0,attributes:sanitizedAttributes,innerBlocks}}function createBlocksFromInnerBlocksTemplate(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((innerBlock=>{const innerBlockTemplate=Array.isArray(innerBlock)?innerBlock:[innerBlock.name,innerBlock.attributes,innerBlock.innerBlocks],[name,attributes,innerBlocks=[]]=innerBlockTemplate;return createBlock(name,attributes,createBlocksFromInnerBlocksTemplate(innerBlocks))}))}function __experimentalCloneSanitizedBlock(block){let mergeAttributes=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},newInnerBlocks=arguments.length>2?arguments[2]:void 0;const clientId=(0,v4.A)(),sanitizedAttributes=__experimentalSanitizeBlockAttributes(block.name,{...block.attributes,...mergeAttributes});return{...block,clientId,attributes:sanitizedAttributes,innerBlocks:newInnerBlocks||block.innerBlocks.map((innerBlock=>__experimentalCloneSanitizedBlock(innerBlock)))}}function cloneBlock(block){let mergeAttributes=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},newInnerBlocks=arguments.length>2?arguments[2]:void 0;const clientId=(0,v4.A)();return{...block,clientId,attributes:{...block.attributes,...mergeAttributes},innerBlocks:newInnerBlocks||block.innerBlocks.map((innerBlock=>cloneBlock(innerBlock)))}}const isPossibleTransformForSource=(transform,direction,blocks)=>{if(!blocks.length)return!1;const isMultiBlock=blocks.length>1,firstBlockName=blocks[0].name;if(!(isWildcardBlockTransform(transform)||!isMultiBlock||transform.isMultiBlock))return!1;if(!isWildcardBlockTransform(transform)&&!blocks.every((block=>block.name===firstBlockName)))return!1;if(!("block"===transform.type))return!1;const sourceBlock=blocks[0];return!("from"===direction&&-1===transform.blocks.indexOf(sourceBlock.name)&&!isWildcardBlockTransform(transform))&&(!(!isMultiBlock&&"from"===direction&&isContainerGroupBlock(sourceBlock.name)&&isContainerGroupBlock(transform.blockName))&&(!!maybeCheckTransformIsMatch(transform,blocks)&&!(transform.usingMobileTransformations&&isWildcardBlockTransform(transform)&&!isContainerGroupBlock(sourceBlock.name))))},getBlockTypesForPossibleFromTransforms=blocks=>{if(!blocks.length)return[];return getBlockTypes().filter((blockType=>!!findTransform(getBlockTransforms("from",blockType.name),(transform=>isPossibleTransformForSource(transform,"from",blocks)))))},getBlockTypesForPossibleToTransforms=blocks=>{if(!blocks.length)return[];const blockType=getBlockType(blocks[0].name);return(blockType?getBlockTransforms("to",blockType.name):[]).filter((transform=>transform&&isPossibleTransformForSource(transform,"to",blocks))).map((transformation=>transformation.blocks)).flat().map((name=>"*"===name?name:getBlockType(name)))},isWildcardBlockTransform=t=>t&&"block"===t.type&&Array.isArray(t.blocks)&&t.blocks.includes("*"),isContainerGroupBlock=name=>name===function getGroupingBlockName(){return(0,build_module.Lt)(store).getGroupingBlockName()}();function getPossibleBlockTransformations(blocks){if(!blocks.length)return[];const blockTypesForFromTransforms=getBlockTypesForPossibleFromTransforms(blocks),blockTypesForToTransforms=getBlockTypesForPossibleToTransforms(blocks);return[...new Set([...blockTypesForFromTransforms,...blockTypesForToTransforms])]}function findTransform(transforms,predicate){const hooks=(0,hooks_build_module.FF)();for(let i=0;i<transforms.length;i++){const candidate=transforms[i];predicate(candidate)&&hooks.addFilter("transform","transform/"+i.toString(),(result=>result||candidate),candidate.priority)}return hooks.applyFilters("transform",null)}function getBlockTransforms(direction,blockTypeOrName){if(void 0===blockTypeOrName)return getBlockTypes().map((_ref=>{let{name}=_ref;return getBlockTransforms(direction,name)})).flat();const blockType=utils_normalizeBlockType(blockTypeOrName),{name:blockName,transforms}=blockType||{};if(!transforms||!Array.isArray(transforms[direction]))return[];const usingMobileTransformations=transforms.supportedMobileTransforms&&Array.isArray(transforms.supportedMobileTransforms);return(usingMobileTransformations?transforms[direction].filter((t=>"raw"===t.type||!(!t.blocks||!t.blocks.length)&&(!!isWildcardBlockTransform(t)||t.blocks.every((transformBlockName=>transforms.supportedMobileTransforms.includes(transformBlockName)))))):transforms[direction]).map((transform=>({...transform,blockName,usingMobileTransformations})))}function maybeCheckTransformIsMatch(transform,blocks){if("function"!=typeof transform.isMatch)return!0;const sourceBlock=blocks[0],attributes=transform.isMultiBlock?blocks.map((block=>block.attributes)):sourceBlock.attributes,block=transform.isMultiBlock?blocks:sourceBlock;return transform.isMatch(attributes,block)}function switchToBlockType(blocks,name){const blocksArray=Array.isArray(blocks)?blocks:[blocks],isMultiBlock=blocksArray.length>1,firstBlock=blocksArray[0],sourceName=firstBlock.name,transformationsFrom=getBlockTransforms("from",name),transformation=findTransform(getBlockTransforms("to",sourceName),(t=>"block"===t.type&&-1!==t.blocks.indexOf(name)&&(!isMultiBlock||t.isMultiBlock)&&maybeCheckTransformIsMatch(t,blocksArray)))||findTransform(transformationsFrom,(t=>"block"===t.type&&(isWildcardBlockTransform(t)||-1!==t.blocks.indexOf(sourceName))&&(!isMultiBlock||t.isMultiBlock)&&maybeCheckTransformIsMatch(t,blocksArray)));if(!transformation)return null;let transformationResults;if(transformationResults=transformation.isMultiBlock?"__experimentalConvert"in transformation?transformation.__experimentalConvert(blocksArray):transformation.transform(blocksArray.map((currentBlock=>currentBlock.attributes)),blocksArray.map((currentBlock=>currentBlock.innerBlocks))):"__experimentalConvert"in transformation?transformation.__experimentalConvert(firstBlock):transformation.transform(firstBlock.attributes,firstBlock.innerBlocks),null===transformationResults||"object"!=typeof transformationResults)return null;if(transformationResults=Array.isArray(transformationResults)?transformationResults:[transformationResults],transformationResults.some((result=>!getBlockType(result.name))))return null;if("*"===name)return transformationResults;if(!transformationResults.some((result=>result.name===name)))return null;return transformationResults.map(((result,index,results)=>(0,hooks_build_module.W5)("blocks.switchToBlockType.transformedBlock",result,blocks,index,results)))}const getBlockFromExample=(name,example)=>{var _example$innerBlocks;return createBlock(name,example.attributes,(null!==(_example$innerBlocks=example.innerBlocks)&&void 0!==_example$innerBlocks?_example$innerBlocks:[]).map((innerBlock=>getBlockFromExample(innerBlock.name,innerBlock))))};(0,colord.X$)([names.A,a11y.A]);const ICON_COLORS=["#191e23","#f8f9f9"];function utils_isUnmodifiedDefaultBlock(block){var _blockType$attributes;const defaultBlockName=getDefaultBlockName();if(block.name!==defaultBlockName)return!1;utils_isUnmodifiedDefaultBlock.block&&utils_isUnmodifiedDefaultBlock.block.name===defaultBlockName||(utils_isUnmodifiedDefaultBlock.block=createBlock(defaultBlockName));const newDefaultBlock=utils_isUnmodifiedDefaultBlock.block,blockType=getBlockType(defaultBlockName);return Object.keys(null!==(_blockType$attributes=null==blockType?void 0:blockType.attributes)&&void 0!==_blockType$attributes?_blockType$attributes:{}).every((key=>newDefaultBlock.attributes[key]===block.attributes[key]))}function isValidIcon(icon){return!!icon&&("string"==typeof icon||(0,react.isValidElement)(icon)||"function"==typeof icon||icon instanceof react.Component)}function utils_normalizeBlockType(blockTypeOrName){return"string"==typeof blockTypeOrName?getBlockType(blockTypeOrName):blockTypeOrName}function getBlockLabel(blockType,attributes){let context=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"visual";const{__experimentalLabel:getLabel,title}=blockType,label=getLabel&&getLabel(attributes,{context});return label?function stripHTML(html){html=(0,safe_html.A)(html);const doc=document.implementation.createHTMLDocument("");return doc.body.innerHTML=html,doc.body.textContent||""}(label):title}function getAccessibleBlockLabel(blockType,attributes,position){let direction=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vertical";const title=null==blockType?void 0:blockType.title,label=blockType?getBlockLabel(blockType,attributes,"accessibility"):"",hasPosition=void 0!==position,hasLabel=label&&label!==title;return hasPosition&&"vertical"===direction?hasLabel?(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s Block. Row %2$d. %3$s"),title,position,label):(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s Block. Row %2$d"),title,position):hasPosition&&"horizontal"===direction?hasLabel?(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s Block. Column %2$d. %3$s"),title,position,label):(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s Block. Column %2$d"),title,position):hasLabel?(0,i18n_build_module.nv)((0,i18n_build_module.__)("%1$s Block. %2$s"),title,label):(0,i18n_build_module.nv)((0,i18n_build_module.__)("%s Block"),title)}function __experimentalSanitizeBlockAttributes(name,attributes){const blockType=getBlockType(name);if(void 0===blockType)throw new Error(`Block type '${name}' is not registered.`);return Object.entries(blockType.attributes).reduce(((accumulator,_ref)=>{let[key,schema]=_ref;const value=attributes[key];return void 0!==value?accumulator[key]=value:schema.hasOwnProperty("default")&&(accumulator[key]=schema.default),-1!==["node","children"].indexOf(schema.source)&&("string"==typeof accumulator[key]?accumulator[key]=[accumulator[key]]:Array.isArray(accumulator[key])||(accumulator[key]=[])),accumulator}),{})}function __experimentalGetBlockAttributesNamesByRole(name,role){var _getBlockType;const attributes=null===(_getBlockType=getBlockType(name))||void 0===_getBlockType?void 0:_getBlockType.attributes;if(!attributes)return[];const attributesNames=Object.keys(attributes);return role?attributesNames.filter((attributeName=>{var _attributes$attribute;return(null===(_attributes$attribute=attributes[attributeName])||void 0===_attributes$attribute?void 0:_attributes$attribute.__experimentalRole)===role})):attributesNames}function omit(object,keys){return Object.fromEntries(Object.entries(object).filter((_ref2=>{let[key]=_ref2;return!keys.includes(key)})))}const DEFAULT_CATEGORIES=[{slug:"text",title:(0,i18n_build_module.__)("Text")},{slug:"media",title:(0,i18n_build_module.__)("Media")},{slug:"design",title:(0,i18n_build_module.__)("Design")},{slug:"widgets",title:(0,i18n_build_module.__)("Widgets")},{slug:"theme",title:(0,i18n_build_module.__)("Theme")},{slug:"embed",title:(0,i18n_build_module.__)("Embeds")},{slug:"reusable",title:(0,i18n_build_module.__)("Reusable blocks")}];function keyBlockTypesByName(types){return types.reduce(((newBlockTypes,block)=>({...newBlockTypes,[block.name]:block})),{})}function getUniqueItemsByName(items){return items.reduce(((acc,currentItem)=>(acc.some((item=>item.name===currentItem.name))||acc.push(currentItem),acc)),[])}function createBlockNameSetterReducer(setActionType){return function(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"REMOVE_BLOCK_TYPES":return-1!==action.names.indexOf(state)?null:state;case setActionType:return action.name||null}return state}}const defaultBlockName=createBlockNameSetterReducer("SET_DEFAULT_BLOCK_NAME"),freeformFallbackBlockName=createBlockNameSetterReducer("SET_FREEFORM_FALLBACK_BLOCK_NAME"),unregisteredFallbackBlockName=createBlockNameSetterReducer("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),groupingBlockName=createBlockNameSetterReducer("SET_GROUPING_BLOCK_NAME");const reducer=(0,build_module.HY)({unprocessedBlockTypes:function unprocessedBlockTypes(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...state,[action.blockType.name]:action.blockType};case"REMOVE_BLOCK_TYPES":return omit(state,action.names)}return state},blockTypes:function blockTypes(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"ADD_BLOCK_TYPES":return{...state,...keyBlockTypesByName(action.blockTypes)};case"REMOVE_BLOCK_TYPES":return omit(state,action.names)}return state},blockStyles:function blockStyles(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"ADD_BLOCK_TYPES":return{...state,...(0,lodash.mapValues)(keyBlockTypesByName(action.blockTypes),(blockType=>getUniqueItemsByName([...(0,lodash.get)(blockType,["styles"],[]).map((style=>({...style,source:"block"}))),...(0,lodash.get)(state,[blockType.name],[]).filter((_ref=>{let{source}=_ref;return"block"!==source}))])))};case"ADD_BLOCK_STYLES":return{...state,[action.blockName]:getUniqueItemsByName([...(0,lodash.get)(state,[action.blockName],[]),...action.styles])};case"REMOVE_BLOCK_STYLES":return{...state,[action.blockName]:(0,lodash.filter)((0,lodash.get)(state,[action.blockName],[]),(style=>-1===action.styleNames.indexOf(style.name)))}}return state},blockVariations:function blockVariations(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"ADD_BLOCK_TYPES":return{...state,...(0,lodash.mapValues)(keyBlockTypesByName(action.blockTypes),(blockType=>getUniqueItemsByName([...(0,lodash.get)(blockType,["variations"],[]).map((variation=>({...variation,source:"block"}))),...(0,lodash.get)(state,[blockType.name],[]).filter((_ref2=>{let{source}=_ref2;return"block"!==source}))])))};case"ADD_BLOCK_VARIATIONS":return{...state,[action.blockName]:getUniqueItemsByName([...(0,lodash.get)(state,[action.blockName],[]),...action.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...state,[action.blockName]:(0,lodash.filter)((0,lodash.get)(state,[action.blockName],[]),(variation=>-1===action.variationNames.indexOf(variation.name)))}}return state},defaultBlockName,freeformFallbackBlockName,unregisteredFallbackBlockName,groupingBlockName,categories:function categories(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:DEFAULT_CATEGORIES,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"SET_CATEGORIES":return action.categories||[];case"UPDATE_CATEGORY":if(!action.category||(0,lodash.isEmpty)(action.category))return state;if((0,lodash.find)(state,["slug",action.slug]))return(0,lodash.map)(state,(category=>category.slug===action.slug?{...category,...action.category}:category))}return state},collections:function collections(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"ADD_BLOCK_COLLECTION":return{...state,[action.namespace]:{title:action.title,icon:action.icon}};case"REMOVE_BLOCK_COLLECTION":return omit(state,action.namespace)}return state}});var rememo=__webpack_require__("../../node_modules/.pnpm/rememo@4.0.2/node_modules/rememo/rememo.js"),remove_accents=__webpack_require__("../../node_modules/.pnpm/remove-accents@0.4.4/node_modules/remove-accents/index.js"),remove_accents_default=__webpack_require__.n(remove_accents),pipe=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/higher-order/pipe.js");const getNormalizedBlockType=(state,nameOrType)=>"string"==typeof nameOrType?selectors_getBlockType(state,nameOrType):nameOrType;function __experimentalGetUnprocessedBlockTypes(state){return state.unprocessedBlockTypes}const selectors_getBlockTypes=(0,rememo.A)((state=>Object.values(state.blockTypes)),(state=>[state.blockTypes]));function selectors_getBlockType(state,name){return state.blockTypes[name]}function getBlockStyles(state,name){return state.blockStyles[name]}const selectors_getBlockVariations=(0,rememo.A)(((state,blockName,scope)=>{const variations=state.blockVariations[blockName];return variations&&scope?variations.filter((variation=>(variation.scope||["block","inserter"]).includes(scope))):variations}),((state,blockName)=>[state.blockVariations[blockName]]));function getActiveBlockVariation(state,blockName,attributes,scope){const variations=selectors_getBlockVariations(state,blockName,scope);return null==variations?void 0:variations.find((variation=>{var _variation$isActive;if(Array.isArray(variation.isActive)){const blockType=selectors_getBlockType(state,blockName),attributeKeys=Object.keys((null==blockType?void 0:blockType.attributes)||{}),definedAttributes=variation.isActive.filter((attribute=>attributeKeys.includes(attribute)));return 0!==definedAttributes.length&&definedAttributes.every((attribute=>attributes[attribute]===variation.attributes[attribute]))}return null===(_variation$isActive=variation.isActive)||void 0===_variation$isActive?void 0:_variation$isActive.call(variation,attributes,variation.attributes)}))}function getDefaultBlockVariation(state,blockName,scope){const variations=selectors_getBlockVariations(state,blockName,scope);return[...variations].reverse().find((_ref=>{let{isDefault}=_ref;return!!isDefault}))||variations[0]}function getCategories(state){return state.categories}function getCollections(state){return state.collections}function selectors_getDefaultBlockName(state){return state.defaultBlockName}function getFreeformFallbackBlockName(state){return state.freeformFallbackBlockName}function getUnregisteredFallbackBlockName(state){return state.unregisteredFallbackBlockName}function selectors_getGroupingBlockName(state){return state.groupingBlockName}const selectors_getChildBlockNames=(0,rememo.A)(((state,blockName)=>(0,lodash.map)((0,lodash.filter)(state.blockTypes,(blockType=>{var _blockType$parent;return null===(_blockType$parent=blockType.parent)||void 0===_blockType$parent?void 0:_blockType$parent.includes(blockName)})),(_ref2=>{let{name}=_ref2;return name}))),(state=>[state.blockTypes])),selectors_getBlockSupport=(state,nameOrType,feature,defaultSupports)=>{const blockType=getNormalizedBlockType(state,nameOrType);return null!=blockType&&blockType.supports?(0,lodash.get)(blockType.supports,feature,defaultSupports):defaultSupports};function selectors_hasBlockSupport(state,nameOrType,feature,defaultSupports){return!!selectors_getBlockSupport(state,nameOrType,feature,defaultSupports)}function isMatchingSearchTerm(state,nameOrType,searchTerm){var _blockType$keywords;const blockType=getNormalizedBlockType(state,nameOrType),getNormalizedSearchTerm=(0,pipe.h)([term=>remove_accents_default()(null!=term?term:""),term=>term.toLowerCase(),term=>term.trim()]),normalizedSearchTerm=getNormalizedSearchTerm(searchTerm),isSearchMatch=(0,pipe.h)([getNormalizedSearchTerm,normalizedCandidate=>normalizedCandidate.includes(normalizedSearchTerm)]);return isSearchMatch(blockType.title)||(null===(_blockType$keywords=blockType.keywords)||void 0===_blockType$keywords?void 0:_blockType$keywords.some(isSearchMatch))||isSearchMatch(blockType.category)||"string"==typeof blockType.description&&isSearchMatch(blockType.description)}const selectors_hasChildBlocks=(state,blockName)=>selectors_getChildBlockNames(state,blockName).length>0,selectors_hasChildBlocksWithInserterSupport=(state,blockName)=>selectors_getChildBlockNames(state,blockName).some((childBlockName=>selectors_hasBlockSupport(state,childBlockName,"inserter",!0))),__experimentalHasContentRoleAttribute=(0,rememo.A)(((state,blockTypeName)=>{const blockType=selectors_getBlockType(state,blockTypeName);return!!blockType&&Object.entries(blockType.attributes).some((_ref3=>{let[,{__experimentalRole}]=_ref3;return"content"===__experimentalRole}))}),((state,blockTypeName)=>{var _state$blockTypes$blo;return[null===(_state$blockTypes$blo=state.blockTypes[blockTypeName])||void 0===_state$blockTypes$blo?void 0:_state$blockTypes$blo.attributes]}));var is_plain_object=__webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs"),deprecated_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+deprecated@3.41.0/node_modules/@wordpress/deprecated/build-module/index.js");const{error,warn}=window.console,LEGACY_CATEGORY_MAPPING={common:"text",formatting:"text",layout:"design"};function isFunction(maybeFunc){return"function"==typeof maybeFunc}const processBlockType=(blockType,_ref)=>{let{select}=_ref;const{name}=blockType,settings=(0,hooks_build_module.W5)("blocks.registerBlockType",{...blockType},name,null);if(settings.description&&"string"!=typeof settings.description&&(0,deprecated_build_module.A)("Declaring non-string block descriptions",{since:"6.2"}),settings.deprecated&&(settings.deprecated=settings.deprecated.map((deprecation=>(0,lodash.pick)((0,hooks_build_module.W5)("blocks.registerBlockType",{...omit(blockType,DEPRECATED_ENTRY_KEYS),...deprecation},name,deprecation),DEPRECATED_ENTRY_KEYS)))),(0,is_plain_object.Q)(settings))if(isFunction(settings.save))if(!("edit"in settings)||isFunction(settings.edit))if(LEGACY_CATEGORY_MAPPING.hasOwnProperty(settings.category)&&(settings.category=LEGACY_CATEGORY_MAPPING[settings.category]),"category"in settings&&!select.getCategories().some((_ref2=>{let{slug}=_ref2;return slug===settings.category}))&&(warn('The block "'+name+'" is registered with an invalid category "'+settings.category+'".'),delete settings.category),"title"in settings&&""!==settings.title)if("string"==typeof settings.title){if(settings.icon=function normalizeIconObject(icon){if(isValidIcon(icon=icon||"block-default"))return{src:icon};if("background"in icon){const colordBgColor=(0,colord.Mj)(icon.background),getColorContrast=iconColor=>colordBgColor.contrast(iconColor),maxContrast=Math.max(...ICON_COLORS.map(getColorContrast));return{...icon,foreground:icon.foreground?icon.foreground:ICON_COLORS.find((iconColor=>getColorContrast(iconColor)===maxContrast)),shadowColor:colordBgColor.alpha(.3).toRgbString()}}return icon}(settings.icon),isValidIcon(settings.icon.src))return settings;error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional")}else error("Block titles must be strings.");else error('The block "'+name+'" must have a title.');else error('The "edit" property must be a valid function.');else error('The "save" property must be a valid function.');else error("Block settings must be a valid object.")};function addBlockTypes(blockTypes){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(blockTypes)?blockTypes:[blockTypes]}}const __experimentalRegisterBlockType=blockType=>_ref3=>{let{dispatch,select}=_ref3;dispatch({type:"ADD_UNPROCESSED_BLOCK_TYPE",blockType});const processedBlockType=processBlockType(blockType,{select});processedBlockType&&dispatch.addBlockTypes(processedBlockType)},__experimentalReapplyBlockTypeFilters=()=>_ref4=>{let{dispatch,select}=_ref4;const unprocessedBlockTypes=select.__experimentalGetUnprocessedBlockTypes(),processedBlockTypes=Object.keys(unprocessedBlockTypes).reduce(((accumulator,blockName)=>{const result=processBlockType(unprocessedBlockTypes[blockName],{select});return result&&accumulator.push(result),accumulator}),[]);processedBlockTypes.length&&dispatch.addBlockTypes(processedBlockTypes)};function removeBlockTypes(names){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(names)?names:[names]}}function addBlockStyles(blockName,styles){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(styles)?styles:[styles],blockName}}function removeBlockStyles(blockName,styleNames){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(styleNames)?styleNames:[styleNames],blockName}}function addBlockVariations(blockName,variations){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(variations)?variations:[variations],blockName}}function removeBlockVariations(blockName,variationNames){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(variationNames)?variationNames:[variationNames],blockName}}function actions_setDefaultBlockName(name){return{type:"SET_DEFAULT_BLOCK_NAME",name}}function setFreeformFallbackBlockName(name){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name}}function setUnregisteredFallbackBlockName(name){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name}}function actions_setGroupingBlockName(name){return{type:"SET_GROUPING_BLOCK_NAME",name}}function setCategories(categories){return{type:"SET_CATEGORIES",categories}}function updateCategory(slug,category){return{type:"UPDATE_CATEGORY",slug,category}}function addBlockCollection(namespace,title,icon){return{type:"ADD_BLOCK_COLLECTION",namespace,title,icon}}function removeBlockCollection(namespace){return{type:"REMOVE_BLOCK_COLLECTION",namespace}}const store=(0,redux_store.A)("core/blocks",{reducer,selectors:selectors_namespaceObject,actions:actions_namespaceObject});let build_module_document,offset,output,stack;(0,build_module.kz)(store);const tokenizer=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function Block(blockName,attrs,innerBlocks,innerHTML,innerContent){return{blockName,attrs,innerBlocks,innerHTML,innerContent}}function Freeform(innerHTML){return Block(null,{},[],innerHTML,[innerHTML])}const parse=doc=>{build_module_document=doc,offset=0,output=[],stack=[],tokenizer.lastIndex=0;do{}while(proceed());return output};function proceed(){const stackDepth=stack.length,next=function nextToken(){const matches=tokenizer.exec(build_module_document);if(null===matches)return["no-more-tokens","",null,0,0];const startedAt=matches.index,[match,closerMatch,namespaceMatch,nameMatch,attrsMatch,,voidMatch]=matches,length=match.length,isCloser=!!closerMatch,isVoid=!!voidMatch,name=(namespaceMatch||"core/")+nameMatch,hasAttrs=!!attrsMatch,attrs=hasAttrs?function parseJSON(input){try{return JSON.parse(input)}catch(e){return null}}(attrsMatch):{};if(isVoid)return["void-block",name,attrs,startedAt,length];if(isCloser)return["block-closer",name,null,startedAt,length];return["block-opener",name,attrs,startedAt,length]}(),[tokenType,blockName,attrs,startOffset,tokenLength]=next,leadingHtmlStart=startOffset>offset?offset:null;switch(tokenType){case"no-more-tokens":if(0===stackDepth)return addFreeform(),!1;if(1===stackDepth)return addBlockFromStack(),!1;for(;0<stack.length;)addBlockFromStack();return!1;case"void-block":return 0===stackDepth?(null!==leadingHtmlStart&&output.push(Freeform(build_module_document.substr(leadingHtmlStart,startOffset-leadingHtmlStart))),output.push(Block(blockName,attrs,[],"",[])),offset=startOffset+tokenLength,!0):(addInnerBlock(Block(blockName,attrs,[],"",[]),startOffset,tokenLength),offset=startOffset+tokenLength,!0);case"block-opener":return stack.push(function Frame(block,tokenStart,tokenLength,prevOffset,leadingHtmlStart){return{block,tokenStart,tokenLength,prevOffset:prevOffset||tokenStart+tokenLength,leadingHtmlStart}}(Block(blockName,attrs,[],"",[]),startOffset,tokenLength,startOffset+tokenLength,leadingHtmlStart)),offset=startOffset+tokenLength,!0;case"block-closer":if(0===stackDepth)return addFreeform(),!1;if(1===stackDepth)return addBlockFromStack(startOffset),offset=startOffset+tokenLength,!0;const stackTop=stack.pop(),html=build_module_document.substr(stackTop.prevOffset,startOffset-stackTop.prevOffset);return stackTop.block.innerHTML+=html,stackTop.block.innerContent.push(html),stackTop.prevOffset=startOffset+tokenLength,addInnerBlock(stackTop.block,stackTop.tokenStart,stackTop.tokenLength,startOffset+tokenLength),offset=startOffset+tokenLength,!0;default:return addFreeform(),!1}}function addFreeform(rawLength){const length=rawLength||build_module_document.length-offset;0!==length&&output.push(Freeform(build_module_document.substr(offset,length)))}function addInnerBlock(block,tokenStart,tokenLength,lastOffset){const parent=stack[stack.length-1];parent.block.innerBlocks.push(block);const html=build_module_document.substr(parent.prevOffset,tokenStart-parent.prevOffset);html&&(parent.block.innerHTML+=html,parent.block.innerContent.push(html)),parent.block.innerContent.push(null),parent.prevOffset=lastOffset||tokenStart+tokenLength}function addBlockFromStack(endOffset){const{block,leadingHtmlStart,prevOffset,tokenStart}=stack.pop(),html=endOffset?build_module_document.substr(prevOffset,endOffset-prevOffset):build_module_document.substr(prevOffset);html&&(block.innerHTML+=html,block.innerContent.push(html)),null!==leadingHtmlStart&&output.push(Freeform(build_module_document.substr(leadingHtmlStart,tokenStart-leadingHtmlStart))),output.push(block)}const htmlSplitRegex=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function replaceInHtmlTags(haystack,replacePairs){const textArr=function htmlSplit(input){const parts=[];let match,workingInput=input;for(;match=workingInput.match(htmlSplitRegex);){const index=match.index;parts.push(workingInput.slice(0,index)),parts.push(match[0]),workingInput=workingInput.slice(index+match[0].length)}return workingInput.length&&parts.push(workingInput),parts}(haystack);let changed=!1;const needles=Object.keys(replacePairs);for(let i=1;i<textArr.length;i+=2)for(let j=0;j<needles.length;j++){const needle=needles[j];if(-1!==textArr[i].indexOf(needle)){textArr[i]=textArr[i].replace(new RegExp(needle,"g"),replacePairs[needle]),changed=!0;break}}return changed&&(haystack=textArr.join("")),haystack}var raw_html=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/raw-html.js"),serialize=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/serialize.js"),is_shallow_equal_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+is-shallow-equal@4.24.0/node_modules/@wordpress/is-shallow-equal/build-module/index.js");function serializeRawBlock(rawBlock){let options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isCommentDelimited=!0}=options,{blockName,attrs={},innerBlocks=[],innerContent=[]}=rawBlock;let childIndex=0;const content=innerContent.map((item=>null!==item?item:serializeRawBlock(innerBlocks[childIndex++],options))).join("\n").replace(/\n+/g,"\n").trim();return isCommentDelimited?getCommentDelimitedContent(blockName,attrs,content):content}function getBlockDefaultClassName(blockName){const className="wp-block-"+blockName.replace(/\//,"-").replace(/^core-/,"");return(0,hooks_build_module.W5)("blocks.getBlockDefaultClassName",className,blockName)}function getBlockMenuDefaultClassName(blockName){const className="editor-block-list-item-"+blockName.replace(/\//,"-").replace(/^core-/,"");return(0,hooks_build_module.W5)("blocks.getBlockMenuDefaultClassName",className,blockName)}const blockPropsProvider={},innerBlocksPropsProvider={};function getBlockProps(){let props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blockType,attributes}=blockPropsProvider;return(0,hooks_build_module.W5)("blocks.getSaveContent.extraProps",{...props},blockType,attributes)}function getInnerBlocksProps(){let props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerBlocks}=innerBlocksPropsProvider,html=serializer_serialize(innerBlocks,{isInnerBlocks:!0});return{...props,children:(0,react.createElement)(raw_html.A,null,html)}}function getSaveContent(blockTypeOrName,attributes,innerBlocks){const blockType=utils_normalizeBlockType(blockTypeOrName);return(0,serialize.Ay)(function getSaveElement(blockTypeOrName,attributes){let innerBlocks=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const blockType=utils_normalizeBlockType(blockTypeOrName);let{save}=blockType;if(save.prototype instanceof react.Component){const instance=new save({attributes});save=instance.render.bind(instance)}blockPropsProvider.blockType=blockType,blockPropsProvider.attributes=attributes,innerBlocksPropsProvider.innerBlocks=innerBlocks;let element=save({attributes,innerBlocks});if(null!==element&&"object"==typeof element&&(0,hooks_build_module.FC)("blocks.getSaveContent.extraProps")&&!(blockType.apiVersion>1)){const props=(0,hooks_build_module.W5)("blocks.getSaveContent.extraProps",{...element.props},blockType,attributes);(0,is_shallow_equal_build_module.Ay)(props,element.props)||(element=(0,react.cloneElement)(element,props))}return(0,hooks_build_module.W5)("blocks.getSaveElement",element,blockType,attributes)}(blockType,attributes,innerBlocks))}function getBlockInnerHTML(block){let saveContent=block.originalContent;if(block.isValid||block.innerBlocks.length)try{saveContent=getSaveContent(block.name,block.attributes,block.innerBlocks)}catch(error){}return saveContent}function getCommentDelimitedContent(rawBlockName,attributes,content){const serializedAttributes=attributes&&Object.entries(attributes).length?function serializeAttributes(attributes){return JSON.stringify(attributes).replace(/--/g,"\\u002d\\u002d").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(attributes)+" ":"",blockName=null!=rawBlockName&&rawBlockName.startsWith("core/")?rawBlockName.slice(5):rawBlockName;return content?`\x3c!-- wp:${blockName} ${serializedAttributes}--\x3e\n`+content+`\n\x3c!-- /wp:${blockName} --\x3e`:`\x3c!-- wp:${blockName} ${serializedAttributes}/--\x3e`}function serializeBlock(block){let{isInnerBlocks=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!block.isValid&&block.__unstableBlockSource)return serializeRawBlock(block.__unstableBlockSource);const blockName=block.name,saveContent=getBlockInnerHTML(block);if(blockName===getUnregisteredTypeHandlerName()||!isInnerBlocks&&blockName===registration_getFreeformContentHandlerName())return saveContent;const blockType=getBlockType(blockName);if(!blockType)return saveContent;const saveAttributes=function getCommentAttributes(blockType,attributes){var _blockType$attributes;return Object.entries(null!==(_blockType$attributes=blockType.attributes)&&void 0!==_blockType$attributes?_blockType$attributes:{}).reduce(((accumulator,_ref)=>{let[key,attributeSchema]=_ref;const value=attributes[key];return void 0===value||void 0!==attributeSchema.source||"default"in attributeSchema&&attributeSchema.default===value||(accumulator[key]=value),accumulator}),{})}(blockType,block.attributes);return getCommentDelimitedContent(blockName,saveAttributes,saveContent)}function serializer_serialize(blocks,options){return(Array.isArray(blocks)?blocks:[blocks]).map((block=>serializeBlock(block,options))).join("\n\n")}var HEXCHARCODE=/^#[xX]([A-Fa-f0-9]+)$/,CHARCODE=/^#([0-9]+)$/,NAMED=/^([A-Za-z0-9]+)$/,WSP=(function(){function EntityParser(named){this.named=named}EntityParser.prototype.parse=function(entity){if(entity){var matches=entity.match(HEXCHARCODE);return matches?String.fromCharCode(parseInt(matches[1],16)):(matches=entity.match(CHARCODE))?String.fromCharCode(parseInt(matches[1],10)):(matches=entity.match(NAMED))?this.named[matches[1]]:void 0}}}(),/[\t\n\f ]/),ALPHA=/[A-Za-z]/,CRLF=/\r\n?/g;function isSpace(char){return WSP.test(char)}function isAlpha(char){return ALPHA.test(char)}var EventedTokenizer=function(){function EventedTokenizer(delegate,entityParser,mode){void 0===mode&&(mode="precompile"),this.delegate=delegate,this.entityParser=entityParser,this.mode=mode,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var char=this.peek();if("<"!==char||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===char){var tag=this.tagNameBuffer.toLowerCase();"pre"!==tag&&"textarea"!==tag||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var char=this.peek(),tag=this.tagNameBuffer;"<"!==char||this.isIgnoredEndTag()?"&"===char&&"script"!==tag&&"style"!==tag?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(char)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var char=this.consume();"!"===char?this.transitionTo("markupDeclarationOpen"):"/"===char?this.transitionTo("endTagOpen"):("@"===char||":"===char||isAlpha(char))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(char))},markupDeclarationOpen:function(){var char=this.consume();"-"===char&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===char.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){isSpace(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var char=this.consume();isSpace(char)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(char.toLowerCase()))},doctypeName:function(){var char=this.consume();isSpace(char)?this.transitionTo("afterDoctypeName"):">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(char.toLowerCase())},afterDoctypeName:function(){var char=this.consume();if(!isSpace(char))if(">"===char)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var nextSixChars=char.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),isPublic="PUBLIC"===nextSixChars.toUpperCase(),isSystem="SYSTEM"===nextSixChars.toUpperCase();(isPublic||isSystem)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),isPublic?this.transitionTo("afterDoctypePublicKeyword"):isSystem&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var char=this.peek();isSpace(char)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===char?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===char?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===char&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var char=this.consume();'"'===char?this.transitionTo("afterDoctypePublicIdentifier"):">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(char)},doctypePublicIdentifierSingleQuoted:function(){var char=this.consume();"'"===char?this.transitionTo("afterDoctypePublicIdentifier"):">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(char)},afterDoctypePublicIdentifier:function(){var char=this.consume();isSpace(char)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===char?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===char&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var char=this.consume();isSpace(char)||(">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===char?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===char&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var char=this.consume();'"'===char?this.transitionTo("afterDoctypeSystemIdentifier"):">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(char)},doctypeSystemIdentifierSingleQuoted:function(){var char=this.consume();"'"===char?this.transitionTo("afterDoctypeSystemIdentifier"):">"===char?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(char)},afterDoctypeSystemIdentifier:function(){var char=this.consume();isSpace(char)||">"===char&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var char=this.consume();"-"===char?this.transitionTo("commentStartDash"):">"===char?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(char),this.transitionTo("comment"))},commentStartDash:function(){var char=this.consume();"-"===char?this.transitionTo("commentEnd"):">"===char?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var char=this.consume();"-"===char?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(char)},commentEndDash:function(){var char=this.consume();"-"===char?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+char),this.transitionTo("comment"))},commentEnd:function(){var char=this.consume();">"===char?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+char),this.transitionTo("comment"))},tagName:function(){var char=this.consume();isSpace(char)?this.transitionTo("beforeAttributeName"):"/"===char?this.transitionTo("selfClosingStartTag"):">"===char?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(char)},endTagName:function(){var char=this.consume();isSpace(char)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===char?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===char?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(char)},beforeAttributeName:function(){var char=this.peek();isSpace(char)?this.consume():"/"===char?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===char?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===char?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(char)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var char=this.peek();isSpace(char)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===char?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===char?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===char?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===char||"'"===char||"<"===char?(this.delegate.reportSyntaxError(char+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(char)):(this.consume(),this.delegate.appendToAttributeName(char))},afterAttributeName:function(){var char=this.peek();isSpace(char)?this.consume():"/"===char?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===char?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===char?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(char))},beforeAttributeValue:function(){var char=this.peek();isSpace(char)?this.consume():'"'===char?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===char?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===char?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(char))},attributeValueDoubleQuoted:function(){var char=this.consume();'"'===char?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===char?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(char)},attributeValueSingleQuoted:function(){var char=this.consume();"'"===char?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===char?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(char)},attributeValueUnquoted:function(){var char=this.peek();isSpace(char)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===char?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===char?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===char?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(char))},afterAttributeValueQuoted:function(){var char=this.peek();isSpace(char)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===char?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===char?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var char=this.consume();("@"===char||":"===char||isAlpha(char))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(char))}},this.reset()}return EventedTokenizer.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},EventedTokenizer.prototype.transitionTo=function(state){this.state=state},EventedTokenizer.prototype.tokenize=function(input){this.reset(),this.tokenizePart(input),this.tokenizeEOF()},EventedTokenizer.prototype.tokenizePart=function(input){for(this.input+=function preprocessInput(input){return input.replace(CRLF,"\n")}(input);this.index<this.input.length;){var handler=this.states[this.state];if(void 0===handler)throw new Error("unhandled state "+this.state);handler.call(this)}},EventedTokenizer.prototype.tokenizeEOF=function(){this.flushData()},EventedTokenizer.prototype.flushData=function(){"data"===this.state&&(this.delegate.finishData(),this.transitionTo("beforeData"))},EventedTokenizer.prototype.peek=function(){return this.input.charAt(this.index)},EventedTokenizer.prototype.consume=function(){var char=this.peek();return this.index++,"\n"===char?(this.line++,this.column=0):this.column++,char},EventedTokenizer.prototype.consumeCharRef=function(){var endIndex=this.input.indexOf(";",this.index);if(-1!==endIndex){var entity=this.input.slice(this.index,endIndex),chars=this.entityParser.parse(entity);if(chars){for(var count=entity.length;count;)this.consume(),count--;return this.consume(),chars}}},EventedTokenizer.prototype.markTagStart=function(){this.delegate.tagOpen()},EventedTokenizer.prototype.appendToTagName=function(char){this.tagNameBuffer+=char,this.delegate.appendToTagName(char)},EventedTokenizer.prototype.isIgnoredEndTag=function(){var tag=this.tagNameBuffer;return"title"===tag&&"</title>"!==this.input.substring(this.index,this.index+8)||"style"===tag&&"</style>"!==this.input.substring(this.index,this.index+8)||"script"===tag&&"<\/script>"!==this.input.substring(this.index,this.index+9)},EventedTokenizer}(),Tokenizer=function(){function Tokenizer(entityParser,options){void 0===options&&(options={}),this.options=options,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new EventedTokenizer(this,entityParser,options.mode),this._currentAttribute=void 0}return Tokenizer.prototype.tokenize=function(input){return this.tokens=[],this.tokenizer.tokenize(input),this.tokens},Tokenizer.prototype.tokenizePart=function(input){return this.tokens=[],this.tokenizer.tokenizePart(input),this.tokens},Tokenizer.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},Tokenizer.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},Tokenizer.prototype.current=function(){var token=this.token;if(null===token)throw new Error("token was unexpectedly null");if(0===arguments.length)return token;for(var i=0;i<arguments.length;i++)if(token.type===arguments[i])return token;throw new Error("token type was unexpectedly "+token.type)},Tokenizer.prototype.push=function(token){this.token=token,this.tokens.push(token)},Tokenizer.prototype.currentAttribute=function(){return this._currentAttribute},Tokenizer.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},Tokenizer.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},Tokenizer.prototype.appendToDoctypeName=function(char){this.current("Doctype").name+=char},Tokenizer.prototype.appendToDoctypePublicIdentifier=function(char){var doctype=this.current("Doctype");void 0===doctype.publicIdentifier?doctype.publicIdentifier=char:doctype.publicIdentifier+=char},Tokenizer.prototype.appendToDoctypeSystemIdentifier=function(char){var doctype=this.current("Doctype");void 0===doctype.systemIdentifier?doctype.systemIdentifier=char:doctype.systemIdentifier+=char},Tokenizer.prototype.endDoctype=function(){this.addLocInfo()},Tokenizer.prototype.beginData=function(){this.push({type:"Chars",chars:""})},Tokenizer.prototype.appendToData=function(char){this.current("Chars").chars+=char},Tokenizer.prototype.finishData=function(){this.addLocInfo()},Tokenizer.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},Tokenizer.prototype.appendToCommentData=function(char){this.current("Comment").chars+=char},Tokenizer.prototype.finishComment=function(){this.addLocInfo()},Tokenizer.prototype.tagOpen=function(){},Tokenizer.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},Tokenizer.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},Tokenizer.prototype.finishTag=function(){this.addLocInfo()},Tokenizer.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},Tokenizer.prototype.appendToTagName=function(char){this.current("StartTag","EndTag").tagName+=char},Tokenizer.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},Tokenizer.prototype.appendToAttributeName=function(char){this.currentAttribute()[0]+=char},Tokenizer.prototype.beginAttributeValue=function(isQuoted){this.currentAttribute()[2]=isQuoted},Tokenizer.prototype.appendToAttributeValue=function(char){this.currentAttribute()[1]+=char},Tokenizer.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},Tokenizer.prototype.reportSyntaxError=function(message){this.current().syntaxError=message},Tokenizer}();var html_entities_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+html-entities@3.24.0/node_modules/@wordpress/html-entities/build-module/index.js");function createLogger(){function createLogHandler(logger){return function(message){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];return logger("Block validation: "+message,...args)}}return{error:createLogHandler(console.error),warning:createLogHandler(console.warn),getItems:()=>[]}}const REGEXP_WHITESPACE=/[\t\n\r\v\f ]+/g,REGEXP_ONLY_WHITESPACE=/^[\t\n\r\v\f ]*$/,REGEXP_STYLE_URL_TYPE=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,BOOLEAN_ATTRIBUTES=["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"],MEANINGFUL_ATTRIBUTES=[...BOOLEAN_ATTRIBUTES,"autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],TEXT_NORMALIZATIONS=[x=>x,function getTextWithCollapsedWhitespace(text){return getTextPiecesSplitOnWhitespace(text).join(" ")}],REGEXP_NAMED_CHARACTER_REFERENCE=/^[\da-z]+$/i,REGEXP_DECIMAL_CHARACTER_REFERENCE=/^#\d+$/,REGEXP_HEXADECIMAL_CHARACTER_REFERENCE=/^#x[\da-f]+$/i;class DecodeEntityParser{parse(entity){if(function isValidCharacterReference(text){return REGEXP_NAMED_CHARACTER_REFERENCE.test(text)||REGEXP_DECIMAL_CHARACTER_REFERENCE.test(text)||REGEXP_HEXADECIMAL_CHARACTER_REFERENCE.test(text)}(entity))return(0,html_entities_build_module.S)("&"+entity+";")}}function getTextPiecesSplitOnWhitespace(text){return text.trim().split(REGEXP_WHITESPACE)}function getMeaningfulAttributePairs(token){return token.attributes.filter((pair=>{const[key,value]=pair;return value||0===key.indexOf("data-")||MEANINGFUL_ATTRIBUTES.includes(key)}))}function isEquivalentTextTokens(actual,expected){let logger=arguments.length>2&&void 0!==arguments[2]?arguments[2]:createLogger(),actualChars=actual.chars,expectedChars=expected.chars;for(let i=0;i<TEXT_NORMALIZATIONS.length;i++){const normalize=TEXT_NORMALIZATIONS[i];if(actualChars=normalize(actualChars),expectedChars=normalize(expectedChars),actualChars===expectedChars)return!0}return logger.warning("Expected text `%s`, saw `%s`.",expected.chars,actual.chars),!1}function getNormalizedLength(value){return 0===parseFloat(value)?"0":0===value.indexOf(".")?"0"+value:value}function getNormalizedStyleValue(value){return getTextPiecesSplitOnWhitespace(value).map(getNormalizedLength).join(" ").replace(REGEXP_STYLE_URL_TYPE,"url($1)")}function getStyleProperties(text){const pairs=text.replace(/;?\s*$/,"").split(";").map((style=>{const[key,...valueParts]=style.split(":"),value=valueParts.join(":");return[key.trim(),getNormalizedStyleValue(value.trim())]}));return Object.fromEntries(pairs)}const isEqualAttributesOfName={class:(actual,expected)=>{const[actualPieces,expectedPieces]=[actual,expected].map(getTextPiecesSplitOnWhitespace),actualDiff=actualPieces.filter((c=>!expectedPieces.includes(c))),expectedDiff=expectedPieces.filter((c=>!actualPieces.includes(c)));return 0===actualDiff.length&&0===expectedDiff.length},style:(actual,expected)=>(0,lodash.isEqual)(...[actual,expected].map(getStyleProperties)),...Object.fromEntries(BOOLEAN_ATTRIBUTES.map((attribute=>[attribute,()=>!0])))};const isEqualTokensOfType={StartTag:function(actual,expected){let logger=arguments.length>2&&void 0!==arguments[2]?arguments[2]:createLogger();return actual.tagName!==expected.tagName&&actual.tagName.toLowerCase()!==expected.tagName.toLowerCase()?(logger.warning("Expected tag name `%s`, instead saw `%s`.",expected.tagName,actual.tagName),!1):function isEqualTagAttributePairs(actual,expected){let logger=arguments.length>2&&void 0!==arguments[2]?arguments[2]:createLogger();if(actual.length!==expected.length)return logger.warning("Expected attributes %o, instead saw %o.",expected,actual),!1;const expectedAttributes={};for(let i=0;i<expected.length;i++)expectedAttributes[expected[i][0].toLowerCase()]=expected[i][1];for(let i=0;i<actual.length;i++){const[name,actualValue]=actual[i],nameLower=name.toLowerCase();if(!expectedAttributes.hasOwnProperty(nameLower))return logger.warning("Encountered unexpected attribute `%s`.",name),!1;const expectedValue=expectedAttributes[nameLower],isEqualAttributes=isEqualAttributesOfName[nameLower];if(isEqualAttributes){if(!isEqualAttributes(actualValue,expectedValue))return logger.warning("Expected attribute `%s` of value `%s`, saw `%s`.",name,expectedValue,actualValue),!1}else if(actualValue!==expectedValue)return logger.warning("Expected attribute `%s` of value `%s`, saw `%s`.",name,expectedValue,actualValue),!1}return!0}(...[actual,expected].map(getMeaningfulAttributePairs),logger)},Chars:isEquivalentTextTokens,Comment:isEquivalentTextTokens};function getNextNonWhitespaceToken(tokens){let token;for(;token=tokens.shift();){if("Chars"!==token.type)return token;if(!REGEXP_ONLY_WHITESPACE.test(token.chars))return token}}function isClosedByToken(currentToken,nextToken){return!!currentToken.selfClosing&&!(!nextToken||nextToken.tagName!==currentToken.tagName||"EndTag"!==nextToken.type)}function isEquivalentHTML(actual,expected){let logger=arguments.length>2&&void 0!==arguments[2]?arguments[2]:createLogger();if(actual===expected)return!0;const[actualTokens,expectedTokens]=[actual,expected].map((html=>function getHTMLTokens(html){let logger=arguments.length>1&&void 0!==arguments[1]?arguments[1]:createLogger();try{return new Tokenizer(new DecodeEntityParser).tokenize(html)}catch(e){logger.warning("Malformed HTML detected: %s",html)}return null}(html,logger)));if(!actualTokens||!expectedTokens)return!1;let actualToken,expectedToken;for(;actualToken=getNextNonWhitespaceToken(actualTokens);){if(expectedToken=getNextNonWhitespaceToken(expectedTokens),!expectedToken)return logger.warning("Expected end of content, instead saw %o.",actualToken),!1;if(actualToken.type!==expectedToken.type)return logger.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",expectedToken.type,expectedToken,actualToken.type,actualToken),!1;const isEqualTokens=isEqualTokensOfType[actualToken.type];if(isEqualTokens&&!isEqualTokens(actualToken,expectedToken,logger))return!1;isClosedByToken(actualToken,expectedTokens[0])?getNextNonWhitespaceToken(expectedTokens):isClosedByToken(expectedToken,actualTokens[0])&&getNextNonWhitespaceToken(actualTokens)}return!(expectedToken=getNextNonWhitespaceToken(expectedTokens))||(logger.warning("Expected %o, instead saw end of content.",expectedToken),!1)}function validateBlock(block){let blockTypeOrName=arguments.length>1&&void 0!==arguments[1]?arguments[1]:block.name;if(block.name===registration_getFreeformContentHandlerName()||block.name===getUnregisteredTypeHandlerName())return[!0,[]];const logger=function createQueuedLogger(){const queue=[],logger=createLogger();return{error(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];queue.push({log:logger.error,args})},warning(){for(var _len3=arguments.length,args=new Array(_len3),_key3=0;_key3<_len3;_key3++)args[_key3]=arguments[_key3];queue.push({log:logger.warning,args})},getItems:()=>queue}}(),blockType=utils_normalizeBlockType(blockTypeOrName);let generatedBlockContent;try{generatedBlockContent=getSaveContent(blockType,block.attributes)}catch(error){return logger.error("Block validation failed because an error occurred while generating block content:\n\n%s",error.toString()),[!1,logger.getItems()]}const isValid=isEquivalentHTML(block.originalContent,generatedBlockContent,logger);return isValid||logger.error("Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",blockType.name,blockType,generatedBlockContent,block.originalContent),[isValid,logger.getItems()]}function convertLegacyBlockNameAndAttributes(name,attributes){const newAttributes={...attributes};if("core/cover-image"===name&&(name="core/cover"),"core/text"!==name&&"core/cover-text"!==name||(name="core/paragraph"),name&&0===name.indexOf("core/social-link-")&&(newAttributes.service=name.substring(17),name="core/social-link"),name&&0===name.indexOf("core-embed/")){const providerSlug=name.substring(11),deprecated={speaker:"speaker-deck",polldaddy:"crowdsignal"};newAttributes.providerNameSlug=providerSlug in deprecated?deprecated[providerSlug]:providerSlug,["amazon-kindle","wordpress"].includes(providerSlug)||(newAttributes.responsive=!0),name="core/embed"}if("core/post-comment-author"===name&&(name="core/comment-author-name"),"core/post-comment-content"===name&&(name="core/comment-content"),"core/post-comment-date"===name&&(name="core/comment-date"),"core/comments-query-loop"===name){name="core/comments";const{className=""}=newAttributes;className.includes("wp-block-comments-query-loop")||(newAttributes.className=["wp-block-comments-query-loop",className].join(" "))}return"core/post-comments"===name&&(name="core/comments",newAttributes.legacy=!0),[name,newAttributes]}var doc,getDocument=function(){return doc||(doc=document.implementation.createHTMLDocument("")),doc};function es_parse(source,matchers){if(matchers){if("string"==typeof source){var doc=getDocument();doc.body.innerHTML=source,source=doc.body}if("function"==typeof matchers)return matchers(source);if(Object===matchers.constructor)return Object.keys(matchers).reduce((function(memo,key){var inner=matchers[key];return memo[key]=es_parse(source,inner),memo}),{})}}function prop(arg1,arg2){var name,selector;return 1===arguments.length?(name=arg1,selector=void 0):(name=arg2,selector=arg1),function(node){var match=node;if(selector&&(match=node.querySelector(selector)),match)return function getPath(object,path){for(var segment,segments=path.split(".");segment=segments.shift();){if(!(segment in object))return;object=object[segment]}return object}(match,name)}}var memize=__webpack_require__("../../node_modules/.pnpm/memize@1.1.0/node_modules/memize/index.js");function getNamedNodeMapAsObject(nodeMap){const result={};for(let i=0;i<nodeMap.length;i++){const{name,value}=nodeMap[i];result[name]=value}return result}function fromDOM(domNode){if((0,deprecated_build_module.A)("wp.blocks.node.fromDOM",{since:"6.1",version:"6.3",alternative:"wp.richText.create",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),domNode.nodeType===domNode.TEXT_NODE)return domNode.nodeValue;if(domNode.nodeType!==domNode.ELEMENT_NODE)throw new TypeError("A block node can only be created from a node of type text or element.");return{type:domNode.nodeName.toLowerCase(),props:{...getNamedNodeMapAsObject(domNode.attributes),children:children_fromDOM(domNode.childNodes)}}}function node_matcher(selector){return(0,deprecated_build_module.A)("wp.blocks.node.matcher",{since:"6.1",version:"6.3",alternative:"html source",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),domNode=>{let match=domNode;selector&&(match=domNode.querySelector(selector));try{return fromDOM(match)}catch(error){return null}}}function children_fromDOM(domNodes){(0,deprecated_build_module.A)("wp.blocks.children.fromDOM",{since:"6.1",version:"6.3",alternative:"wp.richText.create",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const result=[];for(let i=0;i<domNodes.length;i++)try{result.push(fromDOM(domNodes[i]))}catch(error){}return result}function children_matcher(selector){return(0,deprecated_build_module.A)("wp.blocks.children.matcher",{since:"6.1",version:"6.3",alternative:"html source",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),domNode=>{let match=domNode;return selector&&(match=domNode.querySelector(selector)),match?children_fromDOM(match.childNodes):[]}}function isOfTypes(value,types){return types.some((type=>function isOfType(value,type){switch(type){case"string":return"string"==typeof value;case"boolean":return"boolean"==typeof value;case"object":return!!value&&value.constructor===Object;case"null":return null===value;case"array":return Array.isArray(value);case"integer":case"number":return"number"==typeof value}return!0}(value,type)))}function getBlockAttribute(attributeKey,attributeSchema,innerHTML,commentAttributes){let value;switch(attributeSchema.source){case void 0:value=commentAttributes?commentAttributes[attributeKey]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":value=parseWithAttributeSchema(innerHTML,attributeSchema)}return function isValidByType(value,type){return void 0===type||isOfTypes(value,Array.isArray(type)?type:[type])}(value,attributeSchema.type)&&function isValidByEnum(value,enumSet){return!Array.isArray(enumSet)||enumSet.includes(value)}(value,attributeSchema.enum)||(value=void 0),void 0===value&&(value=attributeSchema.default),value}const matcherFromSource=__webpack_require__.n(memize)()((sourceConfig=>{switch(sourceConfig.source){case"attribute":let matcher=function attr(arg1,arg2){var name,selector;return 1===arguments.length?(name=arg1,selector=void 0):(name=arg2,selector=arg1),function(node){var attributes=prop(selector,"attributes")(node);if(attributes&&Object.prototype.hasOwnProperty.call(attributes,name))return attributes[name].value}}(sourceConfig.selector,sourceConfig.attribute);return"boolean"===sourceConfig.type&&(matcher=(matcher=>(0,pipe.h)([matcher,value=>void 0!==value]))(matcher)),matcher;case"html":return function matchers_html(selector,multilineTag){return domNode=>{let match=domNode;if(selector&&(match=domNode.querySelector(selector)),!match)return"";if(multilineTag){let value="";const length=match.children.length;for(let index=0;index<length;index++){const child=match.children[index];child.nodeName.toLowerCase()===multilineTag&&(value+=child.outerHTML)}return value}return match.innerHTML}}(sourceConfig.selector,sourceConfig.multiline);case"text":return function es_text(selector){return prop(selector,"textContent")}(sourceConfig.selector);case"children":return children_matcher(sourceConfig.selector);case"node":return node_matcher(sourceConfig.selector);case"query":const subMatchers=(0,lodash.mapValues)(sourceConfig.query,matcherFromSource);return function query(selector,matchers){return function(node){var matches=node.querySelectorAll(selector);return[].map.call(matches,(function(match){return es_parse(match,matchers)}))}}(sourceConfig.selector,subMatchers);case"tag":return(0,pipe.h)([prop(sourceConfig.selector,"nodeName"),nodeName=>nodeName?nodeName.toLowerCase():void 0]);default:console.error(`Unknown source type "${sourceConfig.source}"`)}}));function parseHtml(innerHTML){return es_parse(innerHTML,(h=>h))}function parseWithAttributeSchema(innerHTML,attributeSchema){return matcherFromSource(attributeSchema)(parseHtml(innerHTML))}function getBlockAttributes(blockTypeOrName,innerHTML){let attributes=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const doc=parseHtml(innerHTML),blockType=utils_normalizeBlockType(blockTypeOrName),blockAttributes=(0,lodash.mapValues)(blockType.attributes,((schema,key)=>getBlockAttribute(key,schema,doc,attributes)));return(0,hooks_build_module.W5)("blocks.getBlockAttributes",blockAttributes,blockType,innerHTML,attributes)}const CLASS_ATTR_SCHEMA={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function getHTMLRootElementClasses(innerHTML){const parsed=parseWithAttributeSchema(`<div data-custom-class-name>${innerHTML}</div>`,CLASS_ATTR_SCHEMA);return parsed?parsed.trim().split(/\s+/):[]}function applyBuiltInValidationFixes(block,blockType){const updatedBlockAttributes=function fixCustomClassname(blockAttributes,blockType,innerHTML){if(hasBlockSupport(blockType,"customClassName",!0)){const{className:omittedClassName,...attributesSansClassName}=blockAttributes,serialized=getSaveContent(blockType,attributesSansClassName),defaultClasses=getHTMLRootElementClasses(serialized),customClasses=getHTMLRootElementClasses(innerHTML).filter((className=>!defaultClasses.includes(className)));customClasses.length?blockAttributes.className=customClasses.join(" "):serialized&&delete blockAttributes.className}return blockAttributes}(block.attributes,blockType,block.originalContent);return{...block,attributes:updatedBlockAttributes}}function stubFalse(){return!1}function normalizeRawBlock(rawBlock,options){const fallbackBlockName=registration_getFreeformContentHandlerName(),rawBlockName=rawBlock.blockName||registration_getFreeformContentHandlerName(),rawAttributes=rawBlock.attrs||{},rawInnerBlocks=rawBlock.innerBlocks||[];let rawInnerHTML=rawBlock.innerHTML.trim();return rawBlockName!==fallbackBlockName||null!=options&&options.__unstableSkipAutop||(rawInnerHTML=function autop(text,br=!0){const preTags=[];if(""===text.trim())return"";if(-1!==(text+="\n").indexOf("<pre")){const textParts=text.split("</pre>"),lastText=textParts.pop();text="";for(let i=0;i<textParts.length;i++){const textPart=textParts[i],start=textPart.indexOf("<pre");if(-1===start){text+=textPart;continue}const name="<pre wp-pre-tag-"+i+"></pre>";preTags.push([name,textPart.substr(start)+"</pre>"]),text+=textPart.substr(0,start)+name}text+=lastText}const allBlocks="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(text=replaceInHtmlTags(text=(text=(text=(text=text.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+allBlocks+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+allBlocks+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(text=(text=text.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==text.indexOf("</object>")&&(text=(text=(text=text.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===text.indexOf("<source")&&-1===text.indexOf("<track")||(text=(text=(text=text.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==text.indexOf("<figcaption")&&(text=(text=text.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));const texts=(text=text.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return text="",texts.forEach((textPiece=>{text+="<p>"+textPiece.replace(/^\n*|\n*$/g,"")+"</p>\n"})),text=(text=(text=(text=(text=(text=(text=(text=text.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+allBlocks+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+allBlocks+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+allBlocks+"[^>]*>)\\s*</p>","g"),"$1"),br&&(text=(text=(text=(text=text.replace(/<(script|style).*?<\/\\1>/g,(match=>match[0].replace(/\n/g,"<WPPreserveNewline />")))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,((a,b)=>b?a:"<br />\n"))).replace(/<WPPreserveNewline \/>/g,"\n")),text=(text=(text=text.replace(new RegExp("(</?"+allBlocks+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),preTags.forEach((preTag=>{const[name,original]=preTag;text=text.replace(name,original)})),-1!==text.indexOf("\x3c!-- wpnl --\x3e")&&(text=text.replace(/\s?<!-- wpnl -->\s?/g,"\n")),text}(rawInnerHTML).trim()),{...rawBlock,blockName:rawBlockName,attrs:rawAttributes,innerHTML:rawInnerHTML,innerBlocks:rawInnerBlocks}}function parseRawBlock(rawBlock,options){let normalizedBlock=normalizeRawBlock(rawBlock,options);normalizedBlock=function convertLegacyBlocks(rawBlock){const[correctName,correctedAttributes]=convertLegacyBlockNameAndAttributes(rawBlock.blockName,rawBlock.attrs);return{...rawBlock,blockName:correctName,attrs:correctedAttributes}}(normalizedBlock);let blockType=getBlockType(normalizedBlock.blockName);blockType||(normalizedBlock=function createMissingBlockType(rawBlock){const unregisteredFallbackBlock=getUnregisteredTypeHandlerName()||registration_getFreeformContentHandlerName(),originalUndelimitedContent=serializeRawBlock(rawBlock,{isCommentDelimited:!1}),originalContent=serializeRawBlock(rawBlock,{isCommentDelimited:!0});return{blockName:unregisteredFallbackBlock,attrs:{originalName:rawBlock.blockName,originalContent,originalUndelimitedContent},innerHTML:rawBlock.blockName?originalContent:rawBlock.innerHTML,innerBlocks:rawBlock.innerBlocks,innerContent:rawBlock.innerContent}}(normalizedBlock),blockType=getBlockType(normalizedBlock.blockName));const isFallbackBlock=normalizedBlock.blockName===registration_getFreeformContentHandlerName()||normalizedBlock.blockName===getUnregisteredTypeHandlerName();if(!blockType||!normalizedBlock.innerHTML&&isFallbackBlock)return;const parsedInnerBlocks=normalizedBlock.innerBlocks.map((innerBlock=>parseRawBlock(innerBlock,options))).filter((innerBlock=>!!innerBlock)),parsedBlock=createBlock(normalizedBlock.blockName,getBlockAttributes(blockType,normalizedBlock.innerHTML,normalizedBlock.attrs),parsedInnerBlocks);parsedBlock.originalContent=normalizedBlock.innerHTML;const validatedBlock=function applyBlockValidation(unvalidatedBlock,blockType){const[isValid]=validateBlock(unvalidatedBlock,blockType);if(isValid)return{...unvalidatedBlock,isValid,validationIssues:[]};const fixedBlock=applyBuiltInValidationFixes(unvalidatedBlock,blockType),[isFixedValid,validationIssues]=validateBlock(unvalidatedBlock,blockType);return{...fixedBlock,isValid:isFixedValid,validationIssues}}(parsedBlock,blockType),{validationIssues}=validatedBlock,updatedBlock=function applyBlockDeprecatedVersions(block,rawBlock,blockType){const parsedAttributes=rawBlock.attrs,{deprecated:deprecatedDefinitions}=blockType;if(!deprecatedDefinitions||!deprecatedDefinitions.length)return block;for(let i=0;i<deprecatedDefinitions.length;i++){const{isEligible=stubFalse}=deprecatedDefinitions[i];if(block.isValid&&!isEligible(parsedAttributes,block.innerBlocks))continue;const deprecatedBlockType=Object.assign(omit(blockType,DEPRECATED_ENTRY_KEYS),deprecatedDefinitions[i]);let migratedBlock={...block,attributes:getBlockAttributes(deprecatedBlockType,block.originalContent,parsedAttributes)},[isValid]=validateBlock(migratedBlock,deprecatedBlockType);if(isValid||(migratedBlock=applyBuiltInValidationFixes(migratedBlock,deprecatedBlockType),[isValid]=validateBlock(migratedBlock,deprecatedBlockType)),!isValid)continue;let migratedInnerBlocks=migratedBlock.innerBlocks,migratedAttributes=migratedBlock.attributes;const{migrate}=deprecatedBlockType;if(migrate){let migrated=migrate(migratedAttributes,block.innerBlocks);Array.isArray(migrated)||(migrated=[migrated]),[migratedAttributes=parsedAttributes,migratedInnerBlocks=block.innerBlocks]=migrated}block={...block,attributes:migratedAttributes,innerBlocks:migratedInnerBlocks,isValid:!0,validationIssues:[]}}return block}(validatedBlock,normalizedBlock,blockType);return updatedBlock.isValid||(updatedBlock.__unstableBlockSource=rawBlock),validatedBlock.isValid||!updatedBlock.isValid||null!=options&&options.__unstableSkipMigrationLogs?validatedBlock.isValid||updatedBlock.isValid||validationIssues.forEach((_ref=>{let{log,args}=_ref;return log(...args)})):(console.groupCollapsed("Updated Block: %s",blockType.name),console.info("Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",blockType.name,blockType,getSaveContent(blockType,updatedBlock.attributes),updatedBlock.originalContent),console.groupEnd()),updatedBlock}function parser_parse(content,options){return parse(content).reduce(((accumulator,rawBlock)=>{const block=parseRawBlock(rawBlock,options);return block&&accumulator.push(block),accumulator}),[])}function getRawTransforms(){return getBlockTransforms("from").filter((_ref=>{let{type}=_ref;return"raw"===type})).map((transform=>transform.isMatch?transform:{...transform,isMatch:node=>transform.selector&&node.matches(transform.selector)}))}function htmlToBlocks(html,handler){const doc=document.implementation.createHTMLDocument("");return doc.body.innerHTML=html,Array.from(doc.body.children).flatMap((node=>{const rawTransform=findTransform(getRawTransforms(),(_ref=>{let{isMatch}=_ref;return isMatch(node)}));if(!rawTransform)return createBlock("core/html",getBlockAttributes("core/html",node.outerHTML));const{transform,blockName}=rawTransform;return transform?transform(node,handler):createBlock(blockName,getBlockAttributes(blockName,node.outerHTML))}))}function isEmpty(element){switch(element.nodeType){case element.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(element.nodeValue||"");case element.ELEMENT_NODE:return!element.hasAttributes()&&(!element.hasChildNodes()||Array.from(element.childNodes).every(isEmpty));default:return!0}}const textContentSchema={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},excludedElements=["#text","br"];Object.keys(textContentSchema).filter((element=>!excludedElements.includes(element))).forEach((tag=>{const{[tag]:removedTag,...restSchema}=textContentSchema;textContentSchema[tag].children=restSchema}));const phrasingContentSchema={...textContentSchema,audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","autoplay","mediagroup","loop","muted","controls","width","height"]}};function phrasing_content_getPhrasingContentSchema(context){if("paste"!==context)return phrasingContentSchema;const{u,abbr,data,time,wbr,bdi,bdo,...remainingContentSchema}={...phrasingContentSchema,ins:{children:phrasingContentSchema.ins.children},del:{children:phrasingContentSchema.del.children}};return remainingContentSchema}function isPhrasingContent(node){const tag=node.nodeName.toLowerCase();return phrasing_content_getPhrasingContentSchema().hasOwnProperty(tag)||"span"===tag}function isTextContent(node){const tag=node.nodeName.toLowerCase();return textContentSchema.hasOwnProperty(tag)||"span"===tag}function normaliseBlocks(HTML){const decuDoc=document.implementation.createHTMLDocument(""),accuDoc=document.implementation.createHTMLDocument(""),decu=decuDoc.body,accu=accuDoc.body;for(decu.innerHTML=HTML;decu.firstChild;){const node=decu.firstChild;node.nodeType===node.TEXT_NODE?isEmpty(node)?decu.removeChild(node):(accu.lastChild&&"P"===accu.lastChild.nodeName||accu.appendChild(accuDoc.createElement("P")),accu.lastChild.appendChild(node)):node.nodeType===node.ELEMENT_NODE?"BR"===node.nodeName?(node.nextSibling&&"BR"===node.nextSibling.nodeName&&(accu.appendChild(accuDoc.createElement("P")),decu.removeChild(node.nextSibling)),accu.lastChild&&"P"===accu.lastChild.nodeName&&accu.lastChild.hasChildNodes()?accu.lastChild.appendChild(node):decu.removeChild(node)):"P"===node.nodeName?isEmpty(node)?decu.removeChild(node):accu.appendChild(node):isPhrasingContent(node)?(accu.lastChild&&"P"===accu.lastChild.nodeName||accu.appendChild(accuDoc.createElement("P")),accu.lastChild.appendChild(node)):accu.appendChild(node):decu.removeChild(node)}return accu.innerHTML}var assert_is_defined=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/utils/assert-is-defined.js");function insertAfter(newNode,referenceNode){(0,assert_is_defined.e)(referenceNode.parentNode,"referenceNode.parentNode"),referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}var remove=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/dom/remove.js");function replace(processedNode,newNode){(0,assert_is_defined.e)(processedNode.parentNode,"processedNode.parentNode"),insertAfter(newNode,processedNode.parentNode),(0,remove.A)(processedNode)}function specialCommentConverter(node,doc){node.nodeType===node.COMMENT_NODE&&("nextpage"!==node.nodeValue?0===node.nodeValue.indexOf("more")&&function moreCommentConverter(node,doc){const customText=node.nodeValue.slice(4).trim();let sibling=node,noTeaser=!1;for(;sibling=sibling.nextSibling;)if(sibling.nodeType===sibling.COMMENT_NODE&&"noteaser"===sibling.nodeValue){noTeaser=!0,(0,remove.A)(sibling);break}const moreBlock=function createMore(customText,noTeaser,doc){const node=doc.createElement("wp-block");node.dataset.block="core/more",customText&&(node.dataset.customText=customText);noTeaser&&(node.dataset.noTeaser="");return node}(customText,noTeaser,doc);if(node.parentNode&&"P"===node.parentNode.nodeName&&1!==node.parentNode.childNodes.length){const childNodes=Array.from(node.parentNode.childNodes),nodeIndex=childNodes.indexOf(node),wrapperNode=node.parentNode.parentNode||doc.body,paragraphBuilder=(acc,child)=>(acc||(acc=doc.createElement("p")),acc.appendChild(child),acc);[childNodes.slice(0,nodeIndex).reduce(paragraphBuilder,null),moreBlock,childNodes.slice(nodeIndex+1).reduce(paragraphBuilder,null)].forEach((element=>element&&wrapperNode.insertBefore(element,node.parentNode))),(0,remove.A)(node.parentNode)}else replace(node,moreBlock)}(node,doc):replace(node,function createNextpage(doc){const node=doc.createElement("wp-block");return node.dataset.block="core/nextpage",node}(doc)))}function unwrap(node){const parent=node.parentNode;for((0,assert_is_defined.e)(parent,"node.parentNode");node.firstChild;)parent.insertBefore(node.firstChild,node);parent.removeChild(node)}function isList(node){return"OL"===node.nodeName||"UL"===node.nodeName}function listReducer(node){if(!isList(node))return;const list=node,prevElement=node.previousElementSibling;if(prevElement&&prevElement.nodeName===node.nodeName&&1===list.children.length){for(;list.firstChild;)prevElement.appendChild(list.firstChild);list.parentNode.removeChild(list)}const parentElement=node.parentNode;if(parentElement&&"LI"===parentElement.nodeName&&1===parentElement.children.length&&!/\S/.test(function shallowTextContent(element){return Array.from(element.childNodes).map((_ref=>{let{nodeValue=""}=_ref;return nodeValue})).join("")}(parentElement))){const parentListItem=parentElement,prevListItem=parentListItem.previousElementSibling,parentList=parentListItem.parentNode;prevListItem?(prevListItem.appendChild(list),parentList.removeChild(parentListItem)):(parentList.parentNode.insertBefore(list,parentList),parentList.parentNode.removeChild(parentList))}if(parentElement&&isList(parentElement)){const prevListItem=node.previousElementSibling;prevListItem?prevListItem.appendChild(node):unwrap(node)}}function blockquoteNormaliser(node){"BLOCKQUOTE"===node.nodeName&&(node.innerHTML=normaliseBlocks(node.innerHTML))}function wrapFigureContent(element){let beforeElement=arguments.length>1&&void 0!==arguments[1]?arguments[1]:element;const figure=element.ownerDocument.createElement("figure");beforeElement.parentNode.insertBefore(figure,beforeElement),figure.appendChild(element)}function figureContentReducer(node,doc,schema){if(!function isFigureContent(node,schema){var _schema$figure$childr,_schema$figure;const tag=node.nodeName.toLowerCase();return"figcaption"!==tag&&!isTextContent(node)&&tag in(null!==(_schema$figure$childr=null==schema||null===(_schema$figure=schema.figure)||void 0===_schema$figure?void 0:_schema$figure.children)&&void 0!==_schema$figure$childr?_schema$figure$childr:{})}(node,schema))return;let nodeToInsert=node;const parentNode=node.parentNode;(function canHaveAnchor(node,schema){var _schema$figure$childr2,_schema$figure2,_schema$figure2$child,_schema$figure2$child2;return node.nodeName.toLowerCase()in(null!==(_schema$figure$childr2=null==schema||null===(_schema$figure2=schema.figure)||void 0===_schema$figure2||null===(_schema$figure2$child=_schema$figure2.children)||void 0===_schema$figure2$child||null===(_schema$figure2$child2=_schema$figure2$child.a)||void 0===_schema$figure2$child2?void 0:_schema$figure2$child2.children)&&void 0!==_schema$figure$childr2?_schema$figure$childr2:{})})(node,schema)&&"A"===parentNode.nodeName&&1===parentNode.childNodes.length&&(nodeToInsert=node.parentNode);const wrapper=nodeToInsert.closest("p,div");wrapper?node.classList?(node.classList.contains("alignright")||node.classList.contains("alignleft")||node.classList.contains("aligncenter")||!wrapper.textContent.trim())&&wrapFigureContent(nodeToInsert,wrapper):wrapFigureContent(nodeToInsert,wrapper):"BODY"===nodeToInsert.parentNode.nodeName&&wrapFigureContent(nodeToInsert)}function next(tag,text,index=0){const re=regexp(tag);re.lastIndex=index;const match=re.exec(text);if(!match)return;if("["===match[1]&&"]"===match[7])return next(tag,text,re.lastIndex);const result={index:match.index,content:match[0],shortcode:fromMatch(match)};return match[1]&&(result.content=result.content.slice(1),result.index++),match[7]&&(result.content=result.content.slice(0,-1)),result}function regexp(tag){return new RegExp("\\[(\\[?)("+tag+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const attrs=(0,__webpack_require__("../../node_modules/.pnpm/memize@2.1.0/node_modules/memize/dist/index.js").A)((text=>{const named={},numeric=[],pattern=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;let match;for(text=text.replace(/[\u00a0\u200b]/g," ");match=pattern.exec(text);)match[1]?named[match[1].toLowerCase()]=match[2]:match[3]?named[match[3].toLowerCase()]=match[4]:match[5]?named[match[5].toLowerCase()]=match[6]:match[7]?numeric.push(match[7]):match[8]?numeric.push(match[8]):match[9]&&numeric.push(match[9]);return{named,numeric}}));function fromMatch(match){let type;return type=match[4]?"self-closing":match[6]?"closed":"single",new shortcode({tag:match[2],attrs:match[3],type,content:match[5]})}const shortcode=Object.assign((function(options){const{tag,attrs:attributes,type,content}=options||{};if(Object.assign(this,{tag,type,content}),this.attrs={named:{},numeric:[]},!attributes)return;const attributeTypes=["named","numeric"];"string"==typeof attributes?this.attrs=attrs(attributes):attributes.length===attributeTypes.length&&attributeTypes.every(((t,key)=>t===attributes[key]))?this.attrs=attributes:Object.entries(attributes).forEach((([key,value])=>{this.set(key,value)}))}),{next,replace:function build_module_replace(tag,text,callback){return text.replace(regexp(tag),(function(match,left,$3,attrs,slash,content,closing,right){if("["===left&&"]"===right)return match;const result=callback(fromMatch(arguments));return result||""===result?left+result+right:match}))},string:function string(options){return new shortcode(options).string()},regexp,attrs,fromMatch});Object.assign(shortcode.prototype,{get(attr){return this.attrs["number"==typeof attr?"numeric":"named"][attr]},set(attr,value){return this.attrs["number"==typeof attr?"numeric":"named"][attr]=value,this},string(){let text="["+this.tag;return this.attrs.numeric.forEach((value=>{/\s/.test(value)?text+=' "'+value+'"':text+=" "+value})),Object.entries(this.attrs.named).forEach((([name,value])=>{text+=" "+name+'="'+value+'"'})),"single"===this.type?text+"]":"self-closing"===this.type?text+" /]":(text+="]",this.content&&(text+=this.content),text+"[/"+this.tag+"]")}});const castArray=maybeArray=>Array.isArray(maybeArray)?maybeArray:[maybeArray];const shortcode_converter=function segmentHTMLToShortcodeBlock(HTML){let lastIndex=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,excludedBlockNames=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const transformation=findTransform(getBlockTransforms("from"),(transform=>-1===excludedBlockNames.indexOf(transform.blockName)&&"shortcode"===transform.type&&castArray(transform.tag).some((tag=>regexp(tag).test(HTML)))));if(!transformation)return[HTML];const transformTag=castArray(transformation.tag).find((tag=>regexp(tag).test(HTML)));let match;const previousIndex=lastIndex;if(match=next(transformTag,HTML,lastIndex)){var _match$shortcode$cont;lastIndex=match.index+match.content.length;const beforeHTML=HTML.substr(0,match.index),afterHTML=HTML.substr(lastIndex);if(!(null!==(_match$shortcode$cont=match.shortcode.content)&&void 0!==_match$shortcode$cont&&_match$shortcode$cont.includes("<")||/(\n|<p>)\s*$/.test(beforeHTML)&&/^\s*(\n|<\/p>)/.test(afterHTML)))return segmentHTMLToShortcodeBlock(HTML,lastIndex);if(transformation.isMatch&&!transformation.isMatch(match.shortcode.attrs))return segmentHTMLToShortcodeBlock(HTML,previousIndex,[...excludedBlockNames,transformation.blockName]);let blocks=[];if("function"==typeof transformation.transform)blocks=[].concat(transformation.transform(match.shortcode.attrs,match)),blocks=blocks.map((block=>(block.originalContent=match.shortcode.content,applyBuiltInValidationFixes(block,getBlockType(block.name)))));else{const attributes=Object.fromEntries(Object.entries(transformation.attributes).filter((_ref=>{let[,schema]=_ref;return schema.shortcode})).map((_ref2=>{let[key,schema]=_ref2;return[key,schema.shortcode(match.shortcode.attrs,match)]}))),blockType=getBlockType(transformation.blockName);if(!blockType)return[HTML];const transformationBlockType={...blockType,attributes:transformation.attributes};let block=createBlock(transformation.blockName,getBlockAttributes(transformationBlockType,match.shortcode.content,attributes));block.originalContent=match.shortcode.content,block=applyBuiltInValidationFixes(block,transformationBlockType),blocks=[block]}return[...segmentHTMLToShortcodeBlock(beforeHTML),...blocks,...segmentHTMLToShortcodeBlock(afterHTML)]}return[HTML]};function getBlockContentSchema(context){return function getBlockContentSchemaFromTransforms(transforms,context){const schemaArgs={phrasingContentSchema:phrasing_content_getPhrasingContentSchema(context),isPaste:"paste"===context},schemas=transforms.map((_ref=>{let{isMatch,blockName,schema}=_ref;const hasAnchorSupport=hasBlockSupport(blockName,"anchor");return schema="function"==typeof schema?schema(schemaArgs):schema,hasAnchorSupport||isMatch?(0,lodash.mapValues)(schema,(value=>{let attributes=value.attributes||[];return hasAnchorSupport&&(attributes=[...attributes,"id"]),{...value,attributes,isMatch:isMatch||void 0}})):schema}));return(0,lodash.mergeWith)({},...schemas,((objValue,srcValue,key)=>{switch(key){case"children":return"*"===objValue||"*"===srcValue?"*":{...objValue,...srcValue};case"attributes":case"require":return[...objValue||[],...srcValue||[]];case"isMatch":if(!objValue||!srcValue)return;return function(){return objValue(...arguments)||srcValue(...arguments)}}}))}(getRawTransforms(),context)}function deepFilterNodeList(nodeList,filters,doc,schema){Array.from(nodeList).forEach((node=>{deepFilterNodeList(node.childNodes,filters,doc,schema),filters.forEach((item=>{doc.contains(node)&&item(node,doc,schema)}))}))}function deepFilterHTML(HTML){let filters=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],schema=arguments.length>2?arguments[2]:void 0;const doc=document.implementation.createHTMLDocument("");return doc.body.innerHTML=HTML,deepFilterNodeList(doc.body.childNodes,filters,doc,schema),doc.body.innerHTML}function getSibling(node,which){const sibling=node[`${which}Sibling`];if(sibling&&isPhrasingContent(sibling))return sibling;const{parentNode}=node;return parentNode&&isPhrasingContent(parentNode)?getSibling(parentNode,which):void 0}function rawHandler(_ref){let{HTML=""}=_ref;if(-1!==HTML.indexOf("\x3c!-- wp:"))return parser_parse(HTML);const pieces=shortcode_converter(HTML),blockContentSchema=getBlockContentSchema();return pieces.map((piece=>{if("string"!=typeof piece)return piece;return htmlToBlocks(piece=normaliseBlocks(piece=deepFilterHTML(piece,[listReducer,specialCommentConverter,figureContentReducer,blockquoteNormaliser],blockContentSchema)),rawHandler)})).flat().filter(Boolean)}const noop=()=>{};function cleanNodeList(nodeList,doc,schema,inline){Array.from(nodeList).forEach((node=>{var _schema$tag$isMatch,_schema$tag;const tag=node.nodeName.toLowerCase();if(schema.hasOwnProperty(tag)&&(!schema[tag].isMatch||null!==(_schema$tag$isMatch=(_schema$tag=schema[tag]).isMatch)&&void 0!==_schema$tag$isMatch&&_schema$tag$isMatch.call(_schema$tag,node))){if(function isElement(node){return!!node&&node.nodeType===node.ELEMENT_NODE}(node)){const{attributes=[],classes=[],children,require=[],allowEmpty}=schema[tag];if(children&&!allowEmpty&&isEmpty(node))return void(0,remove.A)(node);if(node.hasAttributes()&&(Array.from(node.attributes).forEach((_ref=>{let{name}=_ref;"class"===name||attributes.includes(name)||node.removeAttribute(name)})),node.classList&&node.classList.length)){const mattchers=classes.map((item=>"string"==typeof item?className=>className===item:item instanceof RegExp?className=>item.test(className):noop));Array.from(node.classList).forEach((name=>{mattchers.some((isMatch=>isMatch(name)))||node.classList.remove(name)})),node.classList.length||node.removeAttribute("class")}if(node.hasChildNodes()){if("*"===children)return;if(children)require.length&&!node.querySelector(require.join(","))?(cleanNodeList(node.childNodes,doc,schema,inline),unwrap(node)):node.parentNode&&"BODY"===node.parentNode.nodeName&&isPhrasingContent(node)?(cleanNodeList(node.childNodes,doc,schema,inline),Array.from(node.childNodes).some((child=>!isPhrasingContent(child)))&&unwrap(node)):cleanNodeList(node.childNodes,doc,children,inline);else for(;node.firstChild;)(0,remove.A)(node.firstChild)}}}else cleanNodeList(node.childNodes,doc,schema,inline),inline&&!isPhrasingContent(node)&&node.nextElementSibling&&insertAfter(doc.createElement("br"),node),unwrap(node)}))}function removeInvalidHTML(HTML,schema,inline){const doc=document.implementation.createHTMLDocument("");return doc.body.innerHTML=HTML,cleanNodeList(doc.body.childNodes,doc,schema,inline),doc.body.innerHTML}function commentRemover(node){node.nodeType===node.COMMENT_NODE&&(0,remove.A)(node)}function deepCheck(nodes,contextTag){return nodes.every((node=>function isInline(node,contextTag){if(isTextContent(node))return!0;if(!contextTag)return!1;const tag=node.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((tagGroup=>0===[tag,contextTag].filter((t=>!tagGroup.includes(t))).length))}(node,contextTag)&&deepCheck(Array.from(node.children),contextTag)))}function isDoubleBR(node){return"BR"===node.nodeName&&node.previousSibling&&"BR"===node.previousSibling.nodeName}function wrap(newNode,referenceNode){(0,assert_is_defined.e)(referenceNode.parentNode,"referenceNode.parentNode"),referenceNode.parentNode.insertBefore(newNode,referenceNode),newNode.appendChild(referenceNode)}function replaceTag(node,tagName){const newNode=node.ownerDocument.createElement(tagName);for(;node.firstChild;)newNode.appendChild(node.firstChild);return(0,assert_is_defined.e)(node.parentNode,"node.parentNode"),node.parentNode.replaceChild(newNode,node),newNode}function phrasingContentReducer(node,doc){if("SPAN"===node.nodeName&&node.style){const{fontWeight,fontStyle,textDecorationLine,textDecoration,verticalAlign}=node.style;"bold"!==fontWeight&&"700"!==fontWeight||wrap(doc.createElement("strong"),node),"italic"===fontStyle&&wrap(doc.createElement("em"),node),("line-through"===textDecorationLine||textDecoration.includes("line-through"))&&wrap(doc.createElement("s"),node),"super"===verticalAlign?wrap(doc.createElement("sup"),node):"sub"===verticalAlign&&wrap(doc.createElement("sub"),node)}else"B"===node.nodeName?node=replaceTag(node,"strong"):"I"===node.nodeName?node=replaceTag(node,"em"):"A"===node.nodeName&&(node.target&&"_blank"===node.target.toLowerCase()?node.rel="noreferrer noopener":(node.removeAttribute("target"),node.removeAttribute("rel")),node.name&&!node.id&&(node.id=node.name),node.id&&!node.ownerDocument.querySelector(`[href="#${node.id}"]`)&&node.removeAttribute("id"))}function headRemover(node){"SCRIPT"!==node.nodeName&&"NOSCRIPT"!==node.nodeName&&"TEMPLATE"!==node.nodeName&&"STYLE"!==node.nodeName||node.parentNode.removeChild(node)}const{parseInt:ms_list_converter_parseInt}=window;function ms_list_converter_isList(node){return"OL"===node.nodeName||"UL"===node.nodeName}function msListConverter(node,doc){if("P"!==node.nodeName)return;const style=node.getAttribute("style");if(!style)return;if(-1===style.indexOf("mso-list"))return;const matches=/mso-list\s*:[^;]+level([0-9]+)/i.exec(style);if(!matches)return;let level=ms_list_converter_parseInt(matches[1],10)-1||0;const prevNode=node.previousElementSibling;if(!prevNode||!ms_list_converter_isList(prevNode)){const type=node.textContent.trim().slice(0,1),isNumeric=/[1iIaA]/.test(type),newListNode=doc.createElement(isNumeric?"ol":"ul");isNumeric&&newListNode.setAttribute("type",type),node.parentNode.insertBefore(newListNode,node)}const listNode=node.previousElementSibling,listType=listNode.nodeName,listItem=doc.createElement("li");let receivingNode=listNode;for(node.removeChild(node.firstChild);node.firstChild;)listItem.appendChild(node.firstChild);for(;level--;)receivingNode=receivingNode.lastChild||receivingNode,ms_list_converter_isList(receivingNode)&&(receivingNode=receivingNode.lastChild||receivingNode);ms_list_converter_isList(receivingNode)||(receivingNode=receivingNode.appendChild(doc.createElement(listType))),receivingNode.appendChild(listItem),node.parentNode.removeChild(node)}const cache={};const{atob,File}=window;function imageCorrector(node){if("IMG"===node.nodeName){if(0===node.src.indexOf("file:")&&(node.src=""),0===node.src.indexOf("data:")){const[properties,data]=node.src.split(","),[type]=properties.slice(5).split(";");if(!data||!type)return void(node.src="");let decoded;try{decoded=atob(data)}catch(e){return void(node.src="")}const uint8Array=new Uint8Array(decoded.length);for(let i=0;i<uint8Array.length;i++)uint8Array[i]=decoded.charCodeAt(i);const name=type.replace("/","."),file=new File([uint8Array],name,{type});node.src=function createBlobURL(file){const url=window.URL.createObjectURL(file);return cache[url]=file,url}(file)}1!==node.height&&1!==node.width||node.parentNode.removeChild(node)}}function divNormaliser(node){"DIV"===node.nodeName&&(node.innerHTML=normaliseBlocks(node.innerHTML))}var showdown=__webpack_require__("../../node_modules/.pnpm/showdown@1.9.1/node_modules/showdown/dist/showdown.js");const converter=new(__webpack_require__.n(showdown)().Converter)({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function iframeRemover(node){if("IFRAME"===node.nodeName){const text=node.ownerDocument.createTextNode(node.src);node.parentNode.replaceChild(text,node)}}function googleDocsUIdRemover(node){node.id&&0===node.id.indexOf("docs-internal-guid-")&&("B"===node.tagName?unwrap(node):node.removeAttribute("id"))}function htmlFormattingRemover(node){if(node.nodeType!==node.TEXT_NODE)return;let parent=node;for(;parent=parent.parentNode;)if(parent.nodeType===parent.ELEMENT_NODE&&"PRE"===parent.nodeName)return;let newData=node.data.replace(/[ \r\n\t]+/g," ");if(" "===newData[0]){const previousSibling=getSibling(node,"previous");previousSibling&&"BR"!==previousSibling.nodeName&&" "!==previousSibling.textContent.slice(-1)||(newData=newData.slice(1))}if(" "===newData[newData.length-1]){const nextSibling=getSibling(node,"next");(!nextSibling||"BR"===nextSibling.nodeName||nextSibling.nodeType===nextSibling.TEXT_NODE&&function isFormattingSpace(character){return" "===character||"\r"===character||"\n"===character||"\t"===character}(nextSibling.textContent[0]))&&(newData=newData.slice(0,-1))}newData?node.data=newData:node.parentNode.removeChild(node)}function brRemover(node){"BR"===node.nodeName&&(getSibling(node,"next")||node.parentNode.removeChild(node))}function emptyParagraphRemover(node){"P"===node.nodeName&&(node.hasChildNodes()||node.parentNode.removeChild(node))}function slackParagraphCorrector(node){if("SPAN"!==node.nodeName)return;if("paragraph-break"!==node.getAttribute("data-stringify-type"))return;const{parentNode}=node;parentNode.insertBefore(node.ownerDocument.createElement("br"),node),parentNode.insertBefore(node.ownerDocument.createElement("br"),node),parentNode.removeChild(node)}const{console:paste_handler_console}=window;function filterInlineHTML(HTML,preserveWhiteSpace){return HTML=removeInvalidHTML(HTML=deepFilterHTML(HTML,[googleDocsUIdRemover,phrasingContentReducer,commentRemover]),phrasing_content_getPhrasingContentSchema("paste"),{inline:!0}),preserveWhiteSpace||(HTML=deepFilterHTML(HTML,[htmlFormattingRemover,brRemover])),paste_handler_console.log("Processed inline HTML:\n\n",HTML),HTML}function pasteHandler(_ref){let{HTML="",plainText="",mode="AUTO",tagName,preserveWhiteSpace}=_ref;if(HTML=HTML.replace(/<meta[^>]+>/g,""),HTML=HTML.replace(/^\s*<html[^>]*>\s*<body[^>]*>(?:\s*<!--\s*StartFragment\s*-->)?/i,""),HTML=HTML.replace(/(?:<!--\s*EndFragment\s*-->\s*)?<\/body>\s*<\/html>\s*$/i,""),"INLINE"!==mode){const content=HTML||plainText;if(-1!==content.indexOf("\x3c!-- wp:"))return parser_parse(content)}if(String.prototype.normalize&&(HTML=HTML.normalize()),!plainText||HTML&&!function isPlain(HTML){return!/<(?!br[ />])/i.test(HTML)}(HTML)||(HTML=plainText,/^\s+$/.test(plainText)||(HTML=function markdownConverter(text){return converter.makeHtml(function slackMarkdownVariantCorrector(text){return text.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,((match,p1,p2,p3)=>`${p1}\n${p2}\n${p3}`))}(function bulletsToAsterisks(text){return text.replace(/(^|\n)•( +)/g,"$1*$2")}(text)))}(HTML)),"AUTO"===mode&&-1===plainText.indexOf("\n")&&0!==plainText.indexOf("<p>")&&0===HTML.indexOf("<p>")&&(mode="INLINE")),"INLINE"===mode)return filterInlineHTML(HTML,preserveWhiteSpace);HTML=deepFilterHTML(HTML,[slackParagraphCorrector]);const pieces=shortcode_converter(HTML),hasShortcodes=pieces.length>1;if("AUTO"===mode&&!hasShortcodes&&function isInlineContent(HTML,contextTag){const doc=document.implementation.createHTMLDocument("");doc.body.innerHTML=HTML;const nodes=Array.from(doc.body.children);return!nodes.some(isDoubleBR)&&deepCheck(nodes,contextTag)}(HTML,tagName))return filterInlineHTML(HTML,preserveWhiteSpace);const phrasingContentSchema=phrasing_content_getPhrasingContentSchema("paste"),blockContentSchema=getBlockContentSchema("paste"),blocks=pieces.map((piece=>{if("string"!=typeof piece)return piece;const filters=[googleDocsUIdRemover,msListConverter,headRemover,listReducer,imageCorrector,phrasingContentReducer,specialCommentConverter,commentRemover,iframeRemover,figureContentReducer,blockquoteNormaliser,divNormaliser],schema={...blockContentSchema,...phrasingContentSchema};return piece=deepFilterHTML(piece,filters,blockContentSchema),piece=deepFilterHTML(piece=normaliseBlocks(piece=removeInvalidHTML(piece,schema)),[htmlFormattingRemover,brRemover,emptyParagraphRemover],blockContentSchema),paste_handler_console.log("Processed HTML piece:\n\n",piece),htmlToBlocks(piece,pasteHandler)})).flat().filter(Boolean);if("AUTO"===mode&&1===blocks.length&&hasBlockSupport(blocks[0].name,"__unstablePasteTextInline",!1)){const trimRegex=/^[\n]+|[\n]+$/g,trimmedPlainText=plainText.replace(trimRegex,"");if(""!==trimmedPlainText&&-1===trimmedPlainText.indexOf("\n"))return removeInvalidHTML(getBlockInnerHTML(blocks[0]),phrasingContentSchema).replace(trimRegex,"")}return blocks}function doBlocksMatchTemplate(){let blocks=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],template=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return blocks.length===template.length&&template.every(((_ref,index)=>{let[name,,innerBlocksTemplate]=_ref;const block=blocks[index];return name===block.name&&doBlocksMatchTemplate(block.innerBlocks,innerBlocksTemplate)}))}function synchronizeBlocksWithTemplate(){let blocks=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],template=arguments.length>1?arguments[1]:void 0;return template?template.map(((_ref2,index)=>{var _blockType$attributes;let[name,attributes,innerBlocksTemplate]=_ref2;const block=blocks[index];if(block&&block.name===name){const innerBlocks=synchronizeBlocksWithTemplate(block.innerBlocks,innerBlocksTemplate);return{...block,innerBlocks}}const blockType=getBlockType(name),normalizeAttributes=(schema,values)=>values?Object.fromEntries(Object.entries(values).map((_ref3=>{let[key,value]=_ref3;return[key,normalizeAttribute(schema[key],value)]}))):{},normalizeAttribute=(definition,value)=>{return"html"===(null==(attributeDefinition=definition)?void 0:attributeDefinition.source)&&Array.isArray(value)?(0,serialize.Ay)(value):(attributeDefinition=>"query"===(null==attributeDefinition?void 0:attributeDefinition.source))(definition)&&value?value.map((subValues=>normalizeAttributes(definition.query,subValues))):value;var attributeDefinition},normalizedAttributes=normalizeAttributes(null!==(_blockType$attributes=null==blockType?void 0:blockType.attributes)&&void 0!==_blockType$attributes?_blockType$attributes:{},attributes);let[blockName,blockAttributes]=convertLegacyBlockNameAndAttributes(name,normalizedAttributes);return void 0===getBlockType(blockName)&&(blockAttributes={originalName:name,originalContent:"",originalUndelimitedContent:""},blockName="core/missing"),createBlock(blockName,blockAttributes,synchronizeBlocksWithTemplate([],innerBlocksTemplate))})):blocks}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-constrained-tabbing/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/index.js"),_wordpress_dom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/index.js"),_use_ref_effect__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js");const __WEBPACK_DEFAULT_EXPORT__=function useConstrainedTabbing(){return(0,_use_ref_effect__WEBPACK_IMPORTED_MODULE_0__.A)((node=>{let timeoutId;function onKeyDown(event){const{keyCode,shiftKey,target}=event;if(keyCode!==_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_1__.wn)return;const action=shiftKey?"findPrevious":"findNext",nextElement=_wordpress_dom__WEBPACK_IMPORTED_MODULE_2__.XC.tabbable[action](target)||null;if(node.contains(nextElement))return;const domAction=shiftKey?"append":"prepend",{ownerDocument}=node,trap=ownerDocument.createElement("div");trap.tabIndex=-1,node[domAction](trap),trap.focus(),timeoutId=setTimeout((()=>node.removeChild(trap)))}return node.addEventListener("keydown",onKeyDown),()=>{node.removeEventListener("keydown",onKeyDown),clearTimeout(timeoutId)}}),[])}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-debounce/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useDebounce});var use_memo_one__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/use-memo-one@1.1.3_react@17.0.2/node_modules/use-memo-one/dist/use-memo-one.esm.js"),_wordpress_element__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_utils_debounce__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/utils/debounce/index.js");function useDebounce(fn,wait,options){const debounced=(0,use_memo_one__WEBPACK_IMPORTED_MODULE_0__.MA)((()=>(0,_utils_debounce__WEBPACK_IMPORTED_MODULE_1__.s)(fn,null!=wait?wait:0,options)),[fn,wait,options]);return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)((()=>()=>debounced.cancel()),[debounced]),debounced}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-dialog/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/index.js"),_use_constrained_tabbing__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-constrained-tabbing/index.js"),_use_focus_on_mount__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-on-mount/index.js"),_use_focus_return__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-return/index.js"),_use_focus_outside__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-outside/index.js"),_use_merge_refs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-merge-refs/index.js");const __WEBPACK_DEFAULT_EXPORT__=function useDialog(options){const currentOptions=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)();(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{currentOptions.current=options}),Object.values(options));const constrainedTabbingRef=(0,_use_constrained_tabbing__WEBPACK_IMPORTED_MODULE_1__.A)(),focusOnMountRef=(0,_use_focus_on_mount__WEBPACK_IMPORTED_MODULE_2__.A)(options.focusOnMount),focusReturnRef=(0,_use_focus_return__WEBPACK_IMPORTED_MODULE_3__.A)(),focusOutsideProps=(0,_use_focus_outside__WEBPACK_IMPORTED_MODULE_4__.A)((event=>{var _currentOptions$curre,_currentOptions$curre2;null!==(_currentOptions$curre=currentOptions.current)&&void 0!==_currentOptions$curre&&_currentOptions$curre.__unstableOnClose?currentOptions.current.__unstableOnClose("focus-outside",event):null!==(_currentOptions$curre2=currentOptions.current)&&void 0!==_currentOptions$curre2&&_currentOptions$curre2.onClose&&currentOptions.current.onClose()})),closeOnEscapeRef=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((node=>{node&&node.addEventListener("keydown",(event=>{var _currentOptions$curre3;event.keyCode===_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_5__._f&&!event.defaultPrevented&&null!==(_currentOptions$curre3=currentOptions.current)&&void 0!==_currentOptions$curre3&&_currentOptions$curre3.onClose&&(event.preventDefault(),currentOptions.current.onClose())}))}),[]);return[(0,_use_merge_refs__WEBPACK_IMPORTED_MODULE_6__.A)([!1!==options.focusOnMount?constrainedTabbingRef:null,!1!==options.focusOnMount?focusReturnRef:null,!1!==options.focusOnMount?focusOnMountRef:null,closeOnEscapeRef]),{...focusOutsideProps,tabIndex:-1}]}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-on-mount/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useFocusOnMount});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_wordpress_dom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/index.js");function useFocusOnMount(){let focusOnMount=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"firstElement";const focusOnMountRef=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(focusOnMount);return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{focusOnMountRef.current=focusOnMount}),[focusOnMount]),(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((node=>{var _node$ownerDocument$a,_node$ownerDocument;if(!node||!1===focusOnMountRef.current)return;if(node.contains(null!==(_node$ownerDocument$a=null===(_node$ownerDocument=node.ownerDocument)||void 0===_node$ownerDocument?void 0:_node$ownerDocument.activeElement)&&void 0!==_node$ownerDocument$a?_node$ownerDocument$a:null))return;let target=node;if("firstElement"===focusOnMountRef.current){const firstTabbable=_wordpress_dom__WEBPACK_IMPORTED_MODULE_1__.XC.tabbable.find(node)[0];firstTabbable&&(target=firstTabbable)}target.focus({preventScroll:!0})}),[])}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-outside/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useFocusOutside});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");const INPUT_BUTTON_TYPES=["button","submit"];function useFocusOutside(onFocusOutside){const currentOnFocusOutside=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(onFocusOutside);(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{currentOnFocusOutside.current=onFocusOutside}),[onFocusOutside]);const preventBlurCheck=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),blurCheckTimeoutId=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(),cancelBlurCheck=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{clearTimeout(blurCheckTimeoutId.current)}),[]);(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>()=>cancelBlurCheck()),[]),(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{onFocusOutside||cancelBlurCheck()}),[onFocusOutside,cancelBlurCheck]);const normalizeButtonFocus=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((event=>{const{type,target}=event;["mouseup","touchend"].includes(type)?preventBlurCheck.current=!1:function isFocusNormalizedButton(eventTarget){if(!(eventTarget instanceof window.HTMLElement))return!1;switch(eventTarget.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return INPUT_BUTTON_TYPES.includes(eventTarget.type)}return!1}(target)&&(preventBlurCheck.current=!0)}),[]),queueBlurCheck=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((event=>{event.persist(),preventBlurCheck.current||(blurCheckTimeoutId.current=setTimeout((()=>{document.hasFocus()?"function"==typeof currentOnFocusOutside.current&&currentOnFocusOutside.current(event):event.preventDefault()}),0))}),[]);return{onFocus:cancelBlurCheck,onMouseDown:normalizeButtonFocus,onMouseUp:normalizeButtonFocus,onTouchStart:normalizeButtonFocus,onTouchEnd:normalizeButtonFocus,onBlur:queueBlurCheck}}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-return/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=function useFocusReturn(onFocusReturn){const ref=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),focusedBeforeMount=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),onFocusReturnRef=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(onFocusReturn);return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{onFocusReturnRef.current=onFocusReturn}),[onFocusReturn]),(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((node=>{if(node){if(ref.current=node,focusedBeforeMount.current)return;focusedBeforeMount.current=node.ownerDocument.activeElement}else if(focusedBeforeMount.current){var _ref$current,_ref$current2,_ref$current3;const isFocused=null===(_ref$current=ref.current)||void 0===_ref$current?void 0:_ref$current.contains(null===(_ref$current2=ref.current)||void 0===_ref$current2?void 0:_ref$current2.ownerDocument.activeElement);if(null!==(_ref$current3=ref.current)&&void 0!==_ref$current3&&_ref$current3.isConnected&&!isFocused)return;var _focusedBeforeMount$c;if(onFocusReturnRef.current)onFocusReturnRef.current();else null===(_focusedBeforeMount$c=focusedBeforeMount.current)||void 0===_focusedBeforeMount$c||_focusedBeforeMount$c.focus()}}),[])}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");const instanceMap=new WeakMap;const __WEBPACK_DEFAULT_EXPORT__=function useInstanceId(object,prefix,preferredId){return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>{if(preferredId)return preferredId;const id=function createId(object){const instances=instanceMap.get(object)||0;return instanceMap.set(object,instances+1),instances}(object);return prefix?`${prefix}-${id}`:id}),[object])}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-merge-refs/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useMergeRefs});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function assignRef(ref,value){"function"==typeof ref?ref(value):ref&&ref.hasOwnProperty("current")&&(ref.current=value)}function useMergeRefs(refs){const element=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(),isAttached=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),didElementChange=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),previousRefs=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)([]),currentRefs=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(refs);return currentRefs.current=refs,(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)((()=>{!1===didElementChange.current&&!0===isAttached.current&&refs.forEach(((ref,index)=>{const previousRef=previousRefs.current[index];ref!==previousRef&&(assignRef(previousRef,null),assignRef(ref,element.current))})),previousRefs.current=refs}),refs),(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)((()=>{didElementChange.current=!1})),(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((value=>{assignRef(element,value),didElementChange.current=!0,isAttached.current=null!==value;const refsToAssign=value?currentRefs.current:previousRefs.current;for(const ref of refsToAssign)assignRef(ref,value)}),[])}},"../../node_modules/.pnpm/@wordpress+compose@5.20.0_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useRefEffect});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function useRefEffect(callback,dependencies){const cleanup=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)();return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)((node=>{node?cleanup.current=callback(node):cleanup.current&&cleanup.current()}),dependencies)}},"../../node_modules/.pnpm/@wordpress+data@10.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useRegistry});var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_context__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@10.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/components/registry-provider/context.js");function useRegistry(){return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context__WEBPACK_IMPORTED_MODULE_1__.ob)}},"../../node_modules/.pnpm/@wordpress+data@10.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _registry_provider_use_registry__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@10.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js");const __WEBPACK_DEFAULT_EXPORT__=storeNameOrDescriptor=>{const{dispatch}=(0,_registry_provider_use_registry__WEBPACK_IMPORTED_MODULE_0__.A)();return void 0===storeNameOrDescriptor?dispatch:dispatch(storeNameOrDescriptor)}},"../../node_modules/.pnpm/@wordpress+data@10.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/components/use-select/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>useSelect});__webpack_require__("../../node_modules/.pnpm/requestidlecallback@0.3.0/node_modules/requestidlecallback/index.js");const request_idle_callback=function createRequestIdleCallback(){return"undefined"==typeof window?callback=>{setTimeout((()=>callback(Date.now())),0)}:window.requestIdleCallback}();var react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function isShallowEqual(a,b){if(a&&b){if(a.constructor===Object&&b.constructor===Object)return function isShallowEqualObjects(a,b){if(a===b)return!0;const aKeys=Object.keys(a),bKeys=Object.keys(b);if(aKeys.length!==bKeys.length)return!1;let i=0;for(;i<aKeys.length;){const key=aKeys[i],aValue=a[key];if(void 0===aValue&&!b.hasOwnProperty(key)||aValue!==b[key])return!1;i++}return!0}(a,b);if(Array.isArray(a)&&Array.isArray(b))return function isShallowEqualArrays(a,b){if(a===b)return!0;if(a.length!==b.length)return!1;for(let i=0,len=a.length;i<len;i++)if(a[i]!==b[i])return!1;return!0}(a,b)}return a===b}var use_registry=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@10.6.0_react@17.0.2/node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js");const Context=(0,react.createContext)(!1),{Consumer,Provider}=Context;const renderQueue=(()=>{const waitingList=new Map;let isRunning=!1;const runWaitingList=deadline=>{for(const[nextElement,callback]of waitingList)if(waitingList.delete(nextElement),callback(),"number"==typeof deadline||deadline.timeRemaining()<=0)break;0!==waitingList.size?request_idle_callback(runWaitingList):isRunning=!1};return{add:(element,item)=>{waitingList.set(element,item),isRunning||(isRunning=!0,request_idle_callback(runWaitingList))},flush:element=>{const callback=waitingList.get(element);return void 0!==callback&&(waitingList.delete(element),callback(),!0)},cancel:element=>waitingList.delete(element),reset:()=>{waitingList.clear(),isRunning=!1}}})();function Store(registry,suspense){const select=suspense?registry.suspendSelect:registry.select,queueContext={};let lastMapSelect,lastMapResult,lastIsAsync,subscriber,lastMapResultValid=!1;const storeStatesOnMount=new Map;function getStoreState(name){var _registry$stores$name;return null!==(_registry$stores$name=registry.stores[name]?.store?.getState?.())&&void 0!==_registry$stores$name?_registry$stores$name:{}}return(mapSelect,isAsync)=>{function updateValue(){if(lastMapResultValid&&mapSelect===lastMapSelect)return lastMapResult;const listeningStores={current:null},mapResult=registry.__unstableMarkListeningStores((()=>mapSelect(select,registry)),listeningStores);if(subscriber)subscriber.updateStores(listeningStores.current);else{for(const name of listeningStores.current)storeStatesOnMount.set(name,getStoreState(name));subscriber=(stores=>{const activeStores=[...stores],activeSubscriptions=new Set;return{subscribe:function subscribe(listener){if(lastMapResultValid)for(const name of activeStores)storeStatesOnMount.get(name)!==getStoreState(name)&&(lastMapResultValid=!1);storeStatesOnMount.clear();const onStoreChange=()=>{lastMapResultValid=!1,listener()},onChange=()=>{lastIsAsync?renderQueue.add(queueContext,onStoreChange):onStoreChange()},unsubs=[];function subscribeStore(storeName){unsubs.push(registry.subscribe(onChange,storeName))}for(const storeName of activeStores)subscribeStore(storeName);return activeSubscriptions.add(subscribeStore),()=>{activeSubscriptions.delete(subscribeStore);for(const unsub of unsubs.values())unsub?.();renderQueue.cancel(queueContext)}},updateStores:function updateStores(newStores){for(const newStore of newStores)if(!activeStores.includes(newStore)){activeStores.push(newStore);for(const subscription of activeSubscriptions)subscription(newStore)}}}})(listeningStores.current)}isShallowEqual(lastMapResult,mapResult)||(lastMapResult=mapResult),lastMapSelect=mapSelect,lastMapResultValid=!0}return lastIsAsync&&!isAsync&&(lastMapResultValid=!1,renderQueue.cancel(queueContext)),updateValue(),lastIsAsync=isAsync,{subscribe:subscriber.subscribe,getValue:function getValue(){return updateValue(),lastMapResult}}}}function useMappingSelect(suspense,mapSelect,deps){const registry=(0,use_registry.A)(),isAsync=function useAsyncMode(){return(0,react.useContext)(Context)}(),store=(0,react.useMemo)((()=>Store(registry,suspense)),[registry,suspense]),selector=(0,react.useCallback)(mapSelect,deps),{subscribe,getValue}=store(selector,isAsync),result=(0,react.useSyncExternalStore)(subscribe,getValue,getValue);return(0,react.useDebugValue)(result),result}function useSelect(mapSelect,deps){const staticSelectMode="function"!=typeof mapSelect,staticSelectModeRef=(0,react.useRef)(staticSelectMode);if(staticSelectMode!==staticSelectModeRef.current){const prevMode=staticSelectModeRef.current?"static":"mapping";throw new Error(`Switching useSelect from ${prevMode} to ${staticSelectMode?"static":"mapping"} is not allowed`)}return staticSelectMode?function useStaticSelect(storeName){return(0,use_registry.A)().select(storeName)}(mapSelect):useMappingSelect(!1,mapSelect,deps)}},"../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/dom/remove.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>remove});var _utils_assert_is_defined__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/utils/assert-is-defined.js");function remove(node){(0,_utils_assert_is_defined__WEBPACK_IMPORTED_MODULE_0__.e)(node.parentNode,"node.parentNode"),node.parentNode.removeChild(node)}},"../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/dom/safe-html.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>safeHTML});var _remove__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/dom/remove.js");function safeHTML(html){const{body}=document.implementation.createHTMLDocument("");body.innerHTML=html;const elements=body.getElementsByTagName("*");let elementIndex=elements.length;for(;elementIndex--;){const element=elements[elementIndex];if("SCRIPT"===element.tagName)(0,_remove__WEBPACK_IMPORTED_MODULE_0__.A)(element);else{let attributeIndex=element.attributes.length;for(;attributeIndex--;){const{name:key}=element.attributes[attributeIndex];key.startsWith("on")&&element.removeAttribute(key)}}}return body.innerHTML}},"../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XC:()=>build_module_focus});var focusable_namespaceObject={};__webpack_require__.r(focusable_namespaceObject),__webpack_require__.d(focusable_namespaceObject,{find:()=>find});var tabbable_namespaceObject={};function isVisible(element){return element.offsetWidth>0||element.offsetHeight>0||element.getClientRects().length>0}function find(context){let{sequential=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const elements=context.querySelectorAll(function buildSelector(sequential){return[sequential?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}(sequential));return Array.from(elements).filter((element=>{if(!isVisible(element))return!1;const{nodeName}=element;return"AREA"!==nodeName||function isValidFocusableArea(element){const map=element.closest("map[name]");if(!map)return!1;const img=element.ownerDocument.querySelector('img[usemap="#'+map.name+'"]');return!!img&&isVisible(img)}(element)}))}function getTabIndex(element){const tabIndex=element.getAttribute("tabindex");return null===tabIndex?0:parseInt(tabIndex,10)}function isTabbableIndex(element){return-1!==getTabIndex(element)}function mapElementToObjectTabbable(element,index){return{element,index}}function mapObjectTabbableToElement(object){return object.element}function compareObjectTabbables(a,b){const aTabIndex=getTabIndex(a.element),bTabIndex=getTabIndex(b.element);return aTabIndex===bTabIndex?a.index-b.index:aTabIndex-bTabIndex}function filterTabbable(focusables){return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(function createStatefulCollapseRadioGroup(){const CHOSEN_RADIO_BY_NAME={};return function collapseRadioGroup(result,element){const{nodeName,type,checked,name}=element;if("INPUT"!==nodeName||"radio"!==type||!name)return result.concat(element);const hasChosen=CHOSEN_RADIO_BY_NAME.hasOwnProperty(name);if(!checked&&hasChosen)return result;if(hasChosen){const hadChosenElement=CHOSEN_RADIO_BY_NAME[name];result=result.filter((e=>e!==hadChosenElement))}return CHOSEN_RADIO_BY_NAME[name]=element,result.concat(element)}}(),[])}function tabbable_find(context){return filterTabbable(find(context))}function findPrevious(element){return filterTabbable(find(element.ownerDocument.body)).reverse().find((focusable=>element.compareDocumentPosition(focusable)&element.DOCUMENT_POSITION_PRECEDING))}function findNext(element){return filterTabbable(find(element.ownerDocument.body)).find((focusable=>element.compareDocumentPosition(focusable)&element.DOCUMENT_POSITION_FOLLOWING))}__webpack_require__.r(tabbable_namespaceObject),__webpack_require__.d(tabbable_namespaceObject,{find:()=>tabbable_find,findNext:()=>findNext,findPrevious:()=>findPrevious,isTabbableIndex:()=>isTabbableIndex});const build_module_focus={focusable:focusable_namespaceObject,tabbable:tabbable_namespaceObject}},"../../node_modules/.pnpm/@wordpress+dom@3.27.0/node_modules/@wordpress/dom/build-module/utils/assert-is-defined.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function assertIsDefined(val,name){0}__webpack_require__.d(__webpack_exports__,{e:()=>assertIsDefined})},"../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/raw-html.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>RawHTML});var _react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function RawHTML(_ref){let{children,...props}=_ref,rawHtml="";return _react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).forEach((child=>{"string"==typeof child&&""!==child.trim()&&(rawHtml+=child)})),(0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div",{dangerouslySetInnerHTML:{__html:rawHtml},...props})}},"../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/react.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{oG:()=>concatChildren});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function concatChildren(){for(var _len=arguments.length,childrenArguments=new Array(_len),_key=0;_key<_len;_key++)childrenArguments[_key]=arguments[_key];return childrenArguments.reduce(((accumulator,children,i)=>(react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children,((child,j)=>{child&&"string"!=typeof child&&(child=(0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child,{key:[i,j].join()})),accumulator.push(child)})),accumulator)),[])}},"../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/serialize.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__});var is_plain_object__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs"),change_case__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js"),_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js"),_react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_raw_html__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/raw-html.js");const{Provider,Consumer}=(0,_react__WEBPACK_IMPORTED_MODULE_0__.createContext)(void 0),ForwardRef=(0,_react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((()=>null)),ATTRIBUTES_TYPES=new Set(["string","boolean","number"]),SELF_CLOSING_TAGS=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),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=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"]),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"]);function hasPrefix(string,prefixes){return prefixes.some((prefix=>0===string.indexOf(prefix)))}function isInternalAttribute(attribute){return"key"===attribute||"children"===attribute}function getNormalAttributeValue(attribute,value){return"style"===attribute?function renderStyle(style){if(!(0,is_plain_object__WEBPACK_IMPORTED_MODULE_4__.Q)(style))return style;let result;for(const property in style){const value=style[property];if(null==value)continue;result?result+=";":result="";result+=getNormalStylePropertyName(property)+":"+getNormalStylePropertyValue(property,value)}return result}(value):value}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)=>(map[attribute.toLowerCase()]=attribute,map)),{}),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)=>(map[attribute.toLowerCase()]=attribute,map)),{}),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,map)),{});function getNormalAttributeName(attribute){switch(attribute){case"htmlFor":return"for";case"className":return"class"}const attributeLowerCase=attribute.toLowerCase();return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]?CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]:SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]?(0,change_case__WEBPACK_IMPORTED_MODULE_1__.c)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]):SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]?SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]:attributeLowerCase}function getNormalStylePropertyName(property){return property.startsWith("--")?property:hasPrefix(property,["ms","O","Moz","Webkit"])?"-"+(0,change_case__WEBPACK_IMPORTED_MODULE_1__.c)(property):(0,change_case__WEBPACK_IMPORTED_MODULE_1__.c)(property)}function getNormalStylePropertyValue(property,value){return"number"!=typeof value||0===value||CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)?value:value+"px"}function renderElement(element,context){let legacyContext=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==element||!1===element)return"";if(Array.isArray(element))return renderChildren(element,context,legacyContext);switch(typeof element){case"string":return(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.Zn)(element);case"number":return element.toString()}const{type,props}=element;switch(type){case _react__WEBPACK_IMPORTED_MODULE_0__.StrictMode:case _react__WEBPACK_IMPORTED_MODULE_0__.Fragment:return renderChildren(props.children,context,legacyContext);case _raw_html__WEBPACK_IMPORTED_MODULE_3__.A:const{children,...wrapperProps}=props;return renderNativeComponent(Object.keys(wrapperProps).length?"div":null,{...wrapperProps,dangerouslySetInnerHTML:{__html:children}},context,legacyContext)}switch(typeof type){case"string":return renderNativeComponent(type,props,context,legacyContext);case"function":return type.prototype&&"function"==typeof type.prototype.render?function renderComponent(Component,props,context){let legacyContext=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const instance=new Component(props,legacyContext);"function"==typeof instance.getChildContext&&Object.assign(legacyContext,instance.getChildContext());const html=renderElement(instance.render(),context,legacyContext);return html}(type,props,context,legacyContext):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""}function renderNativeComponent(type,props,context){let legacyContext=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},content="";if("textarea"===type&&props.hasOwnProperty("value")){content=renderChildren(props.value,context,legacyContext);const{value,...restProps}=props;props=restProps}else props.dangerouslySetInnerHTML&&"string"==typeof props.dangerouslySetInnerHTML.__html?content=props.dangerouslySetInnerHTML.__html:void 0!==props.children&&(content=renderChildren(props.children,context,legacyContext));if(!type)return content;const attributes=function renderAttributes(props){let result="";for(const key in props){const attribute=getNormalAttributeName(key);if(!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.i8)(attribute))continue;let value=getNormalAttributeValue(key,props[key]);if(!ATTRIBUTES_TYPES.has(typeof value))continue;if(isInternalAttribute(key))continue;const isBooleanAttribute=BOOLEAN_ATTRIBUTES.has(attribute);if(isBooleanAttribute&&!1===value)continue;const isMeaningfulAttribute=isBooleanAttribute||hasPrefix(key,["data-","aria-"])||ENUMERATED_ATTRIBUTES.has(attribute);("boolean"!=typeof value||isMeaningfulAttribute)&&(result+=" "+attribute,isBooleanAttribute||("string"==typeof value&&(value=(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.Gj)(value)),result+='="'+value+'"'))}return result}(props);return SELF_CLOSING_TAGS.has(type)?"<"+type+attributes+"/>":"<"+type+attributes+">"+content+"</"+type+">"}function renderChildren(children,context){let legacyContext=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},result="";children=Array.isArray(children)?children:[children];for(let i=0;i<children.length;i++){result+=renderElement(children[i],context,legacyContext)}return result}const __WEBPACK_DEFAULT_EXPORT__=renderElement},"../../node_modules/.pnpm/@wordpress+element@4.20.0/node_modules/@wordpress/element/build-module/utils.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{s:()=>isEmptyElement});const isEmptyElement=element=>"number"!=typeof element&&("string"==typeof(null==element?void 0:element.valueOf())||Array.isArray(element)?!element.length:!element)},"../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Gj:()=>escapeAttribute,jG:()=>escapeEditableHTML,Zn:()=>escapeHTML,i8:()=>isValidAttributeName});const REGEXP_INVALID_ATTRIBUTE_NAME=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function escapeAmpersand(value){return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&amp;")}function escapeLessThan(value){return value.replace(/</g,"&lt;")}function escapeAttribute(value){return function __unstableEscapeGreaterThan(value){return value.replace(/>/g,"&gt;")}(function escapeQuotationMark(value){return value.replace(/"/g,"&quot;")}(escapeAmpersand(value)))}function escapeHTML(value){return escapeLessThan(escapeAmpersand(value))}function escapeEditableHTML(value){return escapeLessThan(value.replace(/&/g,"&amp;"))}function isValidAttributeName(name){return!REGEXP_INVALID_ATTRIBUTE_NAME.test(name)}},"../../node_modules/.pnpm/@wordpress+html-entities@3.24.0/node_modules/@wordpress/html-entities/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";let _decodeTextArea;function decodeEntities(html){if("string"!=typeof html||-1===html.indexOf("&"))return html;void 0===_decodeTextArea&&(_decodeTextArea=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),_decodeTextArea.innerHTML=html;const decoded=_decodeTextArea.textContent;return _decodeTextArea.innerHTML="",decoded}__webpack_require__.d(__webpack_exports__,{S:()=>decodeEntities})},"../../node_modules/.pnpm/@wordpress+i18n@4.57.0/node_modules/@wordpress/i18n/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{__:()=>__,_x:()=>_x,V8:()=>isRTL,nv:()=>sprintf_sprintf});var dist=__webpack_require__("../../node_modules/.pnpm/memize@2.1.0/node_modules/memize/dist/index.js"),sprintf=__webpack_require__("../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js"),sprintf_default=__webpack_require__.n(sprintf);const logErrorOnce=(0,dist.A)(console.error);function sprintf_sprintf(format,...args){try{return sprintf_default().sprintf(format,...args)}catch(error){return error instanceof Error&&logErrorOnce("sprintf error: \n\n"+error.toString()),format}}var node_modules_tannin=__webpack_require__("../../node_modules/.pnpm/tannin@1.2.0/node_modules/tannin/index.js");const DEFAULT_LOCALE_DATA_={plural_forms:n=>1===n?0:1},I18N_HOOK_REGEXP=/^i18n\.(n?gettext|has_translation)(_|$)/;const i18n=((initialData,initialDomain,hooks)=>{const tannin=new node_modules_tannin.A({}),listeners=new Set,notifyListeners=()=>{listeners.forEach((listener=>listener()))},doSetLocaleData=(data,domain="default")=>{tannin.data[domain]={...tannin.data[domain],...data},tannin.data[domain][""]={...DEFAULT_LOCALE_DATA_,...tannin.data[domain]?.[""]},delete tannin.pluralForms[domain]},setLocaleData=(data,domain)=>{doSetLocaleData(data,domain),notifyListeners()},dcnpgettext=(domain="default",context,single,plural,number)=>(tannin.data[domain]||doSetLocaleData(void 0,domain),tannin.dcnpgettext(domain,context,single,plural,number)),getFilterDomain=(domain="default")=>domain,_x=(text,context,domain)=>{let translation=dcnpgettext(domain,context,text);return hooks?(translation=hooks.applyFilters("i18n.gettext_with_context",translation,text,context,domain),hooks.applyFilters("i18n.gettext_with_context_"+getFilterDomain(domain),translation,text,context,domain)):translation};if(initialData&&setLocaleData(initialData,initialDomain),hooks){const onHookAddedOrRemoved=hookName=>{I18N_HOOK_REGEXP.test(hookName)&&notifyListeners()};hooks.addAction("hookAdded","core/i18n",onHookAddedOrRemoved),hooks.addAction("hookRemoved","core/i18n",onHookAddedOrRemoved)}return{getLocaleData:(domain="default")=>tannin.data[domain],setLocaleData,addLocaleData:(data,domain="default")=>{tannin.data[domain]={...tannin.data[domain],...data,"":{...DEFAULT_LOCALE_DATA_,...tannin.data[domain]?.[""],...data?.[""]}},delete tannin.pluralForms[domain],notifyListeners()},resetLocaleData:(data,domain)=>{tannin.data={},tannin.pluralForms={},setLocaleData(data,domain)},subscribe:callback=>(listeners.add(callback),()=>listeners.delete(callback)),__:(text,domain)=>{let translation=dcnpgettext(domain,void 0,text);return hooks?(translation=hooks.applyFilters("i18n.gettext",translation,text,domain),hooks.applyFilters("i18n.gettext_"+getFilterDomain(domain),translation,text,domain)):translation},_x,_n:(single,plural,number,domain)=>{let translation=dcnpgettext(domain,void 0,single,plural,number);return hooks?(translation=hooks.applyFilters("i18n.ngettext",translation,single,plural,number,domain),hooks.applyFilters("i18n.ngettext_"+getFilterDomain(domain),translation,single,plural,number,domain)):translation},_nx:(single,plural,number,context,domain)=>{let translation=dcnpgettext(domain,context,single,plural,number);return hooks?(translation=hooks.applyFilters("i18n.ngettext_with_context",translation,single,plural,number,context,domain),hooks.applyFilters("i18n.ngettext_with_context_"+getFilterDomain(domain),translation,single,plural,number,context,domain)):translation},isRTL:()=>"rtl"===_x("ltr","text direction"),hasTranslation:(single,context,domain)=>{const key=context?context+""+single:single;let result=!!tannin.data?.[null!=domain?domain:"default"]?.[key];return hooks&&(result=hooks.applyFilters("i18n.has_translation",result,single,context,domain),result=hooks.applyFilters("i18n.has_translation_"+getFilterDomain(domain),result,single,context,domain)),result}}})(void 0,void 0,__webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@3.57.0/node_modules/@wordpress/hooks/build-module/index.js").se),__=(i18n.getLocaleData.bind(i18n),i18n.setLocaleData.bind(i18n),i18n.resetLocaleData.bind(i18n),i18n.subscribe.bind(i18n),i18n.__.bind(i18n)),_x=i18n._x.bind(i18n),isRTL=(i18n._n.bind(i18n),i18n._nx.bind(i18n),i18n.isRTL.bind(i18n));i18n.hasTranslation.bind(i18n)},"../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/close.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.45.0/node_modules/@wordpress/primitives/build-module/svg/index.js");const __WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.wA,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},"../../node_modules/.pnpm/@wordpress+keyboard-shortcuts@3.4.1_react@17.0.2/node_modules/@wordpress/keyboard-shortcuts/build-module/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ee:()=>ShortcutProvider});var actions_namespaceObject={};__webpack_require__.r(actions_namespaceObject),__webpack_require__.d(actions_namespaceObject,{registerShortcut:()=>registerShortcut,unregisterShortcut:()=>unregisterShortcut});var selectors_namespaceObject={};__webpack_require__.r(selectors_namespaceObject),__webpack_require__.d(selectors_namespaceObject,{getAllShortcutKeyCombinations:()=>getAllShortcutKeyCombinations,getAllShortcutRawKeyCombinations:()=>getAllShortcutRawKeyCombinations,getCategoryShortcuts:()=>getCategoryShortcuts,getShortcutAliases:()=>getShortcutAliases,getShortcutDescription:()=>getShortcutDescription,getShortcutKeyCombination:()=>getShortcutKeyCombination,getShortcutRepresentation:()=>getShortcutRepresentation});var redux_store=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@6.6.1_react@17.0.2/node_modules/@wordpress/data/build-module/redux-store/index.js"),build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+data@6.6.1_react@17.0.2/node_modules/@wordpress/data/build-module/index.js"),lodash=__webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");const store_reducer=function reducer(){let state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"REGISTER_SHORTCUT":return{...state,[action.name]:{category:action.category,keyCombination:action.keyCombination,aliases:action.aliases,description:action.description}};case"UNREGISTER_SHORTCUT":return(0,lodash.omit)(state,action.name)}return state};function registerShortcut(_ref){let{name,category,description,keyCombination,aliases}=_ref;return{type:"REGISTER_SHORTCUT",name,category,keyCombination,aliases,description}}function unregisterShortcut(name){return{type:"UNREGISTER_SHORTCUT",name}}var rememo=__webpack_require__("../../node_modules/.pnpm/rememo@3.0.0/node_modules/rememo/es/rememo.js"),keycodes_build_module=__webpack_require__("../../node_modules/.pnpm/@wordpress+keycodes@3.6.1/node_modules/@wordpress/keycodes/build-module/index.js");const EMPTY_ARRAY=[],FORMATTING_METHODS={display:keycodes_build_module.dz,raw:keycodes_build_module.JF,ariaLabel:keycodes_build_module._A};function getKeyCombinationRepresentation(shortcut,representation){return shortcut?shortcut.modifier?FORMATTING_METHODS[representation][shortcut.modifier](shortcut.character):shortcut.character:null}function getShortcutKeyCombination(state,name){return state[name]?state[name].keyCombination:null}function getShortcutRepresentation(state,name){let representation=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"display";return getKeyCombinationRepresentation(getShortcutKeyCombination(state,name),representation)}function getShortcutDescription(state,name){return state[name]?state[name].description:null}function getShortcutAliases(state,name){return state[name]&&state[name].aliases?state[name].aliases:EMPTY_ARRAY}const getAllShortcutKeyCombinations=(0,rememo.A)(((state,name)=>(0,lodash.compact)([getShortcutKeyCombination(state,name),...getShortcutAliases(state,name)])),((state,name)=>[state[name]])),getAllShortcutRawKeyCombinations=(0,rememo.A)(((state,name)=>getAllShortcutKeyCombinations(state,name).map((combination=>getKeyCombinationRepresentation(combination,"raw")))),((state,name)=>[state[name]])),getCategoryShortcuts=(0,rememo.A)(((state,categoryName)=>Object.entries(state).filter((_ref=>{let[,shortcut]=_ref;return shortcut.category===categoryName})).map((_ref2=>{let[name]=_ref2;return name}))),(state=>[state])),store=(0,redux_store.A)("core/keyboard-shortcuts",{reducer:store_reducer,actions:actions_namespaceObject,selectors:selectors_namespaceObject});(0,build_module.kz)(store);var react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");const context_context=(0,react.createContext)();var esm_extends=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.25.0/node_modules/@babel/runtime/helpers/esm/extends.js");const{Provider}=context_context;function ShortcutProvider(props){const keyboardShortcuts=(0,react.useRef)(new Set);return(0,react.createElement)(Provider,{value:keyboardShortcuts},(0,react.createElement)("div",(0,esm_extends.A)({},props,{onKeyDown:function onKeyDown(event){props.onKeyDown&&props.onKeyDown(event);for(const keyboardShortcut of keyboardShortcuts.current)keyboardShortcut(event)}})))}},"../../node_modules/.pnpm/@wordpress+primitives@3.55.0/node_modules/@wordpress/primitives/build-module/svg/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t4:()=>SVG,wA:()=>Path});var classnames__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__),_wordpress_element__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");const Path=props=>(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path",props),SVG=(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((({className,isPressed,...props},ref)=>{const appliedProps={...props,className:classnames__WEBPACK_IMPORTED_MODULE_0___default()(className,{"is-pressed":isPressed})||void 0,"aria-hidden":!0,focusable:!1};return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg",{...appliedProps,ref})}));SVG.displayName="SVG"},"../../node_modules/.pnpm/autosize@4.0.4/node_modules/autosize/dist/autosize.js":function(module,exports){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[module,exports],__WEBPACK_AMD_DEFINE_FACTORY__=function(module,exports){"use strict";var keys,values,map="function"==typeof Map?new Map:(keys=[],values=[],{has:function has(key){return keys.indexOf(key)>-1},get:function get(key){return values[keys.indexOf(key)]},set:function set(key,value){-1===keys.indexOf(key)&&(keys.push(key),values.push(value))},delete:function _delete(key){var index=keys.indexOf(key);index>-1&&(keys.splice(index,1),values.splice(index,1))}}),createEvent=function createEvent(name){return new Event(name,{bubbles:!0})};try{new Event("test")}catch(e){createEvent=function createEvent(name){var evt=document.createEvent("Event");return evt.initEvent(name,!0,!1),evt}}function assign(ta){if(ta&&ta.nodeName&&"TEXTAREA"===ta.nodeName&&!map.has(ta)){var heightOffset=null,clientWidth=null,cachedHeight=null,pageResize=function pageResize(){ta.clientWidth!==clientWidth&&update()},destroy=function(style){window.removeEventListener("resize",pageResize,!1),ta.removeEventListener("input",update,!1),ta.removeEventListener("keyup",update,!1),ta.removeEventListener("autosize:destroy",destroy,!1),ta.removeEventListener("autosize:update",update,!1),Object.keys(style).forEach((function(key){ta.style[key]=style[key]})),map.delete(ta)}.bind(ta,{height:ta.style.height,resize:ta.style.resize,overflowY:ta.style.overflowY,overflowX:ta.style.overflowX,wordWrap:ta.style.wordWrap});ta.addEventListener("autosize:destroy",destroy,!1),"onpropertychange"in ta&&"oninput"in ta&&ta.addEventListener("keyup",update,!1),window.addEventListener("resize",pageResize,!1),ta.addEventListener("input",update,!1),ta.addEventListener("autosize:update",update,!1),ta.style.overflowX="hidden",ta.style.wordWrap="break-word",map.set(ta,{destroy,update}),init()}function init(){var style=window.getComputedStyle(ta,null);"vertical"===style.resize?ta.style.resize="none":"both"===style.resize&&(ta.style.resize="horizontal"),heightOffset="content-box"===style.boxSizing?-(parseFloat(style.paddingTop)+parseFloat(style.paddingBottom)):parseFloat(style.borderTopWidth)+parseFloat(style.borderBottomWidth),isNaN(heightOffset)&&(heightOffset=0),update()}function changeOverflow(value){var width=ta.style.width;ta.style.width="0px",ta.offsetWidth,ta.style.width=width,ta.style.overflowY=value}function getParentOverflows(el){for(var arr=[];el&&el.parentNode&&el.parentNode instanceof Element;)el.parentNode.scrollTop&&arr.push({node:el.parentNode,scrollTop:el.parentNode.scrollTop}),el=el.parentNode;return arr}function resize(){if(0!==ta.scrollHeight){var overflows=getParentOverflows(ta),docTop=document.documentElement&&document.documentElement.scrollTop;ta.style.height="",ta.style.height=ta.scrollHeight+heightOffset+"px",clientWidth=ta.clientWidth,overflows.forEach((function(el){el.node.scrollTop=el.scrollTop})),docTop&&(document.documentElement.scrollTop=docTop)}}function update(){resize();var styleHeight=Math.round(parseFloat(ta.style.height)),computed=window.getComputedStyle(ta,null),actualHeight="content-box"===computed.boxSizing?Math.round(parseFloat(computed.height)):ta.offsetHeight;if(actualHeight<styleHeight?"hidden"===computed.overflowY&&(changeOverflow("scroll"),resize(),actualHeight="content-box"===computed.boxSizing?Math.round(parseFloat(window.getComputedStyle(ta,null).height)):ta.offsetHeight):"hidden"!==computed.overflowY&&(changeOverflow("hidden"),resize(),actualHeight="content-box"===computed.boxSizing?Math.round(parseFloat(window.getComputedStyle(ta,null).height)):ta.offsetHeight),cachedHeight!==actualHeight){cachedHeight=actualHeight;var evt=createEvent("autosize:resized");try{ta.dispatchEvent(evt)}catch(err){}}}}function destroy(ta){var methods=map.get(ta);methods&&methods.destroy()}function update(ta){var methods=map.get(ta);methods&&methods.update()}var autosize=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((autosize=function autosize(el){return el}).destroy=function(el){return el},autosize.update=function(el){return el}):((autosize=function autosize(el,options){return el&&Array.prototype.forEach.call(el.length?el:[el],(function(x){return assign(x,options)})),el}).destroy=function(el){return el&&Array.prototype.forEach.call(el.length?el:[el],destroy),el},autosize.update=function(el){return el&&Array.prototype.forEach.call(el.length?el:[el],update),el}),exports.default=autosize,module.exports=exports.default},void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},"../../node_modules/.pnpm/clipboard@2.0.11/node_modules/clipboard/dist/clipboard.js":function(module){!function webpackUniversalModuleDefinition(root,factory){module.exports=factory()}(0,(function(){return function(){var __webpack_modules__={686:function(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_623__){"use strict";__nested_webpack_require_623__.d(__nested_webpack_exports__,{default:function(){return clipboard}});var tiny_emitter=__nested_webpack_require_623__(279),tiny_emitter_default=__nested_webpack_require_623__.n(tiny_emitter),listen=__nested_webpack_require_623__(370),listen_default=__nested_webpack_require_623__.n(listen),src_select=__nested_webpack_require_623__(817),select_default=__nested_webpack_require_623__.n(src_select);function command(type){try{return document.execCommand(type)}catch(err){return!1}}var actions_cut=function ClipboardActionCut(target){var selectedText=select_default()(target);return command("cut"),selectedText};var fakeCopyAction=function fakeCopyAction(value,options){var fakeElement=function createFakeElement(value){var isRTL="rtl"===document.documentElement.getAttribute("dir"),fakeElement=document.createElement("textarea");fakeElement.style.fontSize="12pt",fakeElement.style.border="0",fakeElement.style.padding="0",fakeElement.style.margin="0",fakeElement.style.position="absolute",fakeElement.style[isRTL?"right":"left"]="-9999px";var yPosition=window.pageYOffset||document.documentElement.scrollTop;return fakeElement.style.top="".concat(yPosition,"px"),fakeElement.setAttribute("readonly",""),fakeElement.value=value,fakeElement}(value);options.container.appendChild(fakeElement);var selectedText=select_default()(fakeElement);return command("copy"),fakeElement.remove(),selectedText},actions_copy=function ClipboardActionCopy(target){var options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},selectedText="";return"string"==typeof target?selectedText=fakeCopyAction(target,options):target instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==target?void 0:target.type)?selectedText=fakeCopyAction(target.value,options):(selectedText=select_default()(target),command("copy")),selectedText};function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(obj){return typeof obj}:function _typeof(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var actions_default=function ClipboardActionDefault(){var options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_options$action=options.action,action=void 0===_options$action?"copy":_options$action,container=options.container,target=options.target,text=options.text;if("copy"!==action&&"cut"!==action)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==target){if(!target||"object"!==_typeof(target)||1!==target.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===action&&target.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===action&&(target.hasAttribute("readonly")||target.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return text?actions_copy(text,{container}):target?"cut"===action?actions_cut(target):actions_copy(target,{container}):void 0};function clipboard_typeof(obj){return clipboard_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(obj){return typeof obj}:function _typeof(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},clipboard_typeof(obj)}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return function _possibleConstructorReturn(self,call){if(call&&("object"===clipboard_typeof(call)||"function"==typeof call))return call;return function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}(this,result)}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}function getAttributeValue(suffix,element){var attribute="data-clipboard-".concat(suffix);if(element.hasAttribute(attribute))return element.getAttribute(attribute)}var Clipboard=function(_Emitter){!function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}(Clipboard,_Emitter);var _super=_createSuper(Clipboard);function Clipboard(trigger,options){var _this;return function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Clipboard),(_this=_super.call(this)).resolveOptions(options),_this.listenClick(trigger),_this}return function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}(Clipboard,[{key:"resolveOptions",value:function resolveOptions(){var options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof options.action?options.action:this.defaultAction,this.target="function"==typeof options.target?options.target:this.defaultTarget,this.text="function"==typeof options.text?options.text:this.defaultText,this.container="object"===clipboard_typeof(options.container)?options.container:document.body}},{key:"listenClick",value:function listenClick(trigger){var _this2=this;this.listener=listen_default()(trigger,"click",(function(e){return _this2.onClick(e)}))}},{key:"onClick",value:function onClick(e){var trigger=e.delegateTarget||e.currentTarget,action=this.action(trigger)||"copy",text=actions_default({action,container:this.container,target:this.target(trigger),text:this.text(trigger)});this.emit(text?"success":"error",{action,text,trigger,clearSelection:function clearSelection(){trigger&&trigger.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function defaultAction(trigger){return getAttributeValue("action",trigger)}},{key:"defaultTarget",value:function defaultTarget(trigger){var selector=getAttributeValue("target",trigger);if(selector)return document.querySelector(selector)}},{key:"defaultText",value:function defaultText(trigger){return getAttributeValue("text",trigger)}},{key:"destroy",value:function destroy(){this.listener.destroy()}}],[{key:"copy",value:function copy(target){var options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return actions_copy(target,options)}},{key:"cut",value:function cut(target){return actions_cut(target)}},{key:"isSupported",value:function isSupported(){var action=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],actions="string"==typeof action?[action]:action,support=!!document.queryCommandSupported;return actions.forEach((function(action){support=support&&!!document.queryCommandSupported(action)})),support}}]),Clipboard}(tiny_emitter_default()),clipboard=Clipboard},828:function(module){if("undefined"!=typeof Element&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector}module.exports=function closest(element,selector){for(;element&&9!==element.nodeType;){if("function"==typeof element.matches&&element.matches(selector))return element;element=element.parentNode}}},438:function(module,__unused_webpack_exports,__nested_webpack_require_15749__){var closest=__nested_webpack_require_15749__(828);function _delegate(element,selector,type,callback,useCapture){var listenerFn=listener.apply(this,arguments);return element.addEventListener(type,listenerFn,useCapture),{destroy:function(){element.removeEventListener(type,listenerFn,useCapture)}}}function listener(element,selector,type,callback){return function(e){e.delegateTarget=closest(e.target,selector),e.delegateTarget&&callback.call(element,e)}}module.exports=function delegate(elements,selector,type,callback,useCapture){return"function"==typeof elements.addEventListener?_delegate.apply(null,arguments):"function"==typeof type?_delegate.bind(null,document).apply(null,arguments):("string"==typeof elements&&(elements=document.querySelectorAll(elements)),Array.prototype.map.call(elements,(function(element){return _delegate(element,selector,type,callback,useCapture)})))}},879:function(__unused_webpack_module,exports){exports.node=function(value){return void 0!==value&&value instanceof HTMLElement&&1===value.nodeType},exports.nodeList=function(value){var type=Object.prototype.toString.call(value);return void 0!==value&&("[object NodeList]"===type||"[object HTMLCollection]"===type)&&"length"in value&&(0===value.length||exports.node(value[0]))},exports.string=function(value){return"string"==typeof value||value instanceof String},exports.fn=function(value){return"[object Function]"===Object.prototype.toString.call(value)}},370:function(module,__unused_webpack_exports,__nested_webpack_require_19113__){var is=__nested_webpack_require_19113__(879),delegate=__nested_webpack_require_19113__(438);module.exports=function listen(target,type,callback){if(!target&&!type&&!callback)throw new Error("Missing required arguments");if(!is.string(type))throw new TypeError("Second argument must be a String");if(!is.fn(callback))throw new TypeError("Third argument must be a Function");if(is.node(target))return function listenNode(node,type,callback){return node.addEventListener(type,callback),{destroy:function(){node.removeEventListener(type,callback)}}}(target,type,callback);if(is.nodeList(target))return function listenNodeList(nodeList,type,callback){return Array.prototype.forEach.call(nodeList,(function(node){node.addEventListener(type,callback)})),{destroy:function(){Array.prototype.forEach.call(nodeList,(function(node){node.removeEventListener(type,callback)}))}}}(target,type,callback);if(is.string(target))return function listenSelector(selector,type,callback){return delegate(document.body,selector,type,callback)}(target,type,callback);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(module){module.exports=function select(element){var selectedText;if("SELECT"===element.nodeName)element.focus(),selectedText=element.value;else if("INPUT"===element.nodeName||"TEXTAREA"===element.nodeName){var isReadOnly=element.hasAttribute("readonly");isReadOnly||element.setAttribute("readonly",""),element.select(),element.setSelectionRange(0,element.value.length),isReadOnly||element.removeAttribute("readonly"),selectedText=element.value}else{element.hasAttribute("contenteditable")&&element.focus();var selection=window.getSelection(),range=document.createRange();range.selectNodeContents(element),selection.removeAllRanges(),selection.addRange(range),selectedText=selection.toString()}return selectedText}},279:function(module){function E(){}E.prototype={on:function(name,callback,ctx){var e=this.e||(this.e={});return(e[name]||(e[name]=[])).push({fn:callback,ctx}),this},once:function(name,callback,ctx){var self=this;function listener(){self.off(name,listener),callback.apply(ctx,arguments)}return listener._=callback,this.on(name,listener,ctx)},emit:function(name){for(var data=[].slice.call(arguments,1),evtArr=((this.e||(this.e={}))[name]||[]).slice(),i=0,len=evtArr.length;i<len;i++)evtArr[i].fn.apply(evtArr[i].ctx,data);return this},off:function(name,callback){var e=this.e||(this.e={}),evts=e[name],liveEvents=[];if(evts&&callback)for(var i=0,len=evts.length;i<len;i++)evts[i].fn!==callback&&evts[i].fn._!==callback&&liveEvents.push(evts[i]);return liveEvents.length?e[name]=liveEvents:delete e[name],this}},module.exports=E,module.exports.TinyEmitter=E}},__webpack_module_cache__={};function __nested_webpack_require_24495__(moduleId){if(__webpack_module_cache__[moduleId])return __webpack_module_cache__[moduleId].exports;var module=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module,module.exports,__nested_webpack_require_24495__),module.exports}return __nested_webpack_require_24495__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __nested_webpack_require_24495__.d(getter,{a:getter}),getter},__nested_webpack_require_24495__.d=function(exports,definition){for(var key in definition)__nested_webpack_require_24495__.o(definition,key)&&!__nested_webpack_require_24495__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__nested_webpack_require_24495__.o=function(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)},__nested_webpack_require_24495__(686)}().default}))},"../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/a11y.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};function __WEBPACK_DEFAULT_EXPORT__(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),n=(u=t(e))>(d=t(v))?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}}},"../../node_modules/.pnpm/computed-style@0.1.4/node_modules/computed-style/dist/computedStyle.commonjs.js":module=>{module.exports=function(el,prop,getComputedStyle){return((getComputedStyle=window.getComputedStyle)?getComputedStyle(el):el.currentStyle)[prop.replace(/-(\w)/gi,(function(word,letter){return letter.toUpperCase()}))]}},"../../node_modules/.pnpm/diff@4.0.2/node_modules/diff/lib/diff/base.js":(__unused_webpack_module,exports)=>{"use strict";function Diff(){}function buildValues(diff,components,newString,oldString,useLongestToken){for(var componentPos=0,componentLen=components.length,newPos=0,oldPos=0;componentPos<componentLen;componentPos++){var component=components[componentPos];if(component.removed){if(component.value=diff.join(oldString.slice(oldPos,oldPos+component.count)),oldPos+=component.count,componentPos&&components[componentPos-1].added){var tmp=components[componentPos-1];components[componentPos-1]=components[componentPos],components[componentPos]=tmp}}else{if(!component.added&&useLongestToken){var value=newString.slice(newPos,newPos+component.count);value=value.map((function(value,i){var oldValue=oldString[oldPos+i];return oldValue.length>value.length?oldValue:value})),component.value=diff.join(value)}else component.value=diff.join(newString.slice(newPos,newPos+component.count));newPos+=component.count,component.added||(oldPos+=component.count)}}var lastComponent=components[componentLen-1];return componentLen>1&&"string"==typeof lastComponent.value&&(lastComponent.added||lastComponent.removed)&&diff.equals("",lastComponent.value)&&(components[componentLen-2].value+=lastComponent.value,components.pop()),components}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Diff,Diff.prototype={diff:function diff(oldString,newString){var options=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},callback=options.callback;"function"==typeof options&&(callback=options,options={}),this.options=options;var self=this;function done(value){return callback?(setTimeout((function(){callback(void 0,value)}),0),!0):value}oldString=this.castInput(oldString),newString=this.castInput(newString),oldString=this.removeEmpty(this.tokenize(oldString));var newLen=(newString=this.removeEmpty(this.tokenize(newString))).length,oldLen=oldString.length,editLength=1,maxEditLength=newLen+oldLen,bestPath=[{newPos:-1,components:[]}],oldPos=this.extractCommon(bestPath[0],newString,oldString,0);if(bestPath[0].newPos+1>=newLen&&oldPos+1>=oldLen)return done([{value:this.join(newString),count:newString.length}]);function execEditLength(){for(var diagonalPath=-1*editLength;diagonalPath<=editLength;diagonalPath+=2){var basePath=void 0,addPath=bestPath[diagonalPath-1],removePath=bestPath[diagonalPath+1],_oldPos=(removePath?removePath.newPos:0)-diagonalPath;addPath&&(bestPath[diagonalPath-1]=void 0);var canAdd=addPath&&addPath.newPos+1<newLen,canRemove=removePath&&0<=_oldPos&&_oldPos<oldLen;if(canAdd||canRemove){if(!canAdd||canRemove&&addPath.newPos<removePath.newPos?(basePath={newPos:(path=removePath).newPos,components:path.components.slice(0)},self.pushComponent(basePath.components,void 0,!0)):((basePath=addPath).newPos++,self.pushComponent(basePath.components,!0,void 0)),_oldPos=self.extractCommon(basePath,newString,oldString,diagonalPath),basePath.newPos+1>=newLen&&_oldPos+1>=oldLen)return done(buildValues(self,basePath.components,newString,oldString,self.useLongestToken));bestPath[diagonalPath]=basePath}else bestPath[diagonalPath]=void 0}var path;editLength++}if(callback)!function exec(){setTimeout((function(){if(editLength>maxEditLength)return callback();execEditLength()||exec()}),0)}();else for(;editLength<=maxEditLength;){var ret=execEditLength();if(ret)return ret}},pushComponent:function pushComponent(components,added,removed){var last=components[components.length-1];last&&last.added===added&&last.removed===removed?components[components.length-1]={count:last.count+1,added,removed}:components.push({count:1,added,removed})},extractCommon:function extractCommon(basePath,newString,oldString,diagonalPath){for(var newLen=newString.length,oldLen=oldString.length,newPos=basePath.newPos,oldPos=newPos-diagonalPath,commonCount=0;newPos+1<newLen&&oldPos+1<oldLen&&this.equals(newString[newPos+1],oldString[oldPos+1]);)newPos++,oldPos++,commonCount++;return commonCount&&basePath.components.push({count:commonCount}),basePath.newPos=newPos,oldPos},equals:function equals(left,right){return this.options.comparator?this.options.comparator(left,right):left===right||this.options.ignoreCase&&left.toLowerCase()===right.toLowerCase()},removeEmpty:function removeEmpty(array){for(var ret=[],i=0;i<array.length;i++)array[i]&&ret.push(array[i]);return ret},castInput:function castInput(value){return value},tokenize:function tokenize(value){return value.split("")},join:function join(chars){return chars.join("")}}},"../../node_modules/.pnpm/diff@4.0.2/node_modules/diff/lib/diff/character.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.JJ=function diffChars(oldStr,newStr,options){return characterDiff.diff(oldStr,newStr,options)};var characterDiff=new(function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__("../../node_modules/.pnpm/diff@4.0.2/node_modules/diff/lib/diff/base.js")).default)},"../../node_modules/.pnpm/gradient-parser@0.1.5/node_modules/gradient-parser/build/node.js":(__unused_webpack_module,exports)=>{var GradientParser={};GradientParser.parse=function(){var tokens={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},input="";function error(msg){var err=new Error(input+": "+msg);throw err.source=input,err}function getAST(){var ast=function matchListDefinitions(){return matchListing(matchDefinition)}();return input.length>0&&error("Invalid input not EOF"),ast}function matchDefinition(){return matchGradient("linear-gradient",tokens.linearGradient,matchLinearOrientation)||matchGradient("repeating-linear-gradient",tokens.repeatingLinearGradient,matchLinearOrientation)||matchGradient("radial-gradient",tokens.radialGradient,matchListRadialOrientations)||matchGradient("repeating-radial-gradient",tokens.repeatingRadialGradient,matchListRadialOrientations)}function matchGradient(gradientType,pattern,orientationMatcher){return matchCall(pattern,(function(captures){var orientation=orientationMatcher();return orientation&&(scan(tokens.comma)||error("Missing comma before color stops")),{type:gradientType,orientation,colorStops:matchListing(matchColorStop)}}))}function matchCall(pattern,callback){var captures=scan(pattern);if(captures)return scan(tokens.startCall)||error("Missing ("),result=callback(captures),scan(tokens.endCall)||error("Missing )"),result}function matchLinearOrientation(){return function matchSideOrCorner(){return match("directional",tokens.sideOrCorner,1)}()||function matchAngle(){return match("angular",tokens.angleValue,1)}()}function matchListRadialOrientations(){var radialOrientations,lookaheadCache,radialOrientation=matchRadialOrientation();return radialOrientation&&((radialOrientations=[]).push(radialOrientation),lookaheadCache=input,scan(tokens.comma)&&((radialOrientation=matchRadialOrientation())?radialOrientations.push(radialOrientation):input=lookaheadCache)),radialOrientations}function matchRadialOrientation(){var radialType=function matchCircle(){var circle=match("shape",/^(circle)/i,0);circle&&(circle.style=matchLength()||matchExtentKeyword());return circle}()||function matchEllipse(){var ellipse=match("shape",/^(ellipse)/i,0);ellipse&&(ellipse.style=matchDistance()||matchExtentKeyword());return ellipse}();if(radialType)radialType.at=function matchAtPosition(){if(match("position",/^at/,0)){var positioning=matchPositioning();return positioning||error("Missing positioning value"),positioning}}();else{var defaultPosition=matchPositioning();defaultPosition&&(radialType={type:"default-radial",at:defaultPosition})}return radialType}function matchExtentKeyword(){return match("extent-keyword",tokens.extentKeywords,1)}function matchPositioning(){var location=function matchCoordinates(){return{x:matchDistance(),y:matchDistance()}}();if(location.x||location.y)return{type:"position",value:location}}function matchListing(matcher){var captures=matcher(),result=[];if(captures)for(result.push(captures);scan(tokens.comma);)(captures=matcher())?result.push(captures):error("One extra comma");return result}function matchColorStop(){var color=function matchColor(){return function matchHexColor(){return match("hex",tokens.hexColor,1)}()||function matchRGBAColor(){return matchCall(tokens.rgbaColor,(function(){return{type:"rgba",value:matchListing(matchNumber)}}))}()||function matchRGBColor(){return matchCall(tokens.rgbColor,(function(){return{type:"rgb",value:matchListing(matchNumber)}}))}()||function matchLiteralColor(){return match("literal",tokens.literalColor,0)}()}();return color||error("Expected color definition"),color.length=matchDistance(),color}function matchNumber(){return scan(tokens.number)[1]}function matchDistance(){return match("%",tokens.percentageValue,1)||function matchPositionKeyword(){return match("position-keyword",tokens.positionKeywords,1)}()||matchLength()}function matchLength(){return match("px",tokens.pixelValue,1)||match("em",tokens.emValue,1)}function match(type,pattern,captureIndex){var captures=scan(pattern);if(captures)return{type,value:captures[captureIndex]}}function scan(regexp){var captures,blankCaptures;return(blankCaptures=/^[\n\r\t\s]+/.exec(input))&&consume(blankCaptures[0].length),(captures=regexp.exec(input))&&consume(captures[0].length),captures}function consume(size){input=input.substr(size)}return function(code){return input=code.toString(),getAST()}}(),exports.parse=(GradientParser||{}).parse},"../../node_modules/.pnpm/line-height@0.3.1/node_modules/line-height/lib/line-height.js":(module,__unused_webpack_exports,__webpack_require__)=>{var computedStyle=__webpack_require__("../../node_modules/.pnpm/computed-style@0.1.4/node_modules/computed-style/dist/computedStyle.commonjs.js");module.exports=function lineHeight(node){var lnHeightStr=computedStyle(node,"line-height"),lnHeight=parseFloat(lnHeightStr,10);if(lnHeightStr===lnHeight+""){var _lnHeightStyle=node.style.lineHeight;node.style.lineHeight=lnHeightStr+"em",lnHeightStr=computedStyle(node,"line-height"),lnHeight=parseFloat(lnHeightStr,10),_lnHeightStyle?node.style.lineHeight=_lnHeightStyle:delete node.style.lineHeight}if(-1!==lnHeightStr.indexOf("pt")?(lnHeight*=4,lnHeight/=3):-1!==lnHeightStr.indexOf("mm")?(lnHeight*=96,lnHeight/=25.4):-1!==lnHeightStr.indexOf("cm")?(lnHeight*=96,lnHeight/=2.54):-1!==lnHeightStr.indexOf("in")?lnHeight*=96:-1!==lnHeightStr.indexOf("pc")&&(lnHeight*=16),lnHeight=Math.round(lnHeight),"normal"===lnHeightStr){var nodeName=node.nodeName,_node=document.createElement(nodeName);_node.innerHTML="&nbsp;","TEXTAREA"===nodeName.toUpperCase()&&_node.setAttribute("rows","1");var fontSizeStr=computedStyle(node,"font-size");_node.style.fontSize=fontSizeStr,_node.style.padding="0px",_node.style.border="0px";var body=document.body;body.appendChild(_node),lnHeight=_node.offsetHeight,body.removeChild(_node)}return lnHeight}},"../../node_modules/.pnpm/react-autosize-textarea@7.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-autosize-textarea/lib/TextareaAutosize.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__assign=this&&this.__assign||Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t},__rest=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&(t[p[i]]=s[p[i]])}return t};exports.__esModule=!0;var React=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),PropTypes=__webpack_require__("../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"),autosize=__webpack_require__("../../node_modules/.pnpm/autosize@4.0.4/node_modules/autosize/dist/autosize.js"),getLineHeight=__webpack_require__("../../node_modules/.pnpm/line-height@0.3.1/node_modules/line-height/lib/line-height.js"),TextareaAutosizeClass=function(_super){function TextareaAutosizeClass(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.state={lineHeight:null},_this.textarea=null,_this.onResize=function(e){_this.props.onResize&&_this.props.onResize(e)},_this.updateLineHeight=function(){_this.textarea&&_this.setState({lineHeight:getLineHeight(_this.textarea)})},_this.onChange=function(e){var onChange=_this.props.onChange;_this.currentValue=e.currentTarget.value,onChange&&onChange(e)},_this}return __extends(TextareaAutosizeClass,_super),TextareaAutosizeClass.prototype.componentDidMount=function(){var _this=this,_a=this.props,maxRows=_a.maxRows,async=_a.async;"number"==typeof maxRows&&this.updateLineHeight(),"number"==typeof maxRows||async?setTimeout((function(){return _this.textarea&&autosize(_this.textarea)})):this.textarea&&autosize(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},TextareaAutosizeClass.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),autosize.destroy(this.textarea))},TextareaAutosizeClass.prototype.render=function(){var _this=this,_b=this.props,maxRows=(_b.onResize,_b.maxRows),style=(_b.onChange,_b.style),children=(_b.innerRef,_b.children),props=__rest(_b,["onResize","maxRows","onChange","style","innerRef","children"]),lineHeight=this.state.lineHeight,maxHeight=maxRows&&lineHeight?lineHeight*maxRows:null;return React.createElement("textarea",__assign({},props,{onChange:this.onChange,style:maxHeight?__assign({},style,{maxHeight}):style,ref:function(element){_this.textarea=element,"function"==typeof _this.props.innerRef?_this.props.innerRef(element):_this.props.innerRef&&(_this.props.innerRef.current=element)}}),children)},TextareaAutosizeClass.prototype.componentDidUpdate=function(){this.textarea&&autosize.update(this.textarea)},TextareaAutosizeClass.defaultProps={rows:1,async:!1},TextareaAutosizeClass.propTypes={rows:PropTypes.number,maxRows:PropTypes.number,onResize:PropTypes.func,innerRef:PropTypes.any,async:PropTypes.bool},TextareaAutosizeClass}(React.Component);exports.TextareaAutosize=React.forwardRef((function(props,ref){return React.createElement(TextareaAutosizeClass,__assign({},props,{innerRef:ref}))}))},"../../node_modules/.pnpm/react-autosize-textarea@7.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-autosize-textarea/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var TextareaAutosize_1=__webpack_require__("../../node_modules/.pnpm/react-autosize-textarea@7.1.0_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-autosize-textarea/lib/TextareaAutosize.js");exports.A=TextareaAutosize_1.TextareaAutosize},"../../node_modules/.pnpm/react-colorful@5.6.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-colorful/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{gy:()=>ye,jI:()=>Z,p9:()=>He,xp:()=>ue});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");function u(){return(u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function c(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}function i(e){var t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(e),n=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},f=function(e){return"touches"in e},v=function(e){return e&&e.ownerDocument.defaultView||self},d=function(e,r,t){var n=e.getBoundingClientRect(),o=f(r)?function(e,r){for(var t=0;t<e.length;t++)if(e[t].identifier===r)return e[t];return e[0]}(r.touches,t):r;return{left:s((o.pageX-(n.left+v(e).pageXOffset))/n.width),top:s((o.pageY-(n.top+v(e).pageYOffset))/n.height)}},h=function(e){!f(e)&&e.preventDefault()},m=react__WEBPACK_IMPORTED_MODULE_0__.memo((function(o){var a=o.onMove,l=o.onKey,s=c(o,["onMove","onKey"]),m=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),g=i(a),p=i(l),b=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),_=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),x=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((function(){var e=function(e){h(e),(f(e)?e.touches.length>0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]}),[p,g]),C=x[0],E=x[1],H=x[2];return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){return H}),[H]),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",u({},s,{onTouchStart:C,onMouseDown:C,className:"react-colorful__interactive",ref:m,onKeyDown:E,tabIndex:0,role:"slider"}))})),g=function(e){return e.filter(Boolean).join(" ")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g(["react-colorful__pointer",r.className]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:l,style:{top:100*a+"%",left:100*n+"%"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},_={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return L(C(e))},C=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{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?b(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?b(parseInt(e.substring(6,8),16)/255,2):1}},E=function(e,r){return void 0===r&&(r="deg"),Number(e)*(_[r]||1)},H=function(e){var r=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?N({h:E(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},N=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},w=function(e){return K(I(e))},y=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},q=function(e){var r=y(e);return"hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},k=function(e){var r=y(e);return"hsla("+r.h+", "+r.s+"%, "+r.l+"%, "+r.a+")"},I=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},z=function(e){var r=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?L({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},B=z,D=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},K=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=o<1?D(b(255*o)):"";return"#"+D(r)+D(t)+D(n)+a},L=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},S=react__WEBPACK_IMPORTED_MODULE_0__.memo((function(r){var t=r.hue,n=r.onChange,o=g(["react-colorful__hue",r.className]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:o},react__WEBPACK_IMPORTED_MODULE_0__.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:s(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":b(t),"aria-valuemax":"360","aria-valuemin":"0"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(p,{className:"react-colorful__hue-pointer",left:t/360,color:q({h:t,s:100,v:100,a:1})})))})),T=react__WEBPACK_IMPORTED_MODULE_0__.memo((function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:q({h:t.h,s:100,v:100,a:1})};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"react-colorful__saturation",style:o},react__WEBPACK_IMPORTED_MODULE_0__.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b(t.s)+"%, Brightness "+b(t.v)+"%"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(p,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:q(t)})))})),F=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},P=function(e,r){return e.replace(/\s/g,"")===r.replace(/\s/g,"")},X=function(e,r){return e.toLowerCase()===r.toLowerCase()||F(C(e),C(r))};function Y(e,t,l){var u=i(l),c=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((function(){return e.toHsva(t)})),s=c[0],f=c[1],v=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({color:t,hsva:s});(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}}),[t,e]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){var r;F(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))}),[s,e,u]);var d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((function(e){f((function(r){return Object.assign({},r,e)}))}),[]);return[s,d]}var R,V="undefined"!=typeof window?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:react__WEBPACK_IMPORTED_MODULE_0__.useEffect,J=new Map,Q=function(e){V((function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!J.has(r)){var t=r.createElement("style");t.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}',J.set(r,t);var n=R||__webpack_require__.nc;n&&t.setAttribute("nonce",n),r.head.appendChild(t)}}),[])},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,["className","colorModel","color","onChange"]),f=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g(["react-colorful",n]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",u({},s,{ref:f,className:m}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(T,{hsva:d,onChange:h}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(S,{hue:d.h,onChange:h,className:"react-colorful__last-control"}))},W={defaultColor:"000",toHsva:x,fromHsva:function(e){return w({h:e.h,s:e.s,v:e.v,a:1})},equal:X},Z=function(r){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(U,u({},r,{colorModel:W}))},ee=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:"linear-gradient(90deg, "+k(Object.assign({},n,{a:0}))+", "+k(Object.assign({},n,{a:1}))+")"},l=g(["react-colorful__alpha",t]),u=b(100*n.a);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:l},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:s(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":u+"%","aria-valuenow":u,"aria-valuemin":"0","aria-valuemax":"100"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(p,{className:"react-colorful__alpha-pointer",left:n.a,color:k(n)})))},re=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,["className","colorModel","color","onChange"]),f=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g(["react-colorful",n]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",u({},s,{ref:f,className:m}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(T,{hsva:d,onChange:h}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(S,{hue:d.h,onChange:h}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(ee,{hsva:d,onChange:h,className:"react-colorful__last-control"}))},le={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:H,fromHsva:k,equal:P},ue=function(r){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(re,u({},r,{colorModel:le}))},Ee={defaultColor:"rgba(0, 0, 0, 1)",toHsva:z,fromHsva:function(e){var r=I(e);return"rgba("+r.r+", "+r.g+", "+r.b+", "+r.a+")"},equal:P},He=function(r){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(re,u({},r,{colorModel:Ee}))},we={defaultColor:"rgb(0, 0, 0)",toHsva:B,fromHsva:function(e){var r=I(e);return"rgb("+r.r+", "+r.g+", "+r.b+")"},equal:P},ye=function(r){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(U,u({},r,{colorModel:we}))}},"../../node_modules/.pnpm/remove-accents@0.4.4/node_modules/remove-accents/index.js":module=>{var characterMap={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"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",ß:"ss",Ţ:"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",й:"и",Й:"И",ё:"е",Ё:"Е"},chars=Object.keys(characterMap).join("|"),allAccents=new RegExp(chars,"g"),firstAccent=new RegExp(chars,"");function matcher(match){return characterMap[match]}var removeAccents=function(string){return string.replace(allAccents,matcher)};module.exports=removeAccents,module.exports.has=function(string){return!!string.match(firstAccent)},module.exports.remove=removeAccents},"../../node_modules/.pnpm/showdown@1.9.1/node_modules/showdown/dist/showdown.js":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){function getDefaultOpts(simple){"use strict";var defaultOptions={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===simple)return JSON.parse(JSON.stringify(defaultOptions));var ret={};for(var opt in defaultOptions)defaultOptions.hasOwnProperty(opt)&&(ret[opt]=defaultOptions[opt].defaultValue);return ret}var showdown={},parsers={},extensions={},globalOptions=getDefaultOpts(!0),setFlavor="vanilla",flavor={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:getDefaultOpts(!0),allOn:function allOptionsOn(){"use strict";var options=getDefaultOpts(!0),ret={};for(var opt in options)options.hasOwnProperty(opt)&&(ret[opt]=!0);return ret}()};function validate(extension,name){"use strict";var errMsg=name?"Error in "+name+" extension->":"Error in unnamed extension",ret={valid:!0,error:""};showdown.helper.isArray(extension)||(extension=[extension]);for(var i=0;i<extension.length;++i){var baseMsg=errMsg+" sub-extension "+i+": ",ext=extension[i];if("object"!=typeof ext)return ret.valid=!1,ret.error=baseMsg+"must be an object, but "+typeof ext+" given",ret;if(!showdown.helper.isString(ext.type))return ret.valid=!1,ret.error=baseMsg+'property "type" must be a string, but '+typeof ext.type+" given",ret;var type=ext.type=ext.type.toLowerCase();if("language"===type&&(type=ext.type="lang"),"html"===type&&(type=ext.type="output"),"lang"!==type&&"output"!==type&&"listener"!==type)return ret.valid=!1,ret.error=baseMsg+"type "+type+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',ret;if("listener"===type){if(showdown.helper.isUndefined(ext.listeners))return ret.valid=!1,ret.error=baseMsg+'. Extensions of type "listener" must have a property called "listeners"',ret}else if(showdown.helper.isUndefined(ext.filter)&&showdown.helper.isUndefined(ext.regex))return ret.valid=!1,ret.error=baseMsg+type+' extensions must define either a "regex" property or a "filter" method',ret;if(ext.listeners){if("object"!=typeof ext.listeners)return ret.valid=!1,ret.error=baseMsg+'"listeners" property must be an object but '+typeof ext.listeners+" given",ret;for(var ln in ext.listeners)if(ext.listeners.hasOwnProperty(ln)&&"function"!=typeof ext.listeners[ln])return ret.valid=!1,ret.error=baseMsg+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+ln+" must be a function but "+typeof ext.listeners[ln]+" given",ret}if(ext.filter){if("function"!=typeof ext.filter)return ret.valid=!1,ret.error=baseMsg+'"filter" must be a function, but '+typeof ext.filter+" given",ret}else if(ext.regex){if(showdown.helper.isString(ext.regex)&&(ext.regex=new RegExp(ext.regex,"g")),!(ext.regex instanceof RegExp))return ret.valid=!1,ret.error=baseMsg+'"regex" property must either be a string or a RegExp object, but '+typeof ext.regex+" given",ret;if(showdown.helper.isUndefined(ext.replace))return ret.valid=!1,ret.error=baseMsg+'"regex" extensions must implement a replace string or function',ret}}return ret}function escapeCharactersCallback(wholeMatch,m1){"use strict";return"¨E"+m1.charCodeAt(0)+"E"}showdown.helper={},showdown.extensions={},showdown.setOption=function(key,value){"use strict";return globalOptions[key]=value,this},showdown.getOption=function(key){"use strict";return globalOptions[key]},showdown.getOptions=function(){"use strict";return globalOptions},showdown.resetOptions=function(){"use strict";globalOptions=getDefaultOpts(!0)},showdown.setFlavor=function(name){"use strict";if(!flavor.hasOwnProperty(name))throw Error(name+" flavor was not found");showdown.resetOptions();var preset=flavor[name];for(var option in setFlavor=name,preset)preset.hasOwnProperty(option)&&(globalOptions[option]=preset[option])},showdown.getFlavor=function(){"use strict";return setFlavor},showdown.getFlavorOptions=function(name){"use strict";if(flavor.hasOwnProperty(name))return flavor[name]},showdown.getDefaultOptions=function(simple){"use strict";return getDefaultOpts(simple)},showdown.subParser=function(name,func){"use strict";if(showdown.helper.isString(name)){if(void 0===func){if(parsers.hasOwnProperty(name))return parsers[name];throw Error("SubParser named "+name+" not registered!")}parsers[name]=func}},showdown.extension=function(name,ext){"use strict";if(!showdown.helper.isString(name))throw Error("Extension 'name' must be a string");if(name=showdown.helper.stdExtName(name),showdown.helper.isUndefined(ext)){if(!extensions.hasOwnProperty(name))throw Error("Extension named "+name+" is not registered!");return extensions[name]}"function"==typeof ext&&(ext=ext()),showdown.helper.isArray(ext)||(ext=[ext]);var validExtension=validate(ext,name);if(!validExtension.valid)throw Error(validExtension.error);extensions[name]=ext},showdown.getAllExtensions=function(){"use strict";return extensions},showdown.removeExtension=function(name){"use strict";delete extensions[name]},showdown.resetExtensions=function(){"use strict";extensions={}},showdown.validateExtension=function(ext){"use strict";var validateExtension=validate(ext,null);return!!validateExtension.valid||(console.warn(validateExtension.error),!1)},showdown.hasOwnProperty("helper")||(showdown.helper={}),showdown.helper.isString=function(a){"use strict";return"string"==typeof a||a instanceof String},showdown.helper.isFunction=function(a){"use strict";return a&&"[object Function]"==={}.toString.call(a)},showdown.helper.isArray=function(a){"use strict";return Array.isArray(a)},showdown.helper.isUndefined=function(value){"use strict";return void 0===value},showdown.helper.forEach=function(obj,callback){"use strict";if(showdown.helper.isUndefined(obj))throw new Error("obj param is required");if(showdown.helper.isUndefined(callback))throw new Error("callback param is required");if(!showdown.helper.isFunction(callback))throw new Error("callback param must be a function/closure");if("function"==typeof obj.forEach)obj.forEach(callback);else if(showdown.helper.isArray(obj))for(var i=0;i<obj.length;i++)callback(obj[i],i,obj);else{if("object"!=typeof obj)throw new Error("obj does not seem to be an array or an iterable object");for(var prop in obj)obj.hasOwnProperty(prop)&&callback(obj[prop],prop,obj)}},showdown.helper.stdExtName=function(s){"use strict";return s.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},showdown.helper.escapeCharactersCallback=escapeCharactersCallback,showdown.helper.escapeCharacters=function(text,charsToEscape,afterBackslash){"use strict";var regexString="(["+charsToEscape.replace(/([\[\]\\])/g,"\\$1")+"])";afterBackslash&&(regexString="\\\\"+regexString);var regex=new RegExp(regexString,"g");return text=text.replace(regex,escapeCharactersCallback)},showdown.helper.unescapeHTMLEntities=function(txt){"use strict";return txt.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var rgxFindMatchPos=function(str,left,right,flags){"use strict";var t,s,m,start,end,f=flags||"",g=f.indexOf("g")>-1,x=new RegExp(left+"|"+right,"g"+f.replace(/g/g,"")),l=new RegExp(left,f.replace(/g/g,"")),pos=[];do{for(t=0;m=x.exec(str);)if(l.test(m[0]))t++||(start=(s=x.lastIndex)-m[0].length);else if(t&&! --t){end=m.index+m[0].length;var obj={left:{start,end:s},match:{start:s,end:m.index},right:{start:m.index,end},wholeMatch:{start,end}};if(pos.push(obj),!g)return pos}}while(t&&(x.lastIndex=s));return pos};showdown.helper.matchRecursiveRegExp=function(str,left,right,flags){"use strict";for(var matchPos=rgxFindMatchPos(str,left,right,flags),results=[],i=0;i<matchPos.length;++i)results.push([str.slice(matchPos[i].wholeMatch.start,matchPos[i].wholeMatch.end),str.slice(matchPos[i].match.start,matchPos[i].match.end),str.slice(matchPos[i].left.start,matchPos[i].left.end),str.slice(matchPos[i].right.start,matchPos[i].right.end)]);return results},showdown.helper.replaceRecursiveRegExp=function(str,replacement,left,right,flags){"use strict";if(!showdown.helper.isFunction(replacement)){var repStr=replacement;replacement=function(){return repStr}}var matchPos=rgxFindMatchPos(str,left,right,flags),finalStr=str,lng=matchPos.length;if(lng>0){var bits=[];0!==matchPos[0].wholeMatch.start&&bits.push(str.slice(0,matchPos[0].wholeMatch.start));for(var i=0;i<lng;++i)bits.push(replacement(str.slice(matchPos[i].wholeMatch.start,matchPos[i].wholeMatch.end),str.slice(matchPos[i].match.start,matchPos[i].match.end),str.slice(matchPos[i].left.start,matchPos[i].left.end),str.slice(matchPos[i].right.start,matchPos[i].right.end))),i<lng-1&&bits.push(str.slice(matchPos[i].wholeMatch.end,matchPos[i+1].wholeMatch.start));matchPos[lng-1].wholeMatch.end<str.length&&bits.push(str.slice(matchPos[lng-1].wholeMatch.end)),finalStr=bits.join("")}return finalStr},showdown.helper.regexIndexOf=function(str,regex,fromIndex){"use strict";if(!showdown.helper.isString(str))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(regex instanceof RegExp==!1)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var indexOf=str.substring(fromIndex||0).search(regex);return indexOf>=0?indexOf+(fromIndex||0):indexOf},showdown.helper.splitAtIndex=function(str,index){"use strict";if(!showdown.helper.isString(str))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[str.substring(0,index),str.substring(index)]},showdown.helper.encodeEmailAddress=function(mail){"use strict";var encode=[function(ch){return"&#"+ch.charCodeAt(0)+";"},function(ch){return"&#x"+ch.charCodeAt(0).toString(16)+";"},function(ch){return ch}];return mail=mail.replace(/./g,(function(ch){if("@"===ch)ch=encode[Math.floor(2*Math.random())](ch);else{var r=Math.random();ch=r>.9?encode[2](ch):r>.45?encode[1](ch):encode[0](ch)}return ch}))},showdown.helper.padEnd=function padEnd(str,targetLength,padString){"use strict";return targetLength>>=0,padString=String(padString||" "),str.length>targetLength?String(str):((targetLength-=str.length)>padString.length&&(padString+=padString.repeat(targetLength/padString.length)),String(str)+padString.slice(0,targetLength))},"undefined"==typeof console&&(console={warn:function(msg){"use strict";alert(msg)},log:function(msg){"use strict";alert(msg)},error:function(msg){"use strict";throw msg}}),showdown.helper.regexes={asteriskDashAndColon:/([*_:~])/g},showdown.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️&zwj;♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴&zwj;♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱&zwj;♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇&zwj;♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷&zwj;♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨&zwj;❤️&zwj;👨",couple_with_heart_woman_woman:"👩&zwj;❤️&zwj;👩",couplekiss_man_man:"👨&zwj;❤️&zwj;💋&zwj;👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩&zwj;❤️&zwj;💋&zwj;👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯&zwj;♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁&zwj;🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨&zwj;👦",family_man_boy_boy:"👨&zwj;👦&zwj;👦",family_man_girl:"👨&zwj;👧",family_man_girl_boy:"👨&zwj;👧&zwj;👦",family_man_girl_girl:"👨&zwj;👧&zwj;👧",family_man_man_boy:"👨&zwj;👨&zwj;👦",family_man_man_boy_boy:"👨&zwj;👨&zwj;👦&zwj;👦",family_man_man_girl:"👨&zwj;👨&zwj;👧",family_man_man_girl_boy:"👨&zwj;👨&zwj;👧&zwj;👦",family_man_man_girl_girl:"👨&zwj;👨&zwj;👧&zwj;👧",family_man_woman_boy_boy:"👨&zwj;👩&zwj;👦&zwj;👦",family_man_woman_girl:"👨&zwj;👩&zwj;👧",family_man_woman_girl_boy:"👨&zwj;👩&zwj;👧&zwj;👦",family_man_woman_girl_girl:"👨&zwj;👩&zwj;👧&zwj;👧",family_woman_boy:"👩&zwj;👦",family_woman_boy_boy:"👩&zwj;👦&zwj;👦",family_woman_girl:"👩&zwj;👧",family_woman_girl_boy:"👩&zwj;👧&zwj;👦",family_woman_girl_girl:"👩&zwj;👧&zwj;👧",family_woman_woman_boy:"👩&zwj;👩&zwj;👦",family_woman_woman_boy_boy:"👩&zwj;👩&zwj;👦&zwj;👦",family_woman_woman_girl:"👩&zwj;👩&zwj;👧",family_woman_woman_girl_boy:"👩&zwj;👩&zwj;👧&zwj;👦",family_woman_woman_girl_girl:"👩&zwj;👩&zwj;👧&zwj;👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️&zwj;♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍&zwj;♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️&zwj;♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂&zwj;♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇&zwj;♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"",heavy_multiplication_x:"✖️",heavy_plus_sign:"",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨&zwj;🎨",man_astronaut:"👨&zwj;🚀",man_cartwheeling:"🤸&zwj;♂️",man_cook:"👨&zwj;🍳",man_dancing:"🕺",man_facepalming:"🤦&zwj;♂️",man_factory_worker:"👨&zwj;🏭",man_farmer:"👨&zwj;🌾",man_firefighter:"👨&zwj;🚒",man_health_worker:"👨&zwj;⚕️",man_in_tuxedo:"🤵",man_judge:"👨&zwj;⚖️",man_juggling:"🤹&zwj;♂️",man_mechanic:"👨&zwj;🔧",man_office_worker:"👨&zwj;💼",man_pilot:"👨&zwj;✈️",man_playing_handball:"🤾&zwj;♂️",man_playing_water_polo:"🤽&zwj;♂️",man_scientist:"👨&zwj;🔬",man_shrugging:"🤷&zwj;♂️",man_singer:"👨&zwj;🎤",man_student:"👨&zwj;🎓",man_teacher:"👨&zwj;🏫",man_technologist:"👨&zwj;💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆&zwj;♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼&zwj;♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵&zwj;♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅&zwj;♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆&zwj;♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮&zwj;♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎&zwj;♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️&zwj;🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋&zwj;♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣&zwj;♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃&zwj;♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄&zwj;♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊&zwj;♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁&zwj;♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶&zwj;♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️&zwj;♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩&zwj;🎨",woman_astronaut:"👩&zwj;🚀",woman_cartwheeling:"🤸&zwj;♀️",woman_cook:"👩&zwj;🍳",woman_facepalming:"🤦&zwj;♀️",woman_factory_worker:"👩&zwj;🏭",woman_farmer:"👩&zwj;🌾",woman_firefighter:"👩&zwj;🚒",woman_health_worker:"👩&zwj;⚕️",woman_judge:"👩&zwj;⚖️",woman_juggling:"🤹&zwj;♀️",woman_mechanic:"👩&zwj;🔧",woman_office_worker:"👩&zwj;💼",woman_pilot:"👩&zwj;✈️",woman_playing_handball:"🤾&zwj;♀️",woman_playing_water_polo:"🤽&zwj;♀️",woman_scientist:"👩&zwj;🔬",woman_shrugging:"🤷&zwj;♀️",woman_singer:"👩&zwj;🎤",woman_student:"👩&zwj;🎓",woman_teacher:"👩&zwj;🏫",woman_technologist:"👩&zwj;💻",woman_with_turban:"👳&zwj;♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼&zwj;♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},showdown.Converter=function(converterOptions){"use strict";var options={},langExtensions=[],outputModifiers=[],listeners={},setConvFlavor=setFlavor,metadata={parsed:{},raw:"",format:""};function _parseExtension(ext,name){if(name=name||null,showdown.helper.isString(ext)){if(name=ext=showdown.helper.stdExtName(ext),showdown.extensions[ext])return console.warn("DEPRECATION WARNING: "+ext+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function legacyExtensionLoading(ext,name){"function"==typeof ext&&(ext=ext(new showdown.Converter));showdown.helper.isArray(ext)||(ext=[ext]);var valid=validate(ext,name);if(!valid.valid)throw Error(valid.error);for(var i=0;i<ext.length;++i)switch(ext[i].type){case"lang":langExtensions.push(ext[i]);break;case"output":outputModifiers.push(ext[i]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(showdown.extensions[ext],ext);if(showdown.helper.isUndefined(extensions[ext]))throw Error('Extension "'+ext+'" could not be loaded. It was either not found or is not a valid extension.');ext=extensions[ext]}"function"==typeof ext&&(ext=ext()),showdown.helper.isArray(ext)||(ext=[ext]);var validExt=validate(ext,name);if(!validExt.valid)throw Error(validExt.error);for(var i=0;i<ext.length;++i){switch(ext[i].type){case"lang":langExtensions.push(ext[i]);break;case"output":outputModifiers.push(ext[i])}if(ext[i].hasOwnProperty("listeners"))for(var ln in ext[i].listeners)ext[i].listeners.hasOwnProperty(ln)&&listen(ln,ext[i].listeners[ln])}}function listen(name,callback){if(!showdown.helper.isString(name))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof name+" given");if("function"!=typeof callback)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof callback+" given");listeners.hasOwnProperty(name)||(listeners[name]=[]),listeners[name].push(callback)}!function _constructor(){for(var gOpt in converterOptions=converterOptions||{},globalOptions)globalOptions.hasOwnProperty(gOpt)&&(options[gOpt]=globalOptions[gOpt]);if("object"!=typeof converterOptions)throw Error("Converter expects the passed parameter to be an object, but "+typeof converterOptions+" was passed instead.");for(var opt in converterOptions)converterOptions.hasOwnProperty(opt)&&(options[opt]=converterOptions[opt]);options.extensions&&showdown.helper.forEach(options.extensions,_parseExtension)}(),this._dispatch=function dispatch(evtName,text,options,globals){if(listeners.hasOwnProperty(evtName))for(var ei=0;ei<listeners[evtName].length;++ei){var nText=listeners[evtName][ei](evtName,text,this,options,globals);nText&&void 0!==nText&&(text=nText)}return text},this.listen=function(name,callback){return listen(name,callback),this},this.makeHtml=function(text){if(!text)return text;var globals={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions,outputModifiers,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return text=(text=(text=(text=(text=text.replace(/¨/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g,"&nbsp;"),options.smartIndentationFix&&(text=function rTrimInputText(text){var rsp=text.match(/^\s*/)[0].length,rgx=new RegExp("^\\s{0,"+rsp+"}","gm");return text.replace(rgx,"")}(text)),text="\n\n"+text+"\n\n",text=(text=showdown.subParser("detab")(text,options,globals)).replace(/^[ \t]+$/gm,""),showdown.helper.forEach(langExtensions,(function(ext){text=showdown.subParser("runExtension")(ext,text,options,globals)})),text=showdown.subParser("metadata")(text,options,globals),text=showdown.subParser("hashPreCodeTags")(text,options,globals),text=showdown.subParser("githubCodeBlocks")(text,options,globals),text=showdown.subParser("hashHTMLBlocks")(text,options,globals),text=showdown.subParser("hashCodeTags")(text,options,globals),text=showdown.subParser("stripLinkDefinitions")(text,options,globals),text=showdown.subParser("blockGamut")(text,options,globals),text=showdown.subParser("unhashHTMLSpans")(text,options,globals),text=(text=(text=showdown.subParser("unescapeSpecialChars")(text,options,globals)).replace(/¨D/g,"$$")).replace(/¨T/g,"¨"),text=showdown.subParser("completeHTMLDocument")(text,options,globals),showdown.helper.forEach(outputModifiers,(function(ext){text=showdown.subParser("runExtension")(ext,text,options,globals)})),metadata=globals.metadata,text},this.makeMarkdown=this.makeMd=function(src,HTMLParser){if(src=(src=(src=src.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">¨NBSP;<"),!HTMLParser){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");HTMLParser=window.document}var doc=HTMLParser.createElement("div");doc.innerHTML=src;var globals={preList:function substitutePreCodeTags(doc){for(var pres=doc.querySelectorAll("pre"),presPH=[],i=0;i<pres.length;++i)if(1===pres[i].childElementCount&&"code"===pres[i].firstChild.tagName.toLowerCase()){var content=pres[i].firstChild.innerHTML.trim(),language=pres[i].firstChild.getAttribute("data-language")||"";if(""===language)for(var classes=pres[i].firstChild.className.split(" "),c=0;c<classes.length;++c){var matches=classes[c].match(/^language-(.+)$/);if(null!==matches){language=matches[1];break}}content=showdown.helper.unescapeHTMLEntities(content),presPH.push(content),pres[i].outerHTML='<precode language="'+language+'" precodenum="'+i.toString()+'"></precode>'}else presPH.push(pres[i].innerHTML),pres[i].innerHTML="",pres[i].setAttribute("prenum",i.toString());return presPH}(doc)};!function clean(node){for(var n=0;n<node.childNodes.length;++n){var child=node.childNodes[n];3===child.nodeType?/\S/.test(child.nodeValue)?(child.nodeValue=child.nodeValue.split("\n").join(" "),child.nodeValue=child.nodeValue.replace(/(\s)+/g,"$1")):(node.removeChild(child),--n):1===child.nodeType&&clean(child)}}(doc);for(var nodes=doc.childNodes,mdDoc="",i=0;i<nodes.length;i++)mdDoc+=showdown.subParser("makeMarkdown.node")(nodes[i],globals);return mdDoc},this.setOption=function(key,value){options[key]=value},this.getOption=function(key){return options[key]},this.getOptions=function(){return options},this.addExtension=function(extension,name){_parseExtension(extension,name=name||null)},this.useExtension=function(extensionName){_parseExtension(extensionName)},this.setFlavor=function(name){if(!flavor.hasOwnProperty(name))throw Error(name+" flavor was not found");var preset=flavor[name];for(var option in setConvFlavor=name,preset)preset.hasOwnProperty(option)&&(options[option]=preset[option])},this.getFlavor=function(){return setConvFlavor},this.removeExtension=function(extension){showdown.helper.isArray(extension)||(extension=[extension]);for(var a=0;a<extension.length;++a){for(var ext=extension[a],i=0;i<langExtensions.length;++i)langExtensions[i]===ext&&langExtensions[i].splice(i,1);for(;0<outputModifiers.length;++i)outputModifiers[0]===ext&&outputModifiers[0].splice(i,1)}},this.getAllExtensions=function(){return{language:langExtensions,output:outputModifiers}},this.getMetadata=function(raw){return raw?metadata.raw:metadata.parsed},this.getMetadataFormat=function(){return metadata.format},this._setMetadataPair=function(key,value){metadata.parsed[key]=value},this._setMetadataFormat=function(format){metadata.format=format},this._setMetadataRaw=function(raw){metadata.raw=raw}},showdown.subParser("anchors",(function(text,options,globals){"use strict";var writeAnchorTag=function(wholeMatch,linkText,linkId,url,m5,m6,title){if(showdown.helper.isUndefined(title)&&(title=""),linkId=linkId.toLowerCase(),wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)url="";else if(!url){if(linkId||(linkId=linkText.toLowerCase().replace(/ ?\n/g," ")),url="#"+linkId,showdown.helper.isUndefined(globals.gUrls[linkId]))return wholeMatch;url=globals.gUrls[linkId],showdown.helper.isUndefined(globals.gTitles[linkId])||(title=globals.gTitles[linkId])}var result='<a href="'+(url=url.replace(showdown.helper.regexes.asteriskDashAndColon,showdown.helper.escapeCharactersCallback))+'"';return""!==title&&null!==title&&(result+=' title="'+(title=(title=title.replace(/"/g,"&quot;")).replace(showdown.helper.regexes.asteriskDashAndColon,showdown.helper.escapeCharactersCallback))+'"'),options.openLinksInNewWindow&&!/^#/.test(url)&&(result+=' rel="noopener noreferrer" target="¨E95Eblank"'),result+=">"+linkText+"</a>"};return text=(text=(text=(text=(text=globals.converter._dispatch("anchors.before",text,options,globals)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,writeAnchorTag)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,writeAnchorTag)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,writeAnchorTag)).replace(/\[([^\[\]]+)]()()()()()/g,writeAnchorTag),options.ghMentions&&(text=text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(wm,st,escape,mentions,username){if("\\"===escape)return st+mentions;if(!showdown.helper.isString(options.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var lnk=options.ghMentionsLink.replace(/\{u}/g,username),target="";return options.openLinksInNewWindow&&(target=' rel="noopener noreferrer" target="¨E95Eblank"'),st+'<a href="'+lnk+'"'+target+">"+mentions+"</a>"}))),text=globals.converter._dispatch("anchors.after",text,options,globals)}));var simpleURLRegex=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,simpleURLRegex2=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,delimUrlRegex=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,simpleMailRegex=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,delimMailRegex=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,replaceLink=function(options){"use strict";return function(wm,leadingMagicChars,link,m2,m3,trailingPunctuation,trailingMagicChars){var lnkTxt=link=link.replace(showdown.helper.regexes.asteriskDashAndColon,showdown.helper.escapeCharactersCallback),append="",target="",lmc=leadingMagicChars||"",tmc=trailingMagicChars||"";return/^www\./i.test(link)&&(link=link.replace(/^www\./i,"http://www.")),options.excludeTrailingPunctuationFromURLs&&trailingPunctuation&&(append=trailingPunctuation),options.openLinksInNewWindow&&(target=' rel="noopener noreferrer" target="¨E95Eblank"'),lmc+'<a href="'+link+'"'+target+">"+lnkTxt+"</a>"+append+tmc}},replaceMail=function(options,globals){"use strict";return function(wholeMatch,b,mail){var href="mailto:";return b=b||"",mail=showdown.subParser("unescapeSpecialChars")(mail,options,globals),options.encodeEmails?(href=showdown.helper.encodeEmailAddress(href+mail),mail=showdown.helper.encodeEmailAddress(mail)):href+=mail,b+'<a href="'+href+'">'+mail+"</a>"}};showdown.subParser("autoLinks",(function(text,options,globals){"use strict";return text=(text=(text=globals.converter._dispatch("autoLinks.before",text,options,globals)).replace(delimUrlRegex,replaceLink(options))).replace(delimMailRegex,replaceMail(options,globals)),text=globals.converter._dispatch("autoLinks.after",text,options,globals)})),showdown.subParser("simplifiedAutoLinks",(function(text,options,globals){"use strict";return options.simplifiedAutoLink?(text=globals.converter._dispatch("simplifiedAutoLinks.before",text,options,globals),text=(text=options.excludeTrailingPunctuationFromURLs?text.replace(simpleURLRegex2,replaceLink(options)):text.replace(simpleURLRegex,replaceLink(options))).replace(simpleMailRegex,replaceMail(options,globals)),text=globals.converter._dispatch("simplifiedAutoLinks.after",text,options,globals)):text})),showdown.subParser("blockGamut",(function(text,options,globals){"use strict";return text=globals.converter._dispatch("blockGamut.before",text,options,globals),text=showdown.subParser("blockQuotes")(text,options,globals),text=showdown.subParser("headers")(text,options,globals),text=showdown.subParser("horizontalRule")(text,options,globals),text=showdown.subParser("lists")(text,options,globals),text=showdown.subParser("codeBlocks")(text,options,globals),text=showdown.subParser("tables")(text,options,globals),text=showdown.subParser("hashHTMLBlocks")(text,options,globals),text=showdown.subParser("paragraphs")(text,options,globals),text=globals.converter._dispatch("blockGamut.after",text,options,globals)})),showdown.subParser("blockQuotes",(function(text,options,globals){"use strict";text=globals.converter._dispatch("blockQuotes.before",text,options,globals),text+="\n\n";var rgx=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return options.splitAdjacentBlockquotes&&(rgx=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),text=text.replace(rgx,(function(bq){return bq=(bq=(bq=bq.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),bq=showdown.subParser("githubCodeBlocks")(bq,options,globals),bq=(bq=(bq=showdown.subParser("blockGamut")(bq,options,globals)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,(function(wholeMatch,m1){var pre=m1;return pre=(pre=pre.replace(/^ /gm,"¨0")).replace(/¨0/g,"")})),showdown.subParser("hashBlock")("<blockquote>\n"+bq+"\n</blockquote>",options,globals)})),text=globals.converter._dispatch("blockQuotes.after",text,options,globals)})),showdown.subParser("codeBlocks",(function(text,options,globals){"use strict";text=globals.converter._dispatch("codeBlocks.before",text,options,globals);return text=(text=(text+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(wholeMatch,m1,m2){var codeblock=m1,nextChar=m2,end="\n";return codeblock=showdown.subParser("outdent")(codeblock,options,globals),codeblock=showdown.subParser("encodeCode")(codeblock,options,globals),codeblock=(codeblock=(codeblock=showdown.subParser("detab")(codeblock,options,globals)).replace(/^\n+/g,"")).replace(/\n+$/g,""),options.omitExtraWLInCodeBlocks&&(end=""),codeblock="<pre><code>"+codeblock+end+"</code></pre>",showdown.subParser("hashBlock")(codeblock,options,globals)+nextChar}))).replace(/¨0/,""),text=globals.converter._dispatch("codeBlocks.after",text,options,globals)})),showdown.subParser("codeSpans",(function(text,options,globals){"use strict";return void 0===(text=globals.converter._dispatch("codeSpans.before",text,options,globals))&&(text=""),text=text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(wholeMatch,m1,m2,m3){var c=m3;return c=(c=c.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),c=m1+"<code>"+(c=showdown.subParser("encodeCode")(c,options,globals))+"</code>",c=showdown.subParser("hashHTMLSpans")(c,options,globals)})),text=globals.converter._dispatch("codeSpans.after",text,options,globals)})),showdown.subParser("completeHTMLDocument",(function(text,options,globals){"use strict";if(!options.completeHTMLDocument)return text;text=globals.converter._dispatch("completeHTMLDocument.before",text,options,globals);var doctype="html",doctypeParsed="<!DOCTYPE HTML>\n",title="",charset='<meta charset="utf-8">\n',lang="",metadata="";for(var meta in void 0!==globals.metadata.parsed.doctype&&(doctypeParsed="<!DOCTYPE "+globals.metadata.parsed.doctype+">\n","html"!==(doctype=globals.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==doctype||(charset='<meta charset="utf-8">')),globals.metadata.parsed)if(globals.metadata.parsed.hasOwnProperty(meta))switch(meta.toLowerCase()){case"doctype":break;case"title":title="<title>"+globals.metadata.parsed.title+"</title>\n";break;case"charset":charset="html"===doctype||"html5"===doctype?'<meta charset="'+globals.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+globals.metadata.parsed.charset+'">\n';break;case"language":case"lang":lang=' lang="'+globals.metadata.parsed[meta]+'"',metadata+='<meta name="'+meta+'" content="'+globals.metadata.parsed[meta]+'">\n';break;default:metadata+='<meta name="'+meta+'" content="'+globals.metadata.parsed[meta]+'">\n'}return text=doctypeParsed+"<html"+lang+">\n<head>\n"+title+charset+metadata+"</head>\n<body>\n"+text.trim()+"\n</body>\n</html>",text=globals.converter._dispatch("completeHTMLDocument.after",text,options,globals)})),showdown.subParser("detab",(function(text,options,globals){"use strict";return text=(text=(text=(text=(text=(text=globals.converter._dispatch("detab.before",text,options,globals)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(wholeMatch,m1){for(var leadingText=m1,numSpaces=4-leadingText.length%4,i=0;i<numSpaces;i++)leadingText+=" ";return leadingText}))).replace(/¨A/g," ")).replace(/¨B/g,""),text=globals.converter._dispatch("detab.after",text,options,globals)})),showdown.subParser("ellipsis",(function(text,options,globals){"use strict";return text=(text=globals.converter._dispatch("ellipsis.before",text,options,globals)).replace(/\.\.\./g,"…"),text=globals.converter._dispatch("ellipsis.after",text,options,globals)})),showdown.subParser("emoji",(function(text,options,globals){"use strict";if(!options.emoji)return text;return text=(text=globals.converter._dispatch("emoji.before",text,options,globals)).replace(/:([\S]+?):/g,(function(wm,emojiCode){return showdown.helper.emojis.hasOwnProperty(emojiCode)?showdown.helper.emojis[emojiCode]:wm})),text=globals.converter._dispatch("emoji.after",text,options,globals)})),showdown.subParser("encodeAmpsAndAngles",(function(text,options,globals){"use strict";return text=(text=(text=(text=(text=globals.converter._dispatch("encodeAmpsAndAngles.before",text,options,globals)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;")).replace(/<(?![a-z\/?$!])/gi,"&lt;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),text=globals.converter._dispatch("encodeAmpsAndAngles.after",text,options,globals)})),showdown.subParser("encodeBackslashEscapes",(function(text,options,globals){"use strict";return text=(text=(text=globals.converter._dispatch("encodeBackslashEscapes.before",text,options,globals)).replace(/\\(\\)/g,showdown.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,showdown.helper.escapeCharactersCallback),text=globals.converter._dispatch("encodeBackslashEscapes.after",text,options,globals)})),showdown.subParser("encodeCode",(function(text,options,globals){"use strict";return text=(text=globals.converter._dispatch("encodeCode.before",text,options,globals)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,showdown.helper.escapeCharactersCallback),text=globals.converter._dispatch("encodeCode.after",text,options,globals)})),showdown.subParser("escapeSpecialCharsWithinTagAttributes",(function(text,options,globals){"use strict";return text=(text=(text=globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",text,options,globals)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(wholeMatch){return wholeMatch.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,showdown.helper.escapeCharactersCallback)}))).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(wholeMatch){return wholeMatch.replace(/([\\`*_~=|])/g,showdown.helper.escapeCharactersCallback)})),text=globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",text,options,globals)})),showdown.subParser("githubCodeBlocks",(function(text,options,globals){"use strict";return options.ghCodeBlocks?(text=globals.converter._dispatch("githubCodeBlocks.before",text,options,globals),text=(text=(text+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(wholeMatch,delim,language,codeblock){var end=options.omitExtraWLInCodeBlocks?"":"\n";return codeblock=showdown.subParser("encodeCode")(codeblock,options,globals),codeblock="<pre><code"+(language?' class="'+language+" language-"+language+'"':"")+">"+(codeblock=(codeblock=(codeblock=showdown.subParser("detab")(codeblock,options,globals)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+end+"</code></pre>",codeblock=showdown.subParser("hashBlock")(codeblock,options,globals),"\n\n¨G"+(globals.ghCodeBlocks.push({text:wholeMatch,codeblock})-1)+"G\n\n"}))).replace(/¨0/,""),globals.converter._dispatch("githubCodeBlocks.after",text,options,globals)):text})),showdown.subParser("hashBlock",(function(text,options,globals){"use strict";return text=(text=globals.converter._dispatch("hashBlock.before",text,options,globals)).replace(/(^\n+|\n+$)/g,""),text="\n\n¨K"+(globals.gHtmlBlocks.push(text)-1)+"K\n\n",text=globals.converter._dispatch("hashBlock.after",text,options,globals)})),showdown.subParser("hashCodeTags",(function(text,options,globals){"use strict";text=globals.converter._dispatch("hashCodeTags.before",text,options,globals);return text=showdown.helper.replaceRecursiveRegExp(text,(function(wholeMatch,match,left,right){var codeblock=left+showdown.subParser("encodeCode")(match,options,globals)+right;return"¨C"+(globals.gHtmlSpans.push(codeblock)-1)+"C"}),"<code\\b[^>]*>","</code>","gim"),text=globals.converter._dispatch("hashCodeTags.after",text,options,globals)})),showdown.subParser("hashElement",(function(text,options,globals){"use strict";return function(wholeMatch,m1){var blockText=m1;return blockText=(blockText=(blockText=blockText.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),blockText="\n\n¨K"+(globals.gHtmlBlocks.push(blockText)-1)+"K\n\n"}})),showdown.subParser("hashHTMLBlocks",(function(text,options,globals){"use strict";text=globals.converter._dispatch("hashHTMLBlocks.before",text,options,globals);var blockTags=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],repFunc=function(wholeMatch,match,left,right){var txt=wholeMatch;return-1!==left.search(/\bmarkdown\b/)&&(txt=left+globals.converter.makeHtml(match)+right),"\n\n¨K"+(globals.gHtmlBlocks.push(txt)-1)+"K\n\n"};options.backslashEscapesHTMLTags&&(text=text.replace(/\\<(\/?[^>]+?)>/g,(function(wm,inside){return"&lt;"+inside+"&gt;"})));for(var i=0;i<blockTags.length;++i)for(var opTagPos,rgx1=new RegExp("^ {0,3}(<"+blockTags[i]+"\\b[^>]*>)","im"),patLeft="<"+blockTags[i]+"\\b[^>]*>",patRight="</"+blockTags[i]+">";-1!==(opTagPos=showdown.helper.regexIndexOf(text,rgx1));){var subTexts=showdown.helper.splitAtIndex(text,opTagPos),newSubText1=showdown.helper.replaceRecursiveRegExp(subTexts[1],repFunc,patLeft,patRight,"im");if(newSubText1===subTexts[1])break;text=subTexts[0].concat(newSubText1)}return text=text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,showdown.subParser("hashElement")(text,options,globals)),text=(text=showdown.helper.replaceRecursiveRegExp(text,(function(txt){return"\n\n¨K"+(globals.gHtmlBlocks.push(txt)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,showdown.subParser("hashElement")(text,options,globals)),text=globals.converter._dispatch("hashHTMLBlocks.after",text,options,globals)})),showdown.subParser("hashHTMLSpans",(function(text,options,globals){"use strict";function hashHTMLSpan(html){return"¨C"+(globals.gHtmlSpans.push(html)-1)+"C"}return text=(text=(text=(text=(text=globals.converter._dispatch("hashHTMLSpans.before",text,options,globals)).replace(/<[^>]+?\/>/gi,(function(wm){return hashHTMLSpan(wm)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(wm){return hashHTMLSpan(wm)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(wm){return hashHTMLSpan(wm)}))).replace(/<[^>]+?>/gi,(function(wm){return hashHTMLSpan(wm)})),text=globals.converter._dispatch("hashHTMLSpans.after",text,options,globals)})),showdown.subParser("unhashHTMLSpans",(function(text,options,globals){"use strict";text=globals.converter._dispatch("unhashHTMLSpans.before",text,options,globals);for(var i=0;i<globals.gHtmlSpans.length;++i){for(var repText=globals.gHtmlSpans[i],limit=0;/¨C(\d+)C/.test(repText);){var num=RegExp.$1;if(repText=repText.replace("¨C"+num+"C",globals.gHtmlSpans[num]),10===limit){console.error("maximum nesting of 10 spans reached!!!");break}++limit}text=text.replace("¨C"+i+"C",repText)}return text=globals.converter._dispatch("unhashHTMLSpans.after",text,options,globals)})),showdown.subParser("hashPreCodeTags",(function(text,options,globals){"use strict";text=globals.converter._dispatch("hashPreCodeTags.before",text,options,globals);return text=showdown.helper.replaceRecursiveRegExp(text,(function(wholeMatch,match,left,right){var codeblock=left+showdown.subParser("encodeCode")(match,options,globals)+right;return"\n\n¨G"+(globals.ghCodeBlocks.push({text:wholeMatch,codeblock})-1)+"G\n\n"}),"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),text=globals.converter._dispatch("hashPreCodeTags.after",text,options,globals)})),showdown.subParser("headers",(function(text,options,globals){"use strict";text=globals.converter._dispatch("headers.before",text,options,globals);var headerLevelStart=isNaN(parseInt(options.headerLevelStart))?1:parseInt(options.headerLevelStart),setextRegexH1=options.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,setextRegexH2=options.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;text=(text=text.replace(setextRegexH1,(function(wholeMatch,m1){var spanGamut=showdown.subParser("spanGamut")(m1,options,globals),hID=options.noHeaderId?"":' id="'+headerId(m1)+'"',hashBlock="<h"+headerLevelStart+hID+">"+spanGamut+"</h"+headerLevelStart+">";return showdown.subParser("hashBlock")(hashBlock,options,globals)}))).replace(setextRegexH2,(function(matchFound,m1){var spanGamut=showdown.subParser("spanGamut")(m1,options,globals),hID=options.noHeaderId?"":' id="'+headerId(m1)+'"',hLevel=headerLevelStart+1,hashBlock="<h"+hLevel+hID+">"+spanGamut+"</h"+hLevel+">";return showdown.subParser("hashBlock")(hashBlock,options,globals)}));var atxStyle=options.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function headerId(m){var title,prefix;if(options.customizedHeaderId){var match=m.match(/\{([^{]+?)}\s*$/);match&&match[1]&&(m=match[1])}return title=m,prefix=showdown.helper.isString(options.prefixHeaderId)?options.prefixHeaderId:!0===options.prefixHeaderId?"section-":"",options.rawPrefixHeaderId||(title=prefix+title),title=options.ghCompatibleHeaderId?title.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():options.rawHeaderId?title.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():title.replace(/[^\w]/g,"").toLowerCase(),options.rawPrefixHeaderId&&(title=prefix+title),globals.hashLinkCounts[title]?title=title+"-"+globals.hashLinkCounts[title]++:globals.hashLinkCounts[title]=1,title}return text=text.replace(atxStyle,(function(wholeMatch,m1,m2){var hText=m2;options.customizedHeaderId&&(hText=m2.replace(/\s?\{([^{]+?)}\s*$/,""));var span=showdown.subParser("spanGamut")(hText,options,globals),hID=options.noHeaderId?"":' id="'+headerId(m2)+'"',hLevel=headerLevelStart-1+m1.length,header="<h"+hLevel+hID+">"+span+"</h"+hLevel+">";return showdown.subParser("hashBlock")(header,options,globals)})),text=globals.converter._dispatch("headers.after",text,options,globals)})),showdown.subParser("horizontalRule",(function(text,options,globals){"use strict";text=globals.converter._dispatch("horizontalRule.before",text,options,globals);var key=showdown.subParser("hashBlock")("<hr />",options,globals);return text=(text=(text=text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,key)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,key)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,key),text=globals.converter._dispatch("horizontalRule.after",text,options,globals)})),showdown.subParser("images",(function(text,options,globals){"use strict";function writeImageTag(wholeMatch,altText,linkId,url,width,height,m5,title){var gUrls=globals.gUrls,gTitles=globals.gTitles,gDims=globals.gDimensions;if(linkId=linkId.toLowerCase(),title||(title=""),wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)url="";else if(""===url||null===url){if(""!==linkId&&null!==linkId||(linkId=altText.toLowerCase().replace(/ ?\n/g," ")),url="#"+linkId,showdown.helper.isUndefined(gUrls[linkId]))return wholeMatch;url=gUrls[linkId],showdown.helper.isUndefined(gTitles[linkId])||(title=gTitles[linkId]),showdown.helper.isUndefined(gDims[linkId])||(width=gDims[linkId].width,height=gDims[linkId].height)}altText=altText.replace(/"/g,"&quot;").replace(showdown.helper.regexes.asteriskDashAndColon,showdown.helper.escapeCharactersCallback);var result='<img src="'+(url=url.replace(showdown.helper.regexes.asteriskDashAndColon,showdown.helper.escapeCharactersCallback))+'" alt="'+altText+'"';return title&&showdown.helper.isString(title)&&(result+=' title="'+(title=title.replace(/"/g,"&quot;").replace(showdown.helper.regexes.asteriskDashAndColon,showdown.helper.escapeCharactersCallback))+'"'),width&&height&&(result+=' width="'+(width="*"===width?"auto":width)+'"',result+=' height="'+(height="*"===height?"auto":height)+'"'),result+=" />"}return text=(text=(text=(text=(text=(text=globals.converter._dispatch("images.before",text,options,globals)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,writeImageTag)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function writeImageTagBase64(wholeMatch,altText,linkId,url,width,height,m5,title){return writeImageTag(wholeMatch,altText,linkId,url=url.replace(/\s/g,""),width,height,m5,title)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,writeImageTag)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,writeImageTag)).replace(/!\[([^\[\]]+)]()()()()()/g,writeImageTag),text=globals.converter._dispatch("images.after",text,options,globals)})),showdown.subParser("italicsAndBold",(function(text,options,globals){"use strict";function parseInside(txt,left,right){return left+txt+right}return text=globals.converter._dispatch("italicsAndBold.before",text,options,globals),text=options.literalMidWordUnderscores?(text=(text=text.replace(/\b___(\S[\s\S]*?)___\b/g,(function(wm,txt){return parseInside(txt,"<strong><em>","</em></strong>")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(wm,txt){return parseInside(txt,"<strong>","</strong>")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(wm,txt){return parseInside(txt,"<em>","</em>")})):(text=(text=text.replace(/___(\S[\s\S]*?)___/g,(function(wm,m){return/\S$/.test(m)?parseInside(m,"<strong><em>","</em></strong>"):wm}))).replace(/__(\S[\s\S]*?)__/g,(function(wm,m){return/\S$/.test(m)?parseInside(m,"<strong>","</strong>"):wm}))).replace(/_([^\s_][\s\S]*?)_/g,(function(wm,m){return/\S$/.test(m)?parseInside(m,"<em>","</em>"):wm})),text=options.literalMidWordAsterisks?(text=(text=text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(wm,lead,txt){return parseInside(txt,lead+"<strong><em>","</em></strong>")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(wm,lead,txt){return parseInside(txt,lead+"<strong>","</strong>")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(wm,lead,txt){return parseInside(txt,lead+"<em>","</em>")})):(text=(text=text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(wm,m){return/\S$/.test(m)?parseInside(m,"<strong><em>","</em></strong>"):wm}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(wm,m){return/\S$/.test(m)?parseInside(m,"<strong>","</strong>"):wm}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(wm,m){return/\S$/.test(m)?parseInside(m,"<em>","</em>"):wm})),text=globals.converter._dispatch("italicsAndBold.after",text,options,globals)})),showdown.subParser("lists",(function(text,options,globals){"use strict";function processListItems(listStr,trimTrailing){globals.gListLevel++,listStr=listStr.replace(/\n{2,}$/,"\n");var rgx=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,isParagraphed=/\n[ \t]*\n(?!¨0)/.test(listStr+="¨0");return options.disableForced4SpacesIndentedSublists&&(rgx=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),listStr=(listStr=listStr.replace(rgx,(function(wholeMatch,m1,m2,m3,m4,taskbtn,checked){checked=checked&&""!==checked.trim();var item=showdown.subParser("outdent")(m4,options,globals),bulletStyle="";return taskbtn&&options.tasklists&&(bulletStyle=' class="task-list-item" style="list-style-type: none;"',item=item.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var otp='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return checked&&(otp+=" checked"),otp+=">"}))),item=item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(wm2){return"¨A"+wm2})),m1||item.search(/\n{2,}/)>-1?(item=showdown.subParser("githubCodeBlocks")(item,options,globals),item=showdown.subParser("blockGamut")(item,options,globals)):(item=(item=showdown.subParser("lists")(item,options,globals)).replace(/\n$/,""),item=(item=showdown.subParser("hashHTMLBlocks")(item,options,globals)).replace(/\n\n+/g,"\n\n"),item=isParagraphed?showdown.subParser("paragraphs")(item,options,globals):showdown.subParser("spanGamut")(item,options,globals)),item="<li"+bulletStyle+">"+(item=item.replace("¨A",""))+"</li>\n"}))).replace(/¨0/g,""),globals.gListLevel--,trimTrailing&&(listStr=listStr.replace(/\s+$/,"")),listStr}function styleStartNumber(list,listType){if("ol"===listType){var res=list.match(/^ *(\d+)\./);if(res&&"1"!==res[1])return' start="'+res[1]+'"'}return""}function parseConsecutiveLists(list,listType,trimTrailing){var olRgx=options.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,ulRgx=options.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,counterRxg="ul"===listType?olRgx:ulRgx,result="";if(-1!==list.search(counterRxg))!function parseCL(txt){var pos=txt.search(counterRxg),style=styleStartNumber(list,listType);-1!==pos?(result+="\n\n<"+listType+style+">\n"+processListItems(txt.slice(0,pos),!!trimTrailing)+"</"+listType+">\n",counterRxg="ul"===(listType="ul"===listType?"ol":"ul")?olRgx:ulRgx,parseCL(txt.slice(pos))):result+="\n\n<"+listType+style+">\n"+processListItems(txt,!!trimTrailing)+"</"+listType+">\n"}(list);else{var style=styleStartNumber(list,listType);result="\n\n<"+listType+style+">\n"+processListItems(list,!!trimTrailing)+"</"+listType+">\n"}return result}return text=globals.converter._dispatch("lists.before",text,options,globals),text+="¨0",text=(text=globals.gListLevel?text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(wholeMatch,list,m2){return parseConsecutiveLists(list,m2.search(/[*+-]/g)>-1?"ul":"ol",!0)})):text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(wholeMatch,m1,list,m3){return parseConsecutiveLists(list,m3.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),text=globals.converter._dispatch("lists.after",text,options,globals)})),showdown.subParser("metadata",(function(text,options,globals){"use strict";if(!options.metadata)return text;function parseMetadataContents(content){globals.metadata.raw=content,(content=(content=content.replace(/&/g,"&amp;").replace(/"/g,"&quot;")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(wm,key,value){return globals.metadata.parsed[key]=value,""}))}return text=(text=(text=(text=globals.converter._dispatch("metadata.before",text,options,globals)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(wholematch,format,content){return parseMetadataContents(content),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(wholematch,format,content){return format&&(globals.metadata.format=format),parseMetadataContents(content),"¨M"}))).replace(/¨M/g,""),text=globals.converter._dispatch("metadata.after",text,options,globals)})),showdown.subParser("outdent",(function(text,options,globals){"use strict";return text=(text=(text=globals.converter._dispatch("outdent.before",text,options,globals)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),text=globals.converter._dispatch("outdent.after",text,options,globals)})),showdown.subParser("paragraphs",(function(text,options,globals){"use strict";for(var grafs=(text=(text=(text=globals.converter._dispatch("paragraphs.before",text,options,globals)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),grafsOut=[],end=grafs.length,i=0;i<end;i++){var str=grafs[i];str.search(/¨(K|G)(\d+)\1/g)>=0?grafsOut.push(str):str.search(/\S/)>=0&&(str=(str=showdown.subParser("spanGamut")(str,options,globals)).replace(/^([ \t]*)/g,"<p>"),str+="</p>",grafsOut.push(str))}for(end=grafsOut.length,i=0;i<end;i++){for(var blockText="",grafsOutIt=grafsOut[i],codeFlag=!1;/¨(K|G)(\d+)\1/.test(grafsOutIt);){var delim=RegExp.$1,num=RegExp.$2;blockText=(blockText="K"===delim?globals.gHtmlBlocks[num]:codeFlag?showdown.subParser("encodeCode")(globals.ghCodeBlocks[num].text,options,globals):globals.ghCodeBlocks[num].codeblock).replace(/\$/g,"$$$$"),grafsOutIt=grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,blockText),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(grafsOutIt)&&(codeFlag=!0)}grafsOut[i]=grafsOutIt}return text=(text=(text=grafsOut.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),globals.converter._dispatch("paragraphs.after",text,options,globals)})),showdown.subParser("runExtension",(function(ext,text,options,globals){"use strict";if(ext.filter)text=ext.filter(text,globals.converter,options);else if(ext.regex){var re=ext.regex;re instanceof RegExp||(re=new RegExp(re,"g")),text=text.replace(re,ext.replace)}return text})),showdown.subParser("spanGamut",(function(text,options,globals){"use strict";return text=globals.converter._dispatch("spanGamut.before",text,options,globals),text=showdown.subParser("codeSpans")(text,options,globals),text=showdown.subParser("escapeSpecialCharsWithinTagAttributes")(text,options,globals),text=showdown.subParser("encodeBackslashEscapes")(text,options,globals),text=showdown.subParser("images")(text,options,globals),text=showdown.subParser("anchors")(text,options,globals),text=showdown.subParser("autoLinks")(text,options,globals),text=showdown.subParser("simplifiedAutoLinks")(text,options,globals),text=showdown.subParser("emoji")(text,options,globals),text=showdown.subParser("underline")(text,options,globals),text=showdown.subParser("italicsAndBold")(text,options,globals),text=showdown.subParser("strikethrough")(text,options,globals),text=showdown.subParser("ellipsis")(text,options,globals),text=showdown.subParser("hashHTMLSpans")(text,options,globals),text=showdown.subParser("encodeAmpsAndAngles")(text,options,globals),options.simpleLineBreaks?/\n\n¨K/.test(text)||(text=text.replace(/\n+/g,"<br />\n")):text=text.replace(/ +\n/g,"<br />\n"),text=globals.converter._dispatch("spanGamut.after",text,options,globals)})),showdown.subParser("strikethrough",(function(text,options,globals){"use strict";return options.strikethrough&&(text=(text=globals.converter._dispatch("strikethrough.before",text,options,globals)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(wm,txt){return function parseInside(txt){return options.simplifiedAutoLink&&(txt=showdown.subParser("simplifiedAutoLinks")(txt,options,globals)),"<del>"+txt+"</del>"}(txt)})),text=globals.converter._dispatch("strikethrough.after",text,options,globals)),text})),showdown.subParser("stripLinkDefinitions",(function(text,options,globals){"use strict";var replaceFunc=function(wholeMatch,linkId,url,width,height,blankLines,title){return linkId=linkId.toLowerCase(),url.match(/^data:.+?\/.+?;base64,/)?globals.gUrls[linkId]=url.replace(/\s/g,""):globals.gUrls[linkId]=showdown.subParser("encodeAmpsAndAngles")(url,options,globals),blankLines?blankLines+title:(title&&(globals.gTitles[linkId]=title.replace(/"|'/g,"&quot;")),options.parseImgDimensions&&width&&height&&(globals.gDimensions[linkId]={width,height}),"")};return text=(text=(text=(text+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,replaceFunc)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,replaceFunc)).replace(/¨0/,"")})),showdown.subParser("tables",(function(text,options,globals){"use strict";if(!options.tables)return text;function parseCells(cell,style){return"<td"+style+">"+showdown.subParser("spanGamut")(cell,options,globals)+"</td>\n"}function parseTable(rawTable){var i,tableLines=rawTable.split("\n");for(i=0;i<tableLines.length;++i)/^ {0,3}\|/.test(tableLines[i])&&(tableLines[i]=tableLines[i].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(tableLines[i])&&(tableLines[i]=tableLines[i].replace(/\|[ \t]*$/,"")),tableLines[i]=showdown.subParser("codeSpans")(tableLines[i],options,globals);var sLine,header,style,id,rawHeaders=tableLines[0].split("|").map((function(s){return s.trim()})),rawStyles=tableLines[1].split("|").map((function(s){return s.trim()})),rawCells=[],headers=[],styles=[],cells=[];for(tableLines.shift(),tableLines.shift(),i=0;i<tableLines.length;++i)""!==tableLines[i].trim()&&rawCells.push(tableLines[i].split("|").map((function(s){return s.trim()})));if(rawHeaders.length<rawStyles.length)return rawTable;for(i=0;i<rawStyles.length;++i)styles.push((sLine=rawStyles[i],/^:[ \t]*--*$/.test(sLine)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(sLine)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(sLine)?' style="text-align:center;"':""));for(i=0;i<rawHeaders.length;++i)showdown.helper.isUndefined(styles[i])&&(styles[i]=""),headers.push((header=rawHeaders[i],style=styles[i],id=void 0,id="",header=header.trim(),(options.tablesHeaderId||options.tableHeaderId)&&(id=' id="'+header.replace(/ /g,"_").toLowerCase()+'"'),"<th"+id+style+">"+(header=showdown.subParser("spanGamut")(header,options,globals))+"</th>\n"));for(i=0;i<rawCells.length;++i){for(var row=[],ii=0;ii<headers.length;++ii)showdown.helper.isUndefined(rawCells[i][ii]),row.push(parseCells(rawCells[i][ii],styles[ii]));cells.push(row)}return function buildTable(headers,cells){for(var tb="<table>\n<thead>\n<tr>\n",tblLgn=headers.length,i=0;i<tblLgn;++i)tb+=headers[i];for(tb+="</tr>\n</thead>\n<tbody>\n",i=0;i<cells.length;++i){tb+="<tr>\n";for(var ii=0;ii<tblLgn;++ii)tb+=cells[i][ii];tb+="</tr>\n"}return tb+"</tbody>\n</table>\n"}(headers,cells)}return text=(text=(text=(text=globals.converter._dispatch("tables.before",text,options,globals)).replace(/\\(\|)/g,showdown.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,parseTable)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,parseTable),text=globals.converter._dispatch("tables.after",text,options,globals)})),showdown.subParser("underline",(function(text,options,globals){"use strict";return options.underline?(text=globals.converter._dispatch("underline.before",text,options,globals),text=(text=options.literalMidWordUnderscores?(text=text.replace(/\b___(\S[\s\S]*?)___\b/g,(function(wm,txt){return"<u>"+txt+"</u>"}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(wm,txt){return"<u>"+txt+"</u>"})):(text=text.replace(/___(\S[\s\S]*?)___/g,(function(wm,m){return/\S$/.test(m)?"<u>"+m+"</u>":wm}))).replace(/__(\S[\s\S]*?)__/g,(function(wm,m){return/\S$/.test(m)?"<u>"+m+"</u>":wm}))).replace(/(_)/g,showdown.helper.escapeCharactersCallback),text=globals.converter._dispatch("underline.after",text,options,globals)):text})),showdown.subParser("unescapeSpecialChars",(function(text,options,globals){"use strict";return text=(text=globals.converter._dispatch("unescapeSpecialChars.before",text,options,globals)).replace(/¨E(\d+)E/g,(function(wholeMatch,m1){var charCodeToReplace=parseInt(m1);return String.fromCharCode(charCodeToReplace)})),text=globals.converter._dispatch("unescapeSpecialChars.after",text,options,globals)})),showdown.subParser("makeMarkdown.blockquote",(function(node,globals){"use strict";var txt="";if(node.hasChildNodes())for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i){var innerTxt=showdown.subParser("makeMarkdown.node")(children[i],globals);""!==innerTxt&&(txt+=innerTxt)}return txt="> "+(txt=txt.trim()).split("\n").join("\n> ")})),showdown.subParser("makeMarkdown.codeBlock",(function(node,globals){"use strict";var lang=node.getAttribute("language"),num=node.getAttribute("precodenum");return"```"+lang+"\n"+globals.preList[num]+"\n```"})),showdown.subParser("makeMarkdown.codeSpan",(function(node){"use strict";return"`"+node.innerHTML+"`"})),showdown.subParser("makeMarkdown.emphasis",(function(node,globals){"use strict";var txt="";if(node.hasChildNodes()){txt+="*";for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals);txt+="*"}return txt})),showdown.subParser("makeMarkdown.header",(function(node,globals,headerLevel){"use strict";var headerMark=new Array(headerLevel+1).join("#"),txt="";if(node.hasChildNodes()){txt=headerMark+" ";for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals)}return txt})),showdown.subParser("makeMarkdown.hr",(function(){"use strict";return"---"})),showdown.subParser("makeMarkdown.image",(function(node){"use strict";var txt="";return node.hasAttribute("src")&&(txt+="!["+node.getAttribute("alt")+"](",txt+="<"+node.getAttribute("src")+">",node.hasAttribute("width")&&node.hasAttribute("height")&&(txt+=" ="+node.getAttribute("width")+"x"+node.getAttribute("height")),node.hasAttribute("title")&&(txt+=' "'+node.getAttribute("title")+'"'),txt+=")"),txt})),showdown.subParser("makeMarkdown.links",(function(node,globals){"use strict";var txt="";if(node.hasChildNodes()&&node.hasAttribute("href")){var children=node.childNodes,childrenLength=children.length;txt="[";for(var i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals);txt+="](",txt+="<"+node.getAttribute("href")+">",node.hasAttribute("title")&&(txt+=' "'+node.getAttribute("title")+'"'),txt+=")"}return txt})),showdown.subParser("makeMarkdown.list",(function(node,globals,type){"use strict";var txt="";if(!node.hasChildNodes())return"";for(var listItems=node.childNodes,listItemsLenght=listItems.length,listNum=node.getAttribute("start")||1,i=0;i<listItemsLenght;++i)if(void 0!==listItems[i].tagName&&"li"===listItems[i].tagName.toLowerCase()){txt+=("ol"===type?listNum.toString()+". ":"- ")+showdown.subParser("makeMarkdown.listItem")(listItems[i],globals),++listNum}return(txt+="\n\x3c!-- --\x3e\n").trim()})),showdown.subParser("makeMarkdown.listItem",(function(node,globals){"use strict";for(var listItemTxt="",children=node.childNodes,childrenLenght=children.length,i=0;i<childrenLenght;++i)listItemTxt+=showdown.subParser("makeMarkdown.node")(children[i],globals);return/\n$/.test(listItemTxt)?listItemTxt=listItemTxt.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):listItemTxt+="\n",listItemTxt})),showdown.subParser("makeMarkdown.node",(function(node,globals,spansOnly){"use strict";spansOnly=spansOnly||!1;var txt="";if(3===node.nodeType)return showdown.subParser("makeMarkdown.txt")(node,globals);if(8===node.nodeType)return"\x3c!--"+node.data+"--\x3e\n\n";if(1!==node.nodeType)return"";switch(node.tagName.toLowerCase()){case"h1":spansOnly||(txt=showdown.subParser("makeMarkdown.header")(node,globals,1)+"\n\n");break;case"h2":spansOnly||(txt=showdown.subParser("makeMarkdown.header")(node,globals,2)+"\n\n");break;case"h3":spansOnly||(txt=showdown.subParser("makeMarkdown.header")(node,globals,3)+"\n\n");break;case"h4":spansOnly||(txt=showdown.subParser("makeMarkdown.header")(node,globals,4)+"\n\n");break;case"h5":spansOnly||(txt=showdown.subParser("makeMarkdown.header")(node,globals,5)+"\n\n");break;case"h6":spansOnly||(txt=showdown.subParser("makeMarkdown.header")(node,globals,6)+"\n\n");break;case"p":spansOnly||(txt=showdown.subParser("makeMarkdown.paragraph")(node,globals)+"\n\n");break;case"blockquote":spansOnly||(txt=showdown.subParser("makeMarkdown.blockquote")(node,globals)+"\n\n");break;case"hr":spansOnly||(txt=showdown.subParser("makeMarkdown.hr")(node,globals)+"\n\n");break;case"ol":spansOnly||(txt=showdown.subParser("makeMarkdown.list")(node,globals,"ol")+"\n\n");break;case"ul":spansOnly||(txt=showdown.subParser("makeMarkdown.list")(node,globals,"ul")+"\n\n");break;case"precode":spansOnly||(txt=showdown.subParser("makeMarkdown.codeBlock")(node,globals)+"\n\n");break;case"pre":spansOnly||(txt=showdown.subParser("makeMarkdown.pre")(node,globals)+"\n\n");break;case"table":spansOnly||(txt=showdown.subParser("makeMarkdown.table")(node,globals)+"\n\n");break;case"code":txt=showdown.subParser("makeMarkdown.codeSpan")(node,globals);break;case"em":case"i":txt=showdown.subParser("makeMarkdown.emphasis")(node,globals);break;case"strong":case"b":txt=showdown.subParser("makeMarkdown.strong")(node,globals);break;case"del":txt=showdown.subParser("makeMarkdown.strikethrough")(node,globals);break;case"a":txt=showdown.subParser("makeMarkdown.links")(node,globals);break;case"img":txt=showdown.subParser("makeMarkdown.image")(node,globals);break;default:txt=node.outerHTML+"\n\n"}return txt})),showdown.subParser("makeMarkdown.paragraph",(function(node,globals){"use strict";var txt="";if(node.hasChildNodes())for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals);return txt=txt.trim()})),showdown.subParser("makeMarkdown.pre",(function(node,globals){"use strict";var num=node.getAttribute("prenum");return"<pre>"+globals.preList[num]+"</pre>"})),showdown.subParser("makeMarkdown.strikethrough",(function(node,globals){"use strict";var txt="";if(node.hasChildNodes()){txt+="~~";for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals);txt+="~~"}return txt})),showdown.subParser("makeMarkdown.strong",(function(node,globals){"use strict";var txt="";if(node.hasChildNodes()){txt+="**";for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals);txt+="**"}return txt})),showdown.subParser("makeMarkdown.table",(function(node,globals){"use strict";var i,ii,txt="",tableArray=[[],[]],headings=node.querySelectorAll("thead>tr>th"),rows=node.querySelectorAll("tbody>tr");for(i=0;i<headings.length;++i){var headContent=showdown.subParser("makeMarkdown.tableCell")(headings[i],globals),allign="---";if(headings[i].hasAttribute("style"))switch(headings[i].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":allign=":---";break;case"text-align:right;":allign="---:";break;case"text-align:center;":allign=":---:"}tableArray[0][i]=headContent.trim(),tableArray[1][i]=allign}for(i=0;i<rows.length;++i){var r=tableArray.push([])-1,cols=rows[i].getElementsByTagName("td");for(ii=0;ii<headings.length;++ii){var cellContent=" ";void 0!==cols[ii]&&(cellContent=showdown.subParser("makeMarkdown.tableCell")(cols[ii],globals)),tableArray[r].push(cellContent)}}var cellSpacesCount=3;for(i=0;i<tableArray.length;++i)for(ii=0;ii<tableArray[i].length;++ii){var strLen=tableArray[i][ii].length;strLen>cellSpacesCount&&(cellSpacesCount=strLen)}for(i=0;i<tableArray.length;++i){for(ii=0;ii<tableArray[i].length;++ii)1===i?":"===tableArray[i][ii].slice(-1)?tableArray[i][ii]=showdown.helper.padEnd(tableArray[i][ii].slice(-1),cellSpacesCount-1,"-")+":":tableArray[i][ii]=showdown.helper.padEnd(tableArray[i][ii],cellSpacesCount,"-"):tableArray[i][ii]=showdown.helper.padEnd(tableArray[i][ii],cellSpacesCount);txt+="| "+tableArray[i].join(" | ")+" |\n"}return txt.trim()})),showdown.subParser("makeMarkdown.tableCell",(function(node,globals){"use strict";var txt="";if(!node.hasChildNodes())return"";for(var children=node.childNodes,childrenLength=children.length,i=0;i<childrenLength;++i)txt+=showdown.subParser("makeMarkdown.node")(children[i],globals,!0);return txt.trim()})),showdown.subParser("makeMarkdown.txt",(function(node){"use strict";var txt=node.nodeValue;return txt=(txt=txt.replace(/ +/g," ")).replace(/¨NBSP;/g," "),txt=(txt=(txt=(txt=(txt=(txt=(txt=(txt=(txt=showdown.helper.unescapeHTMLEntities(txt)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}));void 0===(__WEBPACK_AMD_DEFINE_RESULT__=function(){"use strict";return showdown}.call(exports,__webpack_require__,exports,module))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}).call(this)},"../../node_modules/.pnpm/traverse@0.6.7/node_modules/traverse/index.js":module=>{"use strict";function toS(obj){return Object.prototype.toString.call(obj)}var isArray=Array.isArray||function isArray(xs){return"[object Array]"===Object.prototype.toString.call(xs)};function forEach(xs,fn){if(xs.forEach)return xs.forEach(fn);for(var i=0;i<xs.length;i++)fn(xs[i],i,xs)}var objectKeys=Object.keys||function keys(obj){var res=[];for(var key in obj)res.push(key);return res},hasOwnProperty=Object.prototype.hasOwnProperty||function(obj,key){return key in obj};function copy(src){if("object"==typeof src&&null!==src){var dst;if(isArray(src))dst=[];else if(function isDate(obj){return"[object Date]"===toS(obj)}(src))dst=new Date(src.getTime?src.getTime():src);else if(function isRegExp(obj){return"[object RegExp]"===toS(obj)}(src))dst=new RegExp(src);else if(function isError(obj){return"[object Error]"===toS(obj)}(src))dst={message:src.message};else if(function isBoolean(obj){return"[object Boolean]"===toS(obj)}(src)||function isNumber(obj){return"[object Number]"===toS(obj)}(src)||function isString(obj){return"[object String]"===toS(obj)}(src))dst=Object(src);else if(Object.create&&Object.getPrototypeOf)dst=Object.create(Object.getPrototypeOf(src));else if(src.constructor===Object)dst={};else{var proto=src.constructor&&src.constructor.prototype||src.__proto__||{},T=function T(){};T.prototype=proto,dst=new T}return forEach(objectKeys(src),(function(key){dst[key]=src[key]})),dst}return src}function walk(root,cb,immutable){var path=[],parents=[],alive=!0;return function walker(node_){var node=immutable?copy(node_):node_,modifiers={},keepGoing=!0,state={node,node_,path:[].concat(path),parent:parents[parents.length-1],parents,key:path[path.length-1],isRoot:0===path.length,level:path.length,circular:null,update:function(x,stopHere){state.isRoot||(state.parent.node[state.key]=x),state.node=x,stopHere&&(keepGoing=!1)},delete:function(stopHere){delete state.parent.node[state.key],stopHere&&(keepGoing=!1)},remove:function(stopHere){isArray(state.parent.node)?state.parent.node.splice(state.key,1):delete state.parent.node[state.key],stopHere&&(keepGoing=!1)},keys:null,before:function(f){modifiers.before=f},after:function(f){modifiers.after=f},pre:function(f){modifiers.pre=f},post:function(f){modifiers.post=f},stop:function(){alive=!1},block:function(){keepGoing=!1}};if(!alive)return state;function updateState(){if("object"==typeof state.node&&null!==state.node){state.keys&&state.node_===state.node||(state.keys=objectKeys(state.node)),state.isLeaf=0===state.keys.length;for(var i=0;i<parents.length;i++)if(parents[i].node_===node_){state.circular=parents[i];break}}else state.isLeaf=!0,state.keys=null;state.notLeaf=!state.isLeaf,state.notRoot=!state.isRoot}updateState();var ret=cb.call(state,state.node);return void 0!==ret&&state.update&&state.update(ret),modifiers.before&&modifiers.before.call(state,state.node),keepGoing?("object"!=typeof state.node||null===state.node||state.circular||(parents.push(state),updateState(),forEach(state.keys,(function(key,i){path.push(key),modifiers.pre&&modifiers.pre.call(state,state.node[key],key);var child=walker(state.node[key]);immutable&&hasOwnProperty.call(state.node,key)&&(state.node[key]=child.node),child.isLast=i===state.keys.length-1,child.isFirst=0===i,modifiers.post&&modifiers.post.call(state,child),path.pop()})),parents.pop()),modifiers.after&&modifiers.after.call(state,state.node),state):state}(root).node}function Traverse(obj){this.value=obj}function traverse(obj){return new Traverse(obj)}Traverse.prototype.get=function(ps){for(var node=this.value,i=0;i<ps.length;i++){var key=ps[i];if(!node||!hasOwnProperty.call(node,key))return;node=node[key]}return node},Traverse.prototype.has=function(ps){for(var node=this.value,i=0;i<ps.length;i++){var key=ps[i];if(!node||!hasOwnProperty.call(node,key))return!1;node=node[key]}return!0},Traverse.prototype.set=function(ps,value){for(var node=this.value,i=0;i<ps.length-1;i++){var key=ps[i];hasOwnProperty.call(node,key)||(node[key]={}),node=node[key]}return node[ps[i]]=value,value},Traverse.prototype.map=function(cb){return walk(this.value,cb,!0)},Traverse.prototype.forEach=function(cb){return this.value=walk(this.value,cb,!1),this.value},Traverse.prototype.reduce=function(cb,init){var skip=1===arguments.length,acc=skip?this.value:init;return this.forEach((function(x){this.isRoot&&skip||(acc=cb.call(this,acc,x))})),acc},Traverse.prototype.paths=function(){var acc=[];return this.forEach((function(){acc.push(this.path)})),acc},Traverse.prototype.nodes=function(){var acc=[];return this.forEach((function(){acc.push(this.node)})),acc},Traverse.prototype.clone=function(){var parents=[],nodes=[];return function clone(src){for(var i=0;i<parents.length;i++)if(parents[i]===src)return nodes[i];if("object"==typeof src&&null!==src){var dst=copy(src);return parents.push(src),nodes.push(dst),forEach(objectKeys(src),(function(key){dst[key]=clone(src[key])})),parents.pop(),nodes.pop(),dst}return src}(this.value)},forEach(objectKeys(Traverse.prototype),(function(key){traverse[key]=function(obj){var args=[].slice.call(arguments,1),t=new Traverse(obj);return t[key].apply(t,args)}})),module.exports=traverse}}]);