/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=438)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.blocks}()},100:function(e,t){!function(){e.exports=this.wp.notices}()},103:function(e,t){!function(){e.exports=this.wp.autop}()},11:function(e,t,n){var r; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},152:function(e,t){!function(){e.exports=this.wp.mediaUtils}()},154:function(e,t,n){"use strict";var r=n(0),o=n(6),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=i},155:function(e,t,n){"use strict";var r=n(0),o=n(6),i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=i},16:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},173:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,c=null,a=function(){e.clientWidth!==r&&d()},s=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:s,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function l(){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),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){l();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:o,innerState:e}}e.exports=function(e){function t(t,n,o){return t.length&&(t=t.concat([{action:o}])),c(n=e(n,o),o),r({optimist:t},n)}return function(n,o){if(o.optimist)switch(o.optimist.type){case"BEGIN":return function(t,n){var o=a(t),i=o.optimist,s=o.innerState;return i=i.concat([{beforeState:s,action:n}]),c(s=e(s,n),n),r({optimist:i},s)}(n,o);case"COMMIT":return function(e,n){var r=a(e),o=r.optimist,c=r.innerState,s=[],u=!1,l=!1;return o.forEach((function(e){u?e.beforeState&&i(e.action,n.optimist.id)?(l=!0,s.push({action:e.action})):s.push(e):e.beforeState&&!i(e.action,n.optimist.id)?(u=!0,s.push(e)):e.beforeState&&i(e.action,n.optimist.id)&&(l=!0)})),l||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist'),t(o=s,c,n)}(n,o);case"REVERT":return function(n,r){var o=a(n),s=o.optimist,u=o.innerState,l=[],d=!1,p=!1,b=u;return s.forEach((function(t){t.beforeState&&i(t.action,r.optimist.id)&&(b=t.beforeState,p=!0),i(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?l.push({beforeState:b,action:t.action}):l.push(t)),p&&(b=e(b,t.action),c(u,r)))})),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist'),t(s=l,b,r)}(n,o)}var s=a(n),u=s.optimist,l=s.innerState;if(n&&!u.length){var d=e(l,o);return d===l?n:(c(d,o),r({optimist:u},d))}return t(u,l,o)}},e.exports.BEGIN="BEGIN",e.exports.COMMIT="COMMIT",e.exports.REVERT="REVERT"},438:function(e,t,n){"use strict";n.r(t),n.d(t,"userAutocompleter",(function(){return oo})),n.d(t,"AutosaveMonitor",(function(){return bo})),n.d(t,"DocumentOutline",(function(){return Eo})),n.d(t,"DocumentOutlineCheck",(function(){return So})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return Co})),n.d(t,"EditorGlobalKeyboardShortcuts",(function(){return To})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return Bo})),n.d(t,"EditorKeyboardShortcutsRegister",(function(){return xo})),n.d(t,"EditorHistoryRedo",(function(){return Lo})),n.d(t,"EditorHistoryUndo",(function(){return Uo})),n.d(t,"EditorNotices",(function(){return Mo})),n.d(t,"EntitiesSavedStates",(function(){return Xo})),n.d(t,"ErrorBoundary",(function(){return ei})),n.d(t,"LocalAutosaveMonitor",(function(){return oi})),n.d(t,"PageAttributesCheck",(function(){return ii})),n.d(t,"PageAttributesOrder",(function(){return si})),n.d(t,"PageAttributesParent",(function(){return fi})),n.d(t,"PageTemplate",(function(){return hi})),n.d(t,"PostAuthor",(function(){return ji})),n.d(t,"PostAuthorCheck",(function(){return vi})),n.d(t,"PostComments",(function(){return yi})),n.d(t,"PostExcerpt",(function(){return _i})),n.d(t,"PostExcerptCheck",(function(){return ki})),n.d(t,"PostFeaturedImage",(function(){return Ri})),n.d(t,"PostFeaturedImageCheck",(function(){return Si})),n.d(t,"PostFormat",(function(){return Di})),n.d(t,"PostFormatCheck",(function(){return Ii})),n.d(t,"PostLastRevision",(function(){return Ui})),n.d(t,"PostLastRevisionCheck",(function(){return Ni})),n.d(t,"PostLockedModal",(function(){return Wi})),n.d(t,"PostPendingStatus",(function(){return Ki})),n.d(t,"PostPendingStatusCheck",(function(){return Gi})),n.d(t,"PostPingbacks",(function(){return qi})),n.d(t,"PostPreviewButton",(function(){return Vi})),n.d(t,"PostPublishButton",(function(){return Xi})),n.d(t,"PostPublishButtonLabel",(function(){return $i})),n.d(t,"PostPublishPanel",(function(){return Cc})),n.d(t,"PostSavedState",(function(){return Lc})),n.d(t,"PostSchedule",(function(){return oc})),n.d(t,"PostScheduleCheck",(function(){return Nc})),n.d(t,"PostScheduleLabel",(function(){return ic})),n.d(t,"PostSlug",(function(){return Vc})),n.d(t,"PostSlugCheck",(function(){return Uc})),n.d(t,"PostSticky",(function(){return Hc})),n.d(t,"PostStickyCheck",(function(){return zc})),n.d(t,"PostSwitchToDraftButton",(function(){return Ic})),n.d(t,"PostTaxonomies",(function(){return Yc})),n.d(t,"PostTaxonomiesCheck",(function(){return Xc})),n.d(t,"PostTextEditor",(function(){return na})),n.d(t,"PostTitle",(function(){return sa})),n.d(t,"PostTrash",(function(){return ua})),n.d(t,"PostTrashCheck",(function(){return la})),n.d(t,"PostTypeSupportCheck",(function(){return ci})),n.d(t,"PostVisibility",(function(){return nc})),n.d(t,"PostVisibilityLabel",(function(){return rc})),n.d(t,"PostVisibilityCheck",(function(){return da})),n.d(t,"TableOfContents",(function(){return ma})),n.d(t,"UnsavedChangesWarning",(function(){return ga})),n.d(t,"WordCount",(function(){return fa})),n.d(t,"EditorProvider",(function(){return Aa})),n.d(t,"ServerSideRender",(function(){return La.a})),n.d(t,"RichText",(function(){return Fa})),n.d(t,"Autocomplete",(function(){return Ma})),n.d(t,"AlignmentToolbar",(function(){return Va})),n.d(t,"BlockAlignmentToolbar",(function(){return za})),n.d(t,"BlockControls",(function(){return Ha})),n.d(t,"BlockEdit",(function(){return Wa})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Ga})),n.d(t,"BlockFormatControls",(function(){return Ka})),n.d(t,"BlockIcon",(function(){return qa})),n.d(t,"BlockInspector",(function(){return $a})),n.d(t,"BlockList",(function(){return Qa})),n.d(t,"BlockMover",(function(){return Ya})),n.d(t,"BlockNavigationDropdown",(function(){return Xa})),n.d(t,"BlockSelectionClearer",(function(){return Ja})),n.d(t,"BlockSettingsMenu",(function(){return Za})),n.d(t,"BlockTitle",(function(){return es})),n.d(t,"BlockToolbar",(function(){return ts})),n.d(t,"ColorPalette",(function(){return ns})),n.d(t,"ContrastChecker",(function(){return rs})),n.d(t,"CopyHandler",(function(){return os})),n.d(t,"DefaultBlockAppender",(function(){return is})),n.d(t,"FontSizePicker",(function(){return cs})),n.d(t,"Inserter",(function(){return as})),n.d(t,"InnerBlocks",(function(){return ss})),n.d(t,"InspectorAdvancedControls",(function(){return us})),n.d(t,"InspectorControls",(function(){return ls})),n.d(t,"PanelColorSettings",(function(){return ds})),n.d(t,"PlainText",(function(){return ps})),n.d(t,"RichTextShortcut",(function(){return bs})),n.d(t,"RichTextToolbarButton",(function(){return fs})),n.d(t,"__unstableRichTextInputEvent",(function(){return hs})),n.d(t,"MediaPlaceholder",(function(){return ms})),n.d(t,"MediaUpload",(function(){return vs})),n.d(t,"MediaUploadCheck",(function(){return Os})),n.d(t,"MultiSelectScrollIntoView",(function(){return gs})),n.d(t,"NavigableToolbar",(function(){return js})),n.d(t,"ObserveTyping",(function(){return ys})),n.d(t,"PreserveScrollInReorder",(function(){return _s})),n.d(t,"SkipToSelectedBlock",(function(){return ks})),n.d(t,"URLInput",(function(){return Es})),n.d(t,"URLInputButton",(function(){return Ss})),n.d(t,"URLPopover",(function(){return Ps})),n.d(t,"Warning",(function(){return ws})),n.d(t,"WritingFlow",(function(){return Cs})),n.d(t,"createCustomColorsHOC",(function(){return Ts})),n.d(t,"getColorClassName",(function(){return Bs})),n.d(t,"getColorObjectByAttributeValues",(function(){return xs})),n.d(t,"getColorObjectByColorValue",(function(){return Rs})),n.d(t,"getFontSize",(function(){return Is})),n.d(t,"getFontSizeClass",(function(){return As})),n.d(t,"withColorContext",(function(){return Ds})),n.d(t,"withColors",(function(){return Ls})),n.d(t,"withFontSizes",(function(){return Ns})),n.d(t,"mediaUpload",(function(){return Ea})),n.d(t,"cleanForSlug",(function(){return kt})),n.d(t,"storeConfig",(function(){return $r})),n.d(t,"transformStyles",(function(){return i.transformStyles}));var r={};n.r(r),n.d(r,"setupEditor",(function(){return ce})),n.d(r,"__experimentalTearDownEditor",(function(){return ae})),n.d(r,"resetPost",(function(){return se})),n.d(r,"resetAutosave",(function(){return ue})),n.d(r,"__experimentalRequestPostUpdateStart",(function(){return le})),n.d(r,"__experimentalRequestPostUpdateFinish",(function(){return de})),n.d(r,"updatePost",(function(){return pe})),n.d(r,"setupEditorState",(function(){return be})),n.d(r,"editPost",(function(){return fe})),n.d(r,"__experimentalOptimisticUpdatePost",(function(){return he})),n.d(r,"savePost",(function(){return me})),n.d(r,"refreshPost",(function(){return ve})),n.d(r,"trashPost",(function(){return Oe})),n.d(r,"autosave",(function(){return ge})),n.d(r,"__experimentalLocalAutosave",(function(){return je})),n.d(r,"redo",(function(){return ye})),n.d(r,"undo",(function(){return _e})),n.d(r,"createUndoLevel",(function(){return ke})),n.d(r,"updatePostLock",(function(){return Ee})),n.d(r,"__experimentalFetchReusableBlocks",(function(){return Se})),n.d(r,"__experimentalReceiveReusableBlocks",(function(){return Pe})),n.d(r,"__experimentalSaveReusableBlock",(function(){return we})),n.d(r,"__experimentalDeleteReusableBlock",(function(){return Ce})),n.d(r,"__experimentalUpdateReusableBlock",(function(){return Te})),n.d(r,"__experimentalConvertBlockToStatic",(function(){return Be})),n.d(r,"__experimentalConvertBlockToReusable",(function(){return xe})),n.d(r,"enablePublishSidebar",(function(){return Re})),n.d(r,"disablePublishSidebar",(function(){return Ie})),n.d(r,"lockPostSaving",(function(){return Ae})),n.d(r,"unlockPostSaving",(function(){return De})),n.d(r,"lockPostAutosaving",(function(){return Le})),n.d(r,"unlockPostAutosaving",(function(){return Ne})),n.d(r,"resetEditorBlocks",(function(){return Ue})),n.d(r,"updateEditorSettings",(function(){return Fe})),n.d(r,"resetBlocks",(function(){return Ve})),n.d(r,"receiveBlocks",(function(){return ze})),n.d(r,"updateBlock",(function(){return He})),n.d(r,"updateBlockAttributes",(function(){return We})),n.d(r,"selectBlock",(function(){return Ge})),n.d(r,"startMultiSelect",(function(){return Ke})),n.d(r,"stopMultiSelect",(function(){return qe})),n.d(r,"multiSelect",(function(){return $e})),n.d(r,"clearSelectedBlock",(function(){return Qe})),n.d(r,"toggleSelection",(function(){return Ye})),n.d(r,"replaceBlocks",(function(){return Xe})),n.d(r,"replaceBlock",(function(){return Je})),n.d(r,"moveBlocksDown",(function(){return Ze})),n.d(r,"moveBlocksUp",(function(){return et})),n.d(r,"moveBlockToPosition",(function(){return tt})),n.d(r,"insertBlock",(function(){return nt})),n.d(r,"insertBlocks",(function(){return rt})),n.d(r,"showInsertionPoint",(function(){return ot})),n.d(r,"hideInsertionPoint",(function(){return it})),n.d(r,"setTemplateValidity",(function(){return ct})),n.d(r,"synchronizeTemplate",(function(){return at})),n.d(r,"mergeBlocks",(function(){return st})),n.d(r,"removeBlocks",(function(){return ut})),n.d(r,"removeBlock",(function(){return lt})),n.d(r,"toggleBlockMode",(function(){return dt})),n.d(r,"startTyping",(function(){return pt})),n.d(r,"stopTyping",(function(){return bt})),n.d(r,"enterFormattedText",(function(){return ft})),n.d(r,"exitFormattedText",(function(){return ht})),n.d(r,"insertDefaultBlock",(function(){return mt})),n.d(r,"updateBlockListSettings",(function(){return vt}));var o={};n.r(o),n.d(o,"hasEditorUndo",(function(){return Ct})),n.d(o,"hasEditorRedo",(function(){return Tt})),n.d(o,"isEditedPostNew",(function(){return Bt})),n.d(o,"hasChangedContent",(function(){return xt})),n.d(o,"isEditedPostDirty",(function(){return Rt})),n.d(o,"hasNonPostEntityChanges",(function(){return It})),n.d(o,"isCleanNewPost",(function(){return At})),n.d(o,"getCurrentPost",(function(){return Dt})),n.d(o,"getCurrentPostType",(function(){return Lt})),n.d(o,"getCurrentPostId",(function(){return Nt})),n.d(o,"getCurrentPostRevisionsCount",(function(){return Ut})),n.d(o,"getCurrentPostLastRevisionId",(function(){return Ft})),n.d(o,"getPostEdits",(function(){return Mt})),n.d(o,"getReferenceByDistinctEdits",(function(){return Vt})),n.d(o,"getCurrentPostAttribute",(function(){return zt})),n.d(o,"getEditedPostAttribute",(function(){return Ht})),n.d(o,"getAutosaveAttribute",(function(){return Wt})),n.d(o,"getEditedPostVisibility",(function(){return Gt})),n.d(o,"isCurrentPostPending",(function(){return Kt})),n.d(o,"isCurrentPostPublished",(function(){return qt})),n.d(o,"isCurrentPostScheduled",(function(){return $t})),n.d(o,"isEditedPostPublishable",(function(){return Qt})),n.d(o,"isEditedPostSaveable",(function(){return Yt})),n.d(o,"isEditedPostEmpty",(function(){return Xt})),n.d(o,"isEditedPostAutosaveable",(function(){return Jt})),n.d(o,"getAutosave",(function(){return Zt})),n.d(o,"hasAutosave",(function(){return en})),n.d(o,"isEditedPostBeingScheduled",(function(){return tn})),n.d(o,"isEditedPostDateFloating",(function(){return nn})),n.d(o,"isSavingPost",(function(){return rn})),n.d(o,"didPostSaveRequestSucceed",(function(){return on})),n.d(o,"didPostSaveRequestFail",(function(){return cn})),n.d(o,"isAutosavingPost",(function(){return an})),n.d(o,"isPreviewingPost",(function(){return sn})),n.d(o,"getEditedPostPreviewLink",(function(){return un})),n.d(o,"getSuggestedPostFormat",(function(){return ln})),n.d(o,"getBlocksForSerialization",(function(){return dn})),n.d(o,"getEditedPostContent",(function(){return pn})),n.d(o,"__experimentalGetReusableBlock",(function(){return bn})),n.d(o,"__experimentalIsSavingReusableBlock",(function(){return fn})),n.d(o,"__experimentalIsFetchingReusableBlock",(function(){return hn})),n.d(o,"__experimentalGetReusableBlocks",(function(){return mn})),n.d(o,"getStateBeforeOptimisticTransaction",(function(){return vn})),n.d(o,"isPublishingPost",(function(){return On})),n.d(o,"isPermalinkEditable",(function(){return gn})),n.d(o,"getPermalink",(function(){return jn})),n.d(o,"getEditedPostSlug",(function(){return yn})),n.d(o,"getPermalinkParts",(function(){return _n})),n.d(o,"inSomeHistory",(function(){return kn})),n.d(o,"isPostLocked",(function(){return En})),n.d(o,"isPostSavingLocked",(function(){return Sn})),n.d(o,"isPostAutosavingLocked",(function(){return Pn})),n.d(o,"isPostLockTakeover",(function(){return wn})),n.d(o,"getPostLockUser",(function(){return Cn})),n.d(o,"getActivePostLock",(function(){return Tn})),n.d(o,"canUserUseUnfilteredHTML",(function(){return Bn})),n.d(o,"isPublishSidebarEnabled",(function(){return xn})),n.d(o,"getEditorBlocks",(function(){return Rn})),n.d(o,"getEditorSelectionStart",(function(){return In})),n.d(o,"getEditorSelectionEnd",(function(){return An})),n.d(o,"__unstableIsEditorReady",(function(){return Dn})),n.d(o,"getEditorSettings",(function(){return Ln})),n.d(o,"getBlockName",(function(){return Un})),n.d(o,"isBlockValid",(function(){return Fn})),n.d(o,"getBlockAttributes",(function(){return Mn})),n.d(o,"getBlock",(function(){return Vn})),n.d(o,"getBlocks",(function(){return zn})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return Hn})),n.d(o,"getClientIdsOfDescendants",(function(){return Wn})),n.d(o,"getClientIdsWithDescendants",(function(){return Gn})),n.d(o,"getGlobalBlockCount",(function(){return Kn})),n.d(o,"getBlocksByClientId",(function(){return qn})),n.d(o,"getBlockCount",(function(){return $n})),n.d(o,"getBlockSelectionStart",(function(){return Qn})),n.d(o,"getBlockSelectionEnd",(function(){return Yn})),n.d(o,"getSelectedBlockCount",(function(){return Xn})),n.d(o,"hasSelectedBlock",(function(){return Jn})),n.d(o,"getSelectedBlockClientId",(function(){return Zn})),n.d(o,"getSelectedBlock",(function(){return er})),n.d(o,"getBlockRootClientId",(function(){return tr})),n.d(o,"getBlockHierarchyRootClientId",(function(){return nr})),n.d(o,"getAdjacentBlockClientId",(function(){return rr})),n.d(o,"getPreviousBlockClientId",(function(){return or})),n.d(o,"getNextBlockClientId",(function(){return ir})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return cr})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return ar})),n.d(o,"getMultiSelectedBlocks",(function(){return sr})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return ur})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return lr})),n.d(o,"isFirstMultiSelectedBlock",(function(){return dr})),n.d(o,"isBlockMultiSelected",(function(){return pr})),n.d(o,"isAncestorMultiSelected",(function(){return br})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return fr})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return hr})),n.d(o,"getBlockOrder",(function(){return mr})),n.d(o,"getBlockIndex",(function(){return vr})),n.d(o,"isBlockSelected",(function(){return Or})),n.d(o,"hasSelectedInnerBlock",(function(){return gr})),n.d(o,"isBlockWithinSelection",(function(){return jr})),n.d(o,"hasMultiSelection",(function(){return yr})),n.d(o,"isMultiSelecting",(function(){return _r})),n.d(o,"isSelectionEnabled",(function(){return kr})),n.d(o,"getBlockMode",(function(){return Er})),n.d(o,"isTyping",(function(){return Sr})),n.d(o,"isCaretWithinFormattedText",(function(){return Pr})),n.d(o,"getBlockInsertionPoint",(function(){return wr})),n.d(o,"isBlockInsertionPointVisible",(function(){return Cr})),n.d(o,"isValidTemplate",(function(){return Tr})),n.d(o,"getTemplate",(function(){return Br})),n.d(o,"getTemplateLock",(function(){return xr})),n.d(o,"canInsertBlockType",(function(){return Rr})),n.d(o,"getInserterItems",(function(){return Ir})),n.d(o,"hasInserterItems",(function(){return Ar})),n.d(o,"getBlockListSettings",(function(){return Dr}));var i=n(7),c=n(10),a=n(98),s=n(52),u=(n(100),n(25)),l=n(81),d=n(5),p=n(4),b=n(36),f=n(40),h=n(134),m=n.n(h),v=n(2);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var g={insertUsage:{},isPublishSidebarEnabled:!0},j=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_REUSABLE_BLOCKS":return _({},e,{},Object(v.keyBy)(t.results,"id"));case"UPDATE_REUSABLE_BLOCK":var n=t.id,r=t.changes;return _({},e,Object(d.a)({},n,_({},e[n],{},r)));case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return _({},Object(v.omit)(e,o),Object(d.a)({},i,_({},c,{id:i})));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(v.omit)(e,a)}return e},isFetching:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_REUSABLE_BLOCKS":var n=t.id;return n?_({},e,Object(d.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(v.omit)(e,r)}return e},isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_REUSABLE_BLOCK":return _({},e,Object(d.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(v.omit)(e,n)}return e}});var S=m()(Object(p.combineReducers)({postId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":return t.post.id}return e},postType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":return t.post.type}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENABLE_PUBLISH_SIDEBAR":return _({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return _({},e,{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},reusableBlocks:E,template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return _({},e,{isValid:t.isValid})}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return _({},e,Object(d.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(e,t.lockName)}return e},isReady:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return _({},e,{},t.settings)}return e},postAutosavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_AUTOSAVING":return _({},e,Object(d.a)({},t.lockName,!0));case"UNLOCK_POST_AUTOSAVING":return Object(v.omit)(e,t.lockName)}return e}})),P=n(110),w=n.n(P),C=n(24),T=n.n(C),B=n(50),x=n(45),R=n.n(x),I=n(1),A=n(18),D=n(37),L=n.n(D),N=new Set(["meta"]),U="core/editor",F=/%(?:postname|pagename)%/,M=["title","excerpt","content"];function V(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(v.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(v.includes)(i,t.status),a=Object(v.includes)(i,n.status),s=Object(v.get)(r,["viewable"],!1);if(c||a?c&&!a?(o=r.labels.item_reverted_to_draft,s=!1):o=!c&&a?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:o=null,o){var u=[];return s&&u.push({label:r.labels.view_item,url:n.link}),[o,{id:"SAVE_POST_NOTICE_ID",type:"snackbar",actions:u}]}return[]}function z(e){var t=e.post,n=e.edits,r=e.error;if(r&&"rest_autosave_no_changes"===r.code)return[];var o=["publish","private","future"],i=-1!==o.indexOf(t.status),c={publish:Object(I.__)("Publishing failed."),private:Object(I.__)("Publishing failed."),future:Object(I.__)("Scheduling failed.")},a=i||-1===o.indexOf(n.status)?Object(I.__)("Updating failed."):c[n.status];return r.message&&!/<\/?[^>]*>/.test(r.message)&&(a=[a,r.message].join(" ")),[a,{id:"SAVE_POST_NOTICE_ID"}]}var H=n(60),W=n.n(H),G=n(103),K=W()((function(e){1===e.length&&Object(c.isUnmodifiedDefaultBlock)(e[0])&&(e=[]);var t=Object(c.serialize)(e);return 1===e.length&&e[0].name===Object(c.getFreeformContentHandlerName)()&&(t=Object(G.removep)(t)),t}),{maxSize:1});function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",options:e}}function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_FINISH",options:e}}function pe(e){return{type:"UPDATE_POST",edits:e}}function be(e){return{type:"SETUP_EDITOR_STATE",post:e}}function fe(e,t){var n,r,o;return T.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(b.select)(U,"getCurrentPost");case 2:return n=i.sent,r=n.id,o=n.type,i.next=7,Object(b.dispatch)("core","editEntityRecord","postType",o,r,e,t);case 7:case"end":return i.stop()}}),X)}function he(e){return $({},pe(e),{optimist:{id:"post-update"}})}function me(){var e,t,n,r,o,i,c,a=arguments;return T.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},s.next=3,Object(b.select)(U,"isEditedPostSaveable");case 3:if(s.sent){s.next=5;break}return s.abrupt("return");case 5:return s.next=7,Object(b.select)(U,"getEditedPostContent");case 7:if(s.t0=s.sent,t={content:s.t0},e.isAutosave){s.next=12;break}return s.next=12,Object(b.dispatch)(U,"editPost",t,{undoIgnore:!0});case 12:return s.next=14,le(e);case 14:return s.next=16,Object(b.select)(U,"getCurrentPost");case 16:return n=s.sent,s.t1=$,s.t2={id:n.id},s.next=21,Object(b.select)("core","getEntityRecordNonTransientEdits","postType",n.type,n.id);case 21:return s.t3=s.sent,s.t4={},s.t5=t,t=(0,s.t1)(s.t2,s.t3,s.t4,s.t5),s.next=27,Object(b.dispatch)("core","saveEntityRecord","postType",n.type,t,e);case 27:return s.next=29,de(e);case 29:return s.next=31,Object(b.select)("core","getLastEntitySaveError","postType",n.type,n.id);case 31:if(!(r=s.sent)){s.next=39;break}if(!(o=z({post:n,edits:t,error:r})).length){s.next=37;break}return s.next=37,b.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(A.a)(o)));case 37:s.next=57;break;case 39:return s.next=41,Object(b.select)(U,"getCurrentPost");case 41:return i=s.sent,s.t6=V,s.t7=n,s.t8=i,s.next=47,Object(b.select)("core","getPostType",i.type);case 47:if(s.t9=s.sent,s.t10=e,s.t11={previousPost:s.t7,post:s.t8,postType:s.t9,options:s.t10},!(c=(0,s.t6)(s.t11)).length){s.next=54;break}return s.next=54,b.dispatch.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(A.a)(c)));case 54:if(e.isAutosave){s.next=57;break}return s.next=57,Object(b.dispatch)("core/block-editor","__unstableMarkLastChangeAsPersistent");case 57:case"end":return s.stop()}}),J)}function ve(){var e,t,n,r;return T.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(b.select)(U,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(b.select)(U,"getCurrentPostType");case 5:return t=o.sent,o.next=8,Object(b.select)("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(b.apiFetch)({path:"/wp/v2/".concat(n.rest_base,"/").concat(e.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,Object(b.dispatch)(U,"resetPost",r);case 14:case"end":return o.stop()}}),Z)}function Oe(){var e,t,n;return T.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(b.select)(U,"getCurrentPostType");case 2:return e=r.sent,r.next=5,Object(b.select)("core","getPostType",e);case 5:return t=r.sent,r.next=8,Object(b.dispatch)("core/notices","removeNotice","TRASH_POST_NOTICE_ID");case 8:return r.prev=8,r.next=11,Object(b.select)(U,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(b.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,Object(b.dispatch)(U,"savePost");case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,b.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(A.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(I.__)("Trashing failed"),{id:"TRASH_POST_NOTICE_ID"}])));case 22:case"end":return r.stop()}var o}),ee,null,[[8,18]])}function ge(e){return T.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(b.dispatch)(U,"savePost",$({isAutosave:!0},e));case 2:case"end":return t.stop()}}),te)}function je(){var e,t,n,r;return T.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(b.select)(U,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(b.select)(U,"getEditedPostAttribute","title");case 5:return t=o.sent,o.next=8,Object(b.select)(U,"getEditedPostAttribute","content");case 8:return n=o.sent,o.next=11,Object(b.select)(U,"getEditedPostAttribute","excerpt");case 11:return r=o.sent,o.next=14,{type:"LOCAL_AUTOSAVE_SET",postId:e.id,title:t,content:n,excerpt:r};case 14:case"end":return o.stop()}}),ne)}function ye(){return T.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.dispatch)("core","redo");case 2:case"end":return e.stop()}}),re)}function _e(){return T.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.dispatch)("core","undo");case 2:case"end":return e.stop()}}),oe)}function ke(){return{type:"CREATE_UNDO_LEVEL"}}function Ee(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Se(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Pe(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function we(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Ce(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function Te(e,t){return{type:"UPDATE_REUSABLE_BLOCK",id:e,changes:t}}function Be(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function xe(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(e)}}function Re(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Ie(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ae(e){return{type:"LOCK_POST_SAVING",lockName:e}}function De(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Le(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Ne(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function Ue(e){var t,n,r,o,i,c,a,s,u=arguments;return T.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.__unstableShouldCreateUndoLevel,r=t.selectionStart,o=t.selectionEnd,i={blocks:e,selectionStart:r,selectionEnd:o},!1===n){l.next=19;break}return l.next=6,Object(b.select)(U,"getCurrentPost");case 6:return c=l.sent,a=c.id,s=c.type,l.next=11,Object(b.__unstableSyncSelect)("core","getEditedEntityRecord","postType",s,a);case 11:if(l.t0=l.sent.blocks,l.t1=i.blocks,!(l.t0===l.t1)){l.next=18;break}return l.next=17,Object(b.dispatch)("core","__unstableCreateUndoLevel","postType",s,a);case 17:return l.abrupt("return",l.sent);case 18:i.content=function(e){var t=e.blocks;return K(void 0===t?[]:t)};case 19:return l.delegateYield(fe(i),"t2",20);case 20:case"end":return l.stop()}}),ie)}function Fe(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Me=function(e){return T.a.mark((function t(){var n,r,o,i=arguments;return T.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(L()("`wp.data.dispatch( 'core/editor' )."+e+"`",{alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),n=i.length,r=new Array(n),o=0;o1)return!1;var n=t[0].name;if(n!==Object(c.getDefaultBlockName)()&&n!==Object(c.getFreeformContentHandlerName)())return!1}return!pn(e)}var Jt=Object(p.createRegistrySelector)((function(e){return function(t){if(!Yt(t))return!1;if(Pn(t))return!1;var n=Lt(t),r=Nt(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!xt(t)||["title","excerpt"].some((function(e){return k(c[e])!==Ht(t,e)}))))}})),Zt=Object(p.createRegistrySelector)((function(e){return function(t){L()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Lt(t),r=Nt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(v.mapValues)(Object(v.pick)(i,M),k)}})),en=Object(p.createRegistrySelector)((function(e){return function(t){L()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Lt(t),r=Nt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}}));function tn(e){var t=Ht(e,"date"),n=new Date(Number(Object(jt.getDate)(t))-6e4);return Object(jt.isInTheFuture)(n)}function nn(e){var t=Ht(e,"date"),n=Ht(e,"modified"),r=Ht(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&(t===n||null===t)}var rn=Object(p.createRegistrySelector)((function(e){return function(t){var n=Lt(t),r=Nt(t);return e("core").isSavingEntityRecord("postType",n,r)}})),on=Object(p.createRegistrySelector)((function(e){return function(t){var n=Lt(t),r=Nt(t);return!e("core").getLastEntitySaveError("postType",n,r)}})),cn=Object(p.createRegistrySelector)((function(e){return function(t){var n=Lt(t),r=Nt(t);return!!e("core").getLastEntitySaveError("postType",n,r)}}));function an(e){return!!rn(e)&&!!Object(v.get)(e.saving,["options","isAutosave"])}function sn(e){return!!rn(e)&&!!e.saving.options.isPreview}function un(e){if(!e.saving.pending&&!rn(e)){var t=Wt(e,"preview_link");t||(t=Ht(e,"link"))&&(t=Object(yt.addQueryArgs)(t,{preview:!0}));var n=Ht(e,"featured_media");return t&&n?Object(yt.addQueryArgs)(t,{_thumbnail_id:n}):t}}function ln(e){var t,n=Rn(e);switch(1===n.length&&(t=n[0].name),2===n.length&&"core/paragraph"===n[1].name&&(t=n[0].name),t){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}function dn(e){L()("`core/editor` getBlocksForSerialization selector",{plugin:"Gutenberg",alternative:"getEditorBlocks",hint:"Blocks serialization pre-processing occurs at save time"});var t=e.editor.present.blocks.value;return 1===t.length&&Object(c.isUnmodifiedDefaultBlock)(t[0])?[]:t}var pn=Object(p.createRegistrySelector)((function(e){return function(t){var n=Nt(t),r=Lt(t),o=e("core").getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return K(o.blocks);if(o.content)return o.content}return""}})),bn=Object(gt.a)((function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return St({},n,{id:r?t:+t,isTemporary:r})}),(function(e,t){return[e.reusableBlocks.data[t]]}));function fn(e,t){return e.reusableBlocks.isSaving[t]||!1}function hn(e,t){return!!e.reusableBlocks.isFetching[t]}var mn=Object(gt.a)((function(e){return Object(v.map)(e.reusableBlocks.data,(function(t,n){return bn(e,n)}))}),(function(e){return[e.reusableBlocks.data]}));function vn(e,t){var n=Object(v.find)(e.optimist,(function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t}));return n?n.beforeState:null}function On(e){if(!rn(e))return!1;if(!qt(e))return!1;var t=vn(e,"post-update");return!!t&&!qt(null,t.currentPost)}function gn(e){var t=Ht(e,"permalink_template");return F.test(t)}function jn(e){var t=_n(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return gn(e)?n+r+o:n}function yn(e){return Ht(e,"slug")||kt(Ht(e,"title"))||Nt(e)}function _n(e){var t=Ht(e,"permalink_template");if(!t)return null;var n=Ht(e,"slug")||Ht(e,"generated_slug"),r=t.split(F),o=Object(Ot.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function kn(e,t){var n=e.optimist;return!!n&&n.some((function(e){var n=e.beforeState;return n&&t(n)}))}function En(e){return e.postLock.isLocked}function Sn(e){return Object.keys(e.postSavingLock).length>0}function Pn(e){return Object.keys(e.postAutosavingLock).length>0}function wn(e){return e.postLock.isTakeover}function Cn(e){return e.postLock.user}function Tn(e){return e.postLock.activePostLock}function Bn(e){return Object(v.has)(Dt(e),["_links","wp:action-unfiltered-html"])}function xn(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function Rn(e){return Ht(e,"blocks")||wt}function In(e){return Ht(e,"selectionStart")}function An(e){return Ht(e,"selectionEnd")}function Dn(e){return e.isReady}function Ln(e){return e.editorSettings}function Nn(e){return Object(p.createRegistrySelector)((function(t){return function(n){var r;L()("`wp.data.select( 'core/editor' )."+e+"`",{alternative:"`wp.data.select( 'core/block-editor' )."+e+"`"});for(var o=arguments.length,i=new Array(o>1?o-1:0),c=1;c0&&void 0!==arguments[0]?arguments[0]:[];return e.push(Object(v.clone)(oo)),e}));var io=n(20),co=n(19),ao=n(23),so=n(16),uo=n(22);function lo(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var po=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(lo()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){return Object(io.a)(this,r),n.apply(this,arguments)}return Object(co.a)(r,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDirty,r=t.editsReference,o=t.isAutosaveable,i=t.isAutosaving;r!==e.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&e.isAutosaving&&(this.didAutosaveForEditsReference=!0),e.isDirty===n&&e.isAutosaveable===o&&e.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(e){var t=this,n=this.props,r=n.interval,o=n.shouldThrottle,i=void 0!==o&&o;!i&&this.pendingSave&&(clearTimeout(this.pendingSave),delete this.pendingSave),!e||i&&this.pendingSave||(this.pendingSave=setTimeout((function(){t.props.autosave(),delete t.pendingSave}),1e3*r))}},{key:"render",value:function(){return null}}]),r}(Jr.Component),bo=Object(Zr.compose)([Object(p.withSelect)((function(e,t){var n=e("core").getReferenceByDistinctEdits,r=e("core/editor"),o=r.isEditedPostDirty,i=r.isEditedPostAutosaveable,c=r.isAutosavingPost,a=r.getEditorSettings,s=t.interval,u=void 0===s?a().autosaveInterval:s;return{isDirty:o(),isAutosaveable:i(),editsReference:n(),isAutosaving:c(),interval:u}})),Object(p.withDispatch)((function(e,t){return{autosave:function(){var n=t.autosave,r=void 0===n?e("core/editor").autosave:n;r()}}}))])(po),fo=n(11),ho=n.n(fo),mo=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.path,c=void 0===o?[]:o,a=e.href,s=e.onSelect;return Object(Jr.createElement)("li",{className:ho()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(Jr.createElement)("a",{href:a,className:"document-outline__button",onClick:s},Object(Jr.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map((function(e,t){var n=e.clientId;return Object(Jr.createElement)("strong",{key:t,className:"document-outline__level"},Object(Jr.createElement)(i.BlockTitle,{clientId:n}))})),Object(Jr.createElement)("strong",{className:"document-outline__level"},r),Object(Jr.createElement)("span",{className:"document-outline__item-content"},t)))};function vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oo(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Oo({},t,{path:n,level:t.attributes.level,isEmpty:ko(t)}):e(t.innerBlocks,[].concat(Object(A.a)(n),[t]))}))}(n);if(a.length<1)return null;var s=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(a,"level")[1]>1;return Object(Jr.createElement)("div",{className:"document-outline"},Object(Jr.createElement)("ul",null,d&&Object(Jr.createElement)(mo,{level:Object(I.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:c},r),a.map((function(e,t){var n=e.level>s+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(p||d));return s=e.level,Object(Jr.createElement)(mo,{key:t,level:"H".concat(e.level),isValid:r,path:e.path,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?go:Object(u.getTextContent)(Object(u.create)({html:e.attributes.content})),n&&jo,1===e.level&&p&&_o,d&&1===e.level&&!p&&yo)}))))}));var So=Object(p.withSelect)((function(e){return{blocks:e("core/block-editor").getBlocks()}}))((function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,(function(e){return"core/heading"===e.name})).length<1?null:n}));var Po=function(e){var t=e.resetBlocksOnSave,n=Object(p.useDispatch)("core/editor"),r=n.resetEditorBlocks,o=n.savePost,i=Object(p.useSelect)((function(e){var t=e("core/editor");return{isEditedPostDirty:t.isEditedPostDirty,getPostEdits:t.getPostEdits}}),[]),a=i.isEditedPostDirty,u=i.getPostEdits;return Object(s.useShortcut)("core/editor/save",(function(e){if(e.preventDefault(),a()){if(t){var n=u();if(n.content&&"string"==typeof n.content){var i=Object(c.parse)(n.content);r(i)}}o()}}),{bindGlobal:!0}),null};function wo(){var e=Object(p.useDispatch)("core/editor"),t=e.redo,n=e.undo;return Object(s.useShortcut)("core/editor/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(s.useShortcut)("core/editor/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(Jr.createElement)(Po,null))}var Co=wo;function To(){return L()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(Jr.createElement)(wo,null)}function Bo(){return Object(Jr.createElement)(Po,{resetBlocksOnSave:!0})}var xo=function(){var e=Object(p.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(Jr.useEffect)((function(){e({name:"core/editor/save",category:"global",description:Object(I.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:Object(I.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:Object(I.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),Object(Jr.createElement)(i.BlockEditorKeyboardShortcuts.Register,null)},Ro=n(3),Io=n(21),Ao=n(6),Do=Object(Jr.createElement)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Jr.createElement)(Ao.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 Lo=Object(Jr.forwardRef)((function(e,t){var n=Object(p.useSelect)((function(e){return e("core/editor").hasEditorRedo()}),[]),r=Object(p.useDispatch)("core/editor").redo;return Object(Jr.createElement)(Ro.Button,Object(Yr.a)({},e,{ref:t,icon:Do,label:Object(I.__)("Redo"),shortcut:Io.displayShortcut.primaryShift("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__redo"}))})),No=Object(Jr.createElement)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Jr.createElement)(Ao.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 Uo=Object(Jr.forwardRef)((function(e,t){var n=Object(p.useSelect)((function(e){return e("core/editor").hasEditorUndo()}),[]),r=Object(p.useDispatch)("core/editor").undo;return Object(Jr.createElement)(Ro.Button,Object(Yr.a)({},e,{ref:t,icon:No,label:Object(I.__)("Undo"),shortcut:Io.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__undo"}))}));var Fo=Object(Zr.compose)([Object(p.withSelect)((function(e){return{isValid:e("core/block-editor").isValidTemplate()}})),Object(p.withDispatch)((function(e){var t=e("core/block-editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}}))])((function(e){var t=e.isValid,n=Object(Xr.a)(e,["isValid"]);return t?null:Object(Jr.createElement)(Ro.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:Object(I.__)("Keep it as is"),onClick:n.resetTemplateValidity},{label:Object(I.__)("Reset the template"),onClick:function(){window.confirm(Object(I.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0}]},Object(I.__)("The content of your post doesn’t match the template assigned to your post type."))}));var Mo=Object(Zr.compose)([Object(p.withSelect)((function(e){return{notices:e("core/notices").getNotices()}})),Object(p.withDispatch)((function(e){return{onRemove:e("core/notices").removeNotice}}))])((function(e){var t=e.notices,n=e.onRemove,r=Object(v.filter)(t,{isDismissible:!0,type:"default"}),o=Object(v.filter)(t,{isDismissible:!1,type:"default"}),i=Object(v.filter)(t,{type:"snackbar"});return Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)(Ro.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(Jr.createElement)(Ro.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(Jr.createElement)(Fo,null)),Object(Jr.createElement)(Ro.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))})),Vo=n(154),zo=n(298),Ho=Object(Jr.createElement)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Jr.createElement)(Ao.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"})),Wo=n(302),Go=n(202);function Ko(e){var t=e.record,n=e.checked,r=e.onChange,o=e.closePanel,i=t.name,c=t.kind,a=t.title,s=t.key,u=Object(p.useSelect)((function(e){var t,n=e("core").getEditedEntityRecord(c,i,s).blocks,r=void 0===n?[]:n,o=e("core/block-editor").getBlockParents(null===(t=r[0])||void 0===t?void 0:t.clientId);return o[o.length-1]}),[]),l=Object(p.useSelect)((function(e){return e("core/block-editor").getSelectedBlockClientId()===u}),[u]),d=l?Object(I.__)("Selected"):Object(I.__)("Select"),b=Object(p.useDispatch)("core/block-editor").selectBlock,f=Object(Jr.useCallback)((function(){return b(u)}),[u]),h=Object(Jr.useCallback)((function(){b(u),o()}),[u]);return Object(Jr.createElement)(Ro.PanelRow,null,Object(Jr.createElement)(Ro.CheckboxControl,{label:Object(Jr.createElement)("strong",null,a||Object(I.__)("Untitled")),checked:n,onChange:r}),u?Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)(Ro.Button,{onClick:f,className:"entities-saved-states__find-entity",disabled:l},d),Object(Jr.createElement)(Ro.Button,{onClick:h,className:"entities-saved-states__find-entity-small",disabled:l},d)):null)}var qo={site:zo.a,page:Ho,post:Wo.a,wp_template:Wo.a};function $o(e){var t=e.list,n=e.unselectedEntities,r=e.setUnselectedEntities,o=e.closePanel,i=t[0],c=Object(p.useSelect)((function(e){return e("core").getEntity(i.kind,i.name)}),[i.kind,i.name]),a=i.name,s=qo[a]||Go.a;return Object(Jr.createElement)(Ro.PanelBody,{title:c.label,initialOpen:!0,icon:s},t.map((function(e){return Object(Jr.createElement)(Ko,{key:e.key||"site",record:e,checked:!Object(v.some)(n,(function(t){return t.kind===e.kind&&t.name===e.name&&t.key===e.key})),onChange:function(t){return r(e,t)},closePanel:o})})))}var Qo={wp_template_part:function(e){return Object(I._n)("template part","template parts",e)},wp_template:function(e){return Object(I._n)("template","templates",e)},post:function(e){return Object(I._n)("post","posts",e)},page:function(e){return Object(I._n)("page","pages",e)},site:function(e){return Object(I._n)("site","sites",e)}},Yo={0:Object(I.__)("There are no changes."),1:Object(I.__)("Changes have been made to your %s."),2:Object(I.__)("Changes have been made to your %1$s and %2$s."),3:Object(I.__)("Changes have been made to your %1$s, %2$s, and %3$s."),4:Object(I.__)("Changes have been made to your %1$s, %2$s, %3$s, and %4$s."),5:Object(I.__)("Changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.")};function Xo(e){var t=e.isOpen,n=e.close,r=Object(p.useSelect)((function(e){return{dirtyEntityRecords:e("core").__experimentalGetDirtyEntityRecords()}}),[]).dirtyEntityRecords,o=Object(p.useDispatch)("core").saveEditedEntityRecord,i=Object.values(Object(v.groupBy)(r,"name")),c=[];i.forEach((function(e){Qo[e[0].name]&&c.push(Qo[e[0].name](e.length))}));var a=Yo[c.length]||Object(I.__)("Changes have been made to multiple entity types."),s=I.sprintf.apply(void 0,[a].concat(c)),u=Object(Jr.useState)([]),l=Object(Ot.a)(u,2),d=l[0],b=l[1],f=function(e,t){var n=e.kind,r=e.name,o=e.key;b(t?d.filter((function(e){return e.kind!==n||e.name!==r||e.key!==o})):[].concat(Object(A.a)(d),[{kind:n,name:r,key:o}]))},h=Object(Jr.useState)(!1),m=Object(Ot.a)(h,2),O=m[0],g=m[1],j=Object(Jr.useCallback)((function(){return n()}),[n]);return t?Object(Jr.createElement)("div",{className:"entities-saved-states__panel"},Object(Jr.createElement)("div",{className:"entities-saved-states__panel-header"},Object(Jr.createElement)(Ro.Button,{isPrimary:!0,disabled:r.length-d.length==0,onClick:function(){var e=r.filter((function(e){var t=e.kind,n=e.name,r=e.key;return!Object(v.some)(d,(function(e){return e.kind===t&&e.name===n&&e.key===r}))}));n(e),e.forEach((function(e){var t=e.kind,n=e.name,r=e.key;o(t,n,r)}))},className:"editor-entities-saved-states__save-button"},Object(I.__)("Save")),Object(Jr.createElement)(Ro.Button,{onClick:j,icon:Vo.a,label:Object(I.__)("Close panel")})),Object(Jr.createElement)("div",{className:"entities-saved-states__text-prompt"},Object(Jr.createElement)("strong",null,Object(I.__)("Are you ready to save?")),Object(Jr.createElement)("p",null,s),Object(Jr.createElement)("p",null,Object(Jr.createElement)(Ro.Button,{onClick:function(){return g((function(e){return!e}))},isLink:!0,className:"entities-saved-states__review-changes-button"},O?Object(I.__)("Hide changes."):Object(I.__)("Review changes.")))),O&&i.map((function(e){return Object(Jr.createElement)($o,{key:e[0].name,list:e,closePanel:j,unselectedEntities:d,setUnselectedEntities:f})}))):null}var Jo=n(12);function Zo(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ei=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(Zo()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).reboot=e.reboot.bind(Object(Jo.a)(e)),e.getContent=e.getContent.bind(Object(Jo.a)(e)),e.state={error:null},e}return Object(co.a)(r,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(p.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(Jr.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(Jr.createElement)(Ro.Button,{key:"recovery",onClick:this.reboot,isSecondary:!0},Object(I.__)("Attempt Recovery")),Object(Jr.createElement)(Ro.ClipboardButton,{key:"copy-post",text:this.getContent,isSecondary:!0},Object(I.__)("Copy Post Text")),Object(Jr.createElement)(Ro.ClipboardButton,{key:"copy-error",text:e.stack,isSecondary:!0},Object(I.__)("Copy Error"))]},Object(I.__)("The editor has encountered an unexpected error.")):this.props.children}}]),r}(Jr.Component),ti=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,ni=Object(v.once)((function(){try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}}));function ri(){var e=Object(p.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),getEditedPostAttribute:e("core/editor").getEditedPostAttribute,hasRemoteAutosave:!!e("core/editor").getEditorSettings().autosave}}),[]),t=e.postId,n=e.getEditedPostAttribute,r=e.hasRemoteAutosave,o=Object(p.useDispatch)("core/notices"),i=o.createWarningNotice,a=o.removeNotice,s=Object(p.useDispatch)("core/editor"),u=s.editPost,l=s.resetEditorBlocks;Object(Jr.useEffect)((function(){var e=function(e){return window.sessionStorage.getItem(Hr(e))}(t);if(e){try{e=JSON.parse(e)}catch(e){return}var o=e,s={title:o.post_title,content:o.content,excerpt:o.excerpt};if(Object.keys(s).some((function(e){return s[e]!==n(e)}))){if(!r){var d=Object(v.uniqueId)("wpEditorAutosaveRestore");i(Object(I.__)("The backup of this post in your browser is different from the version below."),{id:d,actions:[{label:Object(I.__)("Restore the backup"),onClick:function(){u(Object(v.omit)(s,["content"])),l(Object(c.parse)(s.content)),a(d)}}]})}}else Wr(t)}}),[t])}var oi=Object(Zr.ifCondition)(ni)((function(){var e,t,n,r,o,i,c,a=Object(p.useDispatch)("core/editor").__experimentalLocalAutosave,s=Object(Jr.useCallback)((function(){ti(a)}),[]);ri(),e=Object(p.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isDirty:e("core/editor").isEditedPostDirty(),isAutosaving:e("core/editor").isAutosavingPost(),didError:e("core/editor").didPostSaveRequestFail()}}),[]),t=e.postId,n=e.isDirty,r=e.isAutosaving,o=e.didError,i=Object(Jr.useRef)(n),c=Object(Jr.useRef)(r),Object(Jr.useEffect)((function(){!o&&(c.current&&!r||i.current&&!n)&&Wr(t),i.current=n,c.current=r}),[n,r,o]);var u=Object(p.useSelect)((function(e){return{localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}}),[]).localAutosaveInterval;return Object(Jr.createElement)(bo,{interval:u,autosave:s,shouldThrottle:!0})}));var ii=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}}))((function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r}));var ci=Object(p.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}}))((function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(v.some)(Object(v.castArray)(r),(function(e){return!!t.supports[e]}))),o?n:null})),ai=Object(Zr.withState)({orderInput:null})((function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,c=null===o?r:o;return Object(Jr.createElement)(Ro.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(I.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})}));var si=Object(Zr.compose)([Object(p.withSelect)((function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}})),Object(p.withDispatch)((function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}}))])((function(e){return Object(Jr.createElement)(ci,{supportKeys:"page-attributes"},Object(Jr.createElement)(ai,e))}));function ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function li(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"";r({status:e,password:t})}}})),Zr.withInstanceId])(tc);var rc=Object(p.withSelect)((function(e){return{visibility:e("core/editor").getEditedPostVisibility()}}))((function(e){var t=e.visibility;return Object(v.find)(Zi,{value:t}).label}));var oc=Object(Zr.compose)([Object(p.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})),Object(p.withDispatch)((function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}}))])((function(e){var t=e.date,n=e.onUpdateDate,r=Object(jt.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Jr.createElement)(Ro.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:function(e){n(e),document.activeElement.blur()},is12Hour:o})}));var ic=Object(p.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}}))((function(e){var t=e.date,n=e.isFloating,r=Object(jt.__experimentalGetSettings)();return t&&!n?Object(jt.dateI18n)("".concat(r.formats.date," ").concat(r.formats.time),t):Object(I.__)("Immediately")}));function cc(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ac(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sc(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=sc({},uc,{},t),o=R()({path:Object(yt.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(pc).then((function(t){e.setState((function(e){return{availableTerms:e.availableTerms.concat(t.filter((function(t){return!Object(v.find)(e.availableTerms,(function(e){return e.id===t.id}))})))}})),e.updateSelectedTerms(e.props.terms)})),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=t.reduce((function(t,n){var r=Object(v.find)(e.state.availableTerms,(function(e){return e.id===n}));return r&&t.push(r.name),t}),[]);this.setState({selectedTerms:n})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(v.escape)(e);return R()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch((function(o){return"term_exists"===o.code?(t.addRequest=R()({path:Object(yt.addQueryArgs)("/wp/v2/".concat(n.rest_base),sc({},uc,{search:r}))}).then(pc),t.addRequest.then((function(t){return Object(v.find)(t,(function(t){return lc(t.name,e)}))}))):Promise.reject(o)})).then(dc)}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,(function(e){return e.toLowerCase()}));this.setState({selectedTerms:n});var r=n.filter((function(e){return!Object(v.find)(t.state.availableTerms,(function(t){return lc(t.name,e)}))})),o=function(e,t){return e.map((function(e){return Object(v.find)(t,(function(t){return lc(t.name,e)})).id}))};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then((function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)}))}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(v.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map((function(e){return e.name})),s=Object(v.get)(n,["labels","add_new_item"],"post_tag"===t?Object(I.__)("Add new tag"):Object(I.__)("Add new Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===t?Object(I.__)("Tag"):Object(I.__)("Term")),l=Object(I.sprintf)(Object(I._x)("%s added","term"),u),d=Object(I.sprintf)(Object(I._x)("%s removed","term"),u),p=Object(I.sprintf)(Object(I._x)("Remove %s","term"),u);return Object(Jr.createElement)(Ro.FormTokenField,{value:c,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:l,removed:d,remove:p}})}}]),r}(Jr.Component),fc=Object(Zr.compose)(Object(p.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(p.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(d.a)({},n,t))}}})),Object(Ro.withFilters)("editor.PostTaxonomyType"))(bc);function hc(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var mc=function(){var e=[Object(I.__)("Suggestion:"),Object(Jr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(I.__)("Add tags"))];return Object(Jr.createElement)(Ro.PanelBody,{initialOpen:!1,title:e},Object(Jr.createElement)("p",null,Object(I.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Jr.createElement)(fc,{slug:"post_tag"}))},vc=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(hc()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(e){var t;return Object(io.a)(this,r),(t=n.call(this,e)).state={hadTagsWhenOpeningThePanel:e.hasTags},t}return Object(co.a)(r,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Jr.createElement)(mc,null)}}]),r}(Jr.Component),Oc=Object(Zr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(v.some)(n.types,(function(e){return e===t})),hasTags:r&&r.length}})),Object(Zr.ifCondition)((function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t})))(vc),gc=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(Jr.createElement)(Ro.Button,{isLink:!0,onClick:function(){return r(t)}},n)},jc=function(e,t){var n=Ai.filter((function(t){return Object(v.includes)(e,t.id)}));return Object(v.find)(n,(function(e){return e.id===t}))},yc=Object(Zr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:jc(o,r())}})),Object(p.withDispatch)((function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}})),Object(Zr.ifCondition)((function(e){var t=e.suggestion,n=e.currentPostFormat;return t&&t.id!==n})))((function(e){var t=e.suggestion,n=e.onUpdatePostFormat,r=[Object(I.__)("Suggestion:"),Object(Jr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(I.__)("Use a post format"))];return Object(Jr.createElement)(Ro.PanelBody,{initialOpen:!1,title:r},Object(Jr.createElement)("p",null,Object(I.__)("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(Jr.createElement)("p",null,Object(Jr.createElement)(gc,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(I.sprintf)(Object(I.__)('Apply the "%1$s" format.'),t.caption)})))}));var _c=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}}))((function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(I.__)("Are you ready to schedule?"),n=Object(I.__)("Your work will be published at the specified date and time.")):(t=Object(I.__)("Are you ready to publish?"),n=Object(I.__)("Double-check your settings before publishing.")):(t=Object(I.__)("Are you ready to submit for review?"),n=Object(I.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Jr.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Jr.createElement)("div",null,Object(Jr.createElement)("strong",null,t)),Object(Jr.createElement)("p",null,n),r&&Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)(Ro.PanelBody,{initialOpen:!1,title:[Object(I.__)("Visibility:"),Object(Jr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Jr.createElement)(rc,null))]},Object(Jr.createElement)(nc,null)),Object(Jr.createElement)(Ro.PanelBody,{initialOpen:!1,title:[Object(I.__)("Publish:"),Object(Jr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Jr.createElement)(ic,null))]},Object(Jr.createElement)(oc,null))),Object(Jr.createElement)(yc,null),Object(Jr.createElement)(Oc,null),i)}));function kc(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Ec=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(kc()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(Jo.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(Jo.a)(e)),e.postLink=Object(Jr.createRef)(),e}return Object(co.a)(r,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((function(){e.setState({showCopyConfirmation:!1})}),4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(v.get)(o,["labels","singular_name"]),c=Object(v.get)(o,["labels","view_item"]),a="future"===r.status?function(e){var t=e.slug;return e.permalink_template.includes("%postname%")?e.permalink_template.replace("%postname%",t):e.permalink_template}(r):r.link,s=n?Object(Jr.createElement)(Jr.Fragment,null,Object(I.__)("is now scheduled. It will go live on")," ",Object(Jr.createElement)(ic,null),"."):Object(I.__)("is now live.");return Object(Jr.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Jr.createElement)(Ro.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Jr.createElement)("a",{ref:this.postLink,href:a},Object(mi.decodeEntities)(r.title)||Object(I.__)("(no title)"))," ",s),Object(Jr.createElement)(Ro.PanelBody,null,Object(Jr.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Jr.createElement)("strong",null,Object(I.__)("What’s next?"))),Object(Jr.createElement)(Ro.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(I.sprintf)(Object(I.__)("%s address"),i),value:Object(yt.safeDecodeURIComponent)(a),onFocus:this.onSelectInput}),Object(Jr.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Jr.createElement)(Ro.Button,{isSecondary:!0,href:a},c),Object(Jr.createElement)(Ro.ClipboardButton,{isSecondary:!0,text:a,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(I.__)("Copied!"):Object(I.__)("Copy Link")))),t)}}]),r}(Jr.Component),Sc=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}}))(Ec);function Pc(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var wc=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(Pc()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).onSubmit=e.onSubmit.bind(Object(Jo.a)(e)),e}return Object(co.a)(r,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose,n=e.hasPublishAction,r=e.isPostTypeViewable;n&&r||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,c=e.isScheduled,a=e.isSaving,s=e.onClose,u=e.onTogglePublishSidebar,l=e.PostPublishExtension,d=e.PrePublishExtension,p=Object(Xr.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),b=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||c&&r,h=!f&&!a,m=f&&!a;return Object(Jr.createElement)("div",Object(Yr.a)({className:"editor-post-publish-panel"},b),Object(Jr.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(Jr.createElement)(Ro.Button,{onClick:s,icon:Ji.a,label:Object(I.__)("Close panel")}):Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Jr.createElement)(Xi,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n})),Object(Jr.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},Object(Jr.createElement)(Ro.Button,{onClick:s,label:Object(I.__)("Close panel"),isSecondary:!0},Object(I.__)("Cancel"))))),Object(Jr.createElement)("div",{className:"editor-post-publish-panel__content"},h&&Object(Jr.createElement)(_c,null,d&&Object(Jr.createElement)(d,null)),m&&Object(Jr.createElement)(Sc,{focusOnMount:!0},l&&Object(Jr.createElement)(l,null)),a&&Object(Jr.createElement)(Ro.Spinner,null)),Object(Jr.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Jr.createElement)(Ro.CheckboxControl,{label:Object(I.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),r}(Jr.Component),Cc=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,c=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,s=n.isEditedPostDirty,u=n.isSavingPost,l=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}})),Object(p.withDispatch)((function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}})),Ro.withFocusReturn,Ro.withConstrainedTabbing])(wc),Tc=n(137),Bc=Object(Jr.createElement)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(Jr.createElement)(Ao.Path,{d:"M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z"})),xc=n(155),Rc=Object(Jr.createElement)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(Jr.createElement)(Ao.Path,{d:"M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z"}));var Ic=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}}))])((function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick,i=Object(Zr.useViewportMatch)("small","<");return n||r?Object(Jr.createElement)(Ro.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(I.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(I.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},i?Object(I.__)("Draft"):Object(I.__)("Switch to draft")):null}));function Ac(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Dc=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(Ac()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).state={forceSavedMessage:!1},e}return Object(co.a)(r,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout((function(){t.setState({forceSavedMessage:!1})}),1e3))}},{key:"render",value:function(){var e=this.props,t=e.hasPublishAction,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,c=e.isSaving,a=e.isSaveable,s=e.onSave,u=e.isAutosaving,l=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage;if(c){var b=ho()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(Jr.createElement)(Ro.Animate,{type:"loading"},(function(e){var t=e.className;return Object(Jr.createElement)("span",{className:ho()(b,t)},Object(Jr.createElement)(Tc.a,{icon:Bc}),u?Object(I.__)("Autosaving"):Object(I.__)("Saving"))}))}if(o||r)return Object(Jr.createElement)(Ic,null);if(!a)return null;if(p||!n&&!i)return Object(Jr.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Jr.createElement)(Tc.a,{icon:xc.a}),Object(I.__)("Saved"));if(!t&&l)return null;var f=l?Object(I.__)("Save as pending"):Object(I.__)("Save draft");return d?Object(Jr.createElement)(Ro.Button,{className:"editor-post-save-draft",onClick:function(){return s()},shortcut:Io.displayShortcut.primary("s"),isTertiary:!0},f):Object(Jr.createElement)(Ro.Button,{className:"editor-post-save-draft",label:f,onClick:function(){return s()},shortcut:Io.displayShortcut.primary("s"),icon:Rc})}}]),r}(Jr.Component),Lc=Object(Zr.compose)([Object(p.withSelect)((function(e,t){var n,r,o,i=t.forceIsDirty,c=t.forceIsSaving,a=e("core/editor"),s=a.isEditedPostNew,u=a.isCurrentPostPublished,l=a.isCurrentPostScheduled,d=a.isEditedPostDirty,p=a.isSavingPost,b=a.isEditedPostSaveable,f=a.getCurrentPost,h=a.isAutosavingPost,m=a.getEditedPostAttribute;return{hasPublishAction:null!==(n=null===(r=f())||void 0===r||null===(o=r._links)||void 0===o?void 0:o["wp:action-publish"])&&void 0!==n&&n,isNew:s(),isPublished:u(),isScheduled:l(),isDirty:i||d(),isSaving:c||p(),isSaveable:b(),isAutosaving:h(),isPending:"pending"===m("status")}})),Object(p.withDispatch)((function(e){return{onSave:e("core/editor").savePost}})),Zr.withSafeTimeout,Object(l.withViewportMatch)({isLargeViewport:"small"})])(Dc);var Nc=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction,n=e.children;return t?n:null}));function Uc(e){var t=e.children;return Object(Jr.createElement)(ci,{supportKeys:"slug"},t)}function Fc(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Mc=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(Fc()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(e){var t,o=e.postSlug,i=e.postTitle,c=e.postID;return Object(io.a)(this,r),(t=n.apply(this,arguments)).state={editedSlug:Object(yt.safeDecodeURIComponent)(o)||kt(i)||c},t.setSlug=t.setSlug.bind(Object(Jo.a)(t)),t}return Object(co.a)(r,[{key:"setSlug",value:function(e){var t=this.props,n=t.postSlug,r=t.onUpdateSlug,o=kt(e.target.value);o!==n&&r(o)}},{key:"render",value:function(){var e=this,t=this.props.instanceId,n=this.state.editedSlug,r="editor-post-slug-"+t;return Object(Jr.createElement)(Uc,null,Object(Jr.createElement)("label",{htmlFor:r},Object(I.__)("Slug")),Object(Jr.createElement)("input",{type:"text",id:r,value:n,onChange:function(t){return e.setState({editedSlug:t.target.value})},onBlur:this.setSlug,className:"editor-post-slug__input"}))}}]),r}(Jr.Component),Vc=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getEditedPostAttribute,o=n().id;return{postSlug:r("slug"),postTitle:r("title"),postID:o}})),Object(p.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateSlug:function(e){t({slug:e})}}})),Zr.withInstanceId])(Mc);var zc=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}}))])((function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null}));var Hc=Object(Zr.compose)([Object(p.withSelect)((function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}})),Object(p.withDispatch)((function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}}))])((function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(Jr.createElement)(zc,null,Object(Jr.createElement)(Ro.CheckboxControl,{label:Object(I.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}));function Wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;t0)};return e.sort((function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0})),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter((function(e){return e}));this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r0&&(r.children=r.children.map(t).filter((function(e){return e}))),(-1!==r.name.toLowerCase().indexOf(e.toLowerCase())||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map((function(e){return Object(Jr.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Jr.createElement)(Ro.CheckboxControl,{checked:-1!==r.indexOf(e.id),onChange:function(){var n=parseInt(e.id,10);t.onChange(n)},label:Object(v.unescape)(e.name)}),!!e.children.length&&Object(Jr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))}))}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,b=i.filterValue,f=function(e,r,o){return Object(v.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(I.__)("Add new category"),Object(I.__)("Add new term")),m=f("new_item_name",Object(I.__)("Add new category"),Object(I.__)("Add new term")),O=f("parent_item",Object(I.__)("Parent Category"),Object(I.__)("Parent Term")),g="— ".concat(O," —"),j=h,y="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(I.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(I.__)("Terms")),S=a.length>=8;return[S&&Object(Jr.createElement)("label",{key:"filter-label",htmlFor:_},k),S&&Object(Jr.createElement)("input",{type:"search",id:_,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Jr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==b?s:c)),!d&&o&&Object(Jr.createElement)(Ro.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(Jr.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Jr.createElement)("label",{htmlFor:y,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Jr.createElement)("input",{type:"text",id:y,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Jr.createElement)(Ro.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(Jr.createElement)(Ro.Button,{isSecondary:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),r}(Jr.Component),Qc=Object(Zr.compose)([Object(p.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(p.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(d.a)({},n,t))}}})),Ro.withSpokenMessages,Zr.withInstanceId,Object(Ro.withFilters)("editor.PostTaxonomyType")])($c);var Yc=Object(Zr.compose)([Object(p.withSelect)((function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}}))])((function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?v.identity:r,i=Object(v.filter)(n,(function(e){return Object(v.includes)(e.types,t)}));return Object(v.filter)(i,(function(e){return e.visibility.show_ui})).map((function(e){var t=e.hierarchical?Qc:fc;return Object(Jr.createElement)(Jr.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(Jr.createElement)(t,{slug:e.slug}),e))}))}));var Xc=Object(Zr.compose)([Object(p.withSelect)((function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}}))])((function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(v.some)(n,(function(e){return Object(v.includes)(e.types,t)}))?r:null})),Jc=n(97),Zc=n.n(Jc);function ea(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ta=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(ea()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).edit=e.edit.bind(Object(Jo.a)(e)),e.stopEditing=e.stopEditing.bind(Object(Jo.a)(e)),e.state={},e}return Object(co.a)(r,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props.instanceId;return Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)(Ro.VisuallyHidden,{as:"label",htmlFor:"post-content-".concat(t)},Object(I.__)("Type text or HTML")),Object(Jr.createElement)(Zc.a,{autoComplete:"off",dir:"auto",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(t),placeholder:Object(I.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),r}(Jr.Component),na=Object(Zr.compose)([Object(p.withSelect)((function(e){return{value:(0,e("core/editor").getEditedPostContent)()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.resetEditorBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){var t=Object(c.parse)(e);r(t)}}})),Zr.withInstanceId])(ta);function ra(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var oa=/[\r\n]+/g,ia=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(ra()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).onChange=e.onChange.bind(Object(Jo.a)(e)),e.onSelect=e.onSelect.bind(Object(Jo.a)(e)),e.onUnselect=e.onUnselect.bind(Object(Jo.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(Jo.a)(e)),e.onPaste=e.onPaste.bind(Object(Jo.a)(e)),e.state={isSelected:!1},e}return Object(co.a)(r,[{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace(oa," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===Io.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"onPaste",value:function(e){var t=this.props,n=t.title,r=t.onInsertBlockAfter,o=t.onUpdate,i=e.clipboardData,a="",s="";try{a=i.getData("text/plain"),s=i.getData("text/html")}catch(e){try{s=i.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",s),window.console.log("Received plain text:\n\n",a);var u=Object(c.pasteHandler)({HTML:s,plainText:a});if("string"!=typeof u&&u.length){e.preventDefault();var l=Object(Ot.a)(u,1)[0];n||"core/heading"!==l.name&&"core/paragraph"!==l.name?r(u):(o(l.attributes.content),r(u.slice(1)))}}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.instanceId,i=e.placeholder,c=e.title,a=this.state.isSelected,s=ho()("wp-block editor-post-title editor-post-title__block",{"is-selected":a,"is-focus-mode":r,"has-fixed-toolbar":t}),u=Object(mi.decodeEntities)(i);return Object(Jr.createElement)(ci,{supportKeys:"title"},Object(Jr.createElement)("div",{className:s},Object(Jr.createElement)(Ro.VisuallyHidden,{as:"label",htmlFor:"post-title-".concat(o)},u||Object(I.__)("Add title")),Object(Jr.createElement)(Zc.a,{id:"post-title-".concat(o),className:"editor-post-title__input",value:c,onChange:this.onChange,placeholder:u||Object(I.__)("Add title"),onFocus:this.onSelect,onBlur:this.onUnselect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,onPaste:this.onPaste,autoFocus:(document.body===document.activeElement||!document.activeElement)&&n})))}}]),r}(Jr.Component),ca=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.isCleanNewPost,o=(0,e("core/block-editor").getSettings)(),i=o.titlePlaceholder,c=o.focusMode,a=o.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),placeholder:i,isFocusMode:c,hasFixedToolbar:a}})),aa=Object(p.withDispatch)((function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=t.insertBlocks,i=e("core/editor").editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onInsertBlockAfter:function(e){o(e,0)},onUpdate:function(e){i({title:e})},clearSelectedBlock:r}})),sa=Object(Zr.compose)(ca,aa,Zr.withInstanceId)(ia);var ua=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}})),Object(p.withDispatch)((function(e){return{trashPost:e("core/editor").trashPost}}))])((function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(Xr.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(Jr.createElement)(Ro.Button,{className:"editor-post-trash",isDestructive:!0,isTertiary:!0,onClick:function(){return o.trashPost(n,r)}},Object(I.__)("Move to trash"))}));var la=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType,i=e("core"),c=i.getPostType,a=i.canUser,s=r(),u=c(o()),l=(null==u?void 0:u.rest_base)||"";return{isNew:n(),postId:s,canUserDelete:!(!s||!l)&&a("delete",l,s)}}))((function(e){var t=e.isNew,n=e.postId,r=e.canUserDelete,o=e.children;return!t&&n&&r?o:null}));var da=Object(Zr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})})),pa=Object(Jr.createElement)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Jr.createElement)(Ao.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"})),ba=n(147);var fa=Object(p.withSelect)((function(e){return{content:e("core/editor").getEditedPostAttribute("content")}}))((function(e){var t=e.content,n=Object(I._x)("words","Word count type. Do not translate!");return Object(Jr.createElement)("span",{className:"word-count"},Object(ba.count)(t,n))}));var ha=function(e){var t=e.hasOutlineItemsDisabled,n=e.onRequestClose,r=Object(p.useSelect)((function(e){var t=e("core/block-editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]),o=r.headingCount,i=r.paragraphCount,c=r.numberOfBlocks;return Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(I.__)("Document Statistics"),tabIndex:"0"},Object(Jr.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(Jr.createElement)("li",{className:"table-of-contents__count"},Object(I.__)("Words"),Object(Jr.createElement)(fa,null)),Object(Jr.createElement)("li",{className:"table-of-contents__count"},Object(I.__)("Headings"),Object(Jr.createElement)("span",{className:"table-of-contents__number"},o)),Object(Jr.createElement)("li",{className:"table-of-contents__count"},Object(I.__)("Paragraphs"),Object(Jr.createElement)("span",{className:"table-of-contents__number"},i)),Object(Jr.createElement)("li",{className:"table-of-contents__count"},Object(I.__)("Blocks"),Object(Jr.createElement)("span",{className:"table-of-contents__number"},c)))),o>0&&Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)("hr",null),Object(Jr.createElement)("h2",{className:"table-of-contents__title"},Object(I.__)("Document Outline")),Object(Jr.createElement)(Eo,{onSelect:n,hasOutlineItemsDisabled:t})))};var ma=Object(Jr.forwardRef)((function(e,t){var n=e.hasOutlineItemsDisabled,r=Object(Xr.a)(e,["hasOutlineItemsDisabled"]),o=Object(p.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[]);return Object(Jr.createElement)(Ro.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,i=e.onToggle;return Object(Jr.createElement)(Ro.Button,Object(Yr.a)({},r,{ref:t,onClick:o?i:void 0,icon:pa,"aria-expanded":n,label:Object(I.__)("Content structure"),tooltipPosition:"bottom","aria-disabled":!o}))},renderContent:function(e){var t=e.onClose;return Object(Jr.createElement)(ha,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}));function va(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Oa=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(va()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(){var e;return Object(io.a)(this,r),(e=n.apply(this,arguments)).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(Jo.a)(e)),e}return Object(co.a)(r,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){if((0,this.props.isEditedPostDirty)())return e.returnValue=Object(I.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),r}(Jr.Component),ga=Object(p.withSelect)((function(e){return{isEditedPostDirty:e("core/editor").isEditedPostDirty}}))(Oa),ja=Object(Zr.createHigherOrderComponent)((function(e){return Object(p.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Xr.a)(t,["useSubRegistry","registry"]);if(!r)return Object(Jr.createElement)(e,c);var a=Object(Jr.useState)(null),s=Object(Ot.a)(a,2),u=s[0],l=s[1];return Object(Jr.useEffect)((function(){var e=Object(p.createRegistry)({"core/block-editor":i.storeConfig},o),t=e.registerStore("core/editor",$r);zr(t),l(e)}),[o]),u?Object(Jr.createElement)(p.RegistryProvider,{value:u},Object(Jr.createElement)(e,c)):null}))}),"withRegistryProvider"),ya=n(152);function _a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ka(e){for(var t=1;t0?n(a[0]):void 0),l=r(a),d=1===l.length&&l[0]&&l[0].name===s;return{clientIds:a,isGroupable:u&&l.length&&!d,isUngroupable:d&&!!l[0].innerBlocks.length,blocksSelection:l,groupingBlockName:s}})),Object(p.withDispatch)((function(e,t){var n=t.clientIds,r=t.blocksSelection,o=void 0===r?[]:r,i=t.groupingBlockName,a=e("core/block-editor").replaceBlocks;return{onConvertToGroup:function(){var e=Object(c.switchToBlockType)(o,i);e&&a(n,e)},onConvertFromGroup:function(){var e=o[0].innerBlocks;e.length&&a(n,e)}}}))])((function(e){var t=e.onConvertToGroup,n=e.onConvertFromGroup,r=e.isGroupable,o=void 0!==r&&r,c=e.isUngroupable,a=void 0!==c&&c;return o||a?Object(Jr.createElement)(i.BlockSettingsMenuControls,null,(function(e){var r=e.onClose;return Object(Jr.createElement)(Jr.Fragment,null,o&&Object(Jr.createElement)(Ro.MenuItem,{onClick:function(){t(),r()}},Object(I._x)("Group","verb")),a&&Object(Jr.createElement)(Ro.MenuItem,{onClick:function(){n(),r()}},Object(I._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor ")))})):null}));function Ta(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t1&&void 0!==c[1]?c[1]:{},r=n.perPage,o=void 0===r?20:r,e.next=3,R()({path:Object(yt.addQueryArgs)("/wp/v2/search",{search:t,per_page:o,type:"post"})});case 3:return i=e.sent,e.abrupt("return",Object(v.map)(i,(function(e){return{id:e.id,url:e.url,title:Object(mi.decodeEntities)(e.title)||Object(I.__)("(no title)"),type:e.subtype||e.type}})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ia=function(e){Object(uo.a)(r,e);var t,n=(t=r,function(){var e,n=Object(so.a)(t);if(xa()){var r=Object(so.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(ao.a)(this,e)});function r(e){var t;return Object(io.a)(this,r),(t=n.apply(this,arguments)).getBlockEditorSettings=W()(t.getBlockEditorSettings,{maxSize:1}),t.getDefaultBlockContext=W()(t.getDefaultBlockContext,{maxSize:1}),e.recovery?Object(ao.a)(t):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(I.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(I.__)("View the autosave"),url:e.settings.autosave.editLink}]}),t)}return Object(co.a)(r,[{key:"getBlockEditorSettings",value:function(e,t,n,r,o,i,c){return Ba({},Object(v.pick)(e,["__experimentalBlockDirectory","__experimentalBlockPatterns","__experimentalBlockPatternCategories","__experimentalEnableCustomSpacing","__experimentalEnableLegacyWidgetBlock","__experimentalEnableLinkColor","__experimentalEnableFullSiteEditing","__experimentalEnableFullSiteEditingDemo","__experimentalFeatures","__experimentalGlobalStylesUserEntityId","__experimentalGlobalStylesBase","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","enableCustomUnits","enableCustomLineHeight","focusMode","fontSizes","gradients","hasFixedToolbar","hasPermissionsToManageWidgets","imageEditing","imageSizes","imageDimensions","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder"]),{mediaUpload:r?Ea:void 0,__experimentalReusableBlocks:t,__experimentalFetchReusableBlocks:n,__experimentalFetchLinkSuggestions:Ra,__experimentalCanUserUseUnfilteredHTML:o,__experimentalUndo:i,__experimentalShouldInsertAtTheTop:c})}},{key:"getDefaultBlockContext",value:function(e,t){return{postId:e,postType:t}}},{key:"componentDidMount",value:function(){this.props.updateEditorSettings(this.props.settings)}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"componentWillUnmount",value:function(){this.props.tearDownEditor()}},{key:"render",value:function(){var e=this.props,t=e.canUserUseUnfilteredHTML,n=e.children,r=e.post,o=e.blocks,c=e.resetEditorBlocks,s=e.selectionStart,u=e.selectionEnd,l=e.isReady,d=e.settings,p=e.reusableBlocks,b=e.resetEditorBlocksWithoutUndoLevel,f=e.hasUploadPermissions,h=e.isPostTitleSelected,m=e.__experimentalFetchReusableBlocks,v=e.undo;if(!l)return null;var O=this.getBlockEditorSettings(d,p,m,f,t,v,h),g=this.getDefaultBlockContext(r.id,r.type);return Object(Jr.createElement)(Jr.Fragment,null,Object(Jr.createElement)(i.__unstableEditorStyles,{styles:d.styles}),Object(Jr.createElement)(a.EntityProvider,{kind:"root",type:"site"},Object(Jr.createElement)(a.EntityProvider,{kind:"postType",type:r.type,id:r.id},Object(Jr.createElement)(i.BlockContextProvider,{value:g},Object(Jr.createElement)(i.BlockEditorProvider,{value:o,onInput:b,onChange:c,selectionStart:s,selectionEnd:u,settings:O,useSubRegistry:!1},n,Object(Jr.createElement)(wa,null),Object(Jr.createElement)(Ca,null))))))}}]),r}(Jr.Component),Aa=Object(Zr.compose)([ja,Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.canUserUseUnfilteredHTML,r=t.__unstableIsEditorReady,o=t.getEditorBlocks,i=t.getEditorSelectionStart,c=t.getEditorSelectionEnd,a=t.__experimentalGetReusableBlocks,s=t.isPostTitleSelected,u=e("core").canUser;return{canUserUseUnfilteredHTML:n(),isReady:r(),blocks:o(),selectionStart:i(),selectionEnd:c(),reusableBlocks:a(),hasUploadPermissions:Object(v.defaultTo)(u("create","media"),!0),isPostTitleSelected:s&&s()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updatePostLock,o=t.resetEditorBlocks,i=t.updateEditorSettings,c=t.__experimentalFetchReusableBlocks,a=t.__experimentalTearDownEditor,s=t.undo;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:i,resetEditorBlocksWithoutUndoLevel:function(e,t){o(e,Ba({},t,{__unstableShouldCreateUndoLevel:!1}))},tearDownEditor:a,__experimentalFetchReusableBlocks:c,undo:s}}))])(Ia),Da=n(83),La=n.n(Da);function Na(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(Jr.forwardRef)((function(n,r){return L()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(Jr.createElement)(t,Object(Yr.a)({ref:r},n))}));return n.forEach((function(n){r[n]=Na(e+"."+n,t[n])})),r}function Ua(e,t){return function(){return L()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Fa=Na("RichText",i.RichText,["Content"]);Fa.isEmpty=Ua("RichText.isEmpty",i.RichText.isEmpty);var Ma=Na("Autocomplete",i.Autocomplete),Va=Na("AlignmentToolbar",i.AlignmentToolbar),za=Na("BlockAlignmentToolbar",i.BlockAlignmentToolbar),Ha=Na("BlockControls",i.BlockControls,["Slot"]),Wa=Na("BlockEdit",i.BlockEdit),Ga=Na("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),Ka=Na("BlockFormatControls",i.BlockFormatControls,["Slot"]),qa=Na("BlockIcon",i.BlockIcon),$a=Na("BlockInspector",i.BlockInspector),Qa=Na("BlockList",i.BlockList),Ya=Na("BlockMover",i.BlockMover),Xa=Na("BlockNavigationDropdown",i.BlockNavigationDropdown),Ja=Na("BlockSelectionClearer",i.BlockSelectionClearer),Za=Na("BlockSettingsMenu",i.BlockSettingsMenu),es=Na("BlockTitle",i.BlockTitle),ts=Na("BlockToolbar",i.BlockToolbar),ns=Na("ColorPalette",i.ColorPalette),rs=Na("ContrastChecker",i.ContrastChecker),os=Na("CopyHandler",i.CopyHandler),is=Na("DefaultBlockAppender",i.DefaultBlockAppender),cs=Na("FontSizePicker",i.FontSizePicker),as=Na("Inserter",i.Inserter),ss=Na("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),us=Na("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),ls=Na("InspectorControls",i.InspectorControls,["Slot"]),ds=Na("PanelColorSettings",i.PanelColorSettings),ps=Na("PlainText",i.PlainText),bs=Na("RichTextShortcut",i.RichTextShortcut),fs=Na("RichTextToolbarButton",i.RichTextToolbarButton),hs=Na("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),ms=Na("MediaPlaceholder",i.MediaPlaceholder),vs=Na("MediaUpload",i.MediaUpload),Os=Na("MediaUploadCheck",i.MediaUploadCheck),gs=Na("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),js=Na("NavigableToolbar",i.NavigableToolbar),ys=Na("ObserveTyping",i.ObserveTyping),_s=Na("PreserveScrollInReorder",i.PreserveScrollInReorder),ks=Na("SkipToSelectedBlock",i.SkipToSelectedBlock),Es=Na("URLInput",i.URLInput),Ss=Na("URLInputButton",i.URLInputButton),Ps=Na("URLPopover",i.URLPopover),ws=Na("Warning",i.Warning),Cs=Na("WritingFlow",i.WritingFlow),Ts=Ua("createCustomColorsHOC",i.createCustomColorsHOC),Bs=Ua("getColorClassName",i.getColorClassName),xs=Ua("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),Rs=Ua("getColorObjectByColorValue",i.getColorObjectByColorValue),Is=Ua("getFontSize",i.getFontSize),As=Ua("getFontSizeClass",i.getFontSizeClass),Ds=Ua("withColorContext",i.withColorContext),Ls=Ua("withColors",i.withColors),Ns=Ua("withFontSizes",i.withFontSizes)},45:function(e,t){!function(){e.exports=this.wp.apiFetch}()},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},50:function(e,t,n){"use strict";function r(e,t,n,r,o,i,c){try{var a=e[i](c),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},52:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},6:function(e,t){!function(){e.exports=this.wp.primitives}()},60:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function i(){var i,c,a=n,s=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c