mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-02 16:59:35 +01:00
a225c5cdc6
This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 lines
141 KiB
JavaScript
12 lines
141 KiB
JavaScript
/*! This file is auto-generated */
|
||
this.wp=this.wp||{},this.wp.editor=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/editor/build-module/index.js")}({"./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/@wordpress/editor/build-module/index.js":function(e,t,n){"use strict";n.r(t),n.d(t,"storeConfig",(function(){return so})),n.d(t,"store",(function(){return io})),n.d(t,"userAutocompleter",(function(){return O})),n.d(t,"AutosaveMonitor",(function(){return ao})),n.d(t,"DocumentOutline",(function(){return jo})),n.d(t,"DocumentOutlineCheck",(function(){return vo})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return wo})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return So})),n.d(t,"EditorKeyboardShortcutsRegister",(function(){return Eo})),n.d(t,"EditorHistoryRedo",(function(){return xo})),n.d(t,"EditorHistoryUndo",(function(){return Bo})),n.d(t,"EditorNotices",(function(){return Io})),n.d(t,"EntitiesSavedStates",(function(){return Mo})),n.d(t,"ErrorBoundary",(function(){return Ho})),n.d(t,"LocalAutosaveMonitor",(function(){return Ko})),n.d(t,"PageAttributesCheck",(function(){return $o})),n.d(t,"PageAttributesOrder",(function(){return Xo})),n.d(t,"PageAttributesParent",(function(){return sr})),n.d(t,"PageTemplate",(function(){return ir})),n.d(t,"PostAuthor",(function(){return lr})),n.d(t,"PostAuthorCheck",(function(){return ur})),n.d(t,"PostComments",(function(){return dr})),n.d(t,"PostExcerpt",(function(){return pr})),n.d(t,"PostExcerptCheck",(function(){return br})),n.d(t,"PostFeaturedImage",(function(){return yr})),n.d(t,"PostFeaturedImageCheck",(function(){return hr})),n.d(t,"PostFormat",(function(){return Er})),n.d(t,"PostFormatCheck",(function(){return wr})),n.d(t,"PostLastRevision",(function(){return Tr})),n.d(t,"PostLastRevisionCheck",(function(){return kr})),n.d(t,"PostLockedModal",(function(){return Br})),n.d(t,"PostPendingStatus",(function(){return Ir})),n.d(t,"PostPendingStatusCheck",(function(){return Ar})),n.d(t,"PostPingbacks",(function(){return Rr})),n.d(t,"PostPreviewButton",(function(){return xr})),n.d(t,"PostPublishButton",(function(){return Lr})),n.d(t,"PostPublishButtonLabel",(function(){return Nr})),n.d(t,"PostPublishPanel",(function(){return ds})),n.d(t,"PostSavedState",(function(){return gs})),n.d(t,"PostSchedule",(function(){return Gr})),n.d(t,"PostScheduleCheck",(function(){return Os})),n.d(t,"PostScheduleLabel",(function(){return qr})),n.d(t,"PostSlug",(function(){return _s})),n.d(t,"PostSlugCheck",(function(){return js})),n.d(t,"PostSticky",(function(){return ws})),n.d(t,"PostStickyCheck",(function(){return ys})),n.d(t,"PostSwitchToDraftButton",(function(){return fs})),n.d(t,"PostTaxonomies",(function(){return ks})),n.d(t,"PostTaxonomiesCheck",(function(){return Ts})),n.d(t,"PostTextEditor",(function(){return Bs})),n.d(t,"PostTitle",(function(){return Is})),n.d(t,"PostTrash",(function(){return Rs})),n.d(t,"PostTrashCheck",(function(){return Ns})),n.d(t,"PostTypeSupportCheck",(function(){return Qo})),n.d(t,"PostVisibility",(function(){return Vr})),n.d(t,"PostVisibilityLabel",(function(){return Hr})),n.d(t,"PostVisibilityCheck",(function(){return Ds})),n.d(t,"TableOfContents",(function(){return Vs})),n.d(t,"UnsavedChangesWarning",(function(){return Hs})),n.d(t,"WordCount",(function(){return Fs})),n.d(t,"EditorProvider",(function(){return Qs})),n.d(t,"ServerSideRender",(function(){return Xs.a})),n.d(t,"RichText",(function(){return ei})),n.d(t,"Autocomplete",(function(){return ti})),n.d(t,"AlignmentToolbar",(function(){return ni})),n.d(t,"BlockAlignmentToolbar",(function(){return oi})),n.d(t,"BlockControls",(function(){return ri})),n.d(t,"BlockEdit",(function(){return si})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return ii})),n.d(t,"BlockFormatControls",(function(){return ci})),n.d(t,"BlockIcon",(function(){return ai})),n.d(t,"BlockInspector",(function(){return li})),n.d(t,"BlockList",(function(){return ui})),n.d(t,"BlockMover",(function(){return di})),n.d(t,"BlockNavigationDropdown",(function(){return pi})),n.d(t,"BlockSelectionClearer",(function(){return bi})),n.d(t,"BlockSettingsMenu",(function(){return mi})),n.d(t,"BlockTitle",(function(){return hi})),n.d(t,"BlockToolbar",(function(){return fi})),n.d(t,"ColorPalette",(function(){return gi})),n.d(t,"ContrastChecker",(function(){return Oi})),n.d(t,"CopyHandler",(function(){return ji})),n.d(t,"DefaultBlockAppender",(function(){return vi})),n.d(t,"FontSizePicker",(function(){return _i})),n.d(t,"Inserter",(function(){return yi})),n.d(t,"InnerBlocks",(function(){return wi})),n.d(t,"InspectorAdvancedControls",(function(){return Si})),n.d(t,"InspectorControls",(function(){return Ei})),n.d(t,"PanelColorSettings",(function(){return Pi})),n.d(t,"PlainText",(function(){return ki})),n.d(t,"RichTextShortcut",(function(){return Ti})),n.d(t,"RichTextToolbarButton",(function(){return Ci})),n.d(t,"__unstableRichTextInputEvent",(function(){return xi})),n.d(t,"MediaPlaceholder",(function(){return Bi})),n.d(t,"MediaUpload",(function(){return Ai})),n.d(t,"MediaUploadCheck",(function(){return Ii})),n.d(t,"MultiSelectScrollIntoView",(function(){return Ri})),n.d(t,"NavigableToolbar",(function(){return Ni})),n.d(t,"ObserveTyping",(function(){return Di})),n.d(t,"PreserveScrollInReorder",(function(){return Li})),n.d(t,"SkipToSelectedBlock",(function(){return Ui})),n.d(t,"URLInput",(function(){return Fi})),n.d(t,"URLInputButton",(function(){return Mi})),n.d(t,"URLPopover",(function(){return zi})),n.d(t,"Warning",(function(){return Vi})),n.d(t,"WritingFlow",(function(){return Hi})),n.d(t,"createCustomColorsHOC",(function(){return Wi})),n.d(t,"getColorClassName",(function(){return Gi})),n.d(t,"getColorObjectByAttributeValues",(function(){return qi})),n.d(t,"getColorObjectByColorValue",(function(){return Ki})),n.d(t,"getFontSize",(function(){return $i})),n.d(t,"getFontSizeClass",(function(){return Qi})),n.d(t,"withColorContext",(function(){return Yi})),n.d(t,"withColors",(function(){return Xi})),n.d(t,"withFontSizes",(function(){return Ji})),n.d(t,"mediaUpload",(function(){return Ks})),n.d(t,"cleanForSlug",(function(){return N})),n.d(t,"transformStyles",(function(){return s.transformStyles}));var o={};n.r(o),n.d(o,"hasEditorUndo",(function(){return V})),n.d(o,"hasEditorRedo",(function(){return H})),n.d(o,"isEditedPostNew",(function(){return W})),n.d(o,"hasChangedContent",(function(){return G})),n.d(o,"isEditedPostDirty",(function(){return q})),n.d(o,"hasNonPostEntityChanges",(function(){return K})),n.d(o,"isCleanNewPost",(function(){return $})),n.d(o,"getCurrentPost",(function(){return Q})),n.d(o,"getCurrentPostType",(function(){return Y})),n.d(o,"getCurrentPostId",(function(){return X})),n.d(o,"getCurrentPostRevisionsCount",(function(){return J})),n.d(o,"getCurrentPostLastRevisionId",(function(){return Z})),n.d(o,"getPostEdits",(function(){return ee})),n.d(o,"getReferenceByDistinctEdits",(function(){return te})),n.d(o,"getCurrentPostAttribute",(function(){return ne})),n.d(o,"getEditedPostAttribute",(function(){return oe})),n.d(o,"getAutosaveAttribute",(function(){return re})),n.d(o,"getEditedPostVisibility",(function(){return se})),n.d(o,"isCurrentPostPending",(function(){return ie})),n.d(o,"isCurrentPostPublished",(function(){return ce})),n.d(o,"isCurrentPostScheduled",(function(){return ae})),n.d(o,"isEditedPostPublishable",(function(){return le})),n.d(o,"isEditedPostSaveable",(function(){return ue})),n.d(o,"isEditedPostEmpty",(function(){return de})),n.d(o,"isEditedPostAutosaveable",(function(){return pe})),n.d(o,"getAutosave",(function(){return be})),n.d(o,"hasAutosave",(function(){return me})),n.d(o,"isEditedPostBeingScheduled",(function(){return he})),n.d(o,"isEditedPostDateFloating",(function(){return fe})),n.d(o,"isSavingPost",(function(){return ge})),n.d(o,"didPostSaveRequestSucceed",(function(){return Oe})),n.d(o,"didPostSaveRequestFail",(function(){return je})),n.d(o,"isAutosavingPost",(function(){return ve})),n.d(o,"isPreviewingPost",(function(){return _e})),n.d(o,"getEditedPostPreviewLink",(function(){return ye})),n.d(o,"getSuggestedPostFormat",(function(){return we})),n.d(o,"getBlocksForSerialization",(function(){return Se})),n.d(o,"getEditedPostContent",(function(){return Ee})),n.d(o,"isPublishingPost",(function(){return Pe})),n.d(o,"isPermalinkEditable",(function(){return ke})),n.d(o,"getPermalink",(function(){return Te})),n.d(o,"getEditedPostSlug",(function(){return Ce})),n.d(o,"getPermalinkParts",(function(){return xe})),n.d(o,"isPostLocked",(function(){return Be})),n.d(o,"isPostSavingLocked",(function(){return Ae})),n.d(o,"isPostAutosavingLocked",(function(){return Ie})),n.d(o,"isPostLockTakeover",(function(){return Re})),n.d(o,"getPostLockUser",(function(){return Ne})),n.d(o,"getActivePostLock",(function(){return De})),n.d(o,"canUserUseUnfilteredHTML",(function(){return Le})),n.d(o,"isPublishSidebarEnabled",(function(){return Ue})),n.d(o,"getEditorBlocks",(function(){return Fe})),n.d(o,"getEditorSelectionStart",(function(){return Me})),n.d(o,"getEditorSelectionEnd",(function(){return ze})),n.d(o,"getEditorSelection",(function(){return Ve})),n.d(o,"__unstableIsEditorReady",(function(){return He})),n.d(o,"getEditorSettings",(function(){return We})),n.d(o,"getStateBeforeOptimisticTransaction",(function(){return Ge})),n.d(o,"inSomeHistory",(function(){return qe})),n.d(o,"getBlockName",(function(){return $e})),n.d(o,"isBlockValid",(function(){return Qe})),n.d(o,"getBlockAttributes",(function(){return Ye})),n.d(o,"getBlock",(function(){return Xe})),n.d(o,"getBlocks",(function(){return Je})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return Ze})),n.d(o,"getClientIdsOfDescendants",(function(){return et})),n.d(o,"getClientIdsWithDescendants",(function(){return tt})),n.d(o,"getGlobalBlockCount",(function(){return nt})),n.d(o,"getBlocksByClientId",(function(){return ot})),n.d(o,"getBlockCount",(function(){return rt})),n.d(o,"getBlockSelectionStart",(function(){return st})),n.d(o,"getBlockSelectionEnd",(function(){return it})),n.d(o,"getSelectedBlockCount",(function(){return ct})),n.d(o,"hasSelectedBlock",(function(){return at})),n.d(o,"getSelectedBlockClientId",(function(){return lt})),n.d(o,"getSelectedBlock",(function(){return ut})),n.d(o,"getBlockRootClientId",(function(){return dt})),n.d(o,"getBlockHierarchyRootClientId",(function(){return pt})),n.d(o,"getAdjacentBlockClientId",(function(){return bt})),n.d(o,"getPreviousBlockClientId",(function(){return mt})),n.d(o,"getNextBlockClientId",(function(){return ht})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return ft})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return gt})),n.d(o,"getMultiSelectedBlocks",(function(){return Ot})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return jt})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return vt})),n.d(o,"isFirstMultiSelectedBlock",(function(){return _t})),n.d(o,"isBlockMultiSelected",(function(){return yt})),n.d(o,"isAncestorMultiSelected",(function(){return wt})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return St})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Et})),n.d(o,"getBlockOrder",(function(){return Pt})),n.d(o,"getBlockIndex",(function(){return kt})),n.d(o,"isBlockSelected",(function(){return Tt})),n.d(o,"hasSelectedInnerBlock",(function(){return Ct})),n.d(o,"isBlockWithinSelection",(function(){return xt})),n.d(o,"hasMultiSelection",(function(){return Bt})),n.d(o,"isMultiSelecting",(function(){return At})),n.d(o,"isSelectionEnabled",(function(){return It})),n.d(o,"getBlockMode",(function(){return Rt})),n.d(o,"isTyping",(function(){return Nt})),n.d(o,"isCaretWithinFormattedText",(function(){return Dt})),n.d(o,"getBlockInsertionPoint",(function(){return Lt})),n.d(o,"isBlockInsertionPointVisible",(function(){return Ut})),n.d(o,"isValidTemplate",(function(){return Ft})),n.d(o,"getTemplate",(function(){return Mt})),n.d(o,"getTemplateLock",(function(){return zt})),n.d(o,"canInsertBlockType",(function(){return Vt})),n.d(o,"getInserterItems",(function(){return Ht})),n.d(o,"hasInserterItems",(function(){return Wt})),n.d(o,"getBlockListSettings",(function(){return Gt})),n.d(o,"__experimentalGetDefaultTemplateTypes",(function(){return qt})),n.d(o,"__experimentalGetDefaultTemplatePartAreas",(function(){return Kt})),n.d(o,"__experimentalGetDefaultTemplateType",(function(){return $t})),n.d(o,"__experimentalGetTemplateInfo",(function(){return Qt}));var r={};n.r(r),n.d(r,"setupEditor",(function(){return Jt})),n.d(r,"__experimentalTearDownEditor",(function(){return Zt})),n.d(r,"resetPost",(function(){return en})),n.d(r,"resetAutosave",(function(){return tn})),n.d(r,"__experimentalRequestPostUpdateStart",(function(){return nn})),n.d(r,"__experimentalRequestPostUpdateFinish",(function(){return on})),n.d(r,"updatePost",(function(){return rn})),n.d(r,"setupEditorState",(function(){return sn})),n.d(r,"editPost",(function(){return cn})),n.d(r,"savePost",(function(){return an})),n.d(r,"refreshPost",(function(){return ln})),n.d(r,"trashPost",(function(){return un})),n.d(r,"autosave",(function(){return dn})),n.d(r,"redo",(function(){return pn})),n.d(r,"undo",(function(){return bn})),n.d(r,"createUndoLevel",(function(){return mn})),n.d(r,"updatePostLock",(function(){return hn})),n.d(r,"enablePublishSidebar",(function(){return fn})),n.d(r,"disablePublishSidebar",(function(){return gn})),n.d(r,"lockPostSaving",(function(){return On})),n.d(r,"unlockPostSaving",(function(){return jn})),n.d(r,"lockPostAutosaving",(function(){return vn})),n.d(r,"unlockPostAutosaving",(function(){return _n})),n.d(r,"resetEditorBlocks",(function(){return yn})),n.d(r,"updateEditorSettings",(function(){return wn})),n.d(r,"resetBlocks",(function(){return En})),n.d(r,"receiveBlocks",(function(){return Pn})),n.d(r,"updateBlock",(function(){return kn})),n.d(r,"updateBlockAttributes",(function(){return Tn})),n.d(r,"selectBlock",(function(){return Cn})),n.d(r,"startMultiSelect",(function(){return xn})),n.d(r,"stopMultiSelect",(function(){return Bn})),n.d(r,"multiSelect",(function(){return An})),n.d(r,"clearSelectedBlock",(function(){return In})),n.d(r,"toggleSelection",(function(){return Rn})),n.d(r,"replaceBlocks",(function(){return Nn})),n.d(r,"replaceBlock",(function(){return Dn})),n.d(r,"moveBlocksDown",(function(){return Ln})),n.d(r,"moveBlocksUp",(function(){return Un})),n.d(r,"moveBlockToPosition",(function(){return Fn})),n.d(r,"insertBlock",(function(){return Mn})),n.d(r,"insertBlocks",(function(){return zn})),n.d(r,"showInsertionPoint",(function(){return Vn})),n.d(r,"hideInsertionPoint",(function(){return Hn})),n.d(r,"setTemplateValidity",(function(){return Wn})),n.d(r,"synchronizeTemplate",(function(){return Gn})),n.d(r,"mergeBlocks",(function(){return qn})),n.d(r,"removeBlocks",(function(){return Kn})),n.d(r,"removeBlock",(function(){return $n})),n.d(r,"toggleBlockMode",(function(){return Qn})),n.d(r,"startTyping",(function(){return Yn})),n.d(r,"stopTyping",(function(){return Xn})),n.d(r,"enterFormattedText",(function(){return Jn})),n.d(r,"exitFormattedText",(function(){return Zn})),n.d(r,"insertDefaultBlock",(function(){return eo})),n.d(r,"updateBlockListSettings",(function(){return to}));var s=n("@wordpress/block-editor"),i=n("@wordpress/core-data"),c=n("@wordpress/rich-text"),a=n("./node_modules/@babel/runtime/helpers/esm/extends.js"),l=n("@wordpress/element"),u=n("lodash"),d=n("@wordpress/blocks"),p=n("@wordpress/data"),b=n("@wordpress/compose"),m=n("@wordpress/hooks");function h(e){const t=Object(u.mapValues)(Object(u.pickBy)(e.attributes,{source:"meta"}),"meta");return Object(u.isEmpty)(t)||(e.edit=(e=>Object(b.createHigherOrderComponent)(t=>({attributes:n,setAttributes:o,...r})=>{const s=Object(p.useSelect)(e=>e("core/editor").getCurrentPostType(),[]),[c,d]=Object(i.useEntityProp)("postType",s,"meta"),b=Object(l.useMemo)(()=>({...n,...Object(u.mapValues)(e,e=>c[e])}),[n,c]);return Object(l.createElement)(t,Object(a.a)({attributes:b,setAttributes:t=>{const n=Object(u.mapKeys)(Object(u.pickBy)(t,(t,n)=>e[n]),(t,n)=>e[n]);Object(u.isEmpty)(n)||d(n),o(t)}},r))},"withMetaAttributeSource"))(t)(e.edit)),e}Object(m.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",h),Object(p.select)(d.store).getBlockTypes().map(({name:e})=>Object(p.select)(d.store).getBlockType(e)).forEach(h);var f=n("@wordpress/api-fetch"),g=n.n(f),O={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options(e){let t="";return e&&(t="?search="+encodeURIComponent(e)),g()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:e=>[e.slug,e.name],getOptionLabel:e=>[e.avatar_urls&&e.avatar_urls[24]?Object(l.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):Object(l.createElement)("span",{className:"editor-autocompleters__no-avatar"}),Object(l.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(l.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)],getOptionCompletion:e=>"@"+e.slug};Object(m.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push(Object(u.clone)(O)),e}));var j=n("@wordpress/data-controls");const v={insertUsage:{},isPublishSidebarEnabled:!0},_={...s.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1,supportsLayout:!0};function y(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}var w=Object(p.combineReducers)({postId:function(e=null,t){switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.id}return e},postType:function(e=null,t){switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.type}return e},preferences:function(e=v,t){switch(t.type){case"ENABLE_PUBLISH_SIDEBAR":return{...e,isPublishSidebarEnabled:!0};case"DISABLE_PUBLISH_SIDEBAR":return{...e,isPublishSidebarEnabled:!1}}return e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},postLock:function(e={isLocked:!1},t){switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},template:function(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":return Object(u.omit)(e,t.lockName)}return e},isReady:function(e=!1,t){switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(e=_,t){switch(t.type){case"UPDATE_EDITOR_SETTINGS":return{...e,...t.settings}}return e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":return Object(u.omit)(e,t.lockName)}return e}}),S=n("./node_modules/rememo/es/rememo.js"),E=n("@wordpress/date"),P=n("@wordpress/url"),k=n("@wordpress/deprecated"),T=n.n(k),C=n("./node_modules/@wordpress/icons/build-module/library/layout.js");const x=new Set(["meta"]),B="core/editor",A=/%(?:postname|pagename)%/,I=["title","excerpt","content"];function R(e,t){return Object(P.addQueryArgs)(e,t)}function N(e){return e?Object(u.trim)(Object(u.deburr)(e).replace(/[\s\./]+/g,"-").replace(/[^\w-]+/g,"").toLowerCase(),"-"):""}var D=n("@wordpress/primitives");var L=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var U=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var F=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));const M={},z=[],V=Object(p.createRegistrySelector)(e=>()=>e("core").hasUndo()),H=Object(p.createRegistrySelector)(e=>()=>e("core").hasRedo());function W(e){return"auto-draft"===Q(e).status}function G(e){const t=ee(e);return"blocks"in t||"content"in t}const q=Object(p.createRegistrySelector)(e=>t=>{const n=Y(t),o=X(t);return!!e("core").hasEditsForEntityRecord("postType",n,o)}),K=Object(p.createRegistrySelector)(e=>t=>{const n=e("core").__experimentalGetDirtyEntityRecords(),{type:o,id:r}=Q(t);return Object(u.some)(n,e=>"postType"!==e.kind||e.name!==o||e.key!==r)});function $(e){return!q(e)&&W(e)}const Q=Object(p.createRegistrySelector)(e=>t=>{const n=X(t),o=Y(t),r=e("core").getRawEntityRecord("postType",o,n);return r||M});function Y(e){return e.postType}function X(e){return e.postId}function J(e){return Object(u.get)(Q(e),["_links","version-history",0,"count"],0)}function Z(e){return Object(u.get)(Q(e),["_links","predecessor-version",0,"id"],null)}const ee=Object(p.createRegistrySelector)(e=>t=>{const n=Y(t),o=X(t);return e("core").getEntityRecordEdits("postType",n,o)||M}),te=Object(p.createRegistrySelector)(e=>()=>(T()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`",{since:"5.4",alternative:"`wp.data.select( 'core' ).getReferenceByDistinctEdits`"}),e("core").getReferenceByDistinctEdits()));function ne(e,t){switch(t){case"type":return Y(e);case"id":return X(e);default:const n=Q(e);if(!n.hasOwnProperty(t))break;return y(n[t])}}function oe(e,t){switch(t){case"content":return Ee(e)}const n=ee(e);return n.hasOwnProperty(t)?x.has(t)?((e,t)=>{const n=ee(e);return n.hasOwnProperty(t)?{...ne(e,t),...n[t]}:ne(e,t)})(e,t):n[t]:ne(e,t)}const re=Object(p.createRegistrySelector)(e=>(t,n)=>{if(!Object(u.includes)(I,n)&&"preview_link"!==n)return;const o=Y(t),r=X(t),s=Object(u.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(o,r,s);return i?y(i[n]):void 0});function se(e){if("private"===oe(e,"status"))return"private";return oe(e,"password")?"password":"public"}function ie(e){return"pending"===Q(e).status}function ce(e,t){const n=t||Q(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!Object(E.isInTheFuture)(new Date(Number(Object(E.getDate)(n.date))-6e4))}function ae(e){return"future"===Q(e).status&&!ce(e)}function le(e){const t=Q(e);return q(e)||-1===["publish","private","future"].indexOf(t.status)}function ue(e){return!ge(e)&&(!!oe(e,"title")||!!oe(e,"excerpt")||!de(e)||"native"===l.Platform.OS)}function de(e){const t=Fe(e);if(t.length){if(t.length>1)return!1;const e=t[0].name;if(e!==Object(d.getDefaultBlockName)()&&e!==Object(d.getFreeformContentHandlerName)())return!1}return!Ee(e)}const pe=Object(p.createRegistrySelector)(e=>t=>{if(!ue(t))return!1;if(Ie(t))return!1;const n=Y(t),o=X(t),r=e("core").hasFetchedAutosaves(n,o),s=Object(u.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,o,s);return!!r&&(!i||(!!G(t)||["title","excerpt"].some(e=>y(i[e])!==oe(t,e))))}),be=Object(p.createRegistrySelector)(e=>t=>{T()("`wp.data.select( 'core/editor' ).getAutosave()`",{since:"5.3",alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`"});const n=Y(t),o=X(t),r=Object(u.get)(e("core").getCurrentUser(),["id"]),s=e("core").getAutosave(n,o,r);return Object(u.mapValues)(Object(u.pick)(s,I),y)}),me=Object(p.createRegistrySelector)(e=>t=>{T()("`wp.data.select( 'core/editor' ).hasAutosave()`",{since:"5.3",alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`"});const n=Y(t),o=X(t),r=Object(u.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,o,r)});function he(e){const t=oe(e,"date"),n=new Date(Number(Object(E.getDate)(t))-6e4);return Object(E.isInTheFuture)(n)}function fe(e){const t=oe(e,"date"),n=oe(e,"modified"),o=Q(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===n||null===t)}const ge=Object(p.createRegistrySelector)(e=>t=>{const n=Y(t),o=X(t);return e("core").isSavingEntityRecord("postType",n,o)}),Oe=Object(p.createRegistrySelector)(e=>t=>{const n=Y(t),o=X(t);return!e("core").getLastEntitySaveError("postType",n,o)}),je=Object(p.createRegistrySelector)(e=>t=>{const n=Y(t),o=X(t);return!!e("core").getLastEntitySaveError("postType",n,o)});function ve(e){return!!ge(e)&&!!Object(u.get)(e.saving,["options","isAutosave"])}function _e(e){return!!ge(e)&&!!e.saving.options.isPreview}function ye(e){if(e.saving.pending||ge(e))return;let t=re(e,"preview_link");t||(t=oe(e,"link"),t&&(t=Object(P.addQueryArgs)(t,{preview:!0})));const n=oe(e,"featured_media");return t&&n?Object(P.addQueryArgs)(t,{_thumbnail_id:n}):t}function we(e){const t=Fe(e);if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){var o;const e=null===(o=t[0].attributes)||void 0===o?void 0:o.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}function Se(e){T()("`core/editor` getBlocksForSerialization selector",{since:"5.3",alternative:"getEditorBlocks",hint:"Blocks serialization pre-processing occurs at save time"});const t=e.editor.present.blocks.value;return 1===t.length&&Object(d.isUnmodifiedDefaultBlock)(t[0])?[]:t}const Ee=Object(p.createRegistrySelector)(e=>t=>{const n=X(t),o=Y(t),r=e("core").getEditedEntityRecord("postType",o,n);if(r){if("function"==typeof r.content)return r.content(r);if(r.blocks)return Object(d.__unstableSerializeAndClean)(r.blocks);if(r.content)return r.content}return""});function Pe(e){return ge(e)&&!ce(e)&&"publish"===oe(e,"status")}function ke(e){const t=oe(e,"permalink_template");return A.test(t)}function Te(e){const t=xe(e);if(!t)return null;const{prefix:n,postName:o,suffix:r}=t;return ke(e)?n+o+r:n}function Ce(e){return oe(e,"slug")||N(oe(e,"title"))||X(e)}function xe(e){const t=oe(e,"permalink_template");if(!t)return null;const n=oe(e,"slug")||oe(e,"generated_slug"),[o,r]=t.split(A);return{prefix:o,postName:n,suffix:r}}function Be(e){return e.postLock.isLocked}function Ae(e){return Object.keys(e.postSavingLock).length>0}function Ie(e){return Object.keys(e.postAutosavingLock).length>0}function Re(e){return e.postLock.isTakeover}function Ne(e){return e.postLock.user}function De(e){return e.postLock.activePostLock}function Le(e){return Object(u.has)(Q(e),["_links","wp:action-unfiltered-html"])}function Ue(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:v.isPublishSidebarEnabled}function Fe(e){return oe(e,"blocks")||z}function Me(e){var t;return T()("select('core/editor').getEditorSelectionStart",{since:"10.0",plugin:"Gutenberg",alternative:"select('core/editor').getEditorSelection"}),null===(t=oe(e,"selection"))||void 0===t?void 0:t.selectionStart}function ze(e){var t;return T()("select('core/editor').getEditorSelectionStart",{since:"10.0",plugin:"Gutenberg",alternative:"select('core/editor').getEditorSelection"}),null===(t=oe(e,"selection"))||void 0===t?void 0:t.selectionEnd}function Ve(e){return oe(e,"selection")}function He(e){return e.isReady}function We(e){return e.editorSettings}function Ge(){return T()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function qe(){return T()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function Ke(e){return Object(p.createRegistrySelector)(t=>(n,...o)=>(T()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`"}),t("core/block-editor")[e](...o)))}const $e=Ke("getBlockName"),Qe=Ke("isBlockValid"),Ye=Ke("getBlockAttributes"),Xe=Ke("getBlock"),Je=Ke("getBlocks"),Ze=Ke("__unstableGetBlockWithoutInnerBlocks"),et=Ke("getClientIdsOfDescendants"),tt=Ke("getClientIdsWithDescendants"),nt=Ke("getGlobalBlockCount"),ot=Ke("getBlocksByClientId"),rt=Ke("getBlockCount"),st=Ke("getBlockSelectionStart"),it=Ke("getBlockSelectionEnd"),ct=Ke("getSelectedBlockCount"),at=Ke("hasSelectedBlock"),lt=Ke("getSelectedBlockClientId"),ut=Ke("getSelectedBlock"),dt=Ke("getBlockRootClientId"),pt=Ke("getBlockHierarchyRootClientId"),bt=Ke("getAdjacentBlockClientId"),mt=Ke("getPreviousBlockClientId"),ht=Ke("getNextBlockClientId"),ft=Ke("getSelectedBlocksInitialCaretPosition"),gt=Ke("getMultiSelectedBlockClientIds"),Ot=Ke("getMultiSelectedBlocks"),jt=Ke("getFirstMultiSelectedBlockClientId"),vt=Ke("getLastMultiSelectedBlockClientId"),_t=Ke("isFirstMultiSelectedBlock"),yt=Ke("isBlockMultiSelected"),wt=Ke("isAncestorMultiSelected"),St=Ke("getMultiSelectedBlocksStartClientId"),Et=Ke("getMultiSelectedBlocksEndClientId"),Pt=Ke("getBlockOrder"),kt=Ke("getBlockIndex"),Tt=Ke("isBlockSelected"),Ct=Ke("hasSelectedInnerBlock"),xt=Ke("isBlockWithinSelection"),Bt=Ke("hasMultiSelection"),At=Ke("isMultiSelecting"),It=Ke("isSelectionEnabled"),Rt=Ke("getBlockMode"),Nt=Ke("isTyping"),Dt=Ke("isCaretWithinFormattedText"),Lt=Ke("getBlockInsertionPoint"),Ut=Ke("isBlockInsertionPointVisible"),Ft=Ke("isValidTemplate"),Mt=Ke("getTemplate"),zt=Ke("getTemplateLock"),Vt=Ke("canInsertBlockType"),Ht=Ke("getInserterItems"),Wt=Ke("hasInserterItems"),Gt=Ke("getBlockListSettings");function qt(e){var t;return null===(t=We(e))||void 0===t?void 0:t.defaultTemplateTypes}const Kt=Object(S.a)(e=>{var t;const n=(null===(t=We(e))||void 0===t?void 0:t.defaultTemplatePartAreas)||[];return null==n?void 0:n.map(e=>{return{...e,icon:(t=e.icon,"header"===t?L:"footer"===t?U:"sidebar"===t?F:C.a)};var t})},e=>{var t;return[null===(t=We(e))||void 0===t?void 0:t.defaultTemplatePartAreas]}),$t=Object(S.a)((e,t)=>Object(u.find)(qt(e),{slug:t})||{},(e,t)=>[qt(e),t]);function Qt(e,t){var n;if(!t)return{};const{excerpt:o,slug:r,title:s,area:i}=t,{title:c,description:a}=$t(e,r),l=Object(u.isString)(s)?s:null==s?void 0:s.rendered;return{title:l&&l!==r?l:c||r,description:(Object(u.isString)(o)?o:null==o?void 0:o.raw)||a,icon:(null===(n=Kt(e).find(e=>i===e.area))||void 0===n?void 0:n.icon)||C.a}}var Yt=n("@wordpress/notices"),Xt=n("@wordpress/i18n");function*Jt(e,t,n){let o;o=Object(u.has)(t,["content"])?t.content:e.content.raw;let r=Object(d.parse)(o);"auto-draft"===e.status&&n&&(r=Object(d.synchronizeBlocksWithTemplate)(r,n)),yield en(e),yield{type:"SETUP_EDITOR",post:e,edits:t,template:n},yield yn(r,{__unstableShouldCreateUndoLevel:!1}),yield sn(e),t&&Object.keys(t).some(n=>t[n]!==(Object(u.has)(e,[n,"raw"])?e[n].raw:e[n]))&&(yield cn(t))}function Zt(){return{type:"TEAR_DOWN_EDITOR"}}function en(e){return{type:"RESET_POST",post:e}}function*tn(e){T()("resetAutosave action (`core/editor` store)",{since:"5.3",alternative:"receiveAutosaves action (`core` store)"});const t=yield p.controls.select(B,"getCurrentPostId");return yield p.controls.dispatch("core","receiveAutosaves",t,e),{type:"__INERT__"}}function nn(e={}){return{type:"REQUEST_POST_UPDATE_START",options:e}}function on(e={}){return{type:"REQUEST_POST_UPDATE_FINISH",options:e}}function rn(){return T()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"User the core entitires store instead"}),{type:"DO_NOTHING"}}function sn(e){return{type:"SETUP_EDITOR_STATE",post:e}}function*cn(e,t){const{id:n,type:o}=yield p.controls.select(B,"getCurrentPost");yield p.controls.dispatch("core","editEntityRecord","postType",o,n,e,t)}function*an(e={}){if(!(yield p.controls.select(B,"isEditedPostSaveable")))return;let t={content:yield p.controls.select(B,"getEditedPostContent")};e.isAutosave||(yield p.controls.dispatch(B,"editPost",t,{undoIgnore:!0})),yield nn(e);const n=yield p.controls.select(B,"getCurrentPost");t={id:n.id,...yield p.controls.select("core","getEntityRecordNonTransientEdits","postType",n.type,n.id),...t},yield p.controls.dispatch("core","saveEntityRecord","postType",n.type,t,e),yield on(e);const o=yield p.controls.select("core","getLastEntitySaveError","postType",n.type,n.id);if(o){const e=function(e){const{post:t,edits:n,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const r=["publish","private","future"],s=-1!==r.indexOf(t.status),i={publish:Object(Xt.__)("Publishing failed."),private:Object(Xt.__)("Publishing failed."),future:Object(Xt.__)("Scheduling failed.")};let c=s||-1===r.indexOf(n.status)?Object(Xt.__)("Updating failed."):i[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(c=[c,o.message].join(" ")),[c,{id:"SAVE_POST_NOTICE_ID"}]}({post:n,edits:t,error:o});e.length&&(yield p.controls.dispatch(Yt.store,"createErrorNotice",...e))}else{const t=yield p.controls.select(B,"getCurrentPost"),o=function(e){const{previousPost:t,post:n,postType:o}=e;if(Object(u.get)(e.options,["isAutosave"]))return[];const r=["publish","private","future"],s=Object(u.includes)(r,t.status),i=Object(u.includes)(r,n.status);let c,a=Object(u.get)(o,["viewable"],!1);if(s||i?s&&!i?(c=o.labels.item_reverted_to_draft,a=!1):c=!s&&i?{publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[n.status]:o.labels.item_updated:c=null,c){const e=[];return a&&e.push({label:o.labels.view_item,url:n.link}),[c,{id:"SAVE_POST_NOTICE_ID",type:"snackbar",actions:e}]}return[]}({previousPost:n,post:t,postType:yield p.controls.resolveSelect("core","getPostType",t.type),options:e});o.length&&(yield p.controls.dispatch(Yt.store,"createSuccessNotice",...o)),e.isAutosave||(yield p.controls.dispatch("core/block-editor","__unstableMarkLastChangeAsPersistent"))}}function*ln(){const e=yield p.controls.select(B,"getCurrentPost"),t=yield p.controls.select(B,"getCurrentPostType"),n=yield p.controls.resolveSelect("core","getPostType",t),o=yield Object(j.apiFetch)({path:`/wp/v2/${n.rest_base}/${e.id}?context=edit&_timestamp=`+Date.now()});yield p.controls.dispatch(B,"resetPost",o)}function*un(){const e=yield p.controls.select(B,"getCurrentPostType"),t=yield p.controls.resolveSelect("core","getPostType",e);yield p.controls.dispatch(Yt.store,"removeNotice","TRASH_POST_NOTICE_ID");try{const e=yield p.controls.select(B,"getCurrentPost");yield Object(j.apiFetch)({path:`/wp/v2/${t.rest_base}/${e.id}`,method:"DELETE"}),yield p.controls.dispatch(B,"savePost")}catch(e){yield p.controls.dispatch(Yt.store,"createErrorNotice",...(n={error:e},[n.error.message&&"unknown_error"!==n.error.code?n.error.message:Object(Xt.__)("Trashing failed"),{id:"TRASH_POST_NOTICE_ID"}]))}var n}function*dn({local:e=!1,...t}={}){if(e){const e=yield p.controls.select(B,"getCurrentPost"),t=yield p.controls.select(B,"isEditedPostNew"),n=yield p.controls.select(B,"getEditedPostAttribute","title"),o=yield p.controls.select(B,"getEditedPostAttribute","content"),r=yield p.controls.select(B,"getEditedPostAttribute","excerpt");yield{type:"LOCAL_AUTOSAVE_SET",postId:e.id,isPostNew:t,title:n,content:o,excerpt:r}}else yield p.controls.dispatch(B,"savePost",{isAutosave:!0,...t})}function*pn(){yield p.controls.dispatch("core","redo")}function*bn(){yield p.controls.dispatch("core","undo")}function mn(){return{type:"CREATE_UNDO_LEVEL"}}function hn(e){return{type:"UPDATE_POST_LOCK",lock:e}}function fn(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function gn(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function On(e){return{type:"LOCK_POST_SAVING",lockName:e}}function jn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function vn(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function _n(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function*yn(e,t={}){const{__unstableShouldCreateUndoLevel:n,selection:o}=t,r={blocks:e,selection:o};if(!1!==n){const{id:e,type:t}=yield p.controls.select(B,"getCurrentPost");if((yield p.controls.select("core","getEditedEntityRecord","postType",t,e)).blocks===r.blocks)return yield p.controls.dispatch("core","__unstableCreateUndoLevel","postType",t,e);r.content=({blocks:e=[]})=>Object(d.__unstableSerializeAndClean)(e)}yield*cn(r)}function wn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Sn=e=>function*(...t){T()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),yield p.controls.dispatch("core/block-editor",e,...t)},En=Sn("resetBlocks"),Pn=Sn("receiveBlocks"),kn=Sn("updateBlock"),Tn=Sn("updateBlockAttributes"),Cn=Sn("selectBlock"),xn=Sn("startMultiSelect"),Bn=Sn("stopMultiSelect"),An=Sn("multiSelect"),In=Sn("clearSelectedBlock"),Rn=Sn("toggleSelection"),Nn=Sn("replaceBlocks"),Dn=Sn("replaceBlock"),Ln=Sn("moveBlocksDown"),Un=Sn("moveBlocksUp"),Fn=Sn("moveBlockToPosition"),Mn=Sn("insertBlock"),zn=Sn("insertBlocks"),Vn=Sn("showInsertionPoint"),Hn=Sn("hideInsertionPoint"),Wn=Sn("setTemplateValidity"),Gn=Sn("synchronizeTemplate"),qn=Sn("mergeBlocks"),Kn=Sn("removeBlocks"),$n=Sn("removeBlock"),Qn=Sn("toggleBlockMode"),Yn=Sn("startTyping"),Xn=Sn("stopTyping"),Jn=Sn("enterFormattedText"),Zn=Sn("exitFormattedText"),eo=Sn("insertDefaultBlock"),to=Sn("updateBlockListSettings");function no(e,t){return"wp-autosave-block-editor-post-"+(t?"auto-draft":e)}function oo(e,t){window.sessionStorage.removeItem(no(e,t))}var ro={LOCAL_AUTOSAVE_SET({postId:e,isPostNew:t,title:n,content:o,excerpt:r}){!function(e,t,n,o,r){window.sessionStorage.setItem(no(e,t),JSON.stringify({post_title:n,content:o,excerpt:r}))}(e,t,n,o,r)}};const so={reducer:w,selectors:o,actions:r,controls:{...j.controls,...ro}},io=Object(p.createReduxStore)(B,{...so,persist:["preferences"]});Object(p.registerStore)(B,{...so,persist:["preferences"]});class co extends l.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout(()=>{this.autosaveTimerHandler()},e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}var ao=Object(b.compose)([Object(p.withSelect)((e,t)=>{const{getReferenceByDistinctEdits:n}=e("core"),{isEditedPostDirty:o,isEditedPostAutosaveable:r,isAutosavingPost:s,getEditorSettings:i}=e("core/editor"),{interval:c=i().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:r(),isAutosaving:s(),interval:c}}),Object(p.withDispatch)((e,t)=>({autosave(){const{autosave:n=e("core/editor").autosave}=t;n()}}))])(co),lo=n("./node_modules/classnames/index.js"),uo=n.n(lo);var po=({children:e,isValid:t,level:n,href:o,onSelect:r})=>Object(l.createElement)("li",{className:uo()("document-outline__item","is-"+n.toLowerCase(),{"is-invalid":!t})},Object(l.createElement)("a",{href:o,className:"document-outline__button",onClick:r},Object(l.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),Object(l.createElement)("strong",{className:"document-outline__level"},n),Object(l.createElement)("span",{className:"document-outline__item-content"},e)));const bo=Object(l.createElement)("em",null,Object(Xt.__)("(Empty heading)")),mo=[Object(l.createElement)("br",{key:"incorrect-break"}),Object(l.createElement)("em",{key:"incorrect-message"},Object(Xt.__)("(Incorrect heading level)"))],ho=[Object(l.createElement)("br",{key:"incorrect-break-h1"}),Object(l.createElement)("em",{key:"incorrect-message-h1"},Object(Xt.__)("(Your theme may already use a H1 for the post title)"))],fo=[Object(l.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(l.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(Xt.__)("(Multiple H1 headings are not recommended)"))],go=(e=[])=>Object(u.flatMap)(e,(e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:Oo(e)}:go(e.innerBlocks)),Oo=e=>!e.attributes.content||0===e.attributes.content.length;var jo=Object(b.compose)(Object(p.withSelect)(e=>{const{getBlocks:t}=e(s.store),{getEditedPostAttribute:n}=e("core/editor"),{getPostType:o}=e("core"),r=o(n("type"));return{title:n("title"),blocks:t(),isTitleSupported:Object(u.get)(r,["supports","title"],!1)}}))(({blocks:e=[],title:t,onSelect:n,isTitleSupported:o,hasOutlineItemsDisabled:r})=>{const s=go(e);if(s.length<1)return null;let i=1;const a=document.querySelector(".editor-post-title__input"),d=o&&t&&a,p=Object(u.countBy)(s,"level")[1]>1;return Object(l.createElement)("div",{className:"document-outline"},Object(l.createElement)("ul",null,d&&Object(l.createElement)(po,{level:Object(Xt.__)("Title"),isValid:!0,onSelect:n,href:"#"+a.id,isDisabled:r},t),s.map((e,t)=>{const o=e.level>i+1,s=!(e.isEmpty||o||!e.level||1===e.level&&(p||d));return i=e.level,Object(l.createElement)(po,{key:t,level:"H"+e.level,isValid:s,isDisabled:r,href:"#block-"+e.clientId,onSelect:n},e.isEmpty?bo:Object(c.getTextContent)(Object(c.create)({html:e.attributes.content})),o&&mo,1===e.level&&p&&fo,d&&1===e.level&&!p&&ho)})))});var vo=Object(p.withSelect)(e=>({blocks:e(s.store).getBlocks()}))((function({blocks:e,children:t}){return Object(u.filter)(e,e=>"core/heading"===e.name).length<1?null:t})),_o=n("@wordpress/keyboard-shortcuts");var yo=function({resetBlocksOnSave:e}){const{resetEditorBlocks:t,savePost:n}=Object(p.useDispatch)("core/editor"),{isEditedPostDirty:o,getPostEdits:r}=Object(p.useSelect)(e=>{const{isEditedPostDirty:t,getPostEdits:n}=e("core/editor");return{isEditedPostDirty:t,getPostEdits:n}},[]);return Object(_o.useShortcut)("core/editor/save",s=>{if(s.preventDefault(),o()){if(e){const e=r();if(e.content&&"string"==typeof e.content){const n=Object(d.parse)(e.content);t(n)}}n()}},{bindGlobal:!0}),null};var wo=function(){const{redo:e,undo:t}=Object(p.useDispatch)("core/editor");return Object(_o.useShortcut)("core/editor/undo",e=>{t(),e.preventDefault()},{bindGlobal:!0}),Object(_o.useShortcut)("core/editor/redo",t=>{e(),t.preventDefault()},{bindGlobal:!0}),Object(l.createElement)(l.Fragment,null,Object(l.createElement)(s.BlockEditorKeyboardShortcuts,null),Object(l.createElement)(yo,null))};function So(){return Object(l.createElement)(yo,{resetBlocksOnSave:!0})}var Eo=function(){const{registerShortcut:e}=Object(p.useDispatch)(_o.store);return Object(l.useEffect)(()=>{e({name:"core/editor/save",category:"global",description:Object(Xt.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:Object(Xt.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:Object(Xt.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})},[e]),Object(l.createElement)(s.BlockEditorKeyboardShortcuts.Register,null)},Po=n("@wordpress/components"),ko=n("@wordpress/keycodes");var To=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));var Co=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));var xo=Object(l.forwardRef)((function(e,t){const n=Object(p.useSelect)(e=>e(io).hasEditorRedo(),[]),{redo:o}=Object(p.useDispatch)(io);return Object(l.createElement)(Po.Button,Object(a.a)({},e,{ref:t,icon:Object(Xt.isRTL)()?Co:To,label:Object(Xt.__)("Redo"),shortcut:ko.displayShortcut.primaryShift("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__redo"}))}));var Bo=Object(l.forwardRef)((function(e,t){const n=Object(p.useSelect)(e=>e(io).hasEditorUndo(),[]),{undo:o}=Object(p.useDispatch)(io);return Object(l.createElement)(Po.Button,Object(a.a)({},e,{ref:t,icon:Object(Xt.isRTL)()?To:Co,label:Object(Xt.__)("Undo"),shortcut:ko.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__undo"}))}));var Ao=Object(b.compose)([Object(p.withSelect)(e=>({isValid:e(s.store).isValidTemplate()})),Object(p.withDispatch)(e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(s.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}})])((function({isValid:e,...t}){return e?null:Object(l.createElement)(Po.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:Object(Xt.__)("Keep it as is"),onClick:t.resetTemplateValidity},{label:Object(Xt.__)("Reset the template"),onClick:()=>{window.confirm(Object(Xt.__)("Resetting the template may result in loss of content, do you want to continue?"))&&t.synchronizeTemplate()}}]},Object(Xt.__)("The content of your post doesn’t match the template assigned to your post type."))}));var Io=Object(b.compose)([Object(p.withSelect)(e=>({notices:e(Yt.store).getNotices()})),Object(p.withDispatch)(e=>({onRemove:e(Yt.store).removeNotice}))])((function({notices:e,onRemove:t}){const n=Object(u.filter)(e,{isDismissible:!0,type:"default"}),o=Object(u.filter)(e,{isDismissible:!1,type:"default"}),r=Object(u.filter)(e,{type:"snackbar"});return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Po.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(l.createElement)(Po.NoticeList,{notices:n,className:"components-editor-notices__dismissible",onRemove:t},Object(l.createElement)(Ao,null)),Object(l.createElement)(Po.SnackbarList,{notices:r,className:"components-editor-notices__snackbar",onRemove:t}))})),Ro=n("./node_modules/@wordpress/icons/build-module/library/close.js");var No=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));function Do({record:e,checked:t,onChange:n,closePanel:o}){const{name:r,kind:i,title:c,key:a}=e,u=Object(p.useSelect)(e=>{var t;const{blocks:n=[]}=e("core").getEditedEntityRecord(i,r,a),o=e(s.store).getBlockParents(null===(t=n[0])||void 0===t?void 0:t.clientId);return o[o.length-1]},[]),d=Object(p.useSelect)(e=>{if("postType"!==i||"wp_template"!==r)return c;const t=e("core").getEditedEntityRecord(i,r,a);return e("core/editor").__experimentalGetTemplateInfo(t).title},[r,i,c,a]),b=Object(p.useSelect)(e=>e(s.store).getSelectedBlockClientId()===u,[u]),m=b?Object(Xt.__)("Selected"):Object(Xt.__)("Select"),{selectBlock:h}=Object(p.useDispatch)(s.store),f=Object(l.useCallback)(()=>h(u),[u]),g=Object(l.useCallback)(()=>{h(u),o()},[u]);return Object(l.createElement)(Po.PanelRow,null,Object(l.createElement)(Po.CheckboxControl,{label:Object(l.createElement)("strong",null,d||Object(Xt.__)("Untitled")),checked:t,onChange:n}),u?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Po.Button,{onClick:f,className:"entities-saved-states__find-entity",disabled:b},m),Object(l.createElement)(Po.Button,{onClick:g,className:"entities-saved-states__find-entity-small",disabled:b},m)):null)}const Lo={site:C.a,page:No};function Uo({list:e,unselectedEntities:t,setUnselectedEntities:n,closePanel:o}){const r=e[0],s=Object(p.useSelect)(e=>e(i.store).getEntity(r.kind,r.name),[r.kind,r.name]),{name:c}=r,a=Lo[c];return Object(l.createElement)(Po.PanelBody,{title:s.label,initialOpen:!0,icon:a},e.map(e=>Object(l.createElement)(Do,{key:e.key||e.property,record:e,checked:!Object(u.some)(t,t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property),onChange:t=>n(e,t),closePanel:o})))}const Fo={title:Object(Xt.__)("Title"),description:Object(Xt.__)("Tagline"),site_logo:Object(Xt.__)("Logo"),show_on_front:Object(Xt.__)("Show on front"),page_on_front:Object(Xt.__)("Page on front")};function Mo({close:e}){const t=Object(l.useRef)(),{dirtyEntityRecords:n}=Object(p.useSelect)(e=>{const t=e(i.store).__experimentalGetDirtyEntityRecords().filter(e=>!("root"===e.kind&&"site"===e.name)),n=e(i.store).getEntityRecordEdits("root","site"),o=[];for(const e in n)o.push({kind:"root",name:"site",title:Fo[e]||e,property:e});return{dirtyEntityRecords:[...t,...o]}},[]),{saveEditedEntityRecord:o,__experimentalSaveSpecifiedEntityEdits:r}=Object(p.useDispatch)(i.store),s=Object.values(Object(u.groupBy)(n,"name")),[c,d]=Object(l.useState)([]),m=({kind:e,name:t,key:n,property:o},r)=>{d(r?c.filter(r=>r.kind!==e||r.name!==t||r.key!==n||r.property!==o):[...c,{kind:e,name:t,key:n,property:o}])},h=Object(l.useCallback)(()=>e(),[e]),[f,g]=Object(b.__experimentalUseDialog)({onClose:()=>h()});return Object(l.createElement)("div",Object(a.a)({ref:f},g,{className:"entities-saved-states__panel"}),Object(l.createElement)("div",{className:"entities-saved-states__panel-header"},Object(l.createElement)(Po.Button,{ref:t,isPrimary:!0,disabled:n.length-c.length==0,onClick:()=>{const t=n.filter(({kind:e,name:t,key:n,property:o})=>!Object(u.some)(c,r=>r.kind===e&&r.name===t&&r.key===n&&r.property===o));e(t);const s=[];t.forEach(({kind:e,name:t,key:n,property:r})=>{"root"===e&&"site"===t?s.push(r):o(e,t,n)}),r("root","site",void 0,s)},className:"editor-entities-saved-states__save-button"},Object(Xt.__)("Save")),Object(l.createElement)(Po.Button,{icon:Ro.a,onClick:h,label:Object(Xt.__)("Close panel")})),Object(l.createElement)("div",{className:"entities-saved-states__text-prompt"},Object(l.createElement)("strong",null,Object(Xt.__)("Select the changes you want to save")),Object(l.createElement)("p",null,Object(Xt.__)("Some changes may affect other areas of your site."))),s.map(e=>Object(l.createElement)(Uo,{key:e[0].name,list:e,closePanel:h,unselectedEntities:c,setUnselectedEntities:m})))}function zo({text:e,children:t}){const n=Object(b.useCopyToClipboard)(e);return Object(l.createElement)(Po.Button,{isSecondary:!0,ref:n},t)}class Vo extends l.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.getContent=this.getContent.bind(this),this.state={error:null}}componentDidCatch(e){this.setState({error:e})}reboot(){this.props.onError()}getContent(){try{return Object(p.select)("core/editor").getEditedPostContent()}catch(e){}}render(){const{error:e}=this.state;return e?Object(l.createElement)(s.Warning,{className:"editor-error-boundary",actions:[Object(l.createElement)(Po.Button,{key:"recovery",onClick:this.reboot,isSecondary:!0},Object(Xt.__)("Attempt Recovery")),Object(l.createElement)(zo,{key:"copy-post",text:this.getContent},Object(Xt.__)("Copy Post Text")),Object(l.createElement)(zo,{key:"copy-error",text:e.stack},Object(Xt.__)("Copy Error"))]},Object(Xt.__)("The editor has encountered an unexpected error.")):this.props.children}}var Ho=Vo;const Wo=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Go=Object(u.once)(()=>{try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}});function qo(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=Object(p.useSelect)(e=>({postId:e("core/editor").getCurrentPostId(),isEditedPostNew:e("core/editor").isEditedPostNew(),getEditedPostAttribute:e("core/editor").getEditedPostAttribute,hasRemoteAutosave:!!e("core/editor").getEditorSettings().autosave}),[]),{getEditedPostAttribute:o}=Object(p.useSelect)("core/editor"),{createWarningNotice:r,removeNotice:s}=Object(p.useDispatch)(Yt.store),{editPost:i,resetEditorBlocks:c}=Object(p.useDispatch)("core/editor");Object(l.useEffect)(()=>{let a=function(e,t){return window.sessionStorage.getItem(no(e,t))}(e,t);if(!a)return;try{a=JSON.parse(a)}catch(e){return}const{post_title:l,content:p,excerpt:b}=a,m={title:l,content:p,excerpt:b};if(!Object.keys(m).some(e=>m[e]!==o(e)))return void oo(e,t);if(n)return;const h=Object(u.uniqueId)("wpEditorAutosaveRestore");r(Object(Xt.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:Object(Xt.__)("Restore the backup"),onClick(){i(Object(u.omit)(m,["content"])),c(Object(d.parse)(m.content)),s(h)}}]})},[t,e])}var Ko=Object(b.ifCondition)(Go)((function(){const{autosave:e}=Object(p.useDispatch)("core/editor"),t=Object(l.useCallback)(()=>{Wo(()=>e({local:!0}))},[]);qo(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:r}=Object(p.useSelect)(e=>({postId:e("core/editor").getCurrentPostId(),isEditedPostNew:e("core/editor").isEditedPostNew(),isDirty:e("core/editor").isEditedPostDirty(),isAutosaving:e("core/editor").isAutosavingPost(),didError:e("core/editor").didPostSaveRequestFail()}),[]),s=Object(l.useRef)(n),i=Object(l.useRef)(o);Object(l.useEffect)(()=>{!r&&(i.current&&!o||s.current&&!n)&&oo(e,t),s.current=n,i.current=o},[n,o,r]);const c=Object(b.usePrevious)(t),a=Object(b.usePrevious)(e);Object(l.useEffect)(()=>{a===e&&c&&!t&&oo(e,!0)},[t,e])}();const{localAutosaveInterval:n}=Object(p.useSelect)(e=>({localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}),[]);return Object(l.createElement)(ao,{interval:n,autosave:t})}));var $o=function({children:e}){const t=Object(p.useSelect)(e=>{const{getEditedPostAttribute:t}=e(io),{getPostType:n}=e(i.store);return n(t("type"))},[]);return Object(u.get)(t,["supports","page-attributes"],!1)?e:null};var Qo=Object(p.withSelect)(e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getPostType:n}=e("core");return{postType:n(t("type"))}})((function({postType:e,children:t,supportKeys:n}){let o=!0;return e&&(o=Object(u.some)(Object(u.castArray)(n),t=>!!e.supports[t])),o?t:null}));const Yo=Object(b.withState)({orderInput:null})(({onUpdateOrder:e,order:t=0,orderInput:n,setState:o})=>{const r=null===n?t:n;return Object(l.createElement)(Po.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(Xt.__)("Order"),value:r,onChange:t=>{o({orderInput:t});const n=Number(t);Number.isInteger(n)&&""!==Object(u.invoke)(t,["trim"])&&e(Number(t))},size:6,onBlur:()=>{o({orderInput:null})}})});var Xo=Object(b.compose)([Object(p.withSelect)(e=>({order:e("core/editor").getEditedPostAttribute("menu_order")})),Object(p.withDispatch)(e=>({onUpdateOrder(t){e("core/editor").editPost({menu_order:t})}}))])((function(e){return Object(l.createElement)(Qo,{supportKeys:"page-attributes"},Object(l.createElement)(Yo,e))})),Jo=n("@wordpress/html-entities");function Zo(e){const t=e.map(e=>({children:[],parent:null,...e})),n=Object(u.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const o=e=>e.map(e=>{const t=n[e.id];return{...e,children:t&&t.length?o(t):[]}});return o(n[0]||[])}const er=e=>Object(u.unescape)(e.replace("'","'")),tr=e=>({...e,name:er(e.name)}),nr=e=>Object(u.map)(e,tr);function or(e){var t;return null!=e&&null!==(t=e.title)&&void 0!==t&&t.rendered?Object(Jo.decodeEntities)(e.title.rendered):`#${e.id} (${Object(Xt.__)("no title")})`}const rr=(e,t)=>{const n=Object(u.deburr)(e).toLowerCase(),o=Object(u.deburr)(t).toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0};var sr=function(){const{editPost:e}=Object(p.useDispatch)("core/editor"),[t,n]=Object(l.useState)(!1),{parentPost:o,parentPostId:r,items:s,postType:i}=Object(p.useSelect)(e=>{const{getPostType:n,getEntityRecords:o,getEntityRecord:r}=e("core"),{getCurrentPostId:s,getEditedPostAttribute:i}=e("core/editor"),c=i("type"),a=i("parent"),l=n(c),d=s(),p=Object(u.get)(l,["hierarchical"],!1),b={per_page:100,exclude:d,parent_exclude:d,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};return t&&(b.search=t),{parentPostId:a,parentPost:a?r("postType",c,a):null,items:p?o("postType",c,b):[],postType:l}},[t]),c=Object(u.get)(i,["hierarchical"],!1),a=Object(u.get)(i,["labels","parent_item_colon"]),d=s||[],b=Object(l.useMemo)(()=>{const e=(n,o=0)=>{const r=n.map(t=>[{value:t.id,label:Object(u.repeat)("— ",o)+Object(u.unescape)(t.name),rawName:t.name},...e(t.children||[],o+1)]).sort(([e],[n])=>rr(e.rawName,t)>=rr(n.rawName,t)?1:-1);return Object(u.flatten)(r)};let n=d.map(e=>({id:e.id,parent:e.parent,name:or(e)}));t||(n=Zo(n));const s=e(n),i=Object(u.find)(s,e=>e.value===r);return o&&!i&&s.unshift({value:r,label:or(o)}),s},[d,t]);return c&&a?Object(l.createElement)(Po.ComboboxControl,{className:"editor-page-attributes__parent",label:a,value:r,options:b,onFilterValueChange:Object(u.debounce)(e=>{n(e)},300),onChange:t=>{e({parent:t})}}):null};var ir=function({}){const{availableTemplates:e,selectedTemplate:t,isViewable:n}=Object(p.useSelect)(e=>{var t,n;const{getEditedPostAttribute:o,getEditorSettings:r,getCurrentPostType:s}=e(io),{getPostType:c}=e(i.store);return{selectedTemplate:o("template"),availableTemplates:r().availableTemplates,isViewable:null!==(t=null===(n=c(s()))||void 0===n?void 0:n.viewable)&&void 0!==t&&t}},[]),{editPost:o}=Object(p.useDispatch)(io);return!n||Object(u.isEmpty)(e)?null:Object(l.createElement)(Po.SelectControl,{label:Object(Xt.__)("Template:"),value:t,onChange:e=>{o({template:e||""})},options:Object(u.map)(e,(e,t)=>({value:t,label:e}))})};var cr=function(){const[e,t]=Object(l.useState)(),{authorId:n,isLoading:o,authors:r,postAuthor:s}=Object(p.useSelect)(t=>{const{__unstableGetAuthor:n,getAuthors:o,isResolving:r}=t("core"),{getEditedPostAttribute:s}=t("core/editor"),i=n(s("author")),c=e&&""!==e?{search:e}:{};return{authorId:s("author"),postAuthor:i,authors:o(c),isLoading:r("core","getAuthors",[c])}},[e]),{editPost:i}=Object(p.useDispatch)("core/editor"),c=Object(l.useMemo)(()=>{const e=(null!=r?r:[]).map(e=>({value:e.id,label:e.name}));return e.findIndex(({value:e})=>(null==s?void 0:s.id)===e)<0&&s?[{value:s.id,label:s.name},...e]:e},[r,s]);return Object(l.useEffect)(()=>{s&&t(s.name)},[s]),s?Object(l.createElement)(Po.ComboboxControl,{label:Object(Xt.__)("Author"),options:c,value:n,onFilterValueChange:Object(u.debounce)(e=>{t(e)},300),onChange:e=>{e&&i({author:e})},isLoading:o,allowReset:!1}):null};var ar=function(){const{editPost:e}=Object(p.useDispatch)("core/editor"),{postAuthor:t,authors:n}=Object(p.useSelect)(e=>{const t=e("core").getAuthors();return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:t.map(e=>({label:Object(Jo.decodeEntities)(e.name),value:e.id}))}},[]);return Object(l.createElement)(Po.SelectControl,{className:"post-author-selector",label:Object(Xt.__)("Author"),options:n,onChange:t=>{const n=Number(t);e({author:n})},value:t})};var lr=function(){return Object(p.useSelect)(e=>{const t=e(i.store).getAuthors();return(null==t?void 0:t.length)>=25},[])?Object(l.createElement)(cr,null):Object(l.createElement)(ar,null)};var ur=Object(b.compose)([Object(p.withSelect)(e=>{const t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(u.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}}),b.withInstanceId])((function({hasAssignAuthorAction:e,authors:t,children:n}){return!e||!t||1>=t.length?null:Object(l.createElement)(Qo,{supportKeys:"author"},n)}));var dr=Object(b.compose)([Object(p.withSelect)(e=>({commentStatus:e("core/editor").getEditedPostAttribute("comment_status")})),Object(p.withDispatch)(e=>({editPost:e("core/editor").editPost}))])((function({commentStatus:e="open",...t}){return Object(l.createElement)(Po.CheckboxControl,{label:Object(Xt.__)("Allow comments"),checked:"open"===e,onChange:()=>t.editPost({comment_status:"open"===e?"closed":"open"})})}));var pr=Object(b.compose)([Object(p.withSelect)(e=>({excerpt:e("core/editor").getEditedPostAttribute("excerpt")})),Object(p.withDispatch)(e=>({onUpdateExcerpt(t){e("core/editor").editPost({excerpt:t})}}))])((function({excerpt:e,onUpdateExcerpt:t}){return Object(l.createElement)("div",{className:"editor-post-excerpt"},Object(l.createElement)(Po.TextareaControl,{label:Object(Xt.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>t(e),value:e}),Object(l.createElement)(Po.ExternalLink,{href:Object(Xt.__)("https://wordpress.org/support/article/excerpt/")},Object(Xt.__)("Learn more about manual excerpts")))}));var br=function(e){return Object(l.createElement)(Qo,Object(a.a)({},e,{supportKeys:"excerpt"}))};var mr=Object(p.withSelect)(e=>{const{getThemeSupports:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor");return{postType:n("type"),themeSupports:t()}})((function({themeSupports:e,children:t,postType:n,supportKeys:o}){return Object(u.some)(Object(u.castArray)(o),t=>{const o=Object(u.get)(e,[t],!1);return"post-thumbnails"===t&&Object(u.isArray)(o)?Object(u.includes)(o,n):o})?t:null}));var hr=function(e){return Object(l.createElement)(mr,{supportKeys:"post-thumbnails"},Object(l.createElement)(Qo,Object(a.a)({},e,{supportKeys:"thumbnail"})))};const fr=["image"],gr=Object(Xt.__)("Featured image"),Or=Object(Xt.__)("Set featured image"),jr=Object(Xt.__)("Remove image");const vr=Object(p.withSelect)(e=>{const{getMedia:t,getPostType:n}=e("core"),{getCurrentPostId:o,getEditedPostAttribute:r}=e("core/editor"),s=r("featured_media");return{media:s?t(s):null,currentPostId:o(),postType:n(r("type")),featuredImageId:s}}),_r=Object(p.withDispatch)((e,{noticeOperations:t},{select:n})=>{const{editPost:o}=e("core/editor");return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){n(s.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)}})},onRemoveImage(){o({featured_media:0})}}});var yr=Object(b.compose)(Po.withNotices,vr,_r,Object(Po.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:n,onDropImage:o,onRemoveImage:r,media:i,postType:c,noticeUI:a}){var d,p;const b=Object(u.get)(c,["labels"],{}),h=Object(l.createElement)("p",null,Object(Xt.__)("To edit the featured image, you need permission to upload media."));let f,g,O;if(i){const t=Object(m.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",i.id,e);if(Object(u.has)(i,["media_details","sizes",t]))f=i.media_details.sizes[t].width,g=i.media_details.sizes[t].height,O=i.media_details.sizes[t].source_url;else{const t=Object(m.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",i.id,e);Object(u.has)(i,["media_details","sizes",t])?(f=i.media_details.sizes[t].width,g=i.media_details.sizes[t].height,O=i.media_details.sizes[t].source_url):(f=i.media_details.width,g=i.media_details.height,O=i.source_url)}}return Object(l.createElement)(hr,null,a,Object(l.createElement)("div",{className:"editor-post-featured-image"},i&&Object(l.createElement)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden"},i.alt_text&&Object(Xt.sprintf)(Object(Xt.__)("Current image: %s"),i.alt_text),!i.alt_text&&Object(Xt.sprintf)(Object(Xt.__)("The current image has no alternative text. The file name is: %s"),(null===(d=i.media_details.sizes)||void 0===d||null===(p=d.full)||void 0===p?void 0:p.file)||i.slug)),Object(l.createElement)(s.MediaUploadCheck,{fallback:h},Object(l.createElement)(s.MediaUpload,{title:b.featured_image||gr,onSelect:n,unstableFeaturedImageFlow:!0,allowedTypes:fr,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>Object(l.createElement)("div",{className:"editor-post-featured-image__container"},Object(l.createElement)(Po.Button,{className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?Object(Xt.__)("Edit or update the image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null},!!t&&i&&Object(l.createElement)(Po.ResponsiveWrapper,{naturalWidth:f,naturalHeight:g,isInline:!0},Object(l.createElement)("img",{src:O,alt:""})),!!t&&!i&&Object(l.createElement)(Po.Spinner,null),!t&&(b.set_featured_image||Or)),Object(l.createElement)(Po.DropZone,{onFilesDrop:o})),value:t})),!!t&&i&&!i.isLoading&&Object(l.createElement)(s.MediaUploadCheck,null,Object(l.createElement)(s.MediaUpload,{title:b.featured_image||gr,onSelect:n,unstableFeaturedImageFlow:!0,allowedTypes:fr,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>Object(l.createElement)(Po.Button,{onClick:e,isSecondary:!0},Object(Xt.__)("Replace Image"))})),!!t&&Object(l.createElement)(s.MediaUploadCheck,null,Object(l.createElement)(Po.Button,{onClick:r,isLink:!0,isDestructive:!0},b.remove_featured_image||jr))))}));var wr=Object(p.withSelect)(e=>({disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}))((function({disablePostFormats:e,...t}){return!e&&Object(l.createElement)(Qo,Object(a.a)({},t,{supportKeys:"post-formats"}))}));const Sr=[{id:"aside",caption:Object(Xt.__)("Aside")},{id:"audio",caption:Object(Xt.__)("Audio")},{id:"chat",caption:Object(Xt.__)("Chat")},{id:"gallery",caption:Object(Xt.__)("Gallery")},{id:"image",caption:Object(Xt.__)("Image")},{id:"link",caption:Object(Xt.__)("Link")},{id:"quote",caption:Object(Xt.__)("Quote")},{id:"standard",caption:Object(Xt.__)("Standard")},{id:"status",caption:Object(Xt.__)("Status")},{id:"video",caption:Object(Xt.__)("Video")}].sort((e,t)=>{const n=e.caption.toUpperCase(),o=t.caption.toUpperCase();return n<o?-1:n>o?1:0});function Er(){const e="post-format-selector-"+Object(b.useInstanceId)(Er),{postFormat:t,suggestedFormat:n,supportedFormats:o}=Object(p.useSelect)(e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e("core/editor"),o=t("format"),r=e("core").getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:Object(u.union)([o],Object(u.get)(r,["formats"],[]))}},[]),r=Sr.filter(e=>Object(u.includes)(o,e.id)),s=Object(u.find)(r,e=>e.id===n),{editPost:i}=Object(p.useDispatch)("core/editor"),c=e=>i({format:e});return Object(l.createElement)(wr,null,Object(l.createElement)("div",{className:"editor-post-format"},Object(l.createElement)("div",{className:"editor-post-format__content"},Object(l.createElement)("label",{htmlFor:e},Object(Xt.__)("Post Format")),Object(l.createElement)(Po.SelectControl,{value:t,onChange:e=>c(e),id:e,options:r.map(e=>({label:e.caption,value:e.id}))})),s&&s.id!==t&&Object(l.createElement)("div",{className:"editor-post-format__suggestion"},Object(Xt.__)("Suggestion:")," ",Object(l.createElement)(Po.Button,{isLink:!0,onClick:()=>c(s.id)},s.caption))))}var Pr=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));var kr=Object(p.withSelect)(e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e("core/editor");return{lastRevisionId:t(),revisionsCount:n()}})((function({lastRevisionId:e,revisionsCount:t,children:n}){return!e||t<2?null:Object(l.createElement)(Qo,{supportKeys:"revisions"},n)}));var Tr=Object(p.withSelect)(e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e("core/editor");return{lastRevisionId:t(),revisionsCount:n()}})((function({lastRevisionId:e,revisionsCount:t}){return Object(l.createElement)(kr,null,Object(l.createElement)(Po.Button,{href:R("revision.php",{revision:e,gutenberg:!0}),className:"editor-post-last-revision__title",icon:Pr},Object(Xt.sprintf)(Object(Xt._n)("%d Revision","%d Revisions",t),t)))}));class Cr extends l.Component{constructor(){super(...arguments),this.buttonRef=Object(l.createRef)(),this.openPreviewWindow=this.openPreviewWindow.bind(this)}componentDidUpdate(e){const{previewLink:t}=this.props;t&&!e.previewLink&&this.setPreviewWindowLink(t)}setPreviewWindowLink(e){const{previewWindow:t}=this;t&&!t.closed&&(t.location=e,this.buttonRef.current&&this.buttonRef.current.focus())}getWindowTarget(){const{postId:e}=this.props;return"wp-preview-"+e}openPreviewWindow(e){e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),function(e){let t=Object(l.renderToString)(Object(l.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(l.createElement)(Po.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(l.createElement)(Po.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(l.createElement)(Po.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(l.createElement)("p",null,Object(Xt.__)("Generating preview…"))));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=Object(m.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=Object(Xt.__)("Generating preview…"),e.close()}(this.previewWindow.document)):this.setPreviewWindowLink(e.target.href)}render(){const{previewLink:e,currentPostLink:t,isSaveable:n,role:o}=this.props,r=e||t,s=uo()({"editor-post-preview":!this.props.className},this.props.className);return Object(l.createElement)(Po.Button,{isTertiary:!this.props.className,className:s,href:r,target:this.getWindowTarget(),disabled:!n,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:Object(l.createElement)(l.Fragment,null,Object(Xt._x)("Preview","imperative verb"),Object(l.createElement)(Po.VisuallyHidden,{as:"span"},Object(Xt.__)("(opens in a new tab)"))))}}var xr=Object(b.compose)([Object(p.withSelect)((e,{forcePreviewLink:t,forceIsAutosaveable:n})=>{const{getCurrentPostId:o,getCurrentPostAttribute:r,getEditedPostAttribute:s,isEditedPostSaveable:i,isEditedPostAutosaveable:c,getEditedPostPreviewLink:a}=e("core/editor"),{getPostType:l}=e("core"),d=a(),p=l(s("type"));return{postId:o(),currentPostLink:r("link"),previewLink:void 0!==t?t:d,isSaveable:i(),isAutosaveable:n||c(),isViewable:Object(u.get)(p,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(s("status"))}}),Object(p.withDispatch)(e=>({autosave:e("core/editor").autosave,savePost:e("core/editor").savePost})),Object(b.ifCondition)(({isViewable:e})=>e)])(Cr);function Br(){const e="core/editor/post-locked-modal-"+Object(b.useInstanceId)(Br),{autosave:t,updatePostLock:n}=Object(p.useDispatch)("core/editor"),{isLocked:o,isTakeover:r,user:s,postId:i,postLockUtils:c,activePostLock:a,postType:d}=Object(p.useSelect)(e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:r,getActivePostLock:s,getEditedPostAttribute:i,getEditorSettings:c}=e("core/editor"),{getPostType:a}=e("core");return{isLocked:t(),isTakeover:n(),user:o(),postId:r(),postLockUtils:c().postLockUtils,activePostLock:s(),postType:a(i("type"))}});if(Object(l.useEffect)(()=>{function r(){if(o||!a)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",c.unlockNonce),e.append("post_ID",i),e.append("active_post_lock",a),window.navigator.sendBeacon)window.navigator.sendBeacon(c.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",c.ajaxUrl,!1),t.send(e)}}return Object(m.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:a,post_id:i})})),Object(m.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),n({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&n({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",r),()=>{Object(m.removeAction)("heartbeat.send",e),Object(m.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",r)}},[]),!o)return null;const h=s.name,f=s.avatar,g=Object(P.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:i,action:"edit",_wpnonce:c.nonce}),O=R("edit.php",{post_type:Object(u.get)(d,["slug"])}),j=Object(Xt.__)("Exit the Editor");return Object(l.createElement)(Po.Modal,{title:r?Object(Xt.__)("Someone else has taken over this post."):Object(Xt.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!f&&Object(l.createElement)("img",{src:f,alt:Object(Xt.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!r&&Object(l.createElement)("div",null,Object(l.createElement)("div",null,h?Object(Xt.sprintf)(Object(Xt.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),h):Object(Xt.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(l.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(l.createElement)(Po.Button,{isPrimary:!0,href:O},j))),!r&&Object(l.createElement)("div",null,Object(l.createElement)("div",null,h?Object(Xt.sprintf)(Object(Xt.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),h):Object(Xt.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(l.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(l.createElement)(Po.Button,{isSecondary:!0,href:O},j),Object(l.createElement)(xr,null),Object(l.createElement)(Po.Button,{isPrimary:!0,href:g},Object(Xt.__)("Take Over")))))}var Ar=Object(b.compose)(Object(p.withSelect)(e=>{const{isCurrentPostPublished:t,getCurrentPostType:n,getCurrentPost:o}=e("core/editor");return{hasPublishAction:Object(u.get)(o(),["_links","wp:action-publish"],!1),isPublished:t(),postType:n()}}))((function({hasPublishAction:e,isPublished:t,children:n}){return t||!e?null:n}));var Ir=Object(b.compose)(Object(p.withSelect)(e=>({status:e("core/editor").getEditedPostAttribute("status")})),Object(p.withDispatch)(e=>({onUpdateStatus(t){e("core/editor").editPost({status:t})}})))((function({status:e,onUpdateStatus:t}){return Object(l.createElement)(Ar,null,Object(l.createElement)(Po.CheckboxControl,{label:Object(Xt.__)("Pending review"),checked:"pending"===e,onChange:()=>{t("pending"===e?"draft":"pending")}}))}));var Rr=Object(b.compose)([Object(p.withSelect)(e=>({pingStatus:e("core/editor").getEditedPostAttribute("ping_status")})),Object(p.withDispatch)(e=>({editPost:e("core/editor").editPost}))])((function({pingStatus:e="open",...t}){return Object(l.createElement)(Po.CheckboxControl,{label:Object(Xt.__)("Allow pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t.editPost({ping_status:"open"===e?"closed":"open"})})}));var Nr=Object(b.compose)([Object(p.withSelect)((e,{forceIsSaving:t})=>{const{isCurrentPostPublished:n,isEditedPostBeingScheduled:o,isSavingPost:r,isPublishingPost:s,getCurrentPost:i,getCurrentPostType:c,isAutosavingPost:a}=e("core/editor");return{isPublished:n(),isBeingScheduled:o(),isSaving:t||r(),isPublishing:s(),hasPublishAction:Object(u.get)(i(),["_links","wp:action-publish"],!1),postType:c(),isAutosaving:a()}})])((function({isPublished:e,isBeingScheduled:t,isSaving:n,isPublishing:o,hasPublishAction:r,isAutosaving:s,hasNonPostEntityChanges:i}){return o?Object(Xt.__)("Publishing…"):e&&n&&!s?Object(Xt.__)("Updating…"):t&&n&&!s?Object(Xt.__)("Scheduling…"):r?e?i?Object(Xt.__)("Update…"):Object(Xt.__)("Update"):t?i?Object(Xt.__)("Schedule…"):Object(Xt.__)("Schedule"):Object(Xt.__)("Publish"):i?Object(Xt.__)("Submit for Review…"):Object(Xt.__)("Submit for Review")}));class Dr extends l.Component{constructor(e){super(e),this.buttonNode=Object(l.createRef)(),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}componentDidMount(){this.props.focusOnMount&&this.buttonNode.current.focus()}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:n}=this.props;return n?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),this.props.setEntitiesSavedStatesCallback(()=>this.closeEntitiesSavedStates),u.noop):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:n}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&Object(u.some)(e,e=>"postType"===e.kind&&e.name===t&&e.key===n)&&o()})}render(){const{forceIsDirty:e,forceIsSaving:t,hasPublishAction:n,isBeingScheduled:o,isOpen:r,isPostSavingLocked:s,isPublishable:i,isPublished:c,isSaveable:d,isSaving:p,isAutoSaving:b,isToggle:m,onSave:h,onStatusChange:f,onSubmit:g=u.noop,onToggle:O,visibility:j,hasNonPostEntityChanges:v}=this.props,_=p||t||!d||s||!i&&!e,y=c||p||t||!d||!i&&!e;let w;w=n?"private"===j?"private":o?"future":"publish":"pending";const S={"aria-disabled":_&&!v,className:"editor-post-publish-button",isBusy:!b&&p&&c,isPrimary:!0,onClick:this.createOnClick(()=>{_||(g(),f(w),h())})},E={"aria-disabled":y&&!v,"aria-expanded":r,className:"editor-post-publish-panel__toggle",isBusy:p&&c,isPrimary:!0,onClick:this.createOnClick(()=>{y||O()})},P=o?Object(Xt.__)("Schedule…"):Object(Xt.__)("Publish"),k=Object(l.createElement)(Nr,{forceIsSaving:t,hasNonPostEntityChanges:v}),T=m?E:S,C=m?P:k;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Po.Button,Object(a.a)({ref:this.buttonNode},T,{className:uo()(T.className,"editor-post-publish-button__button",{"has-changes-dot":v})}),C))}}var Lr=Object(b.compose)([Object(p.withSelect)(e=>{const{isSavingPost:t,isAutosavingPost:n,isEditedPostBeingScheduled:o,getEditedPostVisibility:r,isCurrentPostPublished:s,isEditedPostSaveable:i,isEditedPostPublishable:c,isPostSavingLocked:a,getCurrentPost:l,getCurrentPostType:d,getCurrentPostId:p,hasNonPostEntityChanges:b}=e("core/editor"),m=n();return{isSaving:t()||m,isAutoSaving:m,isBeingScheduled:o(),visibility:r(),isSaveable:i(),isPostSavingLocked:a(),isPublishable:c(),isPublished:s(),hasPublishAction:Object(u.get)(l(),["_links","wp:action-publish"],!1),postType:d(),postId:p(),hasNonPostEntityChanges:b()}}),Object(p.withDispatch)(e=>{const{editPost:t,savePost:n}=e("core/editor");return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}})])(Dr),Ur=n("./node_modules/@wordpress/icons/build-module/library/close-small.js"),Fr=n("./node_modules/@wordpress/icons/build-module/library/wordpress.js");const Mr=[{value:"public",label:Object(Xt.__)("Public"),info:Object(Xt.__)("Visible to everyone.")},{value:"private",label:Object(Xt.__)("Private"),info:Object(Xt.__)("Only visible to site admins and editors.")},{value:"password",label:Object(Xt.__)("Password Protected"),info:Object(Xt.__)("Protected with a password you choose. Only those with the password can view this post.")}];class zr extends l.Component{constructor(e){super(...arguments),this.setPublic=this.setPublic.bind(this),this.setPrivate=this.setPrivate.bind(this),this.setPasswordProtected=this.setPasswordProtected.bind(this),this.updatePassword=this.updatePassword.bind(this),this.state={hasPassword:!!e.password}}setPublic(){const{visibility:e,onUpdateVisibility:t,status:n}=this.props;t("private"===e?"draft":n),this.setState({hasPassword:!1})}setPrivate(){if(!window.confirm(Object(Xt.__)("Would you like to privately publish this post now?")))return;const{onUpdateVisibility:e,onSave:t}=this.props;e("private"),this.setState({hasPassword:!1}),t()}setPasswordProtected(){const{visibility:e,onUpdateVisibility:t,status:n,password:o}=this.props;t("private"===e?"draft":n,o||""),this.setState({hasPassword:!0})}updatePassword(e){const{status:t,onUpdateVisibility:n}=this.props;n(t,e.target.value)}render(){const{visibility:e,password:t,instanceId:n}=this.props,o={public:{onSelect:this.setPublic,checked:"public"===e&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===e},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(l.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(l.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(Xt.__)("Post Visibility")),Mr.map(({value:e,label:t,info:r})=>Object(l.createElement)("div",{key:e,className:"editor-post-visibility__choice"},Object(l.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-"+n,value:e,onChange:o[e].onSelect,checked:o[e].checked,id:`editor-post-${e}-${n}`,"aria-describedby":`editor-post-${e}-${n}-description`,className:"editor-post-visibility__dialog-radio"}),Object(l.createElement)("label",{htmlFor:`editor-post-${e}-${n}`,className:"editor-post-visibility__dialog-label"},t),Object(l.createElement)("p",{id:`editor-post-${e}-${n}-description`,className:"editor-post-visibility__dialog-info"},r)))),this.state.hasPassword&&Object(l.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(l.createElement)(Po.VisuallyHidden,{as:"label",htmlFor:"editor-post-visibility__dialog-password-input-"+n},Object(Xt.__)("Create password")),Object(l.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-"+n,type:"text",onChange:this.updatePassword,value:t,placeholder:Object(Xt.__)("Use a secure password")}))]}}var Vr=Object(b.compose)([Object(p.withSelect)(e=>{const{getEditedPostAttribute:t,getEditedPostVisibility:n}=e("core/editor");return{status:t("status"),visibility:n(),password:t("password")}}),Object(p.withDispatch)(e=>{const{savePost:t,editPost:n}=e("core/editor");return{onSave:t,onUpdateVisibility(e,t=""){n({status:e,password:t})}}}),b.withInstanceId])(zr);var Hr=Object(p.withSelect)(e=>({visibility:e("core/editor").getEditedPostVisibility()}))((function({visibility:e}){return Object(u.find)(Mr,{value:e}).label}));function Wr(e=new Date,t=!0){const n=new Date(e);return new Date(n.getFullYear(),n.getMonth()+(t?0:1),t?1:0).toISOString()}function Gr(){const{postDate:e,postType:t}=Object(p.useSelect)(e=>({postDate:e(io).getEditedPostAttribute("date"),postType:e(io).getCurrentPostType()}),[]),{editPost:n}=Object(p.useDispatch)(io),[o,r]=Object(l.useState)(Wr(e)),s=Object(p.useSelect)(e=>e(i.store).getEntityRecords("postType",t,{status:"publish,future",after:Wr(o),before:Wr(o,!1),exclude:[e(io).getCurrentPostId()]}),[o,t]),c=Object(l.useMemo)(()=>(s||[]).map(({title:e,type:t,date:n})=>({title:null==e?void 0:e.rendered,type:t,date:new Date(n)})),[s]),a=Object(l.useRef)(),u=Object(E.__experimentalGetSettings)(),d=/a(?!\\)/i.test(u.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(l.createElement)(Po.DateTimePicker,{ref:a,currentDate:e,onChange:function(e){n({date:e});const{ownerDocument:t}=a.current;t.activeElement.blur()},is12Hour:d,events:c,onMonthPreviewed:r})}var qr=Object(p.withSelect)(e=>({date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}))((function({date:e,isFloating:t}){const n=Object(E.__experimentalGetSettings)();return e&&!t?Object(E.format)(`${n.formats.date} ${n.formats.time}`,e):Object(Xt.__)("Immediately")}));const Kr={per_page:10,orderby:"count",order:"desc",_fields:"id,name,count"};function $r({onSelect:e,taxonomy:t}){const{_terms:n,showTerms:o}=Object(p.useSelect)(e=>{const n=e(i.store).getEntityRecords("taxonomy",t.slug,Kr);return{_terms:n,showTerms:(null==n?void 0:n.length)>=10}},[]);if(!o)return null;const r=nr(n),s=Object(u.get)(t,["labels","most_used"]);return Object(l.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},Object(l.createElement)("h3",{className:"editor-post-taxonomies__flat-term-most-used-label"},s),Object(l.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},r.map(t=>Object(l.createElement)("li",{key:t.id},Object(l.createElement)(Po.Button,{isLink:!0,onClick:()=>e(t)},t.name)))))}const Qr={per_page:20,orderby:"count",order:"desc",_fields:"id,name,count"},Yr=(e,t)=>er(e).toLowerCase()===er(t).toLowerCase(),Xr=(e,t)=>e.map(e=>Object(u.find)(t,t=>Yr(t.name,e)).id);class Jr extends l.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.searchTerms=Object(u.debounce)(this.searchTerms.bind(this),500),this.findOrCreateTerm=this.findOrCreateTerm.bind(this),this.appendTerm=this.appendTerm.bind(this),this.state={loading:!Object(u.isEmpty)(this.props.terms),availableTerms:[],selectedTerms:[]}}componentDidMount(){Object(u.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(()=>{this.setState({loading:!1})},e=>{"abort"!==e.statusText&&this.setState({loading:!1})}))}componentWillUnmount(){Object(u.invoke)(this.initRequest,["abort"]),Object(u.invoke)(this.searchRequest,["abort"])}componentDidUpdate(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}fetchTerms(e={}){const{taxonomy:t}=this.props,n={...Qr,...e},o=g()({path:Object(P.addQueryArgs)("/wp/v2/"+t.rest_base,n)});return o.then(nr).then(e=>{this.setState(t=>({availableTerms:t.availableTerms.concat(e.filter(e=>!Object(u.find)(t.availableTerms,t=>t.id===e.id)))})),this.updateSelectedTerms(this.props.terms)}),o}updateSelectedTerms(e=[]){const t=e.reduce((e,t)=>{const n=Object(u.find)(this.state.availableTerms,e=>e.id===t);return n&&e.push(n.name),e},[]);this.setState({selectedTerms:t})}findOrCreateTerm(e){const{taxonomy:t}=this.props,n=Object(u.escape)(e);return g()({path:"/wp/v2/"+t.rest_base,method:"POST",data:{name:n}}).catch(o=>"term_exists"===o.code?(this.addRequest=g()({path:Object(P.addQueryArgs)("/wp/v2/"+t.rest_base,{...Qr,search:n})}).then(nr),this.addRequest.then(t=>Object(u.find)(t,t=>Yr(t.name,e)))):Promise.reject(o)).then(tr)}onChange(e){const t=Object(u.uniqBy)(e,e=>e.toLowerCase());this.setState({selectedTerms:t});const n=t.filter(e=>!Object(u.find)(this.state.availableTerms,t=>Yr(t.name,e)));if(0===n.length)return this.props.onUpdateTerms(Xr(t,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(n.map(this.findOrCreateTerm)).then(e=>{const n=this.state.availableTerms.concat(e);return this.setState({availableTerms:n}),this.props.onUpdateTerms(Xr(t,n),this.props.taxonomy.rest_base)})}searchTerms(e=""){Object(u.invoke)(this.searchRequest,["abort"]),e.length>=3&&(this.searchRequest=this.fetchTerms({search:e}))}appendTerm(e){const{onUpdateTerms:t,taxonomy:n,terms:o=[],slug:r,speak:s}=this.props;if(o.includes(e.id))return;const i=[...o,e.id];s(Object(Xt.sprintf)(Object(Xt._x)("%s added","term"),Object(u.get)(n,["labels","singular_name"],"post_tag"===r?Object(Xt.__)("Tag"):Object(Xt.__)("Term"))),"assertive"),this.setState({availableTerms:[...this.state.availableTerms,e]}),t(i,n.rest_base)}render(){const{slug:e,taxonomy:t,hasAssignAction:n}=this.props;if(!n)return null;const{loading:o,availableTerms:r,selectedTerms:s}=this.state,i=r.map(e=>e.name),c=Object(u.get)(t,["labels","add_new_item"],"post_tag"===e?Object(Xt.__)("Add new tag"):Object(Xt.__)("Add new Term")),a=Object(u.get)(t,["labels","singular_name"],"post_tag"===e?Object(Xt.__)("Tag"):Object(Xt.__)("Term")),d=Object(Xt.sprintf)(Object(Xt._x)("%s added","term"),a),p=Object(Xt.sprintf)(Object(Xt._x)("%s removed","term"),a),b=Object(Xt.sprintf)(Object(Xt._x)("Remove %s","term"),a);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Po.FormTokenField,{value:s,suggestions:i,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:c,messages:{added:d,removed:p,remove:b}}),Object(l.createElement)($r,{taxonomy:t,onSelect:this.appendTerm}))}}var Zr=Object(b.compose)(Object(p.withSelect)((e,{slug:t})=>{const{getCurrentPost:n}=e(io),{getTaxonomy:o}=e(i.store),r=o(t);return{hasCreateAction:!!r&&Object(u.get)(n(),["_links","wp:action-create-"+r.rest_base],!1),hasAssignAction:!!r&&Object(u.get)(n(),["_links","wp:action-assign-"+r.rest_base],!1),terms:r?e(io).getEditedPostAttribute(r.rest_base):[],taxonomy:r}}),Object(p.withDispatch)(e=>({onUpdateTerms(t,n){e(io).editPost({[n]:t})}})),Po.withSpokenMessages,Object(Po.withFilters)("editor.PostTaxonomyType"))(Jr);const es=()=>{const e=[Object(Xt.__)("Suggestion:"),Object(l.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Xt.__)("Add tags"))];return Object(l.createElement)(Po.PanelBody,{initialOpen:!1,title:e},Object(l.createElement)("p",null,Object(Xt.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(l.createElement)(Zr,{slug:"post_tag"}))};class ts extends l.Component{constructor(e){super(e),this.state={hadTagsWhenOpeningThePanel:e.hasTags}}render(){return this.state.hadTagsWhenOpeningThePanel?null:Object(l.createElement)(es,null)}}var ns=Object(b.compose)(Object(p.withSelect)(e=>{const t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),o=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(u.some)(n.types,e=>e===t),hasTags:o&&o.length}}),Object(b.ifCondition)(({areTagsFetched:e,isPostTypeSupported:t})=>t&&e))(ts);const os=(e,t)=>{const n=Sr.filter(t=>Object(u.includes)(e,t.id));return Object(u.find)(n,e=>e.id===t)},rs=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:n})=>Object(l.createElement)(Po.Button,{isLink:!0,onClick:()=>n(e)},t);function ss(){const{currentPostFormat:e,suggestion:t}=Object(p.useSelect)(e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e("core/editor"),o=Object(u.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:t("format"),suggestion:os(o,n())}},[]),{editPost:n}=Object(p.useDispatch)("core/editor"),o=[Object(Xt.__)("Suggestion:"),Object(l.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Xt.__)("Use a post format"))];return t&&t.id!==e?Object(l.createElement)(Po.PanelBody,{initialOpen:!1,title:o},Object(l.createElement)("p",null,Object(Xt.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(l.createElement)("p",null,Object(l.createElement)(rs,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:Object(Xt.sprintf)(Object(Xt.__)('Apply the "%1$s" format.'),t.caption)}))):null}var is=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:n,hasPublishAction:o,siteIconUrl:r,siteTitle:s,siteHome:i}=Object(p.useSelect)(e=>{const{isResolving:t}=e("core/data"),{getCurrentPost:n,isEditedPostBeingScheduled:o}=e("core/editor"),{getEntityRecord:r}=e("core"),s=r("root","__unstableBase",void 0)||{};return{hasPublishAction:Object(u.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:o(),isRequestingSiteIcon:t("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:s.site_icon_url,siteTitle:s.name,siteHome:s.home&&Object(P.filterURLForDisplay)(s.home)}},[]);let c,a,d=Object(l.createElement)(Po.Icon,{className:"components-site-icon",size:"36px",icon:Fr.a});return r&&(d=Object(l.createElement)("img",{alt:Object(Xt.__)("Site Icon"),className:"components-site-icon",src:r})),n&&(d=null),o?t?(c=Object(Xt.__)("Are you ready to schedule?"),a=Object(Xt.__)("Your work will be published at the specified date and time.")):(c=Object(Xt.__)("Are you ready to publish?"),a=Object(Xt.__)("Double-check your settings before publishing.")):(c=Object(Xt.__)("Are you ready to submit for review?"),a=Object(Xt.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(l.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(l.createElement)("div",null,Object(l.createElement)("strong",null,c)),Object(l.createElement)("p",null,a),Object(l.createElement)("div",{className:"components-site-card"},d,Object(l.createElement)("div",{className:"components-site-info"},Object(l.createElement)("span",{className:"components-site-name"},s||Object(Xt.__)("(Untitled)")),Object(l.createElement)("span",{className:"components-site-home"},i))),o&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Po.PanelBody,{initialOpen:!1,title:[Object(Xt.__)("Visibility:"),Object(l.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(l.createElement)(Hr,null))]},Object(l.createElement)(Vr,null)),Object(l.createElement)(Po.PanelBody,{initialOpen:!1,title:[Object(Xt.__)("Publish:"),Object(l.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(l.createElement)(qr,null))]},Object(l.createElement)(Gr,null))),Object(l.createElement)(ss,null),Object(l.createElement)(ns,null),e)};function cs({text:e,onCopy:t,children:n}){const o=Object(b.useCopyToClipboard)(e,t);return Object(l.createElement)(Po.Button,{isSecondary:!0,ref:o},n)}class as extends l.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=Object(l.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(()=>{this.setState({showCopyConfirmation:!1})},4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:n,postType:o}=this.props,r=Object(u.get)(o,["labels","singular_name"]),s=Object(u.get)(o,["labels","view_item"]),i="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes("%postname%")?e.permalink_template.replace("%postname%",t):e.permalink_template})(n):n.link,c=t?Object(l.createElement)(l.Fragment,null,Object(Xt.__)("is now scheduled. It will go live on")," ",Object(l.createElement)(qr,null),"."):Object(Xt.__)("is now live.");return Object(l.createElement)("div",{className:"post-publish-panel__postpublish"},Object(l.createElement)(Po.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(l.createElement)("a",{ref:this.postLink,href:i},Object(Jo.decodeEntities)(n.title)||Object(Xt.__)("(no title)"))," ",c),Object(l.createElement)(Po.PanelBody,null,Object(l.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(l.createElement)("strong",null,Object(Xt.__)("What’s next?"))),Object(l.createElement)(Po.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(Xt.sprintf)(Object(Xt.__)("%s address"),r),value:Object(P.safeDecodeURIComponent)(i),onFocus:this.onSelectInput}),Object(l.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&Object(l.createElement)(Po.Button,{isSecondary:!0,href:i},s),Object(l.createElement)(cs,{text:i,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(Xt.__)("Copied!"):Object(Xt.__)("Copy Link")))),e)}}var ls=Object(p.withSelect)(e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e("core/editor"),{getPostType:r}=e("core");return{post:n(),postType:r(t("type")),isScheduled:o()}})(as);class us extends l.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:n}=this.props;t&&n||e()}render(){const{forceIsDirty:e,forceIsSaving:t,isBeingScheduled:n,isPublished:o,isPublishSidebarEnabled:r,isScheduled:s,isSaving:i,onClose:c,onTogglePublishSidebar:d,PostPublishExtension:p,PrePublishExtension:b,...m}=this.props,h=Object(u.omit)(m,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||s&&n,g=!f&&!i,O=f&&!i;return Object(l.createElement)("div",Object(a.a)({className:"editor-post-publish-panel"},h),Object(l.createElement)("div",{className:"editor-post-publish-panel__header"},O?Object(l.createElement)(Po.Button,{onClick:c,icon:Ur.a,label:Object(Xt.__)("Close panel")}):Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(l.createElement)(Lr,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:t})),Object(l.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},Object(l.createElement)(Po.Button,{onClick:c,isSecondary:!0},Object(Xt.__)("Cancel"))))),Object(l.createElement)("div",{className:"editor-post-publish-panel__content"},g&&Object(l.createElement)(is,null,b&&Object(l.createElement)(b,null)),O&&Object(l.createElement)(ls,{focusOnMount:!0},p&&Object(l.createElement)(p,null)),i&&Object(l.createElement)(Po.Spinner,null)),Object(l.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(l.createElement)(Po.CheckboxControl,{label:Object(Xt.__)("Always show pre-publish checks."),checked:r,onChange:d})))}}var ds=Object(b.compose)([Object(p.withSelect)(e=>{const{getPostType:t}=e("core"),{getCurrentPost:n,getEditedPostAttribute:o,isCurrentPostPublished:r,isCurrentPostScheduled:s,isEditedPostBeingScheduled:i,isEditedPostDirty:c,isSavingPost:a}=e("core/editor"),{isPublishSidebarEnabled:l}=e("core/editor"),d=t(o("type"));return{hasPublishAction:Object(u.get)(n(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(u.get)(d,["viewable"],!1),isBeingScheduled:i(),isDirty:c(),isPublished:r(),isPublishSidebarEnabled:l(),isSaving:a(),isScheduled:s()}}),Object(p.withDispatch)((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:n,enablePublishSidebar:o}=e("core/editor");return{onTogglePublishSidebar:()=>{t?n():o()}}}),Po.withFocusReturn,Po.withConstrainedTabbing])(us),ps=n("./node_modules/@wordpress/icons/build-module/icon/index.js");var bs=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})),ms=n("./node_modules/@wordpress/icons/build-module/library/check.js");var hs=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"}));var fs=Object(b.compose)([Object(p.withSelect)(e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e("core/editor");return{isSaving:t(),isPublished:n(),isScheduled:o()}}),Object(p.withDispatch)(e=>{const{editPost:t,savePost:n}=e("core/editor");return{onClick:()=>{t({status:"draft"}),n()}}})])((function({isSaving:e,isPublished:t,isScheduled:n,onClick:o}){const r=Object(b.useViewportMatch)("small","<");return t||n?Object(l.createElement)(Po.Button,{className:"editor-post-switch-to-draft",onClick:()=>{let e;t?e=Object(Xt.__)("Are you sure you want to unpublish this post?"):n&&(e=Object(Xt.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:e,isTertiary:!0},r?Object(Xt.__)("Draft"):Object(Xt.__)("Switch to draft")):null}));function gs({forceIsDirty:e,forceIsSaving:t,showIconLabels:n=!1}){const[o,r]=Object(l.useState)(!1),s=Object(b.useViewportMatch)("small"),{isAutosaving:i,isDirty:c,isNew:a,isPending:u,isPublished:d,isSaveable:m,isSaving:h,isScheduled:f,hasPublishAction:g}=Object(p.useSelect)(n=>{var o,r,s;const{isEditedPostNew:i,isCurrentPostPublished:c,isCurrentPostScheduled:a,isEditedPostDirty:l,isSavingPost:u,isEditedPostSaveable:d,getCurrentPost:p,isAutosavingPost:b,getEditedPostAttribute:m}=n("core/editor");return{isAutosaving:b(),isDirty:e||l(),isNew:i(),isPending:"pending"===m("status"),isPublished:c(),isSaving:t||u(),isSaveable:d(),isScheduled:a(),hasPublishAction:null!==(o=null===(r=p())||void 0===r||null===(s=r._links)||void 0===s?void 0:s["wp:action-publish"])&&void 0!==o&&o}},[e,t]),{savePost:O}=Object(p.useDispatch)("core/editor"),j=Object(b.usePrevious)(h);if(Object(l.useEffect)(()=>{let e;return j&&!h&&(r(!0),e=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(e)},[h]),h){const e=uo()("editor-post-saved-state","is-saving",Object(Po.__unstableGetAnimateClassName)({type:"loading"}),{"is-autosaving":i});return Object(l.createElement)("span",{className:e},Object(l.createElement)(ps.a,{icon:bs}),i?Object(Xt.__)("Autosaving"):Object(Xt.__)("Saving"))}if(d||f)return Object(l.createElement)(fs,null);if(!m)return null;if(o||!a&&!c)return Object(l.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(l.createElement)(ps.a,{icon:ms.a}),Object(Xt.__)("Saved"));if(!g&&u)return null;const v=u?Object(Xt.__)("Save as pending"):Object(Xt.__)("Save draft"),_=Object(Xt.__)("Save");return s?Object(l.createElement)(Po.Button,{className:"editor-post-save-draft",onClick:()=>O(),shortcut:ko.displayShortcut.primary("s"),isTertiary:!0},v):Object(l.createElement)(Po.Button,{className:"editor-post-save-draft",label:v,onClick:()=>O(),shortcut:ko.displayShortcut.primary("s"),icon:hs},n&&_)}var Os=Object(b.compose)([Object(p.withSelect)(e=>{const{getCurrentPost:t,getCurrentPostType:n}=e("core/editor");return{hasPublishAction:Object(u.get)(t(),["_links","wp:action-publish"],!1),postType:n()}})])((function({hasPublishAction:e,children:t}){return e?t:null}));function js({children:e}){return Object(l.createElement)(Qo,{supportKeys:"slug"},e)}class vs extends l.Component{constructor({postSlug:e,postTitle:t,postID:n}){super(...arguments),this.state={editedSlug:Object(P.safeDecodeURIComponent)(e)||N(t)||n},this.setSlug=this.setSlug.bind(this)}setSlug(e){const{postSlug:t,onUpdateSlug:n}=this.props,{value:o}=e.target,r=N(o);r!==t&&n(r)}render(){const{instanceId:e}=this.props,{editedSlug:t}=this.state,n="editor-post-slug-"+e;return Object(l.createElement)(js,null,Object(l.createElement)("label",{htmlFor:n},Object(Xt.__)("Slug")),Object(l.createElement)("input",{type:"text",id:n,value:t,onChange:e=>this.setState({editedSlug:e.target.value}),onBlur:this.setSlug,className:"editor-post-slug__input"}))}}var _s=Object(b.compose)([Object(p.withSelect)(e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e("core/editor"),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}}),Object(p.withDispatch)(e=>{const{editPost:t}=e("core/editor");return{onUpdateSlug(e){t({slug:e})}}}),b.withInstanceId])(vs);var ys=Object(b.compose)([Object(p.withSelect)(e=>{const t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(u.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}})])((function({hasStickyAction:e,postType:t,children:n}){return"post"===t&&e?n:null}));var ws=Object(b.compose)([Object(p.withSelect)(e=>({postSticky:e("core/editor").getEditedPostAttribute("sticky")})),Object(p.withDispatch)(e=>({onUpdateSticky(t){e("core/editor").editPost({sticky:t})}}))])((function({onUpdateSticky:e,postSticky:t=!1}){return Object(l.createElement)(ys,null,Object(l.createElement)(Po.CheckboxControl,{label:Object(Xt.__)("Stick to the top of the blog"),checked:t,onChange:()=>e(!t)}))}));const Ss={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"};class Es extends l.Component{constructor(){super(...arguments),this.findTerm=this.findTerm.bind(this),this.onChange=this.onChange.bind(this),this.onChangeFormName=this.onChangeFormName.bind(this),this.onChangeFormParent=this.onChangeFormParent.bind(this),this.onAddTerm=this.onAddTerm.bind(this),this.onToggleForm=this.onToggleForm.bind(this),this.setFilterValue=this.setFilterValue.bind(this),this.sortBySelected=this.sortBySelected.bind(this),this.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]}}onChange(e){const{onUpdateTerms:t,terms:n=[],taxonomy:o}=this.props;t(-1!==n.indexOf(e)?Object(u.without)(n,e):[...n,e],o.rest_base)}onChangeFormName(e){const t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}onChangeFormParent(e){this.setState({formParent:e})}onToggleForm(){this.setState(e=>({showForm:!e.showForm}))}findTerm(e,t,n){return Object(u.find)(e,e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase())}onAddTerm(e){e.preventDefault();const{onUpdateTerms:t,taxonomy:n,terms:o,slug:r}=this.props,{formName:s,formParent:i,adding:c,availableTerms:a}=this.state;if(""===s||c)return;const l=this.findTerm(a,i,s);if(l)return Object(u.some)(o,e=>e===l.id)||t([...o,l.id],n.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=g()({path:"/wp/v2/"+n.rest_base,method:"POST",data:{name:s,parent:i||void 0}});this.addRequest.catch(e=>"term_exists"===e.code?(this.addRequest=g()({path:Object(P.addQueryArgs)("/wp/v2/"+n.rest_base,{...Ss,parent:i||0,search:s})}),this.addRequest.then(e=>this.findTerm(e,i,s))):Promise.reject(e)).then(e=>{const s=!!Object(u.find)(this.state.availableTerms,t=>t.id===e.id)?this.state.availableTerms:[e,...this.state.availableTerms],i=Object(Xt.sprintf)(Object(Xt._x)("%s added","term"),Object(u.get)(this.props.taxonomy,["labels","singular_name"],"category"===r?Object(Xt.__)("Category"):Object(Xt.__)("Term")));this.props.speak(i,"assertive"),this.addRequest=null,this.setState({adding:!1,formName:"",formParent:"",availableTerms:s,availableTermsTree:this.sortBySelected(Zo(s))}),t([...o,e.id],n.rest_base)},e=>{"abort"!==e.statusText&&(this.addRequest=null,this.setState({adding:!1}))})}componentDidMount(){this.fetchTerms()}componentWillUnmount(){Object(u.invoke)(this.fetchRequest,["abort"]),Object(u.invoke)(this.addRequest,["abort"])}componentDidUpdate(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}fetchTerms(){const{taxonomy:e}=this.props;e&&(this.fetchRequest=g()({path:Object(P.addQueryArgs)("/wp/v2/"+e.rest_base,Ss)}),this.fetchRequest.then(e=>{const t=this.sortBySelected(Zo(e));this.fetchRequest=null,this.setState({loading:!1,availableTermsTree:t,availableTerms:e})},e=>{"abort"!==e.statusText&&(this.fetchRequest=null,this.setState({loading:!1}))}))}sortBySelected(e){const{terms:t}=this.props,n=e=>{if(-1!==t.indexOf(e.id))return!0;if(void 0===e.children)return!1;return!!(e.children.map(n).filter(e=>e).length>0)};return e.sort((e,t)=>{const o=n(e),r=n(t);return o===r?0:o&&!r?-1:!o&&r?1:0}),e}setFilterValue(e){const{availableTermsTree:t}=this.state,n=e.target.value,o=t.map(this.getFilterMatcher(n)).filter(e=>e),r=e=>{let t=0;for(let n=0;n<e.length;n++)t++,void 0!==e[n].children&&(t+=r(e[n].children));return t};this.setState({filterValue:n,filteredTermsTree:o});const s=r(o),i=Object(Xt.sprintf)(Object(Xt._n)("%d result found.","%d results found.",s),s);this.props.debouncedSpeak(i,"assertive")}getFilterMatcher(e){const t=n=>{if(""===e)return n;const o={...n};return o.children.length>0&&(o.children=o.children.map(t).filter(e=>e)),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}renderTerms(e){const{terms:t=[]}=this.props;return e.map(e=>Object(l.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(l.createElement)(Po.CheckboxControl,{checked:-1!==t.indexOf(e.id),onChange:()=>{const t=parseInt(e.id,10);this.onChange(t)},label:Object(u.unescape)(e.name)}),!!e.children.length&&Object(l.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},this.renderTerms(e.children))))}render(){const{slug:e,taxonomy:t,instanceId:n,hasCreateAction:o,hasAssignAction:r}=this.props;if(!r)return null;const{availableTermsTree:s,availableTerms:i,filteredTermsTree:c,formName:a,formParent:d,loading:p,showForm:b,filterValue:m}=this.state,h=(n,o,r)=>Object(u.get)(t,["labels",n],"category"===e?o:r),f=h("add_new_item",Object(Xt.__)("Add new category"),Object(Xt.__)("Add new term")),g=h("new_item_name",Object(Xt.__)("Add new category"),Object(Xt.__)("Add new term")),O=h("parent_item",Object(Xt.__)("Parent Category"),Object(Xt.__)("Parent Term")),j=`— ${O} —`,v=f,_="editor-post-taxonomies__hierarchical-terms-input-"+n,y="editor-post-taxonomies__hierarchical-terms-filter-"+n,w=Object(u.get)(this.props.taxonomy,["labels","search_items"],Object(Xt.__)("Search Terms")),S=Object(u.get)(this.props.taxonomy,["name"],Object(Xt.__)("Terms")),E=i.length>=8;return[E&&Object(l.createElement)("label",{key:"filter-label",htmlFor:y},w),E&&Object(l.createElement)("input",{type:"search",id:y,value:m,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(l.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":S},this.renderTerms(""!==m?c:s)),!p&&o&&Object(l.createElement)(Po.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":b,isLink:!0},f),b&&Object(l.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(l.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},g),Object(l.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:a,onChange:this.onChangeFormName,required:!0}),!!i.length&&Object(l.createElement)(Po.TreeSelect,{label:O,noOptionLabel:j,onChange:this.onChangeFormParent,selectedId:d,tree:s}),Object(l.createElement)(Po.Button,{isSecondary:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},v))]}}var Ps=Object(b.compose)([Object(p.withSelect)((e,{slug:t})=>{const{getCurrentPost:n}=e("core/editor"),{getTaxonomy:o}=e("core"),r=o(t);return{hasCreateAction:!!r&&Object(u.get)(n(),["_links","wp:action-create-"+r.rest_base],!1),hasAssignAction:!!r&&Object(u.get)(n(),["_links","wp:action-assign-"+r.rest_base],!1),terms:r?e("core/editor").getEditedPostAttribute(r.rest_base):[],taxonomy:r}}),Object(p.withDispatch)(e=>({onUpdateTerms(t,n){e("core/editor").editPost({[n]:t})}})),Po.withSpokenMessages,b.withInstanceId,Object(Po.withFilters)("editor.PostTaxonomyType")])(Es);var ks=Object(b.compose)([Object(p.withSelect)(e=>({postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}))])((function({postType:e,taxonomies:t,taxonomyWrapper:n=u.identity}){const o=Object(u.filter)(t,t=>Object(u.includes)(t.types,e));return Object(u.filter)(o,e=>e.visibility.show_ui).map(e=>{const t=e.hierarchical?Ps:Zr;return Object(l.createElement)(l.Fragment,{key:"taxonomy-"+e.slug},n(Object(l.createElement)(t,{slug:e.slug}),e))})}));var Ts=Object(b.compose)([Object(p.withSelect)(e=>({postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}))])((function({postType:e,taxonomies:t,children:n}){return Object(u.some)(t,t=>Object(u.includes)(t.types,e))?n:null})),Cs=n("./node_modules/react-autosize-textarea/lib/index.js"),xs=n.n(Cs);function Bs(){const e=Object(p.useSelect)(e=>e("core/editor").getEditedPostContent(),[]),{editPost:t,resetEditorBlocks:n}=Object(p.useDispatch)("core/editor"),[o,r]=Object(l.useState)(e),[s,i]=Object(l.useState)(!1),c=Object(b.useInstanceId)(Bs);s||o===e||r(e);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Po.VisuallyHidden,{as:"label",htmlFor:"post-content-"+c},Object(Xt.__)("Type text or HTML")),Object(l.createElement)(xs.a,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{const n=e.target.value;t({content:n}),r(n),i(!0)},onBlur:()=>{if(s){const e=Object(d.parse)(o);n(e),i(!1)}},className:"editor-post-text-editor",id:"post-content-"+c,placeholder:Object(Xt.__)("Start writing with text or HTML")}))}const As=/[\r\n]+/g;function Is(){const e=Object(b.useInstanceId)(Is),t=Object(l.useRef)(),[n,o]=Object(l.useState)(!1),{editPost:r}=Object(p.useDispatch)("core/editor"),{insertDefaultBlock:i,clearSelectedBlock:c,insertBlocks:a}=Object(p.useDispatch)(s.store),{isCleanNewPost:u,title:m,placeholder:h,isFocusMode:f,hasFixedToolbar:g}=Object(p.useSelect)(e=>{const{getEditedPostAttribute:t,isCleanNewPost:n}=e("core/editor"),{getSettings:o}=e(s.store),{titlePlaceholder:r,focusMode:i,hasFixedToolbar:c}=o();return{isCleanNewPost:n(),title:t("title"),placeholder:r,isFocusMode:i,hasFixedToolbar:c}});function O(e){a(e,0)}function j(e){r({title:e})}function v(){o(!1)}Object(l.useEffect)(()=>{if(!t.current)return;const{ownerDocument:e}=t.current,{activeElement:n,body:o}=e;!u||n&&o!==n||t.current.focus()},[u]);const _=uo()("wp-block editor-post-title editor-post-title__block",{"is-selected":n,"is-focus-mode":f,"has-fixed-toolbar":g}),y=Object(Jo.decodeEntities)(h);return Object(l.createElement)(Qo,{supportKeys:"title"},Object(l.createElement)("div",{className:_},Object(l.createElement)(Po.VisuallyHidden,{as:"label",htmlFor:"post-title-"+e},y||Object(Xt.__)("Add title")),Object(l.createElement)(xs.a,{ref:t,id:"post-title-"+e,className:"editor-post-title__input",value:m,onChange:function(e){j(e.target.value.replace(As," "))},placeholder:y||Object(Xt.__)("Add title"),onFocus:function(){o(!0),c()},onBlur:v,onKeyDown:function(e){e.keyCode===ko.ENTER&&(e.preventDefault(),i(void 0,void 0,0))},onKeyPress:v,onPaste:function(e){const t=e.clipboardData;let n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",n);const r=Object(d.pasteHandler)({HTML:o,plainText:n});if("string"!=typeof r&&r.length){e.preventDefault();const[t]=r;m||"core/heading"!==t.name&&"core/paragraph"!==t.name?O(r):(j(t.attributes.content),O(r.slice(1)))}}})))}var Rs=Object(b.compose)([Object(p.withSelect)(e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e("core/editor");return{isNew:t(),postId:n(),postType:o()}}),Object(p.withDispatch)(e=>({trashPost:e("core/editor").trashPost}))])((function({isNew:e,postId:t,postType:n,...o}){return e||!t?null:Object(l.createElement)(Po.Button,{className:"editor-post-trash",isDestructive:!0,isTertiary:!0,onClick:()=>o.trashPost(t,n)},Object(Xt.__)("Move to trash"))}));var Ns=Object(p.withSelect)(e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e("core/editor"),{getPostType:r,canUser:s}=e("core"),i=n(),c=r(o()),a=(null==c?void 0:c.rest_base)||"";return{isNew:t(),postId:i,canUserDelete:!(!i||!a)&&s("delete",a,i)}})((function({isNew:e,postId:t,canUserDelete:n,children:o}){return!e&&t&&n?o:null}));var Ds=Object(b.compose)([Object(p.withSelect)(e=>{const{getCurrentPost:t,getCurrentPostType:n}=e("core/editor");return{hasPublishAction:Object(u.get)(t(),["_links","wp:action-publish"],!1),postType:n()}})])((function({hasPublishAction:e,render:t}){return t({canEdit:e})}));var Ls=Object(l.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(D.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Us=n("@wordpress/wordcount");function Fs(){const e=Object(p.useSelect)(e=>e("core/editor").getEditedPostAttribute("content")),t=Object(Xt._x)("words","Word count type. Do not translate!");return Object(l.createElement)("span",{className:"word-count"},Object(Us.count)(e,t))}function Ms(){const e=Object(p.useSelect)(e=>e("core/editor").getEditedPostAttribute("content"));return Object(Us.count)(e,"characters_including_spaces")}var zs=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:n,paragraphCount:o,numberOfBlocks:r}=Object(p.useSelect)(e=>{const{getGlobalBlockCount:t}=e(s.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}},[]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(Xt.__)("Document Statistics"),tabIndex:"0"},Object(l.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(l.createElement)("li",{className:"table-of-contents__count"},Object(Xt.__)("Characters"),Object(l.createElement)("span",{className:"table-of-contents__number"},Object(l.createElement)(Ms,null))),Object(l.createElement)("li",{className:"table-of-contents__count"},Object(Xt.__)("Words"),Object(l.createElement)(Fs,null)),Object(l.createElement)("li",{className:"table-of-contents__count"},Object(Xt.__)("Headings"),Object(l.createElement)("span",{className:"table-of-contents__number"},n)),Object(l.createElement)("li",{className:"table-of-contents__count"},Object(Xt.__)("Paragraphs"),Object(l.createElement)("span",{className:"table-of-contents__number"},o)),Object(l.createElement)("li",{className:"table-of-contents__count"},Object(Xt.__)("Blocks"),Object(l.createElement)("span",{className:"table-of-contents__number"},r)))),n>0&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("hr",null),Object(l.createElement)("h2",{className:"table-of-contents__title"},Object(Xt.__)("Document Outline")),Object(l.createElement)(jo,{onSelect:t,hasOutlineItemsDisabled:e})))};var Vs=Object(l.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...n},o){const r=Object(p.useSelect)(e=>!!e(s.store).getBlockCount(),[]);return Object(l.createElement)(Po.Dropdown,{position:t?"middle right right":"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>Object(l.createElement)(Po.Button,Object(a.a)({},n,{ref:o,onClick:r?t:void 0,icon:Ls,"aria-expanded":e,"aria-haspopup":"true",label:Object(Xt.__)("Details"),tooltipPosition:"bottom","aria-disabled":!r})),renderContent:({onClose:t})=>Object(l.createElement)(zs,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Hs(){const e=Object(p.useSelect)(e=>()=>{const{__experimentalGetDirtyEntityRecords:t}=e("core");return t().length>0},[]),t=t=>{if(e())return t.returnValue=Object(Xt.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return Object(l.useEffect)(()=>(window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}),[]),null}var Ws=n("@wordpress/reusable-blocks");var Gs=Object(b.createHigherOrderComponent)(e=>Object(p.withRegistry)(t=>{const{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return Object(l.createElement)(e,r);const[i,c]=Object(l.useState)(null);return Object(l.useEffect)(()=>{const e=Object(p.createRegistry)({"core/block-editor":s.storeConfig},o);e.registerStore("core/editor",so),c(e)},[o]),i?Object(l.createElement)(p.RegistryProvider,{value:i},Object(l.createElement)(e,r)):null}),"withRegistryProvider"),qs=n("@wordpress/media-utils");function Ks({additionalData:e={},allowedTypes:t,filesList:n,maxUploadFileSize:o,onError:r=u.noop,onFileChange:s}){const{getCurrentPostId:i,getEditorSettings:c}=Object(p.select)("core/editor"),a=c().allowedMimeTypes;o=o||c().maxUploadFileSize,Object(qs.uploadMedia)({allowedTypes:t,filesList:n,onFileChange:s,additionalData:{post:i(),...e},maxUploadFileSize:o,onError:({message:e})=>r(e),wpAllowedMimeTypes:a})}var $s=function(e,t){const{reusableBlocks:n,hasUploadPermissions:o,canUseUnfilteredHTML:r,isTitleSelected:s}=Object(p.useSelect)(e=>{const{canUserUseUnfilteredHTML:t,isPostTitleSelected:n}=e(io),{canUser:o}=e(i.store);return{canUseUnfilteredHTML:t(),reusableBlocks:e(i.store).getEntityRecords("postType","wp_block",{per_page:l.Platform.select({web:-1,native:100})}),hasUploadPermissions:Object(u.defaultTo)(o("create","media"),!0),isTitleSelected:n&&n()}},[]),{undo:c}=Object(p.useDispatch)(io);return Object(l.useMemo)(()=>({...Object(u.pick)(e,["__experimentalBlockDirectory","__experimentalBlockPatternCategories","__experimentalBlockPatterns","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","__experimentalGlobalStylesUserEntityId","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","alignWide","allowedBlockTypes","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","focusMode","fontSizes","gradients","hasFixedToolbar","hasReducedUI","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock"]),mediaUpload:o?Ks:void 0,__experimentalReusableBlocks:n,__experimentalFetchLinkSuggestions:(t,n)=>Object(i.__experimentalFetchLinkSuggestions)(t,n,e),__experimentalFetchRemoteUrlData:e=>Object(i.__experimentalFetchRemoteUrlData)(e),__experimentalCanUserUseUnfilteredHTML:r,__experimentalUndo:c,__experimentalShouldInsertAtTheTop:s,outlineMode:t}),[e,o,n,r,c,s,t])};var Qs=Gs((function({__unstableTemplate:e,post:t,settings:n,recovery:o,initialEdits:r,children:c}){const a=Object(l.useMemo)(()=>"wp_template"===t.type?{}:{postId:t.id,postType:t.type},[t.id,t.type]),{selection:u,isReady:d}=Object(p.useSelect)(e=>{const{getEditorSelection:t,__unstableIsEditorReady:n}=e(io);return{isReady:n(),selection:t()}},[]),{id:b,type:m}=null!=e?e:t,[h,f,g]=Object(i.useEntityBlockEditor)("postType",m,{id:b}),O=$s(n,!!e),{updatePostLock:j,setupEditor:v,updateEditorSettings:_,__experimentalTearDownEditor:y}=Object(p.useDispatch)(io),{createWarningNotice:w}=Object(p.useDispatch)(Yt.store);return Object(l.useLayoutEffect)(()=>{if(!o)return j(n.postLock),v(t,r,n.template),n.autosave&&w(Object(Xt.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(Xt.__)("View the autosave"),url:n.autosave.editLink}]}),()=>{y()}},[]),Object(l.useEffect)(()=>{_(n)},[n]),d?Object(l.createElement)(i.EntityProvider,{kind:"root",type:"site"},Object(l.createElement)(i.EntityProvider,{kind:"postType",type:t.type,id:t.id},Object(l.createElement)(s.BlockContextProvider,{value:a},Object(l.createElement)(s.BlockEditorProvider,{value:h,onChange:g,onInput:f,selection:u,settings:O,useSubRegistry:!1},c,Object(l.createElement)(Ws.ReusableBlocksMenuItems,null))))):null})),Ys=n("@wordpress/server-side-render"),Xs=n.n(Ys);function Js(e,t,n=[]){const o=Object(l.forwardRef)((n,o)=>(T()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e}),Object(l.createElement)(t,Object(a.a)({ref:o},n))));return n.forEach(n=>{o[n]=Js(e+"."+n,t[n])}),o}function Zs(e,t){return(...n)=>(T()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e}),t(...n))}const ei=Js("RichText",s.RichText,["Content"]);ei.isEmpty=Zs("RichText.isEmpty",s.RichText.isEmpty);const ti=Js("Autocomplete",s.Autocomplete),ni=Js("AlignmentToolbar",s.AlignmentToolbar),oi=Js("BlockAlignmentToolbar",s.BlockAlignmentToolbar),ri=Js("BlockControls",s.BlockControls,["Slot"]),si=Js("BlockEdit",s.BlockEdit),ii=Js("BlockEditorKeyboardShortcuts",s.BlockEditorKeyboardShortcuts),ci=Js("BlockFormatControls",s.BlockFormatControls,["Slot"]),ai=Js("BlockIcon",s.BlockIcon),li=Js("BlockInspector",s.BlockInspector),ui=Js("BlockList",s.BlockList),di=Js("BlockMover",s.BlockMover),pi=Js("BlockNavigationDropdown",s.BlockNavigationDropdown),bi=Js("BlockSelectionClearer",s.BlockSelectionClearer),mi=Js("BlockSettingsMenu",s.BlockSettingsMenu),hi=Js("BlockTitle",s.BlockTitle),fi=Js("BlockToolbar",s.BlockToolbar),gi=Js("ColorPalette",s.ColorPalette),Oi=Js("ContrastChecker",s.ContrastChecker),ji=Js("CopyHandler",s.CopyHandler),vi=Js("DefaultBlockAppender",s.DefaultBlockAppender),_i=Js("FontSizePicker",s.FontSizePicker),yi=Js("Inserter",s.Inserter),wi=Js("InnerBlocks",s.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),Si=Js("InspectorAdvancedControls",s.InspectorAdvancedControls,["Slot"]),Ei=Js("InspectorControls",s.InspectorControls,["Slot"]),Pi=Js("PanelColorSettings",s.PanelColorSettings),ki=Js("PlainText",s.PlainText),Ti=Js("RichTextShortcut",s.RichTextShortcut),Ci=Js("RichTextToolbarButton",s.RichTextToolbarButton),xi=Js("__unstableRichTextInputEvent",s.__unstableRichTextInputEvent),Bi=Js("MediaPlaceholder",s.MediaPlaceholder),Ai=Js("MediaUpload",s.MediaUpload),Ii=Js("MediaUploadCheck",s.MediaUploadCheck),Ri=Js("MultiSelectScrollIntoView",s.MultiSelectScrollIntoView),Ni=Js("NavigableToolbar",s.NavigableToolbar),Di=Js("ObserveTyping",s.ObserveTyping),Li=Js("PreserveScrollInReorder",s.PreserveScrollInReorder),Ui=Js("SkipToSelectedBlock",s.SkipToSelectedBlock),Fi=Js("URLInput",s.URLInput),Mi=Js("URLInputButton",s.URLInputButton),zi=Js("URLPopover",s.URLPopover),Vi=Js("Warning",s.Warning),Hi=Js("WritingFlow",s.WritingFlow),Wi=Zs("createCustomColorsHOC",s.createCustomColorsHOC),Gi=Zs("getColorClassName",s.getColorClassName),qi=Zs("getColorObjectByAttributeValues",s.getColorObjectByAttributeValues),Ki=Zs("getColorObjectByColorValue",s.getColorObjectByColorValue),$i=Zs("getFontSize",s.getFontSize),Qi=Zs("getFontSizeClass",s.getFontSizeClass),Yi=Zs("withColorContext",s.withColorContext),Xi=Zs("withColors",s.withColors),Ji=Zs("withFontSizes",s.withFontSizes)},"./node_modules/@wordpress/icons/build-module/icon/index.js":function(e,t,n){"use strict";var o=n("@wordpress/element");t.a=function({icon:e,size:t=24,...n}){return Object(o.cloneElement)(e,{width:t,height:t,...n})}},"./node_modules/@wordpress/icons/build-module/library/check.js":function(e,t,n){"use strict";var o=n("@wordpress/element"),r=n("@wordpress/primitives");const s=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=s},"./node_modules/@wordpress/icons/build-module/library/close-small.js":function(e,t,n){"use strict";var o=n("@wordpress/element"),r=n("@wordpress/primitives");const s=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=s},"./node_modules/@wordpress/icons/build-module/library/close.js":function(e,t,n){"use strict";var o=n("@wordpress/element"),r=n("@wordpress/primitives");const s=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.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"}));t.a=s},"./node_modules/@wordpress/icons/build-module/library/layout.js":function(e,t,n){"use strict";var o=n("@wordpress/element"),r=n("@wordpress/primitives");const s=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.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"}));t.a=s},"./node_modules/@wordpress/icons/build-module/library/wordpress.js":function(e,t,n){"use strict";var o=n("@wordpress/element"),r=n("@wordpress/primitives");const s=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(r.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));t.a=s},"./node_modules/autosize/dist/autosize.js":function(e,t,n){var o,r,s;
|
||
/*!
|
||
autosize 4.0.4
|
||
license: MIT
|
||
http://www.jacklmoore.com/autosize
|
||
*/r=[e,t],void 0===(s="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))}}),s=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t,n=null,o=null,i=null,c=function(){e.clientWidth!==o&&d()},a=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!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",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",c,!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:a,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 l(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&&(l("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(l("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==o){i=o;var r=s("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}function c(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],c),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?o.apply(t,r):o)||(e.exports=s)},"./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 s=typeof o;if("string"===s||"number"===s)e.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&e.push(i)}}else if("object"===s)if(o.toString===Object.prototype.toString)for(var c in o)n.call(o,c)&&o[c]&&e.push(c);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/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 s=e.nodeName,i=document.createElement(s);i.innerHTML=" ","TEXTAREA"===s.toUpperCase()&&i.setAttribute("rows","1");var c=o(e,"font-size");i.style.fontSize=c,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},"./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 s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,i){if(i!==o){var c=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 c.name="Invariant Violation",c}}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:s,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)}),s=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},i=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 c=n("react"),a=n("./node_modules/prop-types/index.js"),l=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&&l(e.textarea)})):this.textarea&&l(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),l.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),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),l=this.state.lineHeight,u=n&&l?l*n:null;return c.createElement("textarea",s({},a,{onChange:this.onChange,style:u?s({},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&&l.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(c.Component);t.TextareaAutosize=c.forwardRef((function(e,t){return c.createElement(d,s({},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/rememo/es/rememo.js":function(e,t,n){"use strict";var o,r;function s(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function c(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,a;function l(){n=r?new WeakMap:i()}function u(){var n,o,r,s,i,l=arguments.length;for(s=new Array(l),r=0;r<l;r++)s[r]=arguments[r];for(i=t.apply(null,s),(n=a(i)).isUniqueByDependants||(n.lastDependants&&!c(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),o=n.head;o;){if(c(o.args,s,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,s)},s[0]=null,o.args=s,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=s),a=r?function(e){var t,r,s,c,a,l=n,u=!0;for(t=0;t<e.length;t++){if(r=e[t],!(a=r)||"object"!=typeof a){u=!1;break}l.has(r)?l=l.get(r):(s=new WeakMap,l.set(r,s),l=s)}return l.has(o)||((c=i()).isUniqueByDependants=u,l.set(o,c)),l.get(o)}:function(){return n},u.getDependants=t,u.clear=l,l(),u}},"@wordpress/api-fetch":function(e,t){e.exports=window.wp.apiFetch},"@wordpress/block-editor":function(e,t){e.exports=window.wp.blockEditor},"@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/core-data":function(e,t){e.exports=window.wp.coreData},"@wordpress/data":function(e,t){e.exports=window.wp.data},"@wordpress/data-controls":function(e,t){e.exports=window.wp.dataControls},"@wordpress/date":function(e,t){e.exports=window.wp.date},"@wordpress/deprecated":function(e,t){e.exports=window.wp.deprecated},"@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/keyboard-shortcuts":function(e,t){e.exports=window.wp.keyboardShortcuts},"@wordpress/keycodes":function(e,t){e.exports=window.wp.keycodes},"@wordpress/media-utils":function(e,t){e.exports=window.wp.mediaUtils},"@wordpress/notices":function(e,t){e.exports=window.wp.notices},"@wordpress/primitives":function(e,t){e.exports=window.wp.primitives},"@wordpress/reusable-blocks":function(e,t){e.exports=window.wp.reusableBlocks},"@wordpress/rich-text":function(e,t){e.exports=window.wp.richText},"@wordpress/server-side-render":function(e,t){e.exports=window.wp.serverSideRender},"@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}}); |