mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
81f62198c3
Moves the widgets block editor from Gutenberg into WordPress Core. - Adds @wordpress/edit-widgets, @wordpress/customize-widgets and @wordpress/widgets. - Modifies wp-admin/widgets.php to branch between the old editor and new editor depending on wp_use_widgets_block_editor(). - Modifies WP_Customize_Widgets to branch between the old editor control and new editor control depending on wp_use_widgets_block_editor(). Fixes #51506. Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp. Built from https://develop.svn.wordpress.org/trunk@50996 git-svn-id: http://core.svn.wordpress.org/trunk@50605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 lines
412 KiB
JavaScript
12 lines
412 KiB
JavaScript
/*! This file is auto-generated */
|
||
this.wp=this.wp||{},this.wp.blockEditor=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./node_modules/@wordpress/block-editor/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/assertThisInitialized.js":function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/esm/extends.js":function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return o}))},"./node_modules/@babel/runtime/helpers/extends.js":function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/inheritsLoose.js":function(e,t,n){var o=n("./node_modules/@babel/runtime/helpers/setPrototypeOf.js");e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":function(e,t){e.exports=function(e,t){if(null==e)return{};var n,o,r={},c=Object.keys(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||(r[n]=e[n]);return r},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,o)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@wordpress/block-editor/build-module/index.js":function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalGetBorderClassesAndStyles",(function(){return Zc})),n.d(t,"__experimentalUseBorderProps",(function(){return Jc})),n.d(t,"__experimentalGetColorClassesAndStyles",(function(){return tl})),n.d(t,"__experimentalUseColorProps",(function(){return nl})),n.d(t,"__experimentalUseCustomSides",(function(){return Tc})),n.d(t,"getColorClassName",(function(){return Lo})),n.d(t,"getColorObjectByAttributeValues",(function(){return No})),n.d(t,"getColorObjectByColorValue",(function(){return Po})),n.d(t,"createCustomColorsHOC",(function(){return cl})),n.d(t,"withColors",(function(){return ll})),n.d(t,"__experimentalUseColors",(function(){return gl})),n.d(t,"__experimentalGetGradientClass",(function(){return Ro})),n.d(t,"getGradientValueBySlug",(function(){return Mo})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Do})),n.d(t,"getGradientSlugByValue",(function(){return Fo})),n.d(t,"__experimentalUseGradient",(function(){return Vo})),n.d(t,"getFontSize",(function(){return Mr})),n.d(t,"getFontSizeClass",(function(){return Fr})),n.d(t,"getFontSizeObjectByValue",(function(){return Dr})),n.d(t,"FontSizePicker",(function(){return Vr})),n.d(t,"withFontSizes",(function(){return Ol})),n.d(t,"AlignmentControl",(function(){return Cl})),n.d(t,"AlignmentToolbar",(function(){return Sl})),n.d(t,"Autocomplete",(function(){return Ul})),n.d(t,"BlockAlignmentControl",(function(){return io})),n.d(t,"BlockAlignmentToolbar",(function(){return so})),n.d(t,"__experimentalBlockFullHeightAligmentControl",(function(){return Kl})),n.d(t,"__experimentalBlockAlignmentMatrixControl",(function(){return $l})),n.d(t,"BlockBreadcrumb",(function(){return Xl})),n.d(t,"BlockContextProvider",(function(){return Zl})),n.d(t,"BlockControls",(function(){return Gn})),n.d(t,"BlockFormatControls",(function(){return Hn})),n.d(t,"BlockColorsStyleSelector",(function(){return oi})),n.d(t,"BlockEdit",(function(){return li})),n.d(t,"useBlockEditContext",(function(){return O})),n.d(t,"BlockIcon",(function(){return Vl})),n.d(t,"BlockNavigationDropdown",(function(){return Xu})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Fu})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return Od})),n.d(t,"__experimentalBlockNavigationTree",(function(){return $u})),n.d(t,"__experimentalBlockVariationPicker",(function(){return vd})),n.d(t,"__experimentalBlockPatternSetup",(function(){return Td})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return Pd})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return zd})),n.d(t,"BlockVerticalAlignmentControl",(function(){return Vd})),n.d(t,"__experimentalBorderStyleControl",(function(){return nr})),n.d(t,"ButtonBlockerAppender",(function(){return ca})),n.d(t,"ColorPalette",(function(){return Gd})),n.d(t,"ColorPaletteControl",(function(){return Ud})),n.d(t,"ContrastChecker",(function(){return hr})),n.d(t,"__experimentalDuotoneControl",(function(){return zc})),n.d(t,"__experimentalGradientPicker",(function(){return $d})),n.d(t,"__experimentalGradientPickerControl",(function(){return qd})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Yd})),n.d(t,"__experimentalFontAppearanceControl",(function(){return dc})),n.d(t,"__experimentalFontFamilyControl",(function(){return gc})),n.d(t,"__experimentalColorGradientControl",(function(){return $o})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return fr})),n.d(t,"__experimentalImageSizeControl",(function(){return Qd})),n.d(t,"InnerBlocks",(function(){return sb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return ib})),n.d(t,"InspectorAdvancedControls",(function(){return Oo})),n.d(t,"InspectorControls",(function(){return _o})),n.d(t,"JustifyToolbar",(function(){return gb})),n.d(t,"JustifyContentControl",(function(){return fb})),n.d(t,"__experimentalLinkControl",(function(){return Db})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Nb})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Cb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Eb})),n.d(t,"LineHeightControl",(function(){return lc})),n.d(t,"MediaReplaceFlow",(function(){return Gb})),n.d(t,"MediaPlaceholder",(function(){return Yb})),n.d(t,"MediaUpload",(function(){return zb})),n.d(t,"MediaUploadCheck",(function(){return Hb})),n.d(t,"PanelColorSettings",(function(){return al})),n.d(t,"PlainText",(function(){return Zb})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return em})),n.d(t,"RichText",(function(){return hd})),n.d(t,"RichTextShortcut",(function(){return tm})),n.d(t,"RichTextToolbarButton",(function(){return nm})),n.d(t,"__unstableRichTextInputEvent",(function(){return om})),n.d(t,"ToolSelector",(function(){return cm})),n.d(t,"__experimentalUnitControl",(function(){return lm})),n.d(t,"URLInput",(function(){return kb})),n.d(t,"URLInputButton",(function(){return um})),n.d(t,"URLPopover",(function(){return $b})),n.d(t,"__experimentalImageURLInputUI",(function(){return pm})),n.d(t,"withColorContext",(function(){return Hd})),n.d(t,"__unstableBlockSettingsMenuFirstItem",(function(){return nu})),n.d(t,"__unstableInserterMenuExtension",(function(){return Ks})),n.d(t,"__experimentalPreviewOptions",(function(){return gm})),n.d(t,"__experimentalUseResizeCanvas",(function(){return ym})),n.d(t,"BlockInspector",(function(){return xm})),n.d(t,"BlockList",(function(){return yu})),n.d(t,"useBlockProps",(function(){return wu})),n.d(t,"__experimentalLayoutStyle",(function(){return eo})),n.d(t,"BlockMover",(function(){return Ca})),n.d(t,"BlockPreview",(function(){return hs})),n.d(t,"BlockSelectionClearer",(function(){return vu})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return ju})),n.d(t,"BlockSettingsMenu",(function(){return du})),n.d(t,"BlockSettingsMenuControls",(function(){return iu})),n.d(t,"BlockTitle",(function(){return Yl})),n.d(t,"BlockToolbar",(function(){return bu})),n.d(t,"BlockTools",(function(){return Tm})),n.d(t,"CopyHandler",(function(){return Xa})),n.d(t,"__unstableUseClipboardHandler",(function(){return Ya})),n.d(t,"DefaultBlockAppender",(function(){return ra})),n.d(t,"__unstableEditorStyles",(function(){return Jm})),n.d(t,"Inserter",(function(){return oa})),n.d(t,"__experimentalLibrary",(function(){return ep})),n.d(t,"__experimentalSearchForm",(function(){return us})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return np})),n.d(t,"MultiSelectScrollIntoView",(function(){return op})),n.d(t,"NavigableToolbar",(function(){return Ea})),n.d(t,"ObserveTyping",(function(){return ip})),n.d(t,"__unstableUseTypingObserver",(function(){return lp})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return cp})),n.d(t,"PreserveScrollInReorder",(function(){return sp})),n.d(t,"SkipToSelectedBlock",(function(){return Em})),n.d(t,"Typewriter",(function(){return bp})),n.d(t,"__unstableUseTypewriter",(function(){return dp})),n.d(t,"Warning",(function(){return Ii})),n.d(t,"WritingFlow",(function(){return kp})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return yp})),n.d(t,"useBlockDisplayInformation",(function(){return ql})),n.d(t,"__unstableIframe",(function(){return Sp})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return Bp})),n.d(t,"BlockEditorProvider",(function(){return ms})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return _m})),n.d(t,"useSetting",(function(){return Io})),n.d(t,"transformStyles",(function(){return Qm})),n.d(t,"validateThemeColors",(function(){return Ip})),n.d(t,"validateThemeGradients",(function(){return xp})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Nd})),n.d(t,"storeConfig",(function(){return An})),n.d(t,"store",(function(){return Rn})),n.d(t,"SETTINGS_DEFAULTS",(function(){return k}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return D})),n.d(o,"isBlockValid",(function(){return F})),n.d(o,"getBlockAttributes",(function(){return V})),n.d(o,"getBlock",(function(){return z})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return H})),n.d(o,"getBlocks",(function(){return G})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return U})),n.d(o,"__unstableGetBlockTree",(function(){return W})),n.d(o,"__unstableGetClientIdWithClientIdsTree",(function(){return K})),n.d(o,"__unstableGetClientIdsTree",(function(){return $})),n.d(o,"getClientIdsOfDescendants",(function(){return q})),n.d(o,"getClientIdsWithDescendants",(function(){return Y})),n.d(o,"getGlobalBlockCount",(function(){return X})),n.d(o,"getBlocksByClientId",(function(){return Q})),n.d(o,"getBlockCount",(function(){return Z})),n.d(o,"getSelectionStart",(function(){return J})),n.d(o,"getSelectionEnd",(function(){return ee})),n.d(o,"getBlockSelectionStart",(function(){return te})),n.d(o,"getBlockSelectionEnd",(function(){return ne})),n.d(o,"getSelectedBlockCount",(function(){return oe})),n.d(o,"hasSelectedBlock",(function(){return re})),n.d(o,"getSelectedBlockClientId",(function(){return ce})),n.d(o,"getSelectedBlock",(function(){return le})),n.d(o,"getBlockRootClientId",(function(){return ie})),n.d(o,"getBlockParents",(function(){return se})),n.d(o,"getBlockParentsByBlockName",(function(){return ae})),n.d(o,"getBlockHierarchyRootClientId",(function(){return ue})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return de})),n.d(o,"getAdjacentBlockClientId",(function(){return be})),n.d(o,"getPreviousBlockClientId",(function(){return me})),n.d(o,"getNextBlockClientId",(function(){return pe})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return fe})),n.d(o,"getSelectedBlockClientIds",(function(){return ge})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return he})),n.d(o,"getMultiSelectedBlocks",(function(){return Oe})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return je})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return ve})),n.d(o,"isFirstMultiSelectedBlock",(function(){return ke})),n.d(o,"isBlockMultiSelected",(function(){return _e})),n.d(o,"isAncestorMultiSelected",(function(){return ye})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return Ee})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Ce})),n.d(o,"getBlockOrder",(function(){return Se})),n.d(o,"getBlockIndex",(function(){return we})),n.d(o,"isBlockSelected",(function(){return Be})),n.d(o,"hasSelectedInnerBlock",(function(){return Ie})),n.d(o,"isBlockWithinSelection",(function(){return xe})),n.d(o,"hasMultiSelection",(function(){return Te})),n.d(o,"isMultiSelecting",(function(){return Ne})),n.d(o,"isSelectionEnabled",(function(){return Pe})),n.d(o,"getBlockMode",(function(){return Le})),n.d(o,"isTyping",(function(){return Ae})),n.d(o,"isDraggingBlocks",(function(){return Re})),n.d(o,"getDraggedBlockClientIds",(function(){return Me})),n.d(o,"isBlockBeingDragged",(function(){return De})),n.d(o,"isAncestorBeingDragged",(function(){return Fe})),n.d(o,"isCaretWithinFormattedText",(function(){return Ve})),n.d(o,"getBlockInsertionPoint",(function(){return ze})),n.d(o,"isBlockInsertionPointVisible",(function(){return He})),n.d(o,"isValidTemplate",(function(){return Ge})),n.d(o,"getTemplate",(function(){return Ue})),n.d(o,"getTemplateLock",(function(){return We})),n.d(o,"canInsertBlockType",(function(){return qe})),n.d(o,"canInsertBlocks",(function(){return Ye})),n.d(o,"getInserterItems",(function(){return tt})),n.d(o,"getBlockTransformItems",(function(){return nt})),n.d(o,"hasInserterItems",(function(){return ot})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return rt})),n.d(o,"__experimentalGetParsedPattern",(function(){return ct})),n.d(o,"__experimentalGetAllowedPatterns",(function(){return it})),n.d(o,"__experimentalGetPatternsByBlockTypes",(function(){return st})),n.d(o,"__experimentalGetPatternTransformItems",(function(){return at})),n.d(o,"getBlockListSettings",(function(){return ut})),n.d(o,"getSettings",(function(){return dt})),n.d(o,"isLastBlockChangePersistent",(function(){return bt})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return mt})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return pt})),n.d(o,"__experimentalGetReusableBlockTitle",(function(){return ft})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return gt})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ht})),n.d(o,"isNavigationMode",(function(){return jt})),n.d(o,"hasBlockMovingClientId",(function(){return vt})),n.d(o,"didAutomaticChange",(function(){return kt})),n.d(o,"isBlockHighlighted",(function(){return _t})),n.d(o,"areInnerBlocksControlled",(function(){return yt})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Et})),n.d(o,"wasBlockJustInserted",(function(){return Ct}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return Nt})),n.d(r,"validateBlocksToTemplate",(function(){return Pt})),n.d(r,"resetSelection",(function(){return Lt})),n.d(r,"receiveBlocks",(function(){return At})),n.d(r,"updateBlockAttributes",(function(){return Rt})),n.d(r,"updateBlock",(function(){return Mt})),n.d(r,"selectBlock",(function(){return Dt})),n.d(r,"selectPreviousBlock",(function(){return Ft})),n.d(r,"selectNextBlock",(function(){return Vt})),n.d(r,"startMultiSelect",(function(){return zt})),n.d(r,"stopMultiSelect",(function(){return Ht})),n.d(r,"multiSelect",(function(){return Gt})),n.d(r,"clearSelectedBlock",(function(){return Ut})),n.d(r,"toggleSelection",(function(){return Wt})),n.d(r,"replaceBlocks",(function(){return $t})),n.d(r,"replaceBlock",(function(){return qt})),n.d(r,"moveBlocksDown",(function(){return Xt})),n.d(r,"moveBlocksUp",(function(){return Qt})),n.d(r,"moveBlocksToPosition",(function(){return Zt})),n.d(r,"moveBlockToPosition",(function(){return Jt})),n.d(r,"insertBlock",(function(){return en})),n.d(r,"insertBlocks",(function(){return tn})),n.d(r,"showInsertionPoint",(function(){return nn})),n.d(r,"hideInsertionPoint",(function(){return on})),n.d(r,"setTemplateValidity",(function(){return rn})),n.d(r,"synchronizeTemplate",(function(){return cn})),n.d(r,"mergeBlocks",(function(){return ln})),n.d(r,"removeBlocks",(function(){return sn})),n.d(r,"removeBlock",(function(){return an})),n.d(r,"replaceInnerBlocks",(function(){return un})),n.d(r,"toggleBlockMode",(function(){return dn})),n.d(r,"startTyping",(function(){return bn})),n.d(r,"stopTyping",(function(){return mn})),n.d(r,"startDraggingBlocks",(function(){return pn})),n.d(r,"stopDraggingBlocks",(function(){return fn})),n.d(r,"enterFormattedText",(function(){return gn})),n.d(r,"exitFormattedText",(function(){return hn})),n.d(r,"selectionChange",(function(){return On})),n.d(r,"insertDefaultBlock",(function(){return jn})),n.d(r,"updateBlockListSettings",(function(){return vn})),n.d(r,"updateSettings",(function(){return kn})),n.d(r,"__unstableSaveReusableBlock",(function(){return _n})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return yn})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return En})),n.d(r,"__unstableMarkAutomaticChange",(function(){return Cn})),n.d(r,"__unstableMarkAutomaticChangeFinal",(function(){return Sn})),n.d(r,"setNavigationMode",(function(){return wn})),n.d(r,"setBlockMovingClientId",(function(){return Bn})),n.d(r,"duplicateBlocks",(function(){return In})),n.d(r,"insertBeforeBlock",(function(){return xn})),n.d(r,"insertAfterBlock",(function(){return Tn})),n.d(r,"toggleBlockHighlight",(function(){return Nn})),n.d(r,"flashBlock",(function(){return Pn})),n.d(r,"setHasControlledInnerBlocks",(function(){return Ln}));var c=n("@wordpress/rich-text"),l=n("./node_modules/@babel/runtime/helpers/esm/extends.js"),i=n("@wordpress/element"),s=n("./node_modules/classnames/index.js"),a=n.n(s),u=n("lodash"),d=n("@wordpress/compose"),b=n("@wordpress/hooks"),m=n("@wordpress/blocks"),p=n("@wordpress/components"),f=n("@wordpress/data");const g=Object(i.createContext)({name:"",isSelected:!1,clientId:null}),{Provider:h}=g;function O(){return Object(i.useContext)(g)}var j=n("@wordpress/i18n");const v={insertUsage:{}},k={alignWide:!1,supportsLayout:!0,colors:[{name:Object(j.__)("Black"),slug:"black",color:"#000000"},{name:Object(j.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(j.__)("White"),slug:"white",color:"#ffffff"},{name:Object(j.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(j.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(j.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(j.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(j.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(j.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(j.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(j.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(j.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(j._x)("Small","font size name"),size:13,slug:"small"},{name:Object(j._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(j._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(j._x)("Large","font size name"),size:36,slug:"large"},{name:Object(j._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:Object(j.__)("Thumbnail")},{slug:"medium",name:Object(j.__)("Medium")},{slug:"large",name:Object(j.__)("Large")},{slug:"full",name:Object(j.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(j.__)("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:Object(j.__)("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:Object(j.__)("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:Object(j.__)("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:Object(j.__)("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:Object(j.__)("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:Object(j.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(j.__)("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:Object(j.__)("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:Object(j.__)("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:Object(j.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(j.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function _(e,t,n){return[...e.slice(0,n),...Object(u.castArray)(t),...e.slice(n)]}function y(e,t,n,o=1){const r=[...e];return r.splice(t,o),_(r,e.slice(t,t+o),n)}function E(e,t=""){const n={[t]:[]};return e.forEach(e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,E(r,o))}),n}function C(e,t=""){return e.reduce((e,n)=>Object.assign(e,{[n.clientId]:t},C(n.innerBlocks,n.clientId)),{})}function S(e,t=u.identity){const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function w(e){return S(e,e=>Object(u.omit)(e,"attributes"))}function B(e){return S(e,e=>e.attributes)}function I(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(u.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,o=t.attributes,Object(u.isEqual)(Object(u.keys)(n),Object(u.keys)(o)));var n,o}const x=e=>e.reduce((e,t)=>(e[t]={},e),{});const T=Object(u.flow)(f.combineReducers,e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=Object(u.mapValues)(t.attributes,(n,r)=>{const{name:c}=t.byClientId[r];return"core/block"===c&&n.ref===e?{...n,ref:o}:n})}return e(t,n)},e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;o.cache=t.cache?t.cache:{};const r=e=>e.reduce((e,n)=>{let o=n;do{e.push(o),o=t.parents[o]}while(o&&!t.controlledInnerBlocks[o]);return e},[]);switch(n.type){case"RESET_BLOCKS":o.cache=Object(u.mapValues)(S(n.blocks),()=>({}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=Object(u.keys)(S(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&e.push(n.rootClientId),o.cache={...o.cache,...x(r(e))};break}case"UPDATE_BLOCK":o.cache={...o.cache,...x(r([n.clientId]))};break;case"UPDATE_BLOCK_ATTRIBUTES":o.cache={...o.cache,...x(r(n.clientIds))};break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=x(r(n.replacedClientIds));o.cache={...Object(u.omit)(o.cache,n.replacedClientIds),...Object(u.omit)(e,n.replacedClientIds),...x(Object(u.keys)(S(n.blocks)))};break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":o.cache={...Object(u.omit)(o.cache,n.removedClientIds),...x(Object(u.difference)(r(n.clientIds),n.clientIds))};break;case"MOVE_BLOCKS_TO_POSITION":{const e=[...n.clientIds];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),o.cache={...o.cache,...x(r(e))};break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[];n.rootClientId&&e.push(n.rootClientId),o.cache={...o.cache,...x(r(e))};break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object(u.keys)(Object(u.omitBy)(o.attributes,(e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId));o.cache={...o.cache,...x(r(e))}}}return o},e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)},e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let c=r;return n.blocks.length&&(c=e(c,{...n,type:"INSERT_BLOCKS",index:0}),c.order={...c.order,...Object(u.reduce)(o,(e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e),{})}),c},e=>(t,n)=>{if(t&&"RESET_BLOCKS"===n.type){const e=function e(t,n="",o={}){return Object(u.reduce)(t[n],(n,r)=>o[r]?n:[...n,r,...e(t,r)],[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(u.pickBy)(t.controlledInnerBlocks));return{...t,byClientId:{...Object(u.omit)(t.byClientId,e),...w(n.blocks)},attributes:{...Object(u.omit)(t.attributes,e),...B(n.blocks)},order:{...Object(u.omit)(t.order,e),...Object(u.omit)(E(n.blocks),o)},parents:{...Object(u.omit)(t.parents,e),...C(n.blocks)},cache:{...Object(u.omit)(t.cache,e),...Object(u.omit)(Object(u.mapValues)(S(n.blocks),()=>({})),o)}}}return e(t,n)},(function(e){let t,n=!1;return(o,r)=>{let c=e(o,r);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===c&&!l){var i;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(i=null==o?void 0:o.isPersistentChange)||void 0===i||i;return o.isPersistentChange===e?o:{...c,isPersistentChange:e}}return c={...c,isPersistentChange:l?!n:!I(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,c}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}))({byClientId(e={},t){switch(t.type){case"RESET_BLOCKS":return w(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=Object(u.omit)(t.updates,"attributes");return Object(u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...Object(u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},attributes(e={},t){switch(t.type){case"RESET_BLOCKS":return B(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...B(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(t=>!e[t]))return e;const n=t.clientIds.reduce((n,o)=>({...n,[o]:Object(u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,(t,n,r)=>{var c,l;return n!==t[r]&&((t=(c=e[o])===(l=t)?{...c}:l)[r]=n),t},e[o])}),{});return t.clientIds.every(t=>n[t]===e[t])?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...Object(u.omit)(e,t.replacedClientIds),...B(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},order(e={},t){switch(t.type){case"RESET_BLOCKS":return E(t.blocks);case"RECEIVE_BLOCKS":return{...e,...Object(u.omit)(E(t.blocks),"")};case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=E(t.blocks,n),{index:c=o.length}=t;return{...e,...r,[n]:_(o,r[n],c)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:c=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:y(e[o],t,c,r.length)}}return{...e,[n]:Object(u.without)(e[n],...r),[o]:_(e[o],r,c)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=Object(u.first)(n),c=e[o];if(!c.length||r===Object(u.first)(c))return e;const l=c.indexOf(r);return{...e,[o]:y(c,l,l-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=Object(u.first)(n),c=Object(u.last)(n),l=e[o];if(!l.length||c===Object(u.last)(l))return e;const i=l.indexOf(r);return{...e,[o]:y(l,i,i+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=E(t.blocks);return Object(u.flow)([e=>Object(u.omit)(e,t.replacedClientIds),e=>({...e,...Object(u.omit)(o,"")}),e=>Object(u.mapValues)(e,e=>Object(u.reduce)(e,(e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e),[]))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.flow)([e=>Object(u.omit)(e,t.removedClientIds),e=>Object(u.mapValues)(e,e=>Object(u.without)(e,...t.removedClientIds))])(e)}return e},parents(e={},t){switch(t.type){case"RESET_BLOCKS":return C(t.blocks);case"RECEIVE_BLOCKS":return{...e,...C(t.blocks)};case"INSERT_BLOCKS":return{...e,...C(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce((e,n)=>(e[n]=t.toRootClientId||"",e),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...Object(u.omit)(e,t.replacedClientIds),...C(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function N(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.indexToSelect||t.blocks.length-1,o=t.blocks[n];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}var P=Object(f.combineReducers)({blocks:T,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(e=!1,t){switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(e={},t){var n,o;switch(t.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:c}=t;return{selectionStart:r,selectionEnd:c};case"MULTI_SELECT":const{start:l,end:i}=t;return{selectionStart:{clientId:l},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=null==e||null===(n=e.selectionStart)||void 0===n?void 0:n.clientId,a=null==e||null===(o=e.selectionEnd)||void 0===o?void 0:o.clientId;if(!s&&!a)return e;if(!t.blocks.some(e=>e.clientId===s))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(e=>e.clientId===a))return{...e,selectionEnd:e.selectionStart}}return{selectionStart:N(e.selectionStart,t),selectionEnd:N(e.selectionEnd,t)}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?Object(u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?Object(u.omit)(e,n):e}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(e=k,t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(e=v,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((e,n)=>{const{attributes:o,name:r}=n,c=Object(f.select)(m.store).getActiveBlockVariation(r,o);let l=null!=c&&c.name?`${r}/${c.name}`:r;const i={name:l};return"core/block"===r&&(i.ref=o.ref,l+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:i}}}},e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes}),{})}return null},isNavigationMode:function(e=!1,t){return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){var n;switch(t.type){case"INSERT_BLOCKS":if(!t.blocks.length)return e;return{clientId:t.blocks[0].clientId,source:null===(n=t.meta)||void 0===n?void 0:n.source};case"RESET_BLOCKS":return{}}return e}}),L=n("./node_modules/rememo/es/rememo.js"),A=n("@wordpress/block-serialization-default-parser");const R=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(i.createElement)(p.G,null,Object(i.createElement)(p.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),M=[];function D(e,t){const n=e.blocks.byClientId[t];if("web"!==i.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){const n=e.blocks.attributes[t],{service:o}=n;return o?"core/social-link-"+o:"core/social-link"}return n?n.name:null}function F(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function V(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}const z=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t),innerBlocks:yt(e,t)?M:G(e,t)}:null},(e,t)=>[e.blocks.cache[t]]),H=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t)}:null},(e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]),G=Object(L.a)((e,t)=>Object(u.map)(Se(e,t),t=>z(e,t)),(e,t)=>Object(u.map)(e.blocks.order[t||""],t=>e.blocks.cache[t])),U=Object(L.a)((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:V(e,t),innerBlocks:W(e,t)}:null},e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]),W=Object(L.a)((e,t="")=>Object(u.map)(Se(e,t),t=>U(e,t)),e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]),K=Object(L.a)((e,t)=>({clientId:t,innerBlocks:$(e,t)}),e=>[e.blocks.order]),$=Object(L.a)((e,t="")=>Object(u.map)(Se(e,t),t=>K(e,t)),e=>[e.blocks.order]),q=(e,t)=>Object(u.flatMap)(t,t=>{const n=Se(e,t);return[...n,...q(e,n)]}),Y=Object(L.a)(e=>{const t=Se(e);return[...t,...q(e,t)]},e=>[e.blocks.order]),X=Object(L.a)((e,t)=>{const n=Y(e);return t?Object(u.reduce)(n,(n,o)=>e.blocks.byClientId[o].name===t?n+1:n,0):n.length},e=>[e.blocks.order,e.blocks.byClientId]),Q=Object(L.a)((e,t)=>Object(u.map)(Object(u.castArray)(t),t=>z(e,t)),e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function Z(e,t){return Se(e,t).length}function J(e){return e.selection.selectionStart}function ee(e){return e.selection.selectionEnd}function te(e){return e.selection.selectionStart.clientId}function ne(e){return e.selection.selectionEnd.clientId}function oe(e){const t=he(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function re(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function le(e){const t=ce(e);return t?z(e,t):null}function ie(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const se=Object(L.a)((e,t,n=!1)=>{const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()},e=>[e.blocks.parents]),ae=Object(L.a)((e,t,n,o=!1)=>{const r=se(e,t,o);return Object(u.map)(Object(u.filter)(Object(u.map)(r,t=>({id:t,name:D(e,t)})),({name:e})=>Array.isArray(n)?n.includes(e):e===n),({id:e})=>e)},e=>[e.blocks.parents]);function ue(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function de(e,t){const n=ce(e),o=[...se(e,t),t],r=[...se(e,n),n];let c;const l=Math.min(o.length,r.length);for(let e=0;e<l&&o[e]===r[e];e++)c=o[e];return c}function be(e,t,n=1){if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?je(e):ve(e)),!t)return null;const o=ie(e,t);if(null===o)return null;const{order:r}=e.blocks,c=r[o],l=c.indexOf(t)+1*n;return l<0||l===c.length?null:c[l]}function me(e,t){return be(e,t,-1)}function pe(e,t){return be(e,t,1)}function fe(e){return e.initialPosition}const ge=Object(L.a)(e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return M;if(t.clientId===n.clientId)return[t.clientId];const o=ie(e,t.clientId);if(null===o)return M;const r=Se(e,o),c=r.indexOf(t.clientId),l=r.indexOf(n.clientId);return c>l?r.slice(l,c+1):r.slice(c,l+1)},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?M:ge(e)}const Oe=Object(L.a)(e=>{const t=he(e);return t.length?t.map(t=>z(e,t)):M},e=>[...ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function je(e){return Object(u.first)(he(e))||null}function ve(e){return Object(u.last)(he(e))||null}function ke(e,t){return je(e)===t}function _e(e,t){return-1!==he(e).indexOf(t)}const ye=Object(L.a)((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ie(e,n),o=_e(e,n);return o},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function Ee(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Ce(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Se(e,t){return e.blocks.order[t||""]||M}function we(e,t,n){return Se(e,n).indexOf(t)}function Be(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ie(e,t,n=!1){return Object(u.some)(Se(e,t),t=>Be(e,t)||_e(e,t)||n&&Ie(e,t,n))}function xe(e,t){if(!t)return!1;const n=he(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ne(e){return e.isMultiSelecting}function Pe(e){return e.isSelectionEnabled}function Le(e,t){return e.blocksMode[t]||"visual"}function Ae(e){return e.isTyping}function Re(e){return!!e.draggedBlocks.length}function Me(e){return e.draggedBlocks}function De(e,t){return e.draggedBlocks.includes(t)}function Fe(e,t){if(!Re(e))return!1;const n=se(e,t);return Object(u.some)(n,t=>De(e,t))}function Ve(e){return e.isCaretWithinFormattedText}function ze(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:c}=r;return c?(t=ie(e,c)||void 0,n=we(e,r.clientId,t)+1):n=Se(e).length,{rootClientId:t,index:n}}function He(e){return null!==e.insertionPoint}function Ge(e){return e.template.isValid}function Ue(e){return e.settings.template}function We(e,t){if(!t)return e.settings.templateLock;const n=ut(e,t);return n?n.templateLock:null}const Ke=(e,t,n=null)=>Object(u.isBoolean)(e)?e:Object(u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,$e=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=Object(m.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=dt(e);if(!Ke(r,t,!0))return!1;if(!!We(e,n))return!1;const c=ut(e,n);if(n&&void 0===c)return!1;const l=null==c?void 0:c.allowedBlocks,i=Ke(l,t),s=o.parent,a=D(e,n),u=Ke(s,a);return null!==i&&null!==u?i||u:null!==i?i:null===u||u},qe=Object(L.a)($e,(e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]);function Ye(e,t,n=null){return t.every(t=>qe(e,D(e,t),n))}function Xe(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const Qe=(e,t,n)=>!!Object(m.hasBlockSupport)(t,"inserter",!0)&&$e(e,t.name,n),Ze=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:c=0}=Xe(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:Je(r,c)}},Je=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},et=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;Object(m.hasBlockSupport)(n.name,"multiple",!0)||(r=Object(u.some)(Q(e,Y(e)),{name:n.name}));const{time:c,count:l=0}=Xe(e,o)||{},i={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Je(c,l)};if("transform"===t)return i;const s=n.variations.filter(({scope:e})=>!e||e.includes("inserter"));return{...i,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:s,example:n.example,utility:1}},tt=Object(L.a)((e,t=null)=>{const n=et(e,{buildScope:"inserter"}),o=Object(m.getBlockTypes)().filter(n=>Qe(e,n,t)).map(n),r=$e(e,"core/block",t)?Ot(e).map(t=>{const n="core/block/"+t.id,o=pt(e,t.id);let r;1===o.length&&(r=Object(m.getBlockType)(o[0].name));const{time:c,count:l=0}=Xe(e,n)||{},i=Je(c,l);return{id:n,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:r?r.icon:R,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:i}}):[],c=o.filter(({variations:e=[]})=>!e.some(({isDefault:e})=>e)),l=[];for(const t of o){const{variations:n=[]}=t;if(n.length){const o=Ze(e,t);l.push(...n.map(o))}}return[...[...c,...l].sort((e,t)=>{const n=e.name.startsWith("core/"),o=t.name.startsWith("core/");return n&&o?0:n&&!o?-1:1}),...r]},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ot(e),Object(m.getBlockTypes)()]),nt=Object(L.a)((e,t,n=null)=>{const o=et(e,{buildScope:"transform"}),r=Object(m.getBlockTypes)().filter(t=>Qe(e,t,n)).map(o),c=Object(u.mapKeys)(r,({name:e})=>e),l=Object(m.getPossibleBlockTransformations)(t).reduce((e,t)=>(c[null==t?void 0:t.name]&&e.push(c[t.name]),e),[]);return Object(u.orderBy)(l,e=>c[e.name].frecency,"desc")},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(m.getBlockTypes)()]),ot=Object(L.a)((e,t=null)=>{if(Object(u.some)(Object(m.getBlockTypes)(),n=>Qe(e,n,t)))return!0;return $e(e,"core/block",t)&&Ot(e).length>0},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ot(e),Object(m.getBlockTypes)()]),rt=Object(L.a)((e,t=null)=>{if(t)return Object(u.filter)(Object(m.getBlockTypes)(),n=>Qe(e,n,t))},(e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(m.getBlockTypes)()]),ct=Object(L.a)((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find(({name:e})=>e===t);return n?{...n,blocks:Object(m.parse)(n.content)}:null},e=>[e.settings.__experimentalBlockPatterns]),lt=Object(L.a)(e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=dt(e);return t.map(e=>({...e,blockNodes:Object(A.parse)(e.content)})).filter(({blockNodes:e})=>((e,t)=>{if(Object(u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Ke(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach(e=>{n.push(e)})}return!0})(e,n))},e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes]),it=Object(L.a)((e,t=null)=>{const n=lt(e);return Object(u.filter)(n,({blockNodes:n})=>n.every(({blockName:n})=>qe(e,n,t)))},(e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]),st=Object(L.a)((e,t,n=null)=>{if(!t)return M;const o=it(e,n),r=Array.isArray(t)?t:[t];return o.filter(e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,e=>r.includes(e))})},(e,t)=>[...it.getDependants(e,t)]),at=Object(L.a)((e,t,n=null)=>{if(!t)return M;if(t.some(({clientId:t,innerBlocks:n})=>n.length||yt(e,t)))return M;const o=Array.from(new Set(t.map(({name:e})=>e)));return st(e,o,n)},(e,t)=>[...st.getDependants(e,t)]);function ut(e,t){return e.blockListSettings[t]}function dt(e){return e.settings}function bt(e){return e.blocks.isPersistentChange}const mt=Object(L.a)((e,t=[])=>t.reduce((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t,{}),e=>[e.blockListSettings]),pt=Object(L.a)((e,t)=>{const n=Object(u.find)(Ot(e),e=>e.id===t);return n?Object(m.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null},e=>[Ot(e)]),ft=Object(L.a)((e,t)=>{var n;const o=Object(u.find)(Ot(e),e=>e.id===t);return o?null===(n=o.title)||void 0===n?void 0:n.raw:null},e=>[Ot(e)]);function gt(e){return e.blocks.isIgnoredChange}function ht(e){return e.lastBlockAttributesChange}function Ot(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:M}function jt(e){return e.isNavigationMode}function vt(e){return e.hasBlockMovingClientId}function kt(e){return!!e.automaticChangeStatus}function _t(e,t){return e.highlightedBlock===t}function yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Et=Object(L.a)((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(D(e,n)))return n;const o=he(e),r=ae(e,n||o[0],t);return r?Object(u.last)(r):null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function Ct(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var St=n("@wordpress/a11y"),wt=n("@wordpress/deprecated"),Bt=n.n(wt);var It={SLEEP:({duration:e})=>new Promise(t=>{setTimeout(t,e)}),MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(f.createRegistryControl)(e=>()=>{const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t(()=>e.dispatch(Rn).__unstableMarkAutomaticChangeFinal())})};const xt="core/block-editor";function*Tt(){if(0===(yield f.controls.select(xt,"getBlockCount")))return yield jn()}function*Nt(e){return yield{type:"RESET_BLOCKS",blocks:e},yield*Pt(e)}function*Pt(e){const t=yield f.controls.select(xt,"getTemplate"),n=yield f.controls.select(xt,"getTemplateLock"),o=!t||"all"!==n||Object(m.doBlocksMatchTemplate)(e,t);if(o!==(yield f.controls.select(xt,"isValidTemplate")))return yield rn(o),o}function Lt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function At(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Rt(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(u.castArray)(e),attributes:t,uniqueByBlock:n}}function Mt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Dt(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function*Ft(e){const t=yield f.controls.select(xt,"getPreviousBlockClientId",e);if(t)return yield Dt(t,-1),[t]}function*Vt(e){const t=yield f.controls.select(xt,"getNextBlockClientId",e);if(t)return yield Dt(t),[t]}function zt(){return{type:"START_MULTI_SELECT"}}function Ht(){return{type:"STOP_MULTI_SELECT"}}function*Gt(e,t){yield{type:"MULTI_SELECT",start:e,end:t};const n=yield f.controls.select(xt,"getSelectedBlockCount");Object(St.speak)(Object(j.sprintf)(Object(j._n)("%s block selected.","%s blocks selected.",n),n),"assertive")}function Ut(){return{type:"CLEAR_SELECTED_BLOCK"}}function Wt(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Kt(e,t){var n,o;const r=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map(e=>{var t;const n=e.name;if(!Object(m.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!r[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:c={}}=e,l=r[n];return{...e,attributes:{...c,className:`${o||""} is-style-${l}`.trim()}}})}function*$t(e,t,n,o=0,r){e=Object(u.castArray)(e),t=Kt(Object(u.castArray)(t),yield f.controls.select(xt,"getSettings"));const c=yield f.controls.select(xt,"getBlockRootClientId",Object(u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!(yield f.controls.select(xt,"canInsertBlockType",n.name,c)))return}yield{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r},yield*Tt()}function qt(e,t){return $t(e,t)}function Yt(e){return(t,n)=>({clientIds:Object(u.castArray)(t),type:e,rootClientId:n})}const Xt=Yt("MOVE_BLOCKS_DOWN"),Qt=Yt("MOVE_BLOCKS_UP");function*Zt(e,t="",n="",o){const r=yield f.controls.select(xt,"getTemplateLock",t);if("all"===r)return;const c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o};if(t===n)return void(yield c);if("insert"===r)return;(yield f.controls.select(xt,"canInsertBlocks",e,n))&&(yield c)}function*Jt(e,t="",n="",o){yield Zt([e],t,n,o)}function en(e,t,n,o=!0,r){return tn([e],t,n,o,0,r)}function*tn(e,t,n,o=!0,r=0,c){Object(u.isObject)(r)&&(c=r,r=0,Bt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Kt(Object(u.castArray)(e),yield f.controls.select(xt,"getSettings"));const l=[];for(const t of e){(yield f.controls.select(xt,"canInsertBlockType",t.name,n))&&l.push(t)}if(l.length)return{type:"INSERT_BLOCKS",blocks:l,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:c}}function nn(e,t,n={}){const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function on(){return{type:"HIDE_INSERTION_POINT"}}function rn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function*cn(){yield{type:"SYNCHRONIZE_TEMPLATE"};const e=yield f.controls.select(xt,"getBlocks"),t=yield f.controls.select(xt,"getTemplate"),n=Object(m.synchronizeBlocksWithTemplate)(e,t);return yield Nt(n)}function*ln(e,t){const n=[e,t];yield{type:"MERGE_BLOCKS",blocks:n};const[o,r]=n,l=yield f.controls.select(xt,"getBlock",o),i=Object(m.getBlockType)(l.name);if(!i.merge)return void(yield Dt(l.clientId));const s=yield f.controls.select(xt,"getBlock",r),a=Object(m.getBlockType)(s.name),{clientId:d,attributeKey:b,offset:p}=yield f.controls.select(xt,"getSelectionStart"),g=(d===o?i:a).attributes[b],h=(d===o||d===r)&&void 0!==b&&void 0!==p&&!!g;g||("number"==typeof b?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 b):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const O=Object(m.cloneBlock)(l),j=Object(m.cloneBlock)(s);if(h){const e=d===o?O:j,t=e.attributes[b],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:l}=g,i=Object(c.insert)(Object(c.create)({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:l}),"",p,p);e.attributes[b]=Object(c.toHTMLString)({value:i,multilineTag:n,preserveWhiteSpace:l})}const v=l.name===s.name?[j]:Object(m.switchToBlockType)(j,l.name);if(!v||!v.length)return;const k=i.merge(O.attributes,v[0].attributes);if(h){const e=Object(u.findKey)(k,e=>"string"==typeof e&&-1!==e.indexOf("")),t=k[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=i.attributes[e],s=Object(c.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),a=s.text.indexOf(""),d=Object(c.remove)(s,a,a+1),b=Object(c.toHTMLString)({value:d,multilineTag:n,preserveWhiteSpace:r});k[e]=b,yield On(l.clientId,e,a,a)}yield*$t([l.clientId,s.clientId],[{...l,attributes:{...l.attributes,...k}},...v.slice(1)])}function*sn(e,t=!0){if(!e||!e.length)return;e=Object(u.castArray)(e);const n=yield f.controls.select(xt,"getBlockRootClientId",e[0]);if(yield f.controls.select(xt,"getTemplateLock",n))return;let o;o=t?yield Ft(e[0]):yield f.controls.select(xt,"getPreviousBlockClientId",e[0]),yield{type:"REMOVE_BLOCKS",clientIds:e};const r=yield*Tt();return[o||r]}function an(e,t){return sn([e],t)}function un(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function dn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function bn(){return{type:"START_TYPING"}}function mn(){return{type:"STOP_TYPING"}}function pn(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function fn(){return{type:"STOP_DRAGGING_BLOCKS"}}function gn(){return{type:"ENTER_FORMATTED_TEXT"}}function hn(){return{type:"EXIT_FORMATTED_TEXT"}}function On(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function jn(e,t,n){const o=Object(m.getDefaultBlockName)();if(!o)return;return en(Object(m.createBlock)(o,e),n,t)}function vn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function kn(e){return{type:"UPDATE_SETTINGS",settings:e}}function _n(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function yn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function En(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function*Cn(){yield{type:"MARK_AUTOMATIC_CHANGE"},yield{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"}}function Sn(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function*wn(e=!0){yield{type:"SET_NAVIGATION_MODE",isNavigationMode:e},e?Object(St.speak)(Object(j.__)("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.")):Object(St.speak)(Object(j.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}function*Bn(e=null){yield{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e},e&&Object(St.speak)(Object(j.__)("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."))}function*In(e,t=!0){if(!e&&!e.length)return;const n=yield f.controls.select(xt,"getBlocksByClientId",e),o=yield f.controls.select(xt,"getBlockRootClientId",e[0]);if(Object(u.some)(n,e=>!e))return;const r=n.map(e=>e.name);if(Object(u.some)(r,e=>!Object(m.hasBlockSupport)(e,"multiple",!0)))return;const c=yield f.controls.select(xt,"getBlockIndex",Object(u.last)(Object(u.castArray)(e)),o),l=n.map(e=>Object(m.__experimentalCloneSanitizedBlock)(e));return yield tn(l,c+1,o,t),l.length>1&&t&&(yield Gt(Object(u.first)(l).clientId,Object(u.last)(l).clientId)),l.map(e=>e.clientId)}function*xn(e){if(!e)return;const t=yield f.controls.select(xt,"getBlockRootClientId",e);if(yield f.controls.select(xt,"getTemplateLock",t))return;const n=yield f.controls.select(xt,"getBlockIndex",e,t);return yield jn({},t,n)}function*Tn(e){if(!e)return;const t=yield f.controls.select(xt,"getBlockRootClientId",e);if(yield f.controls.select(xt,"getTemplateLock",t))return;const n=yield f.controls.select(xt,"getBlockIndex",e,t);return yield jn({},t,n+1)}function Nn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function*Pn(e){yield Nn(e,!0),yield{type:"SLEEP",duration:150},yield Nn(e,!1)}function Ln(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const An={reducer:P,selectors:o,actions:r,controls:It},Rn=Object(f.createReduxStore)(xt,{...An,persist:["preferences"]});function Mn(){const{isSelected:e,clientId:t,name:n}=O(),o=Object(f.useSelect)(o=>{if(e)return;const{getBlockName:r,isFirstMultiSelectedBlock:c,getMultiSelectedBlockClientIds:l}=o(Rn);return!!c(t)&&l().every(e=>r(e)===n)},[t,e,n]);return e||o}Object(f.registerStore)(xt,{...An,persist:["preferences"]});var Dn={default:Object(p.createSlotFill)("BlockControls"),block:Object(p.createSlotFill)("BlockControlsBlock"),inline:Object(p.createSlotFill)("BlockFormatControls"),other:Object(p.createSlotFill)("BlockControlsOther")};function Fn({group:e="default",controls:t,children:n}){if(!Mn())return null;const o=Dn[e].Fill;return Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(o,null,o=>{const r=Object(u.isEmpty)(o)?null:o;return Object(i.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===e&&Object(i.createElement)(p.ToolbarGroup,{controls:t}),n)}))}function Vn({group:e="default",...t}){const n=Object(i.useContext)(p.__experimentalToolbarContext),o=Dn[e].Slot,r=Object(p.__experimentalUseSlot)(o.__unstableName);return Boolean(r.fills&&r.fills.length)?"default"===e?Object(i.createElement)(o,Object(l.a)({},t,{bubblesVirtually:!0,fillProps:n})):Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(o,Object(l.a)({},t,{bubblesVirtually:!0,fillProps:n}))):null}const zn=Fn;zn.Slot=Vn;const Hn=e=>Object(i.createElement)(Fn,Object(l.a)({group:"inline"},e));Hn.Slot=e=>Object(i.createElement)(Vn,Object(l.a)({group:"inline"},e));var Gn=zn,Un=n("@wordpress/primitives");var Wn=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var Kn=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var $n=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var qn=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"}));var Yn=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const Xn={type:"default"},Qn=Object(i.createContext)(Xn);function Zn(e,t){return e.split(",").map(e=>`.editor-styles-wrapper ${e} ${t}`).join(",")}const Jn=Qn.Provider;function eo({selector:e,layout:t={}}){const{contentSize:n,wideSize:o}=t;let r=n||o?`\n\t\t\t\t${Zn(e,"> *")} {\n\t\t\t\t\tmax-width: ${null!=n?n:o};\n\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t}\n\n\t\t\t\t${Zn(e,'> [data-align="wide"]')} {\n\t\t\t\t\tmax-width: ${null!=o?o:n};\n\t\t\t\t}\n\n\t\t\t\t${Zn(e,'> [data-align="full"]')} {\n\t\t\t\t\tmax-width: none;\n\t\t\t\t}\n\t\t\t`:"";return r+=`\n\t\t${Zn(e,'> [data-align="left"]')} {\n\t\t\tfloat: left;\n\t\t\tmargin-right: 2em;\n\t\t}\n\n\t\t${Zn(e,'> [data-align="right"]')} {\n\t\t\tfloat: right;\n\t\t\tmargin-left: 2em;\n\t\t}\n\t`,Object(i.createElement)("style",null,r)}const to=["left","center","right","wide","full"],no=["wide","full"];function oo(e=to){const{wideControlsEnabled:t=!1}=Object(f.useSelect)(e=>{const{getSettings:t}=e(Rn);return{wideControlsEnabled:t().alignWide}},[]),n=Object(i.useContext)(Qn);if(!("default"===n.type))return[];const{alignments:o=to}=n;return e.filter(e=>(n.alignments||t||!no.includes(e))&&o.includes(e))}const ro={left:{icon:Wn,title:Object(j.__)("Align left")},center:{icon:Kn,title:Object(j.__)("Align center")},right:{icon:$n,title:Object(j.__)("Align right")},wide:{icon:qn,title:Object(j.__)("Wide width")},full:{icon:Yn,title:Object(j.__)("Full width")}},co={isAlternate:!0};var lo=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const c=oo(n);if(0===c.length)return null;const s=ro[e],a=ro.center,u=o?p.ToolbarGroup:p.ToolbarDropdownMenu,d=o?{isCollapsed:r}:{};return Object(i.createElement)(u,Object(l.a)({popoverProps:co,icon:s?s.icon:a.icon,label:Object(j.__)("Align"),toggleProps:{describedBy:Object(j.__)("Change alignment")},controls:c.map(n=>{return{...ro[n],isActive:e===n,role:r?"menuitemradio":void 0,onClick:(o=n,()=>t(e===o?void 0:o))};var o})},d))};function io(e){return Object(i.createElement)(lo,Object(l.a)({},e,{isToolbar:!1}))}function so(e){return Object(i.createElement)(lo,Object(l.a)({},e,{isToolbar:!0}))}const ao=["left","center","right","wide","full"],uo=["wide","full"];function bo(e,t=!0,n=!0){let o;return o=Array.isArray(e)?ao.filter(t=>e.includes(t)):!0===e?ao:[],!n||!0===e&&!t?Object(u.without)(o,...uo):o}const mo=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n}=t,o=oo(bo(Object(m.getBlockSupport)(n,"align"),Object(m.hasBlockSupport)(n,"alignWide",!0)));return[o.length>0&&t.isSelected&&Object(i.createElement)(Gn,{key:"align-controls",group:"block"},Object(i.createElement)(io,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;(null===(n=Object(m.getBlockType)(t.name).attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:o})),Object(i.createElement)(e,Object(l.a)({key:"edit"},t))]},"withToolbarControls"),po=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n,attributes:o}=t,{align:r}=o,c=oo(bo(Object(m.getBlockSupport)(n,"align"),Object(m.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return Object(i.createElement)(e,t);let s=t.wrapperProps;return c.includes(r)&&(s={...s,"data-align":r}),Object(i.createElement)(e,Object(l.a)({},t,{wrapperProps:s}))});Object(b.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(u.has)(e.attributes,["align","type"])||Object(m.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ao,""]}}),e})),Object(b.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",po),Object(b.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",mo),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return bo(Object(m.getBlockSupport)(t,"align"),Object(m.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=a()("align"+o,e.className)),e}));const{Fill:fo,Slot:go}=Object(p.createSlotFill)("InspectorAdvancedControls");function ho({children:e}){const{isSelected:t}=O();return t?Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(fo,null,e)):null}ho.slotName="InspectorAdvancedControls",ho.Slot=go;var Oo=ho;const{Fill:jo,Slot:vo}=Object(p.createSlotFill)("InspectorControls");function ko({children:e}){return Mn()?Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(jo,null,e)):null}ko.Slot=vo;var _o=ko;const yo=/[\s#]/g;const Eo=Object(d.createHigherOrderComponent)(e=>t=>{if(Object(m.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===i.Platform.OS,o=Object(i.createElement)(p.TextControl,{className:"html-anchor-control",label:Object(j.__)("HTML anchor"),help:Object(i.createElement)(i.Fragment,null,Object(j.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(i.createElement)(p.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(j.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:Object(j.__)("Add an anchor"),onChange:e=>{e=e.replace(yo,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),n&&Object(i.createElement)(Oo,null,o),!n&&"core/heading"===t.name&&Object(i.createElement)(_o,null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Heading settings")},o)))}return Object(i.createElement)(e,t)},"withInspectorControl");Object(b.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(u.has)(e.attributes,["anchor","type"])||Object(m.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),Object(b.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Eo),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(m.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Co=Object(d.createHigherOrderComponent)(e=>t=>Object(m.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),Object(i.createElement)(Oo,null,Object(i.createElement)(p.TextControl,{autoComplete:"off",label:Object(j.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:Object(j.__)("Separate multiple classes with spaces.")}))):Object(i.createElement)(e,t),"withInspectorControl");function So(e){e=`<div data-custom-class-name>${e}</div>`;const t=Object(m.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(b.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(m.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),Object(b.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Co),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(m.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=a()(e.className,n.className)),e})),Object(b.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(m.hasBlockSupport)(t,"customClassName",!0)){const o=Object(u.omit)(e,["className"]),r=Object(m.getSaveContent)(t,o),c=So(r),l=So(n),i=Object(u.difference)(l,c);i.length?e.className=i.join(" "):r&&delete e.className}return e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(m.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(u.uniq)([Object(m.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=Object(m.getBlockDefaultClassName)(t.name)),e}));const wo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.customLineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":e=>e.enableCustomSpacing},Bo=(e,t)=>{if("color.palette"!==e&&"color.gradients"!==e)return t;if(!Array.isArray(t))return t;const n=t.filter(e=>"core"!==(null==e?void 0:e.origin));return n.length>0?n:t};function Io(e){const{name:t}=O();return Object(f.useSelect)(n=>{var o;const r=n(Rn).getSettings(),c="__experimentalFeatures."+e,l=`__experimentalFeatures.blocks.${t}.${e}`,i=null!==(o=Object(u.get)(r,l))&&void 0!==o?o:Object(u.get)(r,c);if(void 0!==i)return Bo(e,i);const s=wo[e]?wo[e](r):void 0;return void 0!==s?Bo(e,s):"typography.dropCap"===e||void 0},[t,e])}var xo=n("./node_modules/tinycolor2/tinycolor.js"),To=n.n(xo);const No=(e,t,n)=>{if(t){const n=Object(u.find)(e,{slug:t});if(n)return n}return{color:n}},Po=(e,t)=>Object(u.find)(e,{color:t});function Lo(e,t){if(e&&t)return`has-${Object(u.kebabCase)(t)}-${e}`}const Ao=[];function Ro(e){if(e)return`has-${e}-gradient-background`}function Mo(e,t){const n=Object(u.find)(e,["slug",t]);return n&&n.gradient}function Do(e,t){return Object(u.find)(e,["gradient",t])}function Fo(e,t){const n=Do(e,t);return n&&n.slug}function Vo({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=O(),o=Io("color.gradients")||Ao,{gradient:r,customGradient:c}=Object(f.useSelect)(o=>{const{getBlockAttributes:r}=o(Rn),c=r(n)||{};return{customGradient:c[t],gradient:c[e]}},[n,e,t]),{updateBlockAttributes:l}=Object(f.useDispatch)(Rn),s=Object(i.useCallback)(r=>{const c=Fo(o,r);l(n,c?{[e]:c,[t]:void 0}:{[e]:void 0,[t]:r})},[o,n,l]),a=Ro(r);let u;return u=r?Mo(o,r):c,{gradientClass:a,gradientValue:u,setGradient:s}}const zo=Object(j.__)("(Color: %s)"),Ho=Object(j.__)("(Gradient: %s)"),Go=["colors","disableCustomColors","gradients","disableCustomGradients"];function Uo({colors:e,gradients:t,label:n,currentTab:o,colorValue:r,gradientValue:c}){let l,s;if("color"===o){if(r){l=r;const t=Po(e,l),n=t&&t.name;s=Object(j.sprintf)(zo,n||l)}}else if("gradient"===o&&c){l=c;const e=Do(t,l),n=e&&e.name;s=Object(j.sprintf)(Ho,n||l)}return Object(i.createElement)(i.Fragment,null,n,!!l&&Object(i.createElement)(p.ColorIndicator,{colorValue:l,"aria-label":s}))}function Wo({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,className:r,label:c,onColorChange:l,onGradientChange:s,colorValue:d,gradientValue:b,clearable:m}){const f=l&&(!Object(u.isEmpty)(e)||!n),g=s&&(!Object(u.isEmpty)(t)||!o),[h,O]=Object(i.useState)(b?"gradient":!!f&&"color");return f||g?Object(i.createElement)(p.BaseControl,{className:a()("block-editor-color-gradient-control",r)},Object(i.createElement)("fieldset",null,Object(i.createElement)("legend",null,Object(i.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(i.createElement)(p.BaseControl.VisualLabel,null,Object(i.createElement)(Uo,{currentTab:h,label:c,colorValue:d,gradientValue:b})))),f&&g&&Object(i.createElement)(p.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(i.createElement)(p.Button,{isSmall:!0,isPressed:"color"===h,onClick:()=>O("color")},Object(j.__)("Solid")),Object(i.createElement)(p.Button,{isSmall:!0,isPressed:"gradient"===h,onClick:()=>O("gradient")},Object(j.__)("Gradient"))),("color"===h||!g)&&Object(i.createElement)(p.ColorPalette,{value:d,onChange:g?e=>{l(e),s()}:l,colors:e,disableCustomColors:n,clearable:m}),("gradient"===h||!f)&&Object(i.createElement)(p.__experimentalGradientPicker,{value:b,onChange:f?e=>{s(e),l()}:s,gradients:t,disableCustomGradients:o,clearable:m}))):null}function Ko(e){const t={};return t.colors=Io("color.palette"),t.gradients=Io("color.gradients"),t.disableCustomColors=!Io("color.custom"),t.disableCustomGradients=!Io("color.customGradient"),Object(i.createElement)(Wo,Object(l.a)({},t,e))}var $o=function(e){return Object(u.every)(Go,t=>e.hasOwnProperty(t))?Object(i.createElement)(Wo,e):Object(i.createElement)(Ko,e)};const qo=e=>{if(!Object(u.isObject)(e)||Array.isArray(e))return e;const t=Object(u.pickBy)(Object(u.mapValues)(e,qo),u.identity);return Object(u.isEmpty)(t)?void 0:t},Yo=[];function Xo(e){var t;const{attributes:{borderColor:n,style:o},setAttributes:r}=e,c=Io("color.palette")||Yo,l=!Io("color.custom"),s=!Io("color.customGradient");return Object(i.createElement)($o,{label:Object(j.__)("Border color"),value:n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color),colors:c,gradients:void 0,disableCustomColors:l,disableCustomGradients:s,onColorChange:e=>{const t=Po(c,e),n={...o,border:{...null==o?void 0:o.border,color:null!=t&&t.slug?void 0:e}},l=null!=t&&t.slug?t.slug:void 0;r({style:qo(n),borderColor:l})}})}function Qo(e,t,n){var o;if(!lr(t,"color")||ir(t))return e;const{borderColor:r,style:c}=n,l=Lo("border-color",r),i=a()(e.className,{"has-border-color":r||(null==c||null===(o=c.border)||void 0===o?void 0:o.color),[l]:!!l});return e.className=i||void 0,e}const Zo=Object(d.createHigherOrderComponent)(e=>t=>{var n,o;const{name:r,attributes:c}=t,{borderColor:s}=c,a=Io("color.palette")||Yo;if(!lr(r,"color")||ir(r))return Object(i.createElement)(e,t);const u={borderColor:s?null===(n=No(a,s))||void 0===n?void 0:n.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},Object(i.createElement)(e,Object(l.a)({},t,{wrapperProps:d}))});Object(b.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return lr(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",Qo),Object(b.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!lr(e,"color")||ir(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Qo(o,e,n)},e})),Object(b.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Zo);function Jo(e){var t;const{attributes:{style:n},setAttributes:o}=e;return Object(i.createElement)(p.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,label:Object(j.__)("Border radius"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0===e&&(t=qo(t)),o({style:t})}})}const er={key:"default",name:Object(j.__)("Default"),style:{borderStyle:void 0}},tr=[er,{key:"none",name:Object(j.__)("None"),style:{borderStyle:"none"}},{key:"solid",name:Object(j.__)("Solid"),style:{borderStyle:"solid"}},{key:"dashed",name:Object(j.__)("Dashed"),style:{borderStyle:"dashed"}},{key:"dotted",name:Object(j.__)("Dotted"),style:{borderStyle:"dotted"}}];function nr({onChange:e,value:t}){const n=tr.find(e=>e.key===t);return Object(i.createElement)("fieldset",{className:"components-border-style-control"},Object(i.createElement)(p.CustomSelectControl,{className:"components-border-style-control__select",label:Object(j.__)("Border style"),options:tr,value:n||er,onChange:({selectedItem:t})=>"default"===t.key?e(void 0):e(t.key)}))}const or=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return Object(i.createElement)(nr,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};o({style:qo(t)})}})},rr=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return Object(i.createElement)(p.RangeControl,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.width,label:Object(j.__)("Border width"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,width:e}};o({style:qo(t)})}})};function cr(e){const t=sr(e),n=lr(e.name),o=Io("border.customColor")&&lr(e.name,"color"),r=Io("border.customRadius")&&lr(e.name,"radius"),c=Io("border.customStyle")&&lr(e.name,"style"),l=Io("border.customWidth")&&lr(e.name,"width");return t||!n?null:Object(i.createElement)(_o,null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Border settings"),initialOpen:!1},c&&Object(i.createElement)(or,e),l&&Object(i.createElement)(rr,e),r&&Object(i.createElement)(Jo,e),o&&Object(i.createElement)(Xo,e)))}function lr(e,t="any"){if("web"!==i.Platform.OS)return!1;const n=Object(m.getBlockSupport)(e,"__experimentalBorder");return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function ir(e){const t=Object(m.getBlockSupport)(e,"__experimentalBorder");return null==t?void 0:t.__experimentalSkipSerialization}const sr=()=>[!Io("border.customColor"),!Io("border.customRadius"),!Io("border.customStyle"),!Io("border.customWidth")].every(Boolean),ar=Object(j.__)("(%s: color %s)"),ur=Object(j.__)("(%s: gradient %s)"),dr=["colors","disableCustomColors","gradients","disableCustomGradients"],br=({colors:e,gradients:t,settings:n})=>n.map(({colorValue:n,gradientValue:o,label:r,colors:c,gradients:l},s)=>{if(!n&&!o)return null;let a;if(n){const t=Po(c||e,n);a=Object(j.sprintf)(ar,r.toLowerCase(),t&&t.name||n)}else{const e=Do(l||t,n);a=Object(j.sprintf)(ur,r.toLowerCase(),e&&e.name||o)}return Object(i.createElement)(p.ColorIndicator,{key:s,colorValue:n||o,"aria-label":a})}),mr=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:c,settings:s,title:d,...b})=>{if(Object(u.isEmpty)(t)&&Object(u.isEmpty)(n)&&o&&r&&Object(u.every)(s,e=>Object(u.isEmpty)(e.colors)&&Object(u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))return null;const m=Object(i.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},d,Object(i.createElement)(br,{colors:t,gradients:n,settings:s}));return Object(i.createElement)(p.PanelBody,Object(l.a)({className:a()("block-editor-panel-color-gradient-settings",e),title:m},b),s.map((e,c)=>Object(i.createElement)($o,Object(l.a)({key:c,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r},e))),c)},pr=e=>{const t={};return t.colors=Io("color.palette"),t.gradients=Io("color.gradients"),t.disableCustomColors=!Io("color.custom"),t.disableCustomGradients=!Io("color.customGradient"),Object(i.createElement)(mr,Object(l.a)({},t,e))};var fr=e=>Object(u.every)(dr,t=>e.hasOwnProperty(t))?Object(i.createElement)(mr,e):Object(i.createElement)(pr,e);function gr({tinyBackgroundColor:e,tinyTextColor:t,backgroundColor:n,textColor:o}){const r=e.getBrightness()<t.getBrightness()?Object(j.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(j.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(i.useEffect)(()=>{Object(St.speak)(Object(j.__)("This color combination may be hard for people to read."))},[n,o]),Object(i.createElement)("div",{className:"block-editor-contrast-checker"},Object(i.createElement)(p.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},r))}var hr=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fontSize:o,isLargeText:r,textColor:c}){if(!e&&!t||!c&&!n)return null;const l=To()(e||t),s=To()(c||n);return 1!==l.getAlpha()||1!==s.getAlpha()||To.a.isReadable(l,s,{level:"AA",size:r||!1!==r&&o>=24?"large":"small"})?null:Object(i.createElement)(gr,{backgroundColor:e,textColor:c,tinyBackgroundColor:l,tinyTextColor:s})};const Or=Object(i.createContext)();function jr({children:e}){const t=Object(i.useMemo)(()=>({refs:new Map,callbacks:new Map}),[]);return Object(i.createElement)(Or.Provider,{value:t},e)}function vr(e){const{refs:t,callbacks:n}=Object(i.useContext)(Or),o=Object(i.useRef)();return Object(i.useLayoutEffect)(()=>(t.set(o,e),()=>{t.delete(o)}),[e]),Object(d.useRefEffect)(t=>{o.current=t,n.forEach((n,o)=>{e===n&&o(t)})},[e])}function kr(e){const{refs:t}=Object(i.useContext)(Or),n=Object(i.useRef)();return n.current=e,Object(i.useMemo)(()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}}),[])}function _r(e){const{callbacks:t}=Object(i.useContext)(Or),n=kr(e),[o,r]=Object(i.useState)(null);return Object(i.useLayoutEffect)(()=>{if(e)return t.set(r,e),()=>{t.delete(r)}},[e]),n.current||o}function yr(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Er({settings:e,clientId:t,enableContrastChecking:n=!0}){const[o,r]=Object(i.useState)(),[c,l]=Object(i.useState)(),s=kr(t);return Object(i.useEffect)(()=>{if(!n)return;if(!s.current)return;l(yr(s.current).color);let e=s.current,t=yr(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=yr(e).backgroundColor;r(t)}),Object(i.createElement)(_o,null,Object(i.createElement)(fr,{title:Object(j.__)("Color"),initialOpen:!1,settings:e},n&&Object(i.createElement)(hr,{backgroundColor:o,textColor:c})))}const Cr=[],Sr=e=>{const t=Object(m.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},wr=e=>{const t=Object(m.getBlockSupport)(e,"color");return null==t?void 0:t.__experimentalSkipSerialization},Br=e=>{if("web"!==i.Platform.OS)return!1;const t=Object(m.getBlockSupport)(e,"color");return Object(u.isObject)(t)&&!!t.link},Ir=e=>{if("web"!==i.Platform.OS)return!1;const t=Object(m.getBlockSupport)(e,"color");return Object(u.isObject)(t)&&!!t.gradients},xr=e=>{const t=Object(m.getBlockSupport)(e,"color");return t&&!1!==t.text};function Tr(e,t,n){var o,r,c,l,i,s;if(!Sr(t)||wr(t))return e;const u=Ir(t),{backgroundColor:d,textColor:b,gradient:m,style:p}=n,f=Lo("background-color",d),g=Ro(m),h=Lo("color",b),O=a()(e.className,h,g,{[f]:!(u&&null!=p&&null!==(o=p.color)&&void 0!==o&&o.gradient||!f),"has-text-color":b||(null==p||null===(r=p.color)||void 0===r?void 0:r.text),"has-background":d||(null==p||null===(c=p.color)||void 0===c?void 0:c.background)||u&&(m||(null==p||null===(l=p.color)||void 0===l?void 0:l.gradient)),"has-link-color":null==p||null===(i=p.elements)||void 0===i||null===(s=i.link)||void 0===s?void 0:s.color});return e.className=O||void 0,e}const Nr=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?No(e,n[1]).color:t};function Pr(e){var t,n,o,r,c,l,s,a,d;const{name:b,attributes:p}=e,f=Io("color.link"),g=Io("color.palette")||Cr,h=Io("color.gradients")||Cr,O=Object(i.useRef)(p);if(Object(i.useEffect)(()=>{O.current=p},[p]),!Sr(b)||"web"!==i.Platform.OS)return null;const v=(e=>{const t=Object(m.getBlockSupport)(e,"color");return t&&!1!==t.background})(b),k=Ir(b),{style:_,textColor:y,backgroundColor:E,gradient:C}=p;let S;if(k&&C)S=Mo(h,C);else if(k){var w;S=null==_||null===(w=_.color)||void 0===w?void 0:w.gradient}const B=t=>n=>{var o,r;const c=Po(g,n),l=t+"Color",i={...O.current.style,color:{...null===(o=O.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=c&&c.slug?void 0:n}},s=null!=c&&c.slug?c.slug:void 0,a={style:qo(i),[l]:s};e.setAttributes(a),O.current={...O.current,...a}};return Object(i.createElement)(Er,{enableContrastChecking:!("web"!==i.Platform.OS||C||null!=_&&null!==(t=_.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...xr(b)?[{label:Object(j.__)("Text color"),onColorChange:B("text"),colorValue:No(g,y,null==_||null===(n=_.color)||void 0===n?void 0:n.text).color}]:[],...v||k?[{label:Object(j.__)("Background color"),onColorChange:v?B("background"):void 0,colorValue:No(g,E,null==_||null===(o=_.color)||void 0===o?void 0:o.background).color,gradientValue:S,onGradientChange:k?t=>{const n=Fo(h,t);let o;if(n){var r,c,l;const e={...null===(r=O.current)||void 0===r?void 0:r.style,color:{...null===(c=O.current)||void 0===c||null===(l=c.style)||void 0===l?void 0:l.color,gradient:void 0}};o={style:qo(e),gradient:n}}else{var i,s,a;const e={...null===(i=O.current)||void 0===i?void 0:i.style,color:{...null===(s=O.current)||void 0===s||null===(a=s.style)||void 0===a?void 0:a.color,gradient:t}};o={style:qo(e),gradient:void 0}}e.setAttributes(o),O.current={...O.current,...o}}:void 0}]:[],...f&&Br(b)?[{label:Object(j.__)("Link Color"),onColorChange:t=>{const n=Po(g,t),o=null!=n&&n.slug?"var:preset|color|"+n.slug:t,r=function(e,t,n){return Object(u.setWith)(e?Object(u.clone)(e):{},t,n,u.clone)}(_,["elements","link","color","text"],o);e.setAttributes({style:r})},colorValue:Nr(g,null==_||null===(r=_.elements)||void 0===r||null===(c=r.link)||void 0===c||null===(l=c.color)||void 0===l?void 0:l.text),clearable:!(null==_||null===(s=_.elements)||void 0===s||null===(a=s.link)||void 0===a||null===(d=a.color)||void 0===d||!d.text)}]:[]]})}const Lr=Object(d.createHigherOrderComponent)(e=>t=>{var n,o,r;const{name:c,attributes:s}=t,{backgroundColor:a,textColor:u}=s,d=Io("color.palette")||Cr;if(!Sr(c)||wr(c))return Object(i.createElement)(e,t);const b={color:u?null===(n=No(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:a?null===(o=No(d,a))||void 0===o?void 0:o.color:void 0};let m=t.wrapperProps;return m={...t.wrapperProps,style:{...b,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},Object(i.createElement)(e,Object(l.a)({},t,{wrapperProps:m}))});Object(b.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Sr(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Ir(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Tr),Object(b.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Sr(e)||wr(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Tr(o,e,n)},e})),Object(b.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",Lr);var Ar=n("@wordpress/token-list"),Rr=n.n(Ar);const Mr=(e,t,n)=>{if(t){const n=Object(u.find)(e,{slug:t});if(n)return n}return{size:n}};function Dr(e,t){const n=Object(u.find)(e,{size:t});return n||{size:t}}function Fr(e){if(e)return`has-${Object(u.kebabCase)(e)}-font-size`}var Vr=function(e){const t=Io("typography.fontSizes"),n=!Io("typography.customFontSize");return Object(i.createElement)(p.FontSizePicker,Object(l.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function zr(e,t,n){if(!Object(m.hasBlockSupport)(t,"fontSize"))return e;if(Object(m.hasBlockSupport)(t,"__experimentalSkipFontSizeSerialization"))return e;const o=new Rr.a(e.className);o.add(Fr(n.fontSize));const r=o.value;return e.className=r||void 0,e}function Hr(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:c}=e,l=Gr(e),s=Io("typography.fontSizes");if(l)return null;const a=Mr(s,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),u=(null==a?void 0:a.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return Object(i.createElement)(Vr,{onChange:e=>{const t=Dr(s,e).slug;c({style:qo({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:u})}function Gr({name:e}={}){const t=Io("typography.fontSizes"),n=!(null==t||!t.length);return!Object(m.hasBlockSupport)(e,"fontSize")||!n}const Ur=Object(d.createHigherOrderComponent)(e=>t=>{var n,o;const r=Io("typography.fontSizes"),{name:c,attributes:{fontSize:l,style:s},wrapperProps:a}=t;if(!Object(m.hasBlockSupport)(c,"fontSize")||Object(m.hasBlockSupport)(c,"__experimentalSkipFontSizeSerialization")||!l||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return Object(i.createElement)(e,t);const u=Mr(r,l,null==s||null===(o=s.typography)||void 0===o?void 0:o.fontSize).size,d={...t,wrapperProps:{...a,style:{fontSize:u,...null==a?void 0:a.style}}};return Object(i.createElement)(e,d)},"withFontSizeInlineStyles");Object(b.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(m.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",zr),Object(b.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(m.hasBlockSupport)(e,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),zr(o,e,n)},e})),Object(b.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Ur);var Wr=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));var Kr=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));const $r=[{name:Object(j.__)("Underline"),value:"underline",icon:Wr},{name:Object(j.__)("Strikethrough"),value:"line-through",icon:Kr}];function qr({value:e,onChange:t}){return Object(i.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(i.createElement)("legend",null,Object(j.__)("Decoration")),Object(i.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},$r.map(n=>Object(i.createElement)(p.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===e,onClick:()=>t(n.value===e?void 0:n.value),"aria-label":n.name}))))}function Yr(e){var t;const{attributes:{style:n},setAttributes:o}=e;if(Xr(e))return null;return Object(i.createElement)(qr,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function Xr({name:e}={}){const t=!Object(m.hasBlockSupport)(e,"__experimentalTextDecoration"),n=Io("typography.customTextDecorations");return t||!n}var Qr=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));var Zr=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));var Jr=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));const ec=[{name:Object(j.__)("Uppercase"),value:"uppercase",icon:Qr},{name:Object(j.__)("Lowercase"),value:"lowercase",icon:Zr},{name:Object(j.__)("Capitalize"),value:"capitalize",icon:Jr}];function tc({value:e,onChange:t}){return Object(i.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(i.createElement)("legend",null,Object(j.__)("Letter case")),Object(i.createElement)("div",{className:"block-editor-text-transform-control__buttons"},ec.map(n=>Object(i.createElement)(p.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:e===n.value,"aria-label":n.name,onClick:()=>t(e===n.value?void 0:n.value)}))))}function nc(e){var t;const{attributes:{style:n},setAttributes:o}=e;if(oc(e))return null;return Object(i.createElement)(tc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function oc({name:e}={}){const t=!Object(m.hasBlockSupport)(e,"__experimentalTextTransform"),n=Io("typography.customTextTransforms");return t||!n}function rc(e){const t=!Xr(e),n=!oc(e);return t||n?Object(i.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(i.createElement)(Yr,e),n&&Object(i.createElement)(nc,e)):null}var cc=n("@wordpress/keycodes");function lc({value:e,onChange:t}){const n=function(e){return void 0!==e&&""!==e}(e),o=n?e:"";return Object(i.createElement)("div",{className:"block-editor-line-height-control"},Object(i.createElement)(p.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:o}=e;o!==cc.ZERO||n||(e.preventDefault(),t("0"))},onChange:e=>{if(n)return void t(e);let o=e;switch(e){case"0.1":o=1.6;break;case"0":o=1.4}t(o)},label:Object(j.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function ic(e){var t;const{attributes:{style:n}}=e;if(sc(e))return null;return Object(i.createElement)(lc,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:t=>{const o={...n,typography:{...null==n?void 0:n.typography,lineHeight:t}};e.setAttributes({style:qo(o)})}})}function sc({name:e}={}){const t=!Io("typography.customLineHeight");return!Object(m.hasBlockSupport)(e,"lineHeight")||t}const ac=[{name:Object(j.__)("Regular"),value:"normal"},{name:Object(j.__)("Italic"),value:"italic"}],uc=[{name:Object(j.__)("Thin"),value:"100"},{name:Object(j.__)("Extra Light"),value:"200"},{name:Object(j.__)("Light"),value:"300"},{name:Object(j.__)("Regular"),value:"400"},{name:Object(j.__)("Medium"),value:"500"},{name:Object(j.__)("Semi Bold"),value:"600"},{name:Object(j.__)("Bold"),value:"700"},{name:Object(j.__)("Extra Bold"),value:"800"},{name:Object(j.__)("Black"),value:"900"}];function dc(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:c}}=e,l=n||o,s={key:"default",name:Object(j.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},a=Object(i.useMemo)(()=>n&&o?(()=>{const e=[s];return ac.forEach(({name:t,value:n})=>{uc.forEach(({name:o,value:r})=>{const c="normal"===n?o:Object(j.sprintf)(Object(j.__)("%1$s %2$s"),o,t);e.push({key:`${n}-${r}`,name:c,style:{fontStyle:n,fontWeight:r}})})}),e})():n?(()=>{const e=[s];return ac.forEach(({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})}),e})():(()=>{const e=[s];return uc.forEach(({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})}),e})(),[e.options]),u=a.find(e=>e.style.fontStyle===r&&e.style.fontWeight===c);return Object(i.createElement)("fieldset",{className:"components-font-appearance-control"},l&&Object(i.createElement)(p.CustomSelectControl,{className:"components-font-appearance-control__select",label:n?o?Object(j.__)("Appearance"):Object(j.__)("Font style"):Object(j.__)("Font weight"),options:a,value:u,onChange:({selectedItem:e})=>t(e.style)}))}function bc(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,c=!mc(e),l=!pc(e);if(!c&&!l)return null;const s=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,a=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return Object(i.createElement)(dc,{onChange:e=>{r({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:c,hasFontWeights:l,value:{fontStyle:s,fontWeight:a}})}function mc({name:e}={}){const t=Object(m.hasBlockSupport)(e,"__experimentalFontStyle"),n=Io("typography.customFontStyle");return!t||!n}function pc({name:e}={}){const t=Object(m.hasBlockSupport)(e,"__experimentalFontWeight"),n=Io("typography.customFontWeight");return!t||!n}function fc(e){const t=mc(e),n=pc(e);return t&&n}function gc({value:e="",onChange:t,fontFamilies:n,...o}){const r=Io("typography.fontFamilies");if(n||(n=r),Object(u.isEmpty)(n))return null;const c=[{value:"",label:Object(j.__)("Default")},...n.map(({fontFamily:e,name:t})=>({value:e,label:t||e}))];return Object(i.createElement)(p.SelectControl,Object(l.a)({label:Object(j.__)("Font family"),options:c,value:e,onChange:t,labelPosition:"top"},o))}function hc({name:e,setAttributes:t,attributes:{style:n={}}}){var o;const r=Io("typography.fontFamilies");if(Oc({name:e}))return null;const c=((e,t)=>{const n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){const t=Object(u.find)(e,({slug:e})=>e===n[1]);if(t)return t.fontFamily}return t})(r,null===(o=n.typography)||void 0===o?void 0:o.fontFamily);return Object(i.createElement)(gc,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:c,onChange:function(e){const o=Object(u.find)(r,({fontFamily:t})=>t===e);t({style:qo({...n,typography:{...n.typography||{},fontFamily:o?"var:preset|font-family|"+o.slug:e||void 0}})})}})}function Oc({name:e}){const t=Io("typography.fontFamilies");return!t||0===t.length||!Object(m.hasBlockSupport)(e,"__experimentalFontFamily")}const jc=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function vc(e){const t=function(e={}){const t=[fc(e),Gr(e),sc(e),Oc(e),Xr(e),oc(e)];return t.filter(Boolean).length===t.length}(e),n=kc(e.name);return t||!n?null:Object(i.createElement)(_o,null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Typography")},Object(i.createElement)(p.__unstableComponentSystemProvider,{__unstableNextInclude:["WPComponentsFontSizePicker"]},Object(i.createElement)(hc,e),Object(i.createElement)(Hr,e),Object(i.createElement)(bc,e),Object(i.createElement)(ic,e),Object(i.createElement)(rc,e))))}const kc=e=>"web"===i.Platform.OS&&jc.some(t=>Object(m.hasBlockSupport)(e,t));function _c(e){const t=Object(m.getBlockSupport)(e,Bc);return!!(!0===t||null!=t&&t.margin)}function yc({name:e}={}){const t=!Io("spacing.customMargin");return!_c(e)||t}function Ec(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,c=Object(p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"]}),l=Tc(n,"margin");if(yc(e))return null;return i.Platform.select({web:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:qo(t)})},label:Object(j.__)("Margin"),sides:l,units:c})),native:null})}function Cc(e){const t=Object(m.getBlockSupport)(e,Bc);return!!(!0===t||null!=t&&t.padding)}function Sc({name:e}={}){const t=!Io("spacing.customPadding");return!Cc(e)||t}function wc(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,c=Object(p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"]}),l=Tc(n,"padding");if(Sc(e))return null;return i.Platform.select({web:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:qo(t)})},label:Object(j.__)("Padding"),sides:l,units:c})),native:null})}const Bc="spacing";function Ic(e){const t=xc(e),n=function(e){if("web"!==i.Platform.OS)return!1;return Cc(e)||_c(e)}(e.name);return t||!n?null:Object(i.createElement)(_o,{key:"spacing"},Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Spacing")},Object(i.createElement)(wc,e),Object(i.createElement)(Ec,e)))}const xc=(e={})=>{const t=Sc(e),n=yc(e);return t&&n};function Tc(e,t){const n=Object(m.getBlockSupport)(e,Bc);if("boolean"!=typeof n[t])return n[t]}const Nc=[...jc,"__experimentalBorder","color",Bc],Pc=e=>Nc.some(t=>Object(m.hasBlockSupport)(e,t));function Lc(e){if(Object(u.startsWith)(e,"var:")){return`var(--wp--${e.slice("var:".length).split("|").join("--")})`}return e}function Ac(e={}){const t={};return Object.keys(m.__EXPERIMENTAL_STYLE_PROPERTY).forEach(n=>{const o=m.__EXPERIMENTAL_STYLE_PROPERTY[n].value,r=m.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;Object(u.has)(e,o)&&"elements"!==Object(u.first)(o)&&(r?r.forEach(r=>{t[n+Object(u.capitalize)(r)]=Lc(Object(u.get)(e,[...o,r]))}):t[n]=Lc(Object(u.get)(e,o)))}),t}const Rc={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":["color"],__experimentalSkipFontSizeSerialization:["typography","fontSize"],__experimentalSkipTypographySerialization:Object(u.without)(jc,"fontSize").map(e=>{var t;return null===(t=Object(u.find)(m.__EXPERIMENTAL_STYLE_PROPERTY,t=>Object(u.isEqual)(t.support,[e])))||void 0===t?void 0:t.value})};function Mc(e,t,n){if(!Pc(t))return e;let{style:o}=n;return Object(u.forEach)(Rc,(e,n)=>{Object(m.getBlockSupport)(t,n)&&(o=Object(u.omit)(o,e))}),e.style={...Ac(o),...e.style},e}const Dc=Object(d.createHigherOrderComponent)(e=>t=>{const n=Mn();return Object(i.createElement)(i.Fragment,null,n&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(vc,t),Object(i.createElement)(cr,t),Object(i.createElement)(Pr,t),Object(i.createElement)(Ic,t)),Object(i.createElement)(e,t))},"withToolbarControls"),Fc=Object(d.createHigherOrderComponent)(e=>t=>{var n,o;if(!(null===(n=t.attributes.style)||void 0===n?void 0:n.elements))return Object(i.createElement)(e,t);const r="wp-elements-"+Object(d.useInstanceId)(e),c=function(e,t={}){return Object(u.map)(t,(t,n)=>{const o=Ac(t);return Object(u.isEmpty)(o)?"":[`.${e} ${m.__EXPERIMENTAL_ELEMENTS[n]}{`,...Object(u.map)(o,(e,t)=>`\t${Object(u.kebabCase)(t)}: ${e}${"link"===n?"!important":""};`),"}"].join("\n")}).join("\n")}(r,null===(o=t.attributes.style)||void 0===o?void 0:o.elements);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",{dangerouslySetInnerHTML:{__html:c}}),Object(i.createElement)(e,Object(l.a)({},t,{className:a()(t.classname,r)})))});Object(b.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Pc(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(b.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Mc),Object(b.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Pc(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Mc(o,e,n)},e})),Object(b.addFilter)("editor.BlockEdit","core/style/with-block-controls",Dc),Object(b.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Fc);var Vc=function({value:e,onChange:t,onToggle:n,duotonePalette:o,colorPalette:r,disableCustomColors:c}){return Object(i.createElement)(p.Popover,{className:"block-editor-duotone-control__popover",headerTitle:Object(j.__)("Duotone"),onFocusOutside:n},Object(i.createElement)(p.MenuGroup,{label:Object(j.__)("Duotone")},Object(i.createElement)(p.DuotonePicker,{colorPalette:r,duotonePalette:o,disableCustomColors:c,value:e,onChange:t})))};var zc=function({colorPalette:e,duotonePalette:t,disableCustomColors:n,value:o,onChange:r}){const[c,l]=Object(i.useState)(!1);if(!t)return null;const s=()=>{l(e=>!e)};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.ToolbarButton,{showTooltip:!0,onClick:s,"aria-haspopup":"true","aria-expanded":c,onKeyDown:e=>{c||e.keyCode!==cc.DOWN||(e.preventDefault(),e.stopPropagation(),s())},label:Object(j.__)("Apply duotone filter"),icon:Object(i.createElement)(p.DuotoneSwatch,{values:o})}),c&&Object(i.createElement)(Vc,{value:o,onChange:r,onToggle:s,duotonePalette:t,colorPalette:e,disableCustomColors:n}))};function Hc(e=[]){const t={r:[],g:[],b:[]};return e.forEach(e=>{const n=To()(e);t.r.push(n._r/255),t.g.push(n._g/255),t.b.push(n._b/255)}),t}function Gc({selector:e,id:t,values:n}){const o=`\n${e} {\n\tfilter: url( #${t} );\n}\n`;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.SVG,{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"}},Object(i.createElement)("defs",null,Object(i.createElement)("filter",{id:t},Object(i.createElement)("feColorMatrix",{type:"matrix",values:".299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 0 0 0 1 0"}),Object(i.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},Object(i.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),Object(i.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),Object(i.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}))))),Object(i.createElement)("style",{dangerouslySetInnerHTML:{__html:o}}))}function Uc({attributes:e,setAttributes:t}){var n;const o=null==e?void 0:e.style,r=null==o||null===(n=o.color)||void 0===n?void 0:n.duotone,c=Io("color.duotone"),l=Io("color.palette"),s=!Io("color.custom");return Object(i.createElement)(Gn,{group:"block"},Object(i.createElement)(zc,{duotonePalette:c,colorPalette:l,disableCustomColors:s,value:r,onChange:e=>{const n={...o,color:{...null==o?void 0:o.color,duotone:e}};t({style:n})}}))}const Wc=Object(d.createHigherOrderComponent)(e=>t=>{const n=Object(m.hasBlockSupport)(t.name,"color.__experimentalDuotone");return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(e,t),n&&Object(i.createElement)(Uc,t))},"withDuotoneControls"),Kc=Object(d.createHigherOrderComponent)(e=>t=>{var n,o,r;const c=Object(m.getBlockSupport)(t.name,"color.__experimentalDuotone"),s=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(r=o.color)||void 0===r?void 0:r.duotone;if(!c||!s)return Object(i.createElement)(e,t);const u="wp-duotone-filter-"+Object(d.useInstanceId)(e),b=c.split(",").map(e=>`.${u} ${e.trim()}`).join(", "),p=a()(null==t?void 0:t.classname,u);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Gc,{selector:b,id:u,values:Hc(s)}),Object(i.createElement)(e,Object(l.a)({},t,{className:p})))},"withDuotoneStyles");Object(b.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return Object(m.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(b.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",Wc),Object(b.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",Kc);var $c=function({icon:e,size:t=24,...n}){return Object(i.cloneElement)(e,{width:t,height:t,...n})};function qc({setAttributes:e,attributes:t}){const{layout:n={}}=t,{wideSize:o,contentSize:r,inherit:c=!1}=n,l=Io("layout"),s=Object(f.useSelect)(e=>{const{getSettings:t}=e(Rn);return t().supportsLayout},[]),a=Object(p.__experimentalUseCustomUnits)({availableUnits:Io("layout.units")||["%","px","em","rem","vw"]});return s?Object(i.createElement)(_o,null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Layout")},!!l&&Object(i.createElement)(p.ToggleControl,{label:Object(j.__)("Inherit default layout"),checked:!!c,onChange:()=>e({layout:{inherit:!c}})}),!c&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-hooks__layout-controls"},Object(i.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},Object(i.createElement)(p.__experimentalUnitControl,{label:Object(j.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:t=>{t=0>parseFloat(t)?"0":t,e({layout:{...n,contentSize:t}})},units:a}),Object(i.createElement)($c,{icon:Kn})),Object(i.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},Object(i.createElement)(p.__experimentalUnitControl,{label:Object(j.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:t=>{t=0>parseFloat(t)?"0":t,e({layout:{...n,wideSize:t}})},units:a}),Object(i.createElement)($c,{icon:qn}))),Object(i.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},Object(i.createElement)(p.Button,{isSecondary:!0,isSmall:!0,disabled:!r&&!o,onClick:()=>e({layout:{contentSize:void 0,wideSize:void 0,inherit:!1}})},Object(j.__)("Reset")))),Object(i.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},Object(j.__)("Customize the width for all elements that are assigned to the center or wide columns.")))):null}const Yc=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n}=t;return[Object(m.hasBlockSupport)(n,"__experimentalLayout")&&Object(i.createElement)(qc,Object(l.a)({key:"layout"},t)),Object(i.createElement)(e,Object(l.a)({key:"edit"},t))]},"withInspectorControls"),Xc=Object(d.createHigherOrderComponent)(e=>t=>{const{name:n,attributes:o}=t,r=Object(m.hasBlockSupport)(n,"__experimentalLayout"),c=Object(d.useInstanceId)(e),s=Io("layout")||{};if(!r)return Object(i.createElement)(e,t);const{layout:u={}}=o,b=u&&u.inherit?s:u,p=a()(null==t?void 0:t.className,"wp-container-"+c);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(eo,{selector:".wp-container-"+c,layout:b}),Object(i.createElement)(e,Object(l.a)({},t,{className:p})))});Object(b.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return Object(u.has)(e.attributes,["layout","type"])||Object(m.hasBlockSupport)(e,"__experimentalLayout")&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),Object(b.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Xc),Object(b.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",Yc);const Qc=[];function Zc({borderColor:e,style:t}){var n;const o=(null==t?void 0:t.border)||{},r=Lo("border-color",e);return{className:a()({[r]:!!r,"has-border-color":e||(null==t||null===(n=t.border)||void 0===n?void 0:n.color)})||void 0,style:Ac({border:o})}}function Jc(e){const t=Io("color.palette")||Qc,n=Zc(e);if(e.borderColor){const o=No(t,e.borderColor);n.style.borderColor=o.color}return n}const el=[];function tl(e){var t,n,o,r,c,l;const{backgroundColor:i,textColor:s,gradient:u,style:d}=e,b=Lo("background-color",i),m=Lo("color",s),p=Ro(u),f=p||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:a()(m,p,{[b]:!f&&!!b,"has-text-color":s||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":i||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(c=d.elements)||void 0===c||null===(l=c.link)||void 0===l?void 0:l.color})||void 0,style:Ac({color:(null==d?void 0:d.color)||{}})}}function nl(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=Io("color.palette")||el,c=Io("color.gradients")||el,l=tl(e);if(t){const e=No(r,t);l.style.backgroundColor=e.color}if(o&&(l.style.background=Mo(c,o)),n){const e=No(r,n);l.style.color=e.color}return l}const ol=[];function rl(e,t){const n=Object(u.reduce)(e,(e,t)=>({...e,...Object(u.isString)(t)?{[t]:Object(u.kebabCase)(t)}:t}),{});return Object(d.compose)([t,e=>class extends i.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){return To.a.mostReadable(t,Object(u.map)(e,"color")).toHexString()}(t,e)}createSetters(){return Object(u.reduce)(n,(e,t,n)=>{const o=Object(u.upperFirst)(n),r="custom"+o;return e["set"+o]=this.createSetColor(n,r),e},{})}createSetColor(e,t){return n=>{const o=Po(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return Object(u.reduce)(n,(n,r,c)=>{const l=No(t,e[c],e["custom"+Object(u.upperFirst)(c)]),i=o[c];return(null==i?void 0:i.color)===l.color&&i?n[c]=i:n[c]={...l,class:Lo(r,l.slug)},n},{})}render(){return Object(i.createElement)(e,Object(l.a)({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function cl(e){return(...t)=>{const n=(e=>Object(d.createHigherOrderComponent)(t=>n=>Object(i.createElement)(t,Object(l.a)({},n,{colors:e})),"withCustomColorPalette"))(e);return Object(d.createHigherOrderComponent)(rl(t,n),"withCustomColors")}}function ll(...e){const t=Object(d.createHigherOrderComponent)(e=>t=>{const n=Io("color.palette")||ol;return Object(i.createElement)(e,Object(l.a)({},t,{colors:n}))},"withEditorColorPalette");return Object(d.createHigherOrderComponent)(rl(e,t),"withColors")}var il=n("./node_modules/memize/index.js"),sl=n.n(il);var al=({colorSettings:e,...t})=>{const n=e.map(({value:e,onChange:t,...n})=>({...n,colorValue:e,onColorChange:t}));return Object(i.createElement)(fr,Object(l.a)({settings:n,gradients:[],disableCustomGradients:!0},t))};const ul=(e,t,n)=>"function"==typeof e?e(t):!0===e?n:e;function dl({title:e,colorSettings:t,colorPanelProps:n,contrastCheckers:o,detectedBackgroundColor:r,detectedColor:c,panelChildren:s,initialOpen:a}){return Object(i.createElement)(al,Object(l.a)({title:e,initialOpen:a,colorSettings:Object.values(t)},n),o&&(Array.isArray(o)?o.map(({backgroundColor:e,textColor:n,...o})=>(e=ul(e,t,r),n=ul(n,t,c),Object(i.createElement)(hr,Object(l.a)({key:`${e}-${n}`,backgroundColor:e,textColor:n},o)))):Object(u.map)(t,({value:e})=>{let{backgroundColor:n,textColor:s}=o;return n=ul(n||e,t,r),s=ul(s||e,t,c),Object(i.createElement)(hr,Object(l.a)({},o,{key:`${n}-${s}`,backgroundColor:n,textColor:s}))})),"function"==typeof s?s(t):s)}function bl(e){return e.ownerDocument.defaultView.getComputedStyle(e)}const ml=[],pl={textColor:Object(j.__)("Text color"),backgroundColor:Object(j.__)("Background color")},fl=e=>Object(i.createElement)(_o,null,Object(i.createElement)(dl,e));function gl(e,{panelTitle:t=Object(j.__)("Color"),colorPanelProps:n,contrastCheckers:o,panelChildren:r,colorDetector:{targetRef:c,backgroundColorTargetRef:l=c,textColorTargetRef:s=c}={}}={panelTitle:Object(j.__)("Color")},d=[]){const{clientId:b}=O(),m=Io("color.palette")||ml,{attributes:p}=Object(f.useSelect)(e=>{const{getBlockAttributes:t}=e(Rn);return{attributes:t(b)}},[b]),{updateBlockAttributes:g}=Object(f.useDispatch)(Rn),h=Object(i.useCallback)(e=>g(b,e),[g,b]),v=Object(i.useMemo)(()=>sl()((e,t,n,o,r,c)=>({children:l,className:s="",style:d={}})=>{let b={};o?b={[t]:r}:c&&(b={[t]:c});const m={className:a()(s,{[`has-${Object(u.kebabCase)(o)}-${Object(u.kebabCase)(t)}`]:o,[n||"has-"+Object(u.kebabCase)(e)]:o||c}),style:{...b,...d}};return Object(u.isFunction)(l)?l(m):i.Children.map(l,e=>Object(i.cloneElement)(e,{className:a()(e.props.className,m.className),style:{...m.style,...e.props.style||{}}}))},{maxSize:e.length}),[e.length]),k=Object(i.useMemo)(()=>sl()((e,t)=>n=>{const o=t.find(e=>e.color===n);h({[o?Object(u.camelCase)("custom "+e):e]:void 0}),h({[o?e:Object(u.camelCase)("custom "+e)]:o?o.slug:n})},{maxSize:e.length}),[h,e.length]),[_,y]=Object(i.useState)(),[E,C]=Object(i.useState)();return Object(i.useEffect)(()=>{if(!o)return;let e=!1,t=!1;for(const{backgroundColor:n,textColor:r}of Object(u.castArray)(o))if(e||(e=!0===n),t||(t=!0===r),e&&t)break;if(t&&C(bl(s.current).color),e){let e=l.current,t=bl(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=bl(e).backgroundColor;y(t)}},[e.reduce((e,t)=>`${e} | ${p[t.name]} | ${p[Object(u.camelCase)("custom "+t.name)]}`,""),...d]),Object(i.useMemo)(()=>{const c={},l=e.reduce((e,t)=>{"string"==typeof t&&(t={name:t});const{name:n,property:o=n,className:r,panelLabel:l=t.label||pl[n]||Object(u.startCase)(n),componentName:i=Object(u.startCase)(n).replace(/\s/g,""),color:s=t.color,colors:a=m}={...t,color:p[t.name]},d=p[Object(u.camelCase)("custom "+n)],b=d?void 0:a.find(e=>e.slug===s);return e[i]=v(n,o,r,s,b&&b.color,d),e[i].displayName=i,e[i].color=d||b&&b.color,e[i].slug=s,e[i].setColor=k(n,a),c[i]={value:b?b.color:p[Object(u.camelCase)("custom "+n)],onChange:e[i].setColor,label:l,colors:a},a||delete c[i].colors,e},{}),s={title:t,initialOpen:!1,colorSettings:c,colorPanelProps:n,contrastCheckers:o,detectedBackgroundColor:_,detectedColor:E,panelChildren:r};return{...l,ColorPanel:Object(i.createElement)(dl,s),InspectorControlsColorPanel:Object(i.createElement)(fl,s)}},[p,h,E,_,...d])}const hl=[];var Ol=(...e)=>{const t=Object(u.reduce)(e,(e,t)=>(e[t]="custom"+Object(u.upperFirst)(t),e),{});return Object(d.createHigherOrderComponent)(Object(d.compose)([Object(d.createHigherOrderComponent)(e=>t=>{const n=Io("typography.fontSizes")||hl;return Object(i.createElement)(e,Object(l.a)({},t,{fontSizes:n}))},"withFontSizes"),e=>class extends i.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object(u.reduce)(t,(e,t,n)=>(e["set"+Object(u.upperFirst)(n)]=this.createSetFontSize(n,t),e),{})}createSetFontSize(e,t){return n=>{const o=Object(u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object(u.some)(t,r))return null;const c=Object(u.reduce)(Object(u.pickBy)(t,r),(t,o,r)=>{const c=e[r],l=Mr(n,c,e[o]);return t[r]={...l,class:Fr(c)},t},{});return{...o,...c}}render(){return Object(i.createElement)(e,Object(l.a)({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var jl=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var vl=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var kl=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const _l=[{icon:jl,title:Object(j.__)("Align text left"),align:"left"},{icon:vl,title:Object(j.__)("Align text center"),align:"center"},{icon:kl,title:Object(j.__)("Align text right"),align:"right"}],yl={position:"bottom right",isAlternate:!0};var El=function({value:e,onChange:t,alignmentControls:n=_l,label:o=Object(j.__)("Align"),describedBy:r=Object(j.__)("Change text alignment"),isCollapsed:c=!0,isToolbar:s}){function a(n){return()=>t(e===n?void 0:n)}const d=Object(u.find)(n,t=>t.align===e),b=s?p.ToolbarGroup:p.ToolbarDropdownMenu,m=s?{isCollapsed:c}:{};return Object(i.createElement)(b,Object(l.a)({icon:d?d.icon:Object(j.isRTL)()?kl:jl,label:o,toggleProps:{describedBy:r},popoverProps:yl,controls:n.map(t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:c?"menuitemradio":void 0,onClick:a(n)}})},m))};function Cl(e){return Object(i.createElement)(El,Object(l.a)({},e,{isToolbar:!1}))}function Sl(e){return Object(i.createElement)(El,Object(l.a)({},e,{isToolbar:!0}))}const wl=e=>e.name||"",Bl=e=>e.title,Il=e=>e.description||"",xl=e=>e.keywords||[],Tl=e=>e.category,Nl=()=>null;function Pl(e=""){return e=(e=(e=Object(u.deburr)(e)).replace(/^\//,"")).toLowerCase()}const Ll=(e="")=>Object(u.words)(Pl(e)),Al=(e,t,n,o)=>{if(0===Ll(o).length)return e;return Rl(e,o,{getCategory:e=>{var n;return null===(n=Object(u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},Rl=(e=[],t="",n={})=>{if(0===Ll(t).length)return e;const o=e.map(e=>[e,Ml(e,t,n)]).filter(([,e])=>e>0);return o.sort(([,e],[,t])=>t-e),o.map(([e])=>e)};function Ml(e,t,n={}){const{getName:o=wl,getTitle:r=Bl,getDescription:c=Il,getKeywords:l=xl,getCategory:i=Tl,getCollection:s=Nl}=n,a=o(e),d=r(e),b=c(e),m=l(e),p=i(e),f=s(e),g=Pl(t),h=Pl(d);let O=0;if(g===h)O+=30;else if(h.startsWith(g))O+=20;else{const e=[a,d,b,...m,p,f].join(" ");0===((e,t)=>Object(u.differenceWith)(e,Ll(t),(e,t)=>t.includes(e)))(Object(u.words)(g),e).length&&(O+=10)}return 0!==O&&a.startsWith("core/")&&O++,O}var Dl=(e,t)=>{const{categories:n,collections:o,items:r}=Object(f.useSelect)(t=>{const{getInserterItems:n}=t(Rn),{getCategories:o,getCollections:r}=t(m.store);return{categories:o(),collections:r(),items:n(e)}},[e]);return[r,n,o,Object(i.useCallback)(({name:e,initialAttributes:n,innerBlocks:o},r)=>{const c=Object(m.createBlock)(e,n,Object(m.createBlocksFromInnerBlocksTemplate)(o));t(c,void 0,r)},[t])]};var Fl=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));function Vl({icon:e,showColors:t=!1,className:n}){var o;"block-default"===(null===(o=e)||void 0===o?void 0:o.src)&&(e={src:Fl});const r=Object(i.createElement)(p.Icon,{icon:e&&e.src?e.src:e}),c=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return Object(i.createElement)("span",{style:c,className:a()("block-editor-block-icon",n,{"has-colors":t})},r)}var zl={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=Object(f.useSelect)(e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(Rn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}},[]),[o,r,c]=Dl(t,u.noop),l=Object(i.useMemo)(()=>(e.trim()?Al(o,r,c,e):Object(u.orderBy)(o,["frecency"],["desc"])).filter(e=>e.name!==n).slice(0,9),[e,n,o,r,c]);return[Object(i.useMemo)(()=>l.map(e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:"block-"+e.id,value:e,label:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Vl,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}),[l])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:Object(m.createBlock)(t,n,Object(m.createBlocksFromInnerBlocksTemplate)(o))}}};const Hl=[];function Gl({completers:e=Hl}){const{name:t}=O();return Object(i.useMemo)(()=>{let n=e;return t===Object(m.getDefaultBlockName)()&&(n=n.concat([zl])),Object(b.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map(u.clone)),n=Object(b.applyFilters)("editor.Autocomplete.completers",n,t)),n},[e,t])}var Ul=function(e){return Object(i.createElement)(p.Autocomplete,Object(l.a)({},e,{completers:Gl(e)}))};var Wl=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Kl=function({isActive:e,label:t=Object(j.__)("Toggle full height"),onToggle:n,isDisabled:o}){return Object(i.createElement)(p.ToolbarButton,{isActive:e,icon:Wl,label:t,onClick:()=>n(!e),disabled:o})};var $l=function(e){const{label:t=Object(j.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,c=Object(i.createElement)(p.__experimentalAlignmentMatrixControl.Icon,{value:o}),l="block-editor-block-alignment-matrix-control";return Object(i.createElement)(p.Dropdown,{position:"bottom right",className:l,popoverProps:{className:"block-editor-block-alignment-matrix-control__popover",isAlternate:!0},renderToggle:({onToggle:e,isOpen:n})=>Object(i.createElement)(p.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==cc.DOWN||(t.preventDefault(),t.stopPropagation(),e())},label:t,icon:c,showTooltip:!0,disabled:r}),renderContent:()=>Object(i.createElement)(p.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function ql(e){return Object(f.useSelect)(t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(Rn),{getBlockType:r,getActiveBlockVariation:c}=t(m.store),l=n(e),i=r(l);if(!i)return null;const s=o(e),a=c(l,s),u={title:i.title,icon:i.icon,description:i.description,anchor:null==s?void 0:s.anchor};return a?{title:a.title||i.title,icon:a.icon||i.icon,description:a.description||i.description}:u},[e])}function Yl({clientId:e}){const{attributes:t,name:n,reusableBlockTitle:o}=Object(f.useSelect)(t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=t(Rn),c=n(e);if(!c)return{};const l=Object(m.isReusableBlock)(Object(m.getBlockType)(c));return{attributes:o(e),name:c,reusableBlockTitle:l&&r(o(e).ref)}},[e]),r=ql(e);if(!n||!r)return null;const c=Object(m.getBlockType)(n),l=o||Object(m.__experimentalGetBlockLabel)(c,t);return l!==c.title?Object(u.truncate)(l,{length:35}):r.title}var Xl=function(){const{selectBlock:e,clearSelectedBlock:t}=Object(f.useDispatch)(Rn),{clientId:n,parents:o,hasSelection:r}=Object(f.useSelect)(e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(Rn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}},[]);return Object(i.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(j.__)("Block breadcrumb")},Object(i.createElement)("li",{className:r?void 0:"block-editor-block-breadcrumb__current","aria-current":r?void 0:"true"},r&&Object(i.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:t},Object(j.__)("Document")),!r&&Object(j.__)("Document")),o.map(t=>Object(i.createElement)("li",{key:t},Object(i.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:()=>e(t)},Object(i.createElement)(Yl,{clientId:t})))),!!n&&Object(i.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(i.createElement)(Yl,{clientId:n})))};const Ql=Object(i.createContext)({});function Zl({value:e,children:t}){const n=Object(i.useContext)(Ql),o=Object(i.useMemo)(()=>({...n,...e}),[n,e]);return Object(i.createElement)(Ql.Provider,{value:o,children:t})}var Jl=Ql;const ei=()=>Object(i.createElement)(p.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(i.createElement)(p.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),ti=({style:e,className:t})=>Object(i.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(i.createElement)("div",{className:t+" block-library-colors-selector__state-selection",style:e},Object(i.createElement)(ei,null))),ni=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(j.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==cc.DOWN||(e.preventDefault(),e.stopPropagation(),n())},icon:Object(i.createElement)(t,null,Object(i.createElement)(e,null,Object(i.createElement)(ti,null)))}));var oi=({children:e,...t})=>Object(i.createElement)(p.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:ni(t),renderContent:()=>e});const ri={};var ci=Object(p.withFilters)("editor.BlockEdit")(e=>{const{attributes:t={},name:n}=e,o=Object(m.getBlockType)(n),r=Object(i.useContext)(Jl),c=Object(i.useMemo)(()=>o&&o.usesContext?Object(u.pick)(r,o.usesContext):ri,[o,r]);if(!o)return null;const s=o.edit||o.save;if(o.apiVersion>1||Object(m.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(i.createElement)(s,Object(l.a)({},e,{context:c}));const d=Object(m.hasBlockSupport)(o,"className",!0)?Object(m.getBlockDefaultClassName)(n):null,b=a()(d,t.className);return Object(i.createElement)(s,Object(l.a)({},e,{context:c,className:b}))});function li(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return Object(i.createElement)(h,{value:Object(i.useMemo)(()=>r,Object.values(r))},Object(i.createElement)(ci,e))}var ii=Object(i.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(Un.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));var si=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),ai=n("./node_modules/react-spring/web.cjs.js"),ui=n("@wordpress/dom");const di=e=>e+1,bi=e=>({top:e.offsetTop,left:e.offsetLeft});var mi=function({isSelected:e,adjustScrolling:t,enableAnimation:n,triggerAnimationOnChange:o}){const r=Object(i.useRef)(),c=Object(d.useReducedMotion)()||!n,[l,s]=Object(i.useReducer)(di,0),[a,u]=Object(i.useReducer)(di,0),[b,m]=Object(i.useState)({x:0,y:0}),p=Object(i.useMemo)(()=>r.current?bi(r.current):null,[o]),f=Object(i.useMemo)(()=>{if(!t||!r.current)return()=>{};const e=Object(ui.getScrollContainer)(r.current);if(!e)return()=>{};const n=r.current.getBoundingClientRect();return()=>{const t=r.current.getBoundingClientRect().top-n.top;t&&(e.scrollTop+=t)}},[o,t]);function g({x:t,y:n}){t=Math.round(t),n=Math.round(n),t===g.x&&n===g.y||(!function({x:t,y:n}){if(!r.current)return;const o=0===t&&0===n;r.current.style.transformOrigin=o?"":"center",r.current.style.transform=o?"":`translate3d(${t}px,${n}px,0)`,r.current.style.zIndex=!e||o?"":"1",f()}({x:t,y:n}),g.x=t,g.y=n)}return Object(i.useLayoutEffect)(()=>{l&&u()},[l]),Object(i.useLayoutEffect)(()=>{if(!p)return;if(c)return void f();r.current.style.transform="";const e=bi(r.current);s(),m({x:Math.round(p.left-e.left),y:Math.round(p.top-e.top)})},[o]),g.x=0,g.y=0,Object(ai.useSpring)({from:{x:b.x,y:b.y},to:{x:0,y:0},reset:l!==a,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:g}),r};const pi=Object(ai.animated)(p.__experimentalTreeGridRow);function fi({isSelected:e,position:t,level:n,rowCount:o,children:r,className:c,path:s,...u}){const d=mi({isSelected:e,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s.join("_")});return Object(i.createElement)(pi,Object(l.a)({ref:d,className:a()("block-editor-block-navigation-leaf",c),level:n,positionInSet:t,setSize:o},u),r)}var gi=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var hi=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Oi=Object(i.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(Un.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var ji=Object(i.createElement)(Un.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(Un.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function vi(e,t,n,o,r,c,l){const i=n+1,s=e=>"up"===e?"horizontal"===l?Object(j.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===l?Object(j.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const c=t+1;if(r<0&&n)return Object(j.__)("Blocks cannot be moved up as they are already at the top");if(r>0&&o)return Object(j.__)("Blocks cannot be moved down as they are already at the bottom");if(r<0&&!n)return Object(j.sprintf)(Object(j._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,c);if(r>0&&!o)return Object(j.sprintf)(Object(j._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c)}(e,n,o,r,c);if(o&&r)return Object(j.sprintf)(Object(j.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!r){const e=s("down");if("down"===e)return Object(j.sprintf)(Object(j.__)("Move %1$s block from position %2$d down to position %3$d"),t,i,i+1);if("left"===e)return Object(j.sprintf)(Object(j.__)("Move %1$s block from position %2$d left to position %3$d"),t,i,i+1);if("right"===e)return Object(j.sprintf)(Object(j.__)("Move %1$s block from position %2$d right to position %3$d"),t,i,i+1)}if(c>0&&r){const e=s("down");if("down"===e)return Object(j.sprintf)(Object(j.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return Object(j.sprintf)(Object(j.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return Object(j.sprintf)(Object(j.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!o){const e=s("up");if("up"===e)return Object(j.sprintf)(Object(j.__)("Move %1$s block from position %2$d up to position %3$d"),t,i,i-1);if("left"===e)return Object(j.sprintf)(Object(j.__)("Move %1$s block from position %2$d left to position %3$d"),t,i,i-1);if("right"===e)return Object(j.sprintf)(Object(j.__)("Move %1$s block from position %2$d right to position %3$d"),t,i,i-1)}if(c<0&&o){const e=s("up");if("up"===e)return Object(j.sprintf)(Object(j.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return Object(j.sprintf)(Object(j.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return Object(j.sprintf)(Object(j.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const ki=(e,t)=>"up"===e?"horizontal"===t?Object(j.isRTL)()?gi:hi:Oi:"down"===e?"horizontal"===t?Object(j.isRTL)()?hi:gi:ji:null,_i=(e,t)=>"up"===e?"horizontal"===t?Object(j.isRTL)()?Object(j.__)("Move right"):Object(j.__)("Move left"):Object(j.__)("Move up"):"down"===e?"horizontal"===t?Object(j.isRTL)()?Object(j.__)("Move left"):Object(j.__)("Move right"):Object(j.__)("Move down"):null,yi=Object(i.forwardRef)(({clientIds:e,direction:t,orientation:n,...o},r)=>{const c=Object(d.useInstanceId)(yi),s=Object(u.castArray)(e).length,{blockType:b,isDisabled:g,rootClientId:h,isFirst:O,isLast:j,firstIndex:v,orientation:k="vertical"}=Object(f.useSelect)(o=>{const{getBlockIndex:r,getBlockRootClientId:c,getBlockOrder:l,getBlock:i,getBlockListSettings:s}=o(Rn),a=Object(u.castArray)(e),d=Object(u.first)(a),b=c(d),p=r(d,b),f=r(Object(u.last)(a),b),g=l(b),h=i(d),O=0===p,j=f===g.length-1,{orientation:v}=s(b)||{};return{blockType:h?Object(m.getBlockType)(h.name):null,isDisabled:"up"===t?O:j,rootClientId:b,firstIndex:p,isFirst:O,isLast:j,orientation:n||v}},[e,t]),{moveBlocksDown:_,moveBlocksUp:y}=Object(f.useDispatch)(Rn),E="up"===t?y:_,C="block-editor-block-mover-button__description-"+c;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.Button,Object(l.a)({ref:r,className:a()("block-editor-block-mover-button",`is-${t}-button`),icon:ki(t,k),label:_i(t,k),"aria-describedby":C},o,{onClick:g?null:t=>{E(e,h),o.onClick&&o.onClick(t)},"aria-disabled":g})),Object(i.createElement)("span",{id:C,className:"block-editor-block-mover-button__description"},vi(s,b&&b.title,v,O,j,"up"===t?-1:1,k)))}),Ei=Object(i.forwardRef)((e,t)=>Object(i.createElement)(yi,Object(l.a)({direction:"up",ref:t},e))),Ci=Object(i.forwardRef)((e,t)=>Object(i.createElement)(yi,Object(l.a)({direction:"down",ref:t},e))),Si=Object(i.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),wi=()=>Object(i.useContext)(Si);var Bi=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Ii=function({className:e,actions:t,children:n,secondaryActions:o}){return Object(i.createElement)("div",{className:a()(e,"block-editor-warning")},Object(i.createElement)("div",{className:"block-editor-warning__contents"},Object(i.createElement)("p",{className:"block-editor-warning__message"},n),(i.Children.count(t)>0||o)&&Object(i.createElement)("div",{className:"block-editor-warning__actions"},i.Children.count(t)>0&&i.Children.map(t,(e,t)=>Object(i.createElement)("span",{key:t,className:"block-editor-warning__action"},e)),o&&Object(i.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:Bi,label:Object(j.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},()=>Object(i.createElement)(p.MenuGroup,null,o.map((e,t)=>Object(i.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))},xi=n("./node_modules/diff/lib/diff/character.js");var Ti=({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:c})=>Object(i.createElement)("div",{className:c},Object(i.createElement)("div",{className:"block-editor-block-compare__content"},Object(i.createElement)("h2",{className:"block-editor-block-compare__heading"},e),Object(i.createElement)("div",{className:"block-editor-block-compare__html"},t),Object(i.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},n)),Object(i.createElement)("div",{className:"block-editor-block-compare__action"},Object(i.createElement)(p.Button,{isSecondary:!0,tabIndex:"0",onClick:o},r)));var Ni=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const c={rawContent:e.originalContent,renderedContent:Object(m.getSaveElement)(e.name,e.attributes)},l=function(e){const t=Object(u.castArray)(e),n=t.map(e=>Object(m.getSaveContent)(e.name,e.attributes,e.innerBlocks)),o=t.map(e=>Object(m.getSaveElement)(e.name,e.attributes,e.innerBlocks));return{rawContent:n.join(""),renderedContent:o}}(o(e)),s=(d=c.rawContent,b=l.rawContent,Object(xi.diffChars)(d,b).map((e,t)=>{const n=a()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(i.createElement)("span",{key:t,className:n},e.value)}));var d,b;return Object(i.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(i.createElement)(Ti,{title:Object(j.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:Object(j.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(i.createElement)(Ti,{title:Object(j.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:s,renderedContent:l.renderedContent}))};const Pi=e=>Object(m.rawHandler)({HTML:e.originalContent});var Li=Object(d.compose)([Object(f.withSelect)((e,{clientId:t})=>({block:e(Rn).getBlock(t)})),Object(f.withDispatch)((e,{block:t})=>{const{replaceBlock:n}=e(Rn);return{convertToClassic(){n(t.clientId,(e=>Object(m.createBlock)("core/freeform",{content:e.originalContent}))(t))},convertToHTML(){n(t.clientId,(e=>Object(m.createBlock)("core/html",{content:e.originalContent}))(t))},convertToBlocks(){n(t.clientId,Pi(t))},attemptBlockRecovery(){n(t.clientId,(({name:e,attributes:t,innerBlocks:n})=>Object(m.createBlock)(e,t,n))(t))}}})])((function({convertToHTML:e,convertToBlocks:t,convertToClassic:n,attemptBlockRecovery:o,block:r}){const c=!!Object(m.getBlockType)("core/html"),[l,s]=Object(i.useState)(!1),a=Object(i.useCallback)(()=>s(!0),[]),u=Object(i.useCallback)(()=>s(!1),[]),d=Object(i.useMemo)(()=>[{title:Object(j._x)("Resolve","imperative verb"),onClick:a},c&&{title:Object(j.__)("Convert to HTML"),onClick:e},{title:Object(j.__)("Convert to Classic Block"),onClick:n}].filter(Boolean),[a,e,n]);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ii,{actions:[Object(i.createElement)(p.Button,{key:"recover",onClick:o,isPrimary:!0},Object(j.__)("Attempt Block Recovery"))],secondaryActions:d},Object(j.__)("This block contains unexpected or invalid content.")),l&&Object(i.createElement)(p.Modal,{title:Object(j.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare"},Object(i.createElement)(Ni,{block:r,onKeep:e,onConvert:t,convertor:Pi,convertButtonText:Object(j.__)("Convert to Blocks")})))}));const Ai=Object(i.createElement)(Ii,{className:"block-editor-block-list__block-crash-warning"},Object(j.__)("This block has encountered an error and cannot be previewed."));var Ri=()=>Ai;class Mi extends i.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var Di=Mi,Fi=n("./node_modules/react-autosize-textarea/lib/index.js"),Vi=n.n(Fi);var zi=function({clientId:e}){const[t,n]=Object(i.useState)(""),o=Object(f.useSelect)(t=>t(Rn).getBlock(e),[e]),{updateBlock:r}=Object(f.useDispatch)(Rn);return Object(i.useEffect)(()=>{n(Object(m.getBlockContent)(o))},[o]),Object(i.createElement)(Vi.a,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const c=Object(m.getBlockType)(o.name),l=Object(m.getBlockAttributes)(c,t,o.attributes),i=t||Object(m.getSaveContent)(c,l),s=!t||Object(m.isValidBlockContent)(c,l,i);r(e,{attributes:l,originalContent:i,isValid:s}),t||n({content:i})},onChange:e=>n(e.target.value)})};function Hi(e,t){return t.closest(".wp-block")===e}function Gi(e){const t=Object(i.useRef)(),n=function(e){return Object(f.useSelect)(t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:c}=t(Rn);if(c(e)&&!o()&&!r())return n()},[e])}(e);return Object(i.useEffect)(()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=ui.focus.tabbable.find(t.current).filter(e=>Object(ui.isTextField)(e)),r=-1===n,c=(r?u.last:u.first)(o)||t.current;Hi(t.current,c)&&!c.closest(".block-list-appender")?Object(ui.placeCaretAtHorizontalEdge)(c,r):t.current.focus()},[n]),t}function Ui(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Wi(){const e=Object(f.useSelect)(e=>{const{isNavigationMode:t,getSettings:n}=e(Rn);return t()||n().outlineMode},[]);return Object(d.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",Ui),t.addEventListener("mouseover",Ui),()=>{t.removeEventListener("mouseout",Ui),t.removeEventListener("mouseover",Ui),t.classList.remove("is-hovered")}},[e])}function Ki(e){return Object(f.useSelect)(t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:c,getBlockName:l,getSettings:i,hasSelectedInnerBlock:s,__experimentalGetActiveBlockIdByBlockNames:u}=t(Rn),{__experimentalSpotlightEntityBlocks:d}=i(),b=n(e),p=r(e),f=l(e),g=s(e,!0),h=u(d);return a()({"is-selected":p,"is-highlighted":o(e),"is-multi-selected":c(e),"is-reusable":Object(m.isReusableBlock)(Object(m.getBlockType)(f)),"is-dragging":b,"has-child-selected":g,"has-active-entity":h,"is-active-entity":h===e})},[e])}function $i(e){return Object(f.useSelect)(t=>{const n=t(Rn).getBlockName(e),o=Object(m.getBlockType)(n);if(o.apiVersion>1||Object(m.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(m.getBlockDefaultClassName)(n)},[e])}function qi(e){return Object(f.useSelect)(t=>{const{getBlockName:n,getBlockAttributes:o}=t(Rn),{className:r}=o(e);if(!r)return;const c=Object(m.getBlockType)(n(e));return c.apiVersion>1||Object(m.hasBlockSupport)(c,"lightBlockWrapper",!1)?r:void 0},[e])}function Yi(e){return Object(f.useSelect)(t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:c,isBlockSelected:l}=t(Rn);if(!l(e))return;const i=n();return i?a()("is-block-moving-mode",{"can-insert-moving-block":o(r(i),c(e))}):void 0},[e])}function Xi(e){const{isBlockSelected:t}=Object(f.useSelect)(Rn),{selectBlock:n,selectionChange:o}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(r=>{function c(c){t(e)?c.target.isContentEditable||o(e):Hi(r,c.target)&&n(e)}return r.addEventListener("focusin",c),()=>{r.removeEventListener("focusin",c)}},[t,n])}function Qi(e){const t=Object(f.useSelect)(t=>t(Rn).isBlockSelected(e),[e]),{getBlockRootClientId:n,getBlockIndex:o}=Object(f.useSelect)(Rn),{insertDefaultBlock:r,removeBlock:c}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(l=>{if(t)return l.addEventListener("keydown",i),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",i),l.removeEventListener("dragstart",s)};function i(t){const{keyCode:i,target:s}=t;i!==cc.ENTER&&i!==cc.BACKSPACE&&i!==cc.DELETE||s!==l||Object(ui.isTextField)(s)||(t.preventDefault(),i===cc.ENTER?r({},n(e),o(e)+1):c(e))}function s(e){e.preventDefault()}},[e,t,n,o,r,c])}function Zi(e){const{isNavigationMode:t,isBlockSelected:n}=Object(f.useSelect)(Rn),{setNavigationMode:o,selectBlock:r}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(c=>{function l(c){t()&&!c.defaultPrevented&&(c.preventDefault(),n(e)?o(!1):r(e))}return c.addEventListener("mousedown",l),()=>{c.addEventListener("mousedown",l)}},[e,t,n,o])}var Ji=n("./node_modules/dom-scroll-into-view/lib/index.js"),es=n.n(Ji);function ts(e){const t=Object(i.useRef)(),n=Object(f.useSelect)(t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Rn);return n(e)||o()===e},[e]);return Object(i.useEffect)(()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=Object(ui.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&es()(e,o,{onlyScrollIfNeeded:!0})},[n]),t}function ns(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach(e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")})}function os(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=Object(f.useDispatch)(Rn),{isSelectionEnabled:c,isBlockSelected:l,getBlockParents:i,getBlockSelectionStart:s,hasMultiSelection:a}=Object(f.useSelect)(Rn);return Object(d.useRefEffect)(u=>{const{ownerDocument:d}=u,{defaultView:b}=d;let m,p;function f({isSelectionEnd:t}){const n=b.getSelection();if(!n.rangeCount||n.isCollapsed)return void ns(u,!0);const c=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(".wp-block");return t?t.id.slice("block-".length):void 0}(n.focusNode);if(e===c){if(r(e),t&&(ns(u,!0),n.rangeCount)){const{commonAncestorContainer:e}=n.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...i(e),e],n=[...i(c),c],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",f),b.removeEventListener("mouseup",g),p=b.requestAnimationFrame(()=>{f({isSelectionEnd:!0}),n()})}function h({buttons:n}){1===n&&c()&&l(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",f),b.addEventListener("mouseup",g),ns(u,!1))}function O(t){if(c()&&0===t.button)if(t.shiftKey){const n=s();n!==e&&(ns(u,!1),o(n,e),t.preventDefault())}else a()&&r(e)}return u.addEventListener("mousedown",O),u.addEventListener("mouseleave",h),()=>{u.removeEventListener("mousedown",O),u.removeEventListener("mouseleave",h),d.removeEventListener("selectionchange",f),b.removeEventListener("mouseup",g),b.cancelAnimationFrame(p)}},[e,t,n,o,r,c,l,i])}var rs=n("@wordpress/html-entities");var cs=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const ls=[Object(i.createInterpolateElement)(Object(j.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(i.createElement)("kbd",null)}),Object(i.createInterpolateElement)(Object(j.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(i.createElement)("kbd",null)}),Object(i.createInterpolateElement)(Object(j.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(i.createElement)("kbd",null)}),Object(j.__)("Drag files into the editor to automatically insert media blocks."),Object(j.__)("Change a block's type by pressing the block icon on the toolbar.")];var is=function(){const[e]=Object(i.useState)(Math.floor(Math.random()*ls.length));return Object(i.createElement)(p.Tip,null,ls[e])};var ss=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var as=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));var us=function e({className:t,onChange:n,value:o,label:r,placeholder:c}){const l=Object(d.useInstanceId)(e),s=Object(i.useRef)();return Object(i.createElement)("div",{className:a()("block-editor-inserter__search",t)},Object(i.createElement)(p.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-"+l},r||c),Object(i.createElement)("input",{ref:s,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-"+l,type:"search",placeholder:c,onChange:e=>n(e.target.value),autoComplete:"off",value:o||""}),Object(i.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(i.createElement)(p.Button,{icon:ss,label:Object(j.__)("Reset search"),onClick:()=>{n(""),s.current.focus()}}),!o&&Object(i.createElement)($c,{icon:as})))};var ds=function({title:e,icon:t,description:n,blockType:o}){return o&&(Bt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o)),Object(i.createElement)("div",{className:"block-editor-block-card"},Object(i.createElement)(Vl,{icon:t,showColors:!0}),Object(i.createElement)("div",{className:"block-editor-block-card__content"},Object(i.createElement)("h2",{className:"block-editor-block-card__title"},e),Object(i.createElement)("span",{className:"block-editor-block-card__description"},n)))};function bs({clientId:e=null,value:t,selection:n,onChange:o=u.noop,onInput:r=u.noop}){const c=Object(f.useRegistry)(),{resetBlocks:l,resetSelection:s,replaceInnerBlocks:a,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:b}=c.dispatch(Rn),{getBlockName:p,getBlocks:g}=c.select(Rn),h=Object(i.useRef)({incoming:null,outgoing:[]}),O=Object(i.useRef)(!1),j=Object(i.useRef)(r),v=Object(i.useRef)(o);Object(i.useEffect)(()=>{j.current=r,v.current=o},[r,o]),Object(i.useEffect)(()=>{h.current.outgoing.includes(t)?Object(u.last)(h.current.outgoing)===t&&(h.current.outgoing=[]):g(e)!==t&&(h.current.outgoing=[],(()=>{if(t)if(b(),e){d(e,!0),b();const n=t.map(e=>Object(m.cloneBlock)(e));O.current&&(h.current.incoming=n),a(e,n)}else O.current&&(h.current.incoming=t),l(t)})(),n&&s(n.selectionStart,n.selectionEnd,n.initialPosition))},[t,e]),Object(i.useEffect)(()=>{const{getSelectionStart:t,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=c.select(Rn);let i=g(e),s=r(),a=!1;O.current=!0;const u=c.subscribe(()=>{if(null!==e&&null===p(e))return;const c=r(),u=g(e),d=u!==i;if(i=u,d&&(h.current.incoming||l()))return h.current.incoming=null,void(s=c);if(d||a&&!d&&c&&!s){s=c,h.current.outgoing.push(i);(s?v.current:j.current)(i,{selection:{selectionStart:t(),selectionEnd:n(),initialPosition:o()}})}a=d});return()=>u()},[c,e])}var ms=Object(d.createHigherOrderComponent)(e=>Object(f.withRegistry)(({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return Object(i.createElement)(e,Object(l.a)({registry:n},o));const[r,c]=Object(i.useState)(null);return Object(i.useEffect)(()=>{const e=Object(f.createRegistry)({},n);e.registerStore(xt,An),c(e)},[n]),r?Object(i.createElement)(f.RegistryProvider,{value:r},Object(i.createElement)(e,Object(l.a)({registry:r},o))):null}),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=Object(f.useDispatch)(Rn);return Object(i.useEffect)(()=>{o(n)},[n]),bs(e),Object(i.createElement)(jr,null,t)}));function ps({onClick:e}){return Object(i.createElement)("div",{tabIndex:0,role:"button",onClick:e,onKeyPress:e},Object(i.createElement)(p.Disabled,null,Object(i.createElement)(yu,null)))}let fs;var gs=function({viewportWidth:e,__experimentalPadding:t}){const[n,{width:o}]=Object(d.useResizeObserver)(),[r,{height:c}]=Object(d.useResizeObserver)();fs=fs||Object(d.pure)(yu);const l=(o-2*t)/e;return Object(i.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:c*l+2*t}},n,Object(i.createElement)(p.Disabled,{style:{transform:`scale(${l})`,width:e,left:t,right:t,top:t},className:"block-editor-block-preview__content"},r,Object(i.createElement)(fs,null)))};var hs=Object(i.memo)((function({blocks:e,__experimentalPadding:t=0,viewportWidth:n=1200,__experimentalLive:o=!1,__experimentalOnClick:r}){const c=Object(f.useSelect)(e=>e(Rn).getSettings(),[]),l=Object(i.useMemo)(()=>{const e={...c};return e.__experimentalBlockPatterns=[],e},[c]),s=Object(i.useMemo)(()=>Object(u.castArray)(e),[e]);return e&&0!==e.length?Object(i.createElement)(ms,{value:s,settings:l},o?Object(i.createElement)(ps,{onClick:r}):Object(i.createElement)(gs,{viewportWidth:n,__experimentalPadding:t})):null}));var Os=function({item:e}){var t,n;const{name:o,title:r,icon:c,description:l,initialAttributes:s}=e,a=Object(m.getBlockType)(o),u=Object(m.isReusableBlock)(e);return Object(i.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(i.createElement)("div",{className:"block-editor-inserter__preview"},u||a.example?Object(i.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(i.createElement)(hs,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=a.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:a.example?Object(m.getBlockFromExample)(e.name,{attributes:{...a.example.attributes,...s},innerBlocks:a.example.innerBlocks}):Object(m.createBlock)(o,s)})):Object(i.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(j.__)("No Preview Available."))),!u&&Object(i.createElement)(ds,{title:r,icon:c,description:l}))};var js=Object(i.createContext)();var vs=Object(i.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){const c=Object(i.useContext)(js);return Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({ref:r,state:c,role:"option",focusable:!0},o),o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?Object(i.createElement)(t,r,n):"function"==typeof n?n(r):Object(i.createElement)(p.Button,r,n)})}));var ks=Object(i.createElement)(Un.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(i.createElement)(Un.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function _s({count:e,icon:t}){return Object(i.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(i.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(i.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(i.createElement)(p.FlexItem,null,t?Object(i.createElement)(Vl,{icon:t}):Object(j.sprintf)(Object(j._n)("%d block","%d blocks",e),e)),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(Vl,{icon:ks})))))}var ys=({isEnabled:e,blocks:t,icon:n,children:o})=>{const r={type:"inserter",blocks:t};return Object(i.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:r,__experimentalDragComponent:Object(i.createElement)(_s,{count:t.length,icon:n})},({onDraggableStart:t,onDraggableEnd:n})=>o({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0}))};function Es(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var Cs=Object(i.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:c,...s}){const u=Object(i.useRef)(!1),d=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},b=Object(i.useMemo)(()=>[Object(m.createBlock)(n.name,n.initialAttributes,Object(m.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))],[n.name,n.initialAttributes,n.initialAttributes]);return Object(i.createElement)(ys,{isEnabled:c&&!n.disabled,blocks:b,icon:n.icon},({draggable:c,onDragStart:b,onDragEnd:m})=>Object(i.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:c,onDragStart:e=>{u.current=!0,b&&(r(null),b(e))},onDragEnd:e=>{u.current=!1,m&&m(e)}},Object(i.createElement)(vs,Object(l.a)({isFirst:t,className:a()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,Es()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===cc.ENTER&&(e.preventDefault(),o(n,Es()?e.metaKey:e.ctrlKey),r(null))},onFocus:()=>{u.current||r(n)},onMouseEnter:()=>{u.current||r(n)},onMouseLeave:()=>r(null),onBlur:()=>r(null)},s),Object(i.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:d},Object(i.createElement)(Vl,{icon:n.icon,showColors:!0})),Object(i.createElement)("span",{className:"block-editor-block-types-list__item-title"},n.title))))}));var Ss=Object(i.forwardRef)((function(e,t){const[n,o]=Object(i.useState)(!1);return Object(i.useEffect)(()=>{n&&Object(St.speak)(Object(j.__)("Use left and right arrow keys to move through blocks"))},[n]),Object(i.createElement)("div",Object(l.a)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))}));var ws=Object(i.forwardRef)((function(e,t){const n=Object(i.useContext)(js);return Object(i.createElement)(p.__unstableCompositeGroup,Object(l.a)({state:n,role:"presentation",ref:t},e))}));var Bs=function({items:e=[],onSelect:t,onHover:n=(()=>{}),children:o,label:r,isDraggable:c=!0}){return Object(i.createElement)(Ss,{className:"block-editor-block-types-list","aria-label":r},function(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}(e,3).map((e,o)=>Object(i.createElement)(ws,{key:o},e.map((e,r)=>Object(i.createElement)(Cs,{key:e.id,item:e,className:Object(m.getBlockMenuDefaultClassName)(e.id),onSelect:t,onHover:n,isDraggable:c,isFirst:0===o&&0===r})))),o)};var Is=function({title:e,icon:t,children:n}){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(i.createElement)("h2",{className:"block-editor-inserter__panel-title"},e),Object(i.createElement)(p.Icon,{icon:t})),Object(i.createElement)("div",{className:"block-editor-inserter__panel-content"},n))};var xs=function({children:e}){const t=Object(p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return Object(i.createElement)(js.Provider,{value:t},e)};var Ts=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o}){const[r,c,l,s]=Dl(e,t),a=Object(i.useMemo)(()=>Object(u.orderBy)(r,["frecency"],["desc"]).slice(0,6),[r]),d=Object(i.useMemo)(()=>r.filter(e=>!e.category),[r]),b=Object(i.useMemo)(()=>Object(u.flow)(e=>e.filter(e=>e.category&&"reusable"!==e.category),e=>Object(u.groupBy)(e,"category"))(r),[r]),m=Object(i.useMemo)(()=>{const e={...l};return Object.keys(l).forEach(t=>{e[t]=r.filter(e=>(e=>e.name.split("/")[0])(e)===t),0===e[t].length&&delete e[t]}),e},[r,l]);return Object(i.useEffect)(()=>()=>n(null),[]),Object(i.createElement)(xs,null,Object(i.createElement)("div",null,o&&!!a.length&&Object(i.createElement)(Is,{title:Object(j._x)("Most used","blocks")},Object(i.createElement)(Bs,{items:a,onSelect:s,onHover:n,label:Object(j._x)("Most used","blocks")})),Object(u.map)(c,e=>{const t=b[e.slug];return t&&t.length?Object(i.createElement)(Is,{key:e.slug,title:e.title,icon:e.icon},Object(i.createElement)(Bs,{items:t,onSelect:s,onHover:n,label:e.title})):null}),d.length>0&&Object(i.createElement)(Is,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(j.__)("Uncategorized")},Object(i.createElement)(Bs,{items:d,onSelect:s,onHover:n,label:Object(j.__)("Uncategorized")})),Object(u.map)(l,(e,t)=>{const o=m[t];return o&&o.length?Object(i.createElement)(Is,{key:t,title:e.title,icon:e.icon},Object(i.createElement)(Bs,{items:o,onSelect:s,onHover:n,label:e.title})):null})))};var Ns=function({selectedCategory:e,patternCategories:t,onClickCategory:n,children:o}){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:a()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(i.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(j.__)("Filter patterns"),hideLabelFromVision:!0,value:e.name,onChange:e=>{n(t.find(t=>e===t.name))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return t.map(t=>e.push({value:t.name,label:t.label})),e})()})),Object(i.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},Ps=n("@wordpress/notices");var Ls=(e,t)=>{const{patternCategories:n,patterns:o}=Object(f.useSelect)(e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Rn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}},[t]),{createSuccessNotice:r}=Object(f.useDispatch)(Ps.store);return[o,n,Object(i.useCallback)((t,n)=>{e(Object(u.map)(n,e=>Object(m.cloneBlock)(e)),t.name),r(Object(j.sprintf)(Object(j.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})},[])]};function As({isDraggable:e,pattern:t,onClick:n,composite:o}){const{name:r,viewportWidth:c}=t,{blocks:s}=Object(f.useSelect)(e=>e(Rn).__experimentalGetParsedPattern(r),[r]),a="block-editor-block-patterns-list__item-description-"+Object(d.useInstanceId)(As);return Object(i.createElement)(ys,{isEnabled:e,blocks:s},({draggable:e,onDragStart:r,onDragEnd:u})=>Object(i.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":t.title,"aria-describedby":t.description?a:void 0,draggable:e,onDragStart:r,onDragEnd:u},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>n(t,s)}),Object(i.createElement)(hs,{blocks:s,viewportWidth:c}),Object(i.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(i.createElement)(p.VisuallyHidden,{id:a},t.description))))}function Rs(){return Object(i.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Ms=function({isDraggable:e,blockPatterns:t,shownPatterns:n,onClickPattern:o,orientation:r,label:c=Object(j.__)("Block Patterns")}){const s=Object(p.__unstableUseCompositeState)({orientation:r});return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},s,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":c}),t.map(t=>n.includes(t)?Object(i.createElement)(As,{key:t.name,pattern:t,onClick:o,isDraggable:e,composite:s}):Object(i.createElement)(Rs,{key:t.name})))};function Ds({rootClientId:e,onInsert:t,selectedCategory:n,onClickCategory:o}){const[r,c,l]=Ls(t,e),s=Object(i.useMemo)(()=>c.filter(e=>r.some(t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})),[r,c]),a=n||s[0];Object(i.useEffect)(()=>{r.some(e=>b(e)===1/0)&&!s.find(e=>"uncategorized"===e.name)&&s.push({name:"uncategorized",label:Object(j._x)("Uncategorized")})},[s,r]);const b=Object(i.useCallback)(e=>{if(!e.categories||!e.categories.length)return 1/0;const t=Object(u.fromPairs)(s.map(({name:e},t)=>[e,t]));return Math.min(...e.categories.map(e=>void 0!==t[e]?t[e]:1/0))},[s]),m=Object(i.useMemo)(()=>r.filter(e=>"uncategorized"===a.name?b(e)===1/0:e.categories&&e.categories.includes(a.name)),[r,a]),p=Object(i.useMemo)(()=>m.sort((e,t)=>b(e)-b(t)),[m,b]),f=Object(d.useAsyncList)(p);return Object(i.createElement)(i.Fragment,null,!!m.length&&Object(i.createElement)(Ns,{selectedCategory:a,patternCategories:s,onClickCategory:o},Object(i.createElement)(Ms,{shownPatterns:f,blockPatterns:m,onClickPattern:l,label:a.label,orientation:"vertical",isDraggable:!0})))}var Fs=function({rootClientId:e,onInsert:t,onClickCategory:n,selectedCategory:o}){return Object(i.createElement)(Ds,{rootClientId:e,selectedCategory:o,onInsert:t,onClickCategory:n})},Vs=n("@wordpress/url");var zs=function(){return Object(i.createElement)("div",{className:"block-editor-inserter__no-results"},Object(i.createElement)($c,{className:"block-editor-inserter__no-results-icon",icon:Fl}),Object(i.createElement)("p",null,Object(j.__)("No results found.")))};function Hs({onHover:e,onInsert:t,rootClientId:n}){const[o,,,r]=Dl(n,t),c=Object(i.useMemo)(()=>o.filter(({category:e})=>"reusable"===e),[o]);return 0===c.length?Object(i.createElement)(zs,null):Object(i.createElement)(Is,{title:Object(j.__)("Reusable blocks")},Object(i.createElement)(Bs,{items:c,onSelect:r,onHover:e,label:Object(j.__)("Reusable blocks")}))}var Gs=function({rootClientId:e,onInsert:t,onHover:n}){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Hs,{onHover:n,onInsert:t,rootClientId:e}),Object(i.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(i.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(Vs.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(j.__)("Manage Reusable blocks"))))};const{Fill:Us,Slot:Ws}=Object(p.createSlotFill)("__unstableInserterMenuExtension");Us.Slot=Ws;var Ks=Us;var $s=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:c=!0}){const{getSelectedBlock:l}=Object(f.useSelect)(Rn),{destinationRootClientId:s,destinationIndex:a}=Object(f.useSelect)(r=>{const{getSelectedBlockClientId:c,getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:s}=r(Rn),a=c();let u,d=e;return t?u=t:n?u=i(n,d):!o&&a?(d=l(a),u=i(a,d)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}},[e,t,n,o]),{replaceBlocks:d,insertBlocks:b,showInsertionPoint:p,hideInsertionPoint:g}=Object(f.useDispatch)(Rn),h=Object(i.useCallback)((e,t,n=!1)=>{const i=l();!o&&i&&Object(m.isUnmodifiedDefaultBlock)(i)?d(i.clientId,e,null,c||n?0:null,t):b(e,a,s,!0,c||n?0:null,t);const p=Object(j.sprintf)(Object(j._n)("%d block added.","%d blocks added.",Object(u.castArray)(e).length),Object(u.castArray)(e).length);Object(St.speak)(p),r&&r()},[o,l,d,b,s,a,r,c]),O=Object(i.useCallback)(e=>{e?p(s,a):g()},[p,g,s,a]);return[s,h,O]};var qs=function({filterValue:e,onSelect:t,onHover:n,rootClientId:o,clientId:r,isAppender:c,__experimentalInsertionIndex:l,maxBlockPatterns:s,maxBlockTypes:a,showBlockDirectory:b=!1,isDraggable:m=!0,shouldFocusBlock:f=!0}){const g=Object(d.useDebounce)(St.speak,500),[h,O]=$s({onSelect:t,rootClientId:o,clientId:r,isAppender:c,insertionIndex:l,shouldFocusBlock:f}),[v,k,_,y]=Dl(h,O),[E,,C]=Ls(O,h),S=Object(i.useMemo)(()=>{const t=Al(Object(u.orderBy)(v,["frecency"],["desc"]),k,_,e);return void 0!==a?t.slice(0,a):t},[e,v,k,_,a]),w=Object(i.useMemo)(()=>{const t=Rl(E,e);return void 0!==s?t.slice(0,s):t},[e,E,s]);Object(i.useEffect)(()=>{if(!e)return;const t=S.length+w.length,n=Object(j.sprintf)(Object(j._n)("%d result found.","%d results found.",t),t);g(n)},[e,g]);const B=Object(d.useAsyncList)(w),I=!Object(u.isEmpty)(S)||!Object(u.isEmpty)(w);return Object(i.createElement)(xs,null,!b&&!I&&Object(i.createElement)(zs,null),!!S.length&&Object(i.createElement)(Is,{title:Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("Blocks"))},Object(i.createElement)(Bs,{items:S,onSelect:y,onHover:n,label:Object(j.__)("Blocks"),isDraggable:m})),!!S.length&&!!w.length&&Object(i.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!w.length&&Object(i.createElement)(Is,{title:Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("Block Patterns"))},Object(i.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(i.createElement)(Ms,{shownPatterns:B,blockPatterns:w,onClickPattern:C,isDraggable:m}))),b&&Object(i.createElement)(Ks.Slot,{fillProps:{onSelect:y,onHover:n,filterValue:e,hasItems:I,rootClientId:h}},e=>e.length?e:I?null:Object(i.createElement)(zs,null)))};const Ys={name:"blocks",title:Object(j.__)("Blocks")},Xs={name:"patterns",title:Object(j.__)("Patterns")},Qs={name:"reusable",title:Object(j.__)("Reusable")};var Zs=function({children:e,showPatterns:t=!1,showReusableBlocks:n=!1,onSelect:o}){const r=Object(i.useMemo)(()=>{const e=[Ys];return t&&e.push(Xs),n&&e.push(Qs),e},[Ys,t,Xs,n,Qs]);return Object(i.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:r,onSelect:o},e)};var Js=function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:c,showMostUsedBlocks:l,shouldFocusBlock:s=!0}){const[a,u]=Object(i.useState)(""),[d,b]=Object(i.useState)(null),[m,g]=Object(i.useState)(null),[h,O,v]=$s({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:s}),{showPatterns:k,hasReusableBlocks:_}=Object(f.useSelect)(e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Rn);return{showPatterns:!!n(h).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}},[h]),y=Object(i.useCallback)((e,t,n)=>{O(e,t,n),r()},[O,r]),E=Object(i.useCallback)((e,t)=>{O(e,{patternName:t}),r()},[O,r]),C=Object(i.useCallback)(e=>{v(!!e),b(e)},[v,b]),S=Object(i.useCallback)(e=>{g(e)},[g]),w=Object(i.useMemo)(()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-inserter__block-list"},Object(i.createElement)(Ts,{rootClientId:h,onInsert:y,onHover:C,showMostUsedBlocks:l})),c&&Object(i.createElement)("div",{className:"block-editor-inserter__tips"},Object(i.createElement)(p.VisuallyHidden,{as:"h2"},Object(j.__)("A tip for using the block editor")),Object(i.createElement)(is,null))),[h,y,C,a,l,c]),B=Object(i.useMemo)(()=>Object(i.createElement)(Fs,{rootClientId:h,onInsert:E,onClickCategory:S,selectedCategory:m}),[h,E,S,m]),I=Object(i.useMemo)(()=>Object(i.createElement)(Gs,{rootClientId:h,onInsert:y,onHover:C}),[h,y,C]),x=Object(i.useCallback)(e=>"blocks"===e.name?w:"patterns"===e.name?B:I,[w,B,I]);return Object(i.createElement)("div",{className:"block-editor-inserter__menu"},Object(i.createElement)("div",{className:"block-editor-inserter__main-area"},Object(i.createElement)("div",{className:"block-editor-inserter__content"},Object(i.createElement)(us,{onChange:e=>{d&&b(null),u(e)},value:a,label:Object(j.__)("Search for blocks and patterns"),placeholder:Object(j.__)("Search")}),!!a&&Object(i.createElement)(qs,{filterValue:a,onSelect:r,onHover:C,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:s}),!a&&(k||_)&&Object(i.createElement)(Zs,{showPatterns:k,showReusableBlocks:_},x),!a&&!k&&!_&&w)),c&&d&&Object(i.createElement)(Os,{item:d}))};function ea({onSelect:e,rootClientId:t,clientId:n,isAppender:o}){const[r,c]=Object(i.useState)(""),[l,s]=$s({onSelect:e,rootClientId:t,clientId:n,isAppender:o}),[u]=Dl(l,s),[d]=Ls(s,l),b=d.length&&!!r,m=b&&d.length>6||u.length>6,{setInserterIsOpened:g,insertionIndex:h}=Object(f.useSelect)(e=>{const{getSettings:o,getBlockIndex:r,getBlockCount:c}=e(Rn),l=r(n,t);return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,insertionIndex:-1===l?c():l}},[n,t]);Object(i.useEffect)(()=>{g&&g(!1)},[g]);return Object(i.createElement)("div",{className:a()("block-editor-inserter__quick-inserter",{"has-search":m,"has-expand":g})},m&&Object(i.createElement)(us,{value:r,onChange:e=>{c(e)},label:Object(j.__)("Search for blocks and patterns"),placeholder:Object(j.__)("Search")}),Object(i.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(i.createElement)(qs,{filterValue:r,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:b?2:0,maxBlockTypes:6,isDraggable:!1})),g&&Object(i.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{g({rootClientId:t,insertionIndex:h})},"aria-label":Object(j.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(j.__)("Browse all")))}const ta=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:c={}})=>{let s;s=r?Object(j.sprintf)(Object(j._x)("Add %s","directly add the only allowed block"),o):Object(j._x)("Add block","Generic label for block inserter button");const{onClick:a,...u}=c;return Object(i.createElement)(p.Button,Object(l.a)({icon:cs,label:s,tooltipPosition:"bottom",onClick:function(t){e&&e(t),a&&a(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t},u))};class na extends i.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,toggleProps:c,hasItems:l,renderToggle:i=ta}=this.props;return i({onToggle:e,isOpen:t,disabled:n||!l,blockTitle:o,hasSingleBlockType:r,toggleProps:c})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:c}=this.props;return c?Object(i.createElement)(ea,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o}):Object(i.createElement)(Js,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,insertOnlyAllowedBlock:n,__experimentalIsQuick:o,onSelectOrClose:r}=this.props;return t?this.renderToggle({onToggle:n}):Object(i.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:a()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(j.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:r})}}var oa=Object(d.compose)([Object(f.withSelect)((e,{clientId:t,rootClientId:n})=>{const{getBlockRootClientId:o,hasInserterItems:r,__experimentalGetAllowedBlocks:c}=e(Rn),{getBlockVariations:l}=e(m.store),i=c(n=n||o(t)||void 0),s=1===Object(u.size)(i)&&0===Object(u.size)(l(i[0].name,"inserter"));let a=!1;return s&&(a=i[0]),{hasItems:r(n),hasSingleBlockType:s,blockTitle:a?a.title:"",allowedBlockType:a,rootClientId:n}}),Object(f.withDispatch)((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:c,hasSingleBlockType:l,allowedBlockType:i,onSelectOrClose:s}=t;if(!l)return;const{insertBlock:a}=e(Rn);a(Object(m.createBlock)(i.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:i}=n(Rn);if(r)return e(r,o);const s=t();return!c&&s&&i(s)===o?e(s,o)+1:l(o).length}(),o),s&&s();const u=Object(j.sprintf)(Object(j.__)("%s block added"),i.title);Object(St.speak)(u)}})),Object(d.ifCondition)(({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o)])(na);var ra=Object(d.compose)(Object(f.withSelect)((e,t)=>{const{getBlockCount:n,getBlockName:o,isBlockValid:r,getSettings:c,getTemplateLock:l}=e(Rn),i=!n(t.rootClientId),s=o(t.lastBlockClientId)===Object(m.getDefaultBlockName)(),a=r(t.lastBlockClientId),{bodyPlaceholder:u}=c();return{isVisible:i||!s||!a,showPrompt:i,isLocked:!!l(t.rootClientId),placeholder:u}}),Object(f.withDispatch)((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(Rn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}}))((function({isLocked:e,isVisible:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:c}){if(e||!t)return null;const l=Object(rs.decodeEntities)(r)||Object(j.__)("Type / to choose a block");return Object(i.createElement)("div",{"data-root-client-id":c||"",className:"block-editor-default-block-appender"},Object(i.createElement)("p",{tabIndex:"0",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":Object(j.__)("Add block"),className:"wp-block block-editor-default-block-appender__content",onFocus:n},o?l:"\ufeff"),Object(i.createElement)(oa,{rootClientId:c,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));var ca=Object(i.forwardRef)((function({rootClientId:e,className:t,onFocus:n,tabIndex:o},r){return Object(i.createElement)(oa,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:c,isOpen:l,blockTitle:s,hasSingleBlockType:u})=>{let d;d=u?Object(j.sprintf)(Object(j._x)("Add %s","directly add the only allowed block"),s):Object(j._x)("Add block","Generic label for block inserter button");const b=!u;let m=Object(i.createElement)(p.Button,{ref:r,onFocus:n,tabIndex:o,className:a()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":b?"true":void 0,"aria-expanded":b?l:void 0,disabled:c,label:d},!u&&Object(i.createElement)(p.VisuallyHidden,{as:"span"},d),Object(i.createElement)($c,{icon:cs}));return(b||u)&&(m=Object(i.createElement)(p.Tooltip,{text:d},m)),m},isAppender:!0})}));Object(i.createContext)();function la(e){e.stopPropagation()}var ia=Object(f.withSelect)((e,{rootClientId:t})=>{const{getBlockOrder:n,canInsertBlockType:o,getTemplateLock:r,getSelectedBlockClientId:c}=e(Rn);return{isLocked:!!r(t),blockClientIds:n(t),canInsertDefaultBlock:o(Object(m.getDefaultBlockName)(),t),selectedBlockClientId:c()}})((function({blockClientIds:e,rootClientId:t,canInsertDefaultBlock:n,isLocked:o,renderAppender:r,className:c,selectedBlockClientId:l,tagName:s="div"}){if(o||!1===r)return null;let d;if(r)d=Object(i.createElement)(r,null);else{const o=!t,r=l===t,c=l&&!e.includes(l);if(!o&&!r&&(!l||c))return null;d=n?Object(i.createElement)(ra,{rootClientId:t,lastBlockClientId:Object(u.last)(e)}):Object(i.createElement)(ca,{rootClientId:t,className:"block-list-appender__toggle"})}return Object(i.createElement)(s,{tabIndex:-1,onFocus:la,className:a()("block-list-appender","wp-block",c)},d)}));function sa(e,t,n,o,r,c,l){return i=>{const{srcRootClientId:s,srcClientIds:a,type:u,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(i);if("inserter"===u&&(l(),c(d,t,e,!0,null)),"block"===u){const c=n(a[0],s);if(s===e&&c===t)return;if(a.includes(e)||o(a).some(t=>t===e))return;const l=s===e,i=a.length;r(a,s,e,l&&c<t?t-i:t)}}}function aa(e,t){const n=Object(f.useSelect)(e=>e(Rn).getSettings().mediaUpload,[]),{canInsertBlockType:o,getBlockIndex:r,getClientIdsOfDescendants:c}=Object(f.useSelect)(Rn),{insertBlocks:l,moveBlocksToPosition:i,updateBlockAttributes:s,clearSelectedBlock:a}=Object(f.useDispatch)(Rn),u=sa(e,t,r,c,i,l,a),d=function(e,t,n,o,r,c){return l=>{if(!n)return;const i=Object(m.findTransform)(Object(m.getBlockTransforms)("from"),t=>"files"===t.type&&r(t.blockName,e)&&t.isMatch(l));if(i){const n=i.transform(l,o);c(n,t,e)}}}(e,t,n,s,o,l),b=function(e,t,n){return o=>{const r=Object(m.pasteHandler)({HTML:o,mode:"BLOCKS"});r.length&&n(r,t,e)}}(e,t,l);return e=>{const t=Object(ui.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?d(t):n?b(n):u(e)}}function ua(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach(n=>{const c=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:c}=e,l=o?r:c,i=o?c:r,s=o?t.left:t.top,a=o?t.right:t.bottom,u=t[n];let d;return d=l>=s&&l<=a?l:l<a?s:a,Math.sqrt((l-d)**2+(i-u)**2)}(e,t,n);(void 0===o||c<o)&&(o=c,r=n)}),[o,r]}function da({rootClientId:e=""}={}){const[t,n]=Object(i.useState)(null),{isLockedAll:o,orientation:r}=Object(f.useSelect)(t=>{var n;const{getBlockListSettings:o,getTemplateLock:r}=t(Rn);return{isLockedAll:"all"===r(e),orientation:null===(n=o(e))||void 0===n?void 0:n.orientation}},[e]),{showInsertionPoint:c,hideInsertionPoint:l}=Object(f.useDispatch)(Rn),s=aa(e,t),a=Object(d.useThrottle)(Object(i.useCallback)((t,o)=>{const l=function(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"];let r,c;return e.forEach((n,l)=>{if(!n.classList.contains("wp-block"))return;const i=n.getBoundingClientRect(),[s,a]=ua(t,i,o);if(void 0===c||s<c){const t="bottom"===a||"right"===a;let n=t?1:0;n+=t&&e[l+1]&&e[l+1].classList.contains("is-dragging")?1:0,c=s,r=l+n}}),r}(Array.from(o.children),{x:t.clientX,y:t.clientY},r);n(void 0===l?0:l),null!==l&&c(e,l)},[]),200);return Object(d.__experimentalUseDropZone)({isDisabled:o,onDrop:s,onDragOver(e){a(e,e.currentTarget)},onDragEnd(){a.cancel(),l(),n(null)}})}function ba(e){return Object(d.useRefEffect)(t=>{if(e)return t.addEventListener("wheel",n),()=>{t.removeEventListener("wheel",n)};function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}},[e])}const ma=Object(i.createContext)();function pa({__unstablePopoverSlot:e,__unstableContentRef:t}){const{selectBlock:n}=Object(f.useDispatch)(Rn),o=Object(i.useContext)(ma),r=Object(i.useRef)(),{orientation:c,isHidden:l,previousClientId:s,nextClientId:u,rootClientId:d,isInserterShown:b}=Object(f.useSelect)(e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getMultiSelectedBlockClientIds:r,getSelectedBlockClientId:c,hasMultiSelection:l,getSettings:i,getBlockInsertionPoint:s}=e(Rn),a=s(),u=n(a.rootClientId)[a.index-1],d=a.rootClientId,b=n(d);if(!b.length)return{};const m=u||b[b.length-1],p=m===b[b.length-1]?null:b[b.indexOf(m)+1],{hasReducedUI:f}=i(),g=r(),h=c(),O=(null===(t=o(d))||void 0===t?void 0:t.orientation)||"vertical";return{previousClientId:m,nextClientId:p,isHidden:f||(l()?p&&g.includes(p):p&&"vertical"===O&&p===h),orientation:O,clientId:u,rootClientId:d,isInserterShown:null==a?void 0:a.__unstableWithInserter}},[]),m=_r(s),g=_r(u),h=Object(i.useMemo)(()=>{if(!m)return{};const e=m.getBoundingClientRect(),t=g?g.getBoundingClientRect():null;if("vertical"===c)return{width:m.offsetWidth,height:t?t.top-e.bottom:0};let n=0;return g&&(n=Object(j.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:m.offsetHeight}},[m,g]),O=Object(i.useCallback)(()=>{const{ownerDocument:e}=m,t=m.getBoundingClientRect(),n=g?g.getBoundingClientRect():null;return"vertical"===c?Object(j.isRTL)()?{top:t.bottom,left:t.right,right:t.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t.bottom,left:t.left,right:t.right,bottom:n?n.top:t.bottom,ownerDocument:e}:Object(j.isRTL)()?{top:t.top,left:n?n.right:t.left,right:t.left,bottom:t.bottom,ownerDocument:e}:{top:t.top,left:t.right,right:n?n.left:t.right,bottom:t.bottom,ownerDocument:e}},[m,g]),v=ba(t);if(!m)return null;const k=a()("block-editor-block-list__insertion-point","is-"+c);const _=!l&&g&&b,y=_||!l;return Object(i.createElement)(p.Popover,{ref:v,noArrow:!0,animate:!1,getAnchorRect:O,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:e||null},Object(i.createElement)("div",{ref:r,tabIndex:-1,onClick:function(e){e.target===r.current&&u&&n(u,-1)},onFocus:function(e){e.target!==r.current&&(o.current=!0)},className:a()(k,{"is-with-inserter":_}),style:h},y&&Object(i.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),_&&Object(i.createElement)("div",{className:a()("block-editor-block-list__insertion-point-inserter")},Object(i.createElement)(oa,{position:"bottom center",clientId:u,rootClientId:d,__experimentalIsQuick:!0,onToggle:e=>{o.current=e},onSelectOrClose:()=>{o.current=!1}}))))}function fa({children:e,__unstablePopoverSlot:t,__unstableContentRef:n}){const o=Object(f.useSelect)(e=>{const{isMultiSelecting:t,isBlockInsertionPointVisible:n}=e(Rn);return n()&&!t()},[]);return Object(i.createElement)(ma.Provider,{value:Object(i.useRef)(!1)},o&&Object(i.createElement)(pa,{__unstablePopoverSlot:t,__unstableContentRef:n}),e)}function ga(){const e=Object(i.useContext)(ma),{getBlockListSettings:t,getBlockRootClientId:n,getBlockIndex:o,isBlockInsertionPointVisible:r,isMultiSelecting:c}=Object(f.useSelect)(Rn),{showInsertionPoint:l,hideInsertionPoint:s}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(n=>{function i(n){var i;if(e.current)return;if(c())return;if(!n.target.classList.contains("block-editor-block-list__layout"))return void(r()&&s());let a;if(!n.target.classList.contains("is-root-container")){a=(n.target.getAttribute("data-block")?n.target:n.target.closest("[data-block]")).getAttribute("data-block")}const u=(null===(i=t(a))||void 0===i?void 0:i.orientation)||"vertical",d=n.target.getBoundingClientRect(),b=n.clientY-d.top,m=n.clientX-d.left;let p=Array.from(n.target.children).find(e=>e.classList.contains("wp-block")&&"vertical"===u&&e.offsetTop>b||e.classList.contains("wp-block")&&"horizontal"===u&&e.offsetLeft>m);if(!p)return;if(!p.id&&(p=p.firstElementChild,!p))return;const f=p.id.slice("block-".length);if(!f)return;const g=p.getBoundingClientRect();if("horizontal"===u&&(n.clientY>g.bottom||n.clientY<g.top)||"vertical"===u&&(n.clientX>g.right||n.clientX<g.left))return void(r()&&s());const h=o(f,a);0!==h?l(a,h,{__unstableWithInserter:!0}):r()&&s()}return n.addEventListener("mousemove",i),()=>{n.removeEventListener("mousemove",i)}},[e,t,n,o,r,c,l,s])}const ha="undefined"==typeof window?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback||window.requestAnimationFrame,Oa="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;var ja=n("@wordpress/keyboard-shortcuts");var va=({children:e,clientIds:t,cloneClassname:n,onDragStart:o,onDragEnd:r,elementId:c})=>{const{srcRootClientId:l,isDraggable:s,icon:a}=Object(f.useSelect)(e=>{var n;const{getBlockRootClientId:o,getTemplateLock:r,getBlockName:c}=e(Rn),l=o(t[0]),i=l?r(l):null,s=c(t[0]);return{srcRootClientId:l,isDraggable:"all"!==i,icon:null===(n=Object(m.getBlockType)(s))||void 0===n?void 0:n.icon}},[t]),u=Object(i.useRef)(!1),[d,b,g]=function(){const e=Object(i.useRef)(null),t=Object(i.useRef)(null),n=Object(i.useRef)(null),o=Object(i.useRef)(null);return Object(i.useEffect)(()=>()=>{o.current&&(clearInterval(o.current),o.current=null)},[]),[Object(i.useCallback)(r=>{e.current=r.clientY,n.current=Object(ui.getScrollContainer)(r.target),o.current=setInterval(()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}},25)},[]),Object(i.useCallback)(o=>{if(!n.current)return;const r=n.current.offsetHeight,c=e.current-n.current.offsetTop,l=o.clientY-n.current.offsetTop;if(o.clientY>c){const e=Math.max(r-c-50,0),n=Math.max(l-c-50,0)/e;t.current=25*n}else if(o.clientY<c){const e=Math.max(c-50,0),n=Math.max(c-l-50,0)/e;t.current=-25*n}else t.current=0},[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:O}=Object(f.useDispatch)(Rn);if(Object(i.useEffect)(()=>()=>{u.current&&O()},[]),!s)return e({isDraggable:!1});const j={type:"block",srcClientIds:t,srcRootClientId:l};return Object(i.createElement)(p.Draggable,{cloneClassname:n,elementId:c,__experimentalTransferDataType:"wp-blocks",transferData:j,onDragStart:e=>{h(t),u.current=!0,d(e),o&&o()},onDragOver:b,onDragEnd:()=>{O(),u.current=!1,g(),r&&r()},__experimentalDragComponent:Object(i.createElement)(_s,{count:t.length,icon:a})},({onDraggableStart:t,onDraggableEnd:n})=>e({draggable:!0,onDragStart:t,onDragEnd:n}))};var ka=function({clientId:e,rootClientId:t,blockElement:n}){const o=ql(e),r=Object(f.useSelect)(n=>{var o;const{__unstableGetBlockWithoutInnerBlocks:r,getBlockIndex:c,hasBlockMovingClientId:l,getBlockListSettings:i}=n(Rn),s=c(e,t),{name:a,attributes:u}=r(e);return{index:s,name:a,attributes:u,blockMovingMode:l(),orientation:null===(o=i(t))||void 0===o?void 0:o.orientation}},[e,t]),{index:c,name:s,attributes:u,blockMovingMode:d,orientation:b}=r,{setNavigationMode:g,removeBlock:h}=Object(f.useDispatch)(Rn),O=Object(i.useRef)();Object(i.useEffect)(()=>{O.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(St.speak)(P)},[]);const{hasBlockMovingClientId:v,getBlockIndex:k,getBlockRootClientId:_,getClientIdsOfDescendants:y,getSelectedBlockClientId:E,getMultiSelectedBlocksEndClientId:C,getPreviousBlockClientId:S,getNextBlockClientId:w}=Object(f.useSelect)(Rn),{selectBlock:B,clearSelectedBlock:I,setBlockMovingClientId:x,moveBlockToPosition:T}=Object(f.useDispatch)(Rn),N=Object(m.getBlockType)(s),P=Object(m.__experimentalGetAccessibleBlockLabel)(N,u,c+1,b),L=a()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d}),A=Object(j.__)("Drag");return Object(i.createElement)("div",{className:L},Object(i.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(Vl,{icon:null==o?void 0:o.icon,showColors:!0})),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(va,{clientIds:[e]},e=>Object(i.createElement)(p.Button,Object(l.a)({icon:ks,className:"block-selection-button_drag-handle","aria-hidden":"true",label:A,tabIndex:"-1"},e)))),Object(i.createElement)(p.FlexItem,null,Object(i.createElement)(p.Button,{ref:O,onClick:()=>g(!1),onKeyDown:function(t){const{keyCode:o}=t,r=o===cc.UP,c=o===cc.DOWN,l=o===cc.LEFT,i=o===cc.RIGHT,s=o===cc.TAB,a=o===cc.ESCAPE,u=o===cc.ENTER,d=o===cc.SPACE,b=t.shiftKey;if(o===cc.BACKSPACE||o===cc.DELETE)return h(e),void t.preventDefault();const m=E(),p=C(),f=S(p||m),g=w(p||m),O=s&&b||r,j=s&&!b||c,N=l,P=i;let L;if(O)L=f;else if(j)L=g;else if(N){var A;L=null!==(A=_(m))&&void 0!==A?A:m}else if(P){var R;L=null!==(R=y([m])[0])&&void 0!==R?R:m}const M=v();if(a&&M&&x(null),(u||d)&&M){const e=_(M),t=_(m),n=k(M,e);let o=k(m,t);n<o&&e===t&&(o-=1),T(M,e,t,o),B(M),x(null)}if(j||O||N||P)if(L)t.preventDefault(),B(L);else if(s&&m){let e;j?(e=ui.focus.tabbable.findNext(n),e||(e=n.ownerDocument.defaultView.frameElement,e=ui.focus.tabbable.findNext(e))):e=ui.focus.tabbable.findPrevious(n),e&&(t.preventDefault(),e.focus(),I())}},label:P,className:"block-selection-button_select-button"},Object(i.createElement)(Yl,{clientId:e})))))};function _a(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}function ya(e,t,n,o,r){const[c]=Object(i.useState)(t),[l]=Object(i.useState)(o),s=Object(i.useCallback)(()=>{!function(e){const[t]=ui.focus.tabbable.find(e);t&&t.focus()}(e.current)},[]);Object(ja.useShortcut)("core/block-editor/focus-toolbar",s,{bindGlobal:!0,eventName:"keydown"}),Object(i.useEffect)(()=>{c&&s()},[n,c,s]),Object(i.useEffect)(()=>{let t=0;return l&&!c&&(t=window.requestAnimationFrame(()=>{const t=_a(e.current),n=l||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()})),()=>{if(window.cancelAnimationFrame(t),!r)return;const n=_a(e.current).findIndex(e=>0===e.tabIndex);r(n)}},[l,c])}var Ea=function({children:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,...r}){const c=Object(i.useRef)(),s=function(e){const[t,n]=Object(i.useState)(!0),o=Object(i.useCallback)(()=>{const t=ui.focus.tabbable.find(e.current),o=!t.some(e=>!("toolbarItem"in e.dataset));o||Bt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(o)},[]);return Object(i.useLayoutEffect)(()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()},[t]),t}(c);return ya(c,t,s,n,o),s?Object(i.createElement)(p.Toolbar,Object(l.a)({label:r["aria-label"],ref:c},r),e):Object(i.createElement)(p.NavigableMenu,Object(l.a)({orientation:"horizontal",role:"toolbar",ref:c},r),e)};var Ca=Object(f.withSelect)((e,{clientIds:t})=>{var n;const{getBlock:o,getBlockIndex:r,getBlockListSettings:c,getTemplateLock:l,getBlockOrder:i,getBlockRootClientId:s}=e(Rn),a=Object(u.castArray)(t),d=Object(u.first)(a),b=o(d),p=s(Object(u.first)(a)),f=r(d,p),g=0===f,h=r(Object(u.last)(a),p)===i(p).length-1;return{blockType:b?Object(m.getBlockType)(b.name):null,isLocked:"all"===l(p),rootClientId:p,firstIndex:f,isFirst:g,isLast:h,orientation:null===(n=c(p))||void 0===n?void 0:n.orientation}})((function({isFirst:e,isLast:t,clientIds:n,isLocked:o,isHidden:r,rootClientId:c,orientation:s,hideDragHandle:u}){const[d,b]=Object(i.useState)(!1),m=()=>b(!0),f=()=>b(!1);if(o||e&&t&&!c)return null;const g=Object(j.__)("Drag");return Object(i.createElement)("div",{className:a()("block-editor-block-mover",{"is-visible":d||!r,"is-horizontal":"horizontal"===s})},!u&&Object(i.createElement)(va,{clientIds:n,cloneClassname:"block-editor-block-mover__drag-clone"},e=>Object(i.createElement)(p.Button,Object(l.a)({icon:ks,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:g,tabIndex:"-1"},e))),Object(i.createElement)(p.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(i.createElement)(p.ToolbarItem,{onFocus:m,onBlur:f},e=>Object(i.createElement)(Ei,Object(l.a)({clientIds:n},e))),Object(i.createElement)(p.ToolbarItem,{onFocus:m,onBlur:f},e=>Object(i.createElement)(Ci,Object(l.a)({clientIds:n},e)))))}));const{clearTimeout:Sa,setTimeout:wa}=window;function Ba({ref:e,isFocused:t,debounceTimeout:n=200,onChange:o=u.noop}){const[r,c]=Object(i.useState)(!1),l=Object(i.useRef)(),s=t=>{null!=e&&e.current&&c(t),o(t)},a=()=>{const n=(null==e?void 0:e.current)&&e.current.matches(":hover");return!t&&!n},d=()=>{const e=l.current;e&&Sa&&Sa(e)};return Object(i.useEffect)(()=>()=>d(),[]),{showMovers:r,debouncedShowMovers:e=>{e&&e.stopPropagation(),d(),r||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),d(),l.current=wa(()=>{a()&&s(!1)},n)}}}function Ia({ref:e,debounceTimeout:t=200,onChange:n=u.noop}){const[o,r]=Object(i.useState)(!1),{showMovers:c,debouncedShowMovers:l,debouncedHideMovers:s}=Ba({ref:e,debounceTimeout:t,isFocused:o,onChange:n}),a=Object(i.useRef)(!1),d=()=>(null==e?void 0:e.current)&&e.current.contains(e.current.ownerDocument.activeElement);return Object(i.useEffect)(()=>{const t=e.current,n=()=>{d()&&(r(!0),l())},o=()=>{d()||(r(!1),s())};return t&&!a.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),a.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}},[e,a,r,l,s]),{showMovers:c,gestures:{onMouseMove:l,onMouseLeave:s}}}function xa(){const{selectBlock:e,toggleBlockHighlight:t}=Object(f.useDispatch)(Rn),{firstParentClientId:n,shouldHide:o,hasReducedUI:r}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:r}=e(Rn),{hasBlockSupport:c}=e(m.store),l=n(o()),i=l[l.length-1],s=t(i),a=Object(m.getBlockType)(s),u=r();return{firstParentClientId:i,shouldHide:!c(a,"__experimentalParentSelector",!0),hasReducedUI:u.hasReducedUI}},[]),c=ql(n),s=Object(i.useRef)(),{gestures:a}=Ia({ref:s,onChange(e){e&&r||t(n,e)}});return o||void 0===n?null:Object(i.createElement)("div",Object(l.a)({className:"block-editor-block-parent-selector",key:n,ref:s},a),Object(i.createElement)(p.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:Object(j.sprintf)(Object(j.__)("Select %s"),c.title),showTooltip:!0,icon:Object(i.createElement)(Vl,{icon:c.icon})}))}var Ta=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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 Na({blocks:e}){return Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(i.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(j.__)("Preview")),Object(i.createElement)(hs,{viewportWidth:500,blocks:e})))))}var Pa=({className:e,possibleBlockTransformations:t,onSelect:n,blocks:o})=>{const[r,c]=Object(i.useState)();return Object(i.createElement)(p.MenuGroup,{label:Object(j.__)("Transform to"),className:e},r&&Object(i.createElement)(Na,{blocks:Object(m.switchToBlockType)(o,r)}),t.map(e=>{const{name:t,icon:o,title:r,isDisabled:l}=e;return Object(i.createElement)(p.MenuItem,{key:t,className:Object(m.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),n(t)},disabled:l,onMouseLeave:()=>c(null),onMouseEnter:()=>c(t)},Object(i.createElement)(Vl,{icon:o,showColors:!0}),r)}))};const La={};function Aa({genericPreviewBlock:e,style:t,isActive:n,onBlur:o,onHover:r,onSelect:c,styleClassName:l,itemRole:s}){const u=Object(i.useMemo)(()=>({...e,attributes:{...e.attributes,className:l}}),[e,l]);return Object(i.createElement)("div",{key:t.name,className:a()("block-editor-block-styles__item",{"is-active":n}),onClick:()=>c(),onKeyDown:e=>{cc.ENTER!==e.keyCode&&cc.SPACE!==e.keyCode||(e.preventDefault(),c())},onMouseEnter:r,onMouseLeave:o,role:s||"button",tabIndex:"0","aria-label":t.label||t.name},Object(i.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(i.createElement)(hs,{viewportWidth:500,blocks:u})),Object(i.createElement)("div",{className:"block-editor-block-styles__item-label"},t.label||t.name))}var Ra=function({clientId:e,onSwitch:t=u.noop,onHoverClassName:n=u.noop,itemRole:o}){const{styles:r,block:c,type:l,className:s}=Object(f.useSelect)(t=>{const{getBlock:n}=t(Rn),o=n(e);if(!o)return La;const r=Object(m.getBlockType)(o.name),{getBlockStyles:c}=t(m.store);return{block:o,type:r,styles:c(o.name),className:o.attributes.className||""}},[e]),{updateBlockAttributes:a}=Object(f.useDispatch)(Rn),d=function(e,t){return Object(i.useMemo)(()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?Object(m.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Object(m.cloneBlock)(e):void 0},[null!=t&&t.example?null==e?void 0:e.name:e,t])}(c,l);if(!r||0===r.length)return null;const b=Object(u.find)(r,"isDefault")?r:[{name:"default",label:Object(j._x)("Default","block style"),isDefault:!0},...r],p=function(e,t){for(const n of new Rr.a(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=Object(u.find)(e,{name:t});if(o)return o}return Object(u.find)(e,"isDefault")}(b,s);return Object(i.createElement)("div",{className:"block-editor-block-styles"},b.map(r=>{const c=function(e,t,n){const o=new Rr.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}(s,p,r);return Object(i.createElement)(Aa,{genericPreviewBlock:d,className:s,isActive:p===r,key:r.name,onSelect:()=>{a(e,{className:c}),n(null),t()},onBlur:()=>n(null),onHover:()=>n(c),style:r,styleClassName:c,itemRole:o})}))};function Ma({hoveredBlock:e,onSwitch:t}){const{name:n,clientId:o}=e,[r,c]=Object(i.useState)(),l=Object(f.useSelect)(e=>e(m.store).getBlockType(n),[n]);return Object(i.createElement)(p.MenuGroup,{label:Object(j.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},r&&Object(i.createElement)(Na,{blocks:l.example?Object(m.getBlockFromExample)(l.name,{attributes:{...l.example.attributes,className:r},innerBlocks:l.example.innerBlocks}):Object(m.cloneBlock)(e,{className:r})}),Object(i.createElement)(Ra,{clientId:o,onSwitch:t,onHoverClassName:c,itemRole:"menuitem"}))}const Da=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:c=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of c){const o=Da(e,t,n);if(o)return o}}},Fa=(e,t)=>{const n=((e,t)=>{const n=Object(m.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce((e,n)=>(t[n]&&(e[n]=t[n]),e),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var Va=(e,t)=>{const n=Object(f.useSelect)(t=>e.map(({name:e})=>t(Rn).__experimentalGetParsedPattern(e)),[e]);return Object(i.useMemo)(()=>n.reduce((e,n)=>{const o=((e,t)=>{const n=t.map(e=>Object(m.cloneBlock)(e)),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=Da(r,t.name,o);if(n){e=!0,o.add(n.clientId),Fa(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e},[]),[n,t])};function za({patterns:e,onSelect:t}){return Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(i.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(i.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(i.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(j.__)("Preview")),Object(i.createElement)(Ha,{patterns:e,onSelect:t})))))}function Ha({patterns:e,onSelect:t}){const n=Object(p.__unstableUseCompositeState)();return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},n,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":Object(j.__)("Patterns list")}),e.map(e=>Object(i.createElement)(Ga,{key:e.name,pattern:e,onSelect:t,composite:n})))}function Ga({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-switcher__preview-patterns-container",r=Object(d.useInstanceId)(Ga,o+"-list__item-description");return Object(i.createElement)("div",{className:o+"-list__list-item","aria-label":e.title,"aria-describedby":e.description?r:void 0},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},n,{className:o+"-list__item",onClick:()=>t(e.transformedBlocks)}),Object(i.createElement)(hs,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),Object(i.createElement)("div",{className:o+"-list__item-title"},e.title)),!!e.description&&Object(i.createElement)(p.VisuallyHidden,{id:r},e.description))}var Ua=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=Object(i.useState)(!1),c=Va(t,e);return c.length?Object(i.createElement)(p.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&Object(i.createElement)(za,{patterns:c,onSelect:n}),Object(i.createElement)(p.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:gi},Object(j.__)("Patterns"))):null};const Wa=({clientIds:e,blocks:t})=>{const{replaceBlocks:n}=Object(f.useDispatch)(Rn),o=ql(t[0].clientId),{possibleBlockTransformations:r,hasBlockStyles:c,icon:l,blockTitle:s,patterns:a}=Object(f.useSelect)(n=>{const{getBlockRootClientId:r,getBlockTransformItems:c,__experimentalGetPatternTransformItems:l}=n(Rn),{getBlockStyles:i,getBlockType:s}=n(m.store),a=r(Object(u.castArray)(e)[0]),[{name:d}]=t,b=1===t.length,p=b&&i(d);let f;if(b)f=null==o?void 0:o.icon;else{var g;f=1===Object(u.uniq)(t.map(({name:e})=>e)).length?null===(g=s(d))||void 0===g?void 0:g.icon:Ta}return{possibleBlockTransformations:c(t,a),hasBlockStyles:!(null==p||!p.length),icon:f,blockTitle:s(d).title,patterns:l(t,a)}},[e,t,null==o?void 0:o.icon]),d=1===t.length&&Object(m.isReusableBlock)(t[0]),b=1===t.length&&Object(m.isTemplatePart)(t[0]),g=!!r.length,h=!(null==a||!a.length);if(!c&&!g)return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:s,icon:Object(i.createElement)(Vl,{icon:l,showColors:!0})}));const O=s,v=1===t.length?Object(j.sprintf)(Object(j.__)("%s: Change block type or style"),s):Object(j.sprintf)(Object(j._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),k=c||g||h;return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarItem,null,o=>Object(i.createElement)(p.DropdownMenu,{className:"block-editor-block-switcher",label:O,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Vl,{icon:l,className:"block-editor-block-switcher__toggle",showColors:!0}),(d||b)&&Object(i.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(i.createElement)(Yl,{clientId:e}))),toggleProps:{describedBy:v,...o},menuProps:{orientation:"both"}},({onClose:o})=>k&&Object(i.createElement)("div",{className:"block-editor-block-switcher__container"},h&&Object(i.createElement)(Ua,{blocks:t,patterns:a,onSelect:t=>{(t=>{n(e,t)})(t),o()}}),g&&Object(i.createElement)(Pa,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:r,blocks:t,onSelect:r=>{(o=>{n(e,Object(m.switchToBlockType)(t,o))})(r),o()}}),c&&Object(i.createElement)(Ma,{hoveredBlock:t[0],onSwitch:o})))))};var Ka=({clientIds:e})=>{const t=Object(f.useSelect)(t=>t(Rn).getBlocksByClientId(e),[e]);return!t.length||t.some(e=>!e)?null:Object(i.createElement)(Wa,{clientIds:e,blocks:t})},$a=n("@wordpress/blob");function qa(){const{getBlockName:e}=Object(f.useSelect)(Rn),{getBlockType:t}=Object(f.useSelect)(m.store),{createSuccessNotice:n}=Object(f.useDispatch)(Ps.store);return Object(i.useCallback)((o,r)=>{let c="";if(1===r.length){const n=r[0],{title:l}=t(e(n));c="copy"===o?Object(j.sprintf)(Object(j.__)('Copied "%s" to clipboard.'),l):Object(j.sprintf)(Object(j.__)('Moved "%s" to clipboard.'),l)}else c="copy"===o?Object(j.sprintf)(Object(j._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):Object(j.sprintf)(Object(j._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(c,{type:"snackbar"})},[])}function Ya(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=Object(f.useSelect)(Rn),{flashBlock:r,removeBlocks:c,replaceBlocks:l}=Object(f.useDispatch)(Rn),i=qa();return Object(d.useRefEffect)(s=>{function a(a){const u=t();if(0!==u.length){if(!n()){const{target:e}=a,{ownerDocument:t}=e;if("copy"===a.type||"cut"===a.type?Object(ui.documentHasUncollapsedSelection)(t):Object(ui.documentHasSelection)(t))return}if(s.contains(a.target.ownerDocument.activeElement)){if(a.preventDefault(),"copy"===a.type||"cut"===a.type){1===u.length&&r(u[0]),i(a.type,u);const t=e(u),n=Object(m.serialize)(t);a.clipboardData.setData("text/plain",n),a.clipboardData.setData("text/html",n)}if("cut"===a.type)c(u);else if("paste"===a.type){const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}const o=Object(ui.getFilesFromDataTransfer)(e).filter(({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e));return o.length&&!n&&(n=o.map(e=>`<img src="${Object($a.createBlobURL)(e)}">`).join(""),t=""),{html:n,plainText:t}}(a),r=Object(m.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});l(u,r,r.length-1,-1)}}}}return s.ownerDocument.addEventListener("copy",a),s.ownerDocument.addEventListener("cut",a),s.ownerDocument.addEventListener("paste",a),()=>{s.ownerDocument.removeEventListener("copy",a),s.ownerDocument.removeEventListener("cut",a),s.ownerDocument.removeEventListener("paste",a)}},[])}var Xa=function({children:e}){return Object(i.createElement)("div",{ref:Ya()},e)};function Qa({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:c,getTemplateLock:l}=Object(f.useSelect)(e=>e(Rn),[]),{getDefaultBlockName:i,getGroupingBlockName:s}=Object(f.useSelect)(e=>e(m.store),[]),a=c(e),d=r(e[0]),b=Object(u.every)(a,e=>!!e&&Object(m.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,d)),p=o(i(),d),{removeBlocks:g,replaceBlocks:h,duplicateBlocks:O,insertAfterBlock:j,insertBeforeBlock:v,flashBlock:k,setBlockMovingClientId:_,setNavigationMode:y,selectBlock:E}=Object(f.useDispatch)(Rn),C=qa();return t({canDuplicate:b,canInsertDefaultBlock:p,isLocked:!!l(d),rootClientId:d,blocks:a,onDuplicate:()=>O(e,n),onRemove:()=>g(e,n),onInsertBefore(){v(Object(u.first)(Object(u.castArray)(e)))},onInsertAfter(){j(Object(u.last)(Object(u.castArray)(e)))},onMoveTo(){y(!0),E(e[0]),_(e[0])},onGroup(){if(!a.length)return;const t=s(),n=Object(m.switchToBlockType)(a,t);n&&h(e,n)},onUngroup(){if(!a.length)return;const t=a[0].innerBlocks;t.length&&h(e,t)},onCopy(){const e=a.map(({clientId:e})=>e);1===a.length&&k(e[0]),C("copy",e)}})}var Za=Object(d.compose)([Object(f.withSelect)((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(Rn),c=n(t),l=r().codeEditingEnabled;return{mode:o(t),blockType:c?Object(m.getBlockType)(c.name):null,isCodeEditingEnabled:l}}),Object(f.withDispatch)((e,{onToggle:t=u.noop,clientId:n})=>({onToggleMode(){e(Rn).toggleBlockMode(n),t()}}))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!Object(m.hasBlockSupport)(e,"html",!0)||!r)return null;const c="visual"===t?Object(j.__)("Edit as HTML"):Object(j.__)("Edit visually");return Object(i.createElement)(p.MenuItem,{onClick:n},!o&&c)}));var Ja=Object(d.compose)(Object(f.withSelect)((e,{clientId:t})=>{const n=e(Rn).getBlock(t);return{block:n,shouldRender:n&&"core/html"===n.name}}),Object(f.withDispatch)((e,{block:t})=>({onClick:()=>e(Rn).replaceBlocks(t.clientId,Object(m.rawHandler)({HTML:Object(m.getBlockContent)(t)}))})))((function({shouldRender:e,onClick:t,small:n}){if(!e)return null;const o=Object(j.__)("Convert to Blocks");return Object(i.createElement)(p.MenuItem,{onClick:t},!n&&o)}));const{Fill:eu,Slot:tu}=Object(p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");eu.Slot=tu;var nu=eu;function ou({clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r,onClose:c=(()=>{})}){const{replaceBlocks:l}=Object(f.useDispatch)(Rn);return t||n?Object(i.createElement)(i.Fragment,null,t&&Object(i.createElement)(p.MenuItem,{onClick:()=>{(()=>{const t=Object(m.switchToBlockType)(o,r);t&&l(e,t)})(),c()}},Object(j._x)("Group","verb")),n&&Object(i.createElement)(p.MenuItem,{onClick:()=>{(()=>{const t=o[0].innerBlocks;t.length&&l(e,t)})(),c()}},Object(j._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:ru,Slot:cu}=Object(p.createSlotFill)("BlockSettingsMenuControls");function lu({...e}){return Object(i.createElement)(p.__experimentalStyleProvider,{document:document},Object(i.createElement)(ru,e))}lu.Slot=({fillProps:e,clientIds:t=null})=>{const n=Object(f.useSelect)(e=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o}=e(Rn),r=null!==t?t:o();return Object(u.map)(Object(u.compact)(n(r)),e=>e.name)},[t]),o=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}=Object(f.useSelect)(e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:r,getSelectedBlockClientIds:c}=e(Rn),{getGroupingBlockName:l}=e(m.store),i=c(),s=l(),a=r(s,null!=i&&i.length?n(i[0]):void 0),u=o(i),d=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===s;return{clientIds:i,isGroupable:a&&u.length&&!d,isUngroupable:d&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:s}},[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}}(),{isGroupable:r,isUngroupable:c}=o,s=r||c;return Object(i.createElement)(cu,{fillProps:{...e,selectedBlocks:n}},t=>{if((null==t?void 0:t.length)>0||s)return Object(i.createElement)(p.MenuGroup,null,t,Object(i.createElement)(ou,Object(l.a)({},o,{onClose:null==e?void 0:e.onClose})))})};var iu=lu;const su={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function au({blocks:e,onCopy:t}){const n=Object(d.useCopyToClipboard)(()=>Object(m.serialize)(e),t);return Object(i.createElement)(p.MenuItem,{ref:n},Object(j.__)("Copy"))}var uu=function({clientIds:e,__experimentalSelectBlock:t,children:n,...o}){const r=Object(u.castArray)(e),c=r.length,s=r[0],a=Object(f.useSelect)(e=>{const{getShortcutRepresentation:t}=e(ja.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}},[]),d=Object(i.useCallback)(t?async e=>{const n=await e;n&&n[0]&&t(n[0])}:u.noop,[t]),b=1===c?Object(j.__)("Remove block"):Object(j.__)("Remove blocks");return Object(i.createElement)(Qa,{clientIds:e,__experimentalUpdateSelection:!t},({canDuplicate:t,canInsertDefaultBlock:r,isLocked:m,onDuplicate:f,onInsertAfter:g,onInsertBefore:h,onRemove:O,onCopy:v,onMoveTo:k,blocks:_})=>Object(i.createElement)(p.DropdownMenu,Object(l.a)({icon:si,label:Object(j.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:su,noIcons:!0},o),({onClose:o})=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(nu.Slot,{fillProps:{onClose:o}}),1===c&&Object(i.createElement)(Ja,{clientId:s}),Object(i.createElement)(au,{blocks:_,onCopy:v}),t&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,f,d),shortcut:a.duplicate},Object(j.__)("Duplicate")),r&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,h),shortcut:a.insertBefore},Object(j.__)("Insert before")),Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,g),shortcut:a.insertAfter},Object(j.__)("Insert after"))),!m&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,k)},Object(j.__)("Move to")),1===c&&Object(i.createElement)(Za,{clientId:s,onToggle:o})),Object(i.createElement)(iu.Slot,{fillProps:{onClose:o},clientIds:e}),"function"==typeof n?n({onClose:o}):i.Children.map(e=>Object(i.cloneElement)(e,{onClose:o})),Object(i.createElement)(p.MenuGroup,null,!m&&Object(i.createElement)(p.MenuItem,{onClick:Object(u.flow)(o,O,d),shortcut:a.remove},b)))))};var du=function({clientIds:e,...t}){return Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(p.ToolbarItem,null,n=>Object(i.createElement)(uu,Object(l.a)({clientIds:e,toggleProps:n},t))))};function bu({hideDragHandle:e}){const{blockClientIds:t,blockClientId:n,blockType:o,hasFixedToolbar:r,hasReducedUI:c,isValid:s,isVisual:u}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:c,getSettings:l}=e(Rn),i=o(),s=i[0],a=c(s),u=l();return{blockClientIds:i,blockClientId:s,blockType:s&&Object(m.getBlockType)(t(s)),hasFixedToolbar:u.hasFixedToolbar,hasReducedUI:u.hasReducedUI,rootClientId:a,isValid:i.every(e=>r(e)),isVisual:i.every(e=>"visual"===n(e))}},[]),{toggleBlockHighlight:b}=Object(f.useDispatch)(Rn),g=Object(i.useRef)(),{showMovers:h,gestures:O}=Ia({ref:g,onChange(e){e&&c||b(n,e)}}),j=Object(d.useViewportMatch)("medium","<")||r;if(o&&!Object(m.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const v=j||h;if(0===t.length)return null;const k=s&&u,_=t.length>1,y=a()("block-editor-block-toolbar",v&&"is-showing-movers");return Object(i.createElement)("div",{className:y},!_&&!j&&Object(i.createElement)(xa,{clientIds:t}),Object(i.createElement)("div",Object(l.a)({ref:g},O),(k||_)&&Object(i.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(i.createElement)(Ka,{clientIds:t}),Object(i.createElement)(Ca,{clientIds:t,hideDragHandle:e||c}))),k&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Gn.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Gn.Slot,{className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Gn.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),Object(i.createElement)(Gn.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),Object(i.createElement)(du,{clientIds:t}))}var mu=function({focusOnMount:e,isFixed:t,...n}){const{blockType:o,hasParents:r}=Object(f.useSelect)(e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Rn),{getBlockType:r}=e(m.store),c=o()[0];return{blockType:c&&r(t(c)),hasParents:n(c).length}},[]);if(o&&!Object(m.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const c=a()("block-editor-block-contextual-toolbar",{"has-parent":r,"is-fixed":t});return Object(i.createElement)(Ea,Object(l.a)({focusOnMount:e,className:c,"aria-label":Object(j.__)("Block tools")},n),Object(i.createElement)(bu,{hideDragHandle:t}))};function pu(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:c,getSettings:l,getLastMultiSelectedBlockClientId:i}=e(Rn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:c(),hasMultiSelection:o(),hasFixedToolbar:l().hasFixedToolbar,lastClientId:i()}}function fu({clientId:e,rootClientId:t,isValid:n,isEmptyDefaultBlock:o,capturingClientId:r,__unstablePopoverSlot:c,__unstableContentRef:l}){const{isNavigationMode:s,isMultiSelecting:u,isTyping:b,isCaretWithinFormattedText:m,hasMultiSelection:g,hasFixedToolbar:h,lastClientId:O}=Object(f.useSelect)(pu,[]),j=Object(d.useViewportMatch)("medium"),[v,k]=Object(i.useState)(!1),[_,y]=Object(i.useState)(!1),{stopTyping:E}=Object(f.useDispatch)(Rn),C=!b&&!s&&o&&n,S=s,w=!s&&!h&&j&&!C&&!u&&(!b||m),B=!(s||w||h||o);Object(ja.useShortcut)("core/block-editor/focus-toolbar",Object(i.useCallback)(()=>{k(!0),E(!0)},[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!B}),Object(i.useEffect)(()=>{w||k(!1)},[w]);const I=Object(i.useRef)(),x=_r(e),T=_r(O),N=_r(r),P=ba(l);if(!(S||w||v||C))return null;let L=x;if(!L)return null;r&&(L=N);let A=L;if(g){if(!T)return null;A={top:L,bottom:T}}const R=C?"top left right":"top right left",{ownerDocument:M}=L,D=C?void 0:M.defaultView.frameElement||Object(ui.getScrollContainer)(L)||M.body;return Object(i.createElement)(p.Popover,{ref:P,noArrow:!0,animate:!1,position:R,focusOnMount:!1,anchorRef:A,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:D,__unstableSlotName:c||null,__unstableBoundaryParent:!0,__unstableObserveElement:L,shouldAnchorIncludePadding:!0},(w||v)&&Object(i.createElement)("div",{onFocus:function(){y(!0)},onBlur:function(){y(!1)},tabIndex:-1,className:a()("block-editor-block-list__block-popover-inserter",{"is-visible":_})},Object(i.createElement)(oa,{clientId:e,rootClientId:t,__experimentalIsQuick:!0})),(w||v)&&Object(i.createElement)(mu,{focusOnMount:v,__experimentalInitialIndex:I.current,__experimentalOnIndexChange:e=>{I.current=e},key:e}),S&&Object(i.createElement)(ka,{clientId:e,rootClientId:t,blockElement:L}),C&&Object(i.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(i.createElement)(oa,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0})))}function gu(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,__unstableGetBlockWithoutInnerBlocks:r,getBlockParents:c,__experimentalGetBlockListSettingsForBlocks:l}=e(Rn),i=t()||n();if(!i)return;const{name:s,attributes:a={},isValid:d}=r(i)||{},b=c(i),p=l(b),f=Object(u.find)(b,e=>{var t;return null===(t=p[e])||void 0===t?void 0:t.__experimentalCaptureToolbars});return{clientId:i,rootClientId:o(i),name:s,isValid:d,isEmptyDefaultBlock:s&&Object(m.isUnmodifiedDefaultBlock)({name:s,attributes:a}),capturingClientId:f}}function hu({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=Object(f.useSelect)(gu,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:c,isValid:l,isEmptyDefaultBlock:s,capturingClientId:a}=n;return c?Object(i.createElement)(fu,{clientId:o,rootClientId:r,isValid:l,isEmptyDefaultBlock:s,capturingClientId:a,__unstablePopoverSlot:e,__unstableContentRef:t}):null}function Ou({children:e}){const t=Object(i.useContext)(ma),n=Object(i.useContext)(p.Disabled.Context);return t||n?e:(Bt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),Object(i.createElement)(fa,{__unstablePopoverSlot:"block-toolbar"},Object(i.createElement)(hu,{__unstablePopoverSlot:"block-toolbar"}),e))}function ju(){const{hasSelectedBlock:e,hasMultiSelection:t}=Object(f.useSelect)(Rn),{clearSelectedBlock:n}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}},[e,t,n])}function vu(e){return Object(i.createElement)("div",Object(l.a)({ref:ju()},e))}const ku=Object(i.createContext)();function _u({className:e,children:t}){const n=Object(d.useViewportMatch)("medium"),{isTyping:o,isOutlineMode:r,isFocusMode:c,isNavigationMode:l}=Object(f.useSelect)(e=>{const{isTyping:t,getSettings:n,isNavigationMode:o}=e(Rn),{outlineMode:r,focusMode:c}=n();return{isTyping:t(),isOutlineMode:r,isFocusMode:c,isNavigationMode:o()}},[]);return Object(i.createElement)("div",{ref:Object(d.useMergeRefs)([ju(),da(),ga()]),className:a()("block-editor-block-list__layout is-root-container",e,{"is-typing":o,"is-outline-mode":r,"is-focus-mode":c&&n,"is-navigate-mode":l})},t)}function yu({className:e,__experimentalLayout:t}){return function(){const e=Object(f.useSelect)(e=>e(Rn).getSettings().__experimentalBlockPatterns,[]);Object(i.useEffect)(()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||(Object(f.select)(Rn).__experimentalGetParsedPattern(e[n].name),t=ha(o))};return t=ha(o),()=>Oa(t)},[e])}(),Object(i.createElement)(Ou,null,Object(i.createElement)(_u,{className:e},Object(i.createElement)(Cu,{__experimentalLayout:t})))}function Eu({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,__experimentalLayout:r=Xn}){const[c,l]=Object(i.useState)(new Set),s=Object(i.useMemo)(()=>{const{IntersectionObserver:e}=window;if(e)return new e(e=>{l(t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n})})},[l]),{order:a,selectedBlocks:u}=Object(f.useSelect)(e=>{const{getBlockOrder:n,getSelectedBlockClientIds:o}=e(Rn);return{order:n(t),selectedBlocks:o()}},[t]);return Object(i.createElement)(Jn,{value:r},Object(i.createElement)(ku.Provider,{value:s},a.map(e=>Object(i.createElement)(f.AsyncModeProvider,{key:e,value:!c.has(e)&&!u.includes(e)},Object(i.createElement)(Nu,{rootClientId:t,clientId:e})))),a.length<1&&e,Object(i.createElement)(ia,{tagName:o,rootClientId:t,renderAppender:n}))}function Cu(e){return Object(i.createElement)(f.AsyncModeProvider,{value:!1},Object(i.createElement)(Eu,e))}function Su(){const e=Object(i.useContext)(ku);return Object(d.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}function wu(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={}}=Object(i.useContext)(Bu),{index:c,mode:l,name:s,blockTitle:u,isPartOfSelection:b,adjustScrolling:p,enableAnimation:g}=Object(f.useSelect)(e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:r,getBlockName:c,isTyping:l,getGlobalBlockCount:i,isBlockSelected:s,isBlockMultiSelected:a,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(Rn),b=s(n),p=a(n)||u(n),f=c(n),g=t(n);return{index:o(n,g),mode:r(n),name:f,blockTitle:Object(m.getBlockType)(f).title,isPartOfSelection:b||p,adjustScrolling:b||d(n),enableAnimation:!l()&&i()<=200}},[n]),h=Object(j.sprintf)(Object(j.__)("Block: %s"),u),O="html"!==l||t?"":"-visual",v=Object(d.useMergeRefs)([e.ref,Gi(n),ts(n),vr(n),Xi(n),os(n),Qi(n),Zi(n),Wi(),Su(),mi({isSelected:b,adjustScrolling:p,enableAnimation:g,triggerAnimationOnChange:c})]);return{...r,...e,ref:v,id:`block-${n}${O}`,tabIndex:0,role:"group","aria-label":h,"data-block":n,"data-type":s,"data-title":u,className:a()("wp-block block-editor-block-list__block",o,e.className,r.className,Ki(n),$i(n),qi(n),Yi(n)),style:{...r.style,...e.style}}}wu.save=m.__unstableGetBlockProps;const Bu=Object(i.createContext)();function Iu({children:e,isHtml:t,...n}){return Object(i.createElement)("div",wu(n,{__unstableIsHtml:t}),e)}const xu=Object(f.withSelect)((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:c,getTemplateLock:l,__unstableGetBlockWithoutInnerBlocks:i}=e(Rn),s=i(t),a=o(t),u=l(n),{name:d,attributes:b,isValid:m}=s||{};return{mode:r(t),isSelectionEnabled:c(),isLocked:!!u,block:s,name:d,attributes:b,isValid:m,isSelected:a}}),Tu=Object(f.withDispatch)((e,t,{select:n})=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:c,replaceBlocks:l,toggleSelection:i,__unstableMarkLastChangeAsPersistent:s}=e(Rn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n(Rn),c=r(),{clientId:l}=t,i=c.length?c:[l];o(i,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:c}=t,{getBlockIndex:l}=n(Rn),i=l(o,c);r(e,i+1,c)},onMerge(e){const{clientId:o}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=n(Rn);if(e){const e=l(o);e&&c(o,e)}else{const e=r(o);e&&c(e,o)}},onReplace(e,n,o){e.length&&!Object(m.isUnmodifiedDefaultBlock)(e[e.length-1])&&s(),l([t.clientId],e,n,o)},toggleSelection(e){i(e)}}});var Nu=Object(d.compose)(d.pure,xu,Tu,Object(d.ifCondition)(({block:e})=>!!e),Object(p.withFilters)("editor.BlockListBlock"))((function({mode:e,isLocked:t,clientId:n,isSelected:o,isSelectionEnabled:r,className:c,name:l,isValid:s,attributes:d,wrapperProps:b,setAttributes:p,onReplace:g,onInsertBlocksAfter:h,onMerge:O,toggleSelection:j}){const{removeBlock:v}=Object(f.useDispatch)(Rn),k=Object(i.useCallback)(()=>v(n),[n]);let _=Object(i.createElement)(li,{name:l,isSelected:o,attributes:d,setAttributes:p,insertBlocksAfter:t?void 0:h,onReplace:t?void 0:g,onRemove:t?void 0:k,mergeBlocks:t?void 0:O,clientId:n,isSelectionEnabled:r,toggleSelection:j});const y=Object(m.getBlockType)(l),E=y.apiVersion>1||Object(m.hasBlockSupport)(y,"lightBlockWrapper",!1);let C;y.getEditWrapperProps&&(b=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=a()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(b,y.getEditWrapperProps(d))),b&&!!b["data-align"]&&(_=Object(i.createElement)("div",{className:"wp-block","data-align":b["data-align"]},_)),C=s?"html"===e?Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{style:{display:"none"}},_),Object(i.createElement)(Iu,{isHtml:!0},Object(i.createElement)(zi,{clientId:n}))):E?_:Object(i.createElement)(Iu,b,_):Object(i.createElement)(Iu,{className:"has-warning"},Object(i.createElement)(Li,{clientId:n}),Object(i.createElement)("div",null,Object(m.getSaveElement)(y,d)));const S={clientId:n,className:c,wrapperProps:Object(u.omit)(b,["data-align"])},w=Object(i.useMemo)(()=>S,Object.values(S));return Object(i.createElement)(Bu.Provider,{value:w},Object(i.createElement)(Di,{fallback:Object(i.createElement)(Iu,{className:"has-warning"},Object(i.createElement)(Ri,null))},C))}));function Pu({level:e}){return Object(u.times)(e-1,t=>{const n=t+2===e;return Object(i.createElement)("div",{key:t,"aria-hidden":"true",className:a()("block-editor-block-navigator-indentation",{"has-item":n})})})}const Lu=(e,t,n)=>Object(j.sprintf)(Object(j.__)("Block %1$d of %2$d, Level %3$d"),e,t,n),Au=(e,t)=>Object(u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e;var Ru=Object(i.forwardRef)((function e({className:t,block:{clientId:n},isSelected:o,onClick:r,position:c,siblingBlockCount:l,level:s,tabIndex:u,onFocus:b,onDragStart:m,onDragEnd:f,draggable:g},h){const O=ql(n),v="block-navigation-block-select-button__"+Object(d.useInstanceId)(e),k=Lu(c,l,s);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.Button,{className:a()("block-editor-block-navigation-block-select-button",t),onClick:r,"aria-describedby":v,ref:h,tabIndex:u,onFocus:b,onDragStart:m,onDragEnd:f,draggable:g},Object(i.createElement)(Pu,{level:s}),Object(i.createElement)(Vl,{icon:null==O?void 0:O.icon,showColors:!0}),Object(i.createElement)(Yl,{clientId:n}),(null==O?void 0:O.anchor)&&Object(i.createElement)("span",{className:"block-editor-block-navigation-block-select-button__anchor"},O.anchor),o&&Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("(selected block)"))),Object(i.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:v},k))}));const Mu=e=>"BlockNavigationBlock-"+e;var Du=Object(i.forwardRef)((function e(t,n){const{clientId:o}=t.block,{name:r}=Object(f.useSelect)(e=>e(Rn).getBlockName(o),[o]),c=Object(d.useInstanceId)(e);return Object(i.createElement)(p.Slot,{name:Mu(o)},e=>{if(!e.length)return Object(i.createElement)(Ru,Object(l.a)({ref:n},t));const{className:o,isSelected:s,position:u,siblingBlockCount:d,level:b,tabIndex:f,onFocus:g}=t,h=Object(m.getBlockType)(r),O="block-navigation-block-slot__"+c,v=Lu(u,d,b),k={tabIndex:f,onFocus:g,ref:n,"aria-describedby":O};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:a()("block-editor-block-navigation-block-slot",o)},Object(i.createElement)(Vl,{icon:h.icon,showColors:!0}),i.Children.map(e,e=>Object(i.cloneElement)(e,{...e.props,...k})),s&&Object(i.createElement)(p.VisuallyHidden,null,Object(j.__)("(selected block)")),Object(i.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:O},v)))})}));const Fu=e=>{const{clientId:t}=Object(i.useContext)(Bu);return Object(i.createElement)(p.Fill,Object(l.a)({},e,{name:Mu(t)}))};var Vu=Object(i.forwardRef)(({onClick:e,block:t,isSelected:n,position:o,siblingBlockCount:r,level:c,...s},u)=>{const{__experimentalFeatures:d,blockDropTarget:b={}}=wi(),{clientId:m}=t,{rootClientId:p,blockMovingClientId:g,selectedBlockInBlockEditor:h}=Object(f.useSelect)(e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(Rn);return{rootClientId:t(m)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}},[m]),O=g&&h===m,{rootClientId:j,clientId:v,dropPosition:k}=b,_=j===p&&v===m&&"top"===k,y=j===p&&v===m&&"bottom"===k,E=j===m&&"inside"===k,C=a()("block-editor-block-navigation-block-contents",{"is-dropping-before":_||O,"is-dropping-after":y,"is-dropping-to-inner-blocks":E});return Object(i.createElement)(va,{clientIds:[t.clientId],elementId:"block-navigation-block-"+t.clientId},({draggable:a,onDragStart:b,onDragEnd:m})=>d?Object(i.createElement)(Du,Object(l.a)({ref:u,className:C,block:t,onClick:e,isSelected:n,position:o,siblingBlockCount:r,level:c,draggable:a&&d,onDragStart:b,onDragEnd:m},s)):Object(i.createElement)(Ru,Object(l.a)({ref:u,className:C,block:t,onClick:e,isSelected:n,position:o,siblingBlockCount:r,level:c,draggable:a&&d,onDragStart:b,onDragEnd:m},s)))});function zu({block:e,isSelected:t,isBranchSelected:n,isLastOfSelectedBranch:o,onClick:r,position:c,level:l,rowCount:s,siblingBlockCount:u,showBlockMovers:d,path:b}){const m=Object(i.useRef)(null),[g,h]=Object(i.useState)(!1),{clientId:O}=e,{isDragging:v,blockParents:k}=Object(f.useSelect)(e=>{const{isBlockBeingDragged:t,isAncestorBeingDragged:n,getBlockParents:o}=e(Rn);return{isDragging:t(O)||n(O),blockParents:o(O)}},[O]),{selectBlock:_,toggleBlockHighlight:y}=Object(f.useDispatch)(Rn),E=d&&u>0,C=a()("block-editor-block-navigation-block__mover-cell",{"is-visible":g}),{__experimentalFeatures:S,__experimentalPersistentListViewFeatures:w,isTreeGridMounted:B}=wi(),I=a()("block-editor-block-navigation-block__menu-cell",{"is-visible":g});Object(i.useEffect)(()=>{w&&!B&&t&&m.current.focus()},[]),Object(i.useEffect)(()=>{S&&t&&m.current.focus()},[S,t]);const x=w?y:()=>{},T=()=>{h(!0),x(O,!0)},N=()=>{h(!1),x(O,!1)},P=a()({"is-selected":t,"is-branch-selected":w&&n,"is-last-of-selected-branch":w&&o,"is-dragging":v});return Object(i.createElement)(fi,{className:P,onMouseEnter:T,onMouseLeave:N,onFocus:T,onBlur:N,level:l,position:c,rowCount:s,path:b,id:"block-navigation-block-"+O,"data-block":O},Object(i.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:E?void 0:2,ref:m},({ref:n,tabIndex:o,onFocus:s})=>Object(i.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(i.createElement)(Vu,{block:e,onClick:()=>r(e.clientId),isSelected:t,position:c,siblingBlockCount:u,level:l,ref:n,tabIndex:o,onFocus:s}))),E&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.__experimentalTreeGridCell,{className:C,withoutGridItem:!0},Object(i.createElement)(p.__experimentalTreeGridItem,null,({ref:e,tabIndex:t,onFocus:n})=>Object(i.createElement)(Ei,{orientation:"vertical",clientIds:[O],ref:e,tabIndex:t,onFocus:n})),Object(i.createElement)(p.__experimentalTreeGridItem,null,({ref:e,tabIndex:t,onFocus:n})=>Object(i.createElement)(Ci,{orientation:"vertical",clientIds:[O],ref:e,tabIndex:t,onFocus:n})))),S&&Object(i.createElement)(p.__experimentalTreeGridCell,{className:I},({ref:e,tabIndex:t,onFocus:n})=>Object(i.createElement)(uu,{clientIds:[O],icon:si,toggleProps:{ref:e,tabIndex:t,onFocus:n},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},({onClose:e})=>Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItem,{onClick:async()=>{if(k.length)for(const e of k)await _(e);else await _(null);await _(O),e()}},Object(j.__)("Go to block"))))))}function Hu({parentBlockClientId:e,position:t,level:n,rowCount:o,path:r}){const c=Object(f.useSelect)(t=>{const{isBlockBeingDragged:n,isAncestorBeingDragged:o}=t(Rn);return n(e)||o(e)},[e]),l="block-navigation-appender-row__description_"+Object(d.useInstanceId)(Hu),s=Object(j.sprintf)(Object(j.__)("Add block at position %1$d, Level %2$d"),t,n);return Object(i.createElement)(fi,{className:a()({"is-dragging":c}),level:n,position:t,rowCount:o,path:r},Object(i.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},({ref:t,tabIndex:o,onFocus:r})=>Object(i.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(i.createElement)(Pu,{level:n}),Object(i.createElement)(oa,{rootClientId:e,__experimentalIsQuick:!0,"aria-describedby":l,toggleProps:{ref:t,tabIndex:o,onFocus:r}}),Object(i.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:l},s))))}function Gu(e){const{blocks:t,selectBlock:n,selectedBlockClientIds:o,showAppender:r,showBlockMovers:c,showNestedBlocks:l,parentBlockClientId:s,level:a=1,terminatedLevels:d=[],path:b=[],isBranchSelected:m=!1,isLastOfBranch:p=!1}=e,f=!s,g=Object(u.compact)(t),h=e=>r&&!f&&Au(e,o),O=h(s),j=g.length,v=O?j+1:j,k=v;return Object(i.createElement)(i.Fragment,null,Object(u.map)(g,(e,t)=>{const{clientId:s,innerBlocks:u}=e,f=t+1,g=v===f?[...d,a]:d,O=[...b,f],k=l&&!!u&&!!u.length,_=h(s),y=k||_,E=Au(s,o),C=m||E&&y,S=t===j-1,w=E||p&&S,B=p&&!y&&S;return Object(i.createElement)(i.Fragment,{key:s},Object(i.createElement)(zu,{block:e,onClick:n,isSelected:E,isBranchSelected:C,isLastOfSelectedBranch:B,level:a,position:f,rowCount:v,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:d,path:O}),y&&Object(i.createElement)(Gu,{blocks:u,selectedBlockClientIds:o,selectBlock:n,isBranchSelected:C,isLastOfBranch:w,showAppender:r,showBlockMovers:c,showNestedBlocks:l,parentBlockClientId:s,level:a+1,terminatedLevels:g,path:O}))}),O&&Object(i.createElement)(Hu,{parentBlockClientId:s,position:v,rowCount:k,level:a,terminatedLevels:d,path:[...b,k]}))}function Uu(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}Gu.defaultProps={selectBlock:()=>{}};const Wu=["top","bottom"];function Ku(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=Object(f.useSelect)(Rn),[c,l]=Object(i.useState)(),{rootClientId:s,blockIndex:a}=c||{},u=aa(s,a),b=Object(d.useThrottle)(Object(i.useCallback)((c,i)=>{const s={x:c.clientX,y:c.clientY},a=!!c.dataTransfer.getData("wp-blocks"),u=a?o():void 0,d=function(e,t){let n,o,r,c;for(const l of e){if(l.isDraggedBlock)continue;const i=l.element.getBoundingClientRect(),[s,a]=ua(t,i,Wu),u=Uu(t,i);if(void 0===r||s<r||u){r=s;const t=e.indexOf(l),d=e[t-1];if("top"===a&&d&&d.rootClientId===l.rootClientId&&!d.isDraggedBlock?(o=d,n="bottom",c=d.element.getBoundingClientRect()):(o=l,n=a,c=i),u)break}}if(!o)return;const l="bottom"===n;if(l&&o.canInsertDraggedBlocksAsChild&&(o.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const i=l?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+i,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map(o=>{const c=o.dataset.block,l=e(c);return{clientId:c,rootClientId:l,blockIndex:t(c,l),element:o,isDraggedBlock:!!a&&u.includes(c),innerBlockCount:n(c),canInsertDraggedBlocksAsSibling:!a||r(u,l),canInsertDraggedBlocksAsChild:!a||r(u,c)}}),s);d&&l(d)},[]),200);return{ref:Object(d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){b(e,e.currentTarget)},onDragEnd(){b.cancel(),l(null)}}),target:c}}function $u({__experimentalFeatures:e,__experimentalPersistentListViewFeatures:t,...n}){let{ref:o,target:r}=Ku();const c=Object(i.useRef)(!1);Object(i.useEffect)(()=>{c.current=!0},[]),e||(r=void 0);const l=Object(i.useMemo)(()=>({__experimentalFeatures:e,__experimentalPersistentListViewFeatures:t,blockDropTarget:r,isTreeGridMounted:c.current}),[e,t,r,c.current]);return Object(i.createElement)(p.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(j.__)("Block navigation structure"),ref:o},Object(i.createElement)(Si.Provider,{value:l},Object(i.createElement)(Gu,n)))}function qu({onSelect:e=u.noop,__experimentalFeatures:t}){const{rootBlock:n,rootBlocks:o,selectedBlockClientId:r}=Object(f.useSelect)(e=>{const{getBlockHierarchyRootClientId:t,getSelectedBlockClientId:n,__unstableGetClientIdsTree:o,__unstableGetClientIdWithClientIdsTree:r}=e(Rn),c=n(),l=o();return{rootBlock:c&&!Object(u.isArray)(c)?r(t(c)):null,rootBlocks:l,selectedBlockClientId:c}}),{selectBlock:c}=Object(f.useDispatch)(Rn);if(!o||0===o.length)return null;const l=n&&(!Au(n.clientId,r)||n.innerBlocks&&0!==n.innerBlocks.length);return Object(i.createElement)("div",{className:"block-editor-block-navigation__container"},Object(i.createElement)("p",{className:"block-editor-block-navigation__label"},Object(j.__)("List view")),Object(i.createElement)($u,{blocks:l?[n]:o,selectedBlockClientIds:[r],selectBlock:function(t){c(t),e(t)},__experimentalFeatures:t,showNestedBlocks:!0}))}function Yu({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return Object(i.createElement)(p.Button,Object(l.a)({},r,{ref:o,icon:ii,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:Object(j.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e}))}var Xu=Object(i.forwardRef)((function({isDisabled:e,__experimentalFeatures:t,...n},o){const r=Object(f.useSelect)(e=>!!e(Rn).getBlockCount(),[])&&!e;return Object(i.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:({isOpen:e,onToggle:t})=>Object(i.createElement)(Yu,Object(l.a)({},n,{innerRef:o,isOpen:e,onToggle:t,isEnabled:r})),renderContent:()=>Object(i.createElement)(qu,{__experimentalFeatures:t})})}));const Qu=[cc.rawShortcut.primary("z"),cc.rawShortcut.primaryShift("z"),cc.rawShortcut.primary("y")],Zu=Object(i.createElement)(p.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(u.fromPairs)(Qu.map(e=>[e,e=>e.preventDefault()]))}),Ju=()=>Zu,ed={position:"bottom right",isAlternate:!0};var td=()=>Object(i.createElement)(i.Fragment,null,["bold","italic","link","text-color"].map(e=>Object(i.createElement)(p.Slot,{name:"RichText.ToolbarControls."+e,key:e})),Object(i.createElement)(p.Slot,{name:"RichText.ToolbarControls"},e=>0!==e.length&&Object(i.createElement)(p.ToolbarItem,null,t=>Object(i.createElement)(p.DropdownMenu,{icon:ji,label:Object(j.__)("More"),toggleProps:t,controls:Object(u.orderBy)(e.map(([{props:e}])=>e),"title"),popoverProps:ed}))));var nd=({inline:e,anchorRef:t})=>e?Object(i.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(i.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},Object(i.createElement)(p.ToolbarGroup,null,Object(i.createElement)(td,null)))):Object(i.createElement)(Gn,{group:"inline"},Object(i.createElement)(td,null));function od(){const{didAutomaticChange:e,getSettings:t}=Object(f.useSelect)(Rn);return Object(d.useRefEffect)(n=>{function o(n){const{keyCode:o}=n;o!==cc.DELETE&&o!==cc.BACKSPACE&&o!==cc.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}},[])}function rd(e){return e.filter(({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e)).map(e=>`<img src="${Object($a.createBlobURL)(e)}">`).join("")}var cd=n("@wordpress/shortcode");function ld(e,t){if(t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function id(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function sd({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?sd.EMPTY_ARRAY:e||t?e||(Bt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map(e=>"core/"+e)):void 0}sd.EMPTY_ARRAY=[];function ad({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o,onSplitMiddle:r,multilineTag:l}){if(!n||!o)return;const i=[],[s,a]=Object(c.split)(e),u=t.length>0;let d=-1;const b=Object(c.isEmpty)(s)&&!Object(c.isEmpty)(a);u&&Object(c.isEmpty)(s)||(i.push(o(Object(c.toHTMLString)({value:s,multilineTag:l}),!b)),d+=1),u?(i.push(...t),d+=t.length):r&&i.push(r()),(u||r)&&Object(c.isEmpty)(a)||i.push(o(Object(c.toHTMLString)({value:a,multilineTag:l}),b));n(i,u?d:1,u?-1:0)}function ud(e){const t=Object(i.useRef)(e);return t.current=e,Object(d.useRefEffect)(e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:s,onReplace:a,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:b,multilineTag:p,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let O="",j="";try{O=h.getData("text/plain"),j=h.getData("text/html")}catch(e){try{j=h.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",j),window.console.log("Received plain text:\n\n",O),o)return void r(Object(c.insert)(l,O));const v=i.reduce((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:j,plainText:O})),e),l);if(v!==l)return void r(v);const k=[...Object(ui.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=Object(c.create)({html:j,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:f});return ld(e,l.activeFormats),void r(Object(c.insert)(l,e))}if(g)return void r(Object(c.insert)(l,Object(c.create)({text:O})));if(k&&k.length&&!j){const e=Object(m.pasteHandler)({HTML:rd(k),mode:"BLOCKS",tagName:s,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",k),void(a&&Object(c.isEmpty)(l)?a(e):ad({value:l,pastedBlocks:e,onReplace:a,onSplit:u,onSplitMiddle:d,multilineTag:p}))}let _=a&&u?"AUTO":"INLINE";var y;"AUTO"===_&&Object(c.isEmpty)(l)&&(y=O,Object(cd.regexp)(".*").test(y))&&(_="BLOCKS"),b&&Object(c.isEmpty)(l)&&Object(Vs.isURL)(O.trim())&&(_="BLOCKS");const E=Object(m.pasteHandler)({HTML:j,plainText:O,mode:_,tagName:s,preserveWhiteSpace:f});if("string"==typeof E){let e=Object(c.create)({html:E});ld(e,l.activeFormats),p&&(e=Object(c.replace)(e,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),r(Object(c.insert)(l,e))}else E.length>0&&(a&&Object(c.isEmpty)(l)?a(E,E.length-1,-1):ad({value:l,pastedBlocks:E,onReplace:a,onSplit:u,onSplitMiddle:d,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}},[])}function dd(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=Object(f.useDispatch)(Rn),o=Object(i.useRef)(e);return o.current=e,Object(d.useRefEffect)(e=>{function r(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:r,text:l}=e;if(" "!==l.slice(r-1,r))return;const i=l.slice(0,r).trim(),s=Object(m.getBlockTransforms)("from").filter(({type:e})=>"prefix"===e),a=Object(m.findTransform)(s,({prefix:e})=>i===e);if(!a)return;const u=Object(c.toHTMLString)({value:Object(c.slice)(e,r,l.length)});t([a.transform(u)]),n()}function l(e){const{inputType:c}=e,{value:l,onChange:i,__unstableAllowPrefixTransformations:s,formatTypes:a}=o.current;if("insertText"!==c)return;s&&r&&r();const u=a.reduce((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e),l);u!==l&&(t(),i({...u,activeFormats:l.activeFormats}),n())}return e.addEventListener("input",l),()=>{e.removeEventListener("input",l)}},[])}function bd(e){const{__unstableMarkAutomaticChange:t}=Object(f.useDispatch)(Rn),n=Object(i.useRef)(e);return n.current=e,Object(d.useRefEffect)(e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:a,onChange:u,disableLineBreaks:d,onSplitAtEnd:b}=n.current;if(e.keyCode!==cc.ENTER)return;e.preventDefault();const p={...r};p.formats=o(r);const f=l&&i;if(l){const e=Object(m.getBlockTransforms)("from").filter(({type:e})=>"enter"===e),n=Object(m.findTransform)(e,e=>e.regExp.test(p.text));n&&(l([n.transform({content:p.text})]),t())}if(a)e.shiftKey?d||u(Object(c.insert)(p,"\n")):f&&Object(c.__unstableIsEmptyLine)(p)?ad({value:p,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:a}):u(Object(c.__unstableInsertLineSeparator)(p));else{const{text:t,start:n,end:o}=p,r=b&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u(Object(c.insert)(p,"\n")):!f&&r?b():f&&ad({value:p,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:a})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}},[])}function md(e){return e(c.store).getFormatTypes()}const pd=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function fd({formatTypes:e,onChange:t,onFocus:n,value:o,forwardedRef:r}){return e.map(e=>{const{name:l,edit:s}=e;if(!s)return null;const a=Object(c.getActiveFormat)(o,l),u=void 0!==a,d=Object(c.getActiveObject)(o),b=void 0!==d&&d.type===l;return Object(i.createElement)(s,{key:l,isActive:u,activeAttributes:u&&a.attributes||{},isObjectActive:b,activeObjectAttributes:b&&d.attributes||{},value:o,onChange:t,onFocus:n,contentRef:r})})}const gd=Object(i.forwardRef)((function e({children:t,tagName:n="div",value:o="",onChange:r,isSelected:s,multiline:b,inlineToolbar:g,wrapperClassName:h,autocompleters:j,onReplace:v,placeholder:k,allowedFormats:_,formattingControls:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:N,__unstableEmbedURLOnPaste:P,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:R,__unstableAllowPrefixTransformations:M,...D},F){const V=Object(d.useInstanceId)(e);x=x||V,D=function(e){return Object(u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(D);const z=Object(i.useRef)(),{clientId:H}=O(),{selectionStart:G,selectionEnd:U,isSelected:W,disabled:K}=Object(f.useSelect)(e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Rn),c=t(),l=n();let i;return void 0===s?i=c.clientId===H&&c.attributeKey===x:s&&(i=c.clientId===H),{selectionStart:i?c.offset:void 0,selectionEnd:i?l.offset:void 0,isSelected:i,disabled:o()||r()}}),{selectionChange:$}=Object(f.useDispatch)(Rn),q=id(b),Y=sd({allowedFormats:_,formattingControls:y,disableFormats:L}),X=!Y||Y.length>0;let Q=o,Z=r;Array.isArray(o)&&(Q=m.children.toHTML(o),Z=e=>r(m.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes)));const J=Object(i.useCallback)((e,t)=>{$(H,x,e,t)},[H,x]),{formatTypes:ee,prepareHandlers:te,valueHandlers:ne,changeHandlers:oe,dependencies:re}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=Object(f.useSelect)(md,[]),c=Object(i.useMemo)(()=>r.filter(({name:e,tagName:t})=>!(o&&!o.includes(e))&&(!n||!pd.has(t))),[r,o,pd]),l=Object(f.useSelect)(n=>c.reduce((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),o),{}),[c,e,t]),s=Object(f.useDispatch)(),a=[],u=[],d=[],b=[];return c.forEach(n=>{if(n.__experimentalCreatePrepareEditableTree){const o=l[n.name],r=n.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(r):a.push(r);for(const e in o)b.push(o[e])}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:t,blockClientId:e})),d.push(n.__experimentalCreateOnChangeEditableValue({...l[n.name]||{},...o},{richTextIdentifier:t,blockClientId:e}))}}),{formatTypes:c,prepareHandlers:a,valueHandlers:u,changeHandlers:d,dependencies:b}}({clientId:H,identifier:x,withoutInteractiveFormatting:E,allowedFormats:Y});function ce(e){return ee.forEach(t=>{t.__experimentalCreatePrepareEditableTree&&(e=Object(c.removeFormat)(e,t.name,0,e.text.length))}),e.formats}const{value:le,onChange:ie,onFocus:se,ref:ae}=Object(c.__unstableUseRichText)({value:Q,onChange(e,{__unstableFormats:t,__unstableText:n}){Z(e),Object.values(oe).forEach(e=>{e(t,n)})},selectionStart:G,selectionEnd:U,onSelectionChange:J,placeholder:k,__unstableIsSelected:W,__unstableMultilineTag:q,__unstableDisableFormats:L,preserveWhiteSpace:T,__unstableDependencies:re,__unstableAfterParse:function(e){return ne.reduce((t,n)=>n(t,e.text),e.formats)},__unstableBeforeSerialize:ce,__unstableAddInvisibleFormats:function(e){return te.reduce((t,n)=>n(t,e.text),e.formats)}}),ue=function(e){return Object(p.__unstableUseAutocompleteProps)({...e,completers:Gl(e)})}({onReplace:v,completers:j,record:le,onChange:ie});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=Object(f.useSelect)(Rn),{enterFormattedText:o,exitFormattedText:r}=Object(f.useDispatch)(Rn);Object(i.useEffect)(()=>{t?n()||o():n()&&r()},[t])}({value:le}),function({html:e,value:t}){const n=Object(i.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=Object(f.useDispatch)(Rn);Object(i.useLayoutEffect)(()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout(()=>{r()},1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text},[e,o])}({html:Q,value:le});const de=n,be=Object(i.createElement)(i.Fragment,null,W&&t&&t({value:le,onChange:ie,onFocus:se}),W&&Object(i.createElement)(Ju,null),W&&ue.children,W&&Object(i.createElement)(fd,{value:le,onChange:ie,onFocus:se,formatTypes:ee,forwardedRef:z}),W&&X&&Object(i.createElement)(nd,{inline:g,anchorRef:z.current}),Object(i.createElement)(de,Object(l.a)({role:"textbox","aria-multiline":!0,"aria-label":k},D,ue,{ref:Object(d.useMergeRefs)([ue.ref,D.ref,ae,dd({value:le,onChange:ie,__unstableAllowPrefixTransformations:M,formatTypes:ee,onReplace:v}),od(),ud({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:ee,tagName:n,onReplace:v,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:P,multilineTag:q,preserveWhiteSpace:T,pastePlainText:N}),bd({removeEditorOnlyFormats:ce,value:le,onReplace:v,onSplit:w,onSplitMiddle:I,multilineTag:q,onChange:ie,disableLineBreaks:A,onSplitAtEnd:B}),z,F]),contentEditable:!K||void 0,suppressContentEditableWarning:!K,className:a()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:R,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===cc.DELETE||t===cc.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===cc.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!Object(c.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&Object(c.isEmpty)(le)&&l&&C(!l),e.preventDefault()}}})));if(!h)return be;Bt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const me=a()("block-editor-rich-text",h);return Object(i.createElement)("div",{className:me},be)}));gd.Content=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&(e=m.children.toHTML(e));const r=id(n);!e&&r&&(e=`<${r}></${r}>`);const c=Object(i.createElement)(i.RawHTML,null,e);return t?Object(i.createElement)(t,Object(u.omit)(o,["format"]),c):c},gd.isEmpty=e=>!e||0===e.length;var hd=gd;function Od({value:e,onChange:t}){return Object(i.createElement)(Fu,null,Object(i.createElement)(hd,{value:e,onChange:t,placeholder:Object(j.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var jd=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var vd=function({icon:e=jd,label:t=Object(j.__)("Choose variation"),instructions:n=Object(j.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:c}){const l=a()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return Object(i.createElement)(p.Placeholder,{icon:e,label:t,instructions:n,className:l},Object(i.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(j.__)("Block variations")},o.map(e=>Object(i.createElement)("li",{key:e.name},Object(i.createElement)(p.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(i.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title)))),c&&Object(i.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(i.createElement)(p.Button,{isLink:!0,onClick:()=>r()},Object(j.__)("Skip"))))};var kd=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const _d="carousel",yd="grid",Ed=({onStartBlank:e,onBlockPatternSelect:t})=>Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},Object(i.createElement)(p.Button,{onClick:e},Object(j.__)("Start blank")),Object(i.createElement)(p.Button,{isPrimary:!0,onClick:t},Object(j.__)("Choose"))),Cd=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},Object(i.createElement)(p.Button,{icon:hi,label:Object(j.__)("Previous pattern"),onClick:e,disabled:0===n}),Object(i.createElement)(p.Button,{icon:gi,label:Object(j.__)("Next pattern"),onClick:t,disabled:n===o-1}));var Sd=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:c,onBlockPatternSelect:l,onStartBlank:s})=>{const a=e===_d,u=Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},Object(i.createElement)(p.Button,{icon:Yn,label:Object(j.__)("Carousel view"),onClick:()=>t(_d),isPressed:a}),Object(i.createElement)(p.Button,{icon:kd,label:Object(j.__)("Grid view"),onClick:()=>t(yd),isPressed:e===yd}));return Object(i.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},a&&Object(i.createElement)(Cd,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:c}),u,a&&Object(i.createElement)(Ed,{onBlockPatternSelect:l,onStartBlank:s}))};var wd=function(e,t,n){return Object(f.useSelect)(o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:c,__experimentalGetParsedPattern:l,__experimentalGetAllowedPatterns:i}=o(Rn),s=r(e);let a=[];return a=n?i(s).filter(n):c(t,s),a.map(({name:e})=>l(e))},[e,t,n])};const Bd=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o})=>{const r=Object(p.__unstableUseCompositeState)(),c="block-editor-block-pattern-setup__container";if(e===_d){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return Object(i.createElement)("div",{className:c},Object(i.createElement)("ul",{className:"carousel-container"},n.map((t,n)=>Object(i.createElement)(xd,{className:e.get(n)||"",key:t.name,pattern:t}))))}return Object(i.createElement)(p.__unstableComposite,Object(l.a)({},r,{role:"listbox",className:c,"aria-label":Object(j.__)("Patterns list")}),n.map(e=>Object(i.createElement)(Id,{key:e.name,pattern:e,onSelect:o,composite:r})))};function Id({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,title:c,description:s,viewportWidth:a=700}=e,u=Object(d.useInstanceId)(Id,o+"__item-description");return Object(i.createElement)("div",{className:o+"__list-item","aria-label":e.title,"aria-describedby":e.description?u:void 0},Object(i.createElement)(p.__unstableCompositeItem,Object(l.a)({role:"option",as:"div"},n,{className:o+"__item",onClick:()=>t(r)}),Object(i.createElement)(hs,{blocks:r,viewportWidth:a}),Object(i.createElement)("div",{className:o+"__item-title"},c)),!!s&&Object(i.createElement)(p.VisuallyHidden,{id:u},s))}function xd({className:e,pattern:t}){const{blocks:n,title:o,description:r}=t,c=Object(d.useInstanceId)(xd,"block-editor-block-pattern-setup-list__item-description");return Object(i.createElement)("li",{className:"pattern-slide "+e,"aria-label":o,"aria-describedby":r?c:void 0},Object(i.createElement)(hs,{blocks:n,__experimentalLive:!0}),!!r&&Object(i.createElement)(p.VisuallyHidden,{id:c},r))}var Td=({clientId:e,blockName:t,filterPatternsFn:n,startBlankComponent:o,onBlockPatternSelect:r})=>{const[c,l]=Object(i.useState)(_d),[s,a]=Object(i.useState)(0),[u,d]=Object(i.useState)(!1),{replaceBlock:b}=Object(f.useDispatch)(Rn),p=wd(e,t,n);if(null==p||!p.length||u)return o;const g=r||(t=>{const n=t.map(e=>Object(m.cloneBlock)(e));b(e,n)});return Object(i.createElement)("div",{className:"block-editor-block-pattern-setup view-mode-"+c},Object(i.createElement)(Sd,{viewMode:c,setViewMode:l,activeSlide:s,totalSlides:p.length,handleNext:()=>{a(e=>e+1)},handlePrevious:()=>{a(e=>e-1)},onBlockPatternSelect:()=>{g(p[s].blocks)},onStartBlank:()=>{d(!0)}}),Object(i.createElement)(Bd,{viewMode:c,activeSlide:s,patterns:p,onBlockPatternSelect:g}))};const Nd=(e,t)=>{if(!t||!e)return;const n=t.filter(({attributes:t})=>!(!t||!Object.keys(t).length)&&Object(u.isMatch)(e,t));return 1===n.length?n[0]:void 0};var Pd=function({blockClientId:e}){const[t,n]=Object(i.useState)(),{updateBlockAttributes:o}=Object(f.useDispatch)(Rn),{variations:r,blockAttributes:c}=Object(f.useSelect)(t=>{const{getBlockVariations:n}=t(m.store),{getBlockName:o,getBlockAttributes:r}=t(Rn),c=e&&o(e);return{variations:c&&n(c,"transform"),blockAttributes:r(e)}},[e]);if(Object(i.useEffect)(()=>{var e;n(null===(e=Nd(c,r))||void 0===e?void 0:e.name)},[c,r]),null==r||!r.length)return null;const l=r.map(({name:e,title:t,description:n})=>({value:e,label:t,info:n})),s=t=>{o(e,{...r.find(({name:e})=>e===t).attributes})},a="block-editor-block-variation-transforms";return Object(i.createElement)(p.DropdownMenu,{className:a,label:Object(j.__)("Transform to variation"),text:Object(j.__)("Transform to variation"),popoverProps:{position:"bottom center",className:a+"__popover"},icon:ji,toggleProps:{iconPosition:"right"}},()=>Object(i.createElement)("div",{className:a+"__container"},Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItemsChoice,{choices:l,value:t,onSelect:s}))))};const Ld=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Ad=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Rd={top:{icon:Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(j._x)("Align top","Block vertical alignment setting")},center:{icon:Ad,title:Object(j._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Ld,title:Object(j._x)("Align bottom","Block vertical alignment setting")}},Md=["top","center","bottom"],Dd={isAlternate:!0};var Fd=function({value:e,onChange:t,controls:n=Md,isCollapsed:o=!0,isToolbar:r}){const c=Rd[e],s=Rd.top,a=r?p.ToolbarGroup:p.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return Object(i.createElement)(a,Object(l.a)({popoverProps:Dd,icon:c?c.icon:s.icon,label:Object(j._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map(n=>{return{...Rd[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})},u))};function Vd(e){return Object(i.createElement)(Fd,Object(l.a)({},e,{isToolbar:!1}))}function zd(e){return Object(i.createElement)(Fd,Object(l.a)({},e,{isToolbar:!0}))}var Hd=Object(d.createHigherOrderComponent)(e=>t=>{const n=Io("color.palette"),o=!Io("color.custom"),r=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?o:t.disableCustomColors,s=!Object(u.isEmpty)(r)||!c;return Object(i.createElement)(e,Object(l.a)({},t,{colors:r,disableCustomColors:c,hasColorsToChoose:s}))},"withColorContext"),Gd=Hd(p.ColorPalette);function Ud({onChange:e,value:t,...n}){return Object(i.createElement)($o,Object(l.a)({},n,{onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0}))}const Wd=[];function Kd(e){const t=Io("color.gradients")||Wd,n=!Io("color.customGradient");return Object(i.createElement)(p.__experimentalGradientPicker,Object(l.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var $d=function(e){const t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?p.__experimentalGradientPicker:Kd;return Object(i.createElement)(t,e)};function qd({className:e,value:t,onChange:n,label:o=Object(j.__)("Gradient Presets"),...r}){const c=Io("color.gradients"),s=!Io("color.customGradient");return Object(u.isEmpty)(c)&&s?null:Object(i.createElement)(p.BaseControl,{className:a()("block-editor-gradient-picker-control",e)},Object(i.createElement)(p.BaseControl.VisualLabel,null,o),Object(i.createElement)($d,Object(l.a)({value:t,onChange:n,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:c,disableCustomGradients:s},r)))}function Yd(e){const t=Io("color.gradients");return Object(u.isEmpty)(t)?null:Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Gradient")},Object(i.createElement)(qd,e))}const Xd=[25,50,75,100];function Qd({imageWidth:e,imageHeight:t,imageSizeOptions:n=[],isResizable:o=!0,slug:r,width:c,height:l,onChange:s,onChangeImage:a=u.noop}){var d,b;function m(e,t){return()=>{s({width:e,height:t})}}return Object(i.createElement)(i.Fragment,null,!Object(u.isEmpty)(n)&&Object(i.createElement)(p.SelectControl,{label:Object(j.__)("Image size"),value:r,options:n,onChange:a}),o&&Object(i.createElement)("div",{className:"block-editor-image-size-control"},Object(i.createElement)("p",{className:"block-editor-image-size-control__row"},Object(j.__)("Image dimensions")),Object(i.createElement)("div",{className:"block-editor-image-size-control__row"},Object(i.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(j.__)("Width"),value:null!==(d=null!=c?c:e)&&void 0!==d?d:"",min:1,onChange:e=>s({width:parseInt(e,10)})}),Object(i.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(j.__)("Height"),value:null!==(b=null!=l?l:t)&&void 0!==b?b:"",min:1,onChange:e=>s({height:parseInt(e,10)})})),Object(i.createElement)("div",{className:"block-editor-image-size-control__row"},Object(i.createElement)(p.ButtonGroup,{"aria-label":Object(j.__)("Image size presets")},Xd.map(n=>{const o=Math.round(e*(n/100)),r=Math.round(t*(n/100)),s=c===o&&l===r;return Object(i.createElement)(p.Button,{key:n,isSmall:!0,isPrimary:s,isPressed:s,onClick:m(o,r)},n,"%")})),Object(i.createElement)(p.Button,{isSmall:!0,onClick:m()},Object(j.__)("Reset")))))}var Zd=Object(d.createHigherOrderComponent)(e=>t=>{const{clientId:n}=O();return Object(i.createElement)(e,Object(l.a)({},t,{clientId:n}))},"withClientId");var Jd=Zd(({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o})=>Object(i.createElement)(ca,{rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o}));var eb=Object(d.compose)([Zd,Object(f.withSelect)((e,{clientId:t})=>{const{getBlockOrder:n}=e(Rn),o=n(t);return{lastBlockClientId:Object(u.last)(o)}})])(({clientId:e,lastBlockClientId:t})=>Object(i.createElement)(ra,{rootClientId:e,lastBlockClientId:t})),tb=n("@wordpress/is-shallow-equal"),nb=n.n(tb);const ob=new WeakMap;function rb(e){const{clientId:t,allowedBlocks:n,template:o,templateLock:r,wrapperRef:c,templateInsertUpdatesSelection:l,__experimentalCaptureToolbars:s,__experimentalAppenderTagName:a,renderAppender:d,orientation:b,placeholder:p,__experimentalLayout:g}=e;!function(e,t,n,o,r){const{updateBlockListSettings:c}=Object(f.useDispatch)(Rn),{blockListSettings:l,parentLock:s}=Object(f.useSelect)(t=>{const n=t(Rn).getBlockRootClientId(e);return{blockListSettings:t(Rn).getBlockListSettings(e),parentLock:t(Rn).getTemplateLock(n)}},[e]),a=Object(i.useMemo)(()=>t,t);Object(i.useLayoutEffect)(()=>{const t={allowedBlocks:a,templateLock:void 0===n?s:n};void 0!==o&&(t.__experimentalCaptureToolbars=o),void 0!==r&&(t.orientation=r),nb()(l,t)||c(e,t)},[e,l,a,n,s,o,r,c])}(t,n,r,s,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:r}=Object(f.useSelect)(Rn),{replaceInnerBlocks:c}=Object(f.useDispatch)(Rn),l=Object(f.useSelect)(t=>t(Rn).getBlocks(e),[e]),s=Object(i.useRef)(null);Object(i.useLayoutEffect)(()=>{if(0===l.length||"all"===n){if(!Object(u.isEqual)(t,s.current)){s.current=t;const n=Object(m.synchronizeBlocksWithTemplate)(l,t);Object(u.isEqual)(n,l)||c(e,n,0===l.length&&o&&0!==n.length,r())}}},[l,t,n,e])}(t,o,r,l);const h=Object(f.useSelect)(e=>{const n=e(Rn).getBlock(t),o=Object(m.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){ob.has(t)||ob.set(t,new WeakMap);const n=ob.get(t);if(!n.has(e)){const o=Object(u.mapValues)(t.providesContext,t=>e[t]);n.set(e,o)}return n.get(e)}(n.attributes,o)},[t]);return Object(i.createElement)(Zl,{value:h},Object(i.createElement)(Cu,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:a,__experimentalLayout:g,wrapperRef:c,placeholder:p}))}function cb(e){return bs(e),Object(i.createElement)(rb,e)}const lb=Object(i.forwardRef)((e,t)=>{const n=ib({ref:t},e);return Object(i.createElement)("div",{className:"block-editor-inner-blocks"},Object(i.createElement)("div",n))});function ib(e={},t={}){const{clientId:n}=O(),o=Object(d.useViewportMatch)("medium","<"),r=Object(f.useSelect)(e=>{const{getBlockName:t,isBlockSelected:r,hasSelectedInnerBlock:c,isNavigationMode:l}=e(Rn),i=l()||o;return"core/template"!==t(n)&&!r(n)&&!c(n,!0)&&i},[n,o]),c=Object(d.useMergeRefs)([e.ref,da({rootClientId:n})]),s=t.value&&t.onChange?cb:rb;return{...e,ref:c,className:a()(e.className,"block-editor-block-list__layout",{"has-overlay":r}),children:Object(i.createElement)(s,Object(l.a)({},t,{clientId:n}))}}lb.DefaultBlockAppender=eb,lb.ButtonBlockAppender=Jd,lb.Content=Object(m.withBlockContentContext)(({BlockContent:e})=>Object(i.createElement)(e,null));var sb=lb;var ab=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var ub=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var db=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var bb=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));const mb={left:ab,center:ub,right:db,"space-between":bb};var pb=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:c}){const s=e=>{n(e===o?void 0:e)},a=o?mb[o]:mb.left,u=[{name:"left",icon:ab,title:Object(j.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:ub,title:Object(j.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:db,title:Object(j.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:bb,title:Object(j.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")}],d=c?p.ToolbarGroup:p.ToolbarDropdownMenu,b=c?{isCollapsed:t}:{};return Object(i.createElement)(d,Object(l.a)({icon:a,popoverProps:r,label:Object(j.__)("Change items justification"),controls:u.filter(t=>e.includes(t.name))},b))};function fb(e){return Object(i.createElement)(pb,Object(l.a)({},e,{isToolbar:!1}))}function gb(e){return Object(i.createElement)(pb,Object(l.a)({},e,{isToolbar:!0}))}var hb=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(Un.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));const Ob=[{id:"opensInNewTab",title:Object(j.__)("Open in new tab")}];var jb=({value:e,onChange:t=u.noop,settings:n=Ob})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map(t=>Object(i.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id]}));return Object(i.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(i.createElement)(p.VisuallyHidden,{as:"legend"},Object(j.__)("Currently selected link settings")),r)};class vb extends i.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||Object(i.createRef)(),this.inputRef=Object(i.createRef)(),this.updateSuggestions=Object(u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,es()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout(()=>{this.scrollingIntoView=!1},100)),e.value!==o&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!(e&&e.length);if(!o&&(e.length<2||!n&&Object(Vs.isURL)(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then(e=>{this.suggestionsRequest===r&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak(Object(j.sprintf)(Object(j._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak(Object(j.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)}).catch(()=>{this.suggestionsRequest===r&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)}),this.suggestionsRequest=r}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case cc.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case cc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}return}const c=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case cc.UP:{e.stopPropagation(),e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case cc.DOWN:{e.stopPropagation(),e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case cc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(j.__)("Link selected.")));break;case cc.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let c=r;const l=e&&e.length;return o||l||(c=!1),!0===n&&(c=!1),{showSuggestions:c,suggestionsListboxId:"block-editor-url-input-suggestions-"+t,suggestionOptionIdPrefix:"block-editor-url-input-suggestion-"+t}}render(){return Object(i.createElement)(i.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=Object(j.__)("Paste URL or type to search"),__experimentalRenderControl:c,value:l=""}=this.props,{loading:s,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:b,suggestionOptionIdPrefix:m}=this.state,f={id:"url-input-control-"+o,label:e,className:a()("block-editor-url-input",t,{"is-full-width":n})},g={value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(j.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":b,"aria-activedescendant":null!==d?`${m}-${d}`:void 0,ref:this.inputRef};return c?c(f,g,s):Object(i.createElement)(p.BaseControl,f,Object(i.createElement)("input",g),s&&Object(i.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:c,selectedSuggestion:s,suggestionsListboxId:d,suggestionOptionIdPrefix:b,loading:m}=this.state,f={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${b}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===s});return Object(u.isFunction)(t)&&r&&c.length?t({suggestions:c,selectedSuggestion:s,suggestionsListProps:f,buildSuggestionItemProps:g,isLoading:m,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!Object(u.isFunction)(t)&&r&&c.length?Object(i.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(i.createElement)("div",Object(l.a)({},f,{className:a()("block-editor-url-input__suggestions",e+"__suggestions")}),c.map((e,t)=>Object(i.createElement)(p.Button,Object(l.a)({},g(0,t),{key:e.id,className:a()("block-editor-url-input__suggestion",{"is-selected":t===s}),onClick:()=>this.handleOnClick(e)}),e.title)))):null}}var kb=Object(d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,Object(f.withSelect)((e,t)=>{if(Object(u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Rn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}}))(vb);var _b=({searchTerm:e,onClick:t,itemProps:n,isSelected:o,buttonText:r})=>{if(!e)return null;let c;return c=r?Object(u.isFunction)(r)?r(e):r:Object(i.createInterpolateElement)(Object(j.sprintf)(Object(j.__)("Create: <mark>%s</mark>"),e),{mark:Object(i.createElement)("mark",null)}),Object(i.createElement)(p.Button,Object(l.a)({},n,{className:a()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:t}),Object(i.createElement)($c,{className:"block-editor-link-control__search-item-icon",icon:cs}),Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-title"},c)))};var yb=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(i.createElement)(Un.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"}));var Eb=({itemProps:e,suggestion:t,isSelected:n=!1,onClick:o,isURL:r=!1,searchTerm:c="",shouldShowType:s=!1})=>Object(i.createElement)(p.Button,Object(l.a)({},e,{onClick:o,className:a()("block-editor-link-control__search-item",{"is-selected":n,"is-url":r,"is-entity":!r})}),r&&Object(i.createElement)($c,{className:"block-editor-link-control__search-item-icon",icon:yb}),Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(i.createElement)(p.TextHighlight,{text:t.title,highlight:c})),Object(i.createElement)("span",{"aria-hidden":!r,className:"block-editor-link-control__search-item-info"},!r&&(Object(Vs.filterURLForDisplay)(Object(Vs.safeDecodeURI)(t.url))||""),r&&Object(j.__)("Press ENTER to add this link"))),s&&t.type&&Object(i.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===t.type?"tag":t.type));function Cb({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:c,suggestions:s,selectedSuggestion:u,isLoading:d,isInitialSuggestions:b,createSuggestionButtonText:m,suggestionsQuery:f}){const g=a()("block-editor-link-control__search-results",{"is-loading":d}),h=["url","mailto","tel","internal"],O=1===s.length&&h.includes(s[0].type.toLowerCase()),v=t&&!O&&!b,k=!(null!=f&&f.type),_="block-editor-link-control-search-results-label-"+e,y=b?Object(j.__)("Recently updated"):Object(j.sprintf)(Object(j.__)('Search results for "%s"'),n),E=Object(i.createElement)(b?i.Fragment:p.VisuallyHidden,{},Object(i.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},y));return Object(i.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(i.createElement)("div",Object(l.a)({},r,{className:g,"aria-labelledby":_}),s.map((e,t)=>v&&"__CREATE__"===e.type?Object(i.createElement)(_b,{searchTerm:n,buttonText:m,onClick:()=>o(e),key:e.type,itemProps:c(e,t),isSelected:t===u}):"__CREATE__"===e.type?null:Object(i.createElement)(Eb,{key:`${e.id}-${e.type}`,itemProps:c(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===u,isURL:h.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:k}))))}function Sb(e){const t=Object(u.startsWith)(e,"#");return Object(Vs.isURL)(e)||e&&e.includes("www.")||t}const wb=()=>Promise.resolve([]),Bb=e=>{let t="URL";const n=Object(Vs.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Vs.prependHTTP)(e):e,type:t}])};function Ib(e,t,n,o){const{fetchSearchSuggestions:r}=Object(f.useSelect)(e=>{const{getSettings:t}=e(Rn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}},[]),c=t?Bb:wb;return Object(i.useCallback)((t,{isInitialSuggestions:l})=>Sb(t)?c(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,c)=>{const{isInitialSuggestions:l}=t;let i=await Promise.all([n(e,t),o(e)]);return i=!e.includes(" ")&&c&&!l?i[0].concat(i[1]):i[0],l||Sb(e)||!r?i:i.concat({title:e,url:e,type:"__CREATE__"})})(t,{...e,isInitialSuggestions:l},r,c,n,o),[c,r,n])}const xb=Promise.resolve([]),Tb=Object(i.forwardRef)(({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:c=!1,onCreateSuggestion:l=u.noop,onChange:s=u.noop,onSelect:a=u.noop,showSuggestions:b=!0,renderSuggestions:m=(e=>Object(i.createElement)(Cb,e)),fetchSuggestions:p=null,allowDirectEntry:f=!0,showInitialSuggestions:g=!1,suggestionsQuery:h={},withURLSuggestion:O=!0,createSuggestionButtonText:v},k)=>{const _=Ib(h,f,c,O),y=b?p||_:xb,E=Object(d.useInstanceId)(Tb),[C,S]=Object(i.useState)(),w=async e=>{let t=e;if("__CREATE__"!==e.type)(f||t&&Object.keys(t).length>=1)&&a({...Object(u.omit)(n,"id","url"),...t},t);else try{var o;t=await l(e.title),null!==(o=t)&&void 0!==o&&o.url&&a(t)}catch(e){}};return Object(i.createElement)("form",{onSubmit:t=>{t.preventDefault(),w(C||{url:e})}},Object(i.createElement)(kb,{className:o,value:e,onChange:(e,t)=>{s(e),S(t)},placeholder:null!=r?r:Object(j.__)("Search or type url"),__experimentalRenderSuggestions:b?t=>m({...t,instanceId:E,withCreateSuggestion:c,currentInputValue:e,createSuggestionButtonText:v,suggestionsQuery:h,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),w(e)}}):null,__experimentalFetchLinkSuggestions:y,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:g,ref:k}),t)});var Nb=Tb;const{Slot:Pb,Fill:Lb}=Object(p.createSlotFill)("BlockEditorLinkControlViewer");function Ab({value:e,onEditClick:t}){const n=e&&Object(Vs.filterURLForDisplay)(Object(Vs.safeDecodeURI)(e.url),16)||"";return Object(i.createElement)("div",{"aria-label":Object(j.__)("Currently selected"),"aria-selected":"true",className:a()("block-editor-link-control__search-item",{"is-current":!0})},Object(i.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(i.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},e&&e.title||n),e&&e.title&&Object(i.createElement)("span",{className:"block-editor-link-control__search-item-info"},n)),Object(i.createElement)(p.Button,{isSecondary:!0,onClick:()=>t(),className:"block-editor-link-control__search-item-action"},Object(j.__)("Edit")),Object(i.createElement)(Pb,{fillProps:e}))}const Rb=e=>{let t=!1;return{promise:new Promise((n,o)=>{e.then(e=>t?o({isCanceled:!0}):n(e),e=>o(t?{isCanceled:!0}:e))}),cancel(){t=!0}}};function Mb({searchInputPlaceholder:e,value:t,settings:n,onChange:o=u.noop,noDirectEntry:r=!1,showSuggestions:c=!0,showInitialSuggestions:l,forceIsEditingLink:s,createSuggestion:a,withCreateSuggestion:d,inputValue:b="",suggestionsQuery:m={},noURLSuggestion:f=!1,createSuggestionButtonText:g}){void 0===d&&a&&(d=!0);const h=Object(i.useRef)(!0),O=Object(i.useRef)(),[v,k]=Object(i.useState)(t&&t.url||""),_=b||v,[y,E]=Object(i.useState)(void 0!==s?s:!t||!t.url),C=Object(i.useRef)(!1);Object(i.useEffect)(()=>{void 0!==s&&s!==y&&E(s)},[s]),Object(i.useEffect)(()=>{if(h.current)return void(h.current=!1);if(!O.current.contains(O.current.ownerDocument.activeElement)){(ui.focus.focusable.find(O.current)[0]||O.current).focus()}C.current=!1},[y]);const{createPage:S,isCreatingPage:w,errorMessage:B}=function(e){const t=Object(i.useRef)(),[n,o]=Object(i.useState)(!1),[r,c]=Object(i.useState)(null);return Object(i.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:async function(n){o(!0),c(null);try{return t.current=Rb(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw c(e.message||Object(j.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(a);return Object(i.createElement)("div",{tabIndex:-1,ref:O,className:"block-editor-link-control"},w&&Object(i.createElement)("div",{className:"block-editor-link-control__loading"},Object(i.createElement)(p.Spinner,null)," ",Object(j.__)("Creating"),"…"),(y||!t)&&!w&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(i.createElement)(Nb,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:_,withCreateSuggestion:d,onCreateSuggestion:S,onChange:k,onSelect:e=>{var t;o(e),C.current=!(null===(t=O.current)||void 0===t||!t.contains(O.current.ownerDocument.activeElement)),E(!1)},showInitialSuggestions:l,allowDirectEntry:!r,showSuggestions:c,suggestionsQuery:m,withURLSuggestion:!f,createSuggestionButtonText:g},Object(i.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(i.createElement)(p.Button,{type:"submit",label:Object(j.__)("Submit"),icon:hb,className:"block-editor-link-control__search-submit"})))),B&&Object(i.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},B)),t&&!y&&!w&&Object(i.createElement)(Ab,{value:t,onEditClick:()=>E(!0)}),Object(i.createElement)(jb,{value:t,settings:n,onChange:o}))}Mb.ViewerFill=Lb;var Db=Mb;var Fb=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));var Vb=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));var zb=Object(p.withFilters)("editor.MediaUpload")(()=>null);var Hb=function({fallback:e=null,children:t}){return Object(f.useSelect)(e=>{const{getSettings:t}=e(Rn);return!!t().mediaUpload},[])?t:e};var Gb=Object(d.compose)([Object(f.withDispatch)(e=>{const{createNotice:t,removeNotice:n}=e(Ps.store);return{createNotice:t,removeNotice:n}}),Object(p.withFilters)("editor.MediaReplaceFlow")])(({mediaURL:e,mediaId:t,allowedTypes:n,accept:o,onSelect:r,onSelectURL:c,onFilesUpload:l=u.noop,name:s=Object(j.__)("Replace"),createNotice:a,removeNotice:d})=>{const[b,m]=Object(i.useState)(e),g=Object(f.useSelect)(e=>e(Rn).getSettings().mediaUpload,[]),h=Object(i.createRef)(),O=Object(u.uniqueId)("block-editor/media-replace-flow/error-notice/"),v=e=>{const t=document.createElement("div");t.innerHTML=Object(i.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout(()=>{a("error",n,{speak:!0,id:O,isDismissible:!0})},1e3)},k=e=>{r(e),m(e.url),Object(St.speak)(Object(j.__)("The media file has been replaced")),d(O)},_=e=>{e.keyCode===cc.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(i.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>Object(i.createElement)(p.ToolbarButton,{ref:h,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:_},s),renderContent:({onClose:e})=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(i.createElement)(zb,{value:t,onSelect:e=>k(e),allowedTypes:n,render:({open:e})=>Object(i.createElement)(p.MenuItem,{icon:Fb,onClick:e},Object(j.__)("Open Media Library"))}),Object(i.createElement)(Hb,null,Object(i.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;l(t);g({allowedTypes:n,filesList:t,onFileChange:([e])=>{k(e)},onError:v})})(e)},accept:o,render:({openFileDialog:e})=>Object(i.createElement)(p.MenuItem,{icon:Vb,onClick:()=>{e()}},Object(j.__)("Upload"))}))),c&&Object(i.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:e=>{[cc.TAB,cc.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:e=>{[cc.TAB,cc.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(i.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(j.__)("Current media URL:")),Object(i.createElement)(Db,{value:{url:b},settings:[],showSuggestions:!1,onChange:({url:e})=>{m(e),c(e),h.current.focus()}})))})});var Ub=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function Wb({url:e,urlLabel:t,className:n}){const o=a()(n,"block-editor-url-popover__link-viewer-url");return e?Object(i.createElement)(p.ExternalLink,{className:o,href:e},t||Object(Vs.filterURLForDisplay)(Object(Vs.safeDecodeURI)(e))):Object(i.createElement)("span",{className:o})}function Kb({additionalControls:e,children:t,renderSettings:n,position:o="bottom center",focusOnMount:r="firstElement",...c}){const[s,a]=Object(i.useState)(!1),u=!!n&&s;return Object(i.createElement)(p.Popover,Object(l.a)({className:"block-editor-url-popover",focusOnMount:r,position:o},c),Object(i.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(i.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&Object(i.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:ji,label:Object(j.__)("Link settings"),onClick:()=>{a(!s)},"aria-expanded":s})),u&&Object(i.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!u&&Object(i.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}Kb.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return Object(i.createElement)("form",Object(l.a)({className:a()("block-editor-url-popover__link-editor",t)},r),Object(i.createElement)(kb,{value:o,onChange:n,autocompleteRef:e}),Object(i.createElement)(p.Button,{icon:hb,label:Object(j.__)("Apply"),type:"submit"}))},Kb.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...c}){return Object(i.createElement)("div",Object(l.a)({className:a()("block-editor-url-popover__link-viewer",e)},c),Object(i.createElement)(Wb,{url:o,urlLabel:r,className:t}),n&&Object(i.createElement)(p.Button,{icon:Ub,label:Object(j.__)("Edit"),onClick:n}))};var $b=Kb;const qb=({src:e,onChange:t,onSubmit:n,onClose:o})=>Object(i.createElement)($b,{onClose:o},Object(i.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},Object(i.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(j.__)("URL"),placeholder:Object(j.__)("Paste or type URL"),onChange:t,value:e}),Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:hb,label:Object(j.__)("Apply"),type:"submit"})));var Yb=Object(p.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:c,notices:l,isAppender:s,accept:d,addToGallery:b,multiple:m=!1,dropZoneUIOnly:g,disableDropZone:h,disableMediaButtons:O,onError:v,onSelect:k,onCancel:_,onSelectURL:y,onDoubleClick:E,onFilesPreUpload:C=u.noop,onHTMLDrop:S=u.noop,children:w}){const B=Object(f.useSelect)(e=>{const{getSettings:t}=e(Rn);return t().mediaUpload},[]),[I,x]=Object(i.useState)(""),[T,N]=Object(i.useState)(!1);Object(i.useEffect)(()=>{var t;x(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")},[null==e?void 0:e.src]);const P=e=>{x(e.target.value)},L=()=>{N(!0)},A=()=>{N(!1)},R=e=>{e.preventDefault(),I&&y&&(y(I),A())},M=n=>{let o;if(C(n),m)if(b){let t=[];o=n=>{const o=(null!=e?e:[]).filter(e=>e.id?!t.some(({id:t})=>Number(t)===Number(e.id)):!t.some(({urlSlug:t})=>e.url.includes(t)));k(o.concat(n)),t=n.map(e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}})}}else o=k;else o=([e])=>k(e);B({allowedTypes:t,filesList:n,onFileChange:o,onError:v})},D=e=>{M(e.target.files)},F=(e,u)=>{let{instructions:d,title:b}=r;if(B||y||(d=Object(j.__)("To edit this block, you need permission to upload media.")),void 0===d||void 0===b){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,c=o&&"image"===n,l=o&&"video"===n;void 0===d&&B&&(d=Object(j.__)("Upload a media file or pick one from your media library."),r?d=Object(j.__)("Upload an audio file, pick one from your media library, or add one with a URL."):c?d=Object(j.__)("Upload an image file, pick one from your media library, or add one with a URL."):l&&(d=Object(j.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===b&&(b=Object(j.__)("Media"),r?b=Object(j.__)("Audio"):c?b=Object(j.__)("Image"):l&&(b=Object(j.__)("Video")))}const m=a()("block-editor-media-placeholder",n,{"is-appender":s});return Object(i.createElement)(p.Placeholder,{icon:o,label:b,instructions:d,className:m,notices:l,onClick:u,onDoubleClick:E,preview:c},e,w)},V=()=>h?null:Object(i.createElement)(p.DropZone,{onFilesDrop:M,onHTMLDrop:S}),z=()=>_&&Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(j.__)("Cancel"),isLink:!0,onClick:_},Object(j.__)("Cancel")),H=()=>y&&Object(i.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(i.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:L,isPressed:T,isTertiary:!0},Object(j.__)("Insert from URL")),T&&Object(i.createElement)(qb,{src:I,onChange:P,onSubmit:R,onClose:A}));return g||O?(g&&Bt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),Object(i.createElement)(Hb,null,V())):Object(i.createElement)(Hb,{fallback:F(H())},(()=>{const n=Object(i.createElement)(zb,{addToGallery:b,gallery:m&&!(!t||0===t.length)&&t.every(e=>"image"===e||e.startsWith("image/")),multiple:m,onSelect:k,allowedTypes:t,value:Array.isArray(e)?e.map(({id:e})=>e):e.id,render:({open:e})=>Object(i.createElement)(p.Button,{isTertiary:!0,onClick:t=>{t.stopPropagation(),e()}},Object(j.__)("Media Library"))});if(B&&s)return Object(i.createElement)(i.Fragment,null,V(),Object(i.createElement)(p.FormFileUpload,{onChange:D,accept:d,multiple:m,render:({openFileDialog:e})=>{const t=Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.Button,{isPrimary:!0,className:a()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(j.__)("Upload")),n,H(),z());return F(t,e)}}));if(B){const e=Object(i.createElement)(i.Fragment,null,V(),Object(i.createElement)(p.FormFileUpload,{isPrimary:!0,className:a()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:D,accept:d,multiple:m},Object(j.__)("Upload")),n,H(),z());return F(e)}return F(n)})())}));const Xb=Object(i.forwardRef)((e,t)=>Object(i.createElement)(hd,Object(l.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0})));Xb.Content=({value:e="",tagName:t="div",...n})=>Object(i.createElement)(t,n,e);var Qb=Xb;var Zb=Object(i.forwardRef)(({__experimentalVersion:e,...t},n)=>{if(2===e)return Object(i.createElement)(Qb,Object(l.a)({ref:n},t));const{className:o,onChange:r,...c}=t;return Object(i.createElement)(Vi.a,Object(l.a)({ref:n,className:a()("block-editor-plain-text",o),onChange:e=>r(e.target.value)},c))});function Jb({property:e,viewport:t,desc:n}){const o=Object(d.useInstanceId)(Jb),r=n||Object(j.sprintf)(Object(j._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),e,t.label);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("span",{"aria-describedby":"rbc-desc-"+o},t.label),Object(i.createElement)(p.VisuallyHidden,{as:"span",id:"rbc-desc-"+o},r))}var em=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:c,renderResponsiveControls:l,isResponsive:s=!1,defaultLabel:u={id:"all",label:Object(j.__)("All")},viewports:d=[{id:"small",label:Object(j.__)("Small screens")},{id:"medium",label:Object(j.__)("Medium screens")},{id:"large",label:Object(j.__)("Large screens")}]}=e;if(!t||!n||!c)return null;const b=o||Object(j.sprintf)(Object(j.__)("Use the same %s on all screensizes."),n),m=Object(j.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),f=c(Object(i.createElement)(Jb,{property:n,viewport:u}),u);return Object(i.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(i.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(i.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(i.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:b,checked:!s,onChange:r,help:m}),Object(i.createElement)("div",{className:a()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&f,s&&(l?l(d):d.map(e=>Object(i.createElement)(i.Fragment,{key:e.id},c(Object(i.createElement)(Jb,{property:n,viewport:e}),e)))))))};function tm({character:e,type:t,onUse:n}){return Object(d.useKeyboardShortcut)(cc.rawShortcut[t](e),()=>(n(),!1),{bindGlobal:!0}),null}function nm({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,c="RichText.ToolbarControls";return e&&(c+="."+e),t&&n&&(r=cc.displayShortcut[t](n)),Object(i.createElement)(p.Fill,{name:c},Object(i.createElement)(p.ToolbarButton,Object(l.a)({},o,{shortcut:r})))}class om extends i.Component{constructor(){super(...arguments),this.onInput=this.onInput.bind(this)}onInput(e){e.inputType===this.props.inputType&&this.props.onInput()}componentDidMount(){document.addEventListener("input",this.onInput,!0)}componentWillUnmount(){document.removeEventListener("input",this.onInput,!0)}render(){return null}}const rm=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(i.createElement)(p.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var cm=Object(i.forwardRef)((function(e,t){const n=Object(f.useSelect)(e=>e(Rn).isNavigationMode(),[]),{setNavigationMode:o}=Object(f.useDispatch)(Rn),r=e=>{o("edit"!==e)};return Object(i.createElement)(p.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>Object(i.createElement)(p.Button,Object(l.a)({},e,{ref:t,icon:n?rm:Ub,"aria-expanded":o,"aria-haspopup":"true",onClick:r,label:Object(j.__)("Tools")})),position:"bottom right",renderContent:()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.NavigableMenu,{role:"menu","aria-label":Object(j.__)("Tools")},Object(i.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:Object(i.createElement)(i.Fragment,null,Object(i.createElement)($c,{icon:Ub}),Object(j.__)("Edit"))},{value:"select",label:Object(i.createElement)(i.Fragment,null,rm,Object(j.__)("Select"))}]})),Object(i.createElement)("div",{className:"block-editor-tool-selector__help"},Object(j.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function lm({units:e,...t}){const n=Object(p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"],units:e});return Object(i.createElement)(p.__experimentalUnitControl,Object(l.a)({units:n},t))}var im=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));var sm=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class am extends i.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?Object(j.__)("Edit link"):Object(j.__)("Insert link");return Object(i.createElement)("div",{className:"block-editor-url-input__button"},Object(i.createElement)(p.Button,{icon:im,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&Object(i.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(i.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(i.createElement)(p.Button,{className:"block-editor-url-input__back",icon:sm,label:Object(j.__)("Close"),onClick:this.toggle}),Object(i.createElement)(kb,{value:e||"",onChange:t}),Object(i.createElement)(p.Button,{icon:hb,label:Object(j.__)("Submit"),type:"submit"}))))}}var um=am;var dm=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{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"}));const bm=["noreferrer","noopener"],mm=Object(i.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(i.createElement)(p.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(i.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),pm=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:c,linkTarget:l,linkClass:s,rel:a})=>{const[d,b]=Object(i.useState)(!1),m=Object(i.useCallback)(()=>{b(!0)}),[f,g]=Object(i.useState)(!1),[h,O]=Object(i.useState)(null),v=Object(i.useRef)(null),k=Object(i.useCallback)(()=>{"media"!==e&&"attachment"!==e||O(""),g(!0)}),_=Object(i.useCallback)(()=>{g(!1)}),y=Object(i.useCallback)(()=>{O(null),_(),b(!1)}),E=e=>{let t=e;return void 0===e||Object(u.isEmpty)(t)||Object(u.isEmpty)(t)||(Object(u.each)(bm,e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")}),t!==e&&(t=t.trim()),Object(u.isEmpty)(t)&&(t=void 0)),t},C=Object(i.useCallback)(()=>e=>{const t=v.current;t&&t.contains(e.target)||(b(!1),O(null),_())}),S=Object(i.useCallback)(()=>e=>{if(h){var n;const e=(null===(n=B().find(e=>e.url===h))||void 0===n?void 0:n.linkDestination)||"custom";t({href:h,linkDestination:e})}_(),O(null),e.preventDefault()}),w=Object(i.useCallback)(()=>{t({linkDestination:"none",href:""})}),B=()=>{const e=[{linkDestination:"media",title:Object(j.__)("Media File"),url:"image"===o?r:void 0,icon:mm}];return"image"===o&&c&&e.push({linkDestination:"attachment",title:Object(j.__)("Attachment Page"),url:"image"===o?c:void 0,icon:Object(i.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(i.createElement)(p.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},I=Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.ToggleControl,{label:Object(j.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;return n=t||a?E(a):void 0,{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===l}),Object(i.createElement)(p.TextControl,{label:Object(j.__)("Link Rel"),value:E(a)||"",onChange:e=>{t({rel:e})}}),Object(i.createElement)(p.TextControl,{label:Object(j.__)("Link CSS Class"),value:s||"",onChange:e=>{t({linkClass:e})}})),x=null!==h?h:n,T=(Object(u.find)(B(),["linkDestination",e])||{}).title;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.ToolbarButton,{icon:im,className:"components-toolbar__control",label:n?Object(j.__)("Edit link"):Object(j.__)("Insert link"),"aria-expanded":d,onClick:m}),d&&Object(i.createElement)($b,{onFocusOutside:C(),onClose:y,renderSettings:()=>I,additionalControls:!x&&Object(i.createElement)(p.NavigableMenu,null,Object(u.map)(B(),e=>Object(i.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{O(null),(e=>{const n=B();let o;o=e?(Object(u.find)(n,t=>t.url===e)||{linkDestination:"custom"}).linkDestination:"none",t({linkDestination:o,href:e})})(e.url),_()}},e.title)))},(!n||f)&&Object(i.createElement)($b.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:x,onChangeInputValue:O,onSubmit:S(),autocompleteRef:v}),n&&!f&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)($b.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:k,urlLabel:T}),Object(i.createElement)(p.Button,{icon:dm,label:Object(j.__)("Remove link"),onClick:w}))))};var fm=Object(i.createElement)(Un.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(Un.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function gm({children:e,className:t,isEnabled:n=!0,deviceType:o,setDeviceType:r}){if(Object(d.useViewportMatch)("small","<"))return null;const c={className:a()(t,"block-editor-post-preview__dropdown-content"),position:"bottom left"},l={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!n,children:Object(j.__)("Preview")};return Object(i.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:c,toggleProps:l,icon:null},()=>Object(i.createElement)(i.Fragment,null,Object(i.createElement)(p.MenuGroup,null,Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Desktop"),icon:"Desktop"===o&&fm},Object(j.__)("Desktop")),Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Tablet"),icon:"Tablet"===o&&fm},Object(j.__)("Tablet")),Object(i.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Mobile"),icon:"Mobile"===o&&fm},Object(j.__)("Mobile"))),e))}var hm=n("./node_modules/css-mediaquery/index.js");const Om=/\((min|max)-width:[^\(]*?\)/g;function jm(e){return!!e.media&&!!e.media.mediaText.match(Om)}function vm(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function km(e,t){return e.replace(Om,e=>Object(hm.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)")}function _m(e,t){Object(i.useEffect)(()=>{if(!t)return;const n="undefined"==typeof window?[]:Object(u.filter)(null!==(o=null===(r=window)||void 0===r||null===(c=r.document)||void 0===c?void 0:c.styleSheets)&&void 0!==o?o:[],e=>!!e.href&&Object(Vs.getProtocol)(e.href)===window.location.protocol&&Object(Vs.getAuthority)(e.href)===window.location.host);var o,r,c;const l=[];return n.forEach((n,o)=>{let r=!1;for(let c=0;c<n.cssRules.length;++c){const i=n.cssRules[c];if(i.type!==window.CSSRule.STYLE_RULE&&i.type!==window.CSSRule.MEDIA_RULE)continue;if(!r&&i.cssText.match(new RegExp("#start-"+e))&&(r=!0),r&&i.cssText.match(new RegExp("#end-"+e))&&(r=!1),!r||!jm(i))continue;const s=i.cssText;l[o]||(l[o]=[]),l[o][c]=s,vm(n,km(s,t),c)}}),()=>{l.forEach((e,t)=>{if(e)for(let o=0;o<e.length;++o){const r=e[o];r&&vm(n[t],r,o)}})}},[t])}function ym(e,t){const[n,o]=Object(i.useState)(window.innerWidth);Object(i.useEffect)(()=>{if("Desktop"===e)return;const t=()=>o(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]);const r=e=>{let t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<n?t:n};return _m("resizable-editor-section",t?null:r(e)),(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:r(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var Em=Object(f.withSelect)(e=>({selectedBlockClientId:e(Rn).getBlockSelectionStart()}))(({selectedBlockClientId:e})=>{const t=kr(e);return e?Object(i.createElement)(p.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},Object(j.__)("Skip to the selected block")):null}),Cm=n("@wordpress/wordcount");var Sm=Object(f.withSelect)(e=>{const{getMultiSelectedBlocks:t}=e(Rn);return{blocks:t()}})((function({blocks:e}){const t=Object(Cm.count)(Object(m.serialize)(e),"words");return Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(i.createElement)(Vl,{icon:Ta,showColors:!0}),Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(j.sprintf)(Object(j._n)("%d block","%d blocks",e.length),e.length)),Object(i.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(j.sprintf)(Object(j._n)("%d word","%d words",t),t))))}));function wm({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=Object(f.useSelect)(t=>{var n,o;const r=t(Rn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:t(m.store).getBlockStyles(e)}},[e]),r=Object(i.useMemo)(()=>[{label:Object(j.__)("Not set"),value:""},...o.map(({label:e,name:t})=>({label:e,value:t}))],[o]),c=Object(i.useCallback)(t=>{n(e,t)},[e,n]);return n&&Object(i.createElement)(p.SelectControl,{options:r,value:t||"",label:Object(j.__)("Default Style"),onChange:c})}const Bm=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:o})=>{const r=ql(e);return Object(i.createElement)("div",{className:"block-editor-block-inspector"},Object(i.createElement)(ds,r),Object(i.createElement)(Pd,{blockClientId:e}),n&&Object(i.createElement)("div",null,Object(i.createElement)(p.PanelBody,{title:Object(j.__)("Styles")},Object(i.createElement)(Ra,{clientId:e}),Object(m.hasBlockSupport)(t,"defaultStylePicker",!0)&&Object(i.createElement)(wm,{blockName:t}))),Object(i.createElement)(_o.Slot,{bubblesVirtually:o}),Object(i.createElement)("div",null,Object(i.createElement)(Im,{slotName:Oo.slotName,bubblesVirtually:o})),Object(i.createElement)(Em,{key:"back"}))},Im=({slotName:e,bubblesVirtually:t})=>{const n=Object(p.__experimentalUseSlot)(e);return Boolean(n.fills&&n.fills.length)?Object(i.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(j.__)("Advanced"),initialOpen:!1},Object(i.createElement)(Oo.Slot,{bubblesVirtually:t})):null};var xm=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:o,selectedBlockName:r,selectedBlockClientId:c,blockType:l}=Object(f.useSelect)(e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Rn),{getBlockStyles:r}=e(m.store),c=t(),l=c&&o(c),i=l&&Object(m.getBlockType)(l),s=l&&r(l);return{count:n(),selectedBlockClientId:c,selectedBlockName:l,blockType:i,hasBlockStyles:s&&s.length>0}},[]);if(n>1)return Object(i.createElement)("div",{className:"block-editor-block-inspector"},Object(i.createElement)(Sm,null),Object(i.createElement)(_o.Slot,{bubblesVirtually:t}));const s=r===Object(m.getUnregisteredTypeHandlerName)();return l&&c&&!s?Object(i.createElement)(Bm,{clientId:c,blockName:l.name,hasBlockStyles:o,bubblesVirtually:t}):e?Object(i.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(j.__)("No block selected.")):null};function Tm({children:e,__unstableContentRef:t}){const n=Object(d.useViewportMatch)("medium"),o=Object(f.useSelect)(e=>e(Rn).getSettings().hasFixedToolbar,[]);return Object(i.createElement)(fa,{__unstableContentRef:t},(o||!n)&&Object(i.createElement)(mu,{isFixed:!0}),Object(i.createElement)(hu,{__unstableContentRef:t}),Object(i.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:ba(t)}),e)}var Nm=n("./node_modules/traverse/index.js"),Pm=n.n(Nm);const Lm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;var Am=function(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function c(){const e={line:n,column:o};return function(t){return t.position=new l(e),m(),t}}function l(e){this.start=e,this.end={line:n,column:o},this.source=t.source}l.prototype.content=e;const i=[];function s(r){const c=new Error(t.source+":"+n+":"+o+": "+r);if(c.reason=r,c.filename=t.source,c.line=n,c.column=o,c.source=e,!t.silent)throw c;i.push(c)}function a(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){let t;const n=[];for(m(),p(n);e.length&&"}"!==e.charAt(0)&&(t=E()||C());)!1!==t&&(n.push(t),p(n));return n}function b(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){b(/^\s*/)}function p(e){let t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){const t=c();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const l=e.slice(2,n-2);return o+=2,r(l),e=e.slice(n),o+=2,t({type:"comment",comment:l})}function g(){const e=b(/^([^{]+)/);if(e)return Rm(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function h(){const e=c();let t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Rm(t[0]),!b(/^:\s*/))return s("property missing ':'");const n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Lm,""),value:n?Rm(n[0]).replace(Lm,""):""});return b(/^[;\s]*/),o}function O(){const e=[];if(!a())return s("missing '{'");let t;for(p(e);t=h();)!1!==t&&(e.push(t),p(e));return u()?e:s("missing '}'")}function j(){let e;const t=[],n=c();for(;e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}const v=y("import"),k=y("charset"),_=y("namespace");function y(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=c(),o=b(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function E(){if("@"===e[0])return function(){const e=c();let t=b(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=b(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const o=t[1];if(!a())return s("@keyframes missing '{'");let r,l=p();for(;r=j();)l.push(r),l=l.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=c(),t=b(/^@media *([^{]+)/);if(!t)return;const n=Rm(t[1]);if(!a())return s("@media missing '{'");const o=p().concat(d());return u()?e({type:"media",media:n,rules:o}):s("@media missing '}'")}()||function(){const e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Rm(t[1]),media:Rm(t[2])})}()||function(){const e=c(),t=b(/^@supports *([^{]+)/);if(!t)return;const n=Rm(t[1]);if(!a())return s("@supports missing '{'");const o=p().concat(d());return u()?e({type:"supports",supports:n,rules:o}):s("@supports missing '}'")}()||v()||k()||_()||function(){const e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Rm(t[1]),o=Rm(t[2]);if(!a())return s("@document missing '{'");const r=p().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):s("@document missing '}'")}()||function(){const e=c();if(!b(/^@page */))return;const t=g()||[];if(!a())return s("@page missing '{'");let n,o=p();for(;n=h();)o.push(n),o=o.concat(p());return u()?e({type:"page",selectors:t,declarations:o}):s("@page missing '}'")}()||function(){const e=c();if(!b(/^@host\s*/))return;if(!a())return s("@host missing '{'");const t=p().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=c();if(!b(/^@font-face\s*/))return;if(!a())return s("@font-face missing '{'");let t,n=p();for(;t=h();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function C(){const e=c(),t=g();return t?(p(),e({type:"rule",selectors:t,declarations:O()})):s("selector missing")}return function e(t,n){const o=t&&"string"==typeof t.type,r=o?t:n;for(const n in t){const o=t[n];Array.isArray(o)?o.forEach((function(t){e(t,r)})):o&&"object"==typeof o&&e(o,r)}o&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:i}}}())};function Rm(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Mm=n("./node_modules/inherits/inherits_browser.js"),Dm=n.n(Mm),Fm=Vm;function Vm(e){this.options=e||{}}Vm.prototype.emit=function(e){return e},Vm.prototype.visit=function(e){return this[e.type](e)},Vm.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var zm=Hm;function Hm(e){Fm.call(this,e)}Dm()(Hm,Fm),Hm.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Hm.prototype.comment=function(e){return this.emit("",e.position)},Hm.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Hm.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Hm.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Hm.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Hm.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Hm.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Hm.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Hm.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Hm.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Hm.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Hm.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Hm.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Hm.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Hm.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Gm=Um;function Um(e){e=e||{},Fm.call(this,e),this.indentation=e.indent}Dm()(Um,Fm),Um.prototype.compile=function(e){return this.stylesheet(e)},Um.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Um.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Um.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Um.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Um.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Um.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Um.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Um.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Um.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Um.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Um.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Um.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Um.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Um.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Um.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Um.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Um.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Wm=function(e,t){try{const r=Am(e),c=Pm.a.map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)}));return n=c,((o=o||{}).compress?new zm(o):new Gm(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function Km(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function $m(e,t){return new URL(e,t).toString()}var qm=e=>t=>{if("declaration"===t.type){const c=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Km(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+$m(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=c,o.forEach(e=>{n=n.replace(e.source,e.newUrl)}),n)}}var n,o,r;return t};const Ym=/^(body|html|:root).*$/;var Xm=(e,t=[])=>n=>{const o=n=>t.includes(n.trim())?n:n.match(Ym)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(o)}:n};var Qm=(e,t="")=>Object(u.map)(e,({css:e,baseURL:n,__experimentalNoWrapper:o=!1})=>{const r=[];return t&&!o&&r.push(Xm(t)),n&&r.push(qm(n)),r.length?Wm(e,Object(d.compose)(r)):e});function Zm(e){return Object(i.useCallback)(e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(r,null).getPropertyValue("background-color");To()(c).getLuminance()>.5?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")},[e])}function Jm({styles:e}){const t=Object(i.useMemo)(()=>Qm(e,".editor-styles-wrapper"),[e]);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",{ref:Zm(e)}),t.map((e,t)=>Object(i.createElement)("style",{key:t},e)))}var ep=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:c,onSelect:l=u.noop,shouldFocusBlock:s=!1}){const a=Object(f.useSelect)(n=>{const{getBlockRootClientId:o}=n(Rn);return e||o(t)||void 0},[t,e]);return Object(i.createElement)(Js,{onSelect:l,rootClientId:a,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:c,shouldFocusBlock:s})};function tp(){const{clientIds:e,rootClientId:t}=Object(f.useSelect)(e=>{const{getSelectedBlockClientIds:t,getBlockRootClientId:n}=e(Rn),o=t(),[r]=o;return{clientIds:o,rootClientId:n(r)}},[]),{duplicateBlocks:n,removeBlocks:o,insertAfterBlock:r,insertBeforeBlock:c,clearSelectedBlock:l,moveBlocksUp:s,moveBlocksDown:a}=Object(f.useDispatch)(Rn);return Object(ja.useShortcut)("core/block-editor/move-up",Object(i.useCallback)(n=>{n.preventDefault(),s(e,t)},[e,s]),{bindGlobal:!0,isDisabled:0===e.length}),Object(ja.useShortcut)("core/block-editor/move-down",Object(i.useCallback)(n=>{n.preventDefault(),a(e,t)},[e,a]),{bindGlobal:!0,isDisabled:0===e.length}),Object(ja.useShortcut)("core/block-editor/duplicate",Object(i.useCallback)(t=>{t.preventDefault(),n(e)},[e,n]),{bindGlobal:!0,isDisabled:0===e.length}),Object(ja.useShortcut)("core/block-editor/remove",Object(i.useCallback)(t=>{t.preventDefault(),o(e)},[e,o]),{bindGlobal:!0,isDisabled:0===e.length}),Object(ja.useShortcut)("core/block-editor/insert-after",Object(i.useCallback)(t=>{t.preventDefault(),r(Object(u.last)(e))},[e,r]),{bindGlobal:!0,isDisabled:0===e.length}),Object(ja.useShortcut)("core/block-editor/insert-before",Object(i.useCallback)(t=>{t.preventDefault(),c(Object(u.first)(e))},[e,c]),{bindGlobal:!0,isDisabled:0===e.length}),Object(ja.useShortcut)("core/block-editor/delete-multi-selection",Object(i.useCallback)(t=>{t.preventDefault(),o(e)},[e,o]),{isDisabled:e.length<2}),Object(ja.useShortcut)("core/block-editor/unselect",Object(i.useCallback)(e=>{e.preventDefault(),l(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()},[e,l]),{isDisabled:e.length<2}),null}tp.Register=function(){const{registerShortcut:e}=Object(f.useDispatch)(ja.store);return Object(i.useEffect)(()=>{e({name:"core/block-editor/duplicate",category:"block",description:Object(j.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(j.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(j.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(j.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(j.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(j.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(j.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(j.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(j.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(j.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})},[e]),null};var np=tp;function op(){return Bt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const rp=new Set([cc.UP,cc.RIGHT,cc.DOWN,cc.LEFT,cc.ENTER,cc.BACKSPACE]);function cp(){const e=Object(f.useSelect)(e=>e(Rn).isTyping()),{stopTyping:t}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(n=>{if(!e)return;const{ownerDocument:o}=n;let r,c;function l(e){const{clientX:n,clientY:o}=e;r&&c&&(r!==n||c!==o)&&t(),r=n,c=o}return o.addEventListener("mousemove",l),()=>{o.removeEventListener("mousemove",l)}},[e,t])}function lp(){const e=Object(f.useSelect)(e=>e(Rn).isTyping()),{startTyping:t,stopTyping:n}=Object(f.useDispatch)(Rn),o=cp(),r=Object(d.useRefEffect)(o=>{const{ownerDocument:r}=o,{defaultView:c}=r;if(e){let e;function l(t){const{target:o}=t;e=c.setTimeout(()=>{Object(ui.isTextField)(o)||n()})}function i(e){const{keyCode:t}=e;t!==cc.ESCAPE&&t!==cc.TAB||n()}function s(){const e=c.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",l),o.addEventListener("keydown",i),r.addEventListener("selectionchange",s),()=>{c.clearTimeout(e),o.removeEventListener("focus",l),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",s)}}function a(e){const{type:n,target:r}=e;Object(ui.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&rp.has(t)}(e))&&t()}return o.addEventListener("keypress",a),o.addEventListener("keydown",a),()=>{o.removeEventListener("keypress",a),o.removeEventListener("keydown",a)}},[e,t,n]);return Object(d.useMergeRefs)([o,r])}var ip=function({children:e}){return Object(i.createElement)("div",{ref:lp()},e)};function sp(){return Bt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const ap=-1!==window.navigator.userAgent.indexOf("Trident"),up=new Set([cc.UP,cc.DOWN,cc.LEFT,cc.RIGHT]);function dp(){const e=Object(f.useSelect)(e=>e(Rn).hasSelectedBlock());return Object(d.useRefEffect)(t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,c,l;function i(){r||(r=o.requestAnimationFrame(()=>{b(),r=null}))}function s(e){c&&o.cancelAnimationFrame(c),c=o.requestAnimationFrame(()=>{a(e),c=null})}function a({keyCode:e}){if(!m())return;const r=Object(ui.computeCaretRect)(o);if(!r)return;if(!l)return void(l=r);if(up.has(e))return void(l=r);const c=r.top-l.top;if(0===c)return;const i=Object(ui.getScrollContainer)(t);if(!i)return;const s=i===n.body,a=s?o.scrollY:i.scrollTop,u=s?0:i.getBoundingClientRect().top,d=s?l.top/o.innerHeight:(l.top-u)/(o.innerHeight-u);if(0===a&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=r);const b=s?o.innerHeight:i.clientHeight;l.top+l.height>u+b||l.top<u?l=r:s?o.scrollBy(0,c):i.scrollTop+=c}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),b()}function b(){m()&&(l=Object(ui.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",i,!0),o.addEventListener("resize",i,!0),t.addEventListener("keydown",s),t.addEventListener("keyup",a),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",i,!0),o.removeEventListener("resize",i,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",a),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(c)}},[e])}var bp=ap?e=>e.children:function({children:e}){return Object(i.createElement)("div",{ref:dp(),className:"block-editor__typewriter"},e)};function mp(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function pp(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Rn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function fp(){const e=Object(i.useRef)(),{isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r}=Object(f.useSelect)(pp,[]),{selectBlock:c}=Object(f.useDispatch)(Rn),l=kr(r),s=kr(Object(u.first)(n)),a=kr(Object(u.last)(n));return Object(i.useEffect)(()=>{const{ownerDocument:c}=e.current,{defaultView:i}=c;if(!o||t){if(!r||t)return;const e=i.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=l.current,{startContainer:n,endContainer:o}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(o)||e.removeAllRanges()}return}const{length:u}=n;if(u<2)return;e.current.focus();const d=i.getSelection(),b=c.createRange(),m=mp(s.current,"start"),p=mp(a.current,"end");var f,g;f=e.current,g=!1,Array.from(f.querySelectorAll(".rich-text")).forEach(e=>{g?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}),b.setStartBefore(m),b.setEndAfter(p),d.removeAllRanges(),d.addRange(b)},[o,t,n,c,r]),e}const gp={position:"fixed"};function hp(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Op(e,t,n,o){let r,c=ui.focus.focusable.find(n);return t&&(c=Object(u.reverse)(c)),c=c.slice(c.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),Object(u.find)(c,(function(e){if(!ui.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function jp(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:c,getLastMultiSelectedBlockClientId:l,getSettings:i,hasMultiSelection:s}=Object(f.useSelect)(Rn),{multiSelect:a,selectBlock:u}=Object(f.useDispatch)(Rn);return Object(d.useRefEffect)(d=>{let b;function m(){b=null}function p(c){const l=e(),i=t(),s=n(),d=o(s||l),b=r(s||l),m=c?d:b;m&&(i===m?u(m):a(i||l,m))}function f(e){const t=c(),n=l(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:c,target:l}=t,a=c===cc.UP,u=c===cc.DOWN,m=c===cc.LEFT,g=c===cc.RIGHT,h=a||m,O=m||g,j=a||u,v=O||j,k=t.shiftKey,_=k||t.ctrlKey||t.altKey||t.metaKey,y=j?ui.isVerticalEdge:ui.isHorizontalEdge,{ownerDocument:E}=d,{defaultView:C}=E;if(s()){if(v){(k?p:f)(h),t.preventDefault()}return}if(j?b||(b=Object(ui.computeCaretRect)(C)):b=null,t.defaultPrevented)return;if(!v)return;if(!function(e,t,n){if((t===cc.UP||t===cc.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(l,c,_))return;const S=Object(ui.isRTL)(l)?!h:h,{keepCaretInsideBlock:w}=i(),B=e();if(k){const e=n(),c=o(e||B),i=r(e||B);(h&&c||!h&&i)&&function(e,t){const n=Op(e,t,d);return!(n&&(o=e,r=n,o.closest(".wp-block")===r.closest(".wp-block")));var o,r}(l,h)&&y(l,h)&&(p(h),t.preventDefault())}else if(j&&Object(ui.isVerticalEdge)(l,h)&&!w){const e=Op(l,h,d,!0);e&&(Object(ui.placeCaretAtVerticalEdge)(e,h,b),t.preventDefault())}else if(O&&C.getSelection().isCollapsed&&Object(ui.isHorizontalEdge)(l,S)&&!w){const e=Op(l,S,d);Object(ui.placeCaretAtHorizontalEdge)(e,h),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}},[])}function vp(){const e=Object(i.useRef)(),{getBlockOrder:t,getSelectedBlockClientIds:n,getBlockRootClientId:o}=Object(f.useSelect)(Rn),{multiSelect:r}=Object(f.useDispatch)(Rn),c=Object(i.useCallback)(e=>{const c=n();if(!c.length)return;if(1===c.length&&!Object(ui.isEntirelySelected)(e.target))return;const[l]=c,i=o(l);let s=t(i);c.length===s.length&&(s=t(o(i)));const a=Object(u.first)(s),d=Object(u.last)(s);a!==d&&(r(a,d),e.preventDefault())},[]);return Object(ja.useShortcut)("core/block-editor/select-all",c,{target:e}),e}function kp({children:e}){const[t,n,o]=function(){const e=Object(i.useRef)(),t=Object(i.useRef)(),n=Object(i.useRef)(),o=Object(i.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:c}=Object(f.useSelect)(Rn),{setNavigationMode:l}=Object(f.useDispatch)(Rn),s=Object(f.useSelect)(e=>e(Rn).isNavigationMode(),[])?void 0:"0",a=Object(i.useRef)();function u(t){if(a.current)a.current=null;else if(r())e.current.focus();else if(c())o.current.focus();else{l(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";ui.focus.tabbable[n](t.target).focus()}}const b=Object(i.createElement)("div",{ref:t,tabIndex:s,onFocus:u,style:gp}),m=Object(i.createElement)("div",{ref:n,tabIndex:s,onFocus:u,style:gp}),p=Object(d.useRefEffect)(e=>{function i(e){if(e.keyCode===cc.ESCAPE&&!r())return void l(!0);if(e.keyCode!==cc.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!c())return;if(hp(e.target)&&hp(ui.focus.tabbable[i](e.target)))return;const s=o?t:n;a.current=!0,s.current.focus()}function s(e){o.current=e.target}return e.addEventListener("keydown",i),e.addEventListener("focusout",s),()=>{e.removeEventListener("keydown",i),e.removeEventListener("focusout",s)}},[]);return[b,Object(d.useMergeRefs)([e,p]),m]}(),r=Object(f.useSelect)(e=>e(Rn).hasMultiSelection(),[]);return Object(i.createElement)(i.Fragment,null,t,Object(i.createElement)("div",{ref:Object(d.useMergeRefs)([n,fp(),vp(),jp()]),className:"block-editor-writing-flow",tabIndex:r?"0":void 0,"aria-label":r?Object(j.__)("Multiple selected blocks"):void 0},e),o)}const _p=Object(u.overEvery)([ui.isTextField,ui.focus.tabbable.isTabbableIndex]);function yp(){return Object(d.useRefEffect)(e=>{function t(t){if(t.target!==e)return;const n=ui.focus.focusable.find(e),o=Object(u.findLast)(n,_p);if(!o)return;const{bottom:r}=o.getBoundingClientRect();t.clientY<r||(Object(ui.placeCaretAtHorizontalEdge)(o,!0),t.preventDefault())}return e.addEventListener("mousedown",t),()=>{e.addEventListener("mousedown",t)}},[])}function Ep(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";for(const t of document.body.classList)t.startsWith("admin-color-")&&e.body.classList.add(t)}function Cp(e){return Object(i.useMemo)(()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)},[e])}var Sp=Object(i.forwardRef)((function({contentRef:e,children:t,head:n,...o},r){const[c,s]=Object(i.useState)(),a=Cp(window.__editorAssets.styles),u=Cp(window.__editorAssets.scripts),b=ju(),m=Object(i.useCallback)(t=>{function n(){const{contentDocument:n}=t,{readyState:o,body:r,documentElement:c}=n;return("interactive"===o||"complete"===o)&&("function"==typeof e?e(r):e&&(e.current=r),Ep(n),function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],c={};for(const t in e)c[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();c.clientX+=e.left,c.clientY+=e.top}const l=new r(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}const r=["keydown","keypress","dragover"];for(const t of r)e.addEventListener(t,o)}(n),Ep(n),s(n),b(c),b(r),u.reduce((e,t)=>e.then(()=>async function(e,{id:t,src:n}){return new Promise((o,r)=>{const c=e.createElement("script");c.id=t,n?(c.src=n,c.onload=()=>o(),c.onerror=()=>r()):o(),e.head.appendChild(c)})}(n,t)),Promise.resolve()),!0)}t&&(n()||t.addEventListener("load",()=>{n()}))},[]);return Object(i.useEffect)(()=>{var e;c&&(e=c,Array.from(document.styleSheets).forEach(t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;o&&Array.from(o).find(({selectorText:e})=>e&&(e.includes(".editor-styles-wrapper")||e.includes(".wp-block")))&&!e.getElementById(n.id)&&(console.error(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n),e.head.appendChild(n.cloneNode(!0)))}))},[c]),n=Object(i.createElement)(i.Fragment,null,Object(i.createElement)("style",null,"body{margin:0}"),a.map(({tagName:e,href:t,id:n,rel:o,media:r},c)=>{const l=e.toLowerCase();return Object(i.createElement)(l,{href:t,id:n,rel:o,media:r,key:c})}),n),Object(i.createElement)("iframe",Object(l.a)({},o,{ref:Object(d.useMergeRefs)([r,m]),tabIndex:"0",title:Object(j.__)("Editor canvas"),name:"editor-canvas"}),c&&Object(i.createPortal)(Object(i.createElement)(p.__experimentalStyleProvider,{document:c},t),c.body),c&&Object(i.createPortal)(n,c.head))}));const wp=Object(i.createContext)({});function Bp(e,t=""){var n;const o=Object(i.useContext)(wp),{name:r}=O();t=t||r;const c=Boolean(null===(n=o[t])||void 0===n?void 0:n.has(e)),l=Object(i.useMemo)(()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,t,e),[o,t,e]);return[c,Object(i.useCallback)(({children:e})=>Object(i.createElement)(wp.Provider,{value:l},e),[l])]}function Ip(e){if(void 0===e)e=k.colors;else{const t=e.filter(e=>e.color);0===t.length?e=k.colors:t.length<e.length&&(e=t)}return e}function xp(e){if(void 0===e)e=k.gradients;else{const t=e.filter(e=>e.gradient);0===t.length?e=k.gradients:t.length<e.length&&(e=t)}return e}},"./node_modules/autosize/dist/autosize.js":function(e,t,n){var o,r,c;
|
||
/*!
|
||
autosize 4.0.4
|
||
license: MIT
|
||
http://www.jacklmoore.com/autosize
|
||
*/r=[e,t],void 0===(c="function"==typeof(o=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t,n=null,o=null,l=null,i=function(){e.clientWidth!==o&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:s,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function a(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",o=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(a("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(a("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==o){l=o;var r=c("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}function i(e){var t=r.get(e);t&&t.destroy()}function s(e){var t=r.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return l(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=a,e.exports=t.default})?o.apply(t,r):o)||(e.exports=c)},"./node_modules/classnames/index.js":function(e,t,n){var o;
|
||
/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var c=typeof o;if("string"===c||"number"===c)e.push(o);else if(Array.isArray(o)){if(o.length){var l=r.apply(null,o);l&&e.push(l)}}else if("object"===c)if(o.toString===Object.prototype.toString)for(var i in o)n.call(o,i)&&o[i]&&e.push(i);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},"./node_modules/computed-style/dist/computedStyle.commonjs.js":function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},"./node_modules/css-mediaquery/index.js":function(e,t,n){"use strict";t.match=function(e,t){return s(e).some((function(e){var n=e.inverse,o="all"===e.type||t.type===e.type;if(o&&n||!o&&!n)return!1;var r=e.expressions.every((function(e){var n=e.feature,o=e.modifier,r=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===r.toLowerCase();case"width":case"height":case"device-width":case"device-height":r=d(r),c=d(c);break;case"resolution":r=u(r),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":r=a(r),c=a(c);break;case"grid":case"color":case"color-index":case"monochrome":r=parseInt(r,10)||1,c=parseInt(c,10)||0}switch(o){case"min":return c>=r;case"max":return c<=r;default:return c===r}}));return r&&!n||!r&&n}))},t.parse=s;var o=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,l=/(em|rem|px|cm|mm|in|pt|pc)?$/,i=/(dpi|dpcm|dppx)?$/;function s(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(o),n=t[1],l=t[2],i=t[3]||"",s={};return s.inverse=!!n&&"not"===n.toLowerCase(),s.type=l?l.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],s.expressions=i.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),s}))}function a(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},"./node_modules/diff/lib/diff/base.js":function(e,t,n){"use strict";function o(){}function r(e,t,n,o,r){for(var c=0,l=t.length,i=0,s=0;c<l;c++){var a=t[c];if(a.removed){if(a.value=e.join(o.slice(s,s+a.count)),s+=a.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!a.added&&r){var d=n.slice(i,i+a.count);d=d.map((function(e,t){var n=o[s+t];return n.length>e.length?n:e})),a.value=e.join(d)}else a.value=e.join(n.slice(i,i+a.count));i+=a.count,a.added||(s+=a.count)}}var b=t[l-1];return l>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[l-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,o.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.callback;"function"==typeof n&&(o=n,n={}),this.options=n;var l=this;function i(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,u=1,d=s+a,b=[{newPos:-1,components:[]}],m=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=s&&m+1>=a)return i([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var o=void 0,d=b[n-1],m=b[n+1],p=(m?m.newPos:0)-n;d&&(b[n-1]=void 0);var f=d&&d.newPos+1<s,g=m&&0<=p&&p<a;if(f||g){if(!f||g&&d.newPos<m.newPos?(o=c(m),l.pushComponent(o.components,void 0,!0)):((o=d).newPos++,l.pushComponent(o.components,!0,void 0)),p=l.extractCommon(o,t,e,n),o.newPos+1>=s&&p+1>=a)return i(r(l,o.components,t,e,l.useLongestToken));b[n]=o}else b[n]=void 0}u++}if(o)!function e(){setTimeout((function(){if(u>d)return o();p()||e()}),0)}();else for(;u<=d;){var f=p();if(f)return f}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,c=n.length,l=e.newPos,i=l-o,s=0;l+1<r&&i+1<c&&this.equals(t[l+1],n[i+1]);)l++,i++,s++;return s&&e.components.push({count:s}),e.newPos=l,i},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},"./node_modules/diff/lib/diff/character.js":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return r.diff(e,t,n)},t.characterDiff=void 0;var r=new(((o=n("./node_modules/diff/lib/diff/base.js"))&&o.__esModule?o:{default:o}).default);t.characterDiff=r},"./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js":function(e,t,n){"use strict";var o=n("./node_modules/dom-scroll-into-view/lib/util.js");e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,l=n.alignWithTop,i=n.alignWithLeft,s=n.offsetTop||0,a=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var b=o.isWindow(t),m=o.offset(e),p=o.outerHeight(e),f=o.outerWidth(e),g=void 0,h=void 0,O=void 0,j=void 0,v=void 0,k=void 0,_=void 0,y=void 0,E=void 0,C=void 0;b?(_=t,C=o.height(_),E=o.width(_),y={left:o.scrollLeft(_),top:o.scrollTop(_)},v={left:m.left-y.left-a,top:m.top-y.top-s},k={left:m.left+f-(y.left+E)+d,top:m.top+p-(y.top+C)+u},j=y):(g=o.offset(t),h=t.clientHeight,O=t.clientWidth,j={left:t.scrollLeft,top:t.scrollTop},v={left:m.left-(g.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-a,top:m.top-(g.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-s},k={left:m.left+f-(g.left+O+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:m.top+p-(g.top+h+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),v.top<0||k.top>0?!0===l?o.scrollTop(t,j.top+v.top):!1===l?o.scrollTop(t,j.top+k.top):v.top<0?o.scrollTop(t,j.top+v.top):o.scrollTop(t,j.top+k.top):c||((l=void 0===l||!!l)?o.scrollTop(t,j.top+v.top):o.scrollTop(t,j.top+k.top)),r&&(v.left<0||k.left>0?!0===i?o.scrollLeft(t,j.left+v.left):!1===i?o.scrollLeft(t,j.left+k.left):v.left<0?o.scrollLeft(t,j.left+v.left):o.scrollLeft(t,j.left+k.left):c||((i=void 0===i||!!i)?o.scrollLeft(t,j.left+v.left):o.scrollLeft(t,j.left+k.left)))}},"./node_modules/dom-scroll-into-view/lib/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js")},"./node_modules/dom-scroll-into-view/lib/util.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function l(e){return c(e)}function i(e){return c(e,!0)}function s(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,c=r.body,l=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=l.clientLeft||c.clientLeft||0,top:o-=l.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=l(o),t.top+=i(o),t}var a=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left";var b=void 0;function m(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,c=n||r.defaultView.getComputedStyle(e,null);return c&&(o=c.getPropertyValue(t)||c[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(a.test(n)&&!u.test(t)){var o=e.style,r=o[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],o[d]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[d]=r,e.runtimeStyle[d]=c}return""===n?"auto":n});var f=["margin","border","padding"];function g(e,t,n){var o={},r=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o[c]=r[c],r[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(r[c]=o[c])}function h(e,t,n){var o=0,r=void 0,c=void 0,l=void 0;for(c=0;c<t.length;c++)if(r=t[c])for(l=0;l<n.length;l++){var i=void 0;i="border"===r?r+n[l]+"Width":r+n[l],o+=parseFloat(b(e,i))||0}return o}function O(e){return null!=e&&e==e.window}var j={};function v(e,t,n){if(O(e))return"width"===t?j.viewportWidth(e):j.viewportHeight(e);if(9===e.nodeType)return"width"===t?j.docWidth(e):j.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),l=0;(null==r||r<=0)&&(r=void 0,(null==(l=b(e,t))||Number(l)<0)&&(l=e.style[t]||0),l=parseFloat(l)||0),void 0===n&&(n=c?1:-1);var i=void 0!==r||c,s=r||l;if(-1===n)return i?s-h(e,["border","padding"],o):l;if(i){var a=2===n?-h(e,["border"],o):h(e,["margin"],o);return s+(1===n?0:a)}return l+h(e,f.slice(n),o)}m(["Width","Height"],(function(e){j["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],j["viewport"+e](n))},j["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,c=o.documentElement[n];return"CSS1Compat"===o.compatMode&&c||r&&r[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):g(e,k,(function(){t=v.apply(void 0,n)})),t}function y(e,t,n){var o=n;if("object"!==(void 0===t?"undefined":r(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&y(e,c,t[c])}m(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);j["outer"+t]=function(t,n){return t&&_(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];j[e]=function(t,o){if(void 0===o)return t&&_(t,e,-1);if(t){b(t);return p(t)&&(o+=h(t,["padding","border"],n)),y(t,e,o)}}})),e.exports=o({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return s(e);!function(e,t){"static"===y(e,"position")&&(e.style.position="relative");var n=s(e),o={},r=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r=parseFloat(y(e,c))||0,o[c]=r+t[c]-n[c]);y(e,o)}(e,t)},isWindow:O,each:m,css:y,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(O(e)){if(void 0===t)return l(e);window.scrollTo(t,i(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(O(e)){if(void 0===t)return i(e);window.scrollTo(l(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},j)},"./node_modules/inherits/inherits_browser.js":function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},"./node_modules/line-height/lib/line-height.js":function(e,t,n){var o=n("./node_modules/computed-style/dist/computedStyle.commonjs.js");e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,l=document.createElement(c);l.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&l.setAttribute("rows","1");var i=o(e,"font-size");l.style.fontSize=i,l.style.padding="0px",l.style.border="0px";var s=document.body;s.appendChild(l),n=l.offsetHeight,s.removeChild(l)}return n}},"./node_modules/memize/index.js":function(e,t,n){e.exports=function(e,t){var n,o,r=0;function c(){var c,l,i=n,s=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(l=0;l<s;l++)if(i.args[l]!==arguments[l]){i=i.next;continue e}return i!==n&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}i=i.next}for(c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return i={args:c,val:e.apply(null,c)},n?(n.prev=i,i.next=n):o=i,r===t.maxSize?(o=o.prev).next=null:r++,n=i,i.val}return t=t||{},c.clear=function(){n=null,o=null,r=0},c}},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var o=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function r(){}function c(){}c.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,c,l){if(l!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:r};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(e,t,n){e.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-autosize-textarea/lib/TextareaAutosize.js":function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var i=n("react"),s=n("./node_modules/prop-types/index.js"),a=n("./node_modules/autosize/dist/autosize.js"),u=n("./node_modules/line-height/lib/line-height.js"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&a(e.textarea)})):this.textarea&&a(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),a.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),s=l(t,["onResize","maxRows","onChange","style","innerRef","children"]),a=this.state.lineHeight,u=n&&a?a*n:null;return i.createElement("textarea",c({},s,{onChange:this.onChange,style:u?c({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&a.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.any,async:s.bool},t}(i.Component);t.TextareaAutosize=i.forwardRef((function(e,t){return i.createElement(d,c({},e,{innerRef:t}))}))},"./node_modules/react-autosize-textarea/lib/index.js":function(e,t,n){"use strict";t.__esModule=!0;var o=n("./node_modules/react-autosize-textarea/lib/TextareaAutosize.js");t.default=o.TextareaAutosize},"./node_modules/react-spring/web.cjs.js":function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var r=o(n("./node_modules/@babel/runtime/helpers/extends.js")),c=o(n("./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js")),l=n("react"),i=o(l),s=o(n("./node_modules/@babel/runtime/helpers/inheritsLoose.js")),a=o(n("./node_modules/@babel/runtime/helpers/assertThisInitialized.js")),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=l.useState(!1)[1];return l.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return u.fun(e)?e.apply(void 0,n):e}function f(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return r({to:t},e);var n=Object.keys(e).reduce((function(n,o){var c;return u.und(t[o])?r({},n,((c={})[o]=e[o],c)):n}),{});return r({to:t},n)}var g,h,O=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),j=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.addChild(a(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof O&&e.removeChild(a(t))}))},t}return s(t,e),t}(O),v=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.addChild(a(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof O&&e.removeChild(a(t))}))},t}s(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var o=this.payload[n];(!e||o instanceof O)&&(t[n]=o instanceof O?o[e?"getAnimatedValue":"getValue"]():o)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(O);function k(e,t){g={fn:e,transform:t}}function _(e){h=e}var y,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},C=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){y=e}var w,B=function(){return Date.now()};function I(e){w=e}var x,T,N=function(e){return e.current};function P(e){x=e}var L=Object.freeze({get applyAnimatedValues(){return g},injectApplyAnimatedValues:k,get colorNames(){return h},injectColorNames:_,get requestFrame(){return E},get cancelFrame(){return C},injectFrame:function(e,t){E=e,C=t},get interpolation(){return y},injectStringInterpolator:S,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return w},injectDefaultElement:I,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:P,get manualFrameloop(){return T},injectManualFrameloop:function(e){T=e}}),A=function(e){function t(t,n){var o;return(o=e.call(this)||this).update=void 0,o.payload=t.style?r({},t,{style:x(t.style)}):t,o.update=n,o.attach(),o}return s(t,e),t}(v),R=!1,M=new Set,D=function e(){if(!R)return!1;var t=B(),n=M,o=Array.isArray(n),r=0;for(n=o?n:n[Symbol.iterator]();;){var c;if(o){if(r>=n.length)break;c=n[r++]}else{if((r=n.next()).done)break;c=r.value}for(var l=c,i=!1,s=0;s<l.configs.length;s++){for(var a=l.configs[s],u=void 0,d=void 0,b=0;b<a.animatedValues.length;b++){var m=a.animatedValues[b];if(!m.done){var p=a.fromValues[b],f=a.toValues[b],g=m.lastPosition,h=f instanceof O,j=Array.isArray(a.initialVelocity)?a.initialVelocity[b]:a.initialVelocity;if(h&&(f=f.getValue()),a.immediate)m.setValue(f),m.done=!0;else if("string"!=typeof p&&"string"!=typeof f){if(void 0!==a.duration)g=p+a.easing((t-m.startTime)/a.duration)*(f-p),u=t>=m.startTime+a.duration;else if(a.decay)g=p+j/(1-.998)*(1-Math.exp(-(1-.998)*(t-m.startTime))),(u=Math.abs(m.lastPosition-g)<.1)&&(f=g);else{d=void 0!==m.lastTime?m.lastTime:t,j=void 0!==m.lastVelocity?m.lastVelocity:a.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),k=0;k<v;++k){g+=1*(j+=1*((-a.tension*(g-f)+-a.friction*j)/a.mass)/1e3)/1e3}var _=!(!a.clamp||0===a.tension)&&(p<f?g>f:g<f),y=Math.abs(j)<=a.precision,C=0===a.tension||Math.abs(f-g)<=a.precision;u=_||y&&C,m.lastVelocity=j,m.lastTime=t}h&&!a.toValues[b].done&&(u=!1),u?(m.value!==f&&(g=f),m.done=!0):i=!0,m.setValue(g),m.lastPosition=g}else m.setValue(f),m.done=!0}}l.props.onFrame&&(l.values[a.name]=a.interpolation.getValue())}l.props.onFrame&&l.props.onFrame(l.values),i||(M.delete(l),l.stop(!0))}return M.size?T?T():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(y&&"string"==typeof e.output[0])return y(e);var o=e,r=o.output,c=o.range||[0,1],l=o.extrapolateLeft||o.extrapolate||"extend",i=o.extrapolateRight||o.extrapolate||"extend",s=o.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,o,r,c,l,i,s){var a=s?s(e):e;if(a<t){if("identity"===l)return a;"clamp"===l&&(a=t)}if(a>n){if("identity"===i)return a;"clamp"===i&&(a=n)}if(o===r)return o;if(t===n)return e<=t?o:r;t===-1/0?a=-a:n===1/0?a-=t:a=(a-t)/(n-t);a=c(a),o===-1/0?a=-a:r===1/0?a+=o:a=a*(r-o)+o;return a}(e,c[t],c[t+1],r[t],r[t+1],s,l,i,o.map)}}var V=function(e){function t(n,o,r,c){var l;return(l=e.call(this)||this).calc=void 0,l.payload=n instanceof j&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],l.calc=F(o,r,c),l}s(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=F(e,t,n)},n.interpolate=function(e,n,o){return new t(this,e,n,o)},t}(j);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}s(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(O),H=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}s(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,o){return n.payload[o].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(j),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=f(e),n=t.delay,o=void 0===n?0:n,l=t.to,i=c(t,["delay","to"]);if(u.arr(l)||u.fun(l))this.queue.push(r({},i,{delay:o,to:l}));else if(l){var s={};Object.entries(l).forEach((function(e){var t,n=e[0],c=e[1],l=r({to:(t={},t[n]=c,t),delay:p(o,n)},i),a=s[l.delay]&&s[l.delay].to;s[l.delay]=r({},s[l.delay],l,{to:r({},a,l.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,o=void 0===t?{}:t,c=e.to,l=void 0===c?{}:c;u.obj(o)&&(n.merged=r({},o,n.merged)),u.obj(l)&&(n.merged=r({},n.merged,l))}));var o=this.local=++this.guid,l=this.localQueue=this.queue;this.queue=[],l.forEach((function(t,r){var i=t.delay,s=c(t,["delay"]),a=function(t){r===l.length-1&&o===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(s.to)||u.fun(s.to);i?setTimeout((function(){o===n.guid&&(d?n.runAsync(s,a):n.diff(s).start(a))}),i):d?n.runAsync(s,a):n.diff(s).start(a)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,M.has(t)||M.add(t),R||(R=!0,E(T||D));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,M.has(t)&&M.delete(t)),this},t.runAsync=function(e,t){var n=this,o=(e.delay,c(e,["delay"])),l=this.local,i=Promise.resolve(void 0);if(u.arr(o.to))for(var s=function(e){var t=e,c=r({},o,f(o.to[t]));u.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(l===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},a=0;a<o.to.length;a++)s(a);else if(u.fun(o.to)){var d,b=0;i=i.then((function(){return o.to((function(e){var t=r({},o,f(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,l===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=r({},this.props,e);var n=this.props,o=n.from,c=void 0===o?{}:o,l=n.to,i=void 0===l?{}:l,s=n.config,a=void 0===s?{}:s,d=n.reverse,f=n.attach,g=n.reset,O=n.immediate;if(d){var j=[i,c];c=j[0],i=j[1]}this.merged=r({},c,this.merged,i),this.hasChanged=!1;var v=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var o=n[0],l=n[1],i=e[o]||{},s=u.num(l),d=u.str(l)&&!l.startsWith("#")&&!/\d/.test(l)&&!h[l],f=u.arr(l),j=!s&&!f&&!d,k=u.und(c[o])?l:c[o],_=s||f||d?l:1,E=p(a,o);v&&(_=v.animations[o].parent);var C,S=i.parent,w=i.interpolation,I=m(v?_.getPayload():_),x=l;j&&(x=y({range:[0,1],output:[l,l]})(1));var T,N=w&&w.getValue(),P=!u.und(S)&&i.animatedValues.some((function(e){return!e.done})),L=!u.equ(x,N),A=!u.equ(x,i.previous),R=!u.equ(E,i.config);if(g||A&&L||R){var M;if(s||d)S=w=i.parent||new z(k);else if(f)S=w=i.parent||new H(k);else if(j){var D=i.interpolation&&i.interpolation.calc(i.parent.value);D=void 0===D||g?k:D,i.parent?(S=i.parent).setValue(0,!1):S=new z(0);var F={output:[D,l]};i.interpolation?(w=i.interpolation,i.interpolation.updateConfig(F)):w=S.interpolate(F)}return I=m(v?_.getPayload():_),C=m(S.getPayload()),g&&!j&&S.setValue(k,!1),t.hasChanged=!0,C.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=P?e.lastVelocity:void 0,e.lastTime=P?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(O,o)&&S.setValue(j?_:l,!1),r({},e,((M={})[o]=r({},i,{name:o,parent:S,interpolation:w,animatedValues:C,toValues:I,previous:x,config:E,fromValues:m(S.getValue()),immediate:p(O,o),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),M))}return L?e:(j&&(S.setValue(1,!1),w.updateConfig({output:[x,x]})),S.done=!0,t.hasChanged=!0,r({},e,((T={})[o]=r({},e[o],{previous:x}),T)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=l.useRef(!1),o=l.useRef(),r=u.fun(t),c=l.useMemo((function(){var n;return o.current&&(o.current.map((function(e){return e.destroy()})),o.current=void 0),[new Array(e).fill().map((function(e,o){var c=new U,l=r?p(t,o,c):t[o];return 0===o&&(n=l.ref),c.update(l),n||c.start(),c})),n]}),[e]),i=c[0],s=c[1];o.current=i;l.useImperativeHandle(s,(function(){return{start:function(){return Promise.all(o.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return o.current.forEach((function(t){return t.stop(e)}))},get controllers(){return o.current}}}));var a=l.useMemo((function(){return function(e){return o.current.map((function(t,n){t.update(r?p(e,n,t):e[n]),s||t.start()}))}}),[e]);l.useEffect((function(){n.current?r||a(t):s||o.current.forEach((function(e){return e.start()}))})),l.useEffect((function(){return n.current=!0,function(){return o.current.forEach((function(e){return e.destroy()}))}}),[]);var d=o.current.map((function(e){return e.getValues()}));return r?[d,a,function(e){return o.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,$=function(e,t){return("function"==typeof t?e.map(t):m(t)).map(String)},q=function(e){var t=e.items,n=e.keys,o=void 0===n?function(e){return e}:n,l=c(e,["items","keys"]);return t=m(void 0!==t?t:null),r({items:t,keys:$(t,o)},l)};function Y(e,t){var n=function(){if(r){if(c>=o.length)return"break";l=o[c++]}else{if((c=o.next()).done)return"break";l=c.value}var n=l.key,i=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},o=e.current.deleted,r=Array.isArray(o),c=0;for(o=r?o:o[Symbol.iterator]();;){var l;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof O||(t=g.transform(t)),n.payload=t,n}return s(t,e),t}(v),Q={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},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),oe=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,le=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function se(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ae(e,t,n){var o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,c=se(r,o,e+1/3),l=se(r,o,e),i=se(r,o,e-1/3);return Math.round(255*c)<<24|Math.round(255*l)<<16|Math.round(255*i)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function me(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,o="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=le.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=re.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|ae(de(n[1]),me(n[2]),me(n[3])))>>>0:(n=oe.exec(t))?(ae(de(n[1]),me(n[2]),me(n[3]))|be(n[4]))>>>0:null;return null===o?e:"rgba("+((4278190080&(o=o||0))>>>24)+", "+((16711680&o)>>>16)+", "+((65280&o)>>>8)+", "+(255&o)/255+")"}var fe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,he=new RegExp("("+Object.keys(Q).join("|")+")","g"),Oe={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},je=["Webkit","Ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Oe.hasOwnProperty(e)&&Oe[e]?(""+t).trim():t+"px"}Oe=Object.keys(Oe).reduce((function(e,t){return je.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),Oe);var ke={};P((function(e){return new X(e)})),I("div"),S((function(e){var t=e.output.map((function(e){return e.replace(ge,pe)})).map((function(e){return e.replace(he,pe)})),n=t[0].match(fe).map((function(){return[]}));t.forEach((function(e){e.match(fe).forEach((function(e,t){return n[t].push(+e)}))}));var o=t[0].match(fe).map((function(t,o){return F(r({},e,{output:n[o]}))}));return function(e){var n=0;return t[0].replace(fe,(function(){return o[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,o,r){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(o)+", "+r+")"}))}})),_(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,o=t.children,r=t.scrollTop,l=t.scrollLeft,i=c(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var a in void 0!==r&&(e.scrollTop=r),void 0!==l&&(e.scrollLeft=l),void 0!==o&&(e.textContent=o),n)if(n.hasOwnProperty(a)){var u=0===a.indexOf("--"),d=ve(a,n[a],u);"float"===a&&(a="cssFloat"),u?e.style.setProperty(a,d):e.style[a]=d}for(var b in i){var m=s?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(m)&&e.setAttribute(m,i[b])}}),(function(e){return e}));var _e,ye,Ee=(_e=function(e){return l.forwardRef((function(t,n){var o=d(),s=l.useRef(!0),a=l.useRef(null),b=l.useRef(null),m=l.useCallback((function(e){var t=a.current;a.current=new A(e,(function(){var e=!1;b.current&&(e=g.fn(b.current,a.current.getAnimatedValue())),b.current&&!1!==e||o()})),t&&t.detach()}),[]);l.useEffect((function(){return function(){s.current=!1,a.current&&a.current.detach()}}),[]),l.useImperativeHandle(n,(function(){return N(b,s,o)})),m(t);var p,f=a.current.getValue(),h=(f.scrollTop,f.scrollLeft,c(f,["scrollTop","scrollLeft"])),O=(p=e,!u.fun(p)||p.prototype instanceof i.Component?function(e){return b.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return i.createElement(e,r({},h,{ref:O}))}))},void 0===(ye=!1)&&(ye=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ye?t[0].toLowerCase()+t.substring(1):t;return e[n]=_e(n),e}),_e)}),Ce=Ee(["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"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=D,t.animated=Ce,t.a=Ce,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=L,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),o=n[0],r=n[1],c=n[2];return t?[o[0],r,c]:o},t.useTrail=function(e,t){var n=l.useRef(!1),o=u.fun(t),c=p(t),i=l.useRef(),s=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),r({},c,{config:p(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),a=s[0],d=s[1],b=s[2],m=l.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var o=e.reverse?t+1:t-1,l=i.current[o];return r({},e,{config:p(e.config||c.config,t),attach:l&&function(){return l}})}))}}),[e,c.reverse]);return l.useEffect((function(){n.current&&!o&&m(t)})),l.useEffect((function(){n.current=!0}),[]),o?[a,m,b]:a},t.useTransition=function(e,t,n){var o=r({items:e,keys:t||function(e){return e}},n),i=q(o),s=i.lazy,a=void 0!==s&&s,u=(i.unique,i.reset),b=void 0!==u&&u,m=(i.enter,i.leave,i.update,i.onDestroyed),f=(i.keys,i.items,i.onFrame),g=i.onRest,h=i.onStart,O=i.ref,j=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),k=l.useRef(!1),_=l.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!o.ref,instances:!k.current&&new Map,forceUpdate:v});return l.useImperativeHandle(o.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){var n=e.first,o=e.prevProps,l=c(e,["first","prevProps"]),i=q(t),s=i.items,a=i.keys,u=i.initial,d=i.from,b=i.enter,m=i.leave,f=i.update,g=i.trail,h=void 0===g?0:g,O=i.unique,j=i.config,v=i.order,k=void 0===v?["enter","leave","update"]:v,_=q(o),y=_.keys,E=_.items,C=r({},l.current),S=[].concat(l.deleted),w=Object.keys(C),B=new Set(w),I=new Set(a),x=a.filter((function(e){return!B.has(e)})),T=l.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),N=a.filter((function(e){return B.has(e)})),P=-h;for(;k.length;){switch(k.shift()){case"enter":x.forEach((function(e,t){O&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var o=a.indexOf(e),r=s[o],c=n&&void 0!==u?"initial":"enter";C[e]={slot:c,originalKey:e,key:O?String(e):K++,item:r,trail:P+=h,config:p(j,r,c),from:p(n&&void 0!==u?u||{}:d,r),to:p(b,r)}}));break;case"leave":T.forEach((function(e){var t=y.indexOf(e),n=E[t];S.unshift(r({},C[e],{slot:"leave",destroyed:!0,left:y[Math.max(0,t-1)],right:y[Math.min(y.length,t+1)],trail:P+=h,config:p(j,n,"leave"),to:p(m,n)})),delete C[e]}));break;case"update":N.forEach((function(e){var t=a.indexOf(e),n=s[t];C[e]=r({},C[e],{item:n,slot:"update",trail:P+=h,config:p(j,n,"update"),to:p(f,n)})}))}}var L=a.map((function(e){return C[e]}));return S.forEach((function(e){var t,n=e.left,o=(e.right,c(e,["left","right"]));-1!==(t=L.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),L=[].concat(L.slice(0,t),[o],L.slice(t))})),r({},l,{changed:x.length||T.length||N.length,first:n&&0===x.length,transitions:L,current:C,deleted:S,prevProps:t})}(_.current,o),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,n=e.from,o=e.to,c=e.config,l=e.trail,i=e.key,s=e.item;_.current.instances.has(i)||_.current.instances.set(i,new U);var u=_.current.instances.get(i),d=r({},j,{to:o,from:n,config:c,ref:O,onRest:function(n){_.current.mounted&&(e.destroyed&&(O||a||Y(_,i),m&&m(s)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(O||a)&&_.current.deleted.length>0&&Y(_),g&&g(s,t,n))},onStart:h&&function(){return h(s,t)},onFrame:f&&function(e){return f(s,t,e)},delay:l,reset:b&&"enter"===t});u.update(d),_.current.paused||u.start()})),l.useEffect((function(){return _.current.mounted=k.current=!0,function(){_.current.mounted=k.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,n=e.slot,o=e.key;return{item:t,key:o,state:n,props:_.current.instances.get(o).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var o=l.useRef();l.useEffect((function(){u.equ(e,o.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,o){var c=e.current;if(c){var l=c.controllers;if(l.length){var i=n*t[o];l.forEach((function(e){e.queue=e.queue.map((function(e){return r({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,n){var o=t.current;return e.then((function(){return o.start()}))}),Promise.resolve()),o.current=e}))},t.useSprings=W},"./node_modules/rememo/es/rememo.js":function(e,t,n){"use strict";var o,r;function c(e){return[e]}function l(){var e={clear:function(){e.head=null}};return e}function i(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}o={},r="undefined"!=typeof WeakMap,t.a=function(e,t){var n,s;function a(){n=r?new WeakMap:l()}function u(){var n,o,r,c,l,a=arguments.length;for(c=new Array(a),r=0;r<a;r++)c[r]=arguments[r];for(l=t.apply(null,c),(n=s(l)).isUniqueByDependants||(n.lastDependants&&!i(l,n.lastDependants,0)&&n.clear(),n.lastDependants=l),o=n.head;o;){if(i(o.args,c,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,c)},c[0]=null,o.args=c,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=c),s=r?function(e){var t,r,c,i,s,a=n,u=!0;for(t=0;t<e.length;t++){if(r=e[t],!(s=r)||"object"!=typeof s){u=!1;break}a.has(r)?a=a.get(r):(c=new WeakMap,a.set(r,c),a=c)}return a.has(o)||((i=l()).isUniqueByDependants=u,a.set(o,i)),a.get(o)}:function(){return n},u.getDependants=t,u.clear=a,a(),u}},"./node_modules/tinycolor2/tinycolor.js":function(e,t,n){var o;!function(r){var c=/^\s+/,l=/\s+$/,i=0,s=r.round,a=r.min,u=r.max,d=r.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,o=null,i=null,s=null,d=!1,b=!1;"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(l,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=G.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=G.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=G.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=G.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=G.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=G.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=G.hex8.exec(e))return{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=G.hex6.exec(e))return{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"};if(t=G.hex4.exec(e))return{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=G.hex3.exec(e))return{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(m=e.r,p=e.g,f=e.b,t={r:255*P(m,255),g:255*P(p,255),b:255*P(f,255)},d=!0,b="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(o=M(e.s),i=M(e.v),t=function(e,t,n){e=6*P(e,360),t=P(t,100),n=P(n,100);var o=r.floor(e),c=e-o,l=n*(1-t),i=n*(1-c*t),s=n*(1-(1-c)*t),a=o%6;return{r:255*[n,i,l,l,s,n][a],g:255*[s,n,n,i,l,l][a],b:255*[l,l,s,n,n,i][a]}}(e.h,o,i),d=!0,b="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(o=M(e.s),s=M(e.l),t=function(e,t,n){var o,r,c;function l(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=P(e,360),t=P(t,100),n=P(n,100),0===t)o=r=c=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;o=l(s,i,e+1/3),r=l(s,i,e),c=l(s,i,e-1/3)}return{r:255*o,g:255*r,b:255*c}}(e.h,o,s),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var m,p,f;return n=N(n),{ok:d,format:e.format||b,r:a(255,u(t.r,0)),g:a(255,u(t.g,0)),b:a(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=i++}function m(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var o,r,c=u(e,t,n),l=a(e,t,n),i=(c+l)/2;if(c==l)o=r=0;else{var s=c-l;switch(r=i>.5?s/(2-c-l):s/(c+l),c){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:r,l:i}}function p(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var o,r,c=u(e,t,n),l=a(e,t,n),i=c,s=c-l;if(r=0===c?0:s/c,c==l)o=0;else{switch(c){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:r,v:i}}function f(e,t,n,o){var r=[R(s(e).toString(16)),R(s(t).toString(16)),R(s(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function g(e,t,n,o){return[R(D(o)),R(s(e).toString(16)),R(s(t).toString(16)),R(s(n).toString(16))].join("")}function h(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=L(n.s),b(n)}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=L(n.s),b(n)}function j(e){return b(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=L(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,a(255,n.r-s(-t/100*255))),n.g=u(0,a(255,n.g-s(-t/100*255))),n.b=u(0,a(255,n.b-s(-t/100*255))),b(n)}function _(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=L(n.l),b(n)}function y(e,t){var n=b(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var o=b(e).toHsl(),r=360/n,c=[b(e)];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,c.push(b(o));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),o=n.h,r=n.s,c=n.v,l=[],i=1/t;t--;)l.push(b({h:o,s:r,v:c})),c=(c+i)%1;return l}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=N(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),o=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=m(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),o=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var c=[R(s(e).toString(16)),R(s(t).toString(16)),R(s(n).toString(16)),R(D(o))];if(r&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*P(this._r,255))+"%",g:s(100*P(this._g,255))+"%",b:s(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*P(this._r,255))+"%, "+s(100*P(this._g,255))+"%, "+s(100*P(this._b,255))+"%)":"rgba("+s(100*P(this._r,255))+"%, "+s(100*P(this._g,255))+"%, "+s(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=b(e);n="#"+g(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(j,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:M(e[o]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var o=b(e).toRgb(),r=b(t).toRgb(),c=n/100;return b({r:(r.r-o.r)*c+o.r,g:(r.g-o.g)*c+o.g,b:(r.b-o.b)*c+o.b,a:(r.a-o.a)*c+o.a})},b.readability=function(e,t){var n=b(e),o=b(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(e,t,n){var o,r,c=b.readability(e,t);switch(r=!1,(o=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+o.size){case"AAsmall":case"AAAlarge":r=c>=4.5;break;case"AAlarge":r=c>=3;break;case"AAAsmall":r=c>=7}return r},b.mostReadable=function(e,t,n){var o,r,c,l,i=null,s=0;r=(n=n||{}).includeFallbackColors,c=n.level,l=n.size;for(var a=0;a<t.length;a++)(o=b.readability(e,t[a]))>s&&(s=o,i=b(t[a]));return b.isReadable(e,i,{level:c,size:l})||!r?i:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function N(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=a(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return a(1,u(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function M(e){return e<=1&&(e=100*e+"%"),e}function D(e){return r.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,z,H,G=(z="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",H="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(o=function(){return b}.call(t,n,t,e))||(e.exports=o)}(Math)},"./node_modules/traverse/index.js":function(e,t){var n=e.exports=function(e){return new o(e)};function o(e){this.value=e}function r(e,t,n){var o=[],r=[],i=!0;return function e(d){var b=n?c(d):d,m={},p=!0,f={node:b,node_:d,path:[].concat(o),parent:r[r.length-1],parents:r,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){f.isRoot||(f.parent.node[f.key]=e),f.node=e,t&&(p=!1)},delete:function(e){delete f.parent.node[f.key],e&&(p=!1)},remove:function(e){s(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],e&&(p=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){i=!1},block:function(){p=!1}};if(!i)return f;function g(){if("object"==typeof f.node&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=l(f.node)),f.isLeaf=0==f.keys.length;for(var e=0;e<r.length;e++)if(r[e].node_===d){f.circular=r[e];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}g();var h=t.call(f,f.node);return void 0!==h&&f.update&&f.update(h),m.before&&m.before.call(f,f.node),p?("object"!=typeof f.node||null===f.node||f.circular||(r.push(f),g(),a(f.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(f,f.node[t],t);var c=e(f.node[t]);n&&u.call(f.node,t)&&(f.node[t]=c.node),c.isLast=r==f.keys.length-1,c.isFirst=0==r,m.post&&m.post.call(f,c),o.pop()})),r.pop()),m.after&&m.after.call(f,f.node),f):f}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===i(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(l(e),(function(n){t[n]=e[n]})),t}return e}o.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!u.call(t,o)){t=void 0;break}t=t[o]}return t},o.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!u.call(t,o))return!1;t=t[o]}return!0},o.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];u.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},o.prototype.map=function(e){return r(this.value,e,!0)},o.prototype.forEach=function(e){return this.value=r(this.value,e,!1),this.value},o.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},o.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},o.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},o.prototype.clone=function(){var e=[],t=[];return function n(o){for(var r=0;r<e.length;r++)if(e[r]===o)return t[r];if("object"==typeof o&&null!==o){var i=c(o);return e.push(o),t.push(i),a(l(o),(function(e){i[e]=n(o[e])})),e.pop(),t.pop(),i}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(l(o.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),r=new o(t);return r[e].apply(r,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},"@wordpress/a11y":function(e,t){e.exports=window.wp.a11y},"@wordpress/blob":function(e,t){e.exports=window.wp.blob},"@wordpress/block-serialization-default-parser":function(e,t){e.exports=window.wp.blockSerializationDefaultParser},"@wordpress/blocks":function(e,t){e.exports=window.wp.blocks},"@wordpress/components":function(e,t){e.exports=window.wp.components},"@wordpress/compose":function(e,t){e.exports=window.wp.compose},"@wordpress/data":function(e,t){e.exports=window.wp.data},"@wordpress/deprecated":function(e,t){e.exports=window.wp.deprecated},"@wordpress/dom":function(e,t){e.exports=window.wp.dom},"@wordpress/element":function(e,t){e.exports=window.wp.element},"@wordpress/hooks":function(e,t){e.exports=window.wp.hooks},"@wordpress/html-entities":function(e,t){e.exports=window.wp.htmlEntities},"@wordpress/i18n":function(e,t){e.exports=window.wp.i18n},"@wordpress/is-shallow-equal":function(e,t){e.exports=window.wp.isShallowEqual},"@wordpress/keyboard-shortcuts":function(e,t){e.exports=window.wp.keyboardShortcuts},"@wordpress/keycodes":function(e,t){e.exports=window.wp.keycodes},"@wordpress/notices":function(e,t){e.exports=window.wp.notices},"@wordpress/primitives":function(e,t){e.exports=window.wp.primitives},"@wordpress/rich-text":function(e,t){e.exports=window.wp.richText},"@wordpress/shortcode":function(e,t){e.exports=window.wp.shortcode},"@wordpress/token-list":function(e,t){e.exports=window.wp.tokenList},"@wordpress/url":function(e,t){e.exports=window.wp.url},"@wordpress/wordcount":function(e,t){e.exports=window.wp.wordcount},lodash:function(e,t){e.exports=window.lodash},react:function(e,t){e.exports=window.React}}); |