this.wp=this.wp||{},this.wp.editPost=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=210)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.lodash}()},12:function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}n.d(t,"a",function(){return r})},13:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return o})},14:function(e,t,n){"use strict";function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}n.d(t,"a",function(){return r})},15:function(e,t,n){"use strict";function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return o})},16:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var o=n(38),r=n(3);function i(e,t){return!t||"object"!==Object(o.a)(t)&&"function"!=typeof t?Object(r.a)(e):t}},17:function(e,t,n){var o;
/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o))e.push(r.apply(null,o));else if("object"===i)for(var c in o)n.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=r:void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},18:function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return o})},183:function(e,t){!function(){e.exports=this.wp.blockLibrary}()},2:function(e,t){!function(){e.exports=this.wp.i18n}()},20:function(e,t){!function(){e.exports=this.wp.keycodes}()},21:function(e,t,n){"use strict";var o=n(42);function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return r})},210:function(e,t,n){"use strict";n.r(t);var o={};n.d(o,"openGeneralSidebar",function(){return oe}),n.d(o,"closeGeneralSidebar",function(){return re}),n.d(o,"openModal",function(){return ie}),n.d(o,"closeModal",function(){return ce}),n.d(o,"openPublishSidebar",function(){return ae}),n.d(o,"closePublishSidebar",function(){return le}),n.d(o,"togglePublishSidebar",function(){return se}),n.d(o,"toggleGeneralSidebarEditorPanel",function(){return ue}),n.d(o,"toggleFeature",function(){return de}),n.d(o,"switchEditorMode",function(){return be}),n.d(o,"togglePinnedPluginItem",function(){return pe}),n.d(o,"initializeMetaBoxState",function(){return me}),n.d(o,"setActiveMetaBoxLocations",function(){return Oe}),n.d(o,"requestMetaBoxUpdates",function(){return fe}),n.d(o,"metaBoxUpdatesSuccess",function(){return je}),n.d(o,"setMetaBoxSavedData",function(){return he});var r={};n.d(r,"getEditorMode",function(){return ge}),n.d(r,"isEditorSidebarOpened",function(){return Ee}),n.d(r,"isPluginSidebarOpened",function(){return ve}),n.d(r,"getActiveGeneralSidebarName",function(){return Se}),n.d(r,"getPreferences",function(){return ye}),n.d(r,"getPreference",function(){return _e}),n.d(r,"isPublishSidebarOpened",function(){return Pe}),n.d(r,"isEditorSidebarPanelOpened",function(){return ke}),n.d(r,"isModalActive",function(){return we}),n.d(r,"isFeatureActive",function(){return Ce}),n.d(r,"isPluginItemPinned",function(){return Te}),n.d(r,"getMetaBoxes",function(){return xe}),n.d(r,"getActiveMetaBoxLocations",function(){return Ae}),n.d(r,"isMetaBoxLocationActive",function(){return Me}),n.d(r,"getMetaBox",function(){return Be}),n.d(r,"hasMetaBoxes",function(){return Ne}),n.d(r,"isSavingMetaBoxes",function(){return Ie});var i=n(0),c=(n(84),n(7)),a=n(58),l=n(49),s=n(183),u=n(5),d=n(40),b=n.n(d),p=n(30),m=n(13),O=n(12),f=n(16),j=n(15),h=n(14),g=n(3),E=n(1),v=n(2),S=function(){return wp.media.view.MediaFrame.Post.extend({createStates:function(){this.states.add([new wp.media.controller.Library({id:"gallery",title:wp.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"image"},this.options.library))}),new wp.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new wp.media.controller.GalleryAdd])}})},y=function(e){return Object(E.pick)(e,["sizes","mime","type","subtype","id","url","alt","link","caption"])},P=function(e){return wp.media.query({order:"ASC",orderby:"post__in",per_page:-1,post__in:e,query:!0,type:"image"})},k=function(e){function t(e){var n,o=e.allowedTypes,r=e.type,i=e.multiple,c=void 0!==i&&i,a=e.gallery,l=void 0!==a&&a,s=e.title,u=void 0===s?Object(v.__)("Select or Upload Media"):s,d=e.modalClass,p=e.value;Object(m.a)(this,t),(n=Object(f.a)(this,Object(j.a)(t).apply(this,arguments))).openModal=n.openModal.bind(Object(g.a)(Object(g.a)(n))),n.onOpen=n.onOpen.bind(Object(g.a)(Object(g.a)(n))),n.onSelect=n.onSelect.bind(Object(g.a)(Object(g.a)(n))),n.onUpdate=n.onUpdate.bind(Object(g.a)(Object(g.a)(n))),n.onClose=n.onClose.bind(Object(g.a)(Object(g.a)(n)));var O=o;if(!o&&r&&(b()("type property of wp.editor.MediaUpload",{version:"4.2",alternative:"allowedTypes property containing an array with the allowedTypes or do not pass any property if all types are allowed"}),O="*"===r?void 0:[r]),l){var h=p?"gallery-edit":"gallery",E=S(),y=P(p),_=new wp.media.model.Selection(y.models,{props:y.props.toJSON(),multiple:c});n.frame=new E({mimeType:O,state:h,multiple:c,selection:_,editing:!!p}),wp.media.frame=n.frame}else{var k={title:u,button:{text:Object(v.__)("Select")},multiple:c};O&&(k.library={type:O}),n.frame=wp.media(k)}return d&&n.frame.$el.addClass(d),n.frame.on("select",n.onSelect),n.frame.on("update",n.onUpdate),n.frame.on("open",n.onOpen),n.frame.on("close",n.onClose),n}return Object(h.a)(t,e),Object(O.a)(t,[{key:"componentWillUnmount",value:function(){this.frame.remove()}},{key:"onUpdate",value:function(e){var t=this.props,n=t.onSelect,o=t.multiple,r=void 0!==o&&o,i=this.frame.state(),c=e||i.get("selection");c&&c.models.length&&n(r?c.models.map(function(e){return y(e.toJSON())}):y(c.models[0].toJSON()))}},{key:"onSelect",value:function(){var e=this.props,t=e.onSelect,n=e.multiple,o=void 0!==n&&n,r=this.frame.state().get("selection").toJSON();t(o?r:r[0])}},{key:"onOpen",value:function(){if(this.props.value){if(!this.props.gallery){var e=this.frame.state().get("selection");Object(E.castArray)(this.props.value).map(function(t){e.add(wp.media.attachment(t))})}P(Object(E.castArray)(this.props.value)).more()}}},{key:"onClose",value:function(){var e=this.props.onClose;e&&e()}},{key:"openModal",value:function(){this.frame.open()}},{key:"render",value:function(){return this.props.render({open:this.openModal})}}]),t}(i.Component);Object(p.addFilter)("editor.MediaUpload","core/edit-post/components/media-upload/replace-media-upload",function(){return k});var w=n(22),C=n(32),T=n(9),x=n(4),A=n(6),M=Object(A.compose)(Object(u.withSelect)(function(e,t){var n=e("core/editor").getBlocks();if(Object(T.hasBlockSupport)(t.name,"multiple",!0))return{};var o=Object(E.find)(n,function(e){var n=e.name;return t.name===n});return{originalBlockClientId:o&&o.clientId!==t.clientId&&o.clientId}}),Object(u.withDispatch)(function(e,t){var n=t.originalBlockClientId;return{selectFirst:function(){return e("core/editor").selectBlock(n)}}})),B=Object(A.createHigherOrderComponent)(function(e){return M(function(t){var n=t.originalBlockClientId,o=t.selectFirst,r=Object(C.a)(t,["originalBlockClientId","selectFirst"]);if(!n)return Object(i.createElement)(e,r);var a=Object(T.getBlockType)(r.name),l=function(e){var t=Object(T.findTransform)(Object(T.getBlockTransforms)("to",e),function(e){var t=e.type,n=e.blocks;return"block"===t&&1===n.length});if(!t)return null;return Object(T.getBlockType)(t.blocks[0])}(r.name);return[Object(i.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(i.createElement)(e,Object(w.a)({key:"block-edit"},r))),Object(i.createElement)(c.Warning,{key:"multiple-use-warning",actions:[Object(i.createElement)(x.Button,{key:"find-original",isLarge:!0,onClick:o},Object(v.__)("Find original")),Object(i.createElement)(x.Button,{key:"remove",isLarge:!0,onClick:function(){return r.onReplace([])}},Object(v.__)("Remove")),l&&Object(i.createElement)(x.Button,{key:"transform",isLarge:!0,onClick:function(){return r.onReplace(Object(T.createBlock)(l.name,r.attributes))}},Object(v.__)("Transform into:")," ",l.title)]},Object(i.createElement)("strong",null,a.title,": "),Object(v.__)("This block can only be used once."))]})},"withMultipleValidation");Object(p.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",B);var N=n(74);var I=Object(A.compose)(Object(u.withSelect)(function(e){return{editedPostContent:e("core/editor").getEditedPostAttribute("content")}}),Object(A.withState)({hasCopied:!1}))(function(e){var t=e.editedPostContent,n=e.hasCopied,o=e.setState;return Object(i.createElement)(x.ClipboardButton,{text:t,className:"components-menu-item__button",onCopy:function(){return o({hasCopied:!0})},onFinishCopy:function(){return o({hasCopied:!1})}},n?Object(v.__)("Copied!"):Object(v.__)("Copy All Content"))}),L=n(20);var D=Object(u.withDispatch)(function(e){return{openModal:e("core/edit-post").openModal}})(function(e){var t=e.openModal,n=e.onSelect;return Object(i.createElement)(x.MenuItem,{onClick:function(){n(),t("edit-post/keyboard-shortcut-help")},shortcut:L.displayShortcut.access("h")},Object(v.__)("Keyboard Shortcuts"))}),G=Object(A.compose)([Object(u.withSelect)(function(e){return{isEnabled:e("core/editor").isPublishSidebarEnabled()}}),Object(u.withDispatch)(function(e,t){return{onToggle:function(){var n=e("core/editor"),o=n.disablePublishSidebar,r=n.enablePublishSidebar;t.isEnabled?o():r(),t.onToggle()}}})])(function(e){var t=e.onToggle,n=e.isEnabled;return Object(i.createElement)(x.MenuItem,{className:"edit-post__pre-publish-checks",icon:n&&"yes",isSelected:n,role:"menuitemcheckbox",onClick:t},Object(v.__)("Enable Pre-publish Checks"))});var F=Object(A.compose)([Object(u.withSelect)(function(e){return{isActive:e("core/nux").areTipsEnabled()}}),Object(u.withDispatch)(function(e,t){return{onToggle:function(){var n=e("core/nux"),o=n.disableTips,r=n.enableTips;t.isActive?o():r(),t.onToggle()}}})])(function(e){var t=e.onToggle,n=e.isActive;return Object(i.createElement)(x.MenuItem,{icon:n&&"yes",isSelected:n,role:"menuitemcheckbox",onClick:t},Object(v.__)("Show Tips"))}),R=Object(x.createSlotFill)("ToolsMoreMenuGroup"),U=R.Fill,V=R.Slot;U.Slot=function(e){var t=e.fillProps;return Object(i.createElement)(V,{fillProps:t},function(e){return!Object(E.isEmpty)(e)&&Object(i.createElement)(x.MenuGroup,{label:Object(v.__)("Tools")},e)})};var H=U;Object(N.registerPlugin)("edit-post",{render:function(){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(H,null,function(e){var t=e.onClose;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(x.MenuItem,{role:"menuitem",href:"edit.php?post_type=wp_block"},Object(v.__)("Manage All Reusable Blocks")),Object(i.createElement)(F,{onToggle:t}),Object(i.createElement)(G,{onToggle:t}),Object(i.createElement)(D,{onSelect:t}),Object(i.createElement)(I,null))}))}});var X=n(18),q=n(8),z={editorMode:"visual",isGeneralSidebarDismissed:!1,panels:{"post-status":!0},features:{fixedToolbar:!1},pinnedPluginItems:{}},W="edit-post/document",K=Object(u.combineReducers)({isGeneralSidebarDismissed:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_GENERAL_SIDEBAR":case"CLOSE_GENERAL_SIDEBAR":return"CLOSE_GENERAL_SIDEBAR"===t.type}return e},panels:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z.panels,t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_GENERAL_SIDEBAR_EDITOR_PANEL"===t.type?Object(q.a)({},e,Object(X.a)({},t.panel,!e[t.panel])):e},features:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z.features,t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_FEATURE"===t.type?Object(q.a)({},e,Object(X.a)({},t.feature,!e[t.feature])):e},editorMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z.editorMode,t=arguments.length>1?arguments[1]:void 0;return"SWITCH_MODE"===t.type?t.mode:e},pinnedPluginItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z.pinnedPluginItems,t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_PINNED_PLUGIN_ITEM"===t.type?Object(q.a)({},e,Object(X.a)({},t.pluginName,!Object(E.get)(e,[t.pluginName],!0))):e}});var Q=Object(u.combineReducers)({preferences:K,activeGeneralSidebar:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_GENERAL_SIDEBAR":return t.name}return e},panel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"document",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ACTIVE_PANEL":return t.panel}return e},activeModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e},publishSidebarActive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},activeMetaBoxLocations:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ACTIVE_META_BOX_LOCATIONS":return t.locations}return e},isSavingMetaBoxes:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":return!1;default:return e}}}),J=n(21),Y=n(90),$=n.n(Y),Z=n(33),ee=n(72),te=n(39),ne=n.n(te);function oe(e){return{type:"OPEN_GENERAL_SIDEBAR",name:e}}function re(){return{type:"CLOSE_GENERAL_SIDEBAR"}}function ie(e){return{type:"OPEN_MODAL",name:e}}function ce(){return{type:"CLOSE_MODAL"}}function ae(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function le(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function se(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}function ue(e){return{type:"TOGGLE_GENERAL_SIDEBAR_EDITOR_PANEL",panel:e}}function de(e){return{type:"TOGGLE_FEATURE",feature:e}}function be(e){return{type:"SWITCH_MODE",mode:e}}function pe(e){return{type:"TOGGLE_PINNED_PLUGIN_ITEM",pluginName:e}}function me(e){return b()("initializeMetaBoxState action (`core/edit-post`)",{alternative:"setActiveMetaBoxLocations",plugin:"Gutenberg",version:"4.2"}),Oe(Object(E.reduce)(e,function(e,t,n){return t&&(e=e.concat(n)),e},[]))}function Oe(e){return{type:"SET_ACTIVE_META_BOX_LOCATIONS",locations:e}}function fe(){return{type:"REQUEST_META_BOX_UPDATES"}}function je(){return{type:"META_BOX_UPDATES_SUCCESS"}}function he(e){return b()("setMetaBoxSavedData action (`core/edit-post`)",{plugin:"Gutenberg",version:"4.2"}),{type:"META_BOX_SET_SAVED_DATA",dataPerLocation:e}}function ge(e){return _e(e,"editorMode","visual")}function Ee(e){var t=Se(e);return Object(E.includes)(["edit-post/document","edit-post/block"],t)}function ve(e){return!!Se(e)&&!Ee(e)}function Se(e){return _e(e,"isGeneralSidebarDismissed",!1)?null:e.activeGeneralSidebar}function ye(e){return e.preferences}function _e(e,t,n){var o=ye(e)[t];return void 0===o?n:o}function Pe(e){return e.publishSidebarActive}function ke(e,t){var n=_e(e,"panels");return!!n&&!!n[t]}function we(e,t){return e.activeModal===t}function Ce(e,t){return!!e.preferences.features[t]}function Te(e,t){var n=_e(e,"pinnedPluginItems",{});return Object(E.get)(n,[t],!0)}function xe(e){return b()("getMetaBox selector (`core/edit-post`)",{alternative:"getActiveMetaBoxLocations selector",plugin:"Gutenberg",version:"4.2"}),["normal","side","advanced"].reduce(function(t,n){return t[n]={isActive:Me(e,n)},t},{})}function Ae(e){return e.activeMetaBoxLocations}function Me(e,t){return Ae(e).includes(t)}function Be(e,t){return b()("getMetaBox selector (`core/edit-post`)",{alternative:"isMetaBoxLocationActive selector",plugin:"Gutenberg",version:"4.2"}),xe(e)[t]}function Ne(e){return Ae(e).length>0}function Ie(e){return e.isSavingMetaBoxes}var Le=function(e,t){var n=e();return function(){var o=e();o!==n&&(n=o,t(o))}},De={SET_ACTIVE_META_BOX_LOCATIONS:function(e,t){if(e.locations.length>0){setTimeout(function(){var e=Object(u.select)("core/editor").getCurrentPostType();window.postboxes.page!==e&&window.postboxes.add_postbox_toggles(e)});var n=Object(u.select)("core/editor").isSavingPost(),o=Object(u.select)("core/editor").isAutosavingPost();Object(u.subscribe)(function(){var e=Object(u.select)("core/editor").isSavingPost(),r=Object(u.select)("core/editor").isAutosavingPost(),i=n&&!o&&!e&&!r;n=e,o=r,i&&t.dispatch({type:"REQUEST_META_BOX_UPDATES"})})}},REQUEST_META_BOX_UPDATES:function(e,t){var n=t.getState(),o=Object(u.select)("core/editor").getCurrentPost(n),r=[!!o.comment_status&&["comment_status",o.comment_status],!!o.ping_status&&["ping_status",o.ping_status],!!o.sticky&&["sticky",o.sticky],["post_author",o.author]].filter(Boolean),i=[new window.FormData(document.querySelector(".metabox-base-form"))].concat(Object(J.a)(Ae(n).map(function(e){return new window.FormData(function(e){var t=document.querySelector(".edit-post-meta-boxes-area.is-".concat(e," .metabox-location-").concat(e));return t||document.querySelector("#metaboxes .metabox-location-"+e)}(e))}))),c=Object(E.reduce)(i,function(e,t){var n=!0,o=!1,r=void 0;try{for(var i,c=t[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=Object(Z.a)(i.value,2),l=a[0],s=a[1];e.append(l,s)}}catch(e){o=!0,r=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw r}}return e},new window.FormData);r.forEach(function(e){var t=Object(Z.a)(e,2),n=t[0],o=t[1];return c.append(n,o)}),ne()({url:window._wpMetaBoxUrl,method:"POST",body:c,parse:!1}).then(function(){return t.dispatch({type:"META_BOX_UPDATES_SUCCESS"})})},SWITCH_MODE:function(e){"visual"!==e.mode&&Object(u.dispatch)("core/editor").clearSelectedBlock();var t="visual"===e.mode?Object(v.__)("Visual editor selected"):Object(v.__)("Code editor selected");Object(ee.speak)(t,"assertive")},INIT:function(e,t){Object(u.subscribe)(Le(function(){return!!Object(u.select)("core/editor").getBlockSelectionStart()},function(e){Object(u.select)("core/edit-post").isEditorSidebarOpened()&&(e?t.dispatch(oe("edit-post/block")):t.dispatch(oe("edit-post/document")))}));var n=function(){return Object(u.select)("core/viewport").isViewportMatch("< medium")},o=function(){var e=null;return function(n){n?(e=Se(t.getState()))&&t.dispatch({type:"CLOSE_GENERAL_SIDEBAR"}):e&&!Se(t.getState())&&t.dispatch(oe(e))}}();o(n()),Object(u.subscribe)(Le(n,o))}};var Ge=function(e){var t,n=[$()(De)],o=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:e.getState,dispatch:function(){return o.apply(void 0,arguments)}};return t=n.map(function(e){return e(r)}),o=E.flowRight.apply(void 0,Object(J.a)(t))(e.dispatch),e.dispatch=o,e},Fe=Object(u.registerStore)("core/edit-post",{reducer:Q,actions:o,selectors:r,persist:["preferences"]});Ge(Fe),Fe.dispatch({type:"INIT"});var Re=Fe,Ue=n(17),Ve=n.n(Ue),He=n(41);var Xe=function(e){function t(){var e;return Object(m.a)(this,t),(e=Object(f.a)(this,Object(j.a)(t).apply(this,arguments))).state={historyId:null},e}return Object(h.a)(t,e),Object(O.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.postId,o=t.postStatus,r=t.postType,i=this.state.historyId;"trash"!==o?n===e.postId&&n===i||"auto-draft"===o||this.setBrowserURL(n):this.setTrashURL(n,r)}},{key:"setTrashURL",value:function(e,t){window.location.href=function(e,t){return Object(He.addQueryArgs)("edit.php",{trashed:1,post_type:t,ids:e})}(e,t)}},{key:"setBrowserURL",value:function(e){window.history.replaceState({id:e},"Post "+e,function(e){return Object(He.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState(function(){return{historyId:e}})}},{key:"render",value:function(){return null}}]),t}(i.Component),qe=Object(u.withSelect)(function(e){var t=(0,e("core/editor").getCurrentPost)();return{postId:t.id,postStatus:t.status,postType:t.type}})(Xe),ze={toggleEditorMode:{raw:L.rawShortcut.secondary("m"),display:L.displayShortcut.secondary("m")},toggleSidebar:{raw:L.rawShortcut.primaryShift(","),display:L.displayShortcut.primaryShift(","),ariaLabel:L.shortcutAriaLabel.primaryShift(",")}},We=Object(A.compose)(Object(u.withSelect)(function(e){return{title:e("core/editor").getEditedPostAttribute("title")}}),Object(u.withDispatch)(function(e){return{closeSidebar:e("core/edit-post").closeGeneralSidebar}}))(function(e){var t=e.children,n=e.className,o=e.closeLabel,r=e.closeSidebar,c=e.title;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"components-panel__header edit-post-sidebar-header__small"},Object(i.createElement)("span",{className:"edit-post-sidebar-header__title"},c||Object(v.__)("(no title)")),Object(i.createElement)(x.IconButton,{onClick:r,icon:"no-alt",label:o})),Object(i.createElement)("div",{className:Ve()("components-panel__header edit-post-sidebar-header",n)},t,Object(i.createElement)(x.IconButton,{onClick:r,icon:"no-alt",label:o,shortcut:ze.toggleSidebar})))}),Ke=Object(A.compose)(Object(u.withSelect)(function(e){return{count:e("core/editor").getSelectedBlockCount()}}),Object(u.withDispatch)(function(e){var t=e("core/edit-post").openGeneralSidebar,n=e("core/editor").clearSelectedBlock;return{openDocumentSettings:function(){t("edit-post/document"),n()},openBlockSettings:function(){t("edit-post/block")}}}))(function(e){var t=e.count,n=e.openDocumentSettings,o=e.openBlockSettings,r=e.sidebarName,c=0===t?1:t,a=1===c?Object(v.__)("Block"):Object(v.sprintf)(Object(v._n)("%d Block","%d Blocks",c),c);return Object(i.createElement)(We,{className:"edit-post-sidebar__panel-tabs",closeLabel:Object(v.__)("Close settings")},Object(i.createElement)("button",{onClick:n,className:"edit-post-sidebar__panel-tab ".concat("edit-post/document"===r?"is-active":""),"aria-label":Object(v.__)("Document settings"),"data-label":Object(v.__)("Document")},Object(v.__)("Document")),Object(i.createElement)("button",{onClick:o,className:"edit-post-sidebar__panel-tab ".concat("edit-post/block"===r?"is-active":""),"aria-label":Object(v.__)("Block settings"),"data-label":a},a))}),Qe=Object(x.createSlotFill)("Sidebar"),Je=Qe.Fill,Ye=Qe.Slot,$e=Object(A.compose)(Object(u.withSelect)(function(e,t){var n=t.name;return{isActive:e("core/edit-post").getActiveGeneralSidebarName()===n}}),Object(A.ifCondition)(function(e){return e.isActive}),x.withFocusReturn)(function(e){var t=e.children,n=e.label;return Object(i.createElement)(Je,null,Object(i.createElement)("div",{className:"edit-post-sidebar",role:"region","aria-label":n,tabIndex:"-1"},t))});$e.Slot=Ye;var Ze=$e,et=function(){return Object(i.createElement)(Ze,{name:"edit-post/block",label:Object(v.__)("Editor settings")},Object(i.createElement)(Ke,{sidebarName:"edit-post/block"}),Object(i.createElement)(x.Panel,null,Object(i.createElement)(x.PanelBody,{className:"edit-post-block-sidebar__panel"},Object(i.createElement)(c.BlockInspector,null))))};var tt=function(){return Object(i.createElement)(c.PostVisibilityCheck,{render:function(e){var t=e.canEdit;return Object(i.createElement)(x.PanelRow,{className:"edit-post-post-visibility"},Object(i.createElement)("span",null,Object(v.__)("Visibility")),!t&&Object(i.createElement)("span",null,Object(i.createElement)(c.PostVisibilityLabel,null)),t&&Object(i.createElement)(x.Dropdown,{position:"bottom left",contentClassName:"edit-post-post-visibility__dialog",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(x.Button,{type:"button","aria-expanded":t,className:"edit-post-post-visibility__toggle",onClick:n,isLink:!0},Object(i.createElement)(c.PostVisibilityLabel,null))},renderContent:function(){return Object(i.createElement)(c.PostVisibility,null)}}))}})};function nt(){return Object(i.createElement)(c.PostTrashCheck,null,Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostTrash,null)))}var ot=function(){return Object(i.createElement)(c.PostScheduleCheck,null,Object(i.createElement)(x.PanelRow,{className:"edit-post-post-schedule"},Object(i.createElement)("span",null,Object(v.__)("Publish")),Object(i.createElement)(x.Dropdown,{position:"bottom left",contentClassName:"edit-post-post-schedule__dialog",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(i.createElement)(x.Button,{type:"button",className:"edit-post-post-schedule__toggle",onClick:t,"aria-expanded":n,isLink:!0},Object(i.createElement)(c.PostScheduleLabel,null))},renderContent:function(){return Object(i.createElement)(c.PostSchedule,null)}})))};var rt=function(){return Object(i.createElement)(c.PostStickyCheck,null,Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostSticky,null)))};var it=function(){return Object(i.createElement)(c.PostAuthorCheck,null,Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostAuthor,null)))};var ct=function(){return Object(i.createElement)(c.PostFormatCheck,null,Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostFormat,null)))};var at=function(){return Object(i.createElement)(c.PostPendingStatusCheck,null,Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostPendingStatus,null)))},lt=Object(x.createSlotFill)("PluginPostStatusInfo"),st=lt.Fill,ut=lt.Slot,dt=function(e){var t=e.children,n=e.className;return Object(i.createElement)(st,null,Object(i.createElement)(x.PanelRow,{className:n},t))};dt.Slot=ut;var bt=dt;var pt=Object(A.compose)([Object(u.withSelect)(function(e){return{isOpened:e("core/edit-post").isEditorSidebarPanelOpened("post-status")}}),Object(u.withDispatch)(function(e){return{onTogglePanel:function(){return e("core/edit-post").toggleGeneralSidebarEditorPanel("post-status")}}})])(function(e){var t=e.isOpened,n=e.onTogglePanel;return Object(i.createElement)(x.PanelBody,{className:"edit-post-post-status",title:Object(v.__)("Status & Visibility"),opened:t,onToggle:n},Object(i.createElement)(bt.Slot,null,function(e){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(tt,null),Object(i.createElement)(ot,null),Object(i.createElement)(ct,null),Object(i.createElement)(rt,null),Object(i.createElement)(at,null),Object(i.createElement)(it,null),e,Object(i.createElement)(nt,null))}))});var mt=Object(A.compose)([Object(u.withSelect)(function(e){return{isOpened:e("core/edit-post").isEditorSidebarPanelOpened("post-excerpt")}}),Object(u.withDispatch)(function(e){return{onTogglePanel:function(){return e("core/edit-post").toggleGeneralSidebarEditorPanel("post-excerpt")}}})])(function(e){var t=e.isOpened,n=e.onTogglePanel;return Object(i.createElement)(c.PostExcerptCheck,null,Object(i.createElement)(x.PanelBody,{title:Object(v.__)("Excerpt"),opened:t,onToggle:n},Object(i.createElement)(c.PostExcerpt,null)))});var Ot=Object(A.compose)(Object(u.withSelect)(function(e,t){var n=Object(E.get)(t.taxonomy,["slug"]),o=n?"taxonomy-panel-".concat(n):"";return{panelName:o,isOpened:!!n&&e("core/edit-post").isEditorSidebarPanelOpened(o)}}),Object(u.withDispatch)(function(e,t){return{onTogglePanel:function(){e("core/edit-post").toggleGeneralSidebarEditorPanel(t.panelName)}}}))(function(e){var t=e.taxonomy,n=e.isOpened,o=e.onTogglePanel,r=e.children,c=Object(E.get)(t,["labels","menu_name"]);return c?Object(i.createElement)(x.PanelBody,{title:c,opened:n,onToggle:o},r):null});var ft=function(){return Object(i.createElement)(c.PostTaxonomiesCheck,null,Object(i.createElement)(c.PostTaxonomies,{taxonomyWrapper:function(e,t){return Object(i.createElement)(Ot,{taxonomy:t},e)}}))};var jt=Object(u.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute,n=e("core").getPostType,o=e("core/edit-post").isEditorSidebarPanelOpened;return{postType:n(t("type")),isOpened:o("featured-image")}}),ht=Object(u.withDispatch)(function(e){var t=e("core/edit-post").toggleGeneralSidebarEditorPanel;return{onTogglePanel:Object(E.partial)(t,"featured-image")}}),gt=Object(A.compose)(jt,ht)(function(e){var t=e.isOpened,n=e.postType,o=e.onTogglePanel;return Object(i.createElement)(c.PostFeaturedImageCheck,null,Object(i.createElement)(x.PanelBody,{title:Object(E.get)(n,["labels","featured_image"],Object(v.__)("Featured Image")),opened:t,onToggle:o},Object(i.createElement)(c.PostFeaturedImage,null)))});var Et=Object(A.compose)([Object(u.withSelect)(function(e){return{isOpened:e("core/edit-post").isEditorSidebarPanelOpened("discussion-panel")}}),Object(u.withDispatch)(function(e){return{onTogglePanel:function(){return e("core/edit-post").toggleGeneralSidebarEditorPanel("discussion-panel")}}})])(function(e){var t=e.isOpened,n=e.onTogglePanel;return Object(i.createElement)(c.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},Object(i.createElement)(x.PanelBody,{title:Object(v.__)("Discussion"),opened:t,onToggle:n},Object(i.createElement)(c.PostTypeSupportCheck,{supportKeys:"comments"},Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostComments,null))),Object(i.createElement)(c.PostTypeSupportCheck,{supportKeys:"trackbacks"},Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PostPingbacks,null)))))});var vt=function(){return Object(i.createElement)(c.PostLastRevisionCheck,null,Object(i.createElement)(x.PanelBody,{className:"edit-post-last-revision__panel"},Object(i.createElement)(c.PostLastRevision,null)))};var St=Object(u.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute,n=e("core/edit-post").isEditorSidebarPanelOpened,o=e("core").getPostType;return{isOpened:n("page-attributes"),postType:o(t("type"))}}),yt=Object(u.withDispatch)(function(e){var t=e("core/edit-post").toggleGeneralSidebarEditorPanel;return{onTogglePanel:Object(E.partial)(t,"page-attributes")}}),_t=Object(A.compose)(St,yt)(function(e){var t=e.isOpened,n=e.onTogglePanel,o=e.postType;return o?Object(i.createElement)(c.PageAttributesCheck,null,Object(i.createElement)(x.PanelBody,{title:Object(E.get)(o,["labels","attributes"],Object(v.__)("Page Attributes")),opened:t,onToggle:n},Object(i.createElement)(c.PageTemplate,null),Object(i.createElement)(c.PageAttributesParent,null),Object(i.createElement)(x.PanelRow,null,Object(i.createElement)(c.PageAttributesOrder,null)))):null}),Pt=function(e){function t(){var e;return Object(m.a)(this,t),(e=Object(f.a)(this,Object(j.a)(t).apply(this,arguments))).bindContainerNode=e.bindContainerNode.bind(Object(g.a)(Object(g.a)(e))),e}return Object(h.a)(t,e),Object(O.a)(t,[{key:"componentDidMount",value:function(){this.form=document.querySelector(".metabox-location-"+this.props.location),this.form&&this.container.appendChild(this.form)}},{key:"componentWillUnmount",value:function(){this.form&&document.querySelector("#metaboxes").appendChild(this.form)}},{key:"bindContainerNode",value:function(e){this.container=e}},{key:"render",value:function(){var e=this.props,t=e.location,n=e.isSaving,o=Ve()("edit-post-meta-boxes-area","is-".concat(t),{"is-loading":n});return Object(i.createElement)("div",{className:o},n&&Object(i.createElement)(x.Spinner,null),Object(i.createElement)("div",{className:"edit-post-meta-boxes-area__container",ref:this.bindContainerNode}),Object(i.createElement)("div",{className:"edit-post-meta-boxes-area__clear"}))}}]),t}(i.Component),kt=Object(u.withSelect)(function(e){return{isSaving:e("core/edit-post").isSavingMetaBoxes()}})(Pt);var wt=Object(u.withSelect)(function(e,t){return{isActive:(0,e("core/edit-post").isMetaBoxLocationActive)(t.location)}})(function(e){var t=e.location;return e.isActive?Object(i.createElement)(kt,{location:t}):null}),Ct=function(){return Object(i.createElement)(Ze,{name:"edit-post/document",label:Object(v.__)("Editor settings")},Object(i.createElement)(Ke,{sidebarName:"edit-post/document"}),Object(i.createElement)(x.Panel,null,Object(i.createElement)(pt,null),Object(i.createElement)(vt,null),Object(i.createElement)(ft,null),Object(i.createElement)(gt,null),Object(i.createElement)(mt,null),Object(i.createElement)(Et,null),Object(i.createElement)(_t,null),Object(i.createElement)(wt,{location:"side"})))},Tt=[{value:"visual",label:Object(v.__)("Visual Editor")},{value:"text",label:Object(v.__)("Code Editor")}];var xt=Object(A.compose)([Object(u.withSelect)(function(e){return{mode:e("core/edit-post").getEditorMode()}}),Object(u.withDispatch)(function(e,t){return{onSwitch:function(n){e("core/edit-post").switchEditorMode(n),t.onSelect(n)}}})])(function(e){var t=e.onSwitch,n=e.mode,o=Tt.map(function(e){return e.value!==n?Object(q.a)({},e,{shortcut:ze.toggleEditorMode.display}):e});return Object(i.createElement)(x.MenuGroup,{label:Object(v.__)("Editor")},Object(i.createElement)(x.MenuItemsChoice,{choices:o,value:n,onSelect:t}))}),At=Object(x.createSlotFill)("PluginsMoreMenuGroup"),Mt=At.Fill,Bt=At.Slot;Mt.Slot=function(e){var t=e.fillProps;return Object(i.createElement)(Bt,{fillProps:t},function(e){return!Object(E.isEmpty)(e)&&Object(i.createElement)(x.MenuGroup,{label:Object(v.__)("Plugins")},e)})};var Nt=Mt;var It=Object(A.compose)([Object(u.withSelect)(function(e,t){var n=t.feature;return{isActive:e("core/edit-post").isFeatureActive(n)}}),Object(u.withDispatch)(function(e,t){return{onToggle:function(){e("core/edit-post").toggleFeature(t.feature),t.onToggle()}}})])(function(e){var t=e.onToggle,n=e.isActive,o=e.label;return Object(i.createElement)(x.MenuItem,{icon:n&&"yes",isSelected:n,onClick:t,role:"menuitemcheckbox"},o)});var Lt=Object(l.ifViewportMatches)("medium")(function(e){var t=e.onClose;return Object(i.createElement)(x.MenuGroup,{label:Object(v.__)("View")},Object(i.createElement)(It,{feature:"fixedToolbar",label:Object(v.__)("Unified Toolbar"),onToggle:t}),Object(i.createElement)(It,{feature:"focusMode",label:Object(v.__)("Spotlight Mode"),onToggle:t}),Object(i.createElement)(It,{feature:"fullscreenMode",label:Object(v.__)("Fullscreen Mode"),onToggle:t}))}),Dt=function(){return Object(i.createElement)(x.Dropdown,{className:"edit-post-more-menu",contentClassName:"edit-post-more-menu__content",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(x.IconButton,{icon:"ellipsis",label:Object(v._x)("More","button to expand options"),onClick:n,"aria-expanded":t})},renderContent:function(e){var t=e.onClose;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Lt,{onClose:t}),Object(i.createElement)(xt,{onSelect:t}),Object(i.createElement)(Nt.Slot,{fillProps:{onClose:t}}),Object(i.createElement)(H.Slot,{fillProps:{onClose:t}}))}})};var Gt=Object(u.withSelect)(function(e){var t=e("core/editor").getCurrentPostType,n=e("core/edit-post").isFeatureActive,o=e("core").getPostType;return{isActive:n("fullscreenMode"),postType:o(t())}})(function(e){var t=e.isActive,n=e.postType;return t&&n?Object(i.createElement)(x.Toolbar,{className:"edit-post-fullscreen-mode-close__toolbar"},Object(i.createElement)(x.IconButton,{icon:"exit",href:Object(He.addQueryArgs)("edit.php",{post_type:n.slug}),label:Object(E.get)(n,["labels","view_items"],Object(v.__)("View Posts"))})):null});var Ft=Object(A.compose)([Object(u.withSelect)(function(e){return{hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),mode:e("core/edit-post").getEditorMode()}}),Object(l.withViewportMatch)({isLargeViewport:"medium"})])(function(e){var t=e.hasFixedToolbar,n=e.isLargeViewport,o=e.mode;return Object(i.createElement)(c.NavigableToolbar,{className:"edit-post-header-toolbar","aria-label":Object(v.__)("Editor Toolbar")},Object(i.createElement)(Gt,null),Object(i.createElement)("div",null,Object(i.createElement)(c.Inserter,{disabled:"visual"!==o,position:"bottom right"}),Object(i.createElement)(a.DotTip,{id:"core/editor.inserter"},Object(v.__)("Welcome to the wonderful world of blocks! Click the “+” (“Add block”) button to add a new block. There are blocks available for all kinds of content: you can insert text, headings, images, lists, and lots more!"))),Object(i.createElement)(c.EditorHistoryUndo,null),Object(i.createElement)(c.EditorHistoryRedo,null),Object(i.createElement)(c.TableOfContents,null),t&&n&&Object(i.createElement)("div",{className:"edit-post-header-toolbar__block-toolbar"},Object(i.createElement)(c.BlockToolbar,null)))}),Rt=Object(x.createSlotFill)("PinnedPlugins"),Ut=Rt.Fill,Vt=Rt.Slot;Ut.Slot=function(e){return Object(i.createElement)(Vt,e,function(e){return!Object(E.isEmpty)(e)&&Object(i.createElement)("div",{className:"edit-post-pinned-plugins"},e)})};var Ht=Ut;var Xt=Object(A.compose)(Object(u.withSelect)(function(e){return{isEditorSidebarOpened:e("core/edit-post").isEditorSidebarOpened(),isPublishSidebarOpened:e("core/edit-post").isPublishSidebarOpened(),isPublishSidebarEnabled:e("core/editor").isPublishSidebarEnabled(),hasActiveMetaboxes:e("core/edit-post").hasMetaBoxes(),isSaving:e("core/edit-post").isSavingMetaBoxes(),hasBlockSelection:!!e("core/editor").getBlockSelectionStart()}}),Object(u.withDispatch)(function(e,t){var n=t.hasBlockSelection,o=e("core/edit-post"),r=o.openGeneralSidebar,i=o.closeGeneralSidebar,c=o.togglePublishSidebar,a=n?"edit-post/block":"edit-post/document";return{openGeneralSidebar:function(){return r(a)},closeGeneralSidebar:i,togglePublishSidebar:c,hasBlockSelection:void 0}}))(function(e){var t=e.isEditorSidebarOpened,n=e.openGeneralSidebar,o=e.closeGeneralSidebar,r=e.isPublishSidebarOpened,l=e.isPublishSidebarEnabled,s=e.togglePublishSidebar,u=e.hasActiveMetaboxes,d=e.isSaving,b=t?o:n;return Object(i.createElement)("div",{role:"region","aria-label":Object(v.__)("Editor top bar"),className:"edit-post-header",tabIndex:"-1"},Object(i.createElement)(Ft,null),!r&&Object(i.createElement)("div",{className:"edit-post-header__settings"},Object(i.createElement)(c.PostSavedState,{forceIsDirty:u,forceIsSaving:d}),Object(i.createElement)(c.PostPreviewButton,null),l?Object(i.createElement)(c.PostPublishPanelToggle,{isOpen:r,onToggle:s,forceIsDirty:u,forceIsSaving:d}):Object(i.createElement)(c.PostPublishButton,{forceIsDirty:u,forceIsSaving:d}),Object(i.createElement)("div",null,Object(i.createElement)(x.IconButton,{icon:"admin-generic",label:Object(v.__)("Settings"),onClick:b,isToggled:t,"aria-expanded":t,shortcut:ze.toggleSidebar}),Object(i.createElement)(a.DotTip,{id:"core/editor.settings"},Object(v.__)("You’ll find more settings for your page and blocks in the sidebar. Click “Settings” to open it."))),Object(i.createElement)(Ht.Slot,null),Object(i.createElement)(Dt,null)))});var qt=Object(u.withDispatch)(function(e){return{onExit:function(){e("core/edit-post").switchEditorMode("visual")}}})(function(e){var t=e.onExit;return Object(i.createElement)("div",{className:"edit-post-text-editor"},Object(i.createElement)("div",{className:"edit-post-text-editor__toolbar"},Object(i.createElement)("h2",null,Object(v.__)("Editing Code")),Object(i.createElement)(x.IconButton,{onClick:t,icon:"no-alt",shortcut:L.displayShortcut.secondary("m")},Object(v.__)("Exit Code Editor"))),Object(i.createElement)("div",{className:"edit-post-text-editor__body"},Object(i.createElement)(c.PostTitle,null),Object(i.createElement)(c.PostTextEditor,null)))});var zt=Object(A.compose)(Object(u.withSelect)(function(e){return{areAdvancedSettingsOpened:"edit-post/block"===e("core/edit-post").getActiveGeneralSidebarName()}}),Object(u.withDispatch)(function(e){return{openEditorSidebar:function(){return e("core/edit-post").openGeneralSidebar("edit-post/block")},closeSidebar:e("core/edit-post").closeGeneralSidebar}}),x.withSpokenMessages)(function(e){var t=e.areAdvancedSettingsOpened,n=e.closeSidebar,o=e.openEditorSidebar,r=e.onClick,c=void 0===r?E.noop:r,a=e.small,l=void 0!==a&&a,s=e.speak,u=t?Object(v.__)("Hide Block Settings"):Object(v.__)("Show Block Settings");return Object(i.createElement)(x.MenuItem,{className:"editor-block-settings-menu__control",onClick:Object(E.flow)(t?n:o,function(){s(t?Object(v.__)("Block settings closed"):Object(v.__)("Additional settings are now available in the Editor block settings sidebar"))},c),icon:"admin-generic",label:l?u:void 0,shortcut:ze.toggleSidebar},!l&&u)}),Wt=Object(x.createSlotFill)("PluginBlockSettingsMenuGroup"),Kt=Wt.Fill,Qt=Wt.Slot;Kt.Slot=Object(u.withSelect)(function(e,t){var n=t.fillProps.clientIds;return{selectedBlocks:e("core/editor").getBlocksByClientId(n)}})(function(e){var t=e.fillProps,n=e.selectedBlocks;return n=Object(E.map)(n,function(e){return e.name}),Object(i.createElement)(Qt,{fillProps:Object(q.a)({},t,{selectedBlocks:n})},function(e){return!Object(E.isEmpty)(e)&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"editor-block-settings-menu__separator"}),e)})});var Jt=Kt;var Yt=function(){return Object(i.createElement)(c.BlockSelectionClearer,{className:"edit-post-visual-editor"},Object(i.createElement)(c.EditorGlobalKeyboardShortcuts,null),Object(i.createElement)(c.CopyHandler,null),Object(i.createElement)(c.MultiSelectScrollIntoView,null),Object(i.createElement)(c.WritingFlow,null,Object(i.createElement)(c.ObserveTyping,null,Object(i.createElement)(c.PostTitle,null),Object(i.createElement)(c.BlockList,null))),Object(i.createElement)(c._BlockSettingsMenuFirstItem,null,function(e){var t=e.onClose;return Object(i.createElement)(zt,{onClick:t})}),Object(i.createElement)(c._BlockSettingsMenuPluginsExtension,null,function(e){var t=e.clientIds,n=e.onClose;return Object(i.createElement)(Jt.Slot,{fillProps:{clientIds:t,onClose:n}})}))},$t=function(e){function t(){var e;return Object(m.a)(this,t),(e=Object(f.a)(this,Object(j.a)(t).apply(this,arguments))).toggleMode=e.toggleMode.bind(Object(g.a)(Object(g.a)(e))),e.toggleSidebar=e.toggleSidebar.bind(Object(g.a)(Object(g.a)(e))),e}return Object(h.a)(t,e),Object(O.a)(t,[{key:"toggleMode",value:function(){var e=this.props,t=e.mode;(0,e.switchMode)("visual"===t?"text":"visual")}},{key:"toggleSidebar",value:function(e){e.preventDefault();var t=this.props,n=t.isEditorSidebarOpen,o=t.closeSidebar,r=t.openSidebar;n?o():r()}},{key:"render",value:function(){var e;return Object(i.createElement)(x.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(e={},Object(X.a)(e,ze.toggleEditorMode.raw,this.toggleMode),Object(X.a)(e,ze.toggleSidebar.raw,this.toggleSidebar),e)})}}]),t}(i.Component),Zt=Object(A.compose)([Object(u.withSelect)(function(e){return{mode:e("core/edit-post").getEditorMode(),isEditorSidebarOpen:e("core/edit-post").isEditorSidebarOpened(),hasBlockSelection:!!e("core/editor").getBlockSelectionStart()}}),Object(u.withDispatch)(function(e,t){var n=t.hasBlockSelection;return{switchMode:function(t){e("core/edit-post").switchEditorMode(t)},openSidebar:function(){var t=n?"edit-post/block":"edit-post/document";e("core/edit-post").openGeneralSidebar(t)},closeSidebar:e("core/edit-post").closeGeneralSidebar}})])($t),en=L.displayShortcutList.primary,tn=L.displayShortcutList.primaryShift,nn=L.displayShortcutList.primaryAlt,on=L.displayShortcutList.secondary,rn=L.displayShortcutList.access,cn=L.displayShortcutList.ctrl,an=L.displayShortcutList.ctrlShift,ln=L.displayShortcutList.shiftAlt,sn=[{title:Object(v.__)("Global shortcuts"),shortcuts:[{keyCombination:rn("h"),description:Object(v.__)("Display this help.")},{keyCombination:en("s"),description:Object(v.__)("Save your changes.")},{keyCombination:en("z"),description:Object(v.__)("Undo your last changes.")},{keyCombination:tn("z"),description:Object(v.__)("Redo your last undo.")},{keyCombination:tn(","),description:Object(v.__)("Show or hide the settings sidebar."),ariaLabel:L.shortcutAriaLabel.primaryShift(",")},{keyCombination:cn("`"),description:Object(v.__)("Navigate to the next part of the editor."),ariaLabel:L.shortcutAriaLabel.ctrl("`")},{keyCombination:an("`"),description:Object(v.__)("Navigate to the previous part of the editor."),ariaLabel:L.shortcutAriaLabel.ctrlShift("`")},{keyCombination:ln("n"),description:Object(v.__)("Navigate to the next part of the editor (alternative).")},{keyCombination:ln("p"),description:Object(v.__)("Navigate to the previous part of the editor (alternative).")},{keyCombination:on("m"),description:Object(v.__)("Switch between Visual Editor and Code Editor.")}]},{title:Object(v.__)("Selection shortcuts"),shortcuts:[{keyCombination:en("a"),description:Object(v.__)("Select all text when typing. Press again to select all blocks.")},{keyCombination:"Esc",description:Object(v.__)("Clear selection."),ariaLabel:Object(v.__)("Escape")}]},{title:Object(v.__)("Block shortcuts"),shortcuts:[{keyCombination:tn("d"),description:Object(v.__)("Duplicate the selected block(s).")},{keyCombination:rn("z"),description:Object(v.__)("Remove the selected block(s).")},{keyCombination:nn("t"),description:Object(v.__)("Insert a new block before the selected block(s).")},{keyCombination:nn("y"),description:Object(v.__)("Insert a new block after the selected block(s).")},{keyCombination:"/",description:Object(v.__)("Change the block type after adding a new paragraph."),ariaLabel:Object(v.__)("Forward-slash")}]},{title:Object(v.__)("Text formatting"),shortcuts:[{keyCombination:en("b"),description:Object(v.__)("Make the selected text bold.")},{keyCombination:en("i"),description:Object(v.__)("Make the selected text italic.")},{keyCombination:en("u"),description:Object(v.__)("Underline the selected text.")},{keyCombination:en("k"),description:Object(v.__)("Convert the selected text into a link.")},{keyCombination:rn("s"),description:Object(v.__)("Remove a link.")},{keyCombination:rn("d"),description:Object(v.__)("Add a strikethrough to the selected text.")},{keyCombination:rn("x"),description:Object(v.__)("Display the selected text in a monospaced font.")}]}],un="edit-post/keyboard-shortcut-help",dn=function(e){var t=e.shortcuts;return Object(i.createElement)("dl",{className:"edit-post-keyboard-shortcut-help__shortcut-list"},t.map(function(e,t){var n=e.keyCombination,o=e.description,r=e.ariaLabel;return Object(i.createElement)("div",{className:"edit-post-keyboard-shortcut-help__shortcut",key:t},Object(i.createElement)("dt",{className:"edit-post-keyboard-shortcut-help__shortcut-term"},Object(i.createElement)("kbd",{className:"edit-post-keyboard-shortcut-help__shortcut-key-combination","aria-label":r},function(e){return e.map(function(e,t){return"+"===e?Object(i.createElement)(i.Fragment,{key:t},e):Object(i.createElement)("kbd",{key:t,className:"edit-post-keyboard-shortcut-help__shortcut-key"},e)})}(Object(E.castArray)(n)))),Object(i.createElement)("dd",{className:"edit-post-keyboard-shortcut-help__shortcut-description"},o))}))},bn=function(e){var t=e.title,n=e.shortcuts;return Object(i.createElement)("section",{className:"edit-post-keyboard-shortcut-help__section"},Object(i.createElement)("h2",{className:"edit-post-keyboard-shortcut-help__section-title"},t),Object(i.createElement)(dn,{shortcuts:n}))};var pn=Object(A.compose)([Object(u.withSelect)(function(e){return{isModalActive:e("core/edit-post").isModalActive(un)}}),Object(u.withDispatch)(function(e,t){var n=t.isModalActive,o=e("core/edit-post"),r=o.openModal,i=o.closeModal;return{toggleModal:function(){return n?i():r(un)}}})])(function(e){var t=e.isModalActive,n=e.toggleModal,o=Object(i.createElement)("span",{className:"edit-post-keyboard-shortcut-help__title"},Object(v.__)("Keyboard Shortcuts"));return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(x.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(X.a)({},L.rawShortcut.access("h"),n)}),t&&Object(i.createElement)(x.Modal,{className:"edit-post-keyboard-shortcut-help",title:o,closeLabel:Object(v.__)("Close"),onRequestClose:n},sn.map(function(e,t){return Object(i.createElement)(bn,Object(w.a)({key:t},e))})))}),mn=Object(x.createSlotFill)("PluginPostPublishPanel"),On=mn.Fill,fn=mn.Slot,jn=function(e){var t=e.children,n=e.className,o=e.title,r=e.initialOpen,c=void 0!==r&&r;return Object(i.createElement)(On,null,Object(i.createElement)(x.PanelBody,{className:n,initialOpen:c||!o,title:o},t))};jn.Slot=fn;var hn=jn,gn=Object(x.createSlotFill)("PluginPrePublishPanel"),En=gn.Fill,vn=gn.Slot,Sn=function(e){var t=e.children,n=e.className,o=e.title,r=e.initialOpen,c=void 0!==r&&r;return Object(i.createElement)(En,null,Object(i.createElement)(x.PanelBody,{className:n,initialOpen:c||!o,title:o},t))};Sn.Slot=vn;var yn=Sn,_n=function(e){function t(){return Object(m.a)(this,t),Object(f.a)(this,Object(j.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(O.a)(t,[{key:"componentDidMount",value:function(){this.sync()}},{key:"componentDidUpdate",value:function(e){this.props.isActive!==e.isActive&&this.sync()}},{key:"sync",value:function(){this.props.isActive?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}},{key:"render",value:function(){return null}}]),t}(i.Component),Pn=Object(u.withSelect)(function(e){return{isActive:e("core/edit-post").isFeatureActive("fullscreenMode")}})(_n);var kn=Object(A.compose)(Object(u.withSelect)(function(e){return{mode:e("core/edit-post").getEditorMode(),editorSidebarOpened:e("core/edit-post").isEditorSidebarOpened(),pluginSidebarOpened:e("core/edit-post").isPluginSidebarOpened(),publishSidebarOpened:e("core/edit-post").isPublishSidebarOpened(),hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),hasActiveMetaboxes:e("core/edit-post").hasMetaBoxes(),isSaving:e("core/edit-post").isSavingMetaBoxes()}}),Object(u.withDispatch)(function(e){var t=e("core/edit-post");return{closePublishSidebar:t.closePublishSidebar,togglePublishSidebar:t.togglePublishSidebar}}),x.navigateRegions,Object(l.withViewportMatch)({isMobileViewport:"< small"}))(function(e){var t=e.mode,n=e.editorSidebarOpened,o=e.pluginSidebarOpened,r=e.publishSidebarOpened,a=e.hasFixedToolbar,l=e.closePublishSidebar,s=e.togglePublishSidebar,u=e.hasActiveMetaboxes,d=e.isSaving,b=e.isMobileViewport,p=n||o||r,m=Ve()("edit-post-layout",{"is-sidebar-opened":p,"has-fixed-toolbar":a}),O={role:"region","aria-label":Object(v.__)("Editor publish"),tabIndex:-1};return Object(i.createElement)("div",{className:m},Object(i.createElement)(Pn,null),Object(i.createElement)(qe,null),Object(i.createElement)(c.UnsavedChangesWarning,null),Object(i.createElement)(c.AutosaveMonitor,null),Object(i.createElement)(Xt,null),Object(i.createElement)("div",{className:"edit-post-layout__content",role:"region","aria-label":Object(v.__)("Editor content"),tabIndex:"-1"},Object(i.createElement)(c.EditorNotices,null),Object(i.createElement)(c.PreserveScrollInReorder,null),Object(i.createElement)(Zt,null),Object(i.createElement)(pn,null),"text"===t&&Object(i.createElement)(qt,null),"visual"===t&&Object(i.createElement)(Yt,null),Object(i.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(i.createElement)(wt,{location:"normal"})),Object(i.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(i.createElement)(wt,{location:"advanced"}))),r?Object(i.createElement)(c.PostPublishPanel,Object(w.a)({},O,{onClose:l,forceIsDirty:u,forceIsSaving:d,PrePublishExtension:yn.Slot,PostPublishExtension:hn.Slot})):Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",Object(w.a)({className:"edit-post-toggle-publish-panel"},O),Object(i.createElement)(x.Button,{isDefault:!0,type:"button",className:"edit-post-toggle-publish-panel__button",onClick:s,"aria-expanded":!1},Object(v.__)("Open publish panel"))),Object(i.createElement)(Ct,null),Object(i.createElement)(et,null),Object(i.createElement)(Ze.Slot,null),b&&p&&Object(i.createElement)(x.ScrollLock,null)),Object(i.createElement)(x.Popover.Slot,null),Object(i.createElement)(N.PluginArea,null))});var wn=Object(u.withSelect)(function(e,t){var n=t.postId,o=t.postType;return{hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),focusMode:e("core/edit-post").isFeatureActive("focusMode"),post:e("core").getEntityRecord("postType",o,n)}})(function(e){var t=e.settings,n=e.hasFixedToolbar,o=e.focusMode,r=e.post,a=e.overridePost,l=e.onError,s=Object(C.a)(e,["settings","hasFixedToolbar","focusMode","post","overridePost","onError"]);if(!r)return null;var u=Object(q.a)({},t,{hasFixedToolbar:n,focusMode:o});return Object(i.createElement)(i.StrictMode,null,Object(i.createElement)(c.EditorProvider,Object(w.a)({settings:u,post:Object(q.a)({},r,a)},s),Object(i.createElement)(c.ErrorBoundary,{onError:l},Object(i.createElement)(kn,null)),Object(i.createElement)(c.PostLockedModal,null)))}),Cn=function(e,t){return!Array.isArray(t)||function(e,t){return 0===Object(E.difference)(e,t).length}(e,t)},Tn=function(e){var t=e.allowedBlocks,n=e.icon,o=e.label,r=e.onClick,c=e.small,a=e.role;return Object(i.createElement)(Jt,null,function(e){var l=e.selectedBlocks,s=e.onClose;return Cn(l,t)?Object(i.createElement)(x.IconButton,{className:"editor-block-settings-menu__control",onClick:Object(A.compose)(r,s),icon:n||"admin-plugins",label:c?o:void 0,role:a},!c&&o):null})};var xn=Object(A.compose)(Object(N.withPluginContext)(function(e,t){return{icon:t.icon||e.icon,sidebarName:"".concat(e.name,"/").concat(t.name)}}),Object(u.withSelect)(function(e,t){var n=t.sidebarName,o=e("core/edit-post"),r=o.getActiveGeneralSidebarName,i=o.isPluginItemPinned;return{isActive:r()===n,isPinned:i(n)}}),Object(u.withDispatch)(function(e,t){var n=t.isActive,o=t.sidebarName,r=e("core/edit-post"),i=r.closeGeneralSidebar,c=r.openGeneralSidebar,a=r.togglePinnedPluginItem;return{togglePin:function(){a(o)},toggleSidebar:function(){n?i():c(o)}}}))(function(e){var t=e.children,n=e.icon,o=e.isActive,r=e.isPinnable,c=void 0===r||r,a=e.isPinned,l=e.sidebarName,s=e.title,u=e.togglePin,d=e.toggleSidebar;return Object(i.createElement)(i.Fragment,null,c&&Object(i.createElement)(Ht,null,a&&Object(i.createElement)(x.IconButton,{icon:n,label:s,onClick:d,isToggled:o,"aria-expanded":o})),Object(i.createElement)(Ze,{name:l,label:Object(v.__)("Editor plugins")},Object(i.createElement)(We,{closeLabel:Object(v.__)("Close plugin")},Object(i.createElement)("strong",null,s),c&&Object(i.createElement)(x.IconButton,{icon:a?"star-filled":"star-empty",label:a?Object(v.__)("Unpin from toolbar"):Object(v.__)("Pin to toolbar"),onClick:u,isToggled:a,"aria-expanded":a})),Object(i.createElement)(x.Panel,null,t)))}),An=Object(A.compose)(Object(N.withPluginContext)(function(e,t){return{icon:t.icon||e.icon,sidebarName:"".concat(e.name,"/").concat(t.target)}}),Object(u.withSelect)(function(e,t){var n=t.sidebarName;return{isSelected:(0,e("core/edit-post").getActiveGeneralSidebarName)()===n}}),Object(u.withDispatch)(function(e,t){var n=t.isSelected,o=t.sidebarName,r=e("core/edit-post"),i=r.closeGeneralSidebar,c=r.openGeneralSidebar;return{onClick:n?i:function(){return c(o)}}}))(function(e){var t=e.children,n=e.icon,o=e.isSelected,r=e.onClick;return Object(i.createElement)(Nt,null,function(e){return Object(i.createElement)(x.MenuItem,{icon:o?"yes":n,isSelected:o,role:"menuitemcheckbox",onClick:Object(A.compose)(r,e.onClose)},t)})});function Mn(e,t,n,o,r){Object(i.unmountComponentAtNode)(n);var c=Mn.bind(null,e,t,n,o,r);Object(i.render)(Object(i.createElement)(wn,{settings:o,onError:c,postId:t,postType:e,overridePost:r,recovery:!0}),n)}function Bn(e,t,n,o,r){var c=document.getElementById(e),a=Mn.bind(null,t,n,c,o,r);return Object(s.registerCoreBlocks)(),Object(u.dispatch)("core/nux").triggerGuide(["core/editor.inserter","core/editor.settings","core/editor.preview","core/editor.publish"]),Object(i.render)(Object(i.createElement)(wn,{settings:o,onError:a,postId:n,postType:t,overridePost:r}),c),{initializeMetaBoxes:function(e){b()("editor.initializeMetaBoxes",{alternative:"setActiveMetaBoxLocations action (`core/edit-post`)",plugin:"Gutenberg",version:"4.2"}),Re.dispatch(me(e))}}}n.d(t,"reinitializeEditor",function(){return Mn}),n.d(t,"initializeEditor",function(){return Bn}),n.d(t,"PluginBlockSettingsMenuItem",function(){return Tn}),n.d(t,"PluginPostPublishPanel",function(){return hn}),n.d(t,"PluginPostStatusInfo",function(){return bt}),n.d(t,"PluginPrePublishPanel",function(){return yn}),n.d(t,"PluginSidebar",function(){return xn}),n.d(t,"PluginSidebarMoreMenuItem",function(){return An})},22:function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",function(){return o})},3:function(e,t,n){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return o})},30:function(e,t){!function(){e.exports=this.wp.hooks}()},32:function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",function(){return o})},33:function(e,t,n){"use strict";var o=n(45);var r=n(44);function i(e,t){return Object(o.a)(e)||function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(o=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return n}(e,t)||Object(r.a)()}n.d(t,"a",function(){return i})},38:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return(r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}n.d(t,"a",function(){return r})},39:function(e,t){!function(){e.exports=this.wp.apiFetch}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.deprecated}()},41:function(e,t){!function(){e.exports=this.wp.url}()},42:function(e,t,n){"use strict";function o(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return o})},44:function(e,t,n){"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return o})},45:function(e,t,n){"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return o})},49:function(e,t){!function(){e.exports=this.wp.viewport}()},5:function(e,t){!function(){e.exports=this.wp.data}()},58:function(e,t){!function(){e.exports=this.wp.nux}()},6:function(e,t){!function(){e.exports=this.wp.compose}()},7:function(e,t){!function(){e.exports=this.wp.editor}()},72:function(e,t){!function(){e.exports=this.wp.a11y}()},74:function(e,t){!function(){e.exports=this.wp.plugins}()},8:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var o=n(18);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Object(o.a)(e,t,n[t])})}return e}},84:function(e,t){!function(){e.exports=this.wp.coreData}()},9:function(e,t){!function(){e.exports=this.wp.blocks}()},90:function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var o;if(Array.isArray(n))for(o=0;o<n.length;o++)e(t,n[o]);else for(o in n)t[o]=(t[o]||[]).concat(n[o])}(t,e),function(e){return function(n){return function(o){var r,i,c=t[o.type],a=n(o);if(c)for(r=0;r<c.length;r++)(i=c[r](o,e))&&e.dispatch(i);return a}}}}}()}});