diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index 70dfb204ad..9512b64468 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -13917,7 +13917,8 @@ function applyInternetExplorerInputFix(editorNode) { } var IS_PLACEHOLDER_VISIBLE_ATTR_NAME = 'data-is-placeholder-visible'; -var CLASS_NAME = 'editor-rich-text__editable block-editor-rich-text__editable'; +var oldClassName = 'editor-rich-text__editable'; +var editable_className = 'block-editor-rich-text__editable'; /** * Whether or not the user agent is Internet Explorer. * @@ -13963,7 +13964,7 @@ function (_Component) { } if (!Object(external_lodash_["isEqual"])(this.props.className, nextProps.className)) { - this.editorNode.className = classnames_default()(nextProps.className, CLASS_NAME); + this.editorNode.className = classnames_default()(editable_className, oldClassName, nextProps.className); } var _diffAriaProps = aria_diffAriaProps(this.props, nextProps), @@ -14014,7 +14015,7 @@ function (_Component) { style = _this$props.style, record = _this$props.record, valueToEditableHTML = _this$props.valueToEditableHTML, - className = _this$props.className, + additionalClassName = _this$props.className, isPlaceholderVisible = _this$props.isPlaceholderVisible, remainingProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["tagName", "style", "record", "valueToEditableHTML", "className", "isPlaceholderVisible"]); @@ -14022,7 +14023,7 @@ function (_Component) { return Object(external_this_wp_element_["createElement"])(tagName, Object(objectSpread["a" /* default */])((_objectSpread2 = { role: 'textbox', 'aria-multiline': true, - className: classnames_default()(className, CLASS_NAME), + className: classnames_default()(editable_className, oldClassName, additionalClassName), contentEditable: true }, Object(defineProperty["a" /* default */])(_objectSpread2, IS_PLACEHOLDER_VISIBLE_ATTR_NAME, isPlaceholderVisible), Object(defineProperty["a" /* default */])(_objectSpread2, "ref", this.bindEditorNode), Object(defineProperty["a" /* default */])(_objectSpread2, "style", style), Object(defineProperty["a" /* default */])(_objectSpread2, "suppressContentEditableWarning", true), Object(defineProperty["a" /* default */])(_objectSpread2, "dangerouslySetInnerHTML", { __html: valueToEditableHTML(record) @@ -14666,7 +14667,6 @@ function (_Component) { range: range, multilineTag: this.multilineTag, multilineWrapperTags: this.multilineWrapperTags, - prepareEditableTree: this.props.prepareEditableTree, __unstableIsEditableTree: true }); } @@ -14964,11 +14964,15 @@ function (_Component) { var boundarySelector = '*[data-rich-text-format-boundary]'; var element = this.editableRef.querySelector(boundarySelector); - if (element) { - var computedStyle = getComputedStyle(element); - var newColor = computedStyle.color.replace(')', ', 0.2)').replace('rgb', 'rgba'); - globalStyle.innerHTML = "*:focus ".concat(boundarySelector, "{background-color: ").concat(newColor, "}"); + if (!element) { + return; } + + var computedStyle = getComputedStyle(element); + var newColor = computedStyle.color.replace(')', ', 0.2)').replace('rgb', 'rgba'); + var selector = ".".concat(editable_className, ":focus ").concat(boundarySelector); + var rule = "background-color: ".concat(newColor); + globalStyle.innerHTML = "".concat(selector, " {").concat(rule, "}"); } /** * Calls all registered onChangeEditableValue handlers. @@ -15239,8 +15243,13 @@ function (_Component) { end = value.end; var _this$state$activeFor = this.state.activeFormats, activeFormats = _this$state$activeFor === void 0 ? [] : _this$state$activeFor; - var collapsed = Object(external_this_wp_richText_["isCollapsed"])(value); - var isReverse = event.keyCode === external_this_wp_keycodes_["LEFT"]; // If the selection is collapsed and at the very start, do nothing if + var collapsed = Object(external_this_wp_richText_["isCollapsed"])(value); // To do: ideally, we should look at visual position instead. + + var _getComputedStyle = getComputedStyle(this.editableRef), + direction = _getComputedStyle.direction; + + var reverseKey = direction === 'rtl' ? external_this_wp_keycodes_["RIGHT"] : external_this_wp_keycodes_["LEFT"]; + var isReverse = event.keyCode === reverseKey; // If the selection is collapsed and at the very start, do nothing if // navigating backward. // If the selection is collapsed and at the very end, do nothing if // navigating forward. @@ -18713,7 +18722,8 @@ function (_Component) { */ var writing_flow_window = window, - writing_flow_getSelection = writing_flow_window.getSelection; + writing_flow_getSelection = writing_flow_window.getSelection, + writing_flow_getComputedStyle = writing_flow_window.getComputedStyle; /** * Given an element, returns true if the element is a tabbable text field, or * false otherwise. @@ -18925,11 +18935,23 @@ function (_Component) { var isNav = isHorizontal || isVertical; var isShift = event.shiftKey; var hasModifier = isShift || event.ctrlKey || event.altKey || event.metaKey; - var isNavEdge = isVertical ? external_this_wp_dom_["isVerticalEdge"] : external_this_wp_dom_["isHorizontalEdge"]; // This logic inside this condition needs to be checked before + var isNavEdge = isVertical ? external_this_wp_dom_["isVerticalEdge"] : external_this_wp_dom_["isHorizontalEdge"]; // When presing any key other than up or down, the initial vertical + // position must ALWAYS be reset. The vertical position is saved so it + // can be restored as well as possible on sebsequent vertical arrow key + // presses. It may not always be possible to restore the exact same + // position (such as at an empty line), so it wouldn't be good to + // compute the position right before any vertical arrow key press. + + if (!isVertical) { + this.verticalRect = null; + } else if (!this.verticalRect) { + this.verticalRect = Object(external_this_wp_dom_["computeCaretRect"])(target); + } // This logic inside this condition needs to be checked before // the check for event.nativeEvent.defaultPrevented. // The logic handles meta+a keypress and this event is default prevented // by RichText. + if (!isNav) { // Set immediately before the meta+a combination can be pressed. if (external_this_wp_keycodes_["isKeyboardEvent"].primary(event)) { @@ -18964,13 +18986,14 @@ function (_Component) { if (!isNavigationCandidate(target, keyCode, hasModifier)) { return; - } + } // In the case of RTL scripts, right means previous and left means next, + // which is the exact reverse of LTR. - if (!isVertical) { - this.verticalRect = null; - } else if (!this.verticalRect) { - this.verticalRect = Object(external_this_wp_dom_["computeCaretRect"])(target); - } + + var _getComputedStyle = writing_flow_getComputedStyle(target), + direction = _getComputedStyle.direction; + + var isReverseDir = direction === 'rtl' ? !isReverse : isReverse; if (isShift) { if (( // Ensure that there is a target block. @@ -18991,10 +19014,10 @@ function (_Component) { Object(external_this_wp_dom_["placeCaretAtVerticalEdge"])(closestTabbable, isReverse, this.verticalRect); event.preventDefault(); } - } else if (isHorizontal && writing_flow_getSelection().isCollapsed && Object(external_this_wp_dom_["isHorizontalEdge"])(target, isReverse)) { - var _closestTabbable = this.getClosestTabbable(target, isReverse); + } else if (isHorizontal && writing_flow_getSelection().isCollapsed && Object(external_this_wp_dom_["isHorizontalEdge"])(target, isReverseDir)) { + var _closestTabbable = this.getClosestTabbable(target, isReverseDir); - Object(external_this_wp_dom_["placeCaretAtHorizontalEdge"])(_closestTabbable, isReverse); + Object(external_this_wp_dom_["placeCaretAtHorizontalEdge"])(_closestTabbable, isReverseDir); event.preventDefault(); } } diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index 565c4ffabf..85780cec9d 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -52,4 +52,4 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @license */ -var o;o=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";t.__esModule=!0,t.canonicalize=t.convertChangesToXML=t.convertChangesToDMP=t.merge=t.parsePatch=t.applyPatches=t.applyPatch=t.createPatch=t.createTwoFilesPatch=t.structuredPatch=t.diffArrays=t.diffJson=t.diffCss=t.diffSentences=t.diffTrimmedLines=t.diffLines=t.diffWordsWithSpace=t.diffWords=t.diffChars=t.Diff=void 0;var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o},c=n(2),a=n(3),l=n(5),s=n(6),u=n(7),d=n(8),b=n(9),f=n(10),p=n(11),h=n(13),v=n(14),m=n(16),g=n(17);t.Diff=i.default,t.diffChars=c.diffChars,t.diffWords=a.diffWords,t.diffWordsWithSpace=a.diffWordsWithSpace,t.diffLines=l.diffLines,t.diffTrimmedLines=l.diffTrimmedLines,t.diffSentences=s.diffSentences,t.diffCss=u.diffCss,t.diffJson=d.diffJson,t.diffArrays=b.diffArrays,t.structuredPatch=v.structuredPatch,t.createTwoFilesPatch=v.createTwoFilesPatch,t.createPatch=v.createPatch,t.applyPatch=f.applyPatch,t.applyPatches=f.applyPatches,t.parsePatch=p.parsePatch,t.merge=h.merge,t.convertChangesToDMP=m.convertChangesToDMP,t.convertChangesToXML=g.convertChangesToXML,t.canonicalize=d.canonicalize},function(e,t){"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,c=t.length,a=0,l=0;ie.length?n:e}),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[c-1];return c>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[c-2].value+=b.value,t.pop()),t}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function c(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,s=1,u=a+l,d=[{newPos:-1,components:[]}],b=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=a&&b+1>=l)return c([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*s;n<=s;n+=2){var r=void 0,u=d[n-1],b=d[n+1],f=(b?b.newPos:0)-n;u&&(d[n-1]=void 0);var p=u&&u.newPos+1=a&&f+1>=l)return c(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var v;s++}if(r)!function e(){setTimeout(function(){if(s>u)return r();f()||e()},0)}();else for(;s<=u;){var p=f();if(p)return p}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,c=e.newPos,a=c-o,l=0;c+12&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,r.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var o=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],a=t.hunks,l=n.compareLine||function(e,t,n,o){return t===o},s=0,u=n.fuzzFactor||0,d=0,b=0,f=void 0,p=void 0;function h(e,t){for(var n=0;n0?r[0]:" ",c=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!l(t+1,o[t],i,c)&&++s>u)return!1;t++}}return!0}for(var v=0;v0?w[0]:" ",T=w.length>0?w.substr(1):w,B=S.linedelimiters[E];if(" "===I)C++;else if("-"===I)o.splice(C,1),i.splice(C,1);else if("+"===I)o.splice(C,0,T),i.splice(C,0,B),C++;else if("\\"===I){var x=S.lines[E-1]?S.lines[E-1][0]:null;"+"===x?f=!0:"-"===x&&(p=!0)}}}if(f)for(;!o[o.length-1];)o.pop(),i.pop();else p&&(o.push(""),i.push("\n"));for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],r=[],i=0;function c(){var e={};for(r.push(e);i0?u(a.lines.slice(-l.context)):[],b-=p.length,f-=p.length)}(c=p).push.apply(c,r(o.map(function(e){return(t.added?"+":"-")+e}))),t.added?v+=o.length:h+=o.length}else{if(b)if(o.length<=2*l.context&&e=s.length-2&&o.length<=l.context){var j=/\n$/.test(n),y=/\n$/.test(i);0!=o.length||j?j&&y||p.push("\\ No newline at end of file"):p.splice(k.oldLines,0,"\\ No newline at end of file")}d.push(k),b=0,f=0,p=[]}h+=o.length,v+=o.length}},g=0;ge.length)return!1;for(var n=0;n/g,">")).replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],o=0;o"):r.removed&&t.push(""),t.push(n(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")}}])},e.exports=o()},21: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=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",function(){return o})},23:function(e,t,n){e.exports=n(54)},24:function(e,t){!function(){e.exports=this.wp.dom}()},25:function(e,t){!function(){e.exports=this.wp.url}()},26:function(e,t){!function(){e.exports=this.wp.hooks}()},27:function(e,t){!function(){e.exports=this.React}()},28:function(e,t,n){"use strict";var o=n(37);var r=n(38);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})},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,n){"use strict";var o,r;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o3&&void 0!==arguments[3]?arguments[3]:1,r=Object(d.a)(e);return r.splice(t,o),m(r,e.slice(t,t+o),n)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(b.a)({},t,[]);return e.forEach(function(e){var o=e.clientId,r=e.innerBlocks;n[t].push(o),Object.assign(n,O(r,o))}),n}function k(e,t){for(var n={},o=Object(d.a)(e);o.length;){var r=o.shift(),i=r.innerBlocks,c=Object(u.a)(r,["innerBlocks"]);o.push.apply(o,Object(d.a)(i)),n[c.clientId]=t(c)}return n}function j(e){return k(e,function(e){return Object(f.omit)(e,"attributes")})}function y(e){return k(e,function(e){return e.attributes})}function _(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&e.clientId===t.clientId&&(n=e.attributes,o=t.attributes,Object(f.isEqual)(Object(f.keys)(n),Object(f.keys)(o)));var n,o}var S=Object(f.flow)(l.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var o=Object(d.a)(n.clientIds),r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return Object(f.reduce)(t[n],function(n,o){return[].concat(Object(d.a)(n),[o],Object(d.a)(e(t,o)))},[])}(t.order);return Object(s.a)({},t,{byClientId:Object(s.a)({},Object(f.omit)(t.byClientId,o),j(n.blocks)),attributes:Object(s.a)({},Object(f.omit)(t.attributes,o),y(n.blocks)),order:Object(s.a)({},Object(f.omit)(t.order,o),O(n.blocks))})}return e(t,n)}},function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var o=n.id,r=n.updatedId;if(o===r)return t;(t=Object(s.a)({},t)).attributes=Object(f.mapValues)(t.attributes,function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===o?Object(s.a)({},e,{ref:r}):e})}return e(t,n)}},function(e){var t;return function(n,o){var r=e(n,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type;if(n===r&&!i){var c=Object(f.get)(n,["isPersistentChange"],!0);return n.isPersistentChange===c?n:Object(s.a)({},r,{isPersistentChange:c})}return r=Object(s.a)({},r,{isPersistentChange:i||!_(o,t)}),t=o,r}},function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,o){var r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}})({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return j(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,j(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(f.omit)(t.updates,"attributes");return Object(f.isEmpty)(n)?e:Object(s.a)({},e,Object(b.a)({},t.clientId,Object(s.a)({},e[t.clientId],n)));case"INSERT_BLOCKS":return Object(s.a)({},e,j(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(s.a)({},Object(f.omit)(e,t.clientIds),j(t.blocks)):e;case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return y(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,y(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Object(s.a)({},e,Object(b.a)({},t.clientId,Object(s.a)({},e[t.clientId],t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(f.reduce)(t.attributes,function(n,o,r){var i,c;return o!==n[r]&&((n=(i=e[t.clientId])===(c=n)?Object(s.a)({},i):c)[r]=o),n},e[t.clientId]);return n===e[t.clientId]?e:Object(s.a)({},e,Object(b.a)({},t.clientId,n));case"INSERT_BLOCKS":return Object(s.a)({},e,y(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(s.a)({},Object(f.omit)(e,t.clientIds),y(t.blocks)):e;case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return O(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,Object(f.omit)(O(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,o=void 0===n?"":n,r=e[o]||[],i=O(t.blocks,o),c=t.index,a=void 0===c?r.length:c;return Object(s.a)({},e,i,Object(b.a)({},o,m(r,i[o],a)));case"MOVE_BLOCK_TO_POSITION":var l,u=t.fromRootClientId,p=void 0===u?"":u,h=t.toRootClientId,v=void 0===h?"":h,k=t.clientId,j=t.index,y=void 0===j?e[v].length:j;if(p===v){var _=e[v].indexOf(k);return Object(s.a)({},e,Object(b.a)({},v,g(e[v],_,y)))}return Object(s.a)({},e,(l={},Object(b.a)(l,p,Object(f.without)(e[p],k)),Object(b.a)(l,v,m(e[v],k,y)),l));case"MOVE_BLOCKS_UP":var S=t.clientIds,C=t.rootClientId,E=void 0===C?"":C,w=Object(f.first)(S),I=e[E];if(!I.length||w===Object(f.first)(I))return e;var T=I.indexOf(w);return Object(s.a)({},e,Object(b.a)({},E,g(I,T,T-1,S.length)));case"MOVE_BLOCKS_DOWN":var B=t.clientIds,x=t.rootClientId,L=void 0===x?"":x,N=Object(f.first)(B),M=Object(f.last)(B),R=e[L];if(!R.length||M===Object(f.last)(R))return e;var A=R.indexOf(N);return Object(s.a)({},e,Object(b.a)({},L,g(R,A,A+1,B.length)));case"REPLACE_BLOCKS":var D=t.clientIds;if(!t.blocks)return e;var P=O(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,D)},function(e){return Object(s.a)({},e,Object(f.omit)(P,""))},function(e){return Object(f.mapValues)(e,function(e){return Object(f.reduce)(e,function(e,t){return t===D[0]?[].concat(Object(d.a)(e),Object(d.a)(P[""])):(-1===D.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(f.flow)([function(e){return Object(f.omit)(e,t.clientIds)},function(e){return Object(f.mapValues)(e,function(e){return f.without.apply(void 0,[e].concat(Object(d.a)(t.clientIds)))})}])(e)}return e}});var C=Object(l.combineReducers)({blocks:S,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},blockSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{start:null,end:null,isMultiSelecting:!1,isEnabled:!0,initialPosition:null},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return null!==e.start||null!==e.end||e.isMultiSelecting?Object(s.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(s.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(s.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(s.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(s.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection?Object(s.a)({},e,{start:t.blocks[0].clientId,end:t.blocks[0].clientId,initialPosition:null,isMultiSelecting:!1}):e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start)?Object(s.a)({},e,{start:null,end:null,initialPosition:null,isMultiSelecting:!1}):e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.start))return e;var n=Object(f.last)(t.blocks),o=n?n.clientId:null;return o===e.start&&o===e.end?e:Object(s.a)({},e,{start:o,end:o,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(s.a)({},e,{isEnabled:t.isSelectionEnabled})}return e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return Object(s.a)({},e,Object(b.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(f.isEqual)(e[n],t.settings)?e:Object(s.a)({},e,Object(b.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(f.omit)(e,n):e}return e},insertionPoint: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"SHOW_INSERTION_POINT":return{rootClientId:t.rootClientId,index:t.index};case"HIDE_INSERTION_POINT":return null}return e},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Object(s.a)({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Object(s.a)({},e,t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(function(e,n){var o=n.name,r={name:n.name};return Object(i.isReusableBlock)(n)&&(r.ref=n.attributes.ref,o+="/"+n.attributes.ref),Object(s.a)({},e,{insertUsage:Object(s.a)({},e.insertUsage,Object(b.a)({},o,{time:t.time,count:e.insertUsage[o]?e.insertUsage[o].count+1:1,insert:r}))})},e)}return e}}),E=n(70),w=n.n(E),I=n(97),T=n.n(I),B=n(28),x=n(48),L=n(23),N=n.n(L);function M(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function $(e){var t;return N.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M("core/block-editor","getPreviousBlockClientId",e);case 2:return t=n.sent,n.next=5,Y(t,-1);case 5:case"end":return n.stop()}},D,this)}function X(e){var t;return N.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M("core/block-editor","getNextBlockClientId",e);case 2:return t=n.sent,n.next=5,Y(t);case 5:case"end":return n.stop()}},P,this)}function J(){return{type:"START_MULTI_SELECT"}}function Z(){return{type:"STOP_MULTI_SELECT"}}function Q(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ee(){return{type:"CLEAR_SELECTED_BLOCK"}}function te(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function ne(e,t){var n,o,r;return N.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=Object(f.castArray)(e),t=Object(f.castArray)(t),i.next=4,M("core/block-editor","getBlockRootClientId",Object(f.first)(e));case 4:n=i.sent,o=0;case 6:if(!(o3&&void 0!==arguments[3])||arguments[3])}function se(e,t,n){var o,r,i,c,a,l,s,u,d=arguments;return N.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:o=!(d.length>3&&void 0!==d[3])||d[3],e=Object(f.castArray)(e),r=[],i=!0,c=!1,a=void 0,b.prev=6,l=e[Symbol.iterator]();case 8:if(i=(s=l.next()).done){b.next=17;break}return u=s.value,b.next=12,M("core/block-editor","canInsertBlockType",u.name,n);case 12:b.sent&&r.push(u);case 14:i=!0,b.next=8;break;case 17:b.next=23;break;case 19:b.prev=19,b.t0=b.catch(6),c=!0,a=b.t0;case 23:b.prev=23,b.prev=24,i||null==l.return||l.return();case 26:if(b.prev=26,!c){b.next=29;break}throw a;case 29:return b.finish(26);case 30:return b.finish(23);case 31:if(!r.length){b.next=33;break}return b.abrupt("return",{type:"INSERT_BLOCKS",blocks:r,index:t,rootClientId:n,time:Date.now(),updateSelection:o});case 33:case"end":return b.stop()}},U,this,[[6,19,23,31],[24,,26,30]])}function ue(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function de(){return{type:"HIDE_INSERTION_POINT"}}function be(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function fe(){return{type:"SYNCHRONIZE_TEMPLATE"}}function pe(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function he(e){var t,n=arguments;return N.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(t=!(n.length>1&&void 0!==n[1])||n[1],e=Object(f.castArray)(e),!t){o.next=5;break}return o.next=5,$(e[0]);case 5:return o.next=7,{type:"REMOVE_BLOCKS",clientIds:e};case 7:return o.delegateYield(z(),"t0",8);case 8:case"end":return o.stop()}},V,this)}function ve(e,t){return he([e],t)}function me(e,t){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],time:Date.now()}}function ge(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Oe(){return{type:"START_TYPING"}}function ke(){return{type:"STOP_TYPING"}}function je(){return{type:"ENTER_FORMATTED_TEXT"}}function ye(){return{type:"EXIT_FORMATTED_TEXT"}}function _e(e,t,n){return le(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function Se(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ce(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ee(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function we(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}var Ie=n(30),Te=3,Be=2,xe=1,Le=0,Ne=[],Me={},Re=Object(Ie.a)(function(){return[]},function(e,t){return Object(f.map)(ht(e,t),function(t){return Fe(e,t)})});function Ae(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function De(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}var Pe=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];if(!n)return null;var o=e.blocks.attributes[t],r=Object(i.getBlockType)(n.name);return r&&(o=Object(f.reduce)(r.attributes,function(t,n,r){return"meta"===n.source&&(t===o&&(t=Object(s.a)({},t)),t[r]=Vt(e,n.meta)),t},o)),o},function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t],Vt(e)]}),Fe=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Pe(e,t),innerBlocks:Ue(e,t)}):null},function(e,t){return[].concat(Object(d.a)(Pe.getDependants(e,t)),[Re(e,t)])}),He=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Pe(e,t)}):null},function(e,t){return[e.blocks.byClientId[t]].concat(Object(d.a)(Pe.getDependants(e,t)))}),Ue=Object(Ie.a)(function(e,t){return Object(f.map)(ht(e,t),function(t){return Fe(e,t)})},function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}),Ve=function e(t,n){return Object(f.flatMap)(n,function(n){var o=ht(t,n);return[].concat(Object(d.a)(o),Object(d.a)(e(t,o)))})},ze=Object(Ie.a)(function(e){var t=ht(e);return[].concat(Object(d.a)(t),Object(d.a)(Ve(e,t)))},function(e){return[e.blocks.order]}),Ke=Object(Ie.a)(function(e,t){var n=ze(e);return t?Object(f.reduce)(n,function(n,o){return e.blocks.byClientId[o].name===t?n+1:n},0):n.length},function(e){return[e.blocks.order,e.blocks.byClientId]}),We=Object(Ie.a)(function(e,t){return Object(f.map)(Object(f.castArray)(t),function(t){return Fe(e,t)})},function(e){return[Vt(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]});function Ge(e,t){return ht(e,t).length}function qe(e){return e.blockSelection.start}function Ye(e){return e.blockSelection.end}function $e(e){var t=it(e).length;return t||(e.blockSelection.start?1:0)}function Xe(e){var t=e.blockSelection,n=t.start,o=t.end;return!!n&&n===o}function Je(e){var t=e.blockSelection,n=t.start,o=t.end;return n&&n===o&&e.blocks.byClientId[n]?n:null}function Ze(e){var t=Je(e);return t?Fe(e,t):null}var Qe=Object(Ie.a)(function(e,t){var n=e.blocks.order;for(var o in n)if(Object(f.includes)(n[o],t))return o;return null},function(e){return[e.blocks.order]}),et=Object(Ie.a)(function(e,t){for(var n=t,o=t;n;)n=Qe(e,o=n);return o},function(e){return[e.blocks.order]});function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Je(e)),void 0===t&&(t=n<0?at(e):lt(e)),!t)return null;var o=Qe(e,t);if(null===o)return null;var r=e.blocks.order[o],i=r.indexOf(t)+1*n;return i<0?null:i===r.length?null:r[i]}function nt(e,t){return tt(e,t,-1)}function ot(e,t){return tt(e,t,1)}function rt(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var it=Object(Ie.a)(function(e){var t=e.blockSelection,n=t.start,o=t.end;if(n===o)return[];var r=Qe(e,n);if(null===r)return[];var i=ht(e,r),c=i.indexOf(n),a=i.indexOf(o);return c>a?i.slice(a,c+1):i.slice(c,a+1)},function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]}),ct=Object(Ie.a)(function(e){var t=it(e);return t.length?t.map(function(t){return Fe(e,t)}):Ne},function(e){return[].concat(Object(d.a)(it.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes,Vt(e)])});function at(e){return Object(f.first)(it(e))||null}function lt(e){return Object(f.last)(it(e))||null}var st=Object(Ie.a)(function(e,t,n){for(var o=n;t!==o&&o;)o=Qe(e,o);return t===o},function(e){return[e.blocks.order]});function ut(e,t){return at(e)===t}function dt(e,t){return-1!==it(e).indexOf(t)}var bt=Object(Ie.a)(function(e,t){for(var n=t,o=!1;n&&!o;)o=dt(e,n=Qe(e,n));return o},function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]});function ft(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function pt(e){var t=e.blockSelection,n=t.start,o=t.end;return n===o?null:o||null}function ht(e,t){return e.blocks.order[t||""]||Ne}function vt(e,t,n){return ht(e,n).indexOf(t)}function mt(e,t){var n=e.blockSelection,o=n.start;return o===n.end&&o===t}function gt(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(ht(e,t),function(t){return mt(e,t)||dt(e,t)||n&>(e,t,n)})}function Ot(e,t){if(!t)return!1;var n=it(e),o=n.indexOf(t);return o>-1&&o2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(f.isBoolean)(e)?e:Object(f.isArray)(e)?Object(f.includes)(e,t):n},r=Object(i.getBlockType)(t);if(!r)return!1;if(!o(Ft(e).allowedBlockTypes,t,!0))return!1;if(!!Bt(e,n))return!1;var c=Pt(e,n),a=o(Object(f.get)(c,["allowedBlocks"]),t),l=o(r.parent,Ae(e,n));return null!==a&&null!==l?a||l:null!==a?a:null===l||l},Lt=Object(Ie.a)(xt,function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function Nt(e,t){return e.preferences.insertUsage[t]||null}var Mt=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&xt(e,t.name,n)},Rt=function(e,t,n){if(!xt(e,"core/block",n))return!1;var o=Ae(e,t.clientId);return!!o&&(!!Object(i.getBlockType)(o)&&(!!xt(e,o,n)&&!st(e,t.clientId,n)))},At=Object(Ie.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?Te:t>0?Be:"common"===e?xe:Le},o=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},r=Object(i.getBlockTypes)().filter(function(n){return Mt(e,n,t)}).map(function(t){var r=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(f.some)(We(e,ze(e)),{name:t.name}));var a=Object(f.isArray)(t.parent),l=Nt(e,r)||{},s=l.time,u=l.count,d=void 0===u?0:u;return{id:r,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:c,utility:n(t.category,d,a),frecency:o(s,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}}),c=zt(e).filter(function(n){return Rt(e,n,t)}).map(function(t){var r="core/block/".concat(t.id),c=Ae(e,t.clientId),a=Object(i.getBlockType)(c),l=Nt(e,r)||{},s=l.time,u=l.count,d=void 0===u?0:u,b=n("reusable",d,!1),f=o(s,d);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:a.icon,category:"reusable",keywords:[],isDisabled:!1,utility:b,frecency:f}});return Object(f.orderBy)([].concat(Object(d.a)(r),Object(d.a)(c)),["utility","frecency"],["desc","desc"])},function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,zt(e),Object(i.getBlockTypes)()]}),Dt=Object(Ie.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return!!Object(f.some)(Object(i.getBlockTypes)(),function(n){return Mt(e,n,t)})||Object(f.some)(zt(e),function(n){return Rt(e,n,t)})},function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,zt(e),Object(i.getBlockTypes)()]});function Pt(e,t){return e.blockListSettings[t]}function Ft(e){return e.settings}function Ht(e){return e.blocks.isPersistentChange}function Ut(e){return e.blocks.isIgnoredChange}function Vt(e,t){return void 0===t?Object(f.get)(e,["settings","__experimentalMetaSource","value"],Me):Object(f.get)(e,["settings","__experimentalMetaSource","value",t])}function zt(e){return Object(f.get)(e,["settings","__experimentalReusableBlocks"],Ne)}var Kt={MERGE_BLOCKS:function(e,t){var n=t.dispatch,o=t.getState(),r=Object(B.a)(e.blocks,2),c=r[0],a=r[1],l=Fe(o,c),u=Object(i.getBlockType)(l.name);if(u.merge){var b=Fe(o,a),f=l.name===b.name?[b]:Object(i.switchToBlockType)(b,l.name);if(f&&f.length){var p=u.merge(l.attributes,f[0].attributes);n(Y(l.clientId,-1)),n(ne([l.clientId,b.clientId],[Object(s.a)({},l,{attributes:Object(s.a)({},l.attributes,p)})].concat(Object(d.a)(f.slice(1)))))}}else n(Y(l.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),o=Tt(n),r=Bt(n),c=!o||"all"!==r||Object(i.doBlocksMatchTemplate)(e.blocks,o);if(c!==It(n))return be(c)}],MULTI_SELECT:function(e,t){var n=$e((0,t.getState)());Object(x.speak)(Object(p.sprintf)(Object(p._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),o=Ue(n),r=Tt(n);return K(Object(i.synchronizeBlocksWithTemplate)(o,r))}};var Wt=function(e){var t,n=[w()(Kt),T.a],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=f.flowRight.apply(void 0,Object(d.a)(t))(e.dispatch),e.dispatch=o,e},Gt=Object(l.registerStore)("core/block-editor",{reducer:C,selectors:r,actions:o,controls:R,persist:["preferences"]});Wt(Gt);var qt=n(19),Yt=n(0),$t=n(16),Xt=n.n($t),Jt=n(6),Zt=n(26),Qt=n(10),en=n(9),tn=n(11),nn=n(12),on=n(13),rn=n(3),cn=n(4),an=Object(Yt.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:f.noop,clientId:null}),ln=an.Consumer,sn=an.Provider,un=function(e){return Object(Jt.createHigherOrderComponent)(function(t){return function(n){return Object(Yt.createElement)(ln,null,function(o){return Object(Yt.createElement)(t,Object(qt.a)({},n,e(o,n)))})}},"withBlockEditContext")},dn=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(Yt.createElement)(ln,null,function(n){return n.isSelected&&Object(Yt.createElement)(e,t)})}},"ifBlockEditSelected"),bn=[];var fn=Object(Jt.compose)([un(function(e){return{blockName:e.name}}),function(e){return function(t){function n(){var e;return Object(Qt.a)(this,n),(e=Object(tn.a)(this,Object(nn.a)(n).call(this))).state={completers:bn},e.saveParentRef=e.saveParentRef.bind(Object(rn.a)(Object(rn.a)(e))),e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(n,t),Object(en.a)(n,[{key:"componentDidUpdate",value:function(){this.parentNode.contains(document.activeElement)&&this.hasStaleCompleters()&&this.updateCompletersState()}},{key:"onFocus",value:function(){this.hasStaleCompleters()&&this.updateCompletersState()}},{key:"hasStaleCompleters",value:function(){return!("lastFilteredCompletersProp"in this.state)||this.state.lastFilteredCompletersProp!==this.props.completers}},{key:"updateCompletersState",value:function(){var e=this.props,t=e.blockName,n=e.completers,o=n;Object(Zt.hasFilter)("editor.Autocomplete.completers")&&(n=Object(Zt.applyFilters)("editor.Autocomplete.completers",n&&n.map(f.clone),t)),this.setState({lastFilteredCompletersProp:o,completers:n||bn})}},{key:"saveParentRef",value:function(e){this.parentNode=e}},{key:"render",value:function(){var t=this.state.completers,n=Object(s.a)({},this.props,{completers:t});return Object(Yt.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(Yt.createElement)(e,Object(qt.a)({onFocus:this.onFocus},n)))}}]),n}(Yt.Component)}])(cn.Autocomplete),pn=[{icon:"editor-alignleft",title:Object(p.__)("Align text left"),align:"left"},{icon:"editor-aligncenter",title:Object(p.__)("Align text center"),align:"center"},{icon:"editor-alignright",title:Object(p.__)("Align text right"),align:"right"}];var hn=Object(Jt.compose)(un(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,a=i.getSettings;return{isCollapsed:r||!o||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.alignmentControls,i=void 0===r?pn:r;function c(e){return function(){return o(n===e?void 0:e)}}var a=Object(f.find)(i,function(e){return e.align===n});return Object(Yt.createElement)(cn.Toolbar,{isCollapsed:t,icon:a?a.icon:"editor-alignleft",label:Object(p.__)("Change Text Alignment"),controls:i.map(function(e){var t=e.align,o=n===t;return Object(s.a)({},e,{isActive:o,onClick:c(t)})})})}),vn={left:{icon:"align-left",title:Object(p.__)("Align left")},center:{icon:"align-center",title:Object(p.__)("Align center")},right:{icon:"align-right",title:Object(p.__)("Align right")},wide:{icon:"align-wide",title:Object(p.__)("Wide width")},full:{icon:"align-full-width",title:Object(p.__)("Full width")}},mn=["left","center","right","wide","full"],gn=["wide","full"];var On=Object(Jt.compose)(un(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,a=(0,i.getSettings)();return{wideControlsEnabled:a.alignWide,isCollapsed:r||!o||!a.hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.controls,i=void 0===r?mn:r,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===gn.indexOf(e)}),l=vn[n];return Object(Yt.createElement)(cn.Toolbar,{isCollapsed:t,icon:l?l.icon:"align-left",label:Object(p.__)("Change Alignment"),controls:a.map(function(e){return Object(s.a)({},vn[e],{isActive:n===e,onClick:(t=e,function(){return o(n===t?void 0:t)})});var t})})}),kn=Object(cn.createSlotFill)("BlockControls"),jn=kn.Fill,yn=kn.Slot,_n=dn(function(e){var t=e.controls,n=e.children;return Object(Yt.createElement)(jn,null,Object(Yt.createElement)(cn.Toolbar,{controls:t}),n)});_n.Slot=yn;var Sn=_n,Cn=Object(cn.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,o=e.name,r=Object(i.getBlockType)(o);if(!r)return null;var c=Object(i.hasBlockSupport)(r,"className",!0)?Object(i.getBlockDefaultClassName)(o):null,a=Xt()(c,n.className),l=r.edit||r.save;return Object(Yt.createElement)(l,Object(qt.a)({},e,{className:a}))}),En=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(rn.a)(Object(rn.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(Yt.createElement)(sn,{value:this.state},Object(Yt.createElement)(Cn,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Yt.Component),wn=Object(cn.createSlotFill)("BlockFormatControls"),In=wn.Fill,Tn=wn.Slot,Bn=dn(In);Bn.Slot=Tn;var xn=Bn,Ln=n(18);function Nn(e){var t=e.icon,n=e.showColors,o=void 0!==n&&n,r=e.className;"block-default"===Object(f.get)(t,["src"])&&(t={src:Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object(Yt.createElement)(cn.Icon,{icon:t&&t.src?t.src:t}),c=o?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(Yt.createElement)("span",{style:c,className:Xt()("editor-block-icon block-editor-block-icon",r,{"has-colors":o})},i)}function Mn(e){var t=e.blocks,n=e.selectedBlockClientId,o=e.selectBlock,r=e.showNestedBlocks;return Object(Yt.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list",role:"list"},Object(f.map)(t,function(e){var t=Object(i.getBlockType)(e.name),c=e.clientId===n;return Object(Yt.createElement)("li",{key:e.clientId},Object(Yt.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(Yt.createElement)(cn.Button,{className:Xt()("editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":c}),onClick:function(){return o(e.clientId)}},Object(Yt.createElement)(Nn,{icon:t.icon,showColors:!0}),t.title,c&&Object(Yt.createElement)("span",{className:"screen-reader-text"},Object(p.__)("(selected block)")))),r&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Yt.createElement)(Mn,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:o,showNestedBlocks:!0}))}))}var Rn=Object(Jt.compose)(Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getBlockHierarchyRootClientId,r=t.getBlock,i=t.getBlocks,c=n();return{rootBlocks:i(),rootBlock:c?r(o(c)):null,selectedBlockClientId:c}}),Object(l.withDispatch)(function(e,t){var n=t.onSelect,o=void 0===n?f.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),o(t)}}}))(function(e){var t=e.rootBlock,n=e.rootBlocks,o=e.selectedBlockClientId,r=e.selectBlock;if(!n||0===n.length)return null;var i=t&&(t.clientId!==o||t.innerBlocks&&0!==t.innerBlocks.length);return Object(Yt.createElement)(cn.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container block-editor-block-navigation__container"},Object(Yt.createElement)("p",{className:"editor-block-navigation__label block-editor-block-navigation__label"},Object(p.__)("Block Navigation")),i&&Object(Yt.createElement)(Mn,{blocks:[t],selectedBlockClientId:o,selectBlock:r,showNestedBlocks:!0}),!i&&Object(Yt.createElement)(Mn,{blocks:n,selectedBlockClientId:o,selectBlock:r}))}),An=Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Yt.createElement)(cn.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var Dn=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}})(function(e){var t=e.hasBlocks,n=e.isDisabled,o=t&&!n;return Object(Yt.createElement)(cn.Dropdown,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Yt.createElement)(Yt.Fragment,null,o&&Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Ln.rawShortcut.access("o"),n)}),Object(Yt.createElement)(cn.IconButton,{icon:An,"aria-expanded":t,onClick:o?n:void 0,label:Object(p.__)("Block Navigation"),className:"editor-block-navigation block-editor-block-navigation",shortcut:Ln.displayShortcut.access("o"),"aria-disabled":!o}))},renderContent:function(e){var t=e.onClose;return Object(Yt.createElement)(Rn,{onSelect:t})}})}),Pn=Object(Jt.createHigherOrderComponent)(Object(l.withSelect)(function(e,t){var n=e("core/block-editor").getSettings(),o=void 0===t.colors?n.colors:t.colors,r=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:o,disableCustomColors:r,hasColorsToChoose:!Object(f.isEmpty)(o)||!r}}),"withColorContext"),Fn=Pn(cn.ColorPalette),Hn=n(45),Un=n.n(Hn),Vn=function(e,t,n){if(t){var o=Object(f.find)(e,{slug:t});if(o)return o}return{color:n}},zn=function(e,t){return Object(f.find)(e,{color:t})};function Kn(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var Wn=[],Gn=function(e){return Object(Jt.createHigherOrderComponent)(function(t){return function(n){return Object(Yt.createElement)(t,Object(qt.a)({},n,{colors:e}))}},"withCustomColorPalette")},qn=function(){return Object(l.withSelect)(function(e){var t=e("core/block-editor").getSettings();return{colors:Object(f.get)(t,["colors"],Wn)}})};function Yn(e,t){var n=Object(f.reduce)(e,function(e,t){return Object(s.a)({},e,Object(f.isString)(t)?Object(b.a)({},t,Object(f.kebabCase)(t)):t)},{});return Object(Jt.compose)([t,function(e){return function(t){function o(e){var t;return Object(Qt.a)(this,o),(t=Object(tn.a)(this,Object(nn.a)(o).call(this,e))).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(rn.a)(Object(rn.a)(t)))},t.state={},t}return Object(on.a)(o,t),Object(en.a)(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Un.a.mostReadable(t,Object(f.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(n,function(t,n,o){var r=Object(f.upperFirst)(o),i="custom".concat(r);return t["set".concat(r)]=e.createSetColor(o,i),t},{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(o){var r,i=zn(n.props.colors,o);n.props.setAttributes((r={},Object(b.a)(r,e,i&&i.slug?i.slug:void 0),Object(b.a)(r,t,i&&i.slug?void 0:o),r))}}},{key:"render",value:function(){return Object(Yt.createElement)(e,Object(s.a)({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o=e.attributes,r=e.colors;return Object(f.reduce)(n,function(e,n,i){var c=Vn(r,o[i],o["custom".concat(Object(f.upperFirst)(i))]),a=t[i];return Object(f.get)(a,["color"])===c.color&&a?e[i]=a:e[i]=Object(s.a)({},c,{class:Kn(n,c.slug)}),e},{})}}]),o}(Yt.Component)}])}function $n(e){return function(){for(var t=Gn(e),n=arguments.length,o=new Array(n),r=0;r=24?"large":"small"}))return null;var s=a.getBrightness()1?function(e,t,n,o,r){var i=t+1;if(r<0&&n)return Object(p.__)("Blocks cannot be moved up as they are already at the top");if(r>0&&o)return Object(p.__)("Blocks cannot be moved down as they are already at the bottom");if(r<0&&!n)return Object(p.sprintf)(Object(p._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(r>0&&!o)return Object(p.sprintf)(Object(p._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,o,r,i):o&&r?Object(p.sprintf)(Object(p.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!r?Object(p.sprintf)(Object(p.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&r?Object(p.sprintf)(Object(p.__)("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!o?Object(p.sprintf)(Object(p.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&o?Object(p.sprintf)(Object(p.__)("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var co=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),ao=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),lo=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Path,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),so=Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=(0,o.getBlockRootClientId)(n);return{index:r(n,i),rootClientId:i}})(function(e){var t=e.children,n=e.clientId,o=e.rootClientId,r=e.blockElementId,i=e.index,c=e.onDragStart,a=e.onDragEnd,l={type:"block",srcIndex:i,srcRootClientId:o,srcClientId:n};return Object(Yt.createElement)(cn.Draggable,{elementId:r,transferData:l,onDragStart:c,onDragEnd:a},function(e){var n=e.onDraggableStart,o=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:o})})}),uo=function(e){var t=e.isVisible,n=e.className,o=e.icon,r=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId;if(!t)return null;var l=Xt()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(Yt.createElement)(so,{clientId:a,blockElementId:c,onDragStart:r,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Yt.createElement)("div",{className:l,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},o)})},bo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e.onBlur=e.onBlur.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,o=e.isFirst,r=e.isLast,i=e.isDraggable,c=e.onDragStart,a=e.onDragEnd,l=e.clientIds,s=e.blockElementId,u=e.blockType,d=e.firstIndex,b=e.isLocked,h=e.instanceId,v=e.isHidden,m=this.state.isFocused,g=Object(f.castArray)(l).length;return b||o&&r?null:Object(Yt.createElement)("div",{className:Xt()("editor-block-mover block-editor-block-mover",{"is-visible":m||!v})},Object(Yt.createElement)(cn.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:t,icon:co,label:Object(p.__)("Move up"),"aria-describedby":"block-editor-block-mover__up-description-".concat(h),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Yt.createElement)(uo,{className:"editor-block-mover__control block-editor-block-mover__control",icon:lo,clientId:l,blockElementId:s,isVisible:i,onDragStart:c,onDragEnd:a}),Object(Yt.createElement)(cn.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:n,icon:ao,label:Object(p.__)("Move down"),"aria-describedby":"block-editor-block-mover__down-description-".concat(h),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Yt.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},io(g,u&&u.title,d,o,r,-1)),Object(Yt.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},io(g,u&&u.title,d,o,r,1)))}}]),t}(Yt.Component),fo=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockIndex,a=o.getTemplateLock,l=o.getBlockRootClientId,s=Object(f.first)(Object(f.castArray)(n)),u=r(s),d=l(Object(f.first)(Object(f.castArray)(n)));return{firstIndex:c(s,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===a(d),rootClientId:d}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,o=t.rootClientId,r=e("core/block-editor"),i=r.moveBlocksDown,c=r.moveBlocksUp;return{onMoveDown:Object(f.partial)(i,n,o),onMoveUp:Object(f.partial)(c,n,o)}}),Jt.withInstanceId)(bo);var po=Object(l.withSelect)(function(e){var t=e("core").canUser;return{hasUploadPermissions:Object(f.defaultTo)(t("create","media"),!0)}})(function(e){var t=e.hasUploadPermissions,n=e.fallback,o=void 0===n?null:n,r=e.children;return t?r:o}),ho=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(rn.a)(Object(rn.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(rn.a)(Object(rn.a)(e))),e.onDrop=e.onDrop.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getInsertIndex",value:function(e){var t=this.props,n=t.clientId,o=t.rootClientId,r=t.getBlockIndex;if(void 0!==n){var i=r(n,o);return"top"===e.y?i:i+1}}},{key:"onFilesDrop",value:function(e,t){var n=Object(i.findTransform)(Object(i.getBlockTransforms)("from"),function(t){return"files"===t.type&&t.isMatch(e)});if(n){var o=this.getInsertIndex(t),r=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(r,o)}}},{key:"onHTMLDrop",value:function(e,t){var n=Object(i.pasteHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,o=n.rootClientId,r=n.clientId,i=n.getClientIdsOfDescendants,c=n.getBlockIndex,a=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),l=a.srcRootClientId,s=a.srcClientId,u=a.srcIndex,d=a.type;if("block"===d&&s!==r&&!function(e,t){return i([e]).some(function(e){return e===t})}(s,r||o)){var b,f,p=r?c(r,o):void 0,h=this.getInsertIndex(t),v=p&&u0&&Object(Yt.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},Yt.Children.map(n,function(e,t){return Object(Yt.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)}))),r&&Object(Yt.createElement)(cn.Dropdown,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Yt.createElement)(cn.IconButton,{icon:"ellipsis",label:Object(p.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Yt.createElement)(cn.MenuGroup,null,r.map(function(e,t){return Object(Yt.createElement)(cn.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},go=n(207),Oo=function(e){var t=e.title,n=e.rawContent,o=e.renderedContent,r=e.action,i=e.actionText,c=e.className;return Object(Yt.createElement)("div",{className:c},Object(Yt.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(Yt.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(Yt.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(Yt.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},o)),Object(Yt.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(Yt.createElement)(cn.Button,{isLarge:!0,tabIndex:"0",onClick:r},i)))},ko=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getDifference",value:function(e,t){return Object(go.diffChars)(e,t).map(function(e,t){var n=Xt()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(Yt.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Object(i.getSaveElement)(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(f.castArray)(e),n=t.map(function(e){return Object(i.getSaveContent)(e.name,e.attributes,e.innerBlocks)}),o=t.map(function(e){return Object(i.getSaveElement)(e.name,e.attributes,e.innerBlocks)});return{rawContent:n.join(""),renderedContent:o}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,o=e.onConvert,r=e.convertor,i=e.convertButtonText,c=this.getOriginalContent(t),a=this.getConvertedContent(r(t)),l=this.getDifference(c.rawContent,a.rawContent);return Object(Yt.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(Yt.createElement)(Oo,{title:Object(p.__)("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:Object(p.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(Yt.createElement)(Oo,{title:Object(p.__)("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:o,actionText:i,rawContent:l,renderedContent:a.renderedContent}))}}]),t}(Yt.Component),jo=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(rn.a)(Object(rn.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(rn.a)(Object(rn.a)(n))),n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,o=e.convertToClassic,r=e.attemptBlockRecovery,c=e.block,a=!!Object(i.getBlockType)("core/html"),l=this.state.compare,s=[{title:Object(p.__)("Convert to Classic Block"),onClick:o},{title:Object(p.__)("Attempt Block Recovery"),onClick:r}];return l?Object(Yt.createElement)(cn.Modal,{title:Object(p.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(Yt.createElement)(ko,{block:c,onKeep:t,onConvert:n,convertor:yo,convertButtonText:Object(p.__)("Convert to Blocks")})):Object(Yt.createElement)(mo,{actions:[Object(Yt.createElement)(cn.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},Object(p._x)("Resolve","imperative verb")),a&&Object(Yt.createElement)(cn.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(p.__)("Convert to HTML"))],secondaryActions:s},Object(p.__)("This block contains unexpected or invalid content."))}}]),t}(Yt.Component),yo=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},_o=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}}),Object(l.withDispatch)(function(e,t){var n=t.block,o=e("core/block-editor").replaceBlock;return{convertToClassic:function(){o(n.clientId,function(e){return Object(i.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){o(n.clientId,function(e){return Object(i.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){o(n.clientId,yo(n))},attemptBlockRecovery:function(){var e,t,r,c;o(n.clientId,(t=(e=n).name,r=e.attributes,c=e.innerBlocks,Object(i.createBlock)(t,r,c)))}}})])(jo),So=Object(Yt.createElement)(mo,null,Object(p.__)("This block has encountered an error and cannot be previewed.")),Co=function(){return So},Eo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(Yt.Component),wo=n(61),Io=n.n(wo),To=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onBlur=n.onBlur.bind(Object(rn.a)(Object(rn.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(e){Object(f.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(i.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(i.getBlockType)(this.props.block.name),n=Object(i.getBlockAttributes)(t,e,this.props.block.attributes),o=e||Object(i.getSaveContent)(t,n),r=!e||Object(i.isValidBlockContent)(t,n,o);this.props.onChange(this.props.clientId,n,o,r),e||this.setState({html:o})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(Yt.createElement)(Io.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Yt.Component),Bo=Object(Jt.compose)([Object(l.withSelect)(function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}}),Object(l.withDispatch)(function(e){return{onChange:function(t,n,o,r){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:o,isValid:r})}}})])(To);var xo=Object(l.withSelect)(function(e,t){return{name:(0,e("core/block-editor").getBlockName)(t.clientId)}})(function(e){var t=e.name;if(!t)return null;var n=Object(i.getBlockType)(t);return n?n.title:null}),Lo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e.onBlur=e.onBlur.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(Yt.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(Yt.createElement)(cn.Toolbar,null,n&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(xo,{clientId:n}),Object(Yt.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(Yt.createElement)(xo,{clientId:t})))}}]),t}(Yt.Component),No=Object(Jt.compose)([Object(l.withSelect)(function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}})])(Lo),Mo=window,Ro=Mo.Node,Ao=Mo.getSelection,Do=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(rn.a)(Object(rn.a)(e))),e.focusSelection=e.focusSelection.bind(Object(rn.a)(Object(rn.a)(e))),e.switchOnKeyDown=Object(f.cond)([[Object(f.matchesProperty)(["keyCode"],Ln.ESCAPE),e.focusSelection]]),e.toolbar=Object(Yt.createRef)(),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"focusToolbar",value:function(){var e=ro.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Ao();if(e){var t=e.focusNode;t.nodeType!==Ro.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(u.a)(e,["children"]);return Object(Yt.createElement)(cn.NavigableMenu,Object(qt.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(f.omit)(n,["focusOnMount"])),Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Yt.Component);var Po=function(e){var t=e.focusOnMount;return Object(Yt.createElement)(Do,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":Object(p.__)("Block tools")},Object(Yt.createElement)(lc,null))};var Fo=Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getMultiSelectedBlockClientIds,i=o.isMultiSelecting,c=o.getBlockIndex,a=o.getBlockCount,l=r(),s=c(Object(f.first)(l),n),u=c(Object(f.last)(l),n);return{multiSelectedBlockClientIds:l,isSelecting:i(),isFirst:0===s,isLast:u+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,o=e.isSelecting,r=e.isFirst,i=e.isLast;return o?null:Object(Yt.createElement)(fo,{key:"mover",clientId:n,clientIds:t,isFirst:r,isLast:i})}),Ho=n(67),Uo=n.n(Ho),Vo=n(25);function zo(e){var t=e.name,n=e.attributes,o=Object(i.createBlock)(t,n);return Object(Yt.createElement)(cn.Disabled,{className:"editor-block-preview__content block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Yt.createElement)(En,{name:t,focus:!1,attributes:o.attributes,setAttributes:f.noop}))}var Ko=function(e){return Object(Yt.createElement)("div",{className:"editor-block-preview block-editor-block-preview"},Object(Yt.createElement)("div",{className:"editor-block-preview__title block-editor-block-preview__title"},Object(p.__)("Preview")),Object(Yt.createElement)(zo,e))};var Wo=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,o=e.onClick,r=e.isDisabled,i=e.title,c=e.className,a=Object(u.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),l=t?{backgroundColor:t.background,color:t.foreground}:{},s=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Yt.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object(Yt.createElement)("button",Object(qt.a)({className:Xt()("editor-block-types-list__item block-editor-block-types-list__item",c,{"editor-block-types-list__item-has-children block-editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),o()},disabled:r,"aria-label":i},a),Object(Yt.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:l},Object(Yt.createElement)(Nn,{icon:t,showColors:!0}),n&&Object(Yt.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:s})),Object(Yt.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},i)))};var Go=function(e){var t=e.items,n=e.onSelect,o=e.onHover,r=void 0===o?function(){}:o,c=e.children;return Object(Yt.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map(function(e){return Object(Yt.createElement)(Wo,{key:e.id,className:Object(i.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),r(null)},onFocus:function(){return r(e)},onMouseEnter:function(){return r(e)},onMouseLeave:function(){return r(null)},onBlur:function(){return r(null)},isDisabled:e.isDisabled,title:e.title})}),c)};var qo=Object(Jt.compose)(Object(Jt.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(n));return{rootBlockTitle:o&&o.title,rootBlockIcon:o&&o.icon}}))(function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,o=e.items,r=Object(u.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(Yt.createElement)("div",{className:"editor-inserter__child-blocks block-editor-inserter__child-blocks"},(t||n)&&Object(Yt.createElement)("div",{className:"editor-inserter__parent-block-header block-editor-inserter__parent-block-header"},Object(Yt.createElement)(Nn,{icon:t,showColors:!0}),n&&Object(Yt.createElement)("h2",null,n)),Object(Yt.createElement)(Go,Object(qt.a)({items:o},r)))}),Yo=function(e){return e.stopPropagation()},$o=function(e){return e=(e=(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Xo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(rn.a)(Object(rn.a)(e))),e.onHover=e.onHover.bind(Object(rn.a)(Object(rn.a)(e))),e.panels={},e.inserterResults=Object(Yt.createRef)(),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchReusableBlocks(),this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"onChangeSearchInput",value:function(e){this.filter(e.target.value)}},{key:"onHover",value:function(e){this.setState({hoveredItem:e});var t=this.props,n=t.showInsertionPoint,o=t.hideInsertionPoint;e?n():o()}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(f.without)(t.state.openPanels,e)}):(t.setState({openPanels:[].concat(Object(d.a)(t.state.openPanels),[e])}),t.props.setTimeout(function(){Uo()(t.panels[e],t.inserterResults.current,{alignWithTop:!0})}))}}},{key:"filterOpenPanels",value:function(e,t,n,o){if(e===this.state.filterValue)return this.state.openPanels;if(!e)return["suggested"];var r=[];return o.length>0&&r.push("reusable"),n.length>0&&(r=r.concat(Object.keys(t))),r}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,o=t.items,r=t.rootChildBlocks,c=function(e,t){var n=$o(t),o=function(e){return-1!==$o(e).indexOf(n)},r=Object(i.getCategories)();return e.filter(function(e){var t=Object(f.find)(r,{slug:e.category});return o(e.title)||Object(f.some)(e.keywords,o)||t&&o(t.title)})}(o,e),a=Object(f.filter)(c,function(e){var t=e.name;return Object(f.includes)(r,t)}),l=[];if(!e){var s=this.props.maxSuggestedItems||9;l=Object(f.filter)(o,function(e){return e.utility>0}).slice(0,s)}var u=Object(f.filter)(c,{category:"reusable"}),d=function(e){return Object(f.findIndex)(Object(i.getCategories)(),function(t){return t.slug===e.category})},b=Object(f.flow)(function(e){return Object(f.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(f.sortBy)(e,d)},function(e){return Object(f.groupBy)(e,"category")})(c);this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:l,reusableItems:u,itemsPerCategory:b,openPanels:this.filterOpenPanels(e,b,c,u)});var h=Object.keys(b).reduce(function(e,t){return e+b[t].length},0);n(Object(p.sprintf)(Object(p._n)("%d result found.","%d results found.",h),h))}},{key:"onKeyDown",value:function(e){Object(f.includes)([Ln.LEFT,Ln.DOWN,Ln.RIGHT,Ln.UP,Ln.BACKSPACE,Ln.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,o=t.onSelect,r=t.rootClientId,c=this.state,a=c.childItems,l=c.hoveredItem,s=c.itemsPerCategory,u=c.openPanels,d=c.reusableItems,b=c.suggestedItems,h=function(e){return-1!==u.indexOf(e)};return Object(Yt.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu",onKeyPress:Yo,onKeyDown:this.onKeyDown},Object(Yt.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(p.__)("Search for a block")),Object(Yt.createElement)("input",{id:"block-editor-inserter__search-".concat(n),type:"search",placeholder:Object(p.__)("Search for a block"),className:"editor-inserter__search block-editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(Yt.createElement)("div",{className:"editor-inserter__results block-editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(p.__)("Available block types")},Object(Yt.createElement)(qo,{rootClientId:r,items:a,onSelect:o,onHover:this.onHover}),!!b.length&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p._x)("Most Used","blocks"),opened:h("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Yt.createElement)(Go,{items:b,onSelect:o,onHover:this.onHover})),Object(f.map)(Object(i.getCategories)(),function(t){var n=s[t.slug];return n&&n.length?Object(Yt.createElement)(cn.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:h(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(Yt.createElement)(Go,{items:n,onSelect:o,onHover:e.onHover})):null}),!!d.length&&Object(Yt.createElement)(cn.PanelBody,{className:"editor-inserter__reusable-blocks-panel block-editor-inserter__reusable-blocks-panel",title:Object(p.__)("Reusable"),opened:h("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(Yt.createElement)(Go,{items:d,onSelect:o,onHover:this.onHover}),Object(Yt.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(Vo.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(p.__)("Manage All Reusable Blocks"))),Object(f.isEmpty)(b)&&Object(f.isEmpty)(d)&&Object(f.isEmpty)(s)&&Object(Yt.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(p.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object(Yt.createElement)(Ko,{name:l.name,attributes:l.initialAttributes}))}}]),t}(Yt.Component),Jo=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isAppender,r=t.rootClientId,i=e("core/block-editor"),c=i.getInserterItems,a=i.getBlockName,l=i.getBlockRootClientId,s=i.getBlockSelectionEnd,u=e("core/blocks").getChildBlockNames,d=r;if(!d&&!n&&!o){var b=s();b&&(d=l(b)||void 0)}return{rootChildBlocks:u(a(d)),items:c(d),destinationRootClientId:d}}),Object(l.withDispatch)(function(e,t,n){var o=n.select,r=e("core/block-editor"),c=r.showInsertionPoint,a=r.hideInsertionPoint;function l(){var e=o("core/block-editor"),n=e.getBlockIndex,r=e.getBlockSelectionEnd,i=e.getBlockOrder,c=t.clientId,a=t.destinationRootClientId,l=t.isAppender;if(c)return n(c,a);var s=r();return!l&&s?n(s,a)+1:i(a).length}return{fetchReusableBlocks:e("core/editor").__experimentalFetchReusableBlocks,showInsertionPoint:function(){var e=l();c(t.destinationRootClientId,e)},hideInsertionPoint:a,onSelect:function(n){var r=e("core/block-editor"),c=r.replaceBlocks,a=r.insertBlock,s=o("core/block-editor").getSelectedBlock,u=t.isAppender,d=n.name,b=n.initialAttributes,f=s(),p=Object(i.createBlock)(d,b);!u&&f&&Object(i.isUnmodifiedDefaultBlock)(f)?c(f.clientId,p):a(p,l(),t.destinationRootClientId),t.onSelect()}}}),cn.withSpokenMessages,Jt.withInstanceId,Jt.withSafeTimeout)(Xo),Zo=function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Yt.createElement)(cn.IconButton,{icon:"insert",label:Object(p.__)("Add block"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle block-editor-inserter__toggle","aria-haspopup":"true","aria-expanded":o,disabled:n})},Qo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(rn.a)(Object(rn.a)(e))),e.renderToggle=e.renderToggle.bind(Object(rn.a)(Object(rn.a)(e))),e.renderContent=e.renderContent.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,o=this.props,r=o.disabled,i=o.renderToggle,c=void 0===i?Zo:i;return c({onToggle:t,isOpen:n,disabled:r})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,o=n.rootClientId,r=n.clientId,i=n.isAppender;return Object(Yt.createElement)(Jo,{onSelect:t,rootClientId:o,clientId:r,isAppender:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Yt.createElement)(cn.Dropdown,{className:"editor-inserter block-editor-inserter",contentClassName:"editor-inserter__popover block-editor-inserter__popover",position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:n,renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(Yt.Component),er=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor").hasInserterItems;return{title:(0,e("core/editor").getEditedPostAttribute)("title"),hasItems:o(n)}}),Object(Jt.ifCondition)(function(e){return e.hasItems})])(Qo);var tr=Object(a.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(Yt.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(Yt.createElement)(er,null),Object(Yt.createElement)(fo,{clientIds:[t]}))}),nr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(rn.a)(Object(rn.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,o=t.rootClientId,r=t.clientId;return Object(Yt.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(Yt.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(Yt.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Xt()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Yt.createElement)(er,{rootClientId:o,clientId:r})))}}]),t}(Yt.Component),or=Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.rootClientId,r=e("core/block-editor"),i=r.getBlockIndex,c=r.getBlockInsertionPoint,a=r.isBlockInsertionPointVisible,l=i(n,o),s=c();return{showInsertionPoint:a()&&s.index===l&&s.rootClientId===o}})(nr),rr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(rn.a)(Object(rn.a)(e))),e.eventMap={},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,o=void 0===n?[]:n,r=t.forwardedRef,i=Object(u.a)(t,["childHandledEvents","forwardedRef"]),c=Object(f.reduce)([].concat(Object(d.a)(o),Object(d.a)(Object.keys(i))),function(t,n){var o=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(o){!!o[2]&&delete i[n];var r="on"+o[1];t[r]=e.proxyEvent,e.eventMap[o[1].toLowerCase()]=r}return t},{});return Object(Yt.createElement)("div",Object(qt.a)({ref:r},i,c))}}]),t}(Yt.Component),ir=function(e,t){return Object(Yt.createElement)(rr,Object(qt.a)({},e,{forwardedRef:t}))};ir.displayName="IgnoreNestedEvents";var cr=Object(Yt.forwardRef)(ir);var ar=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getInserterItems,i=o.getTemplateLock;return{items:r(n),isLocked:!!i(n)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId,o=t.rootClientId;return{onInsert:function(t){var r=t.name,c=t.initialAttributes,a=Object(i.createBlock)(r,c);n?e("core/block-editor").replaceBlocks(n,a):e("core/block-editor").insertBlock(a,void 0,o)}}}))(function(e){var t=e.items,n=e.isLocked,o=e.onInsert;if(n)return null;var r=Object(f.filter)(t,function(e){return!(e.isDisabled||e.name===Object(i.getDefaultBlockName)()&&Object(f.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(Yt.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},r.map(function(e){return Object(Yt.createElement)(cn.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block block-editor-inserter-with-shortcuts__block",onClick:function(){return o(e)},label:Object(p.sprintf)(Object(p.__)("Add %s"),e.title),icon:Object(Yt.createElement)(Nn,{icon:e.icon})})}))}),lr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(rn.a)(Object(rn.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentWillUnmount",value:function(){this.props.container&&this.toggleListeners(this.props.container,!1)}},{key:"componentDidMount",value:function(){this.props.container&&this.toggleListeners(this.props.container)}},{key:"componentDidUpdate",value:function(e){e.container!==this.props.container&&(e.container&&this.toggleListeners(e.container,!1),this.props.container&&this.toggleListeners(this.props.container,!0))}},{key:"toggleListeners",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?"addEventListener":"removeEventListener";e[t]("mousemove",this.onMouseMove),e[t]("mouseleave",this.onMouseLeave)}},{key:"onMouseLeave",value:function(){this.state.hoverArea&&this.setState({hoverArea:null})}},{key:"onMouseMove",value:function(e){var t=this.props,n=t.isRTL,o=t.container.getBoundingClientRect(),r=o.width,i=o.left,c=o.right,a=null;e.clientX-i0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;c(e,n)},onInsertBlocks:function(e,n){var o=t.rootClientId;l(e,n,o)},onInsertDefaultBlockAfter:function(){var e=t.clientId,n=t.rootClientId,r=(0,o("core/block-editor").getBlockIndex)(e,n);s({},n,r+1)},onInsertBlocksAfter:function(e){var n=t.clientId,r=t.rootClientId,i=(0,o("core/block-editor").getBlockIndex)(n,r);l(e,i+1,r)},onRemove:function(e){u(e)},onMerge:function(e){var n=t.clientId,r=o("core/block-editor"),i=r.getPreviousBlockClientId,c=r.getNextBlockClientId;if(e){var a=c(n);a&&d(n,a)}else{var l=i(n);l&&d(l,n)}},onReplace:function(e){b([t.clientId],e)},onMetaChange:function(e){(0,(0,o("core/block-editor").getSettings)().__experimentalMetaSource.onChange)(e)},onShiftSelection:function(){if(t.isSelectionEnabled){var e=o("core/block-editor").getBlockSelectionStart;e()?a(e(),t.clientId):c(t.clientId)}},toggleSelection:function(e){f(e)}}}),pr=Object(Jt.compose)(Jt.pure,Object(a.withViewportMatch)({isLargeViewport:"medium"}),br,fr,Object(cn.withFilters)("editor.BlockListBlock"))(dr),hr=n(57);var vr=Object(Jt.compose)(Object(Jt.withState)({hovered:!1}),Object(l.withSelect)(function(e,t){var n=e("core/block-editor"),o=n.getBlockCount,r=n.getBlockName,c=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,s=!o(t.rootClientId),u=r(t.lastBlockClientId)===Object(i.getDefaultBlockName)(),d=c(t.lastBlockClientId),b=a().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!l(t.rootClientId),placeholder:b}}),Object(l.withDispatch)(function(e,t){var n=e("core/block-editor"),o=n.insertDefaultBlock,r=n.startTyping;return{onAppend:function(){var e=t.rootClientId;o(void 0,e),r()}}}))(function(e){var t=e.isLocked,n=e.isVisible,o=e.onAppend,r=e.showPrompt,i=e.placeholder,c=e.rootClientId,a=e.hovered,l=e.setState;if(t||!n)return null;var s=Object(hr.decodeEntities)(i)||Object(p.__)("Start writing or type / to choose a block");return Object(Yt.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender block-editor-default-block-appender",onMouseEnter:function(){return l({hovered:!0})},onMouseLeave:function(){return l({hovered:!1})}},Object(Yt.createElement)(vo,{rootClientId:c}),Object(Yt.createElement)(Io.a,{role:"button","aria-label":Object(p.__)("Add block"),className:"editor-default-block-appender__content block-editor-default-block-appender__content",readOnly:!0,onFocus:o,value:r?s:""}),a&&Object(Yt.createElement)(ar,{rootClientId:c}),Object(Yt.createElement)(er,{rootClientId:c,position:"top right",isAppender:!0}))});var mr=Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getBlockOrder,c=o.canInsertBlockType;return{isLocked:!!(0,o.getTemplateLock)(n),blockClientIds:r(n),canInsertDefaultBlock:c(Object(i.getDefaultBlockName)(),n)}})(function(e){var t=e.blockClientIds,n=e.rootClientId,o=e.canInsertDefaultBlock;return e.isLocked?null:o?Object(Yt.createElement)(cr,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Yt.createElement)(vr,{rootClientId:n,lastBlockClientId:Object(f.last)(t)})):Object(Yt.createElement)("div",{className:"block-list-appender"},Object(Yt.createElement)(er,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Yt.createElement)(cn.IconButton,{label:Object(p.__)("Add block"),icon:"insert",onClick:t,className:"block-list-appender__toggle","aria-haspopup":"true","aria-expanded":o,disabled:n})},isAppender:!0}))}),gr=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(rn.a)(Object(rn.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(rn.a)(Object(rn.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(rn.a)(Object(rn.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(rn.a)(Object(rn.a)(n))),n.onPointerMove=Object(f.throttle)(n.onPointerMove.bind(Object(rn.a)(Object(rn.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("mousemove",this.setLastClientY)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.setLastClientY)}},{key:"setLastClientY",value:function(e){var t=e.clientY;this.lastClientY=t}},{key:"setBlockRef",value:function(e,t){null===e?delete this.nodes[t]:this.nodes=Object(s.a)({},this.nodes,Object(b.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=ur(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var o=t-n.top,r=Object(f.findLast)(this.coordMapKeys,function(e){return e0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e}(t,n)||(n.colors||e).length>0}(t,n,e)})})(function(e){var t=e.children,n=e.colors,o=e.colorSettings,r=e.disableCustomColors,i=e.title,c=Object(u.a)(e,["children","colors","colorSettings","disableCustomColors","title"]),a=Object(Yt.createElement)("span",{className:"editor-panel-color-settings__panel-title block-editor-panel-color-settings__panel-title"},i,function(e,t){return e.map(function(e,n){var o=e.value,r=e.label,i=e.colors;if(!o)return null;var c=zn(i||t,o),a=c&&c.name,l=Object(p.sprintf)(Mr,r.toLowerCase(),a||o);return Object(Yt.createElement)(cn.ColorIndicator,{key:n,colorValue:o,"aria-label":l})})}(o,n));return Object(Yt.createElement)(cn.PanelBody,Object(qt.a)({className:"editor-panel-color-settings block-editor-panel-color-settings",title:a},c),o.map(function(e,t){return Object(Yt.createElement)(Nr,Object(qt.a)({key:t},Object(s.a)({colors:n,disableCustomColors:r},e)))}),t)}),Ar=Pn(Rr);var Dr=function(e){var t=e.onChange,n=e.className,o=Object(u.a)(e,["onChange","className"]);return Object(Yt.createElement)(Io.a,Object(qt.a)({className:Xt()("editor-plain-text block-editor-plain-text",n),onChange:function(e){return t(e.target.value)}},o))},Pr=n(41),Fr=n.n(Pr),Hr=n(35),Ur=n(49),Vr=n.n(Ur),zr=Object(l.withSelect)(function(e){return{formatTypes:(0,e("core/rich-text").getFormatTypes)()}})(function(e){var t=e.formatTypes,n=e.onChange,o=e.value;return Object(Yt.createElement)(Yt.Fragment,null,t.map(function(e){var t=e.name,r=e.edit;if(!r)return null;var i=Object(c.getActiveFormat)(o,t),a=void 0!==i,l=Object(c.getActiveObject)(o),s=void 0!==l;return Object(Yt.createElement)(r,{key:t,isActive:a,activeAttributes:a&&i.attributes||{},isObjectActive:s,activeObjectAttributes:s&&l.attributes||{},value:o,onChange:n})}))}),Kr=function(e){var t=e.controls;return Object(Yt.createElement)("div",{className:"editor-format-toolbar block-editor-format-toolbar"},Object(Yt.createElement)(cn.Toolbar,null,t.map(function(e){return Object(Yt.createElement)(cn.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})}),Object(Yt.createElement)(cn.Slot,{name:"RichText.ToolbarControls"},function(e){return e.length&&Object(Yt.createElement)(cn.DropdownMenu,{icon:!1,position:"bottom left",label:Object(p.__)("More Rich Text Controls"),controls:Object(f.orderBy)(e.map(function(e){return Object(B.a)(e,1)[0].props}),"title")})})))},Wr=function(e){return Object(f.pickBy)(e,function(e,t){return n=t,Object(f.startsWith)(n,"aria-")&&!Object(f.isNil)(e);var n})},Gr=window.navigator.userAgent;var qr="editor-rich-text__editable block-editor-rich-text__editable",Yr=Gr.indexOf("Trident")>=0,$r=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(f.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(f.isEqual)(this.props.className,e.className)||(this.editorNode.className=Xt()(e.className,qr));var n=function(e,t){var n=Object(f.keys)(Wr(e)),o=Object(f.keys)(Wr(t));return{removedKeys:Object(f.difference)(n,o),updatedKeys:o.filter(function(n){return!Object(f.isEqual)(e[n],t[n])})}}(this.props,e),o=n.removedKeys,r=n.updatedKeys;return o.forEach(function(e){return t.editorNode.removeAttribute(e)}),r.forEach(function(n){return t.editorNode.setAttribute(n,e[n])}),!1}},{key:"configureIsPlaceholderVisible",value:function(e){var t=String(!!e);this.editorNode.getAttribute("data-is-placeholder-visible")!==t&&this.editorNode.setAttribute("data-is-placeholder-visible",t)}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.props.setRef(e),Yr&&(e?this.removeInternetExplorerInputFix=function(e){function t(e){e.stopImmediatePropagation();var t=document.createEvent("Event");t.initEvent("input",!0,!1),t.data=e.data,e.target.dispatchEvent(t)}function n(t){var n=t.target,o=t.keyCode;if((Ln.BACKSPACE===o||Ln.DELETE===o)&&e.contains(n)){var r=document.createEvent("Event");r.initEvent("input",!0,!1),r.data=null,n.dispatchEvent(r)}}return e.addEventListener("textinput",t),document.addEventListener("keyup",n,!0),function(){e.removeEventListener("textinput",t),document.removeEventListener("keyup",n,!0)}}(e):this.removeInternetExplorerInputFix())}},{key:"render",value:function(){var e,t=this.props,n=t.tagName,o=void 0===n?"div":n,r=t.style,i=t.record,c=t.valueToEditableHTML,a=t.className,l=t.isPlaceholderVisible,d=Object(u.a)(t,["tagName","style","record","valueToEditableHTML","className","isPlaceholderVisible"]);return delete d.setRef,Object(Yt.createElement)(o,Object(s.a)((e={role:"textbox","aria-multiline":!0,className:Xt()(a,qr),contentEditable:!0},Object(b.a)(e,"data-is-placeholder-visible",l),Object(b.a)(e,"ref",this.bindEditorNode),Object(b.a)(e,"style",r),Object(b.a)(e,"suppressContentEditableWarning",!0),Object(b.a)(e,"dangerouslySetInnerHTML",{__html:c(i)}),e),d))}}]),t}(Yt.Component);var Xr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onUse",value:function(){return this.props.onUse(),!1}},{key:"render",value:function(){var e=this.props,t=e.character,n=e.type;return Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Ln.rawShortcut[n](t),this.onUse)})}}]),t}(Yt.Component),Jr=window.Node,Zr=Jr.TEXT_NODE,Qr=Jr.ELEMENT_NODE;function ei(){var e=window.getSelection();if(0!==e.rangeCount){var t=e.getRangeAt(0).startContainer;if(t.nodeType===Zr&&(t=t.parentNode),t.nodeType===Qr){var n=t.closest("*[contenteditable]");if(n&&n.contains(t))return t.closest("ol,ul")}}}function ti(){var e=ei();return!e||"true"===e.contentEditable}function ni(e,t){var n=ei();return n?n.nodeName.toLowerCase()===e:e===t}var oi=function(e){var t=e.onTagNameChange,n=e.tagName,o=e.value,r=e.onChange;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(Xr,{type:"primary",character:"[",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Yt.createElement)(Xr,{type:"primary",character:"]",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Yt.createElement)(Xr,{type:"primary",character:"m",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Yt.createElement)(Xr,{type:"primaryShift",character:"m",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Yt.createElement)(xn,null,Object(Yt.createElement)(cn.Toolbar,{controls:[t&&{icon:"editor-ul",title:Object(p.__)("Convert to unordered list"),isActive:ni("ul",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ul"})),ti()&&t("ul")}},t&&{icon:"editor-ol",title:Object(p.__)("Convert to ordered list"),isActive:ni("ol",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ol"})),ti()&&t("ol")}},{icon:"editor-outdent",title:Object(p.__)("Outdent list item"),shortcut:Object(p._x)("Backspace","keyboard key"),onClick:function(){r(Object(c.outdentListItems)(o))}},{icon:"editor-indent",title:Object(p.__)("Indent list item"),shortcut:Object(p._x)("Space","keyboard key"),onClick:function(){r(Object(c.indentListItems)(o,{type:n}))}}].filter(Boolean)})))},ri=[Ln.rawShortcut.primary("z"),Ln.rawShortcut.primaryShift("z"),Ln.rawShortcut.primary("y")],ii=Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(ri.map(function(e){return[e,function(e){return e.preventDefault()}]}))}),ci=function(){return ii};function ai(e){var t,n=e.name,o=e.shortcutType,r=e.shortcutCharacter,i=Object(u.a)(e,["name","shortcutType","shortcutCharacter"]),c="RichText.ToolbarControls";return n&&(c+=".".concat(n)),o&&r&&(t=Ln.displayShortcut[o](r)),Object(Yt.createElement)(cn.Fill,{name:c},Object(Yt.createElement)(cn.ToolbarButton,Object(qt.a)({},i,{shortcut:t})))}var li=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onInput=e.onInput.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),t}(Yt.Component),si=window,ui=si.getSelection,di=si.getComputedStyle,bi=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),fi=document.createElement("style");document.head.appendChild(fi);var pi=function(e){function t(e){var n,o=e.value,r=e.onReplace,a=e.multiline;return Object(Qt.a)(this,t),n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments)),!0!==a&&"p"!==a&&"li"!==a||(n.multilineTag=!0===a?"p":a),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Vr()("wp.editor.RichText onSplit prop",{plugin:"Gutenberg",alternative:"wp.editor.RichText unstableOnSplit prop"})):n.props.unstableOnSplit&&(n.onSplit=n.props.unstableOnSplit),n.onFocus=n.onFocus.bind(Object(rn.a)(Object(rn.a)(n))),n.onBlur=n.onBlur.bind(Object(rn.a)(Object(rn.a)(n))),n.onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.onPaste=n.onPaste.bind(Object(rn.a)(Object(rn.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(rn.a)(Object(rn.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(rn.a)(Object(rn.a)(n))),n.onInput=n.onInput.bind(Object(rn.a)(Object(rn.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(rn.a)(Object(rn.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(rn.a)(Object(rn.a)(n))),n.getRecord=n.getRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.createRecord=n.createRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.applyRecord=n.applyRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.isEmpty=n.isEmpty.bind(Object(rn.a)(Object(rn.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(rn.a)(Object(rn.a)(n))),n.setRef=n.setRef.bind(Object(rn.a)(Object(rn.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(rn.a)(Object(rn.a)(n))),n.handleHorizontalNavigation=n.handleHorizontalNavigation.bind(Object(rn.a)(Object(rn.a)(n))),n.onPointerDown=n.onPointerDown.bind(Object(rn.a)(Object(rn.a)(n))),n.formatToValue=Fr()(n.formatToValue.bind(Object(rn.a)(Object(rn.a)(n))),{maxSize:1}),n.savedContent=o,n.patterns=function(e){var t=e.onReplace,n=e.valueToFormat,o=Object(i.getBlockTransforms)("from").filter(function(e){return"prefix"===e.type});return[function(e){if(!t)return e;var r=Object(c.getSelectionStart)(e),a=Object(c.getTextContent)(e),l=a.slice(r-1,r);if(!/\s/.test(l))return e;var s=a.slice(0,r).trim(),u=Object(i.findTransform)(o,function(e){var t=e.prefix;return s===t});if(!u)return e;var d=n(Object(c.slice)(e,r,a.length)),b=u.transform(d);return t([b]),e},function(e){var t=Object(c.getSelectionStart)(e),n=Object(c.getTextContent)(e);if("`"!==n.slice(t-1,t))return e;var o=n.slice(0,t-1).lastIndexOf("`");if(-1===o)return e;var r=o,i=t-2;return r===i?e:(e=Object(c.remove)(e,r,r+1),e=Object(c.remove)(e,i,i+1),e=Object(c.applyFormat)(e,{type:"code"},r,i))}]}({onReplace:r,valueToFormat:n.valueToFormat}),n.enterPatterns=Object(i.getBlockTransforms)("from").filter(function(e){return"enter"===e.type}),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(o),n.lastHistoryValue=o,n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){e?this.editableRef=e:delete this.editableRef}},{key:"setFocusedElement",value:function(){this.props.setFocusedElement&&this.props.setFocusedElement(this.props.instanceId)}},{key:"getRecord",value:function(){var e=this.formatToValue(this.props.value),t=e.formats,n=e.replacements,o=e.text,r=this.state;return{formats:t,replacements:n,text:o,start:r.start,end:r.end,activeFormats:r.activeFormats}}},{key:"createRecord",value:function(){var e=ui(),t=e.rangeCount>0?e.getRangeAt(0):null;return Object(c.create)({element:this.editableRef,range:t,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:this.props.prepareEditableTree,__unstableIsEditableTree:!0})}},{key:"applyRecord",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).domOnly;Object(c.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:this.props.prepareEditableTree,__unstableDomOnly:t})}},{key:"isEmpty",value:function(){return Object(c.isEmpty)(this.formatToValue(this.props.value))}},{key:"onPaste",value:function(e){var t=e.clipboardData,n=t.items,o=t.files;n=Object(f.isNil)(n)?[]:n,o=Object(f.isNil)(o)?[]:o;var r="",a="";try{r=t.getData("text/plain"),a=t.getData("text/html")}catch(e){try{a=t.getData("Text")}catch(e){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",a),window.console.log("Received plain text:\n\n",r);var l=Object(f.find)([].concat(Object(d.a)(n),Object(d.a)(o)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)});if(l&&!a){var s=l.getAsFile?l.getAsFile():l,u=Object(i.pasteHandler)({HTML:''),mode:"BLOCKS",tagName:this.props.tagName}),b=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",s),void(b?this.props.onReplace(u):this.onSplit&&this.splitContent(u))}var p=this.getRecord();if(!Object(c.isCollapsed)(p)){var h=(a||r).replace(/<[^>]+>/g,"").trim();if(Object(Vo.isURL)(h))return this.onChange(Object(c.applyFormat)(p,{type:"a",attributes:{href:Object(hr.decodeEntities)(h)}})),void window.console.log("Created link:\n\n",h)}var v=this.props.onReplace&&this.isEmpty(),m="INLINE";v?m="BLOCKS":this.onSplit&&(m="AUTO");var g=Object(i.pasteHandler)({HTML:a,plainText:r,mode:m,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof g){var O=Object(c.create)({html:g});this.onChange(Object(c.insert)(p,O))}else if(this.onSplit){if(!g.length)return;v?this.props.onReplace(g):this.splitContent(g,{paste:!0})}}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),this.recalculateBoundaryStyle(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(e&&e.nativeEvent.isComposing)document.removeEventListener("selectionchange",this.onSelectionChange);else{if(e&&e.nativeEvent.inputType){var t=e.nativeEvent.inputType;if(0===t.indexOf("format")||bi.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),o=this.state,r=o.activeFormats,i=void 0===r?[]:r,a=o.start,l=Object(c.__unstableUpdateFormats)({value:n,start:a,end:n.start,formats:i});this.onChange(l,{withoutHistory:!0});var u=this.patterns.reduce(function(e,t){return t(e)},l);u!==l&&(this.onCreateUndoLevel(),this.onChange(Object(s.a)({},u,{activeFormats:i}))),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onInput(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end;if(t!==this.state.start||n!==this.state.end){var o=this.props.isCaretWithinFormattedText,r=Object(c.__unstableGetActiveFormats)(e);!o&&r.length?this.props.onEnterFormattedText():o&&!r.length&&this.props.onExitFormattedText(),this.setState({start:t,end:n,activeFormats:r}),this.applyRecord(Object(s.a)({},e,{activeFormats:r}),{domOnly:!0}),r.length>0&&this.recalculateBoundaryStyle()}}},{key:"recalculateBoundaryStyle",value:function(){var e=this.editableRef.querySelector("*[data-rich-text-format-boundary]");if(e){var t=di(e).color.replace(")",", 0.2)").replace("rgb","rgba");fi.innerHTML="*:focus ".concat("*[data-rich-text-format-boundary]","{background-color: ").concat(t,"}")}}},{key:"onChangeEditableValue",value:function(e){var t=e.formats,n=e.text;Object(f.get)(this.props,["onChangeEditableValue"],[]).forEach(function(e){e(t,n)})}},{key:"onChange",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).withoutHistory;this.applyRecord(e);var n=e.start,o=e.end,r=e.activeFormats,i=void 0===r?[]:r;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:n,end:o,activeFormats:i}),t||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.savedContent&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.savedContent)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,o=t.onRemove;if(n||o){var r=e.keyCode===Ln.BACKSPACE;if(Object(c.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(ro.isHorizontalEdge)(this.editableRef,r))&&(n&&n(!r),o&&i&&r&&o(!r),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=e.shiftKey,o=e.altKey,r=e.metaKey,a=e.ctrlKey;if(n||o||r||a||t!==Ln.LEFT&&t!==Ln.RIGHT||this.handleHorizontalNavigation(e),t===Ln.SPACE&&"li"===this.multilineTag){var l=this.createRecord();if(Object(c.isCollapsed)(l)){var u=l.text[l.start-1];u&&u!==c.LINE_SEPARATOR||(this.onChange(Object(c.indentListItems)(l,{type:this.props.tagName})),e.preventDefault())}}if(t===Ln.DELETE||t===Ln.BACKSPACE){var b=this.createRecord(),f=b.replacements,p=b.text,h=b.start,v=b.end;if(0===h&&0!==v&&v===b.text.length)return this.onChange(Object(c.remove)(b)),void e.preventDefault();if(this.multilineTag){var m;if(t===Ln.BACKSPACE){var g=h-1;if(p[g]===c.LINE_SEPARATOR){var O=Object(c.isCollapsed)(b);if(O&&f[g]&&f[g].length){var k=f.slice();k[g]=f[g].slice(0,-1),m=Object(s.a)({},b,{replacements:k})}else m=Object(c.remove)(b,O?h-1:h,v)}}else if(p[v]===c.LINE_SEPARATOR){var j=Object(c.isCollapsed)(b);if(j&&f[v]&&f[v].length){var y=f.slice();y[v]=f[v].slice(0,-1),m=Object(s.a)({},b,{replacements:y})}else m=Object(c.remove)(b,h,j?v+1:v)}m&&(this.onChange(m),e.preventDefault())}this.onDeleteKeyDown(e)}else if(t===Ln.ENTER){e.preventDefault();var _=this.createRecord();if(this.props.onReplace){var S=Object(c.getTextContent)(_),C=Object(i.findTransform)(this.enterPatterns,function(e){return e.regExp.test(S)});if(C)return void this.props.onReplace([C.transform({content:S})])}this.multilineTag?e.shiftKey?this.onChange(Object(c.insertLineBreak)(_)):this.onSplit&&Object(c.isEmptyLine)(_)?this.onSplit.apply(this,Object(d.a)(Object(c.split)(_).map(this.valueToFormat))):this.onChange(Object(c.insertLineSeparator)(_)):e.shiftKey||!this.onSplit?this.onChange(Object(c.insertLineBreak)(_)):this.splitContent()}}},{key:"handleHorizontalNavigation",value:function(e){var t=this,n=this.createRecord(),o=n.formats,r=n.text,i=n.start,a=n.end,l=this.state.activeFormats,u=void 0===l?[]:l,d=Object(c.isCollapsed)(n),b=e.keyCode===Ln.LEFT;if(d&&0===u.length){if(0===i&&b)return;if(a===r.length&&!b)return}if(d){e.preventDefault();var f=o[i-1]||[],p=o[i]||[],h=u.length,v=p;if(f.length>p.length&&(v=f),f.lengthf.length&&h--):f.length>p.length&&(!b&&u.length>p.length&&h--,b&&u.length0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.onSplit){var n=this.createRecord(),o=Object(c.split)(n),r=Object(B.a)(o,2),i=r[0],a=r[1];Object(c.isEmpty)(a)?i=n:Object(c.isEmpty)(i)&&(a=n),t.paste&&(i=Object(c.isEmpty)(i)?null:i,a=Object(c.isEmpty)(a)?null:a),i&&(i=this.valueToFormat(i)),a&&(a=this.valueToFormat(a)),this.onSplit.apply(this,[i,a].concat(Object(d.a)(e)))}}},{key:"onPointerDown",value:function(e){var t=e.target;if(t!==this.editableRef&&!t.textContent){var n=t.parentNode,o=Array.from(n.childNodes).indexOf(t),r=t.ownerDocument.createRange(),i=ui();r.setStart(t.parentNode,o),r.setEnd(t.parentNode,o+1),i.removeAllRanges(),i.addRange(r)}}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,o=n.tagName,r=n.value,i=n.isSelected;if(o===e.tagName&&r!==e.value&&r!==this.savedContent){if(Array.isArray(r)&&Object(f.isEqual)(r,this.savedContent))return;var a=this.formatToValue(r);if(i){var l=this.formatToValue(e.value),s=Object(c.getTextContent)(l).length;a.start=s,a.end=s}this.applyRecord(a),this.savedContent=r}if(Object.keys(this.props).some(function(n){return 0===n.indexOf("format_")&&(Object(f.isPlainObject)(t.props[n])?Object.keys(t.props[n]).some(function(o){return t.props[n][o]!==e[n][o]}):t.props[n]!==e[n])})){var u=this.formatToValue(r);i&&(u.start=this.state.start,u.end=this.state.end),this.applyRecord(u)}}},{key:"getFormatProps",value:function(){return Object(f.pickBy)(this.props,function(e,t){return t.startsWith("format_")})}},{key:"formatToValue",value:function(e){return Array.isArray(e)?Object(c.create)({html:i.children.toHTML(e),multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):"string"===this.props.format?Object(c.create)({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):null===e?Object(c.create)():e}},{key:"valueToEditableHTML",value:function(e){return Object(c.unstableToDom)({value:e,multilineTag:this.multilineTag,prepareEditableTree:this.props.prepareEditableTree}).body.innerHTML}},{key:"removeEditorOnlyFormats",value:function(e){return this.props.formatTypes.forEach(function(t){t.__experimentalCreatePrepareEditableTree&&(e=Object(c.removeFormat)(e,t.name,0,e.text.length))}),e}},{key:"valueToFormat",value:function(e){return e=this.removeEditorOnlyFormats(e),this.usedDeprecatedChildrenSource?i.children.fromDOM(Object(c.unstableToDom)({value:e,multilineTag:this.multilineTag,isEditableTree:!1}).body.childNodes):"string"===this.props.format?Object(c.toHTMLString)({value:e,multilineTag:this.multilineTag}):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,o=void 0===n?"div":n,r=t.style,i=t.wrapperClassName,c=t.className,a=t.inlineToolbar,l=void 0!==a&&a,s=t.formattingControls,u=t.placeholder,d=t.keepPlaceholderOnFocus,b=void 0!==d&&d,f=t.isSelected,p=t.autocompleters,h=t.onTagNameChange,v=o,m=this.multilineTag,g=Wr(this.props),O=u&&(!f||b)&&this.isEmpty(),k=Xt()(i,"editor-rich-text block-editor-rich-text"),j=this.getRecord();return Object(Yt.createElement)("div",{className:k,onFocus:this.setFocusedElement},f&&"li"===this.multilineTag&&Object(Yt.createElement)(oi,{onTagNameChange:h,tagName:o,value:j,onChange:this.onChange}),f&&!l&&Object(Yt.createElement)(xn,null,Object(Yt.createElement)(Kr,{controls:s})),f&&l&&Object(Yt.createElement)(cn.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar block-editor-rich-text__inline-toolbar"},Object(Yt.createElement)(Kr,{controls:s})),Object(Yt.createElement)(fn,{onReplace:this.props.onReplace,completers:p,record:j,onChange:this.onChange},function(t){var n=t.listBoxId,i=t.activeId;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)($r,Object(qt.a)({tagName:o,style:r,record:j,valueToEditableHTML:e.valueToEditableHTML,isPlaceholderVisible:O,"aria-label":u,"aria-autocomplete":"list","aria-owns":n,"aria-activedescendant":i},g,{className:c,key:v,onPaste:e.onPaste,onInput:e.onInput,onCompositionEnd:e.onCompositionEnd,onKeyDown:e.onKeyDown,onFocus:e.onFocus,onBlur:e.onBlur,onMouseDown:e.onPointerDown,onTouchStart:e.onPointerDown,setRef:e.setRef})),O&&Object(Yt.createElement)(o,{className:Xt()("editor-rich-text__editable block-editor-rich-text__editable",c),style:r},m?Object(Yt.createElement)(m,null,u):u),f&&Object(Yt.createElement)(zr,{value:j,onChange:e.onChange}))}),f&&Object(Yt.createElement)(ci,null))}}]),t}(Yt.Component);pi.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var hi=Object(Jt.compose)([Jt.withInstanceId,un(function(e,t){return!1===t.isSelected?{clientId:e.clientId}:!0===t.isSelected?{isSelected:e.isSelected,clientId:e.clientId}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement,clientId:e.clientId}}),Object(l.withSelect)(function(e){var t=e("core/editor").canUserUseUnfilteredHTML,n=e("core/block-editor").isCaretWithinFormattedText,o=e("core/rich-text").getFormatTypes;return{canUserUseUnfilteredHTML:t(),isCaretWithinFormattedText:n(),formatTypes:o()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onCreateUndoLevel:t.__unstableMarkLastChangeAsPersistent,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}}),Jt.withSafeTimeout,Object(cn.withFilters)("experimentalRichText")])(pi);hi.Content=function(e){var t,n=e.value,o=e.tagName,r=e.multiline,c=Object(u.a)(e,["value","tagName","multiline"]),a=n;!0!==r&&"p"!==r&&"li"!==r||(t=!0===r?"p":r),Array.isArray(n)&&(a=i.children.toHTML(n)),!a&&t&&(a="<".concat(t,">"));var l=Object(Yt.createElement)(Yt.RawHTML,null,a);return o?Object(Yt.createElement)(o,Object(f.omit)(c,["format"]),l):l},hi.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},hi.Content.defaultProps={format:"string",value:""};var vi=hi,mi=Object(cn.withFilters)("editor.MediaUpload")(function(){return null}),gi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(rn.a)(Object(rn.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.renderSettings,o=e.position,r=void 0===o?"bottom center":o,i=e.focusOnMount,c=void 0===i?"firstElement":i,a=Object(u.a)(e,["children","renderSettings","position","focusOnMount"]),l=this.state.isSettingsExpanded,s=!!n&&l;return Object(Yt.createElement)(cn.Popover,Object(qt.a)({className:"editor-url-popover block-editor-url-popover",focusOnMount:c,position:r},a),Object(Yt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row"},t,!!n&&Object(Yt.createElement)(cn.IconButton,{className:"editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle",icon:"arrow-down-alt2",label:Object(p.__)("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":l})),s&&Object(Yt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row editor-url-popover__settings block-editor-url-popover__settings"},n()))}}]),t}(Yt.Component),Oi=function(e){var t=e.src,n=e.onChange,o=e.onSubmit,r=e.onClose;return Object(Yt.createElement)(gi,{onClose:r},Object(Yt.createElement)("form",{className:"editor-media-placeholder__url-input-form block-editor-media-placeholder__url-input-form",onSubmit:o},Object(Yt.createElement)("input",{className:"editor-media-placeholder__url-input-field block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(p.__)("URL"),placeholder:Object(p.__)("Paste or type URL"),onChange:n,value:t}),Object(Yt.createElement)(cn.IconButton,{className:"editor-media-placeholder__url-input-submit-button block-editor-media-placeholder__url-input-submit-button",icon:"editor-break",label:Object(p.__)("Apply"),type:"submit"})))},ki=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(rn.a)(Object(rn.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(rn.a)(Object(rn.a)(e))),e.onUpload=e.onUpload.bind(Object(rn.a)(Object(rn.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(rn.a)(Object(rn.a)(e))),e.openURLInput=e.openURLInput.bind(Object(rn.a)(Object(rn.a)(e))),e.closeURLInput=e.closeURLInput.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(f.every)(e,function(e){return"image"===e||Object(f.startsWith)(e,"image/")})}},{key:"componentDidMount",value:function(){this.setState({src:Object(f.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(f.get)(e.value,["src"],"")!==Object(f.get)(this.props.value,["src"],"")&&this.setState({src:Object(f.get)(this.props.value,["src"],"")})}},{key:"onChangeSrc",value:function(e){this.setState({src:e.target.value})}},{key:"onSubmitSrc",value:function(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t=this.props,n=t.onSelect,o=t.multiple,r=t.onError,i=t.allowedTypes;(0,t.mediaUpload)({allowedTypes:i,filesList:e,onFileChange:o?n:function(e){var t=Object(B.a)(e,1)[0];return n(t)},onError:r})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.icon,o=e.className,r=e.labels,i=void 0===r?{}:r,c=e.onSelect,a=e.value,l=void 0===a?{}:a,s=e.onSelectURL,u=e.onHTMLDrop,d=void 0===u?f.noop:u,b=e.multiple,h=void 0!==b&&b,v=e.notices,m=e.allowedTypes,g=void 0===m?[]:m,O=e.hasUploadPermissions,k=e.mediaUpload,j=this.state,y=j.isURLInputVisible,_=j.src,S=i.instructions||"",C=i.title||"";if(O||s||(S=Object(p.__)("To edit this block, you need permission to upload media.")),!S||!C){var E=1===g.length,w=E&&"audio"===g[0],I=E&&"image"===g[0],T=E&&"video"===g[0];S||(O?(S=Object(p.__)("Drag a media file, upload a new one or select a file from your library."),w?S=Object(p.__)("Drag an audio, upload a new one or select a file from your library."):I?S=Object(p.__)("Drag an image, upload a new one or select a file from your library."):T&&(S=Object(p.__)("Drag a video, upload a new one or select a file from your library."))):!O&&s&&(S=Object(p.__)("Given your current role, you can only link a media file, you cannot upload."),w?S=Object(p.__)("Given your current role, you can only link an audio, you cannot upload."):I?S=Object(p.__)("Given your current role, you can only link an image, you cannot upload."):T&&(S=Object(p.__)("Given your current role, you can only link a video, you cannot upload.")))),C||(C=Object(p.__)("Media"),w?C=Object(p.__)("Audio"):I?C=Object(p.__)("Image"):T&&(C=Object(p.__)("Video")))}return Object(Yt.createElement)(cn.Placeholder,{icon:n,label:C,instructions:S,className:Xt()("editor-media-placeholder block-editor-media-placeholder",o),notices:v},Object(Yt.createElement)(po,null,!!k&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:d}),Object(Yt.createElement)(cn.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onChange:this.onUpload,accept:t,multiple:h},Object(p.__)("Upload"))),Object(Yt.createElement)(mi,{gallery:h&&this.onlyAllowsImages(),multiple:h,onSelect:c,allowedTypes:g,value:l.id,render:function(e){var t=e.open;return Object(Yt.createElement)(cn.Button,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:t},Object(p.__)("Media Library"))}})),s&&Object(Yt.createElement)("div",{className:"editor-media-placeholder__url-input-container block-editor-media-placeholder__url-input-container"},Object(Yt.createElement)(cn.Button,{className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:this.openURLInput,isToggled:y,isLarge:!0},Object(p.__)("Insert from URL")),y&&Object(Yt.createElement)(Oi,{src:_,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput})))}}]),t}(Yt.Component),ji=Object(l.withSelect)(function(e){var t=e("core").canUser,n=e("core/block-editor").getSettings;return{hasUploadPermissions:Object(f.defaultTo)(t("create","media"),!0),mediaUpload:n().__experimentalMediaUpload}}),yi=Object(Jt.compose)(ji,Object(cn.withFilters)("editor.MediaPlaceholder"))(ki),_i=n(33),Si=n.n(_i),Ci=function(e){return e.stopPropagation()},Ei=function(e){function t(e){var n,o=e.autocompleteRef;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.autocompleteRef=o||Object(Yt.createRef)(),n.inputRef=Object(Yt.createRef)(),n.updateSuggestions=Object(f.throttle)(n.updateSuggestions.bind(Object(rn.a)(Object(rn.a)(n))),200),n.suggestionNodes=[],n.state={posts:[],showSuggestions:!1,selectedSuggestion:null},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,o=t.selectedSuggestion;n&&null!==o&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Uo()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),setTimeout(function(){e.scrollingIntoView=!1},100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"updateSuggestions",value:function(e){var t=this;if(e.length<2||/^https?:/.test(e))this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});else{this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0});var n=Si()({path:Object(Vo.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,type:"post"})});n.then(function(e){t.suggestionsRequest===n&&(t.setState({posts:e,loading:!1}),e.length?t.props.debouncedSpeak(Object(p.sprintf)(Object(p._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):t.props.debouncedSpeak(Object(p.__)("No results."),"assertive"))}).catch(function(){t.suggestionsRequest===n&&t.setState({loading:!1})}),this.suggestionsRequest=n}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.updateSuggestions(t)}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,o=t.selectedSuggestion,r=t.posts,i=t.loading;if(n&&r.length&&!i){var c=this.state.posts[this.state.selectedSuggestion];switch(e.keyCode){case Ln.UP:e.stopPropagation(),e.preventDefault();var a=o?o-1:r.length-1;this.setState({selectedSuggestion:a});break;case Ln.DOWN:e.stopPropagation(),e.preventDefault();var l=null===o||o===r.length-1?0:o+1;this.setState({selectedSuggestion:l});break;case Ln.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(p.__)("Link selected.")));break;case Ln.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}else switch(e.keyCode){case Ln.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ln.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,o=void 0===n?"":n,r=t.autoFocus,i=void 0===r||r,c=t.instanceId,a=t.className,l=this.state,s=l.showSuggestions,u=l.posts,d=l.selectedSuggestion,b=l.loading;return Object(Yt.createElement)("div",{className:Xt()("editor-url-input block-editor-url-input",a)},Object(Yt.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(p.__)("URL"),required:!0,value:o,onChange:this.onChange,onInput:Ci,placeholder:Object(p.__)("Paste URL or type to search"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":s,"aria-autocomplete":"list","aria-owns":"block-editor-url-input-suggestions-".concat(c),"aria-activedescendant":null!==d?"block-editor-url-input-suggestion-".concat(c,"-").concat(d):void 0,ref:this.inputRef}),b&&Object(Yt.createElement)(cn.Spinner,null),s&&!!u.length&&Object(Yt.createElement)(cn.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(Yt.createElement)("div",{className:"editor-url-input__suggestions block-editor-url-input__suggestions",id:"editor-url-input-suggestions-".concat(c),ref:this.autocompleteRef,role:"listbox"},u.map(function(t,n){return Object(Yt.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"block-editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:Xt()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===d}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===d},Object(hr.decodeEntities)(t.title)||Object(p.__)("(no title)"))}))))}}]),t}(Yt.Component),wi=Object(cn.withSpokenMessages)(Object(Jt.withInstanceId)(Ei)),Ii=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(rn.a)(Object(rn.a)(e))),e.submitLink=e.submitLink.bind(Object(rn.a)(Object(rn.a)(e))),e.state={expanded:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,o=this.state.expanded,r=t?Object(p.__)("Edit Link"):Object(p.__)("Insert Link");return Object(Yt.createElement)("div",{className:"editor-url-input__button block-editor-url-input__button"},Object(Yt.createElement)(cn.IconButton,{icon:"admin-links",label:r,onClick:this.toggle,className:Xt()("components-toolbar__control",{"is-active":t})}),o&&Object(Yt.createElement)("form",{className:"editor-url-input__button-modal block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(Yt.createElement)("div",{className:"editor-url-input__button-modal-line block-editor-url-input__button-modal-line"},Object(Yt.createElement)(cn.IconButton,{className:"editor-url-input__back block-editor-url-input__back",icon:"arrow-left-alt",label:Object(p.__)("Close"),onClick:this.toggle}),Object(Yt.createElement)(wi,{value:t||"",onChange:n}),Object(Yt.createElement)(cn.IconButton,{icon:"editor-break",label:Object(p.__)("Submit"),type:"submit"}))))}}]),t}(Yt.Component);var Ti=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=e("core/block-editor"),o=n.getBlocksByClientId,r=n.getTemplateLock,c=n.getBlockRootClientId,a=o(t.clientIds),l=Object(f.every)(a,function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)}),s=c(t.clientIds[0]);return{isLocked:!!r(s),blocks:a,canDuplicate:l,rootClientId:s,extraProps:t}}),Object(l.withDispatch)(function(e,t,n){var o=n.select,r=t.clientIds,c=t.rootClientId,a=t.blocks,l=t.isLocked,s=t.canDuplicate,u=e("core/block-editor"),d=u.insertBlocks,b=u.multiSelect,p=u.removeBlocks,h=u.insertDefaultBlock;return{onDuplicate:function(){if(!l&&s){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c),t=a.map(function(e){return Object(i.cloneBlock)(e)});d(t,e+1,c),t.length>1&&b(Object(f.first)(t).clientId,Object(f.last)(t).clientId)}},onRemove:function(){l||p(r)},onInsertBefore:function(){if(!l){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.first)(Object(f.castArray)(r)),c);h({},c,e)}},onInsertAfter:function(){if(!l){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c);h({},c,e+1)}}}})])(function(e){var t=e.onDuplicate,n=e.onRemove,o=e.onInsertBefore,r=e.onInsertAfter,i=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:r,onInsertBefore:o,isLocked:i,canDuplicate:c})}),Bi=function(e){return e.preventDefault(),e},xi={duplicate:{raw:Ln.rawShortcut.primaryShift("d"),display:Ln.displayShortcut.primaryShift("d")},removeBlock:{raw:Ln.rawShortcut.access("z"),display:Ln.displayShortcut.access("z")},insertBefore:{raw:Ln.rawShortcut.primaryAlt("t"),display:Ln.displayShortcut.primaryAlt("t")},insertAfter:{raw:Ln.rawShortcut.primaryAlt("y"),display:Ln.displayShortcut.primaryAlt("y")}},Li=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(rn.a)(Object(rn.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(rn.a)(Object(rn.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,o=t.onMultiSelect;e.preventDefault(),o(Object(f.first)(n),Object(f.last)(n))}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,o=t.hasMultiSelection,r=t.onRemove,i=t.isLocked;o&&(e.preventDefault(),i||r(n))}},{key:"clearMultiSelection",value:function(){var e=this.props,t=e.hasMultiSelection,n=e.clearSelectedBlock;t&&(n(),window.getSelection().removeAllRanges())}},{key:"render",value:function(){var e,t=this.props.selectedBlockClientIds;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,Ln.rawShortcut.primary("a"),this.selectAll),Object(b.a)(e,"backspace",this.deleteSelectedBlocks),Object(b.a)(e,"del",this.deleteSelectedBlocks),Object(b.a)(e,"escape",this.clearMultiSelection),e)}),t.length>0&&Object(Yt.createElement)(Ti,{clientIds:t},function(e){var t,n=e.onDuplicate,o=e.onRemove,r=e.onInsertAfter,i=e.onInsertBefore;return Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(b.a)(t,xi.duplicate.raw,Object(f.flow)(Bi,n)),Object(b.a)(t,xi.removeBlock.raw,Object(f.flow)(Bi,o)),Object(b.a)(t,xi.insertBefore.raw,Object(f.flow)(Bi,i)),Object(b.a)(t,xi.insertAfter.raw,Object(f.flow)(Bi,r)),t)})}))}}]),t}(Yt.Component),Ni=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getBlockOrder,o=t.getMultiSelectedBlockClientIds,r=t.hasMultiSelection,i=t.getBlockRootClientId,c=t.getTemplateLock,a=(0,t.getSelectedBlockClientId)(),l=a?[a]:o();return{rootBlocksClientIds:n(),hasMultiSelection:r(),isLocked:Object(f.some)(l,function(e){return!!c(i(e))}),selectedBlockClientIds:l}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{clearSelectedBlock:t.clearSelectedBlock,onMultiSelect:t.multiSelect,onRemove:t.removeBlocks}})])(Li),Mi=Object(l.withSelect)(function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(Yt.createElement)(cn.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block block-editor-skip-to-selected-block",onClick:function(){ur(t).closest(".block-editor-block-list__block").focus()}},Object(p.__)("Skip to the selected block"))}),Ri=n(135),Ai=n.n(Ri);function Di(e,t,n){var o=new Ai.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}var Pi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,c=o(n),a=Object(i.getBlockType)(c.name);return{name:c.name,attributes:c.attributes,className:c.attributes.className||"",styles:r(c.name),type:a}}),Object(l.withDispatch)(function(e,t){var n=t.clientId;return{onChangeClassName:function(t){e("core/block-editor").updateBlockAttributes(n,{className:t})}}})])(function(e){var t=e.styles,n=e.className,o=e.onChangeClassName,r=e.name,i=e.attributes,c=e.type,a=e.onSwitch,l=void 0===a?f.noop:a,u=e.onHoverClassName,b=void 0===u?f.noop:u;if(!t||0===t.length)return null;c.styles||Object(f.find)(t,"isDefault")||(t=[{name:"default",label:Object(p._x)("Default","block style"),isDefault:!0}].concat(Object(d.a)(t)));var h=function(e,t){var n=!0,o=!1,r=void 0;try{for(var i,c=new Ai.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;if(-1!==a.indexOf("is-style-")){var l=a.substring(9),s=Object(f.find)(e,{name:l});if(s)return s}}}catch(e){o=!0,r=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw r}}return Object(f.find)(e,"isDefault")}(t,n);function v(e){var t=Di(n,h,e);o(t),b(null),l()}return Object(Yt.createElement)("div",{className:"editor-block-styles block-editor-block-styles"},t.map(function(e){var t=Di(n,h,e);return Object(Yt.createElement)("div",{key:e.name,className:Xt()("editor-block-styles__item block-editor-block-styles__item",{"is-active":h===e}),onClick:function(){return v(e)},onKeyDown:function(t){Ln.ENTER!==t.keyCode&&Ln.SPACE!==t.keyCode||(t.preventDefault(),v(e))},onMouseEnter:function(){return b(t)},onMouseLeave:function(){return b(null)},role:"button",tabIndex:"0","aria-label":e.label||e.name},Object(Yt.createElement)("div",{className:"editor-block-styles__item-preview block-editor-block-styles__item-preview"},Object(Yt.createElement)(zo,{name:r,attributes:Object(s.a)({},i,{className:t})})),Object(Yt.createElement)("div",{className:"editor-block-styles__item-label block-editor-block-styles__item-label"},e.label||e.name))}))}),Fi=n(98);var Hi=Object(l.withSelect)(function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}})(function(e){var t=e.blocks,n=Object(Fi.count)(Object(i.serialize)(t),"words");return Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card block-editor-multi-selection-inspector__card"},Object(Yt.createElement)(Nn,{icon:Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),showColors:!0}),Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-content block-editor-multi-selection-inspector__card-content"},Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-title block-editor-multi-selection-inspector__card-title"},Object(p.sprintf)(Object(p._n)("%d block","%d blocks",t.length),t.length)),Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-description block-editor-multi-selection-inspector__card-description"},Object(p.sprintf)(Object(p._n)("%d word","%d words",n),n))))}),Ui=Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getSelectedBlockCount,r=t.getBlockName,c=e("core/blocks").getBlockStyles,a=n(),l=a&&r(a),s=a&&Object(i.getBlockType)(l),u=a&&c(l);return{count:o(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}})(function(e){var t=e.selectedBlockClientId,n=e.selectedBlockName,o=e.blockType,r=e.count,c=e.hasBlockStyles;if(r>1)return Object(Yt.createElement)(Hi,null);var a=n===Object(i.getUnregisteredTypeHandlerName)();return o&&t&&!a?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)("div",{className:"editor-block-inspector__card block-editor-block-inspector__card"},Object(Yt.createElement)(Nn,{icon:o.icon,showColors:!0}),Object(Yt.createElement)("div",{className:"editor-block-inspector__card-content block-editor-block-inspector__card-content"},Object(Yt.createElement)("div",{className:"editor-block-inspector__card-title block-editor-block-inspector__card-title"},o.title),Object(Yt.createElement)("div",{className:"editor-block-inspector__card-description block-editor-block-inspector__card-description"},o.description))),c&&Object(Yt.createElement)("div",null,Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Styles"),initialOpen:!1},Object(Yt.createElement)(Pi,{clientId:t}))),Object(Yt.createElement)("div",null,Object(Yt.createElement)(xr.Slot,null)),Object(Yt.createElement)("div",null,Object(Yt.createElement)(Er.Slot,null,function(e){return!Object(f.isEmpty)(e)&&Object(Yt.createElement)(cn.PanelBody,{className:"editor-block-inspector__advanced block-editor-block-inspector__advanced",title:Object(p.__)("Advanced"),initialOpen:!1},e)})),Object(Yt.createElement)(Mi,{key:"back"})):Object(Yt.createElement)("span",{className:"editor-block-inspector__no-blocks block-editor-block-inspector__no-blocks"},Object(p.__)("No block selected."))}),Vi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(rn.a)(Object(rn.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,o=t.hasMultiSelection,r=t.clearSelectedBlock,i=n||o;e.target===this.container&&i&&r()}},{key:"render",value:function(){return Object(Yt.createElement)("div",Object(qt.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(f.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Yt.Component),zi=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,o=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:o()}}),Object(l.withDispatch)(function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}})])(Vi);var Ki=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockMode,a=r(n);return{mode:c(n),blockType:a?Object(i.getBlockType)(a.name):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,o=void 0===n?f.noop:n,r=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(r),o()}}})])(function(e){var t=e.blockType,n=e.mode,o=e.onToggleMode,r=e.small,c=void 0!==r&&r;if(!Object(i.hasBlockSupport)(t,"html",!0))return null;var a="visual"===n?Object(p.__)("Edit as HTML"):Object(p.__)("Edit visually");return Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"html"},!c&&a)});var Wi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,c=o.canInsertBlockType,a=e("core/editor").__experimentalGetReusableBlock,l=e("core").canUser,s=r(n),u=1===s.length&&s[0]&&Object(i.isReusableBlock)(s[0])&&!!a(s[0].attributes.ref);return{isReusable:u,isVisible:u||c("core/block")&&Object(f.every)(s,function(e){return!!e&&e.isValid&&Object(i.hasBlockSupport)(e.name,"reusable",!0)})&&!!l("create","blocks")}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,o=t.onToggle,r=void 0===o?f.noop:o,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),r())},onConvertToReusable:function(){c(n),r()}}})])(function(e){var t=e.isVisible,n=e.isReusable,o=e.onConvertToStatic,r=e.onConvertToReusable;return t?Object(Yt.createElement)(Yt.Fragment,null,!n&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(p.__)("Add to Reusable Blocks")),n&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(p.__)("Convert to Regular Block"))):null});var Gi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core").canUser,c=e("core/editor").__experimentalGetReusableBlock,a=o(n),l=a&&Object(i.isReusableBlock)(a)?c(a.attributes.ref):null;return{isVisible:!!l&&!!r("delete","blocks",l.id),isDisabled:l&&l.isTemporary}}),Object(l.withDispatch)(function(e,t,n){var o=t.clientId,r=t.onToggle,i=void 0===r?f.noop:r,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,l=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(p.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))){var e=l(o);a(e.attributes.ref),i()}}}})])(function(e){var t=e.isVisible,n=e.isDisabled,o=e.onDelete;return t?Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return o()}},Object(p.__)("Remove from Reusable Blocks")):null});function qi(e){var t=e.shouldRender,n=e.onClick,o=e.small;if(!t)return null;var r=Object(p.__)("Convert to Blocks");return Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:n,icon:"screenoptions"},!o&&r)}var Yi=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.getBlockContent)(n)}))}}}))(qi),$i=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock(n);return{block:o,shouldRender:o&&o.name===Object(i.getFreeformContentHandlerName)()}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.serialize)(n)}))}}}))(qi),Xi=Object(cn.createSlotFill)("_BlockSettingsMenuFirstItem"),Ji=Xi.Fill,Zi=Xi.Slot;Ji.Slot=Zi;var Qi=Ji,ec=Object(cn.createSlotFill)("_BlockSettingsMenuPluginsExtension"),tc=ec.Fill,nc=ec.Slot;tc.Slot=nc;var oc=tc;var rc=Object(l.withDispatch)(function(e){var t=e("core/block-editor").selectBlock;return{onSelect:function(e){t(e)}}})(function(e){var t=e.clientIds,n=e.onSelect,o=Object(f.castArray)(t),r=o.length,i=o[0];return Object(Yt.createElement)(Ti,{clientIds:t},function(e){var o=e.onDuplicate,c=e.onRemove,a=e.onInsertAfter,l=e.onInsertBefore,s=e.canDuplicate,u=e.isLocked;return Object(Yt.createElement)(cn.Dropdown,{contentClassName:"editor-block-settings-menu__popover block-editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,o=e.isOpen,c=Xt()("editor-block-settings-menu__toggle block-editor-block-settings-menu__toggle",{"is-opened":o}),a=o?Object(p.__)("Hide options"):Object(p.__)("More options");return Object(Yt.createElement)(cn.Toolbar,{controls:[{icon:"ellipsis",title:a,onClick:function(){1===r&&n(i),t()},className:c,extraProps:{"aria-expanded":o}}]})},renderContent:function(e){var n=e.onClose;return Object(Yt.createElement)(cn.NavigableMenu,{className:"editor-block-settings-menu__content block-editor-block-settings-menu__content"},Object(Yt.createElement)(Qi.Slot,{fillProps:{onClose:n}}),1===r&&Object(Yt.createElement)($i,{clientId:i}),1===r&&Object(Yt.createElement)(Yi,{clientId:i}),!u&&s&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"admin-page",shortcut:xi.duplicate.display},Object(p.__)("Duplicate")),!u&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:l,icon:"insert-before",shortcut:xi.insertBefore.display},Object(p.__)("Insert Before")),Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:xi.insertAfter.display},Object(p.__)("Insert After"))),1===r&&Object(Yt.createElement)(Ki,{clientId:i,onToggle:n}),Object(Yt.createElement)(Wi,{clientIds:t,onToggle:n}),Object(Yt.createElement)(oc.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Yt.createElement)("div",{className:"editor-block-settings-menu__separator block-editor-block-settings-menu__separator"}),1===r&&Object(Yt.createElement)(Gi,{clientId:i,onToggle:n}),!u&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:xi.removeBlock.display},Object(p.__)("Remove Block")))}})})}),ic=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,o=t.onTransform,r=t.inserterItems,c=t.hasBlockStyles,a=this.state.hoveredClassName;if(!n||!n.length)return null;var l,u=Object(f.mapKeys)(r,function(e){return e.name}),d=Object(f.orderBy)(Object(f.filter)(Object(i.getPossibleBlockTransformations)(n),function(e){return e&&!!u[e.name]}),function(e){return u[e.name].frecency},"desc");if(1===Object(f.uniq)(Object(f.map)(n,"name")).length){var b=n[0].name,h=Object(i.getBlockType)(b);l=h.icon}else l="layout";return c||d.length?Object(Yt.createElement)(cn.Dropdown,{position:"bottom right",className:"editor-block-switcher block-editor-block-switcher",contentClassName:"editor-block-switcher__popover block-editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,o=e.isOpen,r=1===n.length?Object(p.__)("Change block type or style"):Object(p.sprintf)(Object(p._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(Yt.createElement)(cn.Toolbar,null,Object(Yt.createElement)(cn.IconButton,{className:"editor-block-switcher__toggle block-editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":o,label:r,tooltip:r,onKeyDown:function(e){o||e.keyCode!==Ln.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(Nn,{icon:l,showColors:!0}),Object(Yt.createElement)(cn.SVG,{className:"editor-block-switcher__transform block-editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z"})))}))},renderContent:function(t){var r=t.onClose;return Object(Yt.createElement)(Yt.Fragment,null,c&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Block Styles"),initialOpen:!0},Object(Yt.createElement)(Pi,{clientId:n[0].clientId,onSwitch:r,onHoverClassName:e.onHoverClassName})),0!==d.length&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Transform To:"),initialOpen:!0},Object(Yt.createElement)(Go,{items:d.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){o(n,e.id),r()}})),null!==a&&Object(Yt.createElement)(Ko,{name:n[0].name,attributes:Object(s.a)({},n[0].attributes,{className:a})}))}}):Object(Yt.createElement)(cn.Toolbar,null,Object(Yt.createElement)(cn.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon block-editor-block-switcher__no-switcher-icon",label:Object(p.__)("Block icon")},Object(Yt.createElement)(Nn,{icon:l,showColors:!0})))}}]),t}(Yt.Component),cc=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,i=o.getBlockRootClientId,c=o.getInserterItems,a=e("core/blocks").getBlockStyles,l=i(Object(f.first)(Object(f.castArray)(n))),s=r(n),u=s&&1===s.length?s[0]:null,d=u&&a(u.name);return{blocks:s,inserterItems:c(l),hasBlockStyles:d&&d.length>0}}),Object(l.withDispatch)(function(e,t){return{onTransform:function(n,o){e("core/block-editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,o))}}}))(ic);var ac=Object(l.withSelect)(function(e){var t=e("core/block-editor").getMultiSelectedBlockClientIds();return{isMultiBlockSelection:t.length>1,selectedBlockClientIds:t}})(function(e){var t=e.isMultiBlockSelection,n=e.selectedBlockClientIds;return t?Object(Yt.createElement)(cc,{key:"switcher",clientIds:n}):null});var lc=Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getBlockMode,r=t.getMultiSelectedBlockClientIds,i=t.isBlockValid,c=n();return{blockClientIds:c?[c]:r(),isValid:c?i(c):null,mode:c?o(c):null}})(function(e){var t=e.blockClientIds,n=e.isValid,o=e.mode;return 0===t.length?null:t.length>1?Object(Yt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},Object(Yt.createElement)(ac,null),Object(Yt.createElement)(rc,{clientIds:t})):Object(Yt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},"visual"===o&&n&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cc,{clientIds:t}),Object(Yt.createElement)(Sn.Slot,null),Object(Yt.createElement)(xn.Slot,null)),Object(Yt.createElement)(rc,{clientIds:t}))});var sc=Object(Jt.compose)([Object(l.withDispatch)(function(e,t,n){var o=(0,n.select)("core/block-editor"),r=o.getBlocksByClientId,c=o.getMultiSelectedBlockClientIds,a=o.getSelectedBlockClientId,l=o.hasMultiSelection,s=e("core/block-editor").removeBlocks,u=function(e){var t=a()?[a()]:c();if(0!==t.length&&(l()||!Object(ro.documentHasSelection)())){var n=Object(i.serialize)(r(t));e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",n),e.preventDefault()}};return{onCopy:u,onCut:function(e){if(u(e),l()){var t=a()?[a()]:c();s(t)}}}})])(function(e){var t=e.children,n=e.onCopy,o=e.onCut;return Object(Yt.createElement)("div",{onCopy:n,onCut:o},t)}),uc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=ur(e);if(t){var n=Object(ro.getScrollContainer)(t);n&&Uo()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Yt.Component),dc=Object(l.withSelect)(function(e){return{extentClientId:(0,e("core/block-editor").getLastMultiSelectedBlockClientId)()}})(uc),bc=[Ln.UP,Ln.RIGHT,Ln.DOWN,Ln.LEFT,Ln.ENTER,Ln.BACKSPACE];var fc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(rn.a)(Object(rn.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(rn.a)(Object(rn.a)(e))),e.onKeyDown=Object(f.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.toggleEventBindings(this.props.isTyping)}},{key:"componentDidUpdate",value:function(e){this.props.isTyping!==e.isTyping&&this.toggleEventBindings(this.props.isTyping)}},{key:"componentWillUnmount",value:function(){this.toggleEventBindings(!1)}},{key:"toggleEventBindings",value:function(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",this.stopTypingOnSelectionUncollapse),document[t]("mousemove",this.stopTypingOnMouseMove)}},{key:"stopTypingOnMouseMove",value:function(e){var t=e.clientX,n=e.clientY;if(this.lastMouseMove){var o=this.lastMouseMove,r=o.clientX,i=o.clientY;r===t&&i===n||this.props.onStopTyping()}this.lastMouseMove={clientX:t,clientY:n}}},{key:"stopTypingOnSelectionUncollapse",value:function(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||this.props.onStopTyping()}},{key:"stopTypingOnEscapeKey",value:function(e){this.props.isTyping&&e.keyCode===Ln.ESCAPE&&this.props.onStopTyping()}},{key:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,o=t.onStartTyping,r=e.type,i=e.target;n||!Object(ro.isTextField)(i)||i.closest(".block-editor-block-toolbar")||("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&Object(f.includes)(bc,t)}(e))&&o()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout(function(){var n=t.props,o=n.isTyping,r=n.onStopTyping,i=e.target;o&&!Object(ro.isTextField)(i)&&r()})}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Yt.Component),pc=Object(Jt.compose)([Object(l.withSelect)(function(e){return{isTyping:(0,e("core/block-editor").isTyping)()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),Jt.withSafeTimeout])(fc),hc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,o=t.selectionStart;return n!==e.blockOrder&&o?this.getOffset(o):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=ur(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=ur(this.props.selectionStart);if(t){var n=Object(ro.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Yt.Component),vc=Object(l.withSelect)(function(e){return{blockOrder:e("core/block-editor").getBlockOrder(),selectionStart:e("core/block-editor").getBlockSelectionStart()}})(hc),mc=window.getSelection,gc=Object(f.overEvery)([ro.isTextField,ro.focus.tabbable.isTabbableIndex]);var Oc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(rn.a)(Object(rn.a)(e))),e.bindContainer=e.bindContainer.bind(Object(rn.a)(Object(rn.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(rn.a)(Object(rn.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.verticalRect=null,e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearVerticalRect",value:function(){this.verticalRect=null}},{key:"getClosestTabbable",value:function(e,t){var n=ro.focus.focusable.find(this.container);return t&&(n=Object(f.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(f.find)(n,function t(n,o,r){if(!ro.focus.tabbable.isTabbableIndex(n))return!1;if(Object(ro.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var i,c=1;(i=r[o+c])&&n.contains(i);c++)if(t(i,o+c,r))return!1;return!0})}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,o=t.selectionStartClientId,r=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,c=e?r:i;c&&this.props.onMultiSelect(o||n,c)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,o=t.selectedLastClientId,r=e?n:o;r&&this.props.onSelectBlock(r)}},{key:"isTabbableEdge",value:function(e,t){var n,o,r=this.getClosestTabbable(e,t);return!(r&&(n=e,o=r,n.closest("[data-block]")===o.closest("[data-block]")))}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,o=t.onMultiSelect,r=t.blocks,i=t.selectionBeforeEndClientId,c=t.selectionAfterEndClientId,a=e.keyCode,l=e.target,s=a===Ln.UP,u=a===Ln.DOWN,d=a===Ln.LEFT,b=a===Ln.RIGHT,p=s||d,h=d||b,v=s||u,m=h||v,g=e.shiftKey,O=g||e.ctrlKey||e.altKey||e.metaKey,k=v?ro.isVerticalEdge:ro.isHorizontalEdge;if(!m)return Ln.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(ro.isEntirelySelected)(l)),void(Ln.isKeyboardEvent.primary(e,"a")&&((l.isContentEditable?this.isEntirelySelected:Object(ro.isEntirelySelected)(l))&&(o(Object(f.first)(r),Object(f.last)(r)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Ln.UP||t===Ln.DOWN)&&!n)return!0;var o=e.tagName;return"INPUT"!==o&&"TEXTAREA"!==o}(l,a,O))if(v?this.verticalRect||(this.verticalRect=Object(ro.computeCaretRect)(l)):this.verticalRect=null,g)(p&&i||!p&&c)&&(n||this.isTabbableEdge(l,p)&&k(l,p))&&(this.expandSelection(p),e.preventDefault());else if(n)this.moveSelection(p),e.preventDefault();else if(v&&Object(ro.isVerticalEdge)(l,p)){var j=this.getClosestTabbable(l,p);j&&(Object(ro.placeCaretAtVerticalEdge)(j,p,this.verticalRect),e.preventDefault())}else if(h&&mc().isCollapsed&&Object(ro.isHorizontalEdge)(l,p)){var y=this.getClosestTabbable(l,p);Object(ro.placeCaretAtHorizontalEdge)(y,p),e.preventDefault()}}},{key:"focusLastTextField",value:function(){var e=ro.focus.focusable.find(this.container),t=Object(f.findLast)(e,gc);t&&Object(ro.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)("div",{className:"editor-writing-flow block-editor-writing-flow"},Object(Yt.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Yt.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"wp-block editor-writing-flow__click-redirect block-editor-writing-flow__click-redirect"}))}}]),t}(Yt.Component),kc=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getMultiSelectedBlocksStartClientId,r=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,d=n(),b=o(),f=r();return{selectedBlockClientId:d,selectionStartClientId:b,selectionBeforeEndClientId:i(f||d),selectionAfterEndClientId:c(f||d),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(Oc),jc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.props.updateSettings(this.props.settings),this.props.resetBlocks(this.props.value),this.attachChangeObserver(this.props.registry)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.settings,o=t.updateSettings,r=t.value,i=t.resetBlocks,c=t.registry;n!==e.settings&&o(n),c!==e.registry&&this.attachChangeObserver(c),this.isSyncingOutcomingValue?this.isSyncingOutcomingValue=!1:r!==e.value&&(this.isSyncingIncomingValue=!0,i(r))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"attachChangeObserver",value:function(e){var t=this;this.unsubscribe&&this.unsubscribe();var n=e.select("core/block-editor"),o=n.getBlocks,r=n.isLastBlockChangePersistent,i=n.__unstableIsLastBlockChangeIgnored,c=o(),a=r();this.unsubscribe=e.subscribe(function(){var e=t.props,n=e.onChange,l=e.onInput,s=o(),u=r();if(s!==c&&(t.isSyncingIncomingValue||i()))return t.isSyncingIncomingValue=!1,c=s,void(a=u);(s!==c||u&&!a)&&(s!==c&&(t.isSyncingOutcomingValue=!0),c=s,(a=u)?n(c):l(c))})}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)(cn.SlotFillProvider,null,Object(Yt.createElement)(cn.DropZoneProvider,null,e))}}]),t}(Yt.Component),yc=Object(Jt.compose)([Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{updateSettings:t.updateSettings,resetBlocks:t.resetBlocks}}),l.withRegistry])(jc),_c=["left","center","right","wide","full"],Sc=["wide","full"];function Cc(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?_c:[],!o||!0===e&&!n?f.without.apply(void 0,[t].concat(Sc)):t}var Ec=Object(Jt.createHigherOrderComponent)(function(e){return function(t){var n=t.name,o=Cc(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(Yt.createElement)(Sn,{key:"align-controls"},Object(Yt.createElement)(On,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(i.getBlockType)(t.name);Object(f.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:o})),Object(Yt.createElement)(e,Object(qt.a)({key:"edit"},t))]}},"withToolbarControls"),wc=Object(Jt.createHigherOrderComponent)(Object(Jt.compose)([Object(l.withSelect)(function(e){return{hasWideEnabled:!!(0,e("core/block-editor").getSettings)().alignWide}}),function(e){return function(t){var n=t.name,o=t.attributes,r=t.hasWideEnabled,c=o.align,a=Cc(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0),r),l=t.wrapperProps;return Object(f.includes)(a,c)&&(l=Object(s.a)({},l,{"data-align":c})),Object(Yt.createElement)(e,Object(qt.a)({},t,{wrapperProps:l}))}}]));Object(Zt.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return Object(f.has)(e.attributes,["align","type"])?e:(Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(f.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(Zt.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",wc),Object(Zt.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Ec),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var o=n.align,r=Object(i.getBlockSupport)(t,"align"),c=Object(i.hasBlockSupport)(t,"alignWide",!0);return Object(f.includes)(Cc(r,c),o)&&(e.className=Xt()("align".concat(o),e.className)),e});var Ic=/[\s#]/g;var Tc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(e,t),Object(Yt.createElement)(Er,null,Object(Yt.createElement)(cn.TextControl,{label:Object(p.__)("HTML Anchor"),help:Object(p.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Ic,"-"),t.setAttributes({anchor:e})}}))):Object(Yt.createElement)(e,t)}},"withInspectorControl");Object(Zt.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(i.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(f.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(Zt.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Tc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e});var Bc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(e,t),Object(Yt.createElement)(Er,null,Object(Yt.createElement)(cn.TextControl,{label:Object(p.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})}}))):Object(Yt.createElement)(e,t)}},"withInspectorControl");function xc(e){e="
".concat(e,"
");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Zt.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(i.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(f.assign)(e.attributes,{className:{type:"string"}})),e}),Object(Zt.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Bc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Xt()(e.className,n.className)),e}),Object(Zt.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(i.hasBlockSupport)(t,"customClassName",!0)){var o=Object(f.omit)(e,["className"]),r=Object(i.getSaveContent)(t,o),c=xc(r),a=xc(n),l=Object(f.difference)(a,c);l.length?e.className=l.join(" "):r&&delete e.className}return e}),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(i.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(f.uniq)([Object(i.getBlockDefaultClassName)(t.name)].concat(Object(d.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(i.getBlockDefaultClassName)(t.name)),e}),n.d(t,"Autocomplete",function(){return fn}),n.d(t,"AlignmentToolbar",function(){return hn}),n.d(t,"BlockAlignmentToolbar",function(){return On}),n.d(t,"BlockControls",function(){return Sn}),n.d(t,"BlockEdit",function(){return En}),n.d(t,"BlockFormatControls",function(){return xn}),n.d(t,"BlockNavigationDropdown",function(){return Dn}),n.d(t,"BlockIcon",function(){return Nn}),n.d(t,"ColorPalette",function(){return Fn}),n.d(t,"withColorContext",function(){return Pn}),n.d(t,"ContrastChecker",function(){return Jn}),n.d(t,"InnerBlocks",function(){return jr}),n.d(t,"InspectorAdvancedControls",function(){return Er}),n.d(t,"InspectorControls",function(){return xr}),n.d(t,"PanelColorSettings",function(){return Ar}),n.d(t,"PlainText",function(){return Dr}),n.d(t,"RichText",function(){return vi}),n.d(t,"RichTextShortcut",function(){return Xr}),n.d(t,"RichTextToolbarButton",function(){return ai}),n.d(t,"UnstableRichTextInputEvent",function(){return li}),n.d(t,"MediaPlaceholder",function(){return yi}),n.d(t,"MediaUpload",function(){return mi}),n.d(t,"MediaUploadCheck",function(){return po}),n.d(t,"URLInput",function(){return wi}),n.d(t,"URLInputButton",function(){return Ii}),n.d(t,"URLPopover",function(){return gi}),n.d(t,"BlockEditorKeyboardShortcuts",function(){return Ni}),n.d(t,"BlockInspector",function(){return Ui}),n.d(t,"BlockList",function(){return Or}),n.d(t,"BlockMover",function(){return fo}),n.d(t,"BlockSelectionClearer",function(){return zi}),n.d(t,"BlockSettingsMenu",function(){return rc}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return Qi}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return oc}),n.d(t,"BlockTitle",function(){return xo}),n.d(t,"BlockToolbar",function(){return lc}),n.d(t,"CopyHandler",function(){return sc}),n.d(t,"DefaultBlockAppender",function(){return vr}),n.d(t,"Inserter",function(){return er}),n.d(t,"MultiBlocksSwitcher",function(){return ac}),n.d(t,"MultiSelectScrollIntoView",function(){return dc}),n.d(t,"NavigableToolbar",function(){return Do}),n.d(t,"ObserveTyping",function(){return pc}),n.d(t,"PreserveScrollInReorder",function(){return vc}),n.d(t,"SkipToSelectedBlock",function(){return Mi}),n.d(t,"Warning",function(){return mo}),n.d(t,"WritingFlow",function(){return kc}),n.d(t,"BlockEditorProvider",function(){return yc}),n.d(t,"getColorClassName",function(){return Kn}),n.d(t,"getColorObjectByAttributeValues",function(){return Vn}),n.d(t,"getColorObjectByColorValue",function(){return zn}),n.d(t,"createCustomColorsHOC",function(){return $n}),n.d(t,"withColors",function(){return Xn}),n.d(t,"getFontSize",function(){return Zn}),n.d(t,"getFontSizeClass",function(){return Qn}),n.d(t,"FontSizePicker",function(){return eo}),n.d(t,"withFontSizes",function(){return to}),n.d(t,"SETTINGS_DEFAULTS",function(){return v})},37:function(e,t,n){"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return o})},38: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})},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.viewport}()},41:function(e,t,n){e.exports=function(e,t){var n,o,r,i=0;function c(){var t,c,a=o,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)o=r=i=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=c(l,a,e+1/3),r=c(l,a,e),i=c(l,a,e-1/3)}return{r:255*o,g:255*r,b:255*i}}(e.h,o,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,h;return n=L(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var o,r,i=u(e,t,n),c=s(e,t,n),a=(i+c)/2;if(i==c)o=r=0;else{var l=i-c;switch(r=a>.5?l/(2-i-c):l/(i+c),i){case e:o=(t-n)/l+(t>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(b(o));return i}function T(e,t){t=t||6;for(var n=b(e).toHsv(),o=n.h,r=n.s,i=n.v,c=[],a=1/t;t--;)c.push(b({h:o,s:r,v:i})),i=(i+a)%1;return c}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),o=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),o=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var i=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16)),A(P(o))];if(r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(x[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=b(e);n="#"+v(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(j,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:D(e[o]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var o=b(e).toRgb(),r=b(t).toRgb(),i=n/100;return b({r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a})},b.readability=function(e,t){var n=b(e),o=b(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(e,t,n){var o,r,i=b.readability(e,t);switch(r=!1,(o=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+o.size){case"AAsmall":case"AAAlarge":r=i>=4.5;break;case"AAlarge":r=i>=3;break;case"AAAsmall":r=i>=7}return r},b.mostReadable=function(e,t,n){var o,r,i,c,a=null,l=0;r=(n=n||{}).includeFallbackColors,i=n.level,c=n.size;for(var s=0;sl&&(l=o,a=b(t[s]));return b.isReadable(e,a,{level:i,size:c})||!r?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var B=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(B);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return s(1,u(0,e))}function R(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function P(e){return r.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var H,U,V,z=(U="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",V="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function K(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(o=function(){return b}.call(t,n,t,e))||(e.exports=o)}(Math)},48:function(e,t){!function(){e.exports=this.wp.a11y}()},49:function(e,t){!function(){e.exports=this.wp.deprecated}()},5:function(e,t){!function(){e.exports=this.wp.data}()},54:function(e,t,n){var o=function(){return this||"object"==typeof self&&self}()||Function("return this")(),r=o.regeneratorRuntime&&Object.getOwnPropertyNames(o).indexOf("regeneratorRuntime")>=0,i=r&&o.regeneratorRuntime;if(o.regeneratorRuntime=void 0,e.exports=n(55),r)o.regeneratorRuntime=i;else try{delete o.regeneratorRuntime}catch(e){o.regeneratorRuntime=void 0}},55:function(e,t){!function(t){"use strict";var n,o=Object.prototype,r=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",s="object"==typeof e,u=t.regeneratorRuntime;if(u)s&&(e.exports=u);else{(u=t.regeneratorRuntime=s?e.exports:{}).wrap=k;var d="suspendedStart",b="suspendedYield",f="executing",p="completed",h={},v={};v[c]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(x([])));g&&g!==o&&r.call(g,c)&&(v=g);var O=S.prototype=y.prototype=Object.create(v);_.prototype=O.constructor=S,S.constructor=_,S[l]=_.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(O),e},u.awrap=function(e){return{__await:e}},C(E.prototype),E.prototype[a]=function(){return this},u.AsyncIterator=E,u.async=function(e,t,n,o){var r=new E(k(e,t,n,o));return u.isGeneratorFunction(t)?r:r.next().then(function(e){return e.done?e.value:r.next()})},C(O),O[l]="Generator",O[c]=function(){return this},O.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=x,B.prototype={constructor:B,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(o,r){return a.type="throw",a.arg=e,t.next=o,r&&(t.method="next",t.arg=n),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var l=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:x(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=n),h}}}function k(e,t,n,o){var r=t&&t.prototype instanceof y?t:y,i=Object.create(r.prototype),c=new B(o||[]);return i._invoke=function(e,t,n){var o=d;return function(r,i){if(o===f)throw new Error("Generator is already running");if(o===p){if("throw"===r)throw i;return L()}for(n.method=r,n.arg=i;;){var c=n.delegate;if(c){var a=w(c,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=j(e,t,n);if("normal"===l.type){if(o=n.done?p:b,l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}(e,n,c),i}function j(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function _(){}function S(){}function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(n,o){function i(){return new Promise(function(t,i){!function t(n,o,i,c){var a=j(e[n],e,o);if("throw"!==a.type){var l=a.arg,s=l.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,i,c)},function(e){t("throw",e,i,c)}):Promise.resolve(s).then(function(e){l.value=e,i(l)},function(e){return t("throw",e,i,c)})}c(a.arg)}(n,o,t,i)})}return t=t?t.then(i,i):i()}}function w(e,t){var o=e.iterator[t.method];if(o===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,w(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=j(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function x(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++oe.length?n:e}),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[c-1];return c>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[c-2].value+=b.value,t.pop()),t}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function c(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,s=1,u=a+l,d=[{newPos:-1,components:[]}],b=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=a&&b+1>=l)return c([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*s;n<=s;n+=2){var r=void 0,u=d[n-1],b=d[n+1],f=(b?b.newPos:0)-n;u&&(d[n-1]=void 0);var p=u&&u.newPos+1=a&&f+1>=l)return c(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var v;s++}if(r)!function e(){setTimeout(function(){if(s>u)return r();f()||e()},0)}();else for(;s<=u;){var p=f();if(p)return p}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,c=e.newPos,a=c-o,l=0;c+12&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,r.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var o=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],a=t.hunks,l=n.compareLine||function(e,t,n,o){return t===o},s=0,u=n.fuzzFactor||0,d=0,b=0,f=void 0,p=void 0;function h(e,t){for(var n=0;n0?r[0]:" ",c=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!l(t+1,o[t],i,c)&&++s>u)return!1;t++}}return!0}for(var v=0;v0?w[0]:" ",T=w.length>0?w.substr(1):w,B=S.linedelimiters[E];if(" "===I)C++;else if("-"===I)o.splice(C,1),i.splice(C,1);else if("+"===I)o.splice(C,0,T),i.splice(C,0,B),C++;else if("\\"===I){var x=S.lines[E-1]?S.lines[E-1][0]:null;"+"===x?f=!0:"-"===x&&(p=!0)}}}if(f)for(;!o[o.length-1];)o.pop(),i.pop();else p&&(o.push(""),i.push("\n"));for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],r=[],i=0;function c(){var e={};for(r.push(e);i0?u(a.lines.slice(-l.context)):[],b-=p.length,f-=p.length)}(c=p).push.apply(c,r(o.map(function(e){return(t.added?"+":"-")+e}))),t.added?v+=o.length:h+=o.length}else{if(b)if(o.length<=2*l.context&&e=s.length-2&&o.length<=l.context){var j=/\n$/.test(n),y=/\n$/.test(i);0!=o.length||j?j&&y||p.push("\\ No newline at end of file"):p.splice(k.oldLines,0,"\\ No newline at end of file")}d.push(k),b=0,f=0,p=[]}h+=o.length,v+=o.length}},g=0;ge.length)return!1;for(var n=0;n/g,">")).replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],o=0;o"):r.removed&&t.push(""),t.push(n(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")}}])},e.exports=o()},21: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=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",function(){return o})},23:function(e,t,n){e.exports=n(54)},24:function(e,t){!function(){e.exports=this.wp.dom}()},25:function(e,t){!function(){e.exports=this.wp.url}()},26:function(e,t){!function(){e.exports=this.wp.hooks}()},27:function(e,t){!function(){e.exports=this.React}()},28:function(e,t,n){"use strict";var o=n(37);var r=n(38);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})},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,n){"use strict";var o,r;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o3&&void 0!==arguments[3]?arguments[3]:1,r=Object(d.a)(e);return r.splice(t,o),m(r,e.slice(t,t+o),n)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(b.a)({},t,[]);return e.forEach(function(e){var o=e.clientId,r=e.innerBlocks;n[t].push(o),Object.assign(n,O(r,o))}),n}function k(e,t){for(var n={},o=Object(d.a)(e);o.length;){var r=o.shift(),i=r.innerBlocks,c=Object(u.a)(r,["innerBlocks"]);o.push.apply(o,Object(d.a)(i)),n[c.clientId]=t(c)}return n}function j(e){return k(e,function(e){return Object(f.omit)(e,"attributes")})}function y(e){return k(e,function(e){return e.attributes})}function _(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&e.clientId===t.clientId&&(n=e.attributes,o=t.attributes,Object(f.isEqual)(Object(f.keys)(n),Object(f.keys)(o)));var n,o}var S=Object(f.flow)(l.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var o=Object(d.a)(n.clientIds),r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return Object(f.reduce)(t[n],function(n,o){return[].concat(Object(d.a)(n),[o],Object(d.a)(e(t,o)))},[])}(t.order);return Object(s.a)({},t,{byClientId:Object(s.a)({},Object(f.omit)(t.byClientId,o),j(n.blocks)),attributes:Object(s.a)({},Object(f.omit)(t.attributes,o),y(n.blocks)),order:Object(s.a)({},Object(f.omit)(t.order,o),O(n.blocks))})}return e(t,n)}},function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var o=n.id,r=n.updatedId;if(o===r)return t;(t=Object(s.a)({},t)).attributes=Object(f.mapValues)(t.attributes,function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===o?Object(s.a)({},e,{ref:r}):e})}return e(t,n)}},function(e){var t;return function(n,o){var r=e(n,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type;if(n===r&&!i){var c=Object(f.get)(n,["isPersistentChange"],!0);return n.isPersistentChange===c?n:Object(s.a)({},r,{isPersistentChange:c})}return r=Object(s.a)({},r,{isPersistentChange:i||!_(o,t)}),t=o,r}},function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,o){var r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}})({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return j(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,j(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(f.omit)(t.updates,"attributes");return Object(f.isEmpty)(n)?e:Object(s.a)({},e,Object(b.a)({},t.clientId,Object(s.a)({},e[t.clientId],n)));case"INSERT_BLOCKS":return Object(s.a)({},e,j(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(s.a)({},Object(f.omit)(e,t.clientIds),j(t.blocks)):e;case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return y(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,y(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Object(s.a)({},e,Object(b.a)({},t.clientId,Object(s.a)({},e[t.clientId],t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(f.reduce)(t.attributes,function(n,o,r){var i,c;return o!==n[r]&&((n=(i=e[t.clientId])===(c=n)?Object(s.a)({},i):c)[r]=o),n},e[t.clientId]);return n===e[t.clientId]?e:Object(s.a)({},e,Object(b.a)({},t.clientId,n));case"INSERT_BLOCKS":return Object(s.a)({},e,y(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(s.a)({},Object(f.omit)(e,t.clientIds),y(t.blocks)):e;case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return O(t.blocks);case"RECEIVE_BLOCKS":return Object(s.a)({},e,Object(f.omit)(O(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,o=void 0===n?"":n,r=e[o]||[],i=O(t.blocks,o),c=t.index,a=void 0===c?r.length:c;return Object(s.a)({},e,i,Object(b.a)({},o,m(r,i[o],a)));case"MOVE_BLOCK_TO_POSITION":var l,u=t.fromRootClientId,p=void 0===u?"":u,h=t.toRootClientId,v=void 0===h?"":h,k=t.clientId,j=t.index,y=void 0===j?e[v].length:j;if(p===v){var _=e[v].indexOf(k);return Object(s.a)({},e,Object(b.a)({},v,g(e[v],_,y)))}return Object(s.a)({},e,(l={},Object(b.a)(l,p,Object(f.without)(e[p],k)),Object(b.a)(l,v,m(e[v],k,y)),l));case"MOVE_BLOCKS_UP":var S=t.clientIds,C=t.rootClientId,E=void 0===C?"":C,w=Object(f.first)(S),I=e[E];if(!I.length||w===Object(f.first)(I))return e;var T=I.indexOf(w);return Object(s.a)({},e,Object(b.a)({},E,g(I,T,T-1,S.length)));case"MOVE_BLOCKS_DOWN":var B=t.clientIds,x=t.rootClientId,L=void 0===x?"":x,N=Object(f.first)(B),M=Object(f.last)(B),R=e[L];if(!R.length||M===Object(f.last)(R))return e;var A=R.indexOf(N);return Object(s.a)({},e,Object(b.a)({},L,g(R,A,A+1,B.length)));case"REPLACE_BLOCKS":var D=t.clientIds;if(!t.blocks)return e;var P=O(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,D)},function(e){return Object(s.a)({},e,Object(f.omit)(P,""))},function(e){return Object(f.mapValues)(e,function(e){return Object(f.reduce)(e,function(e,t){return t===D[0]?[].concat(Object(d.a)(e),Object(d.a)(P[""])):(-1===D.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(f.flow)([function(e){return Object(f.omit)(e,t.clientIds)},function(e){return Object(f.mapValues)(e,function(e){return f.without.apply(void 0,[e].concat(Object(d.a)(t.clientIds)))})}])(e)}return e}});var C=Object(l.combineReducers)({blocks:S,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},blockSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{start:null,end:null,isMultiSelecting:!1,isEnabled:!0,initialPosition:null},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return null!==e.start||null!==e.end||e.isMultiSelecting?Object(s.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(s.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(s.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(s.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(s.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection?Object(s.a)({},e,{start:t.blocks[0].clientId,end:t.blocks[0].clientId,initialPosition:null,isMultiSelecting:!1}):e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start)?Object(s.a)({},e,{start:null,end:null,initialPosition:null,isMultiSelecting:!1}):e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.start))return e;var n=Object(f.last)(t.blocks),o=n?n.clientId:null;return o===e.start&&o===e.end?e:Object(s.a)({},e,{start:o,end:o,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(s.a)({},e,{isEnabled:t.isSelectionEnabled})}return e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return Object(s.a)({},e,Object(b.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(f.isEqual)(e[n],t.settings)?e:Object(s.a)({},e,Object(b.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(f.omit)(e,n):e}return e},insertionPoint: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"SHOW_INSERTION_POINT":return{rootClientId:t.rootClientId,index:t.index};case"HIDE_INSERTION_POINT":return null}return e},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Object(s.a)({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Object(s.a)({},e,t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(function(e,n){var o=n.name,r={name:n.name};return Object(i.isReusableBlock)(n)&&(r.ref=n.attributes.ref,o+="/"+n.attributes.ref),Object(s.a)({},e,{insertUsage:Object(s.a)({},e.insertUsage,Object(b.a)({},o,{time:t.time,count:e.insertUsage[o]?e.insertUsage[o].count+1:1,insert:r}))})},e)}return e}}),E=n(70),w=n.n(E),I=n(97),T=n.n(I),B=n(28),x=n(48),L=n(23),N=n.n(L);function M(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function $(e){var t;return N.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M("core/block-editor","getPreviousBlockClientId",e);case 2:return t=n.sent,n.next=5,Y(t,-1);case 5:case"end":return n.stop()}},D,this)}function X(e){var t;return N.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M("core/block-editor","getNextBlockClientId",e);case 2:return t=n.sent,n.next=5,Y(t);case 5:case"end":return n.stop()}},P,this)}function J(){return{type:"START_MULTI_SELECT"}}function Z(){return{type:"STOP_MULTI_SELECT"}}function Q(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ee(){return{type:"CLEAR_SELECTED_BLOCK"}}function te(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function ne(e,t){var n,o,r;return N.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=Object(f.castArray)(e),t=Object(f.castArray)(t),i.next=4,M("core/block-editor","getBlockRootClientId",Object(f.first)(e));case 4:n=i.sent,o=0;case 6:if(!(o3&&void 0!==arguments[3])||arguments[3])}function se(e,t,n){var o,r,i,c,a,l,s,u,d=arguments;return N.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:o=!(d.length>3&&void 0!==d[3])||d[3],e=Object(f.castArray)(e),r=[],i=!0,c=!1,a=void 0,b.prev=6,l=e[Symbol.iterator]();case 8:if(i=(s=l.next()).done){b.next=17;break}return u=s.value,b.next=12,M("core/block-editor","canInsertBlockType",u.name,n);case 12:b.sent&&r.push(u);case 14:i=!0,b.next=8;break;case 17:b.next=23;break;case 19:b.prev=19,b.t0=b.catch(6),c=!0,a=b.t0;case 23:b.prev=23,b.prev=24,i||null==l.return||l.return();case 26:if(b.prev=26,!c){b.next=29;break}throw a;case 29:return b.finish(26);case 30:return b.finish(23);case 31:if(!r.length){b.next=33;break}return b.abrupt("return",{type:"INSERT_BLOCKS",blocks:r,index:t,rootClientId:n,time:Date.now(),updateSelection:o});case 33:case"end":return b.stop()}},U,this,[[6,19,23,31],[24,,26,30]])}function ue(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function de(){return{type:"HIDE_INSERTION_POINT"}}function be(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function fe(){return{type:"SYNCHRONIZE_TEMPLATE"}}function pe(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function he(e){var t,n=arguments;return N.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(t=!(n.length>1&&void 0!==n[1])||n[1],e=Object(f.castArray)(e),!t){o.next=5;break}return o.next=5,$(e[0]);case 5:return o.next=7,{type:"REMOVE_BLOCKS",clientIds:e};case 7:return o.delegateYield(z(),"t0",8);case 8:case"end":return o.stop()}},V,this)}function ve(e,t){return he([e],t)}function me(e,t){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],time:Date.now()}}function ge(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Oe(){return{type:"START_TYPING"}}function ke(){return{type:"STOP_TYPING"}}function je(){return{type:"ENTER_FORMATTED_TEXT"}}function ye(){return{type:"EXIT_FORMATTED_TEXT"}}function _e(e,t,n){return le(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function Se(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ce(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ee(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function we(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}var Ie=n(30),Te=3,Be=2,xe=1,Le=0,Ne=[],Me={},Re=Object(Ie.a)(function(){return[]},function(e,t){return Object(f.map)(ht(e,t),function(t){return Fe(e,t)})});function Ae(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function De(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}var Pe=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];if(!n)return null;var o=e.blocks.attributes[t],r=Object(i.getBlockType)(n.name);return r&&(o=Object(f.reduce)(r.attributes,function(t,n,r){return"meta"===n.source&&(t===o&&(t=Object(s.a)({},t)),t[r]=Vt(e,n.meta)),t},o)),o},function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t],Vt(e)]}),Fe=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Pe(e,t),innerBlocks:Ue(e,t)}):null},function(e,t){return[].concat(Object(d.a)(Pe.getDependants(e,t)),[Re(e,t)])}),He=Object(Ie.a)(function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Pe(e,t)}):null},function(e,t){return[e.blocks.byClientId[t]].concat(Object(d.a)(Pe.getDependants(e,t)))}),Ue=Object(Ie.a)(function(e,t){return Object(f.map)(ht(e,t),function(t){return Fe(e,t)})},function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}),Ve=function e(t,n){return Object(f.flatMap)(n,function(n){var o=ht(t,n);return[].concat(Object(d.a)(o),Object(d.a)(e(t,o)))})},ze=Object(Ie.a)(function(e){var t=ht(e);return[].concat(Object(d.a)(t),Object(d.a)(Ve(e,t)))},function(e){return[e.blocks.order]}),Ke=Object(Ie.a)(function(e,t){var n=ze(e);return t?Object(f.reduce)(n,function(n,o){return e.blocks.byClientId[o].name===t?n+1:n},0):n.length},function(e){return[e.blocks.order,e.blocks.byClientId]}),We=Object(Ie.a)(function(e,t){return Object(f.map)(Object(f.castArray)(t),function(t){return Fe(e,t)})},function(e){return[Vt(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]});function Ge(e,t){return ht(e,t).length}function qe(e){return e.blockSelection.start}function Ye(e){return e.blockSelection.end}function $e(e){var t=it(e).length;return t||(e.blockSelection.start?1:0)}function Xe(e){var t=e.blockSelection,n=t.start,o=t.end;return!!n&&n===o}function Je(e){var t=e.blockSelection,n=t.start,o=t.end;return n&&n===o&&e.blocks.byClientId[n]?n:null}function Ze(e){var t=Je(e);return t?Fe(e,t):null}var Qe=Object(Ie.a)(function(e,t){var n=e.blocks.order;for(var o in n)if(Object(f.includes)(n[o],t))return o;return null},function(e){return[e.blocks.order]}),et=Object(Ie.a)(function(e,t){for(var n=t,o=t;n;)n=Qe(e,o=n);return o},function(e){return[e.blocks.order]});function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Je(e)),void 0===t&&(t=n<0?at(e):lt(e)),!t)return null;var o=Qe(e,t);if(null===o)return null;var r=e.blocks.order[o],i=r.indexOf(t)+1*n;return i<0?null:i===r.length?null:r[i]}function nt(e,t){return tt(e,t,-1)}function ot(e,t){return tt(e,t,1)}function rt(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var it=Object(Ie.a)(function(e){var t=e.blockSelection,n=t.start,o=t.end;if(n===o)return[];var r=Qe(e,n);if(null===r)return[];var i=ht(e,r),c=i.indexOf(n),a=i.indexOf(o);return c>a?i.slice(a,c+1):i.slice(c,a+1)},function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]}),ct=Object(Ie.a)(function(e){var t=it(e);return t.length?t.map(function(t){return Fe(e,t)}):Ne},function(e){return[].concat(Object(d.a)(it.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes,Vt(e)])});function at(e){return Object(f.first)(it(e))||null}function lt(e){return Object(f.last)(it(e))||null}var st=Object(Ie.a)(function(e,t,n){for(var o=n;t!==o&&o;)o=Qe(e,o);return t===o},function(e){return[e.blocks.order]});function ut(e,t){return at(e)===t}function dt(e,t){return-1!==it(e).indexOf(t)}var bt=Object(Ie.a)(function(e,t){for(var n=t,o=!1;n&&!o;)o=dt(e,n=Qe(e,n));return o},function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]});function ft(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function pt(e){var t=e.blockSelection,n=t.start,o=t.end;return n===o?null:o||null}function ht(e,t){return e.blocks.order[t||""]||Ne}function vt(e,t,n){return ht(e,n).indexOf(t)}function mt(e,t){var n=e.blockSelection,o=n.start;return o===n.end&&o===t}function gt(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(ht(e,t),function(t){return mt(e,t)||dt(e,t)||n&>(e,t,n)})}function Ot(e,t){if(!t)return!1;var n=it(e),o=n.indexOf(t);return o>-1&&o2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(f.isBoolean)(e)?e:Object(f.isArray)(e)?Object(f.includes)(e,t):n},r=Object(i.getBlockType)(t);if(!r)return!1;if(!o(Ft(e).allowedBlockTypes,t,!0))return!1;if(!!Bt(e,n))return!1;var c=Pt(e,n),a=o(Object(f.get)(c,["allowedBlocks"]),t),l=o(r.parent,Ae(e,n));return null!==a&&null!==l?a||l:null!==a?a:null===l||l},Lt=Object(Ie.a)(xt,function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function Nt(e,t){return e.preferences.insertUsage[t]||null}var Mt=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&xt(e,t.name,n)},Rt=function(e,t,n){if(!xt(e,"core/block",n))return!1;var o=Ae(e,t.clientId);return!!o&&(!!Object(i.getBlockType)(o)&&(!!xt(e,o,n)&&!st(e,t.clientId,n)))},At=Object(Ie.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?Te:t>0?Be:"common"===e?xe:Le},o=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},r=Object(i.getBlockTypes)().filter(function(n){return Mt(e,n,t)}).map(function(t){var r=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(f.some)(We(e,ze(e)),{name:t.name}));var a=Object(f.isArray)(t.parent),l=Nt(e,r)||{},s=l.time,u=l.count,d=void 0===u?0:u;return{id:r,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:c,utility:n(t.category,d,a),frecency:o(s,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}}),c=zt(e).filter(function(n){return Rt(e,n,t)}).map(function(t){var r="core/block/".concat(t.id),c=Ae(e,t.clientId),a=Object(i.getBlockType)(c),l=Nt(e,r)||{},s=l.time,u=l.count,d=void 0===u?0:u,b=n("reusable",d,!1),f=o(s,d);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:a.icon,category:"reusable",keywords:[],isDisabled:!1,utility:b,frecency:f}});return Object(f.orderBy)([].concat(Object(d.a)(r),Object(d.a)(c)),["utility","frecency"],["desc","desc"])},function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,zt(e),Object(i.getBlockTypes)()]}),Dt=Object(Ie.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return!!Object(f.some)(Object(i.getBlockTypes)(),function(n){return Mt(e,n,t)})||Object(f.some)(zt(e),function(n){return Rt(e,n,t)})},function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,zt(e),Object(i.getBlockTypes)()]});function Pt(e,t){return e.blockListSettings[t]}function Ft(e){return e.settings}function Ht(e){return e.blocks.isPersistentChange}function Ut(e){return e.blocks.isIgnoredChange}function Vt(e,t){return void 0===t?Object(f.get)(e,["settings","__experimentalMetaSource","value"],Me):Object(f.get)(e,["settings","__experimentalMetaSource","value",t])}function zt(e){return Object(f.get)(e,["settings","__experimentalReusableBlocks"],Ne)}var Kt={MERGE_BLOCKS:function(e,t){var n=t.dispatch,o=t.getState(),r=Object(B.a)(e.blocks,2),c=r[0],a=r[1],l=Fe(o,c),u=Object(i.getBlockType)(l.name);if(u.merge){var b=Fe(o,a),f=l.name===b.name?[b]:Object(i.switchToBlockType)(b,l.name);if(f&&f.length){var p=u.merge(l.attributes,f[0].attributes);n(Y(l.clientId,-1)),n(ne([l.clientId,b.clientId],[Object(s.a)({},l,{attributes:Object(s.a)({},l.attributes,p)})].concat(Object(d.a)(f.slice(1)))))}}else n(Y(l.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),o=Tt(n),r=Bt(n),c=!o||"all"!==r||Object(i.doBlocksMatchTemplate)(e.blocks,o);if(c!==It(n))return be(c)}],MULTI_SELECT:function(e,t){var n=$e((0,t.getState)());Object(x.speak)(Object(p.sprintf)(Object(p._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),o=Ue(n),r=Tt(n);return K(Object(i.synchronizeBlocksWithTemplate)(o,r))}};var Wt=function(e){var t,n=[w()(Kt),T.a],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=f.flowRight.apply(void 0,Object(d.a)(t))(e.dispatch),e.dispatch=o,e},Gt=Object(l.registerStore)("core/block-editor",{reducer:C,selectors:r,actions:o,controls:R,persist:["preferences"]});Wt(Gt);var qt=n(19),Yt=n(0),$t=n(16),Xt=n.n($t),Jt=n(6),Zt=n(26),Qt=n(10),en=n(9),tn=n(11),nn=n(12),on=n(13),rn=n(3),cn=n(4),an=Object(Yt.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:f.noop,clientId:null}),ln=an.Consumer,sn=an.Provider,un=function(e){return Object(Jt.createHigherOrderComponent)(function(t){return function(n){return Object(Yt.createElement)(ln,null,function(o){return Object(Yt.createElement)(t,Object(qt.a)({},n,e(o,n)))})}},"withBlockEditContext")},dn=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(Yt.createElement)(ln,null,function(n){return n.isSelected&&Object(Yt.createElement)(e,t)})}},"ifBlockEditSelected"),bn=[];var fn=Object(Jt.compose)([un(function(e){return{blockName:e.name}}),function(e){return function(t){function n(){var e;return Object(Qt.a)(this,n),(e=Object(tn.a)(this,Object(nn.a)(n).call(this))).state={completers:bn},e.saveParentRef=e.saveParentRef.bind(Object(rn.a)(Object(rn.a)(e))),e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(n,t),Object(en.a)(n,[{key:"componentDidUpdate",value:function(){this.parentNode.contains(document.activeElement)&&this.hasStaleCompleters()&&this.updateCompletersState()}},{key:"onFocus",value:function(){this.hasStaleCompleters()&&this.updateCompletersState()}},{key:"hasStaleCompleters",value:function(){return!("lastFilteredCompletersProp"in this.state)||this.state.lastFilteredCompletersProp!==this.props.completers}},{key:"updateCompletersState",value:function(){var e=this.props,t=e.blockName,n=e.completers,o=n;Object(Zt.hasFilter)("editor.Autocomplete.completers")&&(n=Object(Zt.applyFilters)("editor.Autocomplete.completers",n&&n.map(f.clone),t)),this.setState({lastFilteredCompletersProp:o,completers:n||bn})}},{key:"saveParentRef",value:function(e){this.parentNode=e}},{key:"render",value:function(){var t=this.state.completers,n=Object(s.a)({},this.props,{completers:t});return Object(Yt.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(Yt.createElement)(e,Object(qt.a)({onFocus:this.onFocus},n)))}}]),n}(Yt.Component)}])(cn.Autocomplete),pn=[{icon:"editor-alignleft",title:Object(p.__)("Align text left"),align:"left"},{icon:"editor-aligncenter",title:Object(p.__)("Align text center"),align:"center"},{icon:"editor-alignright",title:Object(p.__)("Align text right"),align:"right"}];var hn=Object(Jt.compose)(un(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,a=i.getSettings;return{isCollapsed:r||!o||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.alignmentControls,i=void 0===r?pn:r;function c(e){return function(){return o(n===e?void 0:e)}}var a=Object(f.find)(i,function(e){return e.align===n});return Object(Yt.createElement)(cn.Toolbar,{isCollapsed:t,icon:a?a.icon:"editor-alignleft",label:Object(p.__)("Change Text Alignment"),controls:i.map(function(e){var t=e.align,o=n===t;return Object(s.a)({},e,{isActive:o,onClick:c(t)})})})}),vn={left:{icon:"align-left",title:Object(p.__)("Align left")},center:{icon:"align-center",title:Object(p.__)("Align center")},right:{icon:"align-right",title:Object(p.__)("Align right")},wide:{icon:"align-wide",title:Object(p.__)("Wide width")},full:{icon:"align-full-width",title:Object(p.__)("Full width")}},mn=["left","center","right","wide","full"],gn=["wide","full"];var On=Object(Jt.compose)(un(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isLargeViewport,r=t.isCollapsed,i=e("core/block-editor"),c=i.getBlockRootClientId,a=(0,i.getSettings)();return{wideControlsEnabled:a.alignWide,isCollapsed:r||!o||!a.hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,o=e.onChange,r=e.controls,i=void 0===r?mn:r,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===gn.indexOf(e)}),l=vn[n];return Object(Yt.createElement)(cn.Toolbar,{isCollapsed:t,icon:l?l.icon:"align-left",label:Object(p.__)("Change Alignment"),controls:a.map(function(e){return Object(s.a)({},vn[e],{isActive:n===e,onClick:(t=e,function(){return o(n===t?void 0:t)})});var t})})}),kn=Object(cn.createSlotFill)("BlockControls"),jn=kn.Fill,yn=kn.Slot,_n=dn(function(e){var t=e.controls,n=e.children;return Object(Yt.createElement)(jn,null,Object(Yt.createElement)(cn.Toolbar,{controls:t}),n)});_n.Slot=yn;var Sn=_n,Cn=Object(cn.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,o=e.name,r=Object(i.getBlockType)(o);if(!r)return null;var c=Object(i.hasBlockSupport)(r,"className",!0)?Object(i.getBlockDefaultClassName)(o):null,a=Xt()(c,n.className),l=r.edit||r.save;return Object(Yt.createElement)(l,Object(qt.a)({},e,{className:a}))}),En=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(rn.a)(Object(rn.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(Yt.createElement)(sn,{value:this.state},Object(Yt.createElement)(Cn,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Yt.Component),wn=Object(cn.createSlotFill)("BlockFormatControls"),In=wn.Fill,Tn=wn.Slot,Bn=dn(In);Bn.Slot=Tn;var xn=Bn,Ln=n(18);function Nn(e){var t=e.icon,n=e.showColors,o=void 0!==n&&n,r=e.className;"block-default"===Object(f.get)(t,["src"])&&(t={src:Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object(Yt.createElement)(cn.Icon,{icon:t&&t.src?t.src:t}),c=o?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(Yt.createElement)("span",{style:c,className:Xt()("editor-block-icon block-editor-block-icon",r,{"has-colors":o})},i)}function Mn(e){var t=e.blocks,n=e.selectedBlockClientId,o=e.selectBlock,r=e.showNestedBlocks;return Object(Yt.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list",role:"list"},Object(f.map)(t,function(e){var t=Object(i.getBlockType)(e.name),c=e.clientId===n;return Object(Yt.createElement)("li",{key:e.clientId},Object(Yt.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(Yt.createElement)(cn.Button,{className:Xt()("editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":c}),onClick:function(){return o(e.clientId)}},Object(Yt.createElement)(Nn,{icon:t.icon,showColors:!0}),t.title,c&&Object(Yt.createElement)("span",{className:"screen-reader-text"},Object(p.__)("(selected block)")))),r&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Yt.createElement)(Mn,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:o,showNestedBlocks:!0}))}))}var Rn=Object(Jt.compose)(Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getBlockHierarchyRootClientId,r=t.getBlock,i=t.getBlocks,c=n();return{rootBlocks:i(),rootBlock:c?r(o(c)):null,selectedBlockClientId:c}}),Object(l.withDispatch)(function(e,t){var n=t.onSelect,o=void 0===n?f.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),o(t)}}}))(function(e){var t=e.rootBlock,n=e.rootBlocks,o=e.selectedBlockClientId,r=e.selectBlock;if(!n||0===n.length)return null;var i=t&&(t.clientId!==o||t.innerBlocks&&0!==t.innerBlocks.length);return Object(Yt.createElement)(cn.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container block-editor-block-navigation__container"},Object(Yt.createElement)("p",{className:"editor-block-navigation__label block-editor-block-navigation__label"},Object(p.__)("Block Navigation")),i&&Object(Yt.createElement)(Mn,{blocks:[t],selectedBlockClientId:o,selectBlock:r,showNestedBlocks:!0}),!i&&Object(Yt.createElement)(Mn,{blocks:n,selectedBlockClientId:o,selectBlock:r}))}),An=Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Yt.createElement)(cn.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var Dn=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}})(function(e){var t=e.hasBlocks,n=e.isDisabled,o=t&&!n;return Object(Yt.createElement)(cn.Dropdown,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Yt.createElement)(Yt.Fragment,null,o&&Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Ln.rawShortcut.access("o"),n)}),Object(Yt.createElement)(cn.IconButton,{icon:An,"aria-expanded":t,onClick:o?n:void 0,label:Object(p.__)("Block Navigation"),className:"editor-block-navigation block-editor-block-navigation",shortcut:Ln.displayShortcut.access("o"),"aria-disabled":!o}))},renderContent:function(e){var t=e.onClose;return Object(Yt.createElement)(Rn,{onSelect:t})}})}),Pn=Object(Jt.createHigherOrderComponent)(Object(l.withSelect)(function(e,t){var n=e("core/block-editor").getSettings(),o=void 0===t.colors?n.colors:t.colors,r=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:o,disableCustomColors:r,hasColorsToChoose:!Object(f.isEmpty)(o)||!r}}),"withColorContext"),Fn=Pn(cn.ColorPalette),Hn=n(45),Un=n.n(Hn),Vn=function(e,t,n){if(t){var o=Object(f.find)(e,{slug:t});if(o)return o}return{color:n}},zn=function(e,t){return Object(f.find)(e,{color:t})};function Kn(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var Wn=[],Gn=function(e){return Object(Jt.createHigherOrderComponent)(function(t){return function(n){return Object(Yt.createElement)(t,Object(qt.a)({},n,{colors:e}))}},"withCustomColorPalette")},qn=function(){return Object(l.withSelect)(function(e){var t=e("core/block-editor").getSettings();return{colors:Object(f.get)(t,["colors"],Wn)}})};function Yn(e,t){var n=Object(f.reduce)(e,function(e,t){return Object(s.a)({},e,Object(f.isString)(t)?Object(b.a)({},t,Object(f.kebabCase)(t)):t)},{});return Object(Jt.compose)([t,function(e){return function(t){function o(e){var t;return Object(Qt.a)(this,o),(t=Object(tn.a)(this,Object(nn.a)(o).call(this,e))).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(rn.a)(Object(rn.a)(t)))},t.state={},t}return Object(on.a)(o,t),Object(en.a)(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Un.a.mostReadable(t,Object(f.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(n,function(t,n,o){var r=Object(f.upperFirst)(o),i="custom".concat(r);return t["set".concat(r)]=e.createSetColor(o,i),t},{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(o){var r,i=zn(n.props.colors,o);n.props.setAttributes((r={},Object(b.a)(r,e,i&&i.slug?i.slug:void 0),Object(b.a)(r,t,i&&i.slug?void 0:o),r))}}},{key:"render",value:function(){return Object(Yt.createElement)(e,Object(s.a)({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o=e.attributes,r=e.colors;return Object(f.reduce)(n,function(e,n,i){var c=Vn(r,o[i],o["custom".concat(Object(f.upperFirst)(i))]),a=t[i];return Object(f.get)(a,["color"])===c.color&&a?e[i]=a:e[i]=Object(s.a)({},c,{class:Kn(n,c.slug)}),e},{})}}]),o}(Yt.Component)}])}function $n(e){return function(){for(var t=Gn(e),n=arguments.length,o=new Array(n),r=0;r=24?"large":"small"}))return null;var s=a.getBrightness()1?function(e,t,n,o,r){var i=t+1;if(r<0&&n)return Object(p.__)("Blocks cannot be moved up as they are already at the top");if(r>0&&o)return Object(p.__)("Blocks cannot be moved down as they are already at the bottom");if(r<0&&!n)return Object(p.sprintf)(Object(p._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(r>0&&!o)return Object(p.sprintf)(Object(p._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,o,r,i):o&&r?Object(p.sprintf)(Object(p.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!r?Object(p.sprintf)(Object(p.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&r?Object(p.sprintf)(Object(p.__)("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!o?Object(p.sprintf)(Object(p.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&o?Object(p.sprintf)(Object(p.__)("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var co=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),ao=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),lo=Object(Yt.createElement)(cn.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Yt.createElement)(cn.Path,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),so=Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=(0,o.getBlockRootClientId)(n);return{index:r(n,i),rootClientId:i}})(function(e){var t=e.children,n=e.clientId,o=e.rootClientId,r=e.blockElementId,i=e.index,c=e.onDragStart,a=e.onDragEnd,l={type:"block",srcIndex:i,srcRootClientId:o,srcClientId:n};return Object(Yt.createElement)(cn.Draggable,{elementId:r,transferData:l,onDragStart:c,onDragEnd:a},function(e){var n=e.onDraggableStart,o=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:o})})}),uo=function(e){var t=e.isVisible,n=e.className,o=e.icon,r=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId;if(!t)return null;var l=Xt()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(Yt.createElement)(so,{clientId:a,blockElementId:c,onDragStart:r,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Yt.createElement)("div",{className:l,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},o)})},bo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e.onBlur=e.onBlur.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,o=e.isFirst,r=e.isLast,i=e.isDraggable,c=e.onDragStart,a=e.onDragEnd,l=e.clientIds,s=e.blockElementId,u=e.blockType,d=e.firstIndex,b=e.isLocked,h=e.instanceId,v=e.isHidden,m=this.state.isFocused,g=Object(f.castArray)(l).length;return b||o&&r?null:Object(Yt.createElement)("div",{className:Xt()("editor-block-mover block-editor-block-mover",{"is-visible":m||!v})},Object(Yt.createElement)(cn.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:t,icon:co,label:Object(p.__)("Move up"),"aria-describedby":"block-editor-block-mover__up-description-".concat(h),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Yt.createElement)(uo,{className:"editor-block-mover__control block-editor-block-mover__control",icon:lo,clientId:l,blockElementId:s,isVisible:i,onDragStart:c,onDragEnd:a}),Object(Yt.createElement)(cn.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:n,icon:ao,label:Object(p.__)("Move down"),"aria-describedby":"block-editor-block-mover__down-description-".concat(h),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Yt.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},io(g,u&&u.title,d,o,r,-1)),Object(Yt.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},io(g,u&&u.title,d,o,r,1)))}}]),t}(Yt.Component),fo=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockIndex,a=o.getTemplateLock,l=o.getBlockRootClientId,s=Object(f.first)(Object(f.castArray)(n)),u=r(s),d=l(Object(f.first)(Object(f.castArray)(n)));return{firstIndex:c(s,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===a(d),rootClientId:d}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,o=t.rootClientId,r=e("core/block-editor"),i=r.moveBlocksDown,c=r.moveBlocksUp;return{onMoveDown:Object(f.partial)(i,n,o),onMoveUp:Object(f.partial)(c,n,o)}}),Jt.withInstanceId)(bo);var po=Object(l.withSelect)(function(e){var t=e("core").canUser;return{hasUploadPermissions:Object(f.defaultTo)(t("create","media"),!0)}})(function(e){var t=e.hasUploadPermissions,n=e.fallback,o=void 0===n?null:n,r=e.children;return t?r:o}),ho=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(rn.a)(Object(rn.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(rn.a)(Object(rn.a)(e))),e.onDrop=e.onDrop.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getInsertIndex",value:function(e){var t=this.props,n=t.clientId,o=t.rootClientId,r=t.getBlockIndex;if(void 0!==n){var i=r(n,o);return"top"===e.y?i:i+1}}},{key:"onFilesDrop",value:function(e,t){var n=Object(i.findTransform)(Object(i.getBlockTransforms)("from"),function(t){return"files"===t.type&&t.isMatch(e)});if(n){var o=this.getInsertIndex(t),r=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(r,o)}}},{key:"onHTMLDrop",value:function(e,t){var n=Object(i.pasteHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,o=n.rootClientId,r=n.clientId,i=n.getClientIdsOfDescendants,c=n.getBlockIndex,a=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),l=a.srcRootClientId,s=a.srcClientId,u=a.srcIndex,d=a.type;if("block"===d&&s!==r&&!function(e,t){return i([e]).some(function(e){return e===t})}(s,r||o)){var b,f,p=r?c(r,o):void 0,h=this.getInsertIndex(t),v=p&&u0&&Object(Yt.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},Yt.Children.map(n,function(e,t){return Object(Yt.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)}))),r&&Object(Yt.createElement)(cn.Dropdown,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Yt.createElement)(cn.IconButton,{icon:"ellipsis",label:Object(p.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Yt.createElement)(cn.MenuGroup,null,r.map(function(e,t){return Object(Yt.createElement)(cn.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},go=n(207),Oo=function(e){var t=e.title,n=e.rawContent,o=e.renderedContent,r=e.action,i=e.actionText,c=e.className;return Object(Yt.createElement)("div",{className:c},Object(Yt.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(Yt.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(Yt.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(Yt.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},o)),Object(Yt.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(Yt.createElement)(cn.Button,{isLarge:!0,tabIndex:"0",onClick:r},i)))},ko=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getDifference",value:function(e,t){return Object(go.diffChars)(e,t).map(function(e,t){var n=Xt()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(Yt.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Object(i.getSaveElement)(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(f.castArray)(e),n=t.map(function(e){return Object(i.getSaveContent)(e.name,e.attributes,e.innerBlocks)}),o=t.map(function(e){return Object(i.getSaveElement)(e.name,e.attributes,e.innerBlocks)});return{rawContent:n.join(""),renderedContent:o}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,o=e.onConvert,r=e.convertor,i=e.convertButtonText,c=this.getOriginalContent(t),a=this.getConvertedContent(r(t)),l=this.getDifference(c.rawContent,a.rawContent);return Object(Yt.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(Yt.createElement)(Oo,{title:Object(p.__)("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:Object(p.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(Yt.createElement)(Oo,{title:Object(p.__)("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:o,actionText:i,rawContent:l,renderedContent:a.renderedContent}))}}]),t}(Yt.Component),jo=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(rn.a)(Object(rn.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(rn.a)(Object(rn.a)(n))),n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,o=e.convertToClassic,r=e.attemptBlockRecovery,c=e.block,a=!!Object(i.getBlockType)("core/html"),l=this.state.compare,s=[{title:Object(p.__)("Convert to Classic Block"),onClick:o},{title:Object(p.__)("Attempt Block Recovery"),onClick:r}];return l?Object(Yt.createElement)(cn.Modal,{title:Object(p.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(Yt.createElement)(ko,{block:c,onKeep:t,onConvert:n,convertor:yo,convertButtonText:Object(p.__)("Convert to Blocks")})):Object(Yt.createElement)(mo,{actions:[Object(Yt.createElement)(cn.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},Object(p._x)("Resolve","imperative verb")),a&&Object(Yt.createElement)(cn.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(p.__)("Convert to HTML"))],secondaryActions:s},Object(p.__)("This block contains unexpected or invalid content."))}}]),t}(Yt.Component),yo=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},_o=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}}),Object(l.withDispatch)(function(e,t){var n=t.block,o=e("core/block-editor").replaceBlock;return{convertToClassic:function(){o(n.clientId,function(e){return Object(i.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){o(n.clientId,function(e){return Object(i.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){o(n.clientId,yo(n))},attemptBlockRecovery:function(){var e,t,r,c;o(n.clientId,(t=(e=n).name,r=e.attributes,c=e.innerBlocks,Object(i.createBlock)(t,r,c)))}}})])(jo),So=Object(Yt.createElement)(mo,null,Object(p.__)("This block has encountered an error and cannot be previewed.")),Co=function(){return So},Eo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(Yt.Component),wo=n(61),Io=n.n(wo),To=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onBlur=n.onBlur.bind(Object(rn.a)(Object(rn.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(e){Object(f.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(i.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(i.getBlockType)(this.props.block.name),n=Object(i.getBlockAttributes)(t,e,this.props.block.attributes),o=e||Object(i.getSaveContent)(t,n),r=!e||Object(i.isValidBlockContent)(t,n,o);this.props.onChange(this.props.clientId,n,o,r),e||this.setState({html:o})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(Yt.createElement)(Io.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Yt.Component),Bo=Object(Jt.compose)([Object(l.withSelect)(function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}}),Object(l.withDispatch)(function(e){return{onChange:function(t,n,o,r){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:o,isValid:r})}}})])(To);var xo=Object(l.withSelect)(function(e,t){return{name:(0,e("core/block-editor").getBlockName)(t.clientId)}})(function(e){var t=e.name;if(!t)return null;var n=Object(i.getBlockType)(t);return n?n.title:null}),Lo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(rn.a)(Object(rn.a)(e))),e.onBlur=e.onBlur.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(Yt.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(Yt.createElement)(cn.Toolbar,null,n&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(xo,{clientId:n}),Object(Yt.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(Yt.createElement)(xo,{clientId:t})))}}]),t}(Yt.Component),No=Object(Jt.compose)([Object(l.withSelect)(function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}})])(Lo),Mo=window,Ro=Mo.Node,Ao=Mo.getSelection,Do=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(rn.a)(Object(rn.a)(e))),e.focusSelection=e.focusSelection.bind(Object(rn.a)(Object(rn.a)(e))),e.switchOnKeyDown=Object(f.cond)([[Object(f.matchesProperty)(["keyCode"],Ln.ESCAPE),e.focusSelection]]),e.toolbar=Object(Yt.createRef)(),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"focusToolbar",value:function(){var e=ro.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Ao();if(e){var t=e.focusNode;t.nodeType!==Ro.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(u.a)(e,["children"]);return Object(Yt.createElement)(cn.NavigableMenu,Object(qt.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(f.omit)(n,["focusOnMount"])),Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Yt.Component);var Po=function(e){var t=e.focusOnMount;return Object(Yt.createElement)(Do,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":Object(p.__)("Block tools")},Object(Yt.createElement)(ac,null))};var Fo=Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getMultiSelectedBlockClientIds,i=o.isMultiSelecting,c=o.getBlockIndex,a=o.getBlockCount,l=r(),s=c(Object(f.first)(l),n),u=c(Object(f.last)(l),n);return{multiSelectedBlockClientIds:l,isSelecting:i(),isFirst:0===s,isLast:u+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,o=e.isSelecting,r=e.isFirst,i=e.isLast;return o?null:Object(Yt.createElement)(fo,{key:"mover",clientId:n,clientIds:t,isFirst:r,isLast:i})}),Ho=n(67),Uo=n.n(Ho),Vo=n(25);function zo(e){var t=e.name,n=e.attributes,o=Object(i.createBlock)(t,n);return Object(Yt.createElement)(cn.Disabled,{className:"editor-block-preview__content block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Yt.createElement)(En,{name:t,focus:!1,attributes:o.attributes,setAttributes:f.noop}))}var Ko=function(e){return Object(Yt.createElement)("div",{className:"editor-block-preview block-editor-block-preview"},Object(Yt.createElement)("div",{className:"editor-block-preview__title block-editor-block-preview__title"},Object(p.__)("Preview")),Object(Yt.createElement)(zo,e))};var Wo=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,o=e.onClick,r=e.isDisabled,i=e.title,c=e.className,a=Object(u.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),l=t?{backgroundColor:t.background,color:t.foreground}:{},s=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Yt.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object(Yt.createElement)("button",Object(qt.a)({className:Xt()("editor-block-types-list__item block-editor-block-types-list__item",c,{"editor-block-types-list__item-has-children block-editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),o()},disabled:r,"aria-label":i},a),Object(Yt.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:l},Object(Yt.createElement)(Nn,{icon:t,showColors:!0}),n&&Object(Yt.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:s})),Object(Yt.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},i)))};var Go=function(e){var t=e.items,n=e.onSelect,o=e.onHover,r=void 0===o?function(){}:o,c=e.children;return Object(Yt.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map(function(e){return Object(Yt.createElement)(Wo,{key:e.id,className:Object(i.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),r(null)},onFocus:function(){return r(e)},onMouseEnter:function(){return r(e)},onMouseLeave:function(){return r(null)},onBlur:function(){return r(null)},isDisabled:e.isDisabled,title:e.title})}),c)};var qo=Object(Jt.compose)(Object(Jt.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(n));return{rootBlockTitle:o&&o.title,rootBlockIcon:o&&o.icon}}))(function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,o=e.items,r=Object(u.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(Yt.createElement)("div",{className:"editor-inserter__child-blocks block-editor-inserter__child-blocks"},(t||n)&&Object(Yt.createElement)("div",{className:"editor-inserter__parent-block-header block-editor-inserter__parent-block-header"},Object(Yt.createElement)(Nn,{icon:t,showColors:!0}),n&&Object(Yt.createElement)("h2",null,n)),Object(Yt.createElement)(Go,Object(qt.a)({items:o},r)))}),Yo=function(e){return e.stopPropagation()},$o=function(e){return e=(e=(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Xo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(rn.a)(Object(rn.a)(e))),e.onHover=e.onHover.bind(Object(rn.a)(Object(rn.a)(e))),e.panels={},e.inserterResults=Object(Yt.createRef)(),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchReusableBlocks(),this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"onChangeSearchInput",value:function(e){this.filter(e.target.value)}},{key:"onHover",value:function(e){this.setState({hoveredItem:e});var t=this.props,n=t.showInsertionPoint,o=t.hideInsertionPoint;e?n():o()}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(f.without)(t.state.openPanels,e)}):(t.setState({openPanels:[].concat(Object(d.a)(t.state.openPanels),[e])}),t.props.setTimeout(function(){Uo()(t.panels[e],t.inserterResults.current,{alignWithTop:!0})}))}}},{key:"filterOpenPanels",value:function(e,t,n,o){if(e===this.state.filterValue)return this.state.openPanels;if(!e)return["suggested"];var r=[];return o.length>0&&r.push("reusable"),n.length>0&&(r=r.concat(Object.keys(t))),r}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,o=t.items,r=t.rootChildBlocks,c=function(e,t){var n=$o(t),o=function(e){return-1!==$o(e).indexOf(n)},r=Object(i.getCategories)();return e.filter(function(e){var t=Object(f.find)(r,{slug:e.category});return o(e.title)||Object(f.some)(e.keywords,o)||t&&o(t.title)})}(o,e),a=Object(f.filter)(c,function(e){var t=e.name;return Object(f.includes)(r,t)}),l=[];if(!e){var s=this.props.maxSuggestedItems||9;l=Object(f.filter)(o,function(e){return e.utility>0}).slice(0,s)}var u=Object(f.filter)(c,{category:"reusable"}),d=function(e){return Object(f.findIndex)(Object(i.getCategories)(),function(t){return t.slug===e.category})},b=Object(f.flow)(function(e){return Object(f.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(f.sortBy)(e,d)},function(e){return Object(f.groupBy)(e,"category")})(c);this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:l,reusableItems:u,itemsPerCategory:b,openPanels:this.filterOpenPanels(e,b,c,u)});var h=Object.keys(b).reduce(function(e,t){return e+b[t].length},0);n(Object(p.sprintf)(Object(p._n)("%d result found.","%d results found.",h),h))}},{key:"onKeyDown",value:function(e){Object(f.includes)([Ln.LEFT,Ln.DOWN,Ln.RIGHT,Ln.UP,Ln.BACKSPACE,Ln.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,o=t.onSelect,r=t.rootClientId,c=this.state,a=c.childItems,l=c.hoveredItem,s=c.itemsPerCategory,u=c.openPanels,d=c.reusableItems,b=c.suggestedItems,h=function(e){return-1!==u.indexOf(e)};return Object(Yt.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu",onKeyPress:Yo,onKeyDown:this.onKeyDown},Object(Yt.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(p.__)("Search for a block")),Object(Yt.createElement)("input",{id:"block-editor-inserter__search-".concat(n),type:"search",placeholder:Object(p.__)("Search for a block"),className:"editor-inserter__search block-editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(Yt.createElement)("div",{className:"editor-inserter__results block-editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(p.__)("Available block types")},Object(Yt.createElement)(qo,{rootClientId:r,items:a,onSelect:o,onHover:this.onHover}),!!b.length&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p._x)("Most Used","blocks"),opened:h("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Yt.createElement)(Go,{items:b,onSelect:o,onHover:this.onHover})),Object(f.map)(Object(i.getCategories)(),function(t){var n=s[t.slug];return n&&n.length?Object(Yt.createElement)(cn.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:h(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(Yt.createElement)(Go,{items:n,onSelect:o,onHover:e.onHover})):null}),!!d.length&&Object(Yt.createElement)(cn.PanelBody,{className:"editor-inserter__reusable-blocks-panel block-editor-inserter__reusable-blocks-panel",title:Object(p.__)("Reusable"),opened:h("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(Yt.createElement)(Go,{items:d,onSelect:o,onHover:this.onHover}),Object(Yt.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(Vo.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(p.__)("Manage All Reusable Blocks"))),Object(f.isEmpty)(b)&&Object(f.isEmpty)(d)&&Object(f.isEmpty)(s)&&Object(Yt.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(p.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object(Yt.createElement)(Ko,{name:l.name,attributes:l.initialAttributes}))}}]),t}(Yt.Component),Jo=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.isAppender,r=t.rootClientId,i=e("core/block-editor"),c=i.getInserterItems,a=i.getBlockName,l=i.getBlockRootClientId,s=i.getBlockSelectionEnd,u=e("core/blocks").getChildBlockNames,d=r;if(!d&&!n&&!o){var b=s();b&&(d=l(b)||void 0)}return{rootChildBlocks:u(a(d)),items:c(d),destinationRootClientId:d}}),Object(l.withDispatch)(function(e,t,n){var o=n.select,r=e("core/block-editor"),c=r.showInsertionPoint,a=r.hideInsertionPoint;function l(){var e=o("core/block-editor"),n=e.getBlockIndex,r=e.getBlockSelectionEnd,i=e.getBlockOrder,c=t.clientId,a=t.destinationRootClientId,l=t.isAppender;if(c)return n(c,a);var s=r();return!l&&s?n(s,a)+1:i(a).length}return{fetchReusableBlocks:e("core/editor").__experimentalFetchReusableBlocks,showInsertionPoint:function(){var e=l();c(t.destinationRootClientId,e)},hideInsertionPoint:a,onSelect:function(n){var r=e("core/block-editor"),c=r.replaceBlocks,a=r.insertBlock,s=o("core/block-editor").getSelectedBlock,u=t.isAppender,d=n.name,b=n.initialAttributes,f=s(),p=Object(i.createBlock)(d,b);!u&&f&&Object(i.isUnmodifiedDefaultBlock)(f)?c(f.clientId,p):a(p,l(),t.destinationRootClientId),t.onSelect()}}}),cn.withSpokenMessages,Jt.withInstanceId,Jt.withSafeTimeout)(Xo),Zo=function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Yt.createElement)(cn.IconButton,{icon:"insert",label:Object(p.__)("Add block"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle block-editor-inserter__toggle","aria-haspopup":"true","aria-expanded":o,disabled:n})},Qo=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(rn.a)(Object(rn.a)(e))),e.renderToggle=e.renderToggle.bind(Object(rn.a)(Object(rn.a)(e))),e.renderContent=e.renderContent.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,o=this.props,r=o.disabled,i=o.renderToggle,c=void 0===i?Zo:i;return c({onToggle:t,isOpen:n,disabled:r})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,o=n.rootClientId,r=n.clientId,i=n.isAppender;return Object(Yt.createElement)(Jo,{onSelect:t,rootClientId:o,clientId:r,isAppender:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Yt.createElement)(cn.Dropdown,{className:"editor-inserter block-editor-inserter",contentClassName:"editor-inserter__popover block-editor-inserter__popover",position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:n,renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(Yt.Component),er=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor").hasInserterItems;return{title:(0,e("core/editor").getEditedPostAttribute)("title"),hasItems:o(n)}}),Object(Jt.ifCondition)(function(e){return e.hasItems})])(Qo);var tr=Object(a.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(Yt.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(Yt.createElement)(er,null),Object(Yt.createElement)(fo,{clientIds:[t]}))}),nr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(rn.a)(Object(rn.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,o=t.rootClientId,r=t.clientId;return Object(Yt.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(Yt.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(Yt.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Xt()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Yt.createElement)(er,{rootClientId:o,clientId:r})))}}]),t}(Yt.Component),or=Object(l.withSelect)(function(e,t){var n=t.clientId,o=t.rootClientId,r=e("core/block-editor"),i=r.getBlockIndex,c=r.getBlockInsertionPoint,a=r.isBlockInsertionPointVisible,l=i(n,o),s=c();return{showInsertionPoint:a()&&s.index===l&&s.rootClientId===o}})(nr),rr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(rn.a)(Object(rn.a)(e))),e.eventMap={},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,o=void 0===n?[]:n,r=t.forwardedRef,i=Object(u.a)(t,["childHandledEvents","forwardedRef"]),c=Object(f.reduce)([].concat(Object(d.a)(o),Object(d.a)(Object.keys(i))),function(t,n){var o=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(o){!!o[2]&&delete i[n];var r="on"+o[1];t[r]=e.proxyEvent,e.eventMap[o[1].toLowerCase()]=r}return t},{});return Object(Yt.createElement)("div",Object(qt.a)({ref:r},i,c))}}]),t}(Yt.Component),ir=function(e,t){return Object(Yt.createElement)(rr,Object(qt.a)({},e,{forwardedRef:t}))};ir.displayName="IgnoreNestedEvents";var cr=Object(Yt.forwardRef)(ir);var ar=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getInserterItems,i=o.getTemplateLock;return{items:r(n),isLocked:!!i(n)}}),Object(l.withDispatch)(function(e,t){var n=t.clientId,o=t.rootClientId;return{onInsert:function(t){var r=t.name,c=t.initialAttributes,a=Object(i.createBlock)(r,c);n?e("core/block-editor").replaceBlocks(n,a):e("core/block-editor").insertBlock(a,void 0,o)}}}))(function(e){var t=e.items,n=e.isLocked,o=e.onInsert;if(n)return null;var r=Object(f.filter)(t,function(e){return!(e.isDisabled||e.name===Object(i.getDefaultBlockName)()&&Object(f.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(Yt.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},r.map(function(e){return Object(Yt.createElement)(cn.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block block-editor-inserter-with-shortcuts__block",onClick:function(){return o(e)},label:Object(p.sprintf)(Object(p.__)("Add %s"),e.title),icon:Object(Yt.createElement)(Nn,{icon:e.icon})})}))}),lr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(rn.a)(Object(rn.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentWillUnmount",value:function(){this.props.container&&this.toggleListeners(this.props.container,!1)}},{key:"componentDidMount",value:function(){this.props.container&&this.toggleListeners(this.props.container)}},{key:"componentDidUpdate",value:function(e){e.container!==this.props.container&&(e.container&&this.toggleListeners(e.container,!1),this.props.container&&this.toggleListeners(this.props.container,!0))}},{key:"toggleListeners",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?"addEventListener":"removeEventListener";e[t]("mousemove",this.onMouseMove),e[t]("mouseleave",this.onMouseLeave)}},{key:"onMouseLeave",value:function(){this.state.hoverArea&&this.setState({hoverArea:null})}},{key:"onMouseMove",value:function(e){var t=this.props,n=t.isRTL,o=t.container.getBoundingClientRect(),r=o.width,i=o.left,c=o.right,a=null;e.clientX-i0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;c(e,n)},onInsertBlocks:function(e,n){var o=t.rootClientId;l(e,n,o)},onInsertDefaultBlockAfter:function(){var e=t.clientId,n=t.rootClientId,r=(0,o("core/block-editor").getBlockIndex)(e,n);s({},n,r+1)},onInsertBlocksAfter:function(e){var n=t.clientId,r=t.rootClientId,i=(0,o("core/block-editor").getBlockIndex)(n,r);l(e,i+1,r)},onRemove:function(e){u(e)},onMerge:function(e){var n=t.clientId,r=o("core/block-editor"),i=r.getPreviousBlockClientId,c=r.getNextBlockClientId;if(e){var a=c(n);a&&d(n,a)}else{var l=i(n);l&&d(l,n)}},onReplace:function(e){b([t.clientId],e)},onMetaChange:function(e){(0,(0,o("core/block-editor").getSettings)().__experimentalMetaSource.onChange)(e)},onShiftSelection:function(){if(t.isSelectionEnabled){var e=o("core/block-editor").getBlockSelectionStart;e()?a(e(),t.clientId):c(t.clientId)}},toggleSelection:function(e){f(e)}}}),pr=Object(Jt.compose)(Jt.pure,Object(a.withViewportMatch)({isLargeViewport:"medium"}),br,fr,Object(cn.withFilters)("editor.BlockListBlock"))(dr),hr=n(57);var vr=Object(Jt.compose)(Object(Jt.withState)({hovered:!1}),Object(l.withSelect)(function(e,t){var n=e("core/block-editor"),o=n.getBlockCount,r=n.getBlockName,c=n.isBlockValid,a=n.getSettings,l=n.getTemplateLock,s=!o(t.rootClientId),u=r(t.lastBlockClientId)===Object(i.getDefaultBlockName)(),d=c(t.lastBlockClientId),b=a().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!l(t.rootClientId),placeholder:b}}),Object(l.withDispatch)(function(e,t){var n=e("core/block-editor"),o=n.insertDefaultBlock,r=n.startTyping;return{onAppend:function(){var e=t.rootClientId;o(void 0,e),r()}}}))(function(e){var t=e.isLocked,n=e.isVisible,o=e.onAppend,r=e.showPrompt,i=e.placeholder,c=e.rootClientId,a=e.hovered,l=e.setState;if(t||!n)return null;var s=Object(hr.decodeEntities)(i)||Object(p.__)("Start writing or type / to choose a block");return Object(Yt.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender block-editor-default-block-appender",onMouseEnter:function(){return l({hovered:!0})},onMouseLeave:function(){return l({hovered:!1})}},Object(Yt.createElement)(vo,{rootClientId:c}),Object(Yt.createElement)(Io.a,{role:"button","aria-label":Object(p.__)("Add block"),className:"editor-default-block-appender__content block-editor-default-block-appender__content",readOnly:!0,onFocus:o,value:r?s:""}),a&&Object(Yt.createElement)(ar,{rootClientId:c}),Object(Yt.createElement)(er,{rootClientId:c,position:"top right",isAppender:!0}))});var mr=Object(l.withSelect)(function(e,t){var n=t.rootClientId,o=e("core/block-editor"),r=o.getBlockOrder,c=o.canInsertBlockType;return{isLocked:!!(0,o.getTemplateLock)(n),blockClientIds:r(n),canInsertDefaultBlock:c(Object(i.getDefaultBlockName)(),n)}})(function(e){var t=e.blockClientIds,n=e.rootClientId,o=e.canInsertDefaultBlock;return e.isLocked?null:o?Object(Yt.createElement)(cr,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Yt.createElement)(vr,{rootClientId:n,lastBlockClientId:Object(f.last)(t)})):Object(Yt.createElement)("div",{className:"block-list-appender"},Object(Yt.createElement)(er,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object(Yt.createElement)(cn.IconButton,{label:Object(p.__)("Add block"),icon:"insert",onClick:t,className:"block-list-appender__toggle","aria-haspopup":"true","aria-expanded":o,disabled:n})},isAppender:!0}))}),gr=function(e){function t(e){var n;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(rn.a)(Object(rn.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(rn.a)(Object(rn.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(rn.a)(Object(rn.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(rn.a)(Object(rn.a)(n))),n.onPointerMove=Object(f.throttle)(n.onPointerMove.bind(Object(rn.a)(Object(rn.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("mousemove",this.setLastClientY)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.setLastClientY)}},{key:"setLastClientY",value:function(e){var t=e.clientY;this.lastClientY=t}},{key:"setBlockRef",value:function(e,t){null===e?delete this.nodes[t]:this.nodes=Object(s.a)({},this.nodes,Object(b.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=ur(this.selectionAtStart).getBoundingClientRect();if(!(t>=n.top&&t<=n.bottom)){var o=t-n.top,r=Object(f.findLast)(this.coordMapKeys,function(e){return e0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e}(t,n)||(n.colors||e).length>0}(t,n,e)})})(function(e){var t=e.children,n=e.colors,o=e.colorSettings,r=e.disableCustomColors,i=e.title,c=Object(u.a)(e,["children","colors","colorSettings","disableCustomColors","title"]),a=Object(Yt.createElement)("span",{className:"editor-panel-color-settings__panel-title block-editor-panel-color-settings__panel-title"},i,function(e,t){return e.map(function(e,n){var o=e.value,r=e.label,i=e.colors;if(!o)return null;var c=zn(i||t,o),a=c&&c.name,l=Object(p.sprintf)(Mr,r.toLowerCase(),a||o);return Object(Yt.createElement)(cn.ColorIndicator,{key:n,colorValue:o,"aria-label":l})})}(o,n));return Object(Yt.createElement)(cn.PanelBody,Object(qt.a)({className:"editor-panel-color-settings block-editor-panel-color-settings",title:a},c),o.map(function(e,t){return Object(Yt.createElement)(Nr,Object(qt.a)({key:t},Object(s.a)({colors:n,disableCustomColors:r},e)))}),t)}),Ar=Pn(Rr);var Dr=function(e){var t=e.onChange,n=e.className,o=Object(u.a)(e,["onChange","className"]);return Object(Yt.createElement)(Io.a,Object(qt.a)({className:Xt()("editor-plain-text block-editor-plain-text",n),onChange:function(e){return t(e.target.value)}},o))},Pr=n(41),Fr=n.n(Pr),Hr=n(35),Ur=n(49),Vr=n.n(Ur),zr=Object(l.withSelect)(function(e){return{formatTypes:(0,e("core/rich-text").getFormatTypes)()}})(function(e){var t=e.formatTypes,n=e.onChange,o=e.value;return Object(Yt.createElement)(Yt.Fragment,null,t.map(function(e){var t=e.name,r=e.edit;if(!r)return null;var i=Object(c.getActiveFormat)(o,t),a=void 0!==i,l=Object(c.getActiveObject)(o),s=void 0!==l;return Object(Yt.createElement)(r,{key:t,isActive:a,activeAttributes:a&&i.attributes||{},isObjectActive:s,activeObjectAttributes:s&&l.attributes||{},value:o,onChange:n})}))}),Kr=function(e){var t=e.controls;return Object(Yt.createElement)("div",{className:"editor-format-toolbar block-editor-format-toolbar"},Object(Yt.createElement)(cn.Toolbar,null,t.map(function(e){return Object(Yt.createElement)(cn.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})}),Object(Yt.createElement)(cn.Slot,{name:"RichText.ToolbarControls"},function(e){return e.length&&Object(Yt.createElement)(cn.DropdownMenu,{icon:!1,position:"bottom left",label:Object(p.__)("More Rich Text Controls"),controls:Object(f.orderBy)(e.map(function(e){return Object(B.a)(e,1)[0].props}),"title")})})))},Wr=function(e){return Object(f.pickBy)(e,function(e,t){return n=t,Object(f.startsWith)(n,"aria-")&&!Object(f.isNil)(e);var n})},Gr=window.navigator.userAgent;var qr=Gr.indexOf("Trident")>=0,Yr=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(f.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(f.isEqual)(this.props.className,e.className)||(this.editorNode.className=Xt()("block-editor-rich-text__editable","editor-rich-text__editable",e.className));var n=function(e,t){var n=Object(f.keys)(Wr(e)),o=Object(f.keys)(Wr(t));return{removedKeys:Object(f.difference)(n,o),updatedKeys:o.filter(function(n){return!Object(f.isEqual)(e[n],t[n])})}}(this.props,e),o=n.removedKeys,r=n.updatedKeys;return o.forEach(function(e){return t.editorNode.removeAttribute(e)}),r.forEach(function(n){return t.editorNode.setAttribute(n,e[n])}),!1}},{key:"configureIsPlaceholderVisible",value:function(e){var t=String(!!e);this.editorNode.getAttribute("data-is-placeholder-visible")!==t&&this.editorNode.setAttribute("data-is-placeholder-visible",t)}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.props.setRef(e),qr&&(e?this.removeInternetExplorerInputFix=function(e){function t(e){e.stopImmediatePropagation();var t=document.createEvent("Event");t.initEvent("input",!0,!1),t.data=e.data,e.target.dispatchEvent(t)}function n(t){var n=t.target,o=t.keyCode;if((Ln.BACKSPACE===o||Ln.DELETE===o)&&e.contains(n)){var r=document.createEvent("Event");r.initEvent("input",!0,!1),r.data=null,n.dispatchEvent(r)}}return e.addEventListener("textinput",t),document.addEventListener("keyup",n,!0),function(){e.removeEventListener("textinput",t),document.removeEventListener("keyup",n,!0)}}(e):this.removeInternetExplorerInputFix())}},{key:"render",value:function(){var e,t=this.props,n=t.tagName,o=void 0===n?"div":n,r=t.style,i=t.record,c=t.valueToEditableHTML,a=t.className,l=t.isPlaceholderVisible,d=Object(u.a)(t,["tagName","style","record","valueToEditableHTML","className","isPlaceholderVisible"]);return delete d.setRef,Object(Yt.createElement)(o,Object(s.a)((e={role:"textbox","aria-multiline":!0,className:Xt()("block-editor-rich-text__editable","editor-rich-text__editable",a),contentEditable:!0},Object(b.a)(e,"data-is-placeholder-visible",l),Object(b.a)(e,"ref",this.bindEditorNode),Object(b.a)(e,"style",r),Object(b.a)(e,"suppressContentEditableWarning",!0),Object(b.a)(e,"dangerouslySetInnerHTML",{__html:c(i)}),e),d))}}]),t}(Yt.Component);var $r=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onUse",value:function(){return this.props.onUse(),!1}},{key:"render",value:function(){var e=this.props,t=e.character,n=e.type;return Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Ln.rawShortcut[n](t),this.onUse)})}}]),t}(Yt.Component),Xr=window.Node,Jr=Xr.TEXT_NODE,Zr=Xr.ELEMENT_NODE;function Qr(){var e=window.getSelection();if(0!==e.rangeCount){var t=e.getRangeAt(0).startContainer;if(t.nodeType===Jr&&(t=t.parentNode),t.nodeType===Zr){var n=t.closest("*[contenteditable]");if(n&&n.contains(t))return t.closest("ol,ul")}}}function ei(){var e=Qr();return!e||"true"===e.contentEditable}function ti(e,t){var n=Qr();return n?n.nodeName.toLowerCase()===e:e===t}var ni=function(e){var t=e.onTagNameChange,n=e.tagName,o=e.value,r=e.onChange;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)($r,{type:"primary",character:"[",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Yt.createElement)($r,{type:"primary",character:"]",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Yt.createElement)($r,{type:"primary",character:"m",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object(Yt.createElement)($r,{type:"primaryShift",character:"m",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object(Yt.createElement)(xn,null,Object(Yt.createElement)(cn.Toolbar,{controls:[t&&{icon:"editor-ul",title:Object(p.__)("Convert to unordered list"),isActive:ti("ul",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ul"})),ei()&&t("ul")}},t&&{icon:"editor-ol",title:Object(p.__)("Convert to ordered list"),isActive:ti("ol",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ol"})),ei()&&t("ol")}},{icon:"editor-outdent",title:Object(p.__)("Outdent list item"),shortcut:Object(p._x)("Backspace","keyboard key"),onClick:function(){r(Object(c.outdentListItems)(o))}},{icon:"editor-indent",title:Object(p.__)("Indent list item"),shortcut:Object(p._x)("Space","keyboard key"),onClick:function(){r(Object(c.indentListItems)(o,{type:n}))}}].filter(Boolean)})))},oi=[Ln.rawShortcut.primary("z"),Ln.rawShortcut.primaryShift("z"),Ln.rawShortcut.primary("y")],ri=Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(oi.map(function(e){return[e,function(e){return e.preventDefault()}]}))}),ii=function(){return ri};function ci(e){var t,n=e.name,o=e.shortcutType,r=e.shortcutCharacter,i=Object(u.a)(e,["name","shortcutType","shortcutCharacter"]),c="RichText.ToolbarControls";return n&&(c+=".".concat(n)),o&&r&&(t=Ln.displayShortcut[o](r)),Object(Yt.createElement)(cn.Fill,{name:c},Object(Yt.createElement)(cn.ToolbarButton,Object(qt.a)({},i,{shortcut:t})))}var ai=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onInput=e.onInput.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),t}(Yt.Component),li=window,si=li.getSelection,ui=li.getComputedStyle,di=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),bi=document.createElement("style");document.head.appendChild(bi);var fi=function(e){function t(e){var n,o=e.value,r=e.onReplace,a=e.multiline;return Object(Qt.a)(this,t),n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments)),!0!==a&&"p"!==a&&"li"!==a||(n.multilineTag=!0===a?"p":a),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Vr()("wp.editor.RichText onSplit prop",{plugin:"Gutenberg",alternative:"wp.editor.RichText unstableOnSplit prop"})):n.props.unstableOnSplit&&(n.onSplit=n.props.unstableOnSplit),n.onFocus=n.onFocus.bind(Object(rn.a)(Object(rn.a)(n))),n.onBlur=n.onBlur.bind(Object(rn.a)(Object(rn.a)(n))),n.onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.onPaste=n.onPaste.bind(Object(rn.a)(Object(rn.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(rn.a)(Object(rn.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(rn.a)(Object(rn.a)(n))),n.onInput=n.onInput.bind(Object(rn.a)(Object(rn.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(rn.a)(Object(rn.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(rn.a)(Object(rn.a)(n))),n.getRecord=n.getRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.createRecord=n.createRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.applyRecord=n.applyRecord.bind(Object(rn.a)(Object(rn.a)(n))),n.isEmpty=n.isEmpty.bind(Object(rn.a)(Object(rn.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(rn.a)(Object(rn.a)(n))),n.setRef=n.setRef.bind(Object(rn.a)(Object(rn.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(rn.a)(Object(rn.a)(n))),n.handleHorizontalNavigation=n.handleHorizontalNavigation.bind(Object(rn.a)(Object(rn.a)(n))),n.onPointerDown=n.onPointerDown.bind(Object(rn.a)(Object(rn.a)(n))),n.formatToValue=Fr()(n.formatToValue.bind(Object(rn.a)(Object(rn.a)(n))),{maxSize:1}),n.savedContent=o,n.patterns=function(e){var t=e.onReplace,n=e.valueToFormat,o=Object(i.getBlockTransforms)("from").filter(function(e){return"prefix"===e.type});return[function(e){if(!t)return e;var r=Object(c.getSelectionStart)(e),a=Object(c.getTextContent)(e),l=a.slice(r-1,r);if(!/\s/.test(l))return e;var s=a.slice(0,r).trim(),u=Object(i.findTransform)(o,function(e){var t=e.prefix;return s===t});if(!u)return e;var d=n(Object(c.slice)(e,r,a.length)),b=u.transform(d);return t([b]),e},function(e){var t=Object(c.getSelectionStart)(e),n=Object(c.getTextContent)(e);if("`"!==n.slice(t-1,t))return e;var o=n.slice(0,t-1).lastIndexOf("`");if(-1===o)return e;var r=o,i=t-2;return r===i?e:(e=Object(c.remove)(e,r,r+1),e=Object(c.remove)(e,i,i+1),e=Object(c.applyFormat)(e,{type:"code"},r,i))}]}({onReplace:r,valueToFormat:n.valueToFormat}),n.enterPatterns=Object(i.getBlockTransforms)("from").filter(function(e){return"enter"===e.type}),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(o),n.lastHistoryValue=o,n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){e?this.editableRef=e:delete this.editableRef}},{key:"setFocusedElement",value:function(){this.props.setFocusedElement&&this.props.setFocusedElement(this.props.instanceId)}},{key:"getRecord",value:function(){var e=this.formatToValue(this.props.value),t=e.formats,n=e.replacements,o=e.text,r=this.state;return{formats:t,replacements:n,text:o,start:r.start,end:r.end,activeFormats:r.activeFormats}}},{key:"createRecord",value:function(){var e=si(),t=e.rangeCount>0?e.getRangeAt(0):null;return Object(c.create)({element:this.editableRef,range:t,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,__unstableIsEditableTree:!0})}},{key:"applyRecord",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).domOnly;Object(c.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:this.props.prepareEditableTree,__unstableDomOnly:t})}},{key:"isEmpty",value:function(){return Object(c.isEmpty)(this.formatToValue(this.props.value))}},{key:"onPaste",value:function(e){var t=e.clipboardData,n=t.items,o=t.files;n=Object(f.isNil)(n)?[]:n,o=Object(f.isNil)(o)?[]:o;var r="",a="";try{r=t.getData("text/plain"),a=t.getData("text/html")}catch(e){try{a=t.getData("Text")}catch(e){return}}e.preventDefault(),window.console.log("Received HTML:\n\n",a),window.console.log("Received plain text:\n\n",r);var l=Object(f.find)([].concat(Object(d.a)(n),Object(d.a)(o)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)});if(l&&!a){var s=l.getAsFile?l.getAsFile():l,u=Object(i.pasteHandler)({HTML:''),mode:"BLOCKS",tagName:this.props.tagName}),b=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",s),void(b?this.props.onReplace(u):this.onSplit&&this.splitContent(u))}var p=this.getRecord();if(!Object(c.isCollapsed)(p)){var h=(a||r).replace(/<[^>]+>/g,"").trim();if(Object(Vo.isURL)(h))return this.onChange(Object(c.applyFormat)(p,{type:"a",attributes:{href:Object(hr.decodeEntities)(h)}})),void window.console.log("Created link:\n\n",h)}var v=this.props.onReplace&&this.isEmpty(),m="INLINE";v?m="BLOCKS":this.onSplit&&(m="AUTO");var g=Object(i.pasteHandler)({HTML:a,plainText:r,mode:m,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof g){var O=Object(c.create)({html:g});this.onChange(Object(c.insert)(p,O))}else if(this.onSplit){if(!g.length)return;v?this.props.onReplace(g):this.splitContent(g,{paste:!0})}}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),this.recalculateBoundaryStyle(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(e&&e.nativeEvent.isComposing)document.removeEventListener("selectionchange",this.onSelectionChange);else{if(e&&e.nativeEvent.inputType){var t=e.nativeEvent.inputType;if(0===t.indexOf("format")||di.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),o=this.state,r=o.activeFormats,i=void 0===r?[]:r,a=o.start,l=Object(c.__unstableUpdateFormats)({value:n,start:a,end:n.start,formats:i});this.onChange(l,{withoutHistory:!0});var u=this.patterns.reduce(function(e,t){return t(e)},l);u!==l&&(this.onCreateUndoLevel(),this.onChange(Object(s.a)({},u,{activeFormats:i}))),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onInput(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end;if(t!==this.state.start||n!==this.state.end){var o=this.props.isCaretWithinFormattedText,r=Object(c.__unstableGetActiveFormats)(e);!o&&r.length?this.props.onEnterFormattedText():o&&!r.length&&this.props.onExitFormattedText(),this.setState({start:t,end:n,activeFormats:r}),this.applyRecord(Object(s.a)({},e,{activeFormats:r}),{domOnly:!0}),r.length>0&&this.recalculateBoundaryStyle()}}},{key:"recalculateBoundaryStyle",value:function(){var e=this.editableRef.querySelector("*[data-rich-text-format-boundary]");if(e){var t=ui(e).color.replace(")",", 0.2)").replace("rgb","rgba"),n=".".concat("block-editor-rich-text__editable",":focus ").concat("*[data-rich-text-format-boundary]"),o="background-color: ".concat(t);bi.innerHTML="".concat(n," {").concat(o,"}")}}},{key:"onChangeEditableValue",value:function(e){var t=e.formats,n=e.text;Object(f.get)(this.props,["onChangeEditableValue"],[]).forEach(function(e){e(t,n)})}},{key:"onChange",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).withoutHistory;this.applyRecord(e);var n=e.start,o=e.end,r=e.activeFormats,i=void 0===r?[]:r;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:n,end:o,activeFormats:i}),t||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.savedContent&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.savedContent)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,o=t.onRemove;if(n||o){var r=e.keyCode===Ln.BACKSPACE;if(Object(c.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(ro.isHorizontalEdge)(this.editableRef,r))&&(n&&n(!r),o&&i&&r&&o(!r),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=e.shiftKey,o=e.altKey,r=e.metaKey,a=e.ctrlKey;if(n||o||r||a||t!==Ln.LEFT&&t!==Ln.RIGHT||this.handleHorizontalNavigation(e),t===Ln.SPACE&&"li"===this.multilineTag){var l=this.createRecord();if(Object(c.isCollapsed)(l)){var u=l.text[l.start-1];u&&u!==c.LINE_SEPARATOR||(this.onChange(Object(c.indentListItems)(l,{type:this.props.tagName})),e.preventDefault())}}if(t===Ln.DELETE||t===Ln.BACKSPACE){var b=this.createRecord(),f=b.replacements,p=b.text,h=b.start,v=b.end;if(0===h&&0!==v&&v===b.text.length)return this.onChange(Object(c.remove)(b)),void e.preventDefault();if(this.multilineTag){var m;if(t===Ln.BACKSPACE){var g=h-1;if(p[g]===c.LINE_SEPARATOR){var O=Object(c.isCollapsed)(b);if(O&&f[g]&&f[g].length){var k=f.slice();k[g]=f[g].slice(0,-1),m=Object(s.a)({},b,{replacements:k})}else m=Object(c.remove)(b,O?h-1:h,v)}}else if(p[v]===c.LINE_SEPARATOR){var j=Object(c.isCollapsed)(b);if(j&&f[v]&&f[v].length){var y=f.slice();y[v]=f[v].slice(0,-1),m=Object(s.a)({},b,{replacements:y})}else m=Object(c.remove)(b,h,j?v+1:v)}m&&(this.onChange(m),e.preventDefault())}this.onDeleteKeyDown(e)}else if(t===Ln.ENTER){e.preventDefault();var _=this.createRecord();if(this.props.onReplace){var S=Object(c.getTextContent)(_),C=Object(i.findTransform)(this.enterPatterns,function(e){return e.regExp.test(S)});if(C)return void this.props.onReplace([C.transform({content:S})])}this.multilineTag?e.shiftKey?this.onChange(Object(c.insertLineBreak)(_)):this.onSplit&&Object(c.isEmptyLine)(_)?this.onSplit.apply(this,Object(d.a)(Object(c.split)(_).map(this.valueToFormat))):this.onChange(Object(c.insertLineSeparator)(_)):e.shiftKey||!this.onSplit?this.onChange(Object(c.insertLineBreak)(_)):this.splitContent()}}},{key:"handleHorizontalNavigation",value:function(e){var t=this,n=this.createRecord(),o=n.formats,r=n.text,i=n.start,a=n.end,l=this.state.activeFormats,u=void 0===l?[]:l,d=Object(c.isCollapsed)(n),b="rtl"===ui(this.editableRef).direction?Ln.RIGHT:Ln.LEFT,f=e.keyCode===b;if(d&&0===u.length){if(0===i&&f)return;if(a===r.length&&!f)return}if(d){e.preventDefault();var p=o[i-1]||[],h=o[i]||[],v=u.length,m=h;if(p.length>h.length&&(m=p),p.lengthp.length&&v--):p.length>h.length&&(!f&&u.length>h.length&&v--,f&&u.length0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.onSplit){var n=this.createRecord(),o=Object(c.split)(n),r=Object(B.a)(o,2),i=r[0],a=r[1];Object(c.isEmpty)(a)?i=n:Object(c.isEmpty)(i)&&(a=n),t.paste&&(i=Object(c.isEmpty)(i)?null:i,a=Object(c.isEmpty)(a)?null:a),i&&(i=this.valueToFormat(i)),a&&(a=this.valueToFormat(a)),this.onSplit.apply(this,[i,a].concat(Object(d.a)(e)))}}},{key:"onPointerDown",value:function(e){var t=e.target;if(t!==this.editableRef&&!t.textContent){var n=t.parentNode,o=Array.from(n.childNodes).indexOf(t),r=t.ownerDocument.createRange(),i=si();r.setStart(t.parentNode,o),r.setEnd(t.parentNode,o+1),i.removeAllRanges(),i.addRange(r)}}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,o=n.tagName,r=n.value,i=n.isSelected;if(o===e.tagName&&r!==e.value&&r!==this.savedContent){if(Array.isArray(r)&&Object(f.isEqual)(r,this.savedContent))return;var a=this.formatToValue(r);if(i){var l=this.formatToValue(e.value),s=Object(c.getTextContent)(l).length;a.start=s,a.end=s}this.applyRecord(a),this.savedContent=r}if(Object.keys(this.props).some(function(n){return 0===n.indexOf("format_")&&(Object(f.isPlainObject)(t.props[n])?Object.keys(t.props[n]).some(function(o){return t.props[n][o]!==e[n][o]}):t.props[n]!==e[n])})){var u=this.formatToValue(r);i&&(u.start=this.state.start,u.end=this.state.end),this.applyRecord(u)}}},{key:"getFormatProps",value:function(){return Object(f.pickBy)(this.props,function(e,t){return t.startsWith("format_")})}},{key:"formatToValue",value:function(e){return Array.isArray(e)?Object(c.create)({html:i.children.toHTML(e),multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):"string"===this.props.format?Object(c.create)({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):null===e?Object(c.create)():e}},{key:"valueToEditableHTML",value:function(e){return Object(c.unstableToDom)({value:e,multilineTag:this.multilineTag,prepareEditableTree:this.props.prepareEditableTree}).body.innerHTML}},{key:"removeEditorOnlyFormats",value:function(e){return this.props.formatTypes.forEach(function(t){t.__experimentalCreatePrepareEditableTree&&(e=Object(c.removeFormat)(e,t.name,0,e.text.length))}),e}},{key:"valueToFormat",value:function(e){return e=this.removeEditorOnlyFormats(e),this.usedDeprecatedChildrenSource?i.children.fromDOM(Object(c.unstableToDom)({value:e,multilineTag:this.multilineTag,isEditableTree:!1}).body.childNodes):"string"===this.props.format?Object(c.toHTMLString)({value:e,multilineTag:this.multilineTag}):e}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,o=void 0===n?"div":n,r=t.style,i=t.wrapperClassName,c=t.className,a=t.inlineToolbar,l=void 0!==a&&a,s=t.formattingControls,u=t.placeholder,d=t.keepPlaceholderOnFocus,b=void 0!==d&&d,f=t.isSelected,p=t.autocompleters,h=t.onTagNameChange,v=o,m=this.multilineTag,g=Wr(this.props),O=u&&(!f||b)&&this.isEmpty(),k=Xt()(i,"editor-rich-text block-editor-rich-text"),j=this.getRecord();return Object(Yt.createElement)("div",{className:k,onFocus:this.setFocusedElement},f&&"li"===this.multilineTag&&Object(Yt.createElement)(ni,{onTagNameChange:h,tagName:o,value:j,onChange:this.onChange}),f&&!l&&Object(Yt.createElement)(xn,null,Object(Yt.createElement)(Kr,{controls:s})),f&&l&&Object(Yt.createElement)(cn.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar block-editor-rich-text__inline-toolbar"},Object(Yt.createElement)(Kr,{controls:s})),Object(Yt.createElement)(fn,{onReplace:this.props.onReplace,completers:p,record:j,onChange:this.onChange},function(t){var n=t.listBoxId,i=t.activeId;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(Yr,Object(qt.a)({tagName:o,style:r,record:j,valueToEditableHTML:e.valueToEditableHTML,isPlaceholderVisible:O,"aria-label":u,"aria-autocomplete":"list","aria-owns":n,"aria-activedescendant":i},g,{className:c,key:v,onPaste:e.onPaste,onInput:e.onInput,onCompositionEnd:e.onCompositionEnd,onKeyDown:e.onKeyDown,onFocus:e.onFocus,onBlur:e.onBlur,onMouseDown:e.onPointerDown,onTouchStart:e.onPointerDown,setRef:e.setRef})),O&&Object(Yt.createElement)(o,{className:Xt()("editor-rich-text__editable block-editor-rich-text__editable",c),style:r},m?Object(Yt.createElement)(m,null,u):u),f&&Object(Yt.createElement)(zr,{value:j,onChange:e.onChange}))}),f&&Object(Yt.createElement)(ii,null))}}]),t}(Yt.Component);fi.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var pi=Object(Jt.compose)([Jt.withInstanceId,un(function(e,t){return!1===t.isSelected?{clientId:e.clientId}:!0===t.isSelected?{isSelected:e.isSelected,clientId:e.clientId}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement,clientId:e.clientId}}),Object(l.withSelect)(function(e){var t=e("core/editor").canUserUseUnfilteredHTML,n=e("core/block-editor").isCaretWithinFormattedText,o=e("core/rich-text").getFormatTypes;return{canUserUseUnfilteredHTML:t(),isCaretWithinFormattedText:n(),formatTypes:o()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onCreateUndoLevel:t.__unstableMarkLastChangeAsPersistent,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}}),Jt.withSafeTimeout,Object(cn.withFilters)("experimentalRichText")])(fi);pi.Content=function(e){var t,n=e.value,o=e.tagName,r=e.multiline,c=Object(u.a)(e,["value","tagName","multiline"]),a=n;!0!==r&&"p"!==r&&"li"!==r||(t=!0===r?"p":r),Array.isArray(n)&&(a=i.children.toHTML(n)),!a&&t&&(a="<".concat(t,">"));var l=Object(Yt.createElement)(Yt.RawHTML,null,a);return o?Object(Yt.createElement)(o,Object(f.omit)(c,["format"]),l):l},pi.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},pi.Content.defaultProps={format:"string",value:""};var hi=pi,vi=Object(cn.withFilters)("editor.MediaUpload")(function(){return null}),mi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(rn.a)(Object(rn.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.renderSettings,o=e.position,r=void 0===o?"bottom center":o,i=e.focusOnMount,c=void 0===i?"firstElement":i,a=Object(u.a)(e,["children","renderSettings","position","focusOnMount"]),l=this.state.isSettingsExpanded,s=!!n&&l;return Object(Yt.createElement)(cn.Popover,Object(qt.a)({className:"editor-url-popover block-editor-url-popover",focusOnMount:c,position:r},a),Object(Yt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row"},t,!!n&&Object(Yt.createElement)(cn.IconButton,{className:"editor-url-popover__settings-toggle block-editor-url-popover__settings-toggle",icon:"arrow-down-alt2",label:Object(p.__)("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":l})),s&&Object(Yt.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row editor-url-popover__settings block-editor-url-popover__settings"},n()))}}]),t}(Yt.Component),gi=function(e){var t=e.src,n=e.onChange,o=e.onSubmit,r=e.onClose;return Object(Yt.createElement)(mi,{onClose:r},Object(Yt.createElement)("form",{className:"editor-media-placeholder__url-input-form block-editor-media-placeholder__url-input-form",onSubmit:o},Object(Yt.createElement)("input",{className:"editor-media-placeholder__url-input-field block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(p.__)("URL"),placeholder:Object(p.__)("Paste or type URL"),onChange:n,value:t}),Object(Yt.createElement)(cn.IconButton,{className:"editor-media-placeholder__url-input-submit-button block-editor-media-placeholder__url-input-submit-button",icon:"editor-break",label:Object(p.__)("Apply"),type:"submit"})))},Oi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(rn.a)(Object(rn.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(rn.a)(Object(rn.a)(e))),e.onUpload=e.onUpload.bind(Object(rn.a)(Object(rn.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(rn.a)(Object(rn.a)(e))),e.openURLInput=e.openURLInput.bind(Object(rn.a)(Object(rn.a)(e))),e.closeURLInput=e.closeURLInput.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(f.every)(e,function(e){return"image"===e||Object(f.startsWith)(e,"image/")})}},{key:"componentDidMount",value:function(){this.setState({src:Object(f.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(f.get)(e.value,["src"],"")!==Object(f.get)(this.props.value,["src"],"")&&this.setState({src:Object(f.get)(this.props.value,["src"],"")})}},{key:"onChangeSrc",value:function(e){this.setState({src:e.target.value})}},{key:"onSubmitSrc",value:function(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t=this.props,n=t.onSelect,o=t.multiple,r=t.onError,i=t.allowedTypes;(0,t.mediaUpload)({allowedTypes:i,filesList:e,onFileChange:o?n:function(e){var t=Object(B.a)(e,1)[0];return n(t)},onError:r})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.icon,o=e.className,r=e.labels,i=void 0===r?{}:r,c=e.onSelect,a=e.value,l=void 0===a?{}:a,s=e.onSelectURL,u=e.onHTMLDrop,d=void 0===u?f.noop:u,b=e.multiple,h=void 0!==b&&b,v=e.notices,m=e.allowedTypes,g=void 0===m?[]:m,O=e.hasUploadPermissions,k=e.mediaUpload,j=this.state,y=j.isURLInputVisible,_=j.src,S=i.instructions||"",C=i.title||"";if(O||s||(S=Object(p.__)("To edit this block, you need permission to upload media.")),!S||!C){var E=1===g.length,w=E&&"audio"===g[0],I=E&&"image"===g[0],T=E&&"video"===g[0];S||(O?(S=Object(p.__)("Drag a media file, upload a new one or select a file from your library."),w?S=Object(p.__)("Drag an audio, upload a new one or select a file from your library."):I?S=Object(p.__)("Drag an image, upload a new one or select a file from your library."):T&&(S=Object(p.__)("Drag a video, upload a new one or select a file from your library."))):!O&&s&&(S=Object(p.__)("Given your current role, you can only link a media file, you cannot upload."),w?S=Object(p.__)("Given your current role, you can only link an audio, you cannot upload."):I?S=Object(p.__)("Given your current role, you can only link an image, you cannot upload."):T&&(S=Object(p.__)("Given your current role, you can only link a video, you cannot upload.")))),C||(C=Object(p.__)("Media"),w?C=Object(p.__)("Audio"):I?C=Object(p.__)("Image"):T&&(C=Object(p.__)("Video")))}return Object(Yt.createElement)(cn.Placeholder,{icon:n,label:C,instructions:S,className:Xt()("editor-media-placeholder block-editor-media-placeholder",o),notices:v},Object(Yt.createElement)(po,null,!!k&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:d}),Object(Yt.createElement)(cn.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onChange:this.onUpload,accept:t,multiple:h},Object(p.__)("Upload"))),Object(Yt.createElement)(vi,{gallery:h&&this.onlyAllowsImages(),multiple:h,onSelect:c,allowedTypes:g,value:l.id,render:function(e){var t=e.open;return Object(Yt.createElement)(cn.Button,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:t},Object(p.__)("Media Library"))}})),s&&Object(Yt.createElement)("div",{className:"editor-media-placeholder__url-input-container block-editor-media-placeholder__url-input-container"},Object(Yt.createElement)(cn.Button,{className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:this.openURLInput,isToggled:y,isLarge:!0},Object(p.__)("Insert from URL")),y&&Object(Yt.createElement)(gi,{src:_,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput})))}}]),t}(Yt.Component),ki=Object(l.withSelect)(function(e){var t=e("core").canUser,n=e("core/block-editor").getSettings;return{hasUploadPermissions:Object(f.defaultTo)(t("create","media"),!0),mediaUpload:n().__experimentalMediaUpload}}),ji=Object(Jt.compose)(ki,Object(cn.withFilters)("editor.MediaPlaceholder"))(Oi),yi=n(33),_i=n.n(yi),Si=function(e){return e.stopPropagation()},Ci=function(e){function t(e){var n,o=e.autocompleteRef;return Object(Qt.a)(this,t),(n=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(rn.a)(Object(rn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(rn.a)(Object(rn.a)(n))),n.autocompleteRef=o||Object(Yt.createRef)(),n.inputRef=Object(Yt.createRef)(),n.updateSuggestions=Object(f.throttle)(n.updateSuggestions.bind(Object(rn.a)(Object(rn.a)(n))),200),n.suggestionNodes=[],n.state={posts:[],showSuggestions:!1,selectedSuggestion:null},n}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,o=t.selectedSuggestion;n&&null!==o&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Uo()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),setTimeout(function(){e.scrollingIntoView=!1},100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"updateSuggestions",value:function(e){var t=this;if(e.length<2||/^https?:/.test(e))this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});else{this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0});var n=_i()({path:Object(Vo.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,type:"post"})});n.then(function(e){t.suggestionsRequest===n&&(t.setState({posts:e,loading:!1}),e.length?t.props.debouncedSpeak(Object(p.sprintf)(Object(p._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):t.props.debouncedSpeak(Object(p.__)("No results."),"assertive"))}).catch(function(){t.suggestionsRequest===n&&t.setState({loading:!1})}),this.suggestionsRequest=n}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.updateSuggestions(t)}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,o=t.selectedSuggestion,r=t.posts,i=t.loading;if(n&&r.length&&!i){var c=this.state.posts[this.state.selectedSuggestion];switch(e.keyCode){case Ln.UP:e.stopPropagation(),e.preventDefault();var a=o?o-1:r.length-1;this.setState({selectedSuggestion:a});break;case Ln.DOWN:e.stopPropagation(),e.preventDefault();var l=null===o||o===r.length-1?0:o+1;this.setState({selectedSuggestion:l});break;case Ln.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(p.__)("Link selected.")));break;case Ln.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}else switch(e.keyCode){case Ln.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ln.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,o=void 0===n?"":n,r=t.autoFocus,i=void 0===r||r,c=t.instanceId,a=t.className,l=this.state,s=l.showSuggestions,u=l.posts,d=l.selectedSuggestion,b=l.loading;return Object(Yt.createElement)("div",{className:Xt()("editor-url-input block-editor-url-input",a)},Object(Yt.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(p.__)("URL"),required:!0,value:o,onChange:this.onChange,onInput:Si,placeholder:Object(p.__)("Paste URL or type to search"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":s,"aria-autocomplete":"list","aria-owns":"block-editor-url-input-suggestions-".concat(c),"aria-activedescendant":null!==d?"block-editor-url-input-suggestion-".concat(c,"-").concat(d):void 0,ref:this.inputRef}),b&&Object(Yt.createElement)(cn.Spinner,null),s&&!!u.length&&Object(Yt.createElement)(cn.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(Yt.createElement)("div",{className:"editor-url-input__suggestions block-editor-url-input__suggestions",id:"editor-url-input-suggestions-".concat(c),ref:this.autocompleteRef,role:"listbox"},u.map(function(t,n){return Object(Yt.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"block-editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:Xt()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===d}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===d},Object(hr.decodeEntities)(t.title)||Object(p.__)("(no title)"))}))))}}]),t}(Yt.Component),Ei=Object(cn.withSpokenMessages)(Object(Jt.withInstanceId)(Ci)),wi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(rn.a)(Object(rn.a)(e))),e.submitLink=e.submitLink.bind(Object(rn.a)(Object(rn.a)(e))),e.state={expanded:!1},e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,o=this.state.expanded,r=t?Object(p.__)("Edit Link"):Object(p.__)("Insert Link");return Object(Yt.createElement)("div",{className:"editor-url-input__button block-editor-url-input__button"},Object(Yt.createElement)(cn.IconButton,{icon:"admin-links",label:r,onClick:this.toggle,className:Xt()("components-toolbar__control",{"is-active":t})}),o&&Object(Yt.createElement)("form",{className:"editor-url-input__button-modal block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(Yt.createElement)("div",{className:"editor-url-input__button-modal-line block-editor-url-input__button-modal-line"},Object(Yt.createElement)(cn.IconButton,{className:"editor-url-input__back block-editor-url-input__back",icon:"arrow-left-alt",label:Object(p.__)("Close"),onClick:this.toggle}),Object(Yt.createElement)(Ei,{value:t||"",onChange:n}),Object(Yt.createElement)(cn.IconButton,{icon:"editor-break",label:Object(p.__)("Submit"),type:"submit"}))))}}]),t}(Yt.Component);var Ii=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=e("core/block-editor"),o=n.getBlocksByClientId,r=n.getTemplateLock,c=n.getBlockRootClientId,a=o(t.clientIds),l=Object(f.every)(a,function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)}),s=c(t.clientIds[0]);return{isLocked:!!r(s),blocks:a,canDuplicate:l,rootClientId:s,extraProps:t}}),Object(l.withDispatch)(function(e,t,n){var o=n.select,r=t.clientIds,c=t.rootClientId,a=t.blocks,l=t.isLocked,s=t.canDuplicate,u=e("core/block-editor"),d=u.insertBlocks,b=u.multiSelect,p=u.removeBlocks,h=u.insertDefaultBlock;return{onDuplicate:function(){if(!l&&s){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c),t=a.map(function(e){return Object(i.cloneBlock)(e)});d(t,e+1,c),t.length>1&&b(Object(f.first)(t).clientId,Object(f.last)(t).clientId)}},onRemove:function(){l||p(r)},onInsertBefore:function(){if(!l){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.first)(Object(f.castArray)(r)),c);h({},c,e)}},onInsertAfter:function(){if(!l){var e=(0,o("core/block-editor").getBlockIndex)(Object(f.last)(Object(f.castArray)(r)),c);h({},c,e+1)}}}})])(function(e){var t=e.onDuplicate,n=e.onRemove,o=e.onInsertBefore,r=e.onInsertAfter,i=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:r,onInsertBefore:o,isLocked:i,canDuplicate:c})}),Ti=function(e){return e.preventDefault(),e},Bi={duplicate:{raw:Ln.rawShortcut.primaryShift("d"),display:Ln.displayShortcut.primaryShift("d")},removeBlock:{raw:Ln.rawShortcut.access("z"),display:Ln.displayShortcut.access("z")},insertBefore:{raw:Ln.rawShortcut.primaryAlt("t"),display:Ln.displayShortcut.primaryAlt("t")},insertAfter:{raw:Ln.rawShortcut.primaryAlt("y"),display:Ln.displayShortcut.primaryAlt("y")}},xi=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(rn.a)(Object(rn.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(rn.a)(Object(rn.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,o=t.onMultiSelect;e.preventDefault(),o(Object(f.first)(n),Object(f.last)(n))}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,o=t.hasMultiSelection,r=t.onRemove,i=t.isLocked;o&&(e.preventDefault(),i||r(n))}},{key:"clearMultiSelection",value:function(){var e=this.props,t=e.hasMultiSelection,n=e.clearSelectedBlock;t&&(n(),window.getSelection().removeAllRanges())}},{key:"render",value:function(){var e,t=this.props.selectedBlockClientIds;return Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,Ln.rawShortcut.primary("a"),this.selectAll),Object(b.a)(e,"backspace",this.deleteSelectedBlocks),Object(b.a)(e,"del",this.deleteSelectedBlocks),Object(b.a)(e,"escape",this.clearMultiSelection),e)}),t.length>0&&Object(Yt.createElement)(Ii,{clientIds:t},function(e){var t,n=e.onDuplicate,o=e.onRemove,r=e.onInsertAfter,i=e.onInsertBefore;return Object(Yt.createElement)(cn.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(b.a)(t,Bi.duplicate.raw,Object(f.flow)(Ti,n)),Object(b.a)(t,Bi.removeBlock.raw,Object(f.flow)(Ti,o)),Object(b.a)(t,Bi.insertBefore.raw,Object(f.flow)(Ti,i)),Object(b.a)(t,Bi.insertAfter.raw,Object(f.flow)(Ti,r)),t)})}))}}]),t}(Yt.Component),Li=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getBlockOrder,o=t.getMultiSelectedBlockClientIds,r=t.hasMultiSelection,i=t.getBlockRootClientId,c=t.getTemplateLock,a=(0,t.getSelectedBlockClientId)(),l=a?[a]:o();return{rootBlocksClientIds:n(),hasMultiSelection:r(),isLocked:Object(f.some)(l,function(e){return!!c(i(e))}),selectedBlockClientIds:l}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{clearSelectedBlock:t.clearSelectedBlock,onMultiSelect:t.multiSelect,onRemove:t.removeBlocks}})])(xi),Ni=Object(l.withSelect)(function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(Yt.createElement)(cn.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block block-editor-skip-to-selected-block",onClick:function(){ur(t).closest(".block-editor-block-list__block").focus()}},Object(p.__)("Skip to the selected block"))}),Mi=n(135),Ri=n.n(Mi);function Ai(e,t,n){var o=new Ri.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}var Di=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core/blocks").getBlockStyles,c=o(n),a=Object(i.getBlockType)(c.name);return{name:c.name,attributes:c.attributes,className:c.attributes.className||"",styles:r(c.name),type:a}}),Object(l.withDispatch)(function(e,t){var n=t.clientId;return{onChangeClassName:function(t){e("core/block-editor").updateBlockAttributes(n,{className:t})}}})])(function(e){var t=e.styles,n=e.className,o=e.onChangeClassName,r=e.name,i=e.attributes,c=e.type,a=e.onSwitch,l=void 0===a?f.noop:a,u=e.onHoverClassName,b=void 0===u?f.noop:u;if(!t||0===t.length)return null;c.styles||Object(f.find)(t,"isDefault")||(t=[{name:"default",label:Object(p._x)("Default","block style"),isDefault:!0}].concat(Object(d.a)(t)));var h=function(e,t){var n=!0,o=!1,r=void 0;try{for(var i,c=new Ri.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;if(-1!==a.indexOf("is-style-")){var l=a.substring(9),s=Object(f.find)(e,{name:l});if(s)return s}}}catch(e){o=!0,r=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw r}}return Object(f.find)(e,"isDefault")}(t,n);function v(e){var t=Ai(n,h,e);o(t),b(null),l()}return Object(Yt.createElement)("div",{className:"editor-block-styles block-editor-block-styles"},t.map(function(e){var t=Ai(n,h,e);return Object(Yt.createElement)("div",{key:e.name,className:Xt()("editor-block-styles__item block-editor-block-styles__item",{"is-active":h===e}),onClick:function(){return v(e)},onKeyDown:function(t){Ln.ENTER!==t.keyCode&&Ln.SPACE!==t.keyCode||(t.preventDefault(),v(e))},onMouseEnter:function(){return b(t)},onMouseLeave:function(){return b(null)},role:"button",tabIndex:"0","aria-label":e.label||e.name},Object(Yt.createElement)("div",{className:"editor-block-styles__item-preview block-editor-block-styles__item-preview"},Object(Yt.createElement)(zo,{name:r,attributes:Object(s.a)({},i,{className:t})})),Object(Yt.createElement)("div",{className:"editor-block-styles__item-label block-editor-block-styles__item-label"},e.label||e.name))}))}),Pi=n(98);var Fi=Object(l.withSelect)(function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}})(function(e){var t=e.blocks,n=Object(Pi.count)(Object(i.serialize)(t),"words");return Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card block-editor-multi-selection-inspector__card"},Object(Yt.createElement)(Nn,{icon:Object(Yt.createElement)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),showColors:!0}),Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-content block-editor-multi-selection-inspector__card-content"},Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-title block-editor-multi-selection-inspector__card-title"},Object(p.sprintf)(Object(p._n)("%d block","%d blocks",t.length),t.length)),Object(Yt.createElement)("div",{className:"editor-multi-selection-inspector__card-description block-editor-multi-selection-inspector__card-description"},Object(p.sprintf)(Object(p._n)("%d word","%d words",n),n))))}),Hi=Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getSelectedBlockCount,r=t.getBlockName,c=e("core/blocks").getBlockStyles,a=n(),l=a&&r(a),s=a&&Object(i.getBlockType)(l),u=a&&c(l);return{count:o(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}})(function(e){var t=e.selectedBlockClientId,n=e.selectedBlockName,o=e.blockType,r=e.count,c=e.hasBlockStyles;if(r>1)return Object(Yt.createElement)(Fi,null);var a=n===Object(i.getUnregisteredTypeHandlerName)();return o&&t&&!a?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)("div",{className:"editor-block-inspector__card block-editor-block-inspector__card"},Object(Yt.createElement)(Nn,{icon:o.icon,showColors:!0}),Object(Yt.createElement)("div",{className:"editor-block-inspector__card-content block-editor-block-inspector__card-content"},Object(Yt.createElement)("div",{className:"editor-block-inspector__card-title block-editor-block-inspector__card-title"},o.title),Object(Yt.createElement)("div",{className:"editor-block-inspector__card-description block-editor-block-inspector__card-description"},o.description))),c&&Object(Yt.createElement)("div",null,Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Styles"),initialOpen:!1},Object(Yt.createElement)(Di,{clientId:t}))),Object(Yt.createElement)("div",null,Object(Yt.createElement)(xr.Slot,null)),Object(Yt.createElement)("div",null,Object(Yt.createElement)(Er.Slot,null,function(e){return!Object(f.isEmpty)(e)&&Object(Yt.createElement)(cn.PanelBody,{className:"editor-block-inspector__advanced block-editor-block-inspector__advanced",title:Object(p.__)("Advanced"),initialOpen:!1},e)})),Object(Yt.createElement)(Ni,{key:"back"})):Object(Yt.createElement)("span",{className:"editor-block-inspector__no-blocks block-editor-block-inspector__no-blocks"},Object(p.__)("No block selected."))}),Ui=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(rn.a)(Object(rn.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,o=t.hasMultiSelection,r=t.clearSelectedBlock,i=n||o;e.target===this.container&&i&&r()}},{key:"render",value:function(){return Object(Yt.createElement)("div",Object(qt.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(f.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Yt.Component),Vi=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,o=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:o()}}),Object(l.withDispatch)(function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}})])(Ui);var zi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlock,c=o.getBlockMode,a=r(n);return{mode:c(n),blockType:a?Object(i.getBlockType)(a.name):null}}),Object(l.withDispatch)(function(e,t){var n=t.onToggle,o=void 0===n?f.noop:n,r=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(r),o()}}})])(function(e){var t=e.blockType,n=e.mode,o=e.onToggleMode,r=e.small,c=void 0!==r&&r;if(!Object(i.hasBlockSupport)(t,"html",!0))return null;var a="visual"===n?Object(p.__)("Edit as HTML"):Object(p.__)("Edit visually");return Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"html"},!c&&a)});var Ki=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,c=o.canInsertBlockType,a=e("core/editor").__experimentalGetReusableBlock,l=e("core").canUser,s=r(n),u=1===s.length&&s[0]&&Object(i.isReusableBlock)(s[0])&&!!a(s[0].attributes.ref);return{isReusable:u,isVisible:u||c("core/block")&&Object(f.every)(s,function(e){return!!e&&e.isValid&&Object(i.hasBlockSupport)(e.name,"reusable",!0)})&&!!l("create","blocks")}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,o=t.onToggle,r=void 0===o?f.noop:o,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),r())},onConvertToReusable:function(){c(n),r()}}})])(function(e){var t=e.isVisible,n=e.isReusable,o=e.onConvertToStatic,r=e.onConvertToReusable;return t?Object(Yt.createElement)(Yt.Fragment,null,!n&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(p.__)("Add to Reusable Blocks")),n&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(p.__)("Convert to Regular Block"))):null});var Wi=Object(Jt.compose)([Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock,r=e("core").canUser,c=e("core/editor").__experimentalGetReusableBlock,a=o(n),l=a&&Object(i.isReusableBlock)(a)?c(a.attributes.ref):null;return{isVisible:!!l&&!!r("delete","blocks",l.id),isDisabled:l&&l.isTemporary}}),Object(l.withDispatch)(function(e,t,n){var o=t.clientId,r=t.onToggle,i=void 0===r?f.noop:r,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,l=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(p.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))){var e=l(o);a(e.attributes.ref),i()}}}})])(function(e){var t=e.isVisible,n=e.isDisabled,o=e.onDelete;return t?Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return o()}},Object(p.__)("Remove from Reusable Blocks")):null});function Gi(e){var t=e.shouldRender,n=e.onClick,o=e.small;if(!t)return null;var r=Object(p.__)("Convert to Blocks");return Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:n,icon:"screenoptions"},!o&&r)}var qi=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.getBlockContent)(n)}))}}}))(Gi),Yi=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientId,o=e("core/block-editor").getBlock(n);return{block:o,shouldRender:o&&o.name===Object(i.getFreeformContentHandlerName)()}}),Object(l.withDispatch)(function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.serialize)(n)}))}}}))(Gi),$i=Object(cn.createSlotFill)("_BlockSettingsMenuFirstItem"),Xi=$i.Fill,Ji=$i.Slot;Xi.Slot=Ji;var Zi=Xi,Qi=Object(cn.createSlotFill)("_BlockSettingsMenuPluginsExtension"),ec=Qi.Fill,tc=Qi.Slot;ec.Slot=tc;var nc=ec;var oc=Object(l.withDispatch)(function(e){var t=e("core/block-editor").selectBlock;return{onSelect:function(e){t(e)}}})(function(e){var t=e.clientIds,n=e.onSelect,o=Object(f.castArray)(t),r=o.length,i=o[0];return Object(Yt.createElement)(Ii,{clientIds:t},function(e){var o=e.onDuplicate,c=e.onRemove,a=e.onInsertAfter,l=e.onInsertBefore,s=e.canDuplicate,u=e.isLocked;return Object(Yt.createElement)(cn.Dropdown,{contentClassName:"editor-block-settings-menu__popover block-editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,o=e.isOpen,c=Xt()("editor-block-settings-menu__toggle block-editor-block-settings-menu__toggle",{"is-opened":o}),a=o?Object(p.__)("Hide options"):Object(p.__)("More options");return Object(Yt.createElement)(cn.Toolbar,{controls:[{icon:"ellipsis",title:a,onClick:function(){1===r&&n(i),t()},className:c,extraProps:{"aria-expanded":o}}]})},renderContent:function(e){var n=e.onClose;return Object(Yt.createElement)(cn.NavigableMenu,{className:"editor-block-settings-menu__content block-editor-block-settings-menu__content"},Object(Yt.createElement)(Zi.Slot,{fillProps:{onClose:n}}),1===r&&Object(Yt.createElement)(Yi,{clientId:i}),1===r&&Object(Yt.createElement)(qi,{clientId:i}),!u&&s&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"admin-page",shortcut:Bi.duplicate.display},Object(p.__)("Duplicate")),!u&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:l,icon:"insert-before",shortcut:Bi.insertBefore.display},Object(p.__)("Insert Before")),Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:Bi.insertAfter.display},Object(p.__)("Insert After"))),1===r&&Object(Yt.createElement)(zi,{clientId:i,onToggle:n}),Object(Yt.createElement)(Ki,{clientIds:t,onToggle:n}),Object(Yt.createElement)(nc.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Yt.createElement)("div",{className:"editor-block-settings-menu__separator block-editor-block-settings-menu__separator"}),1===r&&Object(Yt.createElement)(Wi,{clientId:i,onToggle:n}),!u&&Object(Yt.createElement)(cn.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:Bi.removeBlock.display},Object(p.__)("Remove Block")))}})})}),rc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(rn.a)(Object(rn.a)(e))),e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,o=t.onTransform,r=t.inserterItems,c=t.hasBlockStyles,a=this.state.hoveredClassName;if(!n||!n.length)return null;var l,u=Object(f.mapKeys)(r,function(e){return e.name}),d=Object(f.orderBy)(Object(f.filter)(Object(i.getPossibleBlockTransformations)(n),function(e){return e&&!!u[e.name]}),function(e){return u[e.name].frecency},"desc");if(1===Object(f.uniq)(Object(f.map)(n,"name")).length){var b=n[0].name,h=Object(i.getBlockType)(b);l=h.icon}else l="layout";return c||d.length?Object(Yt.createElement)(cn.Dropdown,{position:"bottom right",className:"editor-block-switcher block-editor-block-switcher",contentClassName:"editor-block-switcher__popover block-editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,o=e.isOpen,r=1===n.length?Object(p.__)("Change block type or style"):Object(p.sprintf)(Object(p._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(Yt.createElement)(cn.Toolbar,null,Object(Yt.createElement)(cn.IconButton,{className:"editor-block-switcher__toggle block-editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":o,label:r,tooltip:r,onKeyDown:function(e){o||e.keyCode!==Ln.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(Nn,{icon:l,showColors:!0}),Object(Yt.createElement)(cn.SVG,{className:"editor-block-switcher__transform block-editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Yt.createElement)(cn.Path,{d:"M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z"})))}))},renderContent:function(t){var r=t.onClose;return Object(Yt.createElement)(Yt.Fragment,null,c&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Block Styles"),initialOpen:!0},Object(Yt.createElement)(Di,{clientId:n[0].clientId,onSwitch:r,onHoverClassName:e.onHoverClassName})),0!==d.length&&Object(Yt.createElement)(cn.PanelBody,{title:Object(p.__)("Transform To:"),initialOpen:!0},Object(Yt.createElement)(Go,{items:d.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){o(n,e.id),r()}})),null!==a&&Object(Yt.createElement)(Ko,{name:n[0].name,attributes:Object(s.a)({},n[0].attributes,{className:a})}))}}):Object(Yt.createElement)(cn.Toolbar,null,Object(Yt.createElement)(cn.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon block-editor-block-switcher__no-switcher-icon",label:Object(p.__)("Block icon")},Object(Yt.createElement)(Nn,{icon:l,showColors:!0})))}}]),t}(Yt.Component),ic=Object(Jt.compose)(Object(l.withSelect)(function(e,t){var n=t.clientIds,o=e("core/block-editor"),r=o.getBlocksByClientId,i=o.getBlockRootClientId,c=o.getInserterItems,a=e("core/blocks").getBlockStyles,l=i(Object(f.first)(Object(f.castArray)(n))),s=r(n),u=s&&1===s.length?s[0]:null,d=u&&a(u.name);return{blocks:s,inserterItems:c(l),hasBlockStyles:d&&d.length>0}}),Object(l.withDispatch)(function(e,t){return{onTransform:function(n,o){e("core/block-editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,o))}}}))(rc);var cc=Object(l.withSelect)(function(e){var t=e("core/block-editor").getMultiSelectedBlockClientIds();return{isMultiBlockSelection:t.length>1,selectedBlockClientIds:t}})(function(e){var t=e.isMultiBlockSelection,n=e.selectedBlockClientIds;return t?Object(Yt.createElement)(ic,{key:"switcher",clientIds:n}):null});var ac=Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getBlockMode,r=t.getMultiSelectedBlockClientIds,i=t.isBlockValid,c=n();return{blockClientIds:c?[c]:r(),isValid:c?i(c):null,mode:c?o(c):null}})(function(e){var t=e.blockClientIds,n=e.isValid,o=e.mode;return 0===t.length?null:t.length>1?Object(Yt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},Object(Yt.createElement)(cc,null),Object(Yt.createElement)(oc,{clientIds:t})):Object(Yt.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},"visual"===o&&n&&Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(ic,{clientIds:t}),Object(Yt.createElement)(Sn.Slot,null),Object(Yt.createElement)(xn.Slot,null)),Object(Yt.createElement)(oc,{clientIds:t}))});var lc=Object(Jt.compose)([Object(l.withDispatch)(function(e,t,n){var o=(0,n.select)("core/block-editor"),r=o.getBlocksByClientId,c=o.getMultiSelectedBlockClientIds,a=o.getSelectedBlockClientId,l=o.hasMultiSelection,s=e("core/block-editor").removeBlocks,u=function(e){var t=a()?[a()]:c();if(0!==t.length&&(l()||!Object(ro.documentHasSelection)())){var n=Object(i.serialize)(r(t));e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",n),e.preventDefault()}};return{onCopy:u,onCut:function(e){if(u(e),l()){var t=a()?[a()]:c();s(t)}}}})])(function(e){var t=e.children,n=e.onCopy,o=e.onCut;return Object(Yt.createElement)("div",{onCopy:n,onCut:o},t)}),sc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=ur(e);if(t){var n=Object(ro.getScrollContainer)(t);n&&Uo()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Yt.Component),uc=Object(l.withSelect)(function(e){return{extentClientId:(0,e("core/block-editor").getLastMultiSelectedBlockClientId)()}})(sc),dc=[Ln.UP,Ln.RIGHT,Ln.DOWN,Ln.LEFT,Ln.ENTER,Ln.BACKSPACE];var bc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(rn.a)(Object(rn.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(rn.a)(Object(rn.a)(e))),e.onKeyDown=Object(f.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.toggleEventBindings(this.props.isTyping)}},{key:"componentDidUpdate",value:function(e){this.props.isTyping!==e.isTyping&&this.toggleEventBindings(this.props.isTyping)}},{key:"componentWillUnmount",value:function(){this.toggleEventBindings(!1)}},{key:"toggleEventBindings",value:function(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",this.stopTypingOnSelectionUncollapse),document[t]("mousemove",this.stopTypingOnMouseMove)}},{key:"stopTypingOnMouseMove",value:function(e){var t=e.clientX,n=e.clientY;if(this.lastMouseMove){var o=this.lastMouseMove,r=o.clientX,i=o.clientY;r===t&&i===n||this.props.onStopTyping()}this.lastMouseMove={clientX:t,clientY:n}}},{key:"stopTypingOnSelectionUncollapse",value:function(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||this.props.onStopTyping()}},{key:"stopTypingOnEscapeKey",value:function(e){this.props.isTyping&&e.keyCode===Ln.ESCAPE&&this.props.onStopTyping()}},{key:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,o=t.onStartTyping,r=e.type,i=e.target;n||!Object(ro.isTextField)(i)||i.closest(".block-editor-block-toolbar")||("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&Object(f.includes)(dc,t)}(e))&&o()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout(function(){var n=t.props,o=n.isTyping,r=n.onStopTyping,i=e.target;o&&!Object(ro.isTextField)(i)&&r()})}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Yt.Component),fc=Object(Jt.compose)([Object(l.withSelect)(function(e){return{isTyping:(0,e("core/block-editor").isTyping)()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),Jt.withSafeTimeout])(bc),pc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,o=t.selectionStart;return n!==e.blockOrder&&o?this.getOffset(o):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=ur(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=ur(this.props.selectionStart);if(t){var n=Object(ro.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Yt.Component),hc=Object(l.withSelect)(function(e){return{blockOrder:e("core/block-editor").getBlockOrder(),selectionStart:e("core/block-editor").getBlockSelectionStart()}})(pc),vc=window,mc=vc.getSelection,gc=vc.getComputedStyle,Oc=Object(f.overEvery)([ro.isTextField,ro.focus.tabbable.isTabbableIndex]);var kc=function(e){function t(){var e;return Object(Qt.a)(this,t),(e=Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(rn.a)(Object(rn.a)(e))),e.bindContainer=e.bindContainer.bind(Object(rn.a)(Object(rn.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(rn.a)(Object(rn.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(rn.a)(Object(rn.a)(e))),e.verticalRect=null,e}return Object(on.a)(t,e),Object(en.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearVerticalRect",value:function(){this.verticalRect=null}},{key:"getClosestTabbable",value:function(e,t){var n=ro.focus.focusable.find(this.container);return t&&(n=Object(f.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(f.find)(n,function t(n,o,r){if(!ro.focus.tabbable.isTabbableIndex(n))return!1;if(Object(ro.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var i,c=1;(i=r[o+c])&&n.contains(i);c++)if(t(i,o+c,r))return!1;return!0})}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,o=t.selectionStartClientId,r=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,c=e?r:i;c&&this.props.onMultiSelect(o||n,c)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,o=t.selectedLastClientId,r=e?n:o;r&&this.props.onSelectBlock(r)}},{key:"isTabbableEdge",value:function(e,t){var n,o,r=this.getClosestTabbable(e,t);return!(r&&(n=e,o=r,n.closest("[data-block]")===o.closest("[data-block]")))}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,o=t.onMultiSelect,r=t.blocks,i=t.selectionBeforeEndClientId,c=t.selectionAfterEndClientId,a=e.keyCode,l=e.target,s=a===Ln.UP,u=a===Ln.DOWN,d=a===Ln.LEFT,b=a===Ln.RIGHT,p=s||d,h=d||b,v=s||u,m=h||v,g=e.shiftKey,O=g||e.ctrlKey||e.altKey||e.metaKey,k=v?ro.isVerticalEdge:ro.isHorizontalEdge;if(v?this.verticalRect||(this.verticalRect=Object(ro.computeCaretRect)(l)):this.verticalRect=null,!m)return Ln.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(ro.isEntirelySelected)(l)),void(Ln.isKeyboardEvent.primary(e,"a")&&((l.isContentEditable?this.isEntirelySelected:Object(ro.isEntirelySelected)(l))&&(o(Object(f.first)(r),Object(f.last)(r)),e.preventDefault()),this.isEntirelySelected=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Ln.UP||t===Ln.DOWN)&&!n)return!0;var o=e.tagName;return"INPUT"!==o&&"TEXTAREA"!==o}(l,a,O)){var j="rtl"===gc(l).direction?!p:p;if(g)(p&&i||!p&&c)&&(n||this.isTabbableEdge(l,p)&&k(l,p))&&(this.expandSelection(p),e.preventDefault());else if(n)this.moveSelection(p),e.preventDefault();else if(v&&Object(ro.isVerticalEdge)(l,p)){var y=this.getClosestTabbable(l,p);y&&(Object(ro.placeCaretAtVerticalEdge)(y,p,this.verticalRect),e.preventDefault())}else if(h&&mc().isCollapsed&&Object(ro.isHorizontalEdge)(l,j)){var _=this.getClosestTabbable(l,j);Object(ro.placeCaretAtHorizontalEdge)(_,j),e.preventDefault()}}}},{key:"focusLastTextField",value:function(){var e=ro.focus.focusable.find(this.container),t=Object(f.findLast)(e,Oc);t&&Object(ro.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)("div",{className:"editor-writing-flow block-editor-writing-flow"},Object(Yt.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Yt.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"wp-block editor-writing-flow__click-redirect block-editor-writing-flow__click-redirect"}))}}]),t}(Yt.Component),jc=Object(Jt.compose)([Object(l.withSelect)(function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,o=t.getMultiSelectedBlocksStartClientId,r=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,d=n(),b=o(),f=r();return{selectedBlockClientId:d,selectionStartClientId:b,selectionBeforeEndClientId:i(f||d),selectionAfterEndClientId:c(f||d),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(kc),yc=function(e){function t(){return Object(Qt.a)(this,t),Object(tn.a)(this,Object(nn.a)(t).apply(this,arguments))}return Object(on.a)(t,e),Object(en.a)(t,[{key:"componentDidMount",value:function(){this.props.updateSettings(this.props.settings),this.props.resetBlocks(this.props.value),this.attachChangeObserver(this.props.registry)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.settings,o=t.updateSettings,r=t.value,i=t.resetBlocks,c=t.registry;n!==e.settings&&o(n),c!==e.registry&&this.attachChangeObserver(c),this.isSyncingOutcomingValue?this.isSyncingOutcomingValue=!1:r!==e.value&&(this.isSyncingIncomingValue=!0,i(r))}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe()}},{key:"attachChangeObserver",value:function(e){var t=this;this.unsubscribe&&this.unsubscribe();var n=e.select("core/block-editor"),o=n.getBlocks,r=n.isLastBlockChangePersistent,i=n.__unstableIsLastBlockChangeIgnored,c=o(),a=r();this.unsubscribe=e.subscribe(function(){var e=t.props,n=e.onChange,l=e.onInput,s=o(),u=r();if(s!==c&&(t.isSyncingIncomingValue||i()))return t.isSyncingIncomingValue=!1,c=s,void(a=u);(s!==c||u&&!a)&&(s!==c&&(t.isSyncingOutcomingValue=!0),c=s,(a=u)?n(c):l(c))})}},{key:"render",value:function(){var e=this.props.children;return Object(Yt.createElement)(cn.SlotFillProvider,null,Object(Yt.createElement)(cn.DropZoneProvider,null,e))}}]),t}(Yt.Component),_c=Object(Jt.compose)([Object(l.withDispatch)(function(e){var t=e("core/block-editor");return{updateSettings:t.updateSettings,resetBlocks:t.resetBlocks}}),l.withRegistry])(yc),Sc=["left","center","right","wide","full"],Cc=["wide","full"];function Ec(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?Sc:[],!o||!0===e&&!n?f.without.apply(void 0,[t].concat(Cc)):t}var wc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){var n=t.name,o=Ec(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(Yt.createElement)(Sn,{key:"align-controls"},Object(Yt.createElement)(On,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(i.getBlockType)(t.name);Object(f.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:o})),Object(Yt.createElement)(e,Object(qt.a)({key:"edit"},t))]}},"withToolbarControls"),Ic=Object(Jt.createHigherOrderComponent)(Object(Jt.compose)([Object(l.withSelect)(function(e){return{hasWideEnabled:!!(0,e("core/block-editor").getSettings)().alignWide}}),function(e){return function(t){var n=t.name,o=t.attributes,r=t.hasWideEnabled,c=o.align,a=Ec(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0),r),l=t.wrapperProps;return Object(f.includes)(a,c)&&(l=Object(s.a)({},l,{"data-align":c})),Object(Yt.createElement)(e,Object(qt.a)({},t,{wrapperProps:l}))}}]));Object(Zt.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return Object(f.has)(e.attributes,["align","type"])?e:(Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(f.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(Zt.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Ic),Object(Zt.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",wc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var o=n.align,r=Object(i.getBlockSupport)(t,"align"),c=Object(i.hasBlockSupport)(t,"alignWide",!0);return Object(f.includes)(Ec(r,c),o)&&(e.className=Xt()("align".concat(o),e.className)),e});var Tc=/[\s#]/g;var Bc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(e,t),Object(Yt.createElement)(Er,null,Object(Yt.createElement)(cn.TextControl,{label:Object(p.__)("HTML Anchor"),help:Object(p.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Tc,"-"),t.setAttributes({anchor:e})}}))):Object(Yt.createElement)(e,t)}},"withInspectorControl");Object(Zt.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(i.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(f.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(Zt.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Bc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e});var xc=Object(Jt.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Yt.createElement)(Yt.Fragment,null,Object(Yt.createElement)(e,t),Object(Yt.createElement)(Er,null,Object(Yt.createElement)(cn.TextControl,{label:Object(p.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})}}))):Object(Yt.createElement)(e,t)}},"withInspectorControl");function Lc(e){e="
".concat(e,"
");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Zt.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(i.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(f.assign)(e.attributes,{className:{type:"string"}})),e}),Object(Zt.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",xc),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Xt()(e.className,n.className)),e}),Object(Zt.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(i.hasBlockSupport)(t,"customClassName",!0)){var o=Object(f.omit)(e,["className"]),r=Object(i.getSaveContent)(t,o),c=Lc(r),a=Lc(n),l=Object(f.difference)(a,c);l.length?e.className=l.join(" "):r&&delete e.className}return e}),Object(Zt.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(i.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(f.uniq)([Object(i.getBlockDefaultClassName)(t.name)].concat(Object(d.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(i.getBlockDefaultClassName)(t.name)),e}),n.d(t,"Autocomplete",function(){return fn}),n.d(t,"AlignmentToolbar",function(){return hn}),n.d(t,"BlockAlignmentToolbar",function(){return On}),n.d(t,"BlockControls",function(){return Sn}),n.d(t,"BlockEdit",function(){return En}),n.d(t,"BlockFormatControls",function(){return xn}),n.d(t,"BlockNavigationDropdown",function(){return Dn}),n.d(t,"BlockIcon",function(){return Nn}),n.d(t,"ColorPalette",function(){return Fn}),n.d(t,"withColorContext",function(){return Pn}),n.d(t,"ContrastChecker",function(){return Jn}),n.d(t,"InnerBlocks",function(){return jr}),n.d(t,"InspectorAdvancedControls",function(){return Er}),n.d(t,"InspectorControls",function(){return xr}),n.d(t,"PanelColorSettings",function(){return Ar}),n.d(t,"PlainText",function(){return Dr}),n.d(t,"RichText",function(){return hi}),n.d(t,"RichTextShortcut",function(){return $r}),n.d(t,"RichTextToolbarButton",function(){return ci}),n.d(t,"UnstableRichTextInputEvent",function(){return ai}),n.d(t,"MediaPlaceholder",function(){return ji}),n.d(t,"MediaUpload",function(){return vi}),n.d(t,"MediaUploadCheck",function(){return po}),n.d(t,"URLInput",function(){return Ei}),n.d(t,"URLInputButton",function(){return wi}),n.d(t,"URLPopover",function(){return mi}),n.d(t,"BlockEditorKeyboardShortcuts",function(){return Li}),n.d(t,"BlockInspector",function(){return Hi}),n.d(t,"BlockList",function(){return Or}),n.d(t,"BlockMover",function(){return fo}),n.d(t,"BlockSelectionClearer",function(){return Vi}),n.d(t,"BlockSettingsMenu",function(){return oc}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return Zi}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return nc}),n.d(t,"BlockTitle",function(){return xo}),n.d(t,"BlockToolbar",function(){return ac}),n.d(t,"CopyHandler",function(){return lc}),n.d(t,"DefaultBlockAppender",function(){return vr}),n.d(t,"Inserter",function(){return er}),n.d(t,"MultiBlocksSwitcher",function(){return cc}),n.d(t,"MultiSelectScrollIntoView",function(){return uc}),n.d(t,"NavigableToolbar",function(){return Do}),n.d(t,"ObserveTyping",function(){return fc}),n.d(t,"PreserveScrollInReorder",function(){return hc}),n.d(t,"SkipToSelectedBlock",function(){return Ni}),n.d(t,"Warning",function(){return mo}),n.d(t,"WritingFlow",function(){return jc}),n.d(t,"BlockEditorProvider",function(){return _c}),n.d(t,"getColorClassName",function(){return Kn}),n.d(t,"getColorObjectByAttributeValues",function(){return Vn}),n.d(t,"getColorObjectByColorValue",function(){return zn}),n.d(t,"createCustomColorsHOC",function(){return $n}),n.d(t,"withColors",function(){return Xn}),n.d(t,"getFontSize",function(){return Zn}),n.d(t,"getFontSizeClass",function(){return Qn}),n.d(t,"FontSizePicker",function(){return eo}),n.d(t,"withFontSizes",function(){return to}),n.d(t,"SETTINGS_DEFAULTS",function(){return v})},37:function(e,t,n){"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return o})},38: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})},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.viewport}()},41:function(e,t,n){e.exports=function(e,t){var n,o,r,i=0;function c(){var t,c,a=o,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)o=r=i=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=c(l,a,e+1/3),r=c(l,a,e),i=c(l,a,e-1/3)}return{r:255*o,g:255*r,b:255*i}}(e.h,o,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,h;return n=L(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var o,r,i=u(e,t,n),c=s(e,t,n),a=(i+c)/2;if(i==c)o=r=0;else{var l=i-c;switch(r=a>.5?l/(2-i-c):l/(i+c),i){case e:o=(t-n)/l+(t>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(b(o));return i}function T(e,t){t=t||6;for(var n=b(e).toHsv(),o=n.h,r=n.s,i=n.v,c=[],a=1/t;t--;)c.push(b({h:o,s:r,v:i})),i=(i+a)%1;return c}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),o=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),o=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return h(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var i=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16)),A(P(o))];if(r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(x[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=b(e);n="#"+v(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(j,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(O,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:D(e[o]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var o=b(e).toRgb(),r=b(t).toRgb(),i=n/100;return b({r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a})},b.readability=function(e,t){var n=b(e),o=b(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(e,t,n){var o,r,i=b.readability(e,t);switch(r=!1,(o=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+o.size){case"AAsmall":case"AAAlarge":r=i>=4.5;break;case"AAlarge":r=i>=3;break;case"AAAsmall":r=i>=7}return r},b.mostReadable=function(e,t,n){var o,r,i,c,a=null,l=0;r=(n=n||{}).includeFallbackColors,i=n.level,c=n.size;for(var s=0;sl&&(l=o,a=b(t[s]));return b.isReadable(e,a,{level:i,size:c})||!r?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var B=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(B);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return s(1,u(0,e))}function R(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function P(e){return r.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var H,U,V,z=(U="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",V="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function K(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(o=function(){return b}.call(t,n,t,e))||(e.exports=o)}(Math)},48:function(e,t){!function(){e.exports=this.wp.a11y}()},49:function(e,t){!function(){e.exports=this.wp.deprecated}()},5:function(e,t){!function(){e.exports=this.wp.data}()},54:function(e,t,n){var o=function(){return this||"object"==typeof self&&self}()||Function("return this")(),r=o.regeneratorRuntime&&Object.getOwnPropertyNames(o).indexOf("regeneratorRuntime")>=0,i=r&&o.regeneratorRuntime;if(o.regeneratorRuntime=void 0,e.exports=n(55),r)o.regeneratorRuntime=i;else try{delete o.regeneratorRuntime}catch(e){o.regeneratorRuntime=void 0}},55:function(e,t){!function(t){"use strict";var n,o=Object.prototype,r=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",s="object"==typeof e,u=t.regeneratorRuntime;if(u)s&&(e.exports=u);else{(u=t.regeneratorRuntime=s?e.exports:{}).wrap=k;var d="suspendedStart",b="suspendedYield",f="executing",p="completed",h={},v={};v[c]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(x([])));g&&g!==o&&r.call(g,c)&&(v=g);var O=S.prototype=y.prototype=Object.create(v);_.prototype=O.constructor=S,S.constructor=_,S[l]=_.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(O),e},u.awrap=function(e){return{__await:e}},C(E.prototype),E.prototype[a]=function(){return this},u.AsyncIterator=E,u.async=function(e,t,n,o){var r=new E(k(e,t,n,o));return u.isGeneratorFunction(t)?r:r.next().then(function(e){return e.done?e.value:r.next()})},C(O),O[l]="Generator",O[c]=function(){return this},O.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=x,B.prototype={constructor:B,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(o,r){return a.type="throw",a.arg=e,t.next=o,r&&(t.method="next",t.arg=n),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var l=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:x(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=n),h}}}function k(e,t,n,o){var r=t&&t.prototype instanceof y?t:y,i=Object.create(r.prototype),c=new B(o||[]);return i._invoke=function(e,t,n){var o=d;return function(r,i){if(o===f)throw new Error("Generator is already running");if(o===p){if("throw"===r)throw i;return L()}for(n.method=r,n.arg=i;;){var c=n.delegate;if(c){var a=w(c,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=j(e,t,n);if("normal"===l.type){if(o=n.done?p:b,l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}(e,n,c),i}function j(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function _(){}function S(){}function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(n,o){function i(){return new Promise(function(t,i){!function t(n,o,i,c){var a=j(e[n],e,o);if("throw"!==a.type){var l=a.arg,s=l.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,i,c)},function(e){t("throw",e,i,c)}):Promise.resolve(s).then(function(e){l.value=e,i(l)},function(e){return t("throw",e,i,c)})}c(a.arg)}(n,o,t,i)})}return t=t?t.then(i,i):i()}}function w(e,t){var o=e.iterator[t.method];if(o===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,w(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=j(o,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function x(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n].defaultValue);return r}var i={},o={},s={},c=a(!0),l="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e=a(!0),t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}()};function d(e,t){"use strict";var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var a=0;a").replace(/&/g,"&")};var h=function(e,t,r,n){"use strict";var a,i,o,s,c,l=n||"",u=l.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+l.replace(/g/g,"")),f=new RegExp(t,l.replace(/g/g,"")),h=[];do{for(a=0;o=d.exec(e);)if(f.test(o[0]))a++||(s=(i=d.lastIndex)-o[0].length);else if(a&&!--a){c=o.index+o[0].length;var p={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:c},wholeMatch:{start:s,end:c}};if(h.push(p),!u)return h}}while(a&&(d.lastIndex=i));return h};i.helper.matchRecursiveRegExp=function(e,t,r,n){"use strict";for(var a=h(e,t,r,n),i=[],o=0;o0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var d=0;d=0?n+(r||0):n},i.helper.splitAtIndex=function(e,t){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e})},i.helper.padEnd=function(e,t,r){"use strict";return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},i.Converter=function(e){"use strict";var t={},r=[],n=[],a={},o=l,f={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter));i.helper.isArray(e)||(e=[e]);var a=d(e,t);if(!a.valid)throw Error(a.error);for(var o=0;o[ \t]+¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var n={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],n=0;n'}else r.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(a||(a=n.toLowerCase().replace(/ ?\n/g," ")),o="#"+a,i.helper.isUndefined(r.gUrls[a]))return e;o=r.gUrls[a],i.helper.isUndefined(r.gTitles[a])||(l=r.gTitles[a])}var u='"};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[([^\[\]]+)]()()()()()/g,n),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,r,n,a,o){if("\\"===n)return r+a;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),c="";return t.openLinksInNewWindow&&(c=' target="¨E95Eblank"'),r+'"+a+""})),e=r.converter._dispatch("anchors.after",e,t,r)});var p=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,g=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,m=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,b=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-\/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,k=function(e){"use strict";return function(t,r,n,a,o,s,c){var l=n=n.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",f=r||"",h=c||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' target="¨E95Eblank"'),f+'"+l+""+u+h}},v=function(e,t){"use strict";return function(r,n,a){var o="mailto:";return n=n||"",a=i.subParser("unescapeSpecialChars")(a,e,t),e.encodeEmails?(o=i.helper.encodeEmailAddress(o+a),a=i.helper.encodeEmailAddress(a)):o+=a,n+''+a+""}};i.subParser("autoLinks",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(m,k(t))).replace(_,v(t,r)),e=r.converter._dispatch("autoLinks.after",e,t,r)}),i.subParser("simplifiedAutoLinks",function(e,t,r){"use strict";return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(g,k(t)):e.replace(p,k(t))).replace(b,v(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e}),i.subParser("blockGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("blockGamut.before",e,t,r),e=i.subParser("blockQuotes")(e,t,r),e=i.subParser("headers")(e,t,r),e=i.subParser("horizontalRule")(e,t,r),e=i.subParser("lists")(e,t,r),e=i.subParser("codeBlocks")(e,t,r),e=i.subParser("tables")(e,t,r),e=i.subParser("hashHTMLBlocks")(e,t,r),e=i.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)}),i.subParser("blockQuotes",function(e,t,r){"use strict";e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=i.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return r=(r=r.replace(/^  /gm,"¨0")).replace(/¨0/g,"")}),i.subParser("hashBlock")("
\n"+e+"\n
",t,r)}),e=r.converter._dispatch("blockQuotes.after",e,t,r)}),i.subParser("codeBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,n,a){var o=n,s=a,c="\n";return o=i.subParser("outdent")(o,t,r),o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),o="
"+o+c+"
",i.subParser("hashBlock")(o,t,r)+s})).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)}),i.subParser("codeSpans",function(e,t,r){"use strict";return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,a,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=n+""+(s=i.subParser("encodeCode")(s,t,r))+"",s=i.subParser("hashHTMLSpans")(s,t,r)}),e=r.converter._dispatch("codeSpans.after",e,t,r)}),i.subParser("completeHTMLDocument",function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",a="\n",i="",o='\n',s="",c="";for(var l in void 0!==r.metadata.parsed.doctype&&(a="\n","html"!==(n=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(o='')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":i=""+r.metadata.parsed.title+"\n";break;case"charset":o="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[l]+'"',c+='\n';break;default:c+='\n'}return e=a+"\n\n"+i+o+c+"\n\n"+e.trim()+"\n\n",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)}),i.subParser("detab",function(e,t,r){"use strict";return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,n=4-r.length%4,a=0;a/g,">"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),i.subParser("encodeBackslashEscapes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)}),i.subParser("encodeCode",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)}),i.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)}),i.subParser("githubCodeBlocks",function(e,t,r){"use strict";return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,n,a,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=i.subParser("encodeCode")(o,t,r),o="
"+(o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",o=i.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"})).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e}),i.subParser("hashBlock",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)}),i.subParser("hashCodeTags",function(e,t,r){"use strict";e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=i.helper.replaceRecursiveRegExp(e,function(e,n,a,o){var s=a+i.subParser("encodeCode")(n,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"},"]*>","","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)}),i.subParser("hashElement",function(e,t,r){"use strict";return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n¨K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}}),i.subParser("hashHTMLBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,t,n,a){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"<"+t+">"}));for(var o=0;o]*>)","im"),l="<"+n[o]+"\\b[^>]*>",u="";-1!==(s=i.helper.regexIndexOf(e,c));){var d=i.helper.splitAtIndex(e,s),f=i.helper.replaceRecursiveRegExp(d[1],a,l,u,"im");if(f===d[1])break;e=d[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=(e=i.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)}),i.subParser("hashHTMLSpans",function(e,t,r){"use strict";function n(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return n(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<[^>]+?>/gi,function(e){return n(e)}),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),i.subParser("unhashHTMLSpans",function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)}),i.subParser("headers",function(e,t,r){"use strict";e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),a=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,o=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(a,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=""+o+"";return i.subParser("hashBlock")(l,t,r)})).replace(o,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=n+1,u=""+o+"";return i.subParser("hashBlock")(u,t,r)});var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function c(e){var n,a;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return n=e,a=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(n=a+n),n=t.ghCompatibleHeaderId?n.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?n.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():n.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(n=a+n),r.hashLinkCounts[n]?n=n+"-"+r.hashLinkCounts[n]++:r.hashLinkCounts[n]=1,n}return e=e.replace(s,function(e,a,o){var s=o;t.customizedHeaderId&&(s=o.replace(/\s?\{([^{]+?)}\s*$/,""));var l=i.subParser("spanGamut")(s,t,r),u=t.noHeaderId?"":' id="'+c(o)+'"',d=n-1+a.length,f=""+l+"";return i.subParser("hashBlock")(f,t,r)}),e=r.converter._dispatch("headers.after",e,t,r)}),i.subParser("horizontalRule",function(e,t,r){"use strict";e=r.converter._dispatch("horizontalRule.before",e,t,r);var n=i.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=r.converter._dispatch("horizontalRule.after",e,t,r)}),i.subParser("images",function(e,t,r){"use strict";function n(e,t,n,a,o,s,c,l){var u=r.gUrls,d=r.gTitles,f=r.gDimensions;if(n=n.toLowerCase(),l||(l=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)a="";else if(""===a||null===a){if(""!==n&&null!==n||(n=t.toLowerCase().replace(/ ?\n/g," ")),a="#"+n,i.helper.isUndefined(u[n]))return e;a=u[n],i.helper.isUndefined(d[n])||(l=d[n]),i.helper.isUndefined(f[n])||(o=f[n].width,s=f[n].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var h=''+t+'"}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,t,r,a,i,o,s,c){return n(e,t,r,a=a.replace(/\s/g,""),i,o,0,c)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n)).replace(/!\[([^\[\]]+)]()()()()()/g,n),e=r.converter._dispatch("images.after",e,t,r)}),i.subParser("italicsAndBold",function(e,t,r){"use strict";function n(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return n(t,"","")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return n(t,"","")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return n(t,"","")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e}),e=r.converter._dispatch("italicsAndBold.after",e,t,r)}),i.subParser("lists",function(e,t,r){"use strict";function n(e,n){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,function(e,n,a,s,c,l,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(c,t,r),f="";return l&&t.tasklists&&(f=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='-1?(d=i.subParser("githubCodeBlocks")(d,t,r),d=i.subParser("blockGamut")(d,t,r)):(d=(d=i.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?i.subParser("paragraphs")(d,t,r):i.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+"\n"})).replace(/¨0/g,""),r.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function a(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function o(e,r,i){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===r?o:s,l="";if(-1!==e.search(c))!function t(u){var d=u.search(c),f=a(e,r);-1!==d?(l+="\n\n<"+r+f+">\n"+n(u.slice(0,d),!!i)+"\n",c="ul"===(r="ul"===r?"ol":"ul")?o:s,t(u.slice(d))):l+="\n\n<"+r+f+">\n"+n(u,!!i)+"\n"}(e);else{var u=a(e,r);l="\n\n<"+r+u+">\n"+n(e,!!i)+"\n"}return l}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r){return o(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r,n){return o(r,n.search(/[*+-]/g)>-1?"ul":"ol",!1)})).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)}),i.subParser("metadata",function(e,t,r){"use strict";if(!t.metadata)return e;function n(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,n){return r.metadata.parsed[t]=n,""})}return e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,t,r){return n(r),"¨M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,a){return t&&(r.metadata.format=t),n(a),"¨M"})).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)}),i.subParser("outdent",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=r.converter._dispatch("outdent.after",e,t,r)}),i.subParser("paragraphs",function(e,t,r){"use strict";for(var n=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),a=[],o=n.length,s=0;s=0?a.push(c):c.search(/\S/)>=0&&(c=(c=i.subParser("spanGamut")(c,t,r)).replace(/^([ \t]*)/g,"

"),c+="

",a.push(c))}for(o=a.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}a[s]=u}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)}),i.subParser("runExtension",function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t}),i.subParser("spanGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("spanGamut.before",e,t,r),e=i.subParser("codeSpans")(e,t,r),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=i.subParser("encodeBackslashEscapes")(e,t,r),e=i.subParser("images")(e,t,r),e=i.subParser("anchors")(e,t,r),e=i.subParser("autoLinks")(e,t,r),e=i.subParser("simplifiedAutoLinks")(e,t,r),e=i.subParser("emoji")(e,t,r),e=i.subParser("underline")(e,t,r),e=i.subParser("italicsAndBold")(e,t,r),e=i.subParser("strikethrough")(e,t,r),e=i.subParser("ellipsis")(e,t,r),e=i.subParser("hashHTMLSpans")(e,t,r),e=i.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)}),i.subParser("strikethrough",function(e,t,r){"use strict";return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,n){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(n)}),e=r.converter._dispatch("strikethrough.after",e,t,r)),e}),i.subParser("stripLinkDefinitions",function(e,t,r){"use strict";var n=function(e,n,a,o,s,c,l){return n=n.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[n]=a.replace(/\s/g,""):r.gUrls[n]=i.subParser("encodeAmpsAndAngles")(a,t,r),c?c+l:(l&&(r.gTitles[n]=l.replace(/"|'/g,""")),t.parseImgDimensions&&o&&s&&(r.gDimensions[n]={width:o,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n)).replace(/¨0/,"")}),i.subParser("tables",function(e,t,r){"use strict";if(!t.tables)return e;function n(e,n){return""+i.subParser("spanGamut")(e,t,r)+"\n"}function a(e){var a,o=e.split("\n");for(a=0;a"+(c=i.subParser("spanGamut")(c,t,r))+"\n"));for(a=0;a\n\n\n",a=0;a\n";for(var i=0;i\n"}return r+="\n\n"}(p,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),e=r.converter._dispatch("tables.after",e,t,r)}),i.subParser("underline",function(e,t,r){"use strict";return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/(_)/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e}),i.subParser("unescapeSpecialChars",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){var r=parseInt(t);return String.fromCharCode(r)}),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),i.subParser("makeMarkdown.blockquote",function(e,t){"use strict";var r="";if(e.hasChildNodes())for(var n=e.childNodes,a=n.length,o=0;o ")}),i.subParser("makeMarkdown.codeBlock",function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"}),i.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),i.subParser("makeMarkdown.emphasis",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="*";for(var n=e.childNodes,a=n.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),i.subParser("makeMarkdown.links",function(e,t){"use strict";var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,a=n.length;r="[";for(var o=0;o",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r}),i.subParser("makeMarkdown.list",function(e,t,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,o=a.length,s=e.getAttribute("start")||1,c=0;c"+t.preList[r]+""}),i.subParser("makeMarkdown.strikethrough",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="~~";for(var n=e.childNodes,a=n.length,o=0;otr>th"),c=e.querySelectorAll("tbody>tr");for(r=0;rp&&(p=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")});void 0===(n=function(){"use strict";return i}.call(t,r,t,e))||(e.exports=n)}).call(this)},24:function(e,t){!function(){e.exports=this.wp.dom}()},26:function(e,t){!function(){e.exports=this.wp.hooks}()},28:function(e,t,r){"use strict";var n=r(37);var a=r(38);function i(e,t){return Object(n.a)(e)||function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,t)||Object(a.a)()}r.d(t,"a",function(){return i})},30:function(e,t,r){"use strict";var n,a;function i(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function s(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REMOVE_BLOCK_TYPES":return-1!==r.names.indexOf(t)?null:t;case e:return r.name||null}return t}}var h=f("SET_DEFAULT_BLOCK_NAME"),p=f("SET_FREEFORM_FALLBACK_BLOCK_NAME"),g=f("SET_UNREGISTERED_FALLBACK_BLOCK_NAME");var m=Object(i.combineReducers)({blockTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.keyBy)(Object(l.map)(t.blockTypes,function(e){return Object(l.omit)(e,"styles ")}),"name"));case"REMOVE_BLOCK_TYPES":return Object(l.omit)(e,t.names)}return e},blockStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.mapValues)(Object(l.keyBy)(t.blockTypes,"name"),function(t){return Object(l.uniqBy)([].concat(Object(s.a)(Object(l.get)(t,["styles"],[])),Object(s.a)(Object(l.get)(e,[t.name],[]))),function(e){return e.name})}));case"ADD_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.uniqBy)([].concat(Object(s.a)(Object(l.get)(e,[t.blockName],[])),Object(s.a)(t.styles)),function(e){return e.name})));case"REMOVE_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.filter)(Object(l.get)(e,[t.blockName],[]),function(e){return-1===t.styleNames.indexOf(e.name)})))}return e},defaultBlockName:h,freeformFallbackBlockName:p,unregisteredFallbackBlockName:g,categories:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||Object(l.isEmpty)(t.category))return e;if(Object(l.find)(e,["slug",t.slug]))return Object(l.map)(e,function(e){return e.slug===t.slug?Object(c.a)({},e,t.category):e})}return e}}),b=r(30),_=function(e,t){return"string"==typeof t?v(e,t):t},k=Object(b.a)(function(e){return Object.values(e.blockTypes)},function(e){return[e.blockTypes]});function v(e,t){return e.blockTypes[t]}function w(e,t){return e.blockStyles[t]}function y(e){return e.categories}function j(e){return e.defaultBlockName}function O(e){return e.freeformFallbackBlockName}function x(e){return e.unregisteredFallbackBlockName}var C=Object(b.a)(function(e,t){return Object(l.map)(Object(l.filter)(e.blockTypes,function(e){return Object(l.includes)(e.parent,t)}),function(e){return e.name})},function(e){return[e.blockTypes]}),A=function(e,t,r,n){var a=_(e,t);return Object(l.get)(a,["supports",r],n)};function S(e,t,r,n){return!!A(e,t,r,n)}function T(e,t,r){var n=_(e,t),a=Object(l.flow)([l.deburr,function(e){return e.toLowerCase()},function(e){return e.trim()}]),i=a(r),o=Object(l.flow)([a,function(e){return Object(l.includes)(e,i)}]);return o(n.title)||Object(l.some)(n.keywords,o)||o(n.category)}var E=function(e,t){return C(e,t).length>0},P=function(e,t){return Object(l.some)(C(e,t),function(t){return S(e,t,"inserter",!0)})};function M(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Object(l.castArray)(e)}}function L(e){return{type:"REMOVE_BLOCK_TYPES",names:Object(l.castArray)(e)}}function N(e,t){return{type:"ADD_BLOCK_STYLES",styles:Object(l.castArray)(t),blockName:e}}function B(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Object(l.castArray)(t),blockName:e}}function z(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function H(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function D(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function I(e){return{type:"SET_CATEGORIES",categories:e}}function V(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}Object(i.registerStore)("core/blocks",{reducer:m,selectors:n,actions:a});var R=r(65),F=r.n(R),q=r(26),$=r(45),U=r.n($),G=r(0),W=["#191e23","#f8f9f9"];function K(e){var t=se();if(e.name!==t)return!1;K.block&&K.block.name===t||(K.block=_e(t));var r=K.block,n=ce(t);return Object(l.every)(n.attributes,function(t,n){return r.attributes[n]===e.attributes[n]})}function Y(e){return!!e&&(Object(l.isString)(e)||Object(G.isValidElement)(e)||Object(l.isFunction)(e)||e instanceof G.Component)}function Z(e){if(e||(e="block-default"),Y(e))return{src:e};if(Object(l.has)(e,["background"])){var t=U()(e.background);return Object(c.a)({},e,{foreground:e.foreground?e.foreground:Object($.mostReadable)(t,W,{includeFallbackColors:!0,level:"AA",size:"large"}).toHexString(),shadowColor:t.setAlpha(.3).toRgbString()})}return e}function Q(e){return Object(l.isString)(e)?ce(e):e}var X={};function J(e){X=e}function ee(e,t){if(t=Object(c.a)({name:e},Object(l.get)(X,e),t),"string"==typeof e)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e))if(Object(i.select)("core/blocks").getBlockType(e))console.error('Block "'+e+'" is already registered.');else if((t=Object(q.applyFilters)("blocks.registerBlockType",t,e))&&Object(l.isFunction)(t.save))if("edit"in t&&!Object(l.isFunction)(t.edit))console.error('The "edit" property must be a valid function.');else if("category"in t)if("category"in t&&!Object(l.some)(Object(i.select)("core/blocks").getCategories(),{slug:t.category}))console.error('The block "'+e+'" must have a registered category.');else if("title"in t&&""!==t.title)if("string"==typeof t.title){if(t.icon=Z(t.icon),Y(t.icon.src))return Object(i.dispatch)("core/blocks").addBlockTypes(t),t;console.error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/designers-developers/developers/block-api/block-registration/#icon-optional")}else console.error("Block titles must be strings.");else console.error('The block "'+e+'" must have a title.');else console.error('The block "'+e+'" must have a category.');else console.error('The "save" property must be specified and must be a valid function.');else console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");else console.error("Block names must be strings.")}function te(e){var t=Object(i.select)("core/blocks").getBlockType(e);if(t)return Object(i.dispatch)("core/blocks").removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}function re(e){Object(i.dispatch)("core/blocks").setFreeformFallbackBlockName(e)}function ne(){return Object(i.select)("core/blocks").getFreeformFallbackBlockName()}function ae(e){Object(i.dispatch)("core/blocks").setUnregisteredFallbackBlockName(e)}function ie(){return Object(i.select)("core/blocks").getUnregisteredFallbackBlockName()}function oe(e){Object(i.dispatch)("core/blocks").setDefaultBlockName(e)}function se(){return Object(i.select)("core/blocks").getDefaultBlockName()}function ce(e){return Object(i.select)("core/blocks").getBlockType(e)}function le(){return Object(i.select)("core/blocks").getBlockTypes()}function ue(e,t,r){return Object(i.select)("core/blocks").getBlockSupport(e,t,r)}function de(e,t,r){return Object(i.select)("core/blocks").hasBlockSupport(e,t,r)}function fe(e){return"core/block"===e.name}var he=function(e){return Object(i.select)("core/blocks").getChildBlockNames(e)},pe=function(e){return Object(i.select)("core/blocks").hasChildBlocks(e)},ge=function(e){return Object(i.select)("core/blocks").hasChildBlocksWithInserterSupport(e)},me=function(e,t){Object(i.dispatch)("core/blocks").addBlockStyles(e,t)},be=function(e,t){Object(i.dispatch)("core/blocks").removeBlockStyles(e,t)};function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=ce(e),a=Object(l.reduce)(n.attributes,function(e,r,n){var a=t[n];return void 0!==a?e[n]=a:r.hasOwnProperty("default")&&(e[n]=r.default),-1!==["node","children"].indexOf(r.source)&&("string"==typeof e[n]?e[n]=[e[n]]:Array.isArray(e[n])||(e[n]=[])),e},{});return{clientId:F()(),name:e,isValid:!0,attributes:a,innerBlocks:r}}function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=F()();return Object(c.a)({},e,{clientId:n,attributes:Object(c.a)({},e.attributes,t),innerBlocks:r||e.innerBlocks.map(function(e){return ke(e)})})}var ve=function(e,t,r){if(Object(l.isEmpty)(r))return!1;if(!(!(r.length>1)||e.isMultiBlock))return!1;if(!("block"===e.type))return!1;var n=Object(l.first)(r);if(!("from"!==t||-1!==e.blocks.indexOf(n.name)))return!1;if(Object(l.isFunction)(e.isMatch)){var a=e.isMultiBlock?r.map(function(e){return e.attributes}):n.attributes;if(!e.isMatch(a))return!1}return!0},we=function(e){if(Object(l.isEmpty)(e))return[];var t=le();return Object(l.filter)(t,function(t){return!!Oe(xe("from",t.name),function(t){return ve(t,"from",e)})})},ye=function(e){if(Object(l.isEmpty)(e))return[];var t=xe("to",ce(Object(l.first)(e).name).name),r=Object(l.filter)(t,function(t){return ve(t,"to",e)});return Object(l.flatMap)(r,function(e){return e.blocks}).map(function(e){return ce(e)})};function je(e){if(Object(l.isEmpty)(e))return[];var t=Object(l.first)(e);if(e.length>1&&!Object(l.every)(e,{name:t.name}))return[];var r=we(e),n=ye(e);return Object(l.uniq)([].concat(Object(s.a)(r),Object(s.a)(n)))}function Oe(e,t){for(var r=Object(q.createHooks)(),n=function(n){var a=e[n];t(a)&&r.addFilter("transform","transform/"+n.toString(),function(e){return e||a},a.priority)},a=0;a1,a=r[0],i=a.name;if(n&&!Object(l.every)(r,function(e){return e.name===i}))return null;var o,s=xe("from",t),u=Oe(xe("to",i),function(e){return"block"===e.type&&-1!==e.blocks.indexOf(t)&&(!n||e.isMultiBlock)})||Oe(s,function(e){return"block"===e.type&&-1!==e.blocks.indexOf(i)&&(!n||e.isMultiBlock)});if(!u)return null;if(o=u.isMultiBlock?u.transform(r.map(function(e){return e.attributes}),r.map(function(e){return e.innerBlocks})):u.transform(a.attributes,a.innerBlocks),!Object(l.isObjectLike)(o))return null;if((o=Object(l.castArray)(o)).some(function(e){return!ce(e.name)}))return null;var d=Object(l.findIndex)(o,function(e){return e.name===t});return d<0?null:o.map(function(t,r){var n=Object(c.a)({},t,{clientId:r===d?a.clientId:t.clientId});return Object(q.applyFilters)("blocks.switchToBlockType.transformedBlock",n,e)})}var Ae=r(28);var Se,Te=function(){return Se||(Se=document.implementation.createHTMLDocument("")),Se};function Ee(e,t){if(t){if("string"==typeof e){var r=Te();r.body.innerHTML=e,e=r.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(r,n){return r[n]=Ee(e,t[n]),r},{})}}function Pe(e,t){return 1===arguments.length&&(t=e,e=void 0),function(r){var n=r;if(e&&(n=r.querySelector(e)),n)return function(e,t){for(var r,n=t.split(".");r=n.shift();){if(!(r in e))return;e=e[r]}return e}(n,t)}}var Me=r(66),Le=r(205),Ne=r(37),Be=r(34),ze=r(38);var He=r(10),De=r(9),Ie=/[\t\n\f ]/,Ve=/[A-Za-z]/,Re=/\r\n?/g;function Fe(e){return Ie.test(e)}function qe(e){return Ve.test(e)}function $e(e,t){if(!e)throw new Error((t||"value")+" was null");return e}var Ue=function(){function e(e,t){this.delegate=e,this.entityParser=t,this.state=null,this.input=null,this.index=-1,this.tagLine=-1,this.tagColumn=-1,this.line=-1,this.column=-1,this.states={beforeData:function(){"<"===this.peek()?(this.state="tagOpen",this.markTagStart(),this.consume()):(this.state="data",this.delegate.beginData())},data:function(){var e=this.peek();"<"===e?(this.delegate.finishData(),this.state="tagOpen",this.markTagStart(),this.consume()):"&"===e?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e))},tagOpen:function(){var e=this.consume();"!"===e?this.state="markupDeclaration":"/"===e?this.state="endTagOpen":qe(e)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(e.toLowerCase()))},markupDeclaration:function(){"-"===this.consume()&&"-"===this.input.charAt(this.index)&&(this.consume(),this.state="commentStart",this.delegate.beginComment())},commentStart:function(){var e=this.consume();"-"===e?this.state="commentStartDash":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(e),this.state="comment")},commentStartDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var e=this.consume();"-"===e?this.state="commentEndDash":this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":(this.delegate.appendToCommentData("-"+e),this.state="comment")},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+e),this.state="comment")},tagName:function(){var e=this.consume();Fe(e)?this.state="beforeAttributeName":"/"===e?this.state="selfClosingStartTag":">"===e?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Fe(e)?this.consume():"/"===e?(this.state="selfClosingStartTag",this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.state="attributeName",this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Fe(e)?(this.state="afterAttributeName",this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.state="beforeAttributeValue",this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Fe(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.consume(),this.state="beforeAttributeValue"):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Fe(e)?this.consume():'"'===e?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Fe(e)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Fe(e)?(this.consume(),this.state="beforeAttributeName"):"/"===e?(this.consume(),this.state="selfClosingStartTag"):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var e=this.consume();qe(e)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(e.toLowerCase()))}},this.reset()}return e.prototype.reset=function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(Re,"\n")}(e);this.index2&&void 0!==arguments[2]?arguments[2]:[],n=Q(e),a=n.save;if(a.prototype instanceof G.Component){var i=new a({attributes:t});a=i.render.bind(i)}var o=a({attributes:t,innerBlocks:r});if(Object(l.isObject)(o)&&Object(q.hasFilter)("blocks.getSaveContent.extraProps")){var s=Object(q.applyFilters)("blocks.getSaveContent.extraProps",Object(c.a)({},o.props),n,t);Ye()(s,o.props)||(o=Object(G.cloneElement)(o,s))}return o=Object(q.applyFilters)("blocks.getSaveElement",o,n,t),Object(G.createElement)(rt,{innerBlocks:r},o)}function ot(e,t,r){var n=Q(e);return Object(G.renderToString)(it(n,t,r))}function st(e){var t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=ot(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function ct(e,t,r){var n=Object(l.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",a=Object(l.startsWith)(e,"core/")?e.slice(5):e;return r?"\x3c!-- wp:".concat(a," ").concat(n,"--\x3e\n")+r+"\n\x3c!-- /wp:".concat(a," --\x3e"):"\x3c!-- wp:".concat(a," ").concat(n,"/--\x3e")}function lt(e){var t=e.name,r=st(e);switch(t){case ne():case ie():return r;default:return ct(t,function(e,t){return Object(l.reduce)(e.attributes,function(e,r,n){var a=t[n];return void 0===a?e:void 0!==r.source?e:"default"in r&&r.default===a?e:(e[n]=a,e)},{})}(ce(t),e.attributes),r)}}function ut(e){return Object(l.castArray)(e).map(lt).join("\n\n")}var dt=/[\t\n\r\v\f ]+/g,ft=/^[\t\n\r\v\f ]*$/,ht=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,pt=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],gt=[].concat(pt,["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),mt=[l.identity,function(e){return yt(e).join(" ")}],bt=/^[\da-z]+$/i,_t=/^#\d+$/,kt=/^#x[\da-f]+$/i;var vt=function(){function e(){Object(He.a)(this,e)}return Object(De.a)(e,[{key:"parse",value:function(e){if(t=e,bt.test(t)||_t.test(t)||kt.test(t))return Object(We.decodeEntities)("&"+e+";");var t}}]),e}(),wt=function(){function e(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{},n=Q(e),a=Object(l.mapValues)(n.attributes,function(e,n){return function(e,t,r,n){var a,i=t.type;switch(t.source){case void 0:a=n?n[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=Wt(r,t)}return void 0===i||Ut(a,Object(l.castArray)(i))||(a=void 0),void 0===a?t.default:a}(n,e,t,r)});return Object(q.applyFilters)("blocks.getBlockAttributes",a,n,t,r)}function Yt(e){var t=e.blockName,r=e.attrs,n=e.innerBlocks,a=void 0===n?[]:n,i=e.innerHTML,o=ne(),s=ie()||o;r=r||{},i=i.trim();var u=t||o;"core/cover-image"===u&&(u="core/cover"),"core/text"!==u&&"core/cover-text"!==u||(u="core/paragraph"),u===o&&(i=Object(Me.autop)(i).trim());var d=ce(u);if(!d){var f=i;u&&(i=ct(u,r,i)),r={originalName:t,originalUndelimitedContent:f},d=ce(u=s)}a=a.map(Yt);var h=u===o||u===s;if(d&&(i||!h)){var p=_e(u,Kt(d,i,r),a);return h||(p.isValid=Mt(d,p.attributes,i)),p.originalContent=i,p=function(e,t){var r=ce(e.name),n=r.deprecated;if(!n||!n.length)return e;for(var a=e,i=a.originalContent,o=a.innerBlocks,s=0;s1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){e(t.childNodes,r,n,a),r.forEach(function(e){n.contains(t)&&e(t,n,a)})})}(n.body.childNodes,t,n,r),n.body.innerHTML}function lr(e,t,r){var n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){var i=t.nodeName.toLowerCase();if(!n.hasOwnProperty(i)||n[i].isMatch&&!n[i].isMatch(t))e(t.childNodes,r,n,a),a&&!rr(t)&&t.nextElementSibling&&Object(Jt.insertAfter)(r.createElement("br"),t),Object(Jt.unwrap)(t);else if(t.nodeType===ar){var o=n[i],s=o.attributes,c=void 0===s?[]:s,u=o.classes,d=void 0===u?[]:u,f=o.children,h=o.require,p=void 0===h?[]:h,g=o.allowEmpty;if(f&&!g&&sr(t))return void Object(Jt.remove)(t);if(t.hasAttributes()&&(Array.from(t.attributes).forEach(function(e){var r=e.name;"class"===r||Object(l.includes)(c,r)||t.removeAttribute(r)}),t.classList&&t.classList.length)){var m=d.map(function(e){return"string"==typeof e?function(t){return t===e}:e instanceof RegExp?function(t){return e.test(t)}:l.noop});Array.from(t.classList).forEach(function(e){m.some(function(t){return t(e)})||t.classList.remove(e)}),t.classList.length||t.removeAttribute("class")}if(t.hasChildNodes()){if("*"===f)return;if(f)p.length&&!t.querySelector(p.join(","))?(e(t.childNodes,r,n,a),Object(Jt.unwrap)(t)):"BODY"===t.parentNode.nodeName&&rr(t)?(e(t.childNodes,r,n,a),Array.from(t.childNodes).some(function(e){return!rr(e)})&&Object(Jt.unwrap)(t)):e(t.childNodes,r,f,a);else for(;t.firstChild;)Object(Jt.remove)(t.firstChild)}}})}(n.body.childNodes,n,t,r),n.body.innerHTML}var ur=window.Node,dr=ur.ELEMENT_NODE,fr=ur.TEXT_NODE,hr=function(e){var t=document.implementation.createHTMLDocument(""),r=document.implementation.createHTMLDocument(""),n=t.body,a=r.body;for(n.innerHTML=e;n.firstChild;){var i=n.firstChild;i.nodeType===fr?i.nodeValue.trim()?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):n.removeChild(i):i.nodeType===dr?"BR"===i.nodeName?(i.nextSibling&&"BR"===i.nextSibling.nodeName&&(a.appendChild(r.createElement("P")),n.removeChild(i.nextSibling)),a.lastChild&&"P"===a.lastChild.nodeName&&a.lastChild.hasChildNodes()?a.lastChild.appendChild(i):n.removeChild(i)):"P"===i.nodeName?sr(i)?n.removeChild(i):a.appendChild(i):rr(i)?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):a.appendChild(i):n.removeChild(i)}return a.innerHTML},pr=window.Node.COMMENT_NODE,gr=function(e,t){if(e.nodeType===pr)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){for(var r=e.nodeValue.slice(4).trim(),n=e,a=!1;n=n.nextSibling;)if(n.nodeType===pr&&"noteaser"===n.nodeValue){a=!0,Object(Jt.remove)(n);break}Object(Jt.replace)(e,function(e,t,r){var n=r.createElement("wp-block");n.dataset.block="core/more",e&&(n.dataset.customText=e);t&&(n.dataset.noTeaser="");return n}(r,a,t))}}else Object(Jt.replace)(e,function(e){var t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))};function mr(e){return"OL"===e.nodeName||"UL"===e.nodeName}var br=function(e){if(mr(e)){var t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}var n,a=e.parentNode;if(a&&"LI"===a.nodeName&&1===a.children.length&&!/\S/.test((n=a,Object(s.a)(n.childNodes).map(function(e){var t=e.nodeValue;return void 0===t?"":t}).join("")))){var i=a,o=i.previousElementSibling,c=i.parentNode;o?(o.appendChild(t),c.removeChild(i)):(c.parentNode.insertBefore(t,c),c.parentNode.removeChild(c))}if(a&&mr(a)){var l=e.previousElementSibling;l?l.appendChild(e):Object(Jt.unwrap)(e)}}},_r=function(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=hr(e.innerHTML))};var kr=function(e,t,r){if(function(e,t){var r=e.nodeName.toLowerCase();return"figcaption"!==r&&!rr(e)&&Object(l.has)(t,["figure","children",r])}(e,r)){var n=e,a=e.parentNode;(function(e,t){var r=e.nodeName.toLowerCase();return Object(l.has)(t,["figure","children","a","children",r])})(e,r)&&"A"===a.nodeName&&1===a.childNodes.length&&(n=e.parentNode);for(var i=n;i&&"P"!==i.nodeName;)i=i.parentElement;var o=t.createElement("figure");i?i.parentNode.insertBefore(o,i):n.parentNode.insertBefore(o,n),o.appendChild(n)}},vr=r(134);var wr=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Oe(xe("from"),function(e){return"shortcode"===e.type&&Object(l.some)(Object(l.castArray)(e.tag),function(e){return Object(vr.regexp)(e).test(t)})});if(!n)return[t];var a,i=Object(l.castArray)(n.tag),o=Object(l.first)(i);if(a=Object(vr.next)(o,t,r)){var u=t.substr(0,a.index);if(r=a.index+a.content.length,!Object(l.includes)(a.shortcode.content||"","<")&&!/(\n|

)\s*$/.test(u))return e(t,r);var d=Object(l.mapValues)(Object(l.pickBy)(n.attributes,function(e){return e.shortcode}),function(e){return e.shortcode(a.shortcode.attrs,a)});return[u,_e(n.blockName,Kt(Object(c.a)({},ce(n.blockName),{attributes:n.attributes}),a.shortcode.content,d))].concat(Object(s.a)(e(t.substr(r))))}return[t]};function yr(e,t){return e.every(function(e){return function(e,t){if(rr(e))return!0;if(!t)return!1;var r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(function(e){return 0===Object(l.difference)([r,t],e).length})}(e,t)&&yr(Array.from(e.children),t)})}function jr(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var Or=function(e,t){var r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;var n=Array.from(r.body.children);return!n.some(jr)&&yr(n,t)},xr=function(e,t){if("SPAN"===e.nodeName&&e.style){var r=e.style,n=r.fontWeight,a=r.fontStyle,i=r.textDecorationLine,o=r.verticalAlign;"bold"!==n&&"700"!==n||Object(Jt.wrap)(t.createElement("strong"),e),"italic"===a&&Object(Jt.wrap)(t.createElement("em"),e),"line-through"===i&&Object(Jt.wrap)(t.createElement("s"),e),"super"===o?Object(Jt.wrap)(t.createElement("sup"),e):"sub"===o&&Object(Jt.wrap)(t.createElement("sub"),e)}else"B"===e.nodeName?e=Object(Jt.replaceTag)(e,"strong"):"I"===e.nodeName?e=Object(Jt.replaceTag)(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")))},Cr=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},Ar=window.parseInt;function Sr(e){return"OL"===e.nodeName||"UL"===e.nodeName}var Tr=function(e,t){if("P"===e.nodeName){var r=e.getAttribute("style");if(r&&-1!==r.indexOf("mso-list")){var n=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r);if(n){var a=Ar(n[1],10)-1||0,i=e.previousElementSibling;if(!i||!Sr(i)){var o=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(o),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",o),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;a--;)Sr(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);Sr(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}},Er=r(35),Pr=window,Mr=Pr.atob,Lr=Pr.File,Nr=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,r=e.src.split(","),n=Object(Ae.a)(r,2),a=n[0],i=n[1],o=a.slice(5).split(";"),s=Object(Ae.a)(o,1)[0];if(!i||!s)return void(e.src="");try{t=Mr(i)}catch(t){return void(e.src="")}for(var c=new Uint8Array(t.length),l=0;l]+>/,""),"INLINE"!==o){var f=r||a;if(-1!==f.indexOf("\x3c!-- wp:"))return Qt(f)}if(String.prototype.normalize&&(r=r.normalize()),!a||r&&!function(e){return!/<(?!br[ \/>])/i.test(e)}(r)||(r=Hr(a),"AUTO"===o&&-1===a.indexOf("\n")&&0!==a.indexOf("

")&&0===r.indexOf("

")&&(o="INLINE")),"INLINE"===o)return Rr(r);var h=wr(r),p=h.length>1;if("AUTO"===o&&!p&&Or(r,s))return Rr(r);var g=Object(l.filter)(xe("from"),{type:"raw"}).map(function(e){return e.isMatch?e:Object(c.a)({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})}),m=tr(),b=or(g),_=Object(l.compact)(Object(l.flatMap)(h,function(e){if("string"!=typeof e)return e;var t=[Ir,Tr,Cr,br,Nr,xr,gr,kr,_r];d||t.unshift(Dr);var r=Object(c.a)({},b,m);return e=lr(e=cr(e,t,b),r),e=hr(e),Vr.log("Processed HTML piece:\n\n",e),function(e){var t=e.html,r=e.rawTransforms,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=t,Array.from(n.body.children).map(function(e){var t=Oe(r,function(t){return(0,t.isMatch)(e)});if(!t)return _e("core/html",Kt("core/html",e.outerHTML));var n=t.transform,a=t.blockName;return n?n(e):_e(a,Kt(a,e.outerHTML))})}({html:e,rawTransforms:g})}));if("AUTO"===o&&1===_.length){var k=a.trim();if(""!==k&&-1===k.indexOf("\n"))return lr(st(_[0]),m)}return _}function qr(e){var t=e.HTML,r=void 0===t?"":t;if(-1!==r.indexOf("\x3c!-- wp:"))return Qt(r);var n=wr(r),a=Object(l.filter)(xe("from"),{type:"raw"}).map(function(e){return e.isMatch?e:Object(c.a)({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})}),i=or(a);return Object(l.compact)(Object(l.flatMap)(n,function(e){return"string"!=typeof e?e:(e=cr(e,[br,gr,kr,_r],i),function(e){var t=e.html,r=e.rawTransforms,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=t,Array.from(n.body.children).map(function(e){var t=Oe(r,function(t){return(0,t.isMatch)(e)});if(!t)return _e("core/html",Kt("core/html",e.outerHTML));var n=t.transform,a=t.blockName;return n?n(e):_e(a,Kt(a,e.outerHTML))})}({html:e=hr(e),rawTransforms:a}))}))}function $r(){return Object(i.select)("core/blocks").getCategories()}function Ur(e){Object(i.dispatch)("core/blocks").setCategories(e)}function Gr(e,t){Object(i.dispatch)("core/blocks").updateCategory(e,t)}function Wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&Object(l.every)(t,function(t,r){var n=Object(Ae.a)(t,3),a=n[0],i=n[2],o=e[r];return a===o.name&&Wr(o.innerBlocks,i)})}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(l.map)(t,function(t,r){var n=Object(Ae.a)(t,3),a=n[0],i=n[1],o=n[2],s=e[r];if(s&&s.name===a){var u=Kr(s.innerBlocks,o);return Object(c.a)({},s,{innerBlocks:u})}var d=ce(a),f=function(e,t){return Object(l.mapValues)(t,function(t,r){return h(e[r],t)})},h=function(e,t){return r=e,"html"===Object(l.get)(r,["source"])&&Object(l.isArray)(t)?Object(G.renderToString)(t):function(e){return"query"===Object(l.get)(e,["source"])}(e)&&t?t.map(function(t){return f(e.query,t)}):t;var r};return _e(a,f(Object(l.get)(d,["attributes"],{}),i),Kr([],o))}):e}r.d(t,"createBlock",function(){return _e}),r.d(t,"cloneBlock",function(){return ke}),r.d(t,"getPossibleBlockTransformations",function(){return je}),r.d(t,"switchToBlockType",function(){return Ce}),r.d(t,"getBlockTransforms",function(){return xe}),r.d(t,"findTransform",function(){return Oe}),r.d(t,"parse",function(){return Xt}),r.d(t,"getBlockAttributes",function(){return Kt}),r.d(t,"parseWithAttributeSchema",function(){return Wt}),r.d(t,"pasteHandler",function(){return Fr}),r.d(t,"rawHandler",function(){return qr}),r.d(t,"getPhrasingContentSchema",function(){return tr}),r.d(t,"serialize",function(){return ut}),r.d(t,"getBlockContent",function(){return st}),r.d(t,"getBlockDefaultClassName",function(){return nt}),r.d(t,"getBlockMenuDefaultClassName",function(){return at}),r.d(t,"getSaveElement",function(){return it}),r.d(t,"getSaveContent",function(){return ot}),r.d(t,"isValidBlockContent",function(){return Mt}),r.d(t,"getCategories",function(){return $r}),r.d(t,"setCategories",function(){return Ur}),r.d(t,"updateCategory",function(){return Gr}),r.d(t,"registerBlockType",function(){return ee}),r.d(t,"unregisterBlockType",function(){return te}),r.d(t,"setFreeformContentHandlerName",function(){return re}),r.d(t,"getFreeformContentHandlerName",function(){return ne}),r.d(t,"setUnregisteredTypeHandlerName",function(){return ae}),r.d(t,"getUnregisteredTypeHandlerName",function(){return ie}),r.d(t,"setDefaultBlockName",function(){return oe}),r.d(t,"getDefaultBlockName",function(){return se}),r.d(t,"getBlockType",function(){return ce}),r.d(t,"getBlockTypes",function(){return le}),r.d(t,"getBlockSupport",function(){return ue}),r.d(t,"hasBlockSupport",function(){return de}),r.d(t,"isReusableBlock",function(){return fe}),r.d(t,"getChildBlockNames",function(){return he}),r.d(t,"hasChildBlocks",function(){return pe}),r.d(t,"hasChildBlocksWithInserterSupport",function(){return ge}),r.d(t,"unstable__bootstrapServerSideBlockDefinitions",function(){return J}),r.d(t,"registerBlockStyle",function(){return me}),r.d(t,"unregisterBlockStyle",function(){return be}),r.d(t,"isUnmodifiedDefaultBlock",function(){return K}),r.d(t,"normalizeIconObject",function(){return Z}),r.d(t,"isValidIcon",function(){return Y}),r.d(t,"doBlocksMatchTemplate",function(){return Wr}),r.d(t,"synchronizeBlocksWithTemplate",function(){return Kr}),r.d(t,"children",function(){return zt}),r.d(t,"node",function(){return qt}),r.d(t,"withBlockContentContext",function(){return tt})},37:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",function(){return n})},38:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}r.d(t,"a",function(){return n})},42:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},45:function(e,t,r){var n;!function(a){var i=/^\s+/,o=/\s+$/,s=0,c=a.round,l=a.min,u=a.max,d=a.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var r=function(e){var t={r:0,g:0,b:0},r=1,n=null,s=null,c=null,d=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,r=!1;if(E[e])e=E[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=q.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=q.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=q.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=q.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=q.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=q.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=q.hex8.exec(e))return{r:B(t[1]),g:B(t[2]),b:B(t[3]),a:I(t[4]),format:r?"name":"hex8"};if(t=q.hex6.exec(e))return{r:B(t[1]),g:B(t[2]),b:B(t[3]),format:r?"name":"hex"};if(t=q.hex4.exec(e))return{r:B(t[1]+""+t[1]),g:B(t[2]+""+t[2]),b:B(t[3]+""+t[3]),a:I(t[4]+""+t[4]),format:r?"name":"hex8"};if(t=q.hex3.exec(e))return{r:B(t[1]+""+t[1]),g:B(t[2]+""+t[2]),b:B(t[3]+""+t[3]),format:r?"name":"hex"};return!1}(e));"object"==typeof e&&($(e.r)&&$(e.g)&&$(e.b)?(h=e.r,p=e.g,g=e.b,t={r:255*L(h,255),g:255*L(p,255),b:255*L(g,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):$(e.h)&&$(e.s)&&$(e.v)?(n=H(e.s),s=H(e.v),t=function(e,t,r){e=6*L(e,360),t=L(t,100),r=L(r,100);var n=a.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),c=r*(1-(1-i)*t),l=n%6;return{r:255*[r,s,o,o,c,r][l],g:255*[c,r,r,s,o,o][l],b:255*[o,o,c,r,r,s][l]}}(e.h,n,s),d=!0,f="hsv"):$(e.h)&&$(e.s)&&$(e.l)&&(n=H(e.s),c=H(e.l),t=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=L(e,360),t=L(t,100),r=L(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;n=o(c,s,e+1/3),a=o(c,s,e),i=o(c,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,n,c),d=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,p,g;return r=M(r),{ok:d,format:e.format||f,r:l(255,u(t.r,0)),g:l(255,u(t.g,0)),b:l(255,u(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function h(e,t,r){e=L(e,255),t=L(t,255),r=L(r,255);var n,a,i=u(e,t,r),o=l(e,t,r),s=(i+o)/2;if(i==o)n=a=0;else{var c=i-o;switch(a=s>.5?c/(2-i-o):c/(i+o),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(f(n));return i}function T(e,t){t=t||6;for(var r=f(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(f({h:n,s:a,v:i})),i=(i+s)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=M(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[z(c(e).toString(16)),z(c(t).toString(16)),z(c(r).toString(16)),z(D(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*L(this._r,255))+"%",g:c(100*L(this._g,255))+"%",b:c(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*L(this._r,255))+"%, "+c(100*L(this._g,255))+"%, "+c(100*L(this._b,255))+"%)":"rgba("+c(100*L(this._r,255))+"%, "+c(100*L(this._g,255))+"%, "+c(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);r="#"+m(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(j,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:H(e[n]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,r){r=0===r?0:r||50;var n=f(e).toRgb(),a=f(t).toRgb(),i=r/100;return f({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},f.readability=function(e,t){var r=f(e),n=f(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},f.isReadable=function(e,t,r){var n,a,i=f.readability(e,t);switch(a=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},f.mostReadable=function(e,t,r){var n,a,i,o,s=null,c=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var l=0;lc&&(c=n,s=f(t[l]));return f.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var E=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(E);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function L(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return l(1,u(0,e))}function B(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function H(e){return e<=1&&(e=100*e+"%"),e}function D(e){return a.round(255*parseFloat(e)).toString(16)}function I(e){return B(e)/255}var V,R,F,q=(R="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",F="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function $(e){return!!q.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(n=function(){return f}.call(t,r,t,e))||(e.exports=n)}(Math)},5:function(e,t){!function(){e.exports=this.wp.data}()},57:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},6:function(e,t){!function(){e.exports=this.wp.compose}()},65:function(e,t,r){var n=r(87),a=r(88);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},66:function(e,t){!function(){e.exports=this.wp.autop}()},7:function(e,t,r){"use strict";r.d(t,"a",function(){return a});var n=r(15);function a(e){for(var t=1;t>>((3&t)<<3)&255;return a}}},88:function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,a=r;return[a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]]].join("")}},9:function(e,t,r){"use strict";function n(e,t){for(var r=0;r (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n].defaultValue);return r}var i={},o={},s={},c=a(!0),l="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e=a(!0),t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}()};function d(e,t){"use strict";var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var a=0;a").replace(/&/g,"&")};var h=function(e,t,r,n){"use strict";var a,i,o,s,c,l=n||"",u=l.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+l.replace(/g/g,"")),f=new RegExp(t,l.replace(/g/g,"")),h=[];do{for(a=0;o=d.exec(e);)if(f.test(o[0]))a++||(s=(i=d.lastIndex)-o[0].length);else if(a&&!--a){c=o.index+o[0].length;var p={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:c},wholeMatch:{start:s,end:c}};if(h.push(p),!u)return h}}while(a&&(d.lastIndex=i));return h};i.helper.matchRecursiveRegExp=function(e,t,r,n){"use strict";for(var a=h(e,t,r,n),i=[],o=0;o0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var d=0;d=0?n+(r||0):n},i.helper.splitAtIndex=function(e,t){"use strict";if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e})},i.helper.padEnd=function(e,t,r){"use strict";return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},i.Converter=function(e){"use strict";var t={},r=[],n=[],a={},o=l,f={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter));i.helper.isArray(e)||(e=[e]);var a=d(e,t);if(!a.valid)throw Error(a.error);for(var o=0;o[ \t]+¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var n={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],n=0;n'}else r.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(a||(a=n.toLowerCase().replace(/ ?\n/g," ")),o="#"+a,i.helper.isUndefined(r.gUrls[a]))return e;o=r.gUrls[a],i.helper.isUndefined(r.gTitles[a])||(l=r.gTitles[a])}var u='"};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[([^\[\]]+)]()()()()()/g,n),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,r,n,a,o){if("\\"===n)return r+a;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),c="";return t.openLinksInNewWindow&&(c=' target="¨E95Eblank"'),r+'"+a+""})),e=r.converter._dispatch("anchors.after",e,t,r)});var p=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,g=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,m=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,b=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-\/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,k=function(e){"use strict";return function(t,r,n,a,o,s,c){var l=n=n.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",f=r||"",h=c||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' target="¨E95Eblank"'),f+'"+l+""+u+h}},v=function(e,t){"use strict";return function(r,n,a){var o="mailto:";return n=n||"",a=i.subParser("unescapeSpecialChars")(a,e,t),e.encodeEmails?(o=i.helper.encodeEmailAddress(o+a),a=i.helper.encodeEmailAddress(a)):o+=a,n+''+a+""}};i.subParser("autoLinks",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(m,k(t))).replace(_,v(t,r)),e=r.converter._dispatch("autoLinks.after",e,t,r)}),i.subParser("simplifiedAutoLinks",function(e,t,r){"use strict";return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(g,k(t)):e.replace(p,k(t))).replace(b,v(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e}),i.subParser("blockGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("blockGamut.before",e,t,r),e=i.subParser("blockQuotes")(e,t,r),e=i.subParser("headers")(e,t,r),e=i.subParser("horizontalRule")(e,t,r),e=i.subParser("lists")(e,t,r),e=i.subParser("codeBlocks")(e,t,r),e=i.subParser("tables")(e,t,r),e=i.subParser("hashHTMLBlocks")(e,t,r),e=i.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)}),i.subParser("blockQuotes",function(e,t,r){"use strict";e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=i.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return r=(r=r.replace(/^  /gm,"¨0")).replace(/¨0/g,"")}),i.subParser("hashBlock")("
\n"+e+"\n
",t,r)}),e=r.converter._dispatch("blockQuotes.after",e,t,r)}),i.subParser("codeBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,n,a){var o=n,s=a,c="\n";return o=i.subParser("outdent")(o,t,r),o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),o="
"+o+c+"
",i.subParser("hashBlock")(o,t,r)+s})).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)}),i.subParser("codeSpans",function(e,t,r){"use strict";return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,a,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=n+""+(s=i.subParser("encodeCode")(s,t,r))+"",s=i.subParser("hashHTMLSpans")(s,t,r)}),e=r.converter._dispatch("codeSpans.after",e,t,r)}),i.subParser("completeHTMLDocument",function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",a="\n",i="",o='\n',s="",c="";for(var l in void 0!==r.metadata.parsed.doctype&&(a="\n","html"!==(n=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(o='')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":i=""+r.metadata.parsed.title+"\n";break;case"charset":o="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[l]+'"',c+='\n';break;default:c+='\n'}return e=a+"\n\n"+i+o+c+"\n\n"+e.trim()+"\n\n",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)}),i.subParser("detab",function(e,t,r){"use strict";return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,n=4-r.length%4,a=0;a/g,">"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),i.subParser("encodeBackslashEscapes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)}),i.subParser("encodeCode",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)}),i.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)}),i.subParser("githubCodeBlocks",function(e,t,r){"use strict";return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,n,a,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=i.subParser("encodeCode")(o,t,r),o="
"+(o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",o=i.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"})).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e}),i.subParser("hashBlock",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)}),i.subParser("hashCodeTags",function(e,t,r){"use strict";e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=i.helper.replaceRecursiveRegExp(e,function(e,n,a,o){var s=a+i.subParser("encodeCode")(n,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"},"]*>","","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)}),i.subParser("hashElement",function(e,t,r){"use strict";return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n¨K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}}),i.subParser("hashHTMLBlocks",function(e,t,r){"use strict";e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,t,n,a){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"<"+t+">"}));for(var o=0;o]*>)","im"),l="<"+n[o]+"\\b[^>]*>",u="";-1!==(s=i.helper.regexIndexOf(e,c));){var d=i.helper.splitAtIndex(e,s),f=i.helper.replaceRecursiveRegExp(d[1],a,l,u,"im");if(f===d[1])break;e=d[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=(e=i.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)}),i.subParser("hashHTMLSpans",function(e,t,r){"use strict";function n(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return n(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return n(e)})).replace(/<[^>]+?>/gi,function(e){return n(e)}),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),i.subParser("unhashHTMLSpans",function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)}),i.subParser("headers",function(e,t,r){"use strict";e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),a=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,o=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(a,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=""+o+"";return i.subParser("hashBlock")(l,t,r)})).replace(o,function(e,a){var o=i.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=n+1,u=""+o+"";return i.subParser("hashBlock")(u,t,r)});var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function c(e){var n,a;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return n=e,a=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(n=a+n),n=t.ghCompatibleHeaderId?n.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?n.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():n.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(n=a+n),r.hashLinkCounts[n]?n=n+"-"+r.hashLinkCounts[n]++:r.hashLinkCounts[n]=1,n}return e=e.replace(s,function(e,a,o){var s=o;t.customizedHeaderId&&(s=o.replace(/\s?\{([^{]+?)}\s*$/,""));var l=i.subParser("spanGamut")(s,t,r),u=t.noHeaderId?"":' id="'+c(o)+'"',d=n-1+a.length,f=""+l+"";return i.subParser("hashBlock")(f,t,r)}),e=r.converter._dispatch("headers.after",e,t,r)}),i.subParser("horizontalRule",function(e,t,r){"use strict";e=r.converter._dispatch("horizontalRule.before",e,t,r);var n=i.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=r.converter._dispatch("horizontalRule.after",e,t,r)}),i.subParser("images",function(e,t,r){"use strict";function n(e,t,n,a,o,s,c,l){var u=r.gUrls,d=r.gTitles,f=r.gDimensions;if(n=n.toLowerCase(),l||(l=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)a="";else if(""===a||null===a){if(""!==n&&null!==n||(n=t.toLowerCase().replace(/ ?\n/g," ")),a="#"+n,i.helper.isUndefined(u[n]))return e;a=u[n],i.helper.isUndefined(d[n])||(l=d[n]),i.helper.isUndefined(f[n])||(o=f[n].width,s=f[n].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var h=''+t+'"}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,t,r,a,i,o,s,c){return n(e,t,r,a=a.replace(/\s/g,""),i,o,0,c)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n)).replace(/!\[([^\[\]]+)]()()()()()/g,n),e=r.converter._dispatch("images.after",e,t,r)}),i.subParser("italicsAndBold",function(e,t,r){"use strict";function n(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return n(t,"","")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return n(t,"","")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return n(t,"","")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,r){return n(r,t+"","")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?n(t,"",""):e}),e=r.converter._dispatch("italicsAndBold.after",e,t,r)}),i.subParser("lists",function(e,t,r){"use strict";function n(e,n){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,function(e,n,a,s,c,l,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(c,t,r),f="";return l&&t.tasklists&&(f=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='-1?(d=i.subParser("githubCodeBlocks")(d,t,r),d=i.subParser("blockGamut")(d,t,r)):(d=(d=i.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?i.subParser("paragraphs")(d,t,r):i.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+"\n"})).replace(/¨0/g,""),r.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function a(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function o(e,r,i){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===r?o:s,l="";if(-1!==e.search(c))!function t(u){var d=u.search(c),f=a(e,r);-1!==d?(l+="\n\n<"+r+f+">\n"+n(u.slice(0,d),!!i)+"\n",c="ul"===(r="ul"===r?"ol":"ul")?o:s,t(u.slice(d))):l+="\n\n<"+r+f+">\n"+n(u,!!i)+"\n"}(e);else{var u=a(e,r);l="\n\n<"+r+u+">\n"+n(e,!!i)+"\n"}return l}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r){return o(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r,n){return o(r,n.search(/[*+-]/g)>-1?"ul":"ol",!1)})).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)}),i.subParser("metadata",function(e,t,r){"use strict";if(!t.metadata)return e;function n(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,n){return r.metadata.parsed[t]=n,""})}return e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,t,r){return n(r),"¨M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,a){return t&&(r.metadata.format=t),n(a),"¨M"})).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)}),i.subParser("outdent",function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=r.converter._dispatch("outdent.after",e,t,r)}),i.subParser("paragraphs",function(e,t,r){"use strict";for(var n=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),a=[],o=n.length,s=0;s=0?a.push(c):c.search(/\S/)>=0&&(c=(c=i.subParser("spanGamut")(c,t,r)).replace(/^([ \t]*)/g,"

"),c+="

",a.push(c))}for(o=a.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}a[s]=u}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)}),i.subParser("runExtension",function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t}),i.subParser("spanGamut",function(e,t,r){"use strict";return e=r.converter._dispatch("spanGamut.before",e,t,r),e=i.subParser("codeSpans")(e,t,r),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=i.subParser("encodeBackslashEscapes")(e,t,r),e=i.subParser("images")(e,t,r),e=i.subParser("anchors")(e,t,r),e=i.subParser("autoLinks")(e,t,r),e=i.subParser("simplifiedAutoLinks")(e,t,r),e=i.subParser("emoji")(e,t,r),e=i.subParser("underline")(e,t,r),e=i.subParser("italicsAndBold")(e,t,r),e=i.subParser("strikethrough")(e,t,r),e=i.subParser("ellipsis")(e,t,r),e=i.subParser("hashHTMLSpans")(e,t,r),e=i.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)}),i.subParser("strikethrough",function(e,t,r){"use strict";return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,n){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(n)}),e=r.converter._dispatch("strikethrough.after",e,t,r)),e}),i.subParser("stripLinkDefinitions",function(e,t,r){"use strict";var n=function(e,n,a,o,s,c,l){return n=n.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[n]=a.replace(/\s/g,""):r.gUrls[n]=i.subParser("encodeAmpsAndAngles")(a,t,r),c?c+l:(l&&(r.gTitles[n]=l.replace(/"|'/g,""")),t.parseImgDimensions&&o&&s&&(r.gDimensions[n]={width:o,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n)).replace(/¨0/,"")}),i.subParser("tables",function(e,t,r){"use strict";if(!t.tables)return e;function n(e,n){return""+i.subParser("spanGamut")(e,t,r)+"\n"}function a(e){var a,o=e.split("\n");for(a=0;a"+(c=i.subParser("spanGamut")(c,t,r))+"\n"));for(a=0;a\n\n\n",a=0;a\n";for(var i=0;i\n"}return r+="\n\n"}(p,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),e=r.converter._dispatch("tables.after",e,t,r)}),i.subParser("underline",function(e,t,r){"use strict";return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/(_)/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e}),i.subParser("unescapeSpecialChars",function(e,t,r){"use strict";return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){var r=parseInt(t);return String.fromCharCode(r)}),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),i.subParser("makeMarkdown.blockquote",function(e,t){"use strict";var r="";if(e.hasChildNodes())for(var n=e.childNodes,a=n.length,o=0;o ")}),i.subParser("makeMarkdown.codeBlock",function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"}),i.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),i.subParser("makeMarkdown.emphasis",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="*";for(var n=e.childNodes,a=n.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),i.subParser("makeMarkdown.links",function(e,t){"use strict";var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,a=n.length;r="[";for(var o=0;o",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r}),i.subParser("makeMarkdown.list",function(e,t,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,o=a.length,s=e.getAttribute("start")||1,c=0;c"+t.preList[r]+""}),i.subParser("makeMarkdown.strikethrough",function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="~~";for(var n=e.childNodes,a=n.length,o=0;otr>th"),c=e.querySelectorAll("tbody>tr");for(r=0;rp&&(p=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")});void 0===(n=function(){"use strict";return i}.call(t,r,t,e))||(e.exports=n)}).call(this)},24:function(e,t){!function(){e.exports=this.wp.dom}()},26:function(e,t){!function(){e.exports=this.wp.hooks}()},28:function(e,t,r){"use strict";var n=r(37);var a=r(38);function i(e,t){return Object(n.a)(e)||function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,t)||Object(a.a)()}r.d(t,"a",function(){return i})},30:function(e,t,r){"use strict";var n,a;function i(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function s(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REMOVE_BLOCK_TYPES":return-1!==r.names.indexOf(t)?null:t;case e:return r.name||null}return t}}var h=f("SET_DEFAULT_BLOCK_NAME"),p=f("SET_FREEFORM_FALLBACK_BLOCK_NAME"),g=f("SET_UNREGISTERED_FALLBACK_BLOCK_NAME");var m=Object(i.combineReducers)({blockTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.keyBy)(Object(l.map)(t.blockTypes,function(e){return Object(l.omit)(e,"styles ")}),"name"));case"REMOVE_BLOCK_TYPES":return Object(l.omit)(e,t.names)}return e},blockStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return Object(c.a)({},e,Object(l.mapValues)(Object(l.keyBy)(t.blockTypes,"name"),function(t){return Object(l.uniqBy)([].concat(Object(s.a)(Object(l.get)(t,["styles"],[])),Object(s.a)(Object(l.get)(e,[t.name],[]))),function(e){return e.name})}));case"ADD_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.uniqBy)([].concat(Object(s.a)(Object(l.get)(e,[t.blockName],[])),Object(s.a)(t.styles)),function(e){return e.name})));case"REMOVE_BLOCK_STYLES":return Object(c.a)({},e,Object(o.a)({},t.blockName,Object(l.filter)(Object(l.get)(e,[t.blockName],[]),function(e){return-1===t.styleNames.indexOf(e.name)})))}return e},defaultBlockName:h,freeformFallbackBlockName:p,unregisteredFallbackBlockName:g,categories:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||Object(l.isEmpty)(t.category))return e;if(Object(l.find)(e,["slug",t.slug]))return Object(l.map)(e,function(e){return e.slug===t.slug?Object(c.a)({},e,t.category):e})}return e}}),b=r(30),_=function(e,t){return"string"==typeof t?v(e,t):t},k=Object(b.a)(function(e){return Object.values(e.blockTypes)},function(e){return[e.blockTypes]});function v(e,t){return e.blockTypes[t]}function w(e,t){return e.blockStyles[t]}function y(e){return e.categories}function j(e){return e.defaultBlockName}function O(e){return e.freeformFallbackBlockName}function x(e){return e.unregisteredFallbackBlockName}var C=Object(b.a)(function(e,t){return Object(l.map)(Object(l.filter)(e.blockTypes,function(e){return Object(l.includes)(e.parent,t)}),function(e){return e.name})},function(e){return[e.blockTypes]}),A=function(e,t,r,n){var a=_(e,t);return Object(l.get)(a,["supports",r],n)};function T(e,t,r,n){return!!A(e,t,r,n)}function S(e,t,r){var n=_(e,t),a=Object(l.flow)([l.deburr,function(e){return e.toLowerCase()},function(e){return e.trim()}]),i=a(r),o=Object(l.flow)([a,function(e){return Object(l.includes)(e,i)}]);return o(n.title)||Object(l.some)(n.keywords,o)||o(n.category)}var E=function(e,t){return C(e,t).length>0},P=function(e,t){return Object(l.some)(C(e,t),function(t){return T(e,t,"inserter",!0)})};function M(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Object(l.castArray)(e)}}function N(e){return{type:"REMOVE_BLOCK_TYPES",names:Object(l.castArray)(e)}}function L(e,t){return{type:"ADD_BLOCK_STYLES",styles:Object(l.castArray)(t),blockName:e}}function B(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Object(l.castArray)(t),blockName:e}}function z(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function H(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function D(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function I(e){return{type:"SET_CATEGORIES",categories:e}}function V(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}Object(i.registerStore)("core/blocks",{reducer:m,selectors:n,actions:a});var R=r(65),F=r.n(R),q=r(26),$=r(45),U=r.n($),G=r(0),W=["#191e23","#f8f9f9"];function K(e){var t=se();if(e.name!==t)return!1;K.block&&K.block.name===t||(K.block=_e(t));var r=K.block,n=ce(t);return Object(l.every)(n.attributes,function(t,n){return r.attributes[n]===e.attributes[n]})}function Y(e){return!!e&&(Object(l.isString)(e)||Object(G.isValidElement)(e)||Object(l.isFunction)(e)||e instanceof G.Component)}function Z(e){if(e||(e="block-default"),Y(e))return{src:e};if(Object(l.has)(e,["background"])){var t=U()(e.background);return Object(c.a)({},e,{foreground:e.foreground?e.foreground:Object($.mostReadable)(t,W,{includeFallbackColors:!0,level:"AA",size:"large"}).toHexString(),shadowColor:t.setAlpha(.3).toRgbString()})}return e}function Q(e){return Object(l.isString)(e)?ce(e):e}var X={};function J(e){X=e}function ee(e,t){if(t=Object(c.a)({name:e},Object(l.get)(X,e),t),"string"==typeof e)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e))if(Object(i.select)("core/blocks").getBlockType(e))console.error('Block "'+e+'" is already registered.');else if((t=Object(q.applyFilters)("blocks.registerBlockType",t,e))&&Object(l.isFunction)(t.save))if("edit"in t&&!Object(l.isFunction)(t.edit))console.error('The "edit" property must be a valid function.');else if("category"in t)if("category"in t&&!Object(l.some)(Object(i.select)("core/blocks").getCategories(),{slug:t.category}))console.error('The block "'+e+'" must have a registered category.');else if("title"in t&&""!==t.title)if("string"==typeof t.title){if(t.icon=Z(t.icon),Y(t.icon.src))return Object(i.dispatch)("core/blocks").addBlockTypes(t),t;console.error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/designers-developers/developers/block-api/block-registration/#icon-optional")}else console.error("Block titles must be strings.");else console.error('The block "'+e+'" must have a title.');else console.error('The block "'+e+'" must have a category.');else console.error('The "save" property must be specified and must be a valid function.');else console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");else console.error("Block names must be strings.")}function te(e){var t=Object(i.select)("core/blocks").getBlockType(e);if(t)return Object(i.dispatch)("core/blocks").removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}function re(e){Object(i.dispatch)("core/blocks").setFreeformFallbackBlockName(e)}function ne(){return Object(i.select)("core/blocks").getFreeformFallbackBlockName()}function ae(e){Object(i.dispatch)("core/blocks").setUnregisteredFallbackBlockName(e)}function ie(){return Object(i.select)("core/blocks").getUnregisteredFallbackBlockName()}function oe(e){Object(i.dispatch)("core/blocks").setDefaultBlockName(e)}function se(){return Object(i.select)("core/blocks").getDefaultBlockName()}function ce(e){return Object(i.select)("core/blocks").getBlockType(e)}function le(){return Object(i.select)("core/blocks").getBlockTypes()}function ue(e,t,r){return Object(i.select)("core/blocks").getBlockSupport(e,t,r)}function de(e,t,r){return Object(i.select)("core/blocks").hasBlockSupport(e,t,r)}function fe(e){return"core/block"===e.name}var he=function(e){return Object(i.select)("core/blocks").getChildBlockNames(e)},pe=function(e){return Object(i.select)("core/blocks").hasChildBlocks(e)},ge=function(e){return Object(i.select)("core/blocks").hasChildBlocksWithInserterSupport(e)},me=function(e,t){Object(i.dispatch)("core/blocks").addBlockStyles(e,t)},be=function(e,t){Object(i.dispatch)("core/blocks").removeBlockStyles(e,t)};function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=ce(e),a=Object(l.reduce)(n.attributes,function(e,r,n){var a=t[n];return void 0!==a?e[n]=a:r.hasOwnProperty("default")&&(e[n]=r.default),-1!==["node","children"].indexOf(r.source)&&("string"==typeof e[n]?e[n]=[e[n]]:Array.isArray(e[n])||(e[n]=[])),e},{});return{clientId:F()(),name:e,isValid:!0,attributes:a,innerBlocks:r}}function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=F()();return Object(c.a)({},e,{clientId:n,attributes:Object(c.a)({},e.attributes,t),innerBlocks:r||e.innerBlocks.map(function(e){return ke(e)})})}var ve=function(e,t,r){if(Object(l.isEmpty)(r))return!1;if(!(!(r.length>1)||e.isMultiBlock))return!1;if(!("block"===e.type))return!1;var n=Object(l.first)(r);if(!("from"!==t||-1!==e.blocks.indexOf(n.name)))return!1;if(Object(l.isFunction)(e.isMatch)){var a=e.isMultiBlock?r.map(function(e){return e.attributes}):n.attributes;if(!e.isMatch(a))return!1}return!0},we=function(e){if(Object(l.isEmpty)(e))return[];var t=le();return Object(l.filter)(t,function(t){return!!Oe(xe("from",t.name),function(t){return ve(t,"from",e)})})},ye=function(e){if(Object(l.isEmpty)(e))return[];var t=xe("to",ce(Object(l.first)(e).name).name),r=Object(l.filter)(t,function(t){return ve(t,"to",e)});return Object(l.flatMap)(r,function(e){return e.blocks}).map(function(e){return ce(e)})};function je(e){if(Object(l.isEmpty)(e))return[];var t=Object(l.first)(e);if(e.length>1&&!Object(l.every)(e,{name:t.name}))return[];var r=we(e),n=ye(e);return Object(l.uniq)([].concat(Object(s.a)(r),Object(s.a)(n)))}function Oe(e,t){for(var r=Object(q.createHooks)(),n=function(n){var a=e[n];t(a)&&r.addFilter("transform","transform/"+n.toString(),function(e){return e||a},a.priority)},a=0;a1,a=r[0],i=a.name;if(n&&!Object(l.every)(r,function(e){return e.name===i}))return null;var o,s=xe("from",t),u=Oe(xe("to",i),function(e){return"block"===e.type&&-1!==e.blocks.indexOf(t)&&(!n||e.isMultiBlock)})||Oe(s,function(e){return"block"===e.type&&-1!==e.blocks.indexOf(i)&&(!n||e.isMultiBlock)});if(!u)return null;if(o=u.isMultiBlock?u.transform(r.map(function(e){return e.attributes}),r.map(function(e){return e.innerBlocks})):u.transform(a.attributes,a.innerBlocks),!Object(l.isObjectLike)(o))return null;if((o=Object(l.castArray)(o)).some(function(e){return!ce(e.name)}))return null;var d=Object(l.findIndex)(o,function(e){return e.name===t});return d<0?null:o.map(function(t,r){var n=Object(c.a)({},t,{clientId:r===d?a.clientId:t.clientId});return Object(q.applyFilters)("blocks.switchToBlockType.transformedBlock",n,e)})}var Ae=r(28);var Te,Se=function(){return Te||(Te=document.implementation.createHTMLDocument("")),Te};function Ee(e,t){if(t){if("string"==typeof e){var r=Se();r.body.innerHTML=e,e=r.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(r,n){return r[n]=Ee(e,t[n]),r},{})}}function Pe(e,t){return 1===arguments.length&&(t=e,e=void 0),function(r){var n=r;if(e&&(n=r.querySelector(e)),n)return function(e,t){for(var r,n=t.split(".");r=n.shift();){if(!(r in e))return;e=e[r]}return e}(n,t)}}var Me=r(66),Ne=r(205),Le=r(37),Be=r(34),ze=r(38);var He=r(10),De=r(9),Ie=/[\t\n\f ]/,Ve=/[A-Za-z]/,Re=/\r\n?/g;function Fe(e){return Ie.test(e)}function qe(e){return Ve.test(e)}function $e(e,t){if(!e)throw new Error((t||"value")+" was null");return e}var Ue=function(){function e(e,t){this.delegate=e,this.entityParser=t,this.state=null,this.input=null,this.index=-1,this.tagLine=-1,this.tagColumn=-1,this.line=-1,this.column=-1,this.states={beforeData:function(){"<"===this.peek()?(this.state="tagOpen",this.markTagStart(),this.consume()):(this.state="data",this.delegate.beginData())},data:function(){var e=this.peek();"<"===e?(this.delegate.finishData(),this.state="tagOpen",this.markTagStart(),this.consume()):"&"===e?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e))},tagOpen:function(){var e=this.consume();"!"===e?this.state="markupDeclaration":"/"===e?this.state="endTagOpen":qe(e)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(e.toLowerCase()))},markupDeclaration:function(){"-"===this.consume()&&"-"===this.input.charAt(this.index)&&(this.consume(),this.state="commentStart",this.delegate.beginComment())},commentStart:function(){var e=this.consume();"-"===e?this.state="commentStartDash":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(e),this.state="comment")},commentStartDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var e=this.consume();"-"===e?this.state="commentEndDash":this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.state="commentEnd":(this.delegate.appendToCommentData("-"+e),this.state="comment")},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+e),this.state="comment")},tagName:function(){var e=this.consume();Fe(e)?this.state="beforeAttributeName":"/"===e?this.state="selfClosingStartTag":">"===e?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();Fe(e)?this.consume():"/"===e?(this.state="selfClosingStartTag",this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.state="attributeName",this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();Fe(e)?(this.state="afterAttributeName",this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.state="beforeAttributeValue",this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();Fe(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===e?(this.consume(),this.state="beforeAttributeValue"):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();Fe(e)?this.consume():'"'===e?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();Fe(e)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();Fe(e)?(this.consume(),this.state="beforeAttributeName"):"/"===e?(this.consume(),this.state="selfClosingStartTag"):">"===e?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var e=this.consume();qe(e)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(e.toLowerCase()))}},this.reset()}return e.prototype.reset=function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(Re,"\n")}(e);this.index2&&void 0!==arguments[2]?arguments[2]:[],n=Q(e),a=n.save;if(a.prototype instanceof G.Component){var i=new a({attributes:t});a=i.render.bind(i)}var o=a({attributes:t,innerBlocks:r});if(Object(l.isObject)(o)&&Object(q.hasFilter)("blocks.getSaveContent.extraProps")){var s=Object(q.applyFilters)("blocks.getSaveContent.extraProps",Object(c.a)({},o.props),n,t);Ye()(s,o.props)||(o=Object(G.cloneElement)(o,s))}return o=Object(q.applyFilters)("blocks.getSaveElement",o,n,t),Object(G.createElement)(rt,{innerBlocks:r},o)}function ot(e,t,r){var n=Q(e);return Object(G.renderToString)(it(n,t,r))}function st(e){var t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=ot(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function ct(e,t,r){var n=Object(l.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",a=Object(l.startsWith)(e,"core/")?e.slice(5):e;return r?"\x3c!-- wp:".concat(a," ").concat(n,"--\x3e\n")+r+"\n\x3c!-- /wp:".concat(a," --\x3e"):"\x3c!-- wp:".concat(a," ").concat(n,"/--\x3e")}function lt(e){var t=e.name,r=st(e);switch(t){case ne():case ie():return r;default:return ct(t,function(e,t){return Object(l.reduce)(e.attributes,function(e,r,n){var a=t[n];return void 0===a?e:void 0!==r.source?e:"default"in r&&r.default===a?e:(e[n]=a,e)},{})}(ce(t),e.attributes),r)}}function ut(e){return Object(l.castArray)(e).map(lt).join("\n\n")}var dt=/[\t\n\r\v\f ]+/g,ft=/^[\t\n\r\v\f ]*$/,ht=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,pt=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],gt=[].concat(pt,["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),mt=[l.identity,function(e){return yt(e).join(" ")}],bt=/^[\da-z]+$/i,_t=/^#\d+$/,kt=/^#x[\da-f]+$/i;var vt=function(){function e(){Object(He.a)(this,e)}return Object(De.a)(e,[{key:"parse",value:function(e){if(t=e,bt.test(t)||_t.test(t)||kt.test(t))return Object(We.decodeEntities)("&"+e+";");var t}}]),e}(),wt=function(){function e(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{},n=Q(e),a=Object(l.mapValues)(n.attributes,function(e,n){return function(e,t,r,n){var a,i=t.type;switch(t.source){case void 0:a=n?n[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=Wt(r,t)}return void 0===i||Ut(a,Object(l.castArray)(i))||(a=void 0),void 0===a?t.default:a}(n,e,t,r)});return Object(q.applyFilters)("blocks.getBlockAttributes",a,n,t,r)}function Yt(e){var t=e.blockName,r=e.attrs,n=e.innerBlocks,a=void 0===n?[]:n,i=e.innerHTML,o=ne(),s=ie()||o;r=r||{},i=i.trim();var u=t||o;"core/cover-image"===u&&(u="core/cover"),"core/text"!==u&&"core/cover-text"!==u||(u="core/paragraph"),u===o&&(i=Object(Me.autop)(i).trim());var d=ce(u);if(!d){var f=i;u&&(i=ct(u,r,i)),r={originalName:t,originalUndelimitedContent:f},d=ce(u=s)}a=a.map(Yt);var h=u===o||u===s;if(d&&(i||!h)){var p=_e(u,Kt(d,i,r),a);return h||(p.isValid=Mt(d,p.attributes,i)),p.originalContent=i,p=function(e,t){var r=ce(e.name),n=r.deprecated;if(!n||!n.length)return e;for(var a=e,i=a.originalContent,o=a.innerBlocks,s=0;s1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){e(t.childNodes,r,n,a),r.forEach(function(e){n.contains(t)&&e(t,n,a)})})}(n.body.childNodes,t,n,r),n.body.innerHTML}function lr(e,t,r){var n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,function e(t,r,n,a){Array.from(t).forEach(function(t){var i=t.nodeName.toLowerCase();if(!n.hasOwnProperty(i)||n[i].isMatch&&!n[i].isMatch(t))e(t.childNodes,r,n,a),a&&!rr(t)&&t.nextElementSibling&&Object(Jt.insertAfter)(r.createElement("br"),t),Object(Jt.unwrap)(t);else if(t.nodeType===ar){var o=n[i],s=o.attributes,c=void 0===s?[]:s,u=o.classes,d=void 0===u?[]:u,f=o.children,h=o.require,p=void 0===h?[]:h,g=o.allowEmpty;if(f&&!g&&sr(t))return void Object(Jt.remove)(t);if(t.hasAttributes()&&(Array.from(t.attributes).forEach(function(e){var r=e.name;"class"===r||Object(l.includes)(c,r)||t.removeAttribute(r)}),t.classList&&t.classList.length)){var m=d.map(function(e){return"string"==typeof e?function(t){return t===e}:e instanceof RegExp?function(t){return e.test(t)}:l.noop});Array.from(t.classList).forEach(function(e){m.some(function(t){return t(e)})||t.classList.remove(e)}),t.classList.length||t.removeAttribute("class")}if(t.hasChildNodes()){if("*"===f)return;if(f)p.length&&!t.querySelector(p.join(","))?(e(t.childNodes,r,n,a),Object(Jt.unwrap)(t)):"BODY"===t.parentNode.nodeName&&rr(t)?(e(t.childNodes,r,n,a),Array.from(t.childNodes).some(function(e){return!rr(e)})&&Object(Jt.unwrap)(t)):e(t.childNodes,r,f,a);else for(;t.firstChild;)Object(Jt.remove)(t.firstChild)}}})}(n.body.childNodes,n,t,r),n.body.innerHTML}var ur=window.Node,dr=ur.ELEMENT_NODE,fr=ur.TEXT_NODE,hr=function(e){var t=document.implementation.createHTMLDocument(""),r=document.implementation.createHTMLDocument(""),n=t.body,a=r.body;for(n.innerHTML=e;n.firstChild;){var i=n.firstChild;i.nodeType===fr?i.nodeValue.trim()?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):n.removeChild(i):i.nodeType===dr?"BR"===i.nodeName?(i.nextSibling&&"BR"===i.nextSibling.nodeName&&(a.appendChild(r.createElement("P")),n.removeChild(i.nextSibling)),a.lastChild&&"P"===a.lastChild.nodeName&&a.lastChild.hasChildNodes()?a.lastChild.appendChild(i):n.removeChild(i)):"P"===i.nodeName?sr(i)?n.removeChild(i):a.appendChild(i):rr(i)?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(i)):a.appendChild(i):n.removeChild(i)}return a.innerHTML},pr=window.Node.COMMENT_NODE,gr=function(e,t){if(e.nodeType===pr)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){for(var r=e.nodeValue.slice(4).trim(),n=e,a=!1;n=n.nextSibling;)if(n.nodeType===pr&&"noteaser"===n.nodeValue){a=!0,Object(Jt.remove)(n);break}Object(Jt.replace)(e,function(e,t,r){var n=r.createElement("wp-block");n.dataset.block="core/more",e&&(n.dataset.customText=e);t&&(n.dataset.noTeaser="");return n}(r,a,t))}}else Object(Jt.replace)(e,function(e){var t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))};function mr(e){return"OL"===e.nodeName||"UL"===e.nodeName}var br=function(e){if(mr(e)){var t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}var n,a=e.parentNode;if(a&&"LI"===a.nodeName&&1===a.children.length&&!/\S/.test((n=a,Object(s.a)(n.childNodes).map(function(e){var t=e.nodeValue;return void 0===t?"":t}).join("")))){var i=a,o=i.previousElementSibling,c=i.parentNode;o?(o.appendChild(t),c.removeChild(i)):(c.parentNode.insertBefore(t,c),c.parentNode.removeChild(c))}if(a&&mr(a)){var l=e.previousElementSibling;l?l.appendChild(e):Object(Jt.unwrap)(e)}}},_r=function(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=hr(e.innerHTML))};var kr=function(e,t,r){if(function(e,t){var r=e.nodeName.toLowerCase();return"figcaption"!==r&&!rr(e)&&Object(l.has)(t,["figure","children",r])}(e,r)){var n=e,a=e.parentNode;(function(e,t){var r=e.nodeName.toLowerCase();return Object(l.has)(t,["figure","children","a","children",r])})(e,r)&&"A"===a.nodeName&&1===a.childNodes.length&&(n=e.parentNode);for(var i=n;i&&"P"!==i.nodeName;)i=i.parentElement;var o=t.createElement("figure");i?i.parentNode.insertBefore(o,i):n.parentNode.insertBefore(o,n),o.appendChild(n)}},vr=r(134);var wr=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Oe(xe("from"),function(e){return"shortcode"===e.type&&Object(l.some)(Object(l.castArray)(e.tag),function(e){return Object(vr.regexp)(e).test(t)})});if(!n)return[t];var a,i=Object(l.castArray)(n.tag),o=Object(l.first)(i);if(a=Object(vr.next)(o,t,r)){var u=t.substr(0,a.index);if(r=a.index+a.content.length,!Object(l.includes)(a.shortcode.content||"","<")&&!/(\n|

)\s*$/.test(u))return e(t,r);var d=Object(l.mapValues)(Object(l.pickBy)(n.attributes,function(e){return e.shortcode}),function(e){return e.shortcode(a.shortcode.attrs,a)});return[u,_e(n.blockName,Kt(Object(c.a)({},ce(n.blockName),{attributes:n.attributes}),a.shortcode.content,d))].concat(Object(s.a)(e(t.substr(r))))}return[t]},yr=window.Node.COMMENT_NODE,jr=function(e){e.nodeType===yr&&Object(Jt.remove)(e)};function Or(e,t){return e.every(function(e){return function(e,t){if(rr(e))return!0;if(!t)return!1;var r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(function(e){return 0===Object(l.difference)([r,t],e).length})}(e,t)&&Or(Array.from(e.children),t)})}function xr(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var Cr=function(e,t){var r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;var n=Array.from(r.body.children);return!n.some(xr)&&Or(n,t)},Ar=function(e,t){if("SPAN"===e.nodeName&&e.style){var r=e.style,n=r.fontWeight,a=r.fontStyle,i=r.textDecorationLine,o=r.verticalAlign;"bold"!==n&&"700"!==n||Object(Jt.wrap)(t.createElement("strong"),e),"italic"===a&&Object(Jt.wrap)(t.createElement("em"),e),"line-through"===i&&Object(Jt.wrap)(t.createElement("s"),e),"super"===o?Object(Jt.wrap)(t.createElement("sup"),e):"sub"===o&&Object(Jt.wrap)(t.createElement("sub"),e)}else"B"===e.nodeName?e=Object(Jt.replaceTag)(e,"strong"):"I"===e.nodeName?e=Object(Jt.replaceTag)(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")))},Tr=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},Sr=window.parseInt;function Er(e){return"OL"===e.nodeName||"UL"===e.nodeName}var Pr=function(e,t){if("P"===e.nodeName){var r=e.getAttribute("style");if(r&&-1!==r.indexOf("mso-list")){var n=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r);if(n){var a=Sr(n[1],10)-1||0,i=e.previousElementSibling;if(!i||!Er(i)){var o=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(o),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",o),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;a--;)Er(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);Er(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}},Mr=r(35),Nr=window,Lr=Nr.atob,Br=Nr.File,zr=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,r=e.src.split(","),n=Object(Ae.a)(r,2),a=n[0],i=n[1],o=a.slice(5).split(";"),s=Object(Ae.a)(o,1)[0];if(!i||!s)return void(e.src="");try{t=Lr(i)}catch(t){return void(e.src="")}for(var c=new Uint8Array(t.length),l=0;l]+>/,""),"INLINE"!==o){var f=r||a;if(-1!==f.indexOf("\x3c!-- wp:"))return Qt(f)}if(String.prototype.normalize&&(r=r.normalize()),!a||r&&!function(e){return!/<(?!br[ \/>])/i.test(e)}(r)||(r=Ir(a),"AUTO"===o&&-1===a.indexOf("\n")&&0!==a.indexOf("

")&&0===r.indexOf("

")&&(o="INLINE")),"INLINE"===o)return qr(r);var h=wr(r),p=h.length>1;if("AUTO"===o&&!p&&Cr(r,s))return qr(r);var g=Object(l.filter)(xe("from"),{type:"raw"}).map(function(e){return e.isMatch?e:Object(c.a)({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})}),m=tr(),b=or(g),_=Object(l.compact)(Object(l.flatMap)(h,function(e){if("string"!=typeof e)return e;var t=[Rr,Pr,Tr,br,zr,Ar,gr,jr,kr,_r];d||t.unshift(Vr);var r=Object(c.a)({},b,m);return e=lr(e=cr(e,t,b),r),e=hr(e),Fr.log("Processed HTML piece:\n\n",e),function(e){var t=e.html,r=e.rawTransforms,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=t,Array.from(n.body.children).map(function(e){var t=Oe(r,function(t){return(0,t.isMatch)(e)});if(!t)return _e("core/html",Kt("core/html",e.outerHTML));var n=t.transform,a=t.blockName;return n?n(e):_e(a,Kt(a,e.outerHTML))})}({html:e,rawTransforms:g})}));if("AUTO"===o&&1===_.length){var k=a.trim();if(""!==k&&-1===k.indexOf("\n"))return lr(st(_[0]),m)}return _}function Ur(e){var t=e.HTML,r=void 0===t?"":t;if(-1!==r.indexOf("\x3c!-- wp:"))return Qt(r);var n=wr(r),a=Object(l.filter)(xe("from"),{type:"raw"}).map(function(e){return e.isMatch?e:Object(c.a)({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})}),i=or(a);return Object(l.compact)(Object(l.flatMap)(n,function(e){return"string"!=typeof e?e:(e=cr(e,[br,gr,kr,_r],i),function(e){var t=e.html,r=e.rawTransforms,n=document.implementation.createHTMLDocument("");return n.body.innerHTML=t,Array.from(n.body.children).map(function(e){var t=Oe(r,function(t){return(0,t.isMatch)(e)});if(!t)return _e("core/html",Kt("core/html",e.outerHTML));var n=t.transform,a=t.blockName;return n?n(e):_e(a,Kt(a,e.outerHTML))})}({html:e=hr(e),rawTransforms:a}))}))}function Gr(){return Object(i.select)("core/blocks").getCategories()}function Wr(e){Object(i.dispatch)("core/blocks").setCategories(e)}function Kr(e,t){Object(i.dispatch)("core/blocks").updateCategory(e,t)}function Yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&Object(l.every)(t,function(t,r){var n=Object(Ae.a)(t,3),a=n[0],i=n[2],o=e[r];return a===o.name&&Yr(o.innerBlocks,i)})}function Zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(l.map)(t,function(t,r){var n=Object(Ae.a)(t,3),a=n[0],i=n[1],o=n[2],s=e[r];if(s&&s.name===a){var u=Zr(s.innerBlocks,o);return Object(c.a)({},s,{innerBlocks:u})}var d=ce(a),f=function(e,t){return Object(l.mapValues)(t,function(t,r){return h(e[r],t)})},h=function(e,t){return r=e,"html"===Object(l.get)(r,["source"])&&Object(l.isArray)(t)?Object(G.renderToString)(t):function(e){return"query"===Object(l.get)(e,["source"])}(e)&&t?t.map(function(t){return f(e.query,t)}):t;var r};return _e(a,f(Object(l.get)(d,["attributes"],{}),i),Zr([],o))}):e}r.d(t,"createBlock",function(){return _e}),r.d(t,"cloneBlock",function(){return ke}),r.d(t,"getPossibleBlockTransformations",function(){return je}),r.d(t,"switchToBlockType",function(){return Ce}),r.d(t,"getBlockTransforms",function(){return xe}),r.d(t,"findTransform",function(){return Oe}),r.d(t,"parse",function(){return Xt}),r.d(t,"getBlockAttributes",function(){return Kt}),r.d(t,"parseWithAttributeSchema",function(){return Wt}),r.d(t,"pasteHandler",function(){return $r}),r.d(t,"rawHandler",function(){return Ur}),r.d(t,"getPhrasingContentSchema",function(){return tr}),r.d(t,"serialize",function(){return ut}),r.d(t,"getBlockContent",function(){return st}),r.d(t,"getBlockDefaultClassName",function(){return nt}),r.d(t,"getBlockMenuDefaultClassName",function(){return at}),r.d(t,"getSaveElement",function(){return it}),r.d(t,"getSaveContent",function(){return ot}),r.d(t,"isValidBlockContent",function(){return Mt}),r.d(t,"getCategories",function(){return Gr}),r.d(t,"setCategories",function(){return Wr}),r.d(t,"updateCategory",function(){return Kr}),r.d(t,"registerBlockType",function(){return ee}),r.d(t,"unregisterBlockType",function(){return te}),r.d(t,"setFreeformContentHandlerName",function(){return re}),r.d(t,"getFreeformContentHandlerName",function(){return ne}),r.d(t,"setUnregisteredTypeHandlerName",function(){return ae}),r.d(t,"getUnregisteredTypeHandlerName",function(){return ie}),r.d(t,"setDefaultBlockName",function(){return oe}),r.d(t,"getDefaultBlockName",function(){return se}),r.d(t,"getBlockType",function(){return ce}),r.d(t,"getBlockTypes",function(){return le}),r.d(t,"getBlockSupport",function(){return ue}),r.d(t,"hasBlockSupport",function(){return de}),r.d(t,"isReusableBlock",function(){return fe}),r.d(t,"getChildBlockNames",function(){return he}),r.d(t,"hasChildBlocks",function(){return pe}),r.d(t,"hasChildBlocksWithInserterSupport",function(){return ge}),r.d(t,"unstable__bootstrapServerSideBlockDefinitions",function(){return J}),r.d(t,"registerBlockStyle",function(){return me}),r.d(t,"unregisterBlockStyle",function(){return be}),r.d(t,"isUnmodifiedDefaultBlock",function(){return K}),r.d(t,"normalizeIconObject",function(){return Z}),r.d(t,"isValidIcon",function(){return Y}),r.d(t,"doBlocksMatchTemplate",function(){return Yr}),r.d(t,"synchronizeBlocksWithTemplate",function(){return Zr}),r.d(t,"children",function(){return zt}),r.d(t,"node",function(){return qt}),r.d(t,"withBlockContentContext",function(){return tt})},37:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",function(){return n})},38:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}r.d(t,"a",function(){return n})},42:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},45:function(e,t,r){var n;!function(a){var i=/^\s+/,o=/\s+$/,s=0,c=a.round,l=a.min,u=a.max,d=a.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var r=function(e){var t={r:0,g:0,b:0},r=1,n=null,s=null,c=null,d=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,r=!1;if(E[e])e=E[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=q.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=q.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=q.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=q.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=q.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=q.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=q.hex8.exec(e))return{r:B(t[1]),g:B(t[2]),b:B(t[3]),a:I(t[4]),format:r?"name":"hex8"};if(t=q.hex6.exec(e))return{r:B(t[1]),g:B(t[2]),b:B(t[3]),format:r?"name":"hex"};if(t=q.hex4.exec(e))return{r:B(t[1]+""+t[1]),g:B(t[2]+""+t[2]),b:B(t[3]+""+t[3]),a:I(t[4]+""+t[4]),format:r?"name":"hex8"};if(t=q.hex3.exec(e))return{r:B(t[1]+""+t[1]),g:B(t[2]+""+t[2]),b:B(t[3]+""+t[3]),format:r?"name":"hex"};return!1}(e));"object"==typeof e&&($(e.r)&&$(e.g)&&$(e.b)?(h=e.r,p=e.g,g=e.b,t={r:255*N(h,255),g:255*N(p,255),b:255*N(g,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):$(e.h)&&$(e.s)&&$(e.v)?(n=H(e.s),s=H(e.v),t=function(e,t,r){e=6*N(e,360),t=N(t,100),r=N(r,100);var n=a.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),c=r*(1-(1-i)*t),l=n%6;return{r:255*[r,s,o,o,c,r][l],g:255*[c,r,r,s,o,o][l],b:255*[o,o,c,r,r,s][l]}}(e.h,n,s),d=!0,f="hsv"):$(e.h)&&$(e.s)&&$(e.l)&&(n=H(e.s),c=H(e.l),t=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=N(e,360),t=N(t,100),r=N(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;n=o(c,s,e+1/3),a=o(c,s,e),i=o(c,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,n,c),d=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,p,g;return r=M(r),{ok:d,format:e.format||f,r:l(255,u(t.r,0)),g:l(255,u(t.g,0)),b:l(255,u(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function h(e,t,r){e=N(e,255),t=N(t,255),r=N(r,255);var n,a,i=u(e,t,r),o=l(e,t,r),s=(i+o)/2;if(i==o)n=a=0;else{var c=i-o;switch(a=s>.5?c/(2-i-o):c/(i+o),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(f(n));return i}function S(e,t){t=t||6;for(var r=f(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(f({h:n,s:a,v:i})),i=(i+s)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=M(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[z(c(e).toString(16)),z(c(t).toString(16)),z(c(r).toString(16)),z(D(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*N(this._r,255))+"%",g:c(100*N(this._g,255))+"%",b:c(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%)":"rgba("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);r="#"+m(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(j,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:H(e[n]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,r){r=0===r?0:r||50;var n=f(e).toRgb(),a=f(t).toRgb(),i=r/100;return f({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},f.readability=function(e,t){var r=f(e),n=f(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},f.isReadable=function(e,t,r){var n,a,i=f.readability(e,t);switch(a=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},f.mostReadable=function(e,t,r){var n,a,i,o,s=null,c=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var l=0;lc&&(c=n,s=f(t[l]));return f.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var E=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(E);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function L(e){return l(1,u(0,e))}function B(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function H(e){return e<=1&&(e=100*e+"%"),e}function D(e){return a.round(255*parseFloat(e)).toString(16)}function I(e){return B(e)/255}var V,R,F,q=(R="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",F="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function $(e){return!!q.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(n=function(){return f}.call(t,r,t,e))||(e.exports=n)}(Math)},5:function(e,t){!function(){e.exports=this.wp.data}()},57:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},6:function(e,t){!function(){e.exports=this.wp.compose}()},65:function(e,t,r){var n=r(87),a=r(88);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},66:function(e,t){!function(){e.exports=this.wp.autop}()},7:function(e,t,r){"use strict";r.d(t,"a",function(){return a});var n=r(15);function a(e){for(var t=1;t>>((3&t)<<3)&255;return a}}},88:function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,a=r;return[a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]]].join("")}},9:function(e,t,r){"use strict";function n(e,t){for(var r=0;r0||e.offsetHeight>0||e.getClientRects().length>0}function c(e){var t=e.querySelectorAll(a);return Object(i.a)(t).filter(function(e){return!!u(e)&&("AREA"!==e.nodeName||function(e){var t=e.closest("map[name]");if(!t)return!1;var n=document.querySelector('img[usemap="#'+t.name+'"]');return!!n&&u(n)}(e))})}var l=n(2);function d(e){var t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function f(e){return-1!==d(e)}function s(e,t){return{element:e,index:t}}function g(e){return e.element}function p(e,t){var n=d(e.element),r=d(t.element);return n===r?e.index-t.index:n-r}function v(e){return c(e).filter(f).map(s).sort(p).map(g).reduce((t={},function(e,n){var r=n.nodeName,o=n.type,i=n.checked,a=n.name;if("INPUT"!==r||"radio"!==o||!a)return e.concat(n);var u=t.hasOwnProperty(a);if(!i&&u)return e;if(u){var c=t[a];e=Object(l.without)(e,c)}return t[a]=n,e.concat(n)}),[]);var t}var m=window.getComputedStyle,h=window.Node,b=h.TEXT_NODE,C=h.ELEMENT_NODE,N=h.DOCUMENT_POSITION_PRECEDING,E=h.DOCUMENT_POSITION_FOLLOWING;function y(e,t,n){if(Object(l.includes)(["INPUT","TEXTAREA"],e.tagName))return e.selectionStart===e.selectionEnd&&(t?0===e.selectionStart:e.value.length===e.selectionStart);if(!e.isContentEditable)return!0;var r=window.getSelection();if(!r.rangeCount)return!1;var o=r.getRangeAt(0).cloneRange(),i=function(e){var t=e.anchorNode,n=e.focusNode,r=e.anchorOffset,o=e.focusOffset,i=t.compareDocumentPosition(n);return!(i&N)&&(!!(i&E)||0!==i||r<=o)}(r),a=r.isCollapsed;a||o.collapse(!i);var u=S(o);if(!u)return!1;var c=window.getComputedStyle(e),d=parseInt(c.lineHeight,10)||0;if(!a&&u.height>d&&i===t)return!1;var f=parseInt(c["padding".concat(t?"Top":"Bottom")],10)||0,s=3*parseInt(d,10)/4,g=e.getBoundingClientRect();if(!(t?g.top+f>u.top-s:g.bottom-f3&&void 0!==arguments[3])||arguments[3];if(e)if(n&&e.isContentEditable){var o=n.height/2,i=e.getBoundingClientRect(),a=n.left,u=t?i.bottom-o:i.top+o,c=A(document,a,u,e);if(!c||!e.contains(c.startContainer))return!r||c&&c.startContainer&&c.startContainer.contains(e)?void T(e,t):(e.scrollIntoView(t),void P(e,t,n,!1));if(c.startContainer.nodeType===b){var l=c.startContainer.parentNode,d=l.getBoundingClientRect(),f=t?"bottom":"top",s=parseInt(m(l).getPropertyValue("padding-".concat(f)),10)||0,g=t?d.bottom-s-o:d.top+s+o;u!==g&&(c=A(document,a,g,e))}var p=window.getSelection();p.removeAllRanges(),p.addRange(c),e.focus(),p.removeAllRanges(),p.addRange(c)}else T(e,t)}function I(e){try{var t=e.nodeName,n=e.selectionStart,r=e.contentEditable;return"INPUT"===t&&null!==n||"TEXTAREA"===t||"true"===r}catch(e){return!1}}function x(){if(I(document.activeElement))return!0;var e=window.getSelection(),t=e.rangeCount?e.getRangeAt(0):null;return t&&!t.collapsed}function j(e){if(Object(l.includes)(["INPUT","TEXTAREA"],e.nodeName))return 0===e.selectionStart&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;var t=window.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;if(!n)return!0;var r=n.startContainer,o=n.endContainer,i=n.startOffset,a=n.endOffset;if(r===e&&o===e&&0===i&&a===e.childNodes.length)return!0;var u=e.lastChild,c=u.nodeType===b?u.data.length:u.childNodes.length;return r===e.firstChild&&o===e.lastChild&&0===i&&a===c}function _(e){if(e){if(e.scrollHeight>e.clientHeight){var t=window.getComputedStyle(e).overflowY;if(/(auto|scroll)/.test(t))return e}return _(e.parentNode)}}function B(e){for(var t;(t=e.parentNode)&&t.nodeType!==C;);return t?"static"!==m(t).position?t:t.offsetParent:null}function M(e,t){F(t,e.parentNode),D(e)}function D(e){e.parentNode.removeChild(e)}function F(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function H(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function U(e,t){for(var n=e.ownerDocument.createElement(t);e.firstChild;)n.appendChild(e.firstChild);return e.parentNode.replaceChild(n,e),n}function X(e,t){t.parentNode.insertBefore(e,t),e.appendChild(t)}n.d(t,"focus",function(){return z}),n.d(t,"isHorizontalEdge",function(){return w}),n.d(t,"isVerticalEdge",function(){return R}),n.d(t,"getRectangleFromRange",function(){return S}),n.d(t,"computeCaretRect",function(){return O}),n.d(t,"placeCaretAtHorizontalEdge",function(){return T}),n.d(t,"placeCaretAtVerticalEdge",function(){return P}),n.d(t,"isTextField",function(){return I}),n.d(t,"documentHasSelection",function(){return x}),n.d(t,"isEntirelySelected",function(){return j}),n.d(t,"getScrollContainer",function(){return _}),n.d(t,"getOffsetParent",function(){return B}),n.d(t,"replace",function(){return M}),n.d(t,"remove",function(){return D}),n.d(t,"insertAfter",function(){return F}),n.d(t,"unwrap",function(){return H}),n.d(t,"replaceTag",function(){return U}),n.d(t,"wrap",function(){return X});var z={focusable:r,tabbable:o}}}); \ No newline at end of file +this.wp=this.wp||{},this.wp.dom=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=379)}({17:function(e,t,n){"use strict";var r=n(34);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0||e.offsetHeight>0||e.getClientRects().length>0}function c(e){var t=e.querySelectorAll(a);return Object(i.a)(t).filter(function(e){return!!u(e)&&("AREA"!==e.nodeName||function(e){var t=e.closest("map[name]");if(!t)return!1;var n=document.querySelector('img[usemap="#'+t.name+'"]');return!!n&&u(n)}(e))})}var l=n(2);function d(e){var t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function f(e){return-1!==d(e)}function s(e,t){return{element:e,index:t}}function g(e){return e.element}function p(e,t){var n=d(e.element),r=d(t.element);return n===r?e.index-t.index:n-r}function v(e){return c(e).filter(f).map(s).sort(p).map(g).reduce((t={},function(e,n){var r=n.nodeName,o=n.type,i=n.checked,a=n.name;if("INPUT"!==r||"radio"!==o||!a)return e.concat(n);var u=t.hasOwnProperty(a);if(!i&&u)return e;if(u){var c=t[a];e=Object(l.without)(e,c)}return t[a]=n,e.concat(n)}),[]);var t}var m=window.getComputedStyle,h=window.Node,b=h.TEXT_NODE,C=h.ELEMENT_NODE,N=h.DOCUMENT_POSITION_PRECEDING,E=h.DOCUMENT_POSITION_FOLLOWING;function y(e,t,n){if(Object(l.includes)(["INPUT","TEXTAREA"],e.tagName))return e.selectionStart===e.selectionEnd&&(t?0===e.selectionStart:e.value.length===e.selectionStart);if(!e.isContentEditable)return!0;var r=window.getSelection();if(!r.rangeCount)return!1;var o=r.getRangeAt(0).cloneRange(),i=function(e){var t=e.anchorNode,n=e.focusNode,r=e.anchorOffset,o=e.focusOffset,i=t.compareDocumentPosition(n);return!(i&N)&&(!!(i&E)||0!==i||r<=o)}(r),a=r.isCollapsed;a||o.collapse(!i);var u=S(o);if(!u)return!1;var c=window.getComputedStyle(e),d=parseInt(c.lineHeight,10)||0;if(!a&&u.height>d&&i===t)return!1;var f=parseInt(c["padding".concat(t?"Top":"Bottom")],10)||0,s=3*parseInt(d,10)/4,g=e.getBoundingClientRect();if(!(t?g.top+f>u.top-s:g.bottom-f3&&void 0!==arguments[3])||arguments[3];if(e)if(n&&e.isContentEditable){var o=n.height/2,i=e.getBoundingClientRect(),a=n.left,u=t?i.bottom-o:i.top+o,c=A(document,a,u,e);if(!c||!e.contains(c.startContainer))return!r||c&&c.startContainer&&c.startContainer.contains(e)?void T(e,t):(e.scrollIntoView(t),void P(e,t,n,!1));if(c.startContainer.nodeType===b){var l=c.startContainer.parentNode,d=l.getBoundingClientRect(),f=t?"bottom":"top",s=parseInt(m(l).getPropertyValue("padding-".concat(f)),10)||0,g=t?d.bottom-s-o:d.top+s+o;u!==g&&(c=A(document,a,g,e))}var p=window.getSelection();p.removeAllRanges(),p.addRange(c),e.focus(),p.removeAllRanges(),p.addRange(c)}else T(e,t)}function I(e){try{var t=e.nodeName,n=e.selectionStart,r=e.contentEditable;return"INPUT"===t&&null!==n||"TEXTAREA"===t||"true"===r}catch(e){return!1}}function x(){if(I(document.activeElement))return!0;var e=window.getSelection(),t=e.rangeCount?e.getRangeAt(0):null;return t&&!t.collapsed}function j(e){if(Object(l.includes)(["INPUT","TEXTAREA"],e.nodeName))return 0===e.selectionStart&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;var t=window.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;if(!n)return!0;var r=n.startContainer,o=n.endContainer,i=n.startOffset,a=n.endOffset;if(r===e&&o===e&&0===i&&a===e.childNodes.length)return!0;var u=e.lastChild,c=u.nodeType===b?u.data.length:u.childNodes.length;return r===e.firstChild&&o===e.lastChild&&0===i&&a===c}function _(e){if(e){if(e.scrollHeight>e.clientHeight){var t=window.getComputedStyle(e).overflowY;if(/(auto|scroll)/.test(t))return e}return _(e.parentNode)}}function B(e){for(var t;(t=e.parentNode)&&t.nodeType!==C;);return t?"static"!==m(t).position?t:t.offsetParent:null}function M(e,t){F(t,e.parentNode),D(e)}function D(e){e.parentNode.removeChild(e)}function F(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function H(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function U(e,t){for(var n=e.ownerDocument.createElement(t);e.firstChild;)n.appendChild(e.firstChild);return e.parentNode.replaceChild(n,e),n}function X(e,t){t.parentNode.insertBefore(e,t),e.appendChild(t)}n.d(t,"focus",function(){return z}),n.d(t,"isHorizontalEdge",function(){return w}),n.d(t,"isVerticalEdge",function(){return R}),n.d(t,"getRectangleFromRange",function(){return S}),n.d(t,"computeCaretRect",function(){return O}),n.d(t,"placeCaretAtHorizontalEdge",function(){return T}),n.d(t,"placeCaretAtVerticalEdge",function(){return P}),n.d(t,"isTextField",function(){return I}),n.d(t,"documentHasSelection",function(){return x}),n.d(t,"isEntirelySelected",function(){return j}),n.d(t,"getScrollContainer",function(){return _}),n.d(t,"getOffsetParent",function(){return B}),n.d(t,"replace",function(){return M}),n.d(t,"remove",function(){return D}),n.d(t,"insertAfter",function(){return F}),n.d(t,"unwrap",function(){return H}),n.d(t,"replaceTag",function(){return U}),n.d(t,"wrap",function(){return X});var z={focusable:r,tabbable:o}}}); \ No newline at end of file diff --git a/wp-includes/js/dist/editor.js b/wp-includes/js/dist/editor.js index 8f6135cb62..a44aa1c0df 100644 --- a/wp-includes/js/dist/editor.js +++ b/wp-includes/js/dist/editor.js @@ -2738,6 +2738,7 @@ __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { retur __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return clearSelectedBlock; }); __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return toggleSelection; }); __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return replaceBlocks; }); +__webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; }); __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return moveBlocksDown; }); __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return moveBlocksUp; }); __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return moveBlockToPosition; }); @@ -5258,6 +5259,7 @@ var multiSelect = actions_getBlockEditorAction('multiSelect'); var clearSelectedBlock = actions_getBlockEditorAction('clearSelectedBlock'); var toggleSelection = actions_getBlockEditorAction('toggleSelection'); var replaceBlocks = actions_getBlockEditorAction('replaceBlocks'); +var replaceBlock = actions_getBlockEditorAction('replaceBlock'); var moveBlocksDown = actions_getBlockEditorAction('moveBlocksDown'); var moveBlocksUp = actions_getBlockEditorAction('moveBlocksUp'); var moveBlockToPosition = actions_getBlockEditorAction('moveBlockToPosition'); diff --git a/wp-includes/js/dist/editor.min.js b/wp-includes/js/dist/editor.min.js index d49a648651..29f1cff18d 100644 --- a/wp-includes/js/dist/editor.min.js +++ b/wp-includes/js/dist/editor.min.js @@ -14,4 +14,4 @@ this.wp=this.wp||{},this.wp.editor=function(t){var e={};function n(r){if(e[r])re Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",function(){return r})},227:function(t,e){var n=t.exports=function(t){return new r(t)};function r(t){this.value=t}function o(t,e,n){var r=[],o=[],a=!0;return function t(d){var p=n?i(d):d,h={},f=!0,b={node:p,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){b.isRoot||(b.parent.node[b.key]=t),b.node=t,e&&(f=!1)},delete:function(t){delete b.parent.node[b.key],t&&(f=!1)},remove:function(t){c(b.parent.node)?b.parent.node.splice(b.key,1):delete b.parent.node[b.key],t&&(f=!1)},keys:null,before:function(t){h.before=t},after:function(t){h.after=t},pre:function(t){h.pre=t},post:function(t){h.post=t},stop:function(){a=!1},block:function(){f=!1}};if(!a)return b;function m(){if("object"==typeof b.node&&null!==b.node){b.keys&&b.node_===b.node||(b.keys=s(b.node)),b.isLeaf=0==b.keys.length;for(var t=0;t=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["optimist"])}}return{optimist:a,innerState:t}}t.exports=function(t){function e(e,n,o){return e.length&&(e=e.concat([{action:o}])),u(n=t(n,o),o),r({optimist:e},n)}return function(n,a){if(a.optimist)switch(a.optimist.type){case o:return function(e,n){var o=l(e),i=o.optimist,s=o.innerState;return i=i.concat([{beforeState:s,action:n}]),u(s=t(s,n),n),r({optimist:i},s)}(n,a);case i:return function(t,n){var r=l(t),o=r.optimist,i=r.innerState,s=[],a=!1,u=!1;o.forEach(function(t){a?t.beforeState&&c(t.action,n.optimist.id)?(u=!0,s.push({action:t.action})):s.push(t):t.beforeState&&!c(t.action,n.optimist.id)?(a=!0,s.push(t)):t.beforeState&&c(t.action,n.optimist.id)&&(u=!0)}),u||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist');return e(o=s,i,n)}(n,a);case s:return function(n,r){var o=l(n),i=o.optimist,s=o.innerState,a=[],d=!1,p=!1,h=s;i.forEach(function(e){e.beforeState&&c(e.action,r.optimist.id)&&(h=e.beforeState,p=!0),c(e.action,r.optimist.id)||(e.beforeState&&(d=!0),d&&(p&&e.beforeState?a.push({beforeState:h,action:e.action}):a.push(e)),p&&(h=t(h,e.action),u(s,r)))}),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist');return e(i=a,h,r)}(n,a)}var d=l(n),p=d.optimist,h=d.innerState;if(n&&!p.length){var f=t(h,a);return f===h?n:(u(f,a),r({optimist:p},f))}return e(p,h,a)}},t.exports.BEGIN=o,t.exports.COMMIT=i,t.exports.REVERT=s},35:function(t,e){!function(){t.exports=this.wp.blob}()},358:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"setupEditor",function(){return it}),n.d(r,"resetPost",function(){return st}),n.d(r,"resetAutosave",function(){return at}),n.d(r,"__experimentalRequestPostUpdateStart",function(){return ct}),n.d(r,"__experimentalRequestPostUpdateSuccess",function(){return ut}),n.d(r,"__experimentalRequestPostUpdateFailure",function(){return lt}),n.d(r,"updatePost",function(){return dt}),n.d(r,"setupEditorState",function(){return pt}),n.d(r,"editPost",function(){return ht}),n.d(r,"__experimentalOptimisticUpdatePost",function(){return ft}),n.d(r,"savePost",function(){return bt}),n.d(r,"refreshPost",function(){return mt}),n.d(r,"trashPost",function(){return vt}),n.d(r,"autosave",function(){return Ot}),n.d(r,"redo",function(){return gt}),n.d(r,"undo",function(){return yt}),n.d(r,"createUndoLevel",function(){return jt}),n.d(r,"updatePostLock",function(){return _t}),n.d(r,"__experimentalFetchReusableBlocks",function(){return kt}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return Et}),n.d(r,"__experimentalSaveReusableBlock",function(){return St}),n.d(r,"__experimentalDeleteReusableBlock",function(){return Pt}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return wt}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Tt}),n.d(r,"__experimentalConvertBlockToReusable",function(){return Ct}),n.d(r,"enablePublishSidebar",function(){return xt}),n.d(r,"disablePublishSidebar",function(){return Bt}),n.d(r,"lockPostSaving",function(){return At}),n.d(r,"unlockPostSaving",function(){return It}),n.d(r,"resetEditorBlocks",function(){return Lt}),n.d(r,"updateEditorSettings",function(){return Rt}),n.d(r,"resetBlocks",function(){return Ut}),n.d(r,"receiveBlocks",function(){return Dt}),n.d(r,"updateBlock",function(){return Ft}),n.d(r,"updateBlockAttributes",function(){return Mt}),n.d(r,"selectBlock",function(){return Vt}),n.d(r,"startMultiSelect",function(){return zt}),n.d(r,"stopMultiSelect",function(){return Kt}),n.d(r,"multiSelect",function(){return qt}),n.d(r,"clearSelectedBlock",function(){return Wt}),n.d(r,"toggleSelection",function(){return Ht}),n.d(r,"replaceBlocks",function(){return Gt}),n.d(r,"moveBlocksDown",function(){return Qt}),n.d(r,"moveBlocksUp",function(){return Yt}),n.d(r,"moveBlockToPosition",function(){return $t}),n.d(r,"insertBlock",function(){return Xt}),n.d(r,"insertBlocks",function(){return Zt}),n.d(r,"showInsertionPoint",function(){return Jt}),n.d(r,"hideInsertionPoint",function(){return te}),n.d(r,"setTemplateValidity",function(){return ee}),n.d(r,"synchronizeTemplate",function(){return ne}),n.d(r,"mergeBlocks",function(){return re}),n.d(r,"removeBlocks",function(){return oe}),n.d(r,"removeBlock",function(){return ie}),n.d(r,"toggleBlockMode",function(){return se}),n.d(r,"startTyping",function(){return ae}),n.d(r,"stopTyping",function(){return ce}),n.d(r,"enterFormattedText",function(){return ue}),n.d(r,"exitFormattedText",function(){return le}),n.d(r,"insertDefaultBlock",function(){return de}),n.d(r,"updateBlockListSettings",function(){return pe});var o={};n.r(o),n.d(o,"hasEditorUndo",function(){return Oe}),n.d(o,"hasEditorRedo",function(){return ge}),n.d(o,"isEditedPostNew",function(){return ye}),n.d(o,"hasChangedContent",function(){return je}),n.d(o,"isEditedPostDirty",function(){return _e}),n.d(o,"isCleanNewPost",function(){return ke}),n.d(o,"getCurrentPost",function(){return Ee}),n.d(o,"getCurrentPostType",function(){return Se}),n.d(o,"getCurrentPostId",function(){return Pe}),n.d(o,"getCurrentPostRevisionsCount",function(){return we}),n.d(o,"getCurrentPostLastRevisionId",function(){return Te}),n.d(o,"getPostEdits",function(){return Ce}),n.d(o,"getReferenceByDistinctEdits",function(){return xe}),n.d(o,"getCurrentPostAttribute",function(){return Be}),n.d(o,"getEditedPostAttribute",function(){return Ie}),n.d(o,"getAutosaveAttribute",function(){return Le}),n.d(o,"getEditedPostVisibility",function(){return Re}),n.d(o,"isCurrentPostPending",function(){return Ne}),n.d(o,"isCurrentPostPublished",function(){return Ue}),n.d(o,"isCurrentPostScheduled",function(){return De}),n.d(o,"isEditedPostPublishable",function(){return Fe}),n.d(o,"isEditedPostSaveable",function(){return Me}),n.d(o,"isEditedPostEmpty",function(){return Ve}),n.d(o,"isEditedPostAutosaveable",function(){return ze}),n.d(o,"getAutosave",function(){return Ke}),n.d(o,"hasAutosave",function(){return qe}),n.d(o,"isEditedPostBeingScheduled",function(){return We}),n.d(o,"isEditedPostDateFloating",function(){return He}),n.d(o,"isSavingPost",function(){return Ge}),n.d(o,"didPostSaveRequestSucceed",function(){return Qe}),n.d(o,"didPostSaveRequestFail",function(){return Ye}),n.d(o,"isAutosavingPost",function(){return $e}),n.d(o,"isPreviewingPost",function(){return Xe}),n.d(o,"getEditedPostPreviewLink",function(){return Ze}),n.d(o,"getSuggestedPostFormat",function(){return Je}),n.d(o,"getBlocksForSerialization",function(){return tn}),n.d(o,"getEditedPostContent",function(){return en}),n.d(o,"__experimentalGetReusableBlock",function(){return nn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return rn}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return on}),n.d(o,"__experimentalGetReusableBlocks",function(){return sn}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return an}),n.d(o,"isPublishingPost",function(){return cn}),n.d(o,"isPermalinkEditable",function(){return un}),n.d(o,"getPermalink",function(){return ln}),n.d(o,"getPermalinkParts",function(){return dn}),n.d(o,"inSomeHistory",function(){return pn}),n.d(o,"isPostLocked",function(){return hn}),n.d(o,"isPostSavingLocked",function(){return fn}),n.d(o,"isPostLockTakeover",function(){return bn}),n.d(o,"getPostLockUser",function(){return mn}),n.d(o,"getActivePostLock",function(){return vn}),n.d(o,"canUserUseUnfilteredHTML",function(){return On}),n.d(o,"isPublishSidebarEnabled",function(){return gn}),n.d(o,"getEditorBlocks",function(){return yn}),n.d(o,"__unstableIsEditorReady",function(){return jn}),n.d(o,"getEditorSettings",function(){return _n}),n.d(o,"getBlockDependantsCacheBust",function(){return En}),n.d(o,"getBlockName",function(){return Sn}),n.d(o,"isBlockValid",function(){return Pn}),n.d(o,"getBlockAttributes",function(){return wn}),n.d(o,"getBlock",function(){return Tn}),n.d(o,"getBlocks",function(){return Cn}),n.d(o,"__unstableGetBlockWithoutInnerBlocks",function(){return xn}),n.d(o,"getClientIdsOfDescendants",function(){return Bn}),n.d(o,"getClientIdsWithDescendants",function(){return An}),n.d(o,"getGlobalBlockCount",function(){return In}),n.d(o,"getBlocksByClientId",function(){return Ln}),n.d(o,"getBlockCount",function(){return Rn}),n.d(o,"getBlockSelectionStart",function(){return Nn}),n.d(o,"getBlockSelectionEnd",function(){return Un}),n.d(o,"getSelectedBlockCount",function(){return Dn}),n.d(o,"hasSelectedBlock",function(){return Fn}),n.d(o,"getSelectedBlockClientId",function(){return Mn}),n.d(o,"getSelectedBlock",function(){return Vn}),n.d(o,"getBlockRootClientId",function(){return zn}),n.d(o,"getBlockHierarchyRootClientId",function(){return Kn}),n.d(o,"getAdjacentBlockClientId",function(){return qn}),n.d(o,"getPreviousBlockClientId",function(){return Wn}),n.d(o,"getNextBlockClientId",function(){return Hn}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Gn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Qn}),n.d(o,"getMultiSelectedBlocks",function(){return Yn}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return $n}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return Xn}),n.d(o,"isFirstMultiSelectedBlock",function(){return Zn}),n.d(o,"isBlockMultiSelected",function(){return Jn}),n.d(o,"isAncestorMultiSelected",function(){return tr}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return er}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return nr}),n.d(o,"getBlockOrder",function(){return rr}),n.d(o,"getBlockIndex",function(){return or}),n.d(o,"isBlockSelected",function(){return ir}),n.d(o,"hasSelectedInnerBlock",function(){return sr}),n.d(o,"isBlockWithinSelection",function(){return ar}),n.d(o,"hasMultiSelection",function(){return cr}),n.d(o,"isMultiSelecting",function(){return ur}),n.d(o,"isSelectionEnabled",function(){return lr}),n.d(o,"getBlockMode",function(){return dr}),n.d(o,"isTyping",function(){return pr}),n.d(o,"isCaretWithinFormattedText",function(){return hr}),n.d(o,"getBlockInsertionPoint",function(){return fr}),n.d(o,"isBlockInsertionPointVisible",function(){return br}),n.d(o,"isValidTemplate",function(){return mr}),n.d(o,"getTemplate",function(){return vr}),n.d(o,"getTemplateLock",function(){return Or}),n.d(o,"canInsertBlockType",function(){return gr}),n.d(o,"getInserterItems",function(){return yr}),n.d(o,"hasInserterItems",function(){return jr}),n.d(o,"getBlockListSettings",function(){return _r});var i=n(8),s=n(14),a=(n(72),n(133),n(60)),c=n(20),u=n(40),l=n(5),d=n(28),p=n(15),h=n(7),f=n(32),b=n(62),m=n.n(b),v=n(2),O=n(25),g={isPublishSidebarEnabled:!0},y={},j=Object(h.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,enableCustomFields:!1}),_=new Set(["meta"]),k="core/editor",E="post-update",S="SAVE_POST_NOTICE_ID",P="TRASH_POST_NOTICE_ID",w=/%(?:postname|pagename)%/,T=6e4,C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){return function(n,r){var o=e(n,r),i=void 0===n||Object(v.includes)(t.resetTypes,r.type),s=n!==o;if(!s&&!i)return n;s&&void 0!==n||(o=Object(h.a)({},o));var a=Object(v.includes)(t.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&s,o}}},x=n(17),B={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){(t=Object(h.a)({},B,t)).shouldOverwriteState=Object(v.overSome)([t.shouldOverwriteState,function(e){return Object(v.includes)(t.ignoreTypes,e.type)}]);var n={past:[],present:e(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=t,o=r.resetTypes,i=void 0===o?[]:o,s=r.shouldOverwriteState,a=void 0===s?function(){return!1}:s;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=t.past,s=t.present,c=t.future,u=t.lastAction,l=t.shouldCreateUndoLevel,d=u;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[s].concat(Object(x.a)(c)),lastAction:null,shouldCreateUndoLevel:!1}:t;case"REDO":return c.length?{past:[].concat(Object(x.a)(o),[s]),present:Object(v.first)(c),future:Object(v.drop)(c),lastAction:null,shouldCreateUndoLevel:!1}:t;case"CREATE_UNDO_LEVEL":return Object(h.a)({},t,{lastAction:null,shouldCreateUndoLevel:!0})}var p=e(s,r);if(Object(v.includes)(i,r.type))return{past:[],present:p,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(s===p)return t;var f=o,b=d;return!l&&o.length&&a(r,d)||(f=[].concat(Object(x.a)(o),[s]),b=r),{past:f,present:p,future:[],shouldCreateUndoLevel:!1,lastAction:b}}}};function I(t){return t&&"object"===Object(f.a)(t)&&"raw"in t?t.raw:t}function L(t,e){return t===e?Object(h.a)({},t):e}function R(t,e){return"EDIT_POST"===t.type&&(n=t.edits,r=e.edits,Object(v.isEqual)(Object(v.keys)(n),Object(v.keys)(r)));var n,r}var N=Object(v.flow)([l.combineReducers,A({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RESET_POST","UPDATE_POST"],shouldOverwriteState:function(t,e){return"RESET_EDITOR_BLOCKS"===t.type?!t.shouldCreateUndoLevel:!(!e||t.type!==e.type)&&R(t,e)}})])({blocks:C({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"]})(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{value:[]},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RESET_EDITOR_BLOCKS":return e.blocks===t.value?t:{value:e.blocks}}return t}),edits:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"EDIT_POST":return Object(v.reduce)(e.edits,function(e,n,r){return n!==t[r]&&(e=L(t,e),_.has(r)?e[r]=Object(h.a)({},e[r],n):e[r]=n),e},t);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===e.type?function(t){return e.edits[t]}:function(t){return I(e.post[t])};return Object(v.reduce)(t,function(e,r,o){return Object(v.isEqual)(r,n(o))?(delete(e=L(t,e))[o],e):e},t);case"RESET_EDITOR_BLOCKS":return"content"in t?Object(v.omit)(t,"content"):t}return t}});var U=Object(l.combineReducers)({data:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(v.reduce)(e.results,function(e,n){var r=n.reusableBlock,o=r.id,i=r.title,s={clientId:n.parsedBlock.clientId,title:i};return Object(v.isEqual)(e[o],s)||((e=L(t,e))[o]=s),e},t);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=e.id,r=e.title;return t[n]&&t[n].title!==r?Object(h.a)({},t,Object(p.a)({},n,Object(h.a)({},t[n],{title:r}))):t;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=e.id,i=e.updatedId;if(o===i)return t;var s=t[o];return Object(h.a)({},Object(v.omit)(t,o),Object(p.a)({},i,s));case"REMOVE_REUSABLE_BLOCK":var a=e.id;return Object(v.omit)(t,a)}return t},isFetching:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"FETCH_REUSABLE_BLOCKS":var n=e.id;return n?Object(h.a)({},t,Object(p.a)({},n,!0)):t;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=e.id;return Object(v.omit)(t,r)}return t},isSaving:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SAVE_REUSABLE_BLOCK":return Object(h.a)({},t,Object(p.a)({},e.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=e.id;return Object(v.omit)(t,n)}return t}});var D=m()(Object(l.combineReducers)({editor:N,initialEdits:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SETUP_EDITOR":if(!e.edits)break;return e.edits;case"SETUP_EDITOR_STATE":return"content"in t?Object(v.omit)(t,"content"):t;case"UPDATE_POST":return Object(v.reduce)(e.edits,function(e,n,r){return e.hasOwnProperty(r)?(delete(e=L(t,e))[r],e):e},t);case"RESET_POST":return y}return t},currentPost:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(e.post)n=e.post;else{if(!e.edits)return t;n=Object(h.a)({},t,e.edits)}return Object(v.mapValues)(n,I)}return t},preferences:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;switch((arguments.length>1?arguments[1]:void 0).type){case"ENABLE_PUBLISH_SIDEBAR":return Object(h.a)({},t,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(h.a)({},t,{isPublishSidebarEnabled:!1})}return t},saving:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,options:e.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:e.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:e.error,options:e.options||{}}}return t},postLock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UPDATE_POST_LOCK":return e.lock}return t},reusableBlocks:U,template:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_TEMPLATE_VALIDITY":return Object(h.a)({},t,{isValid:e.isValid})}return t},autosave:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RESET_AUTOSAVE":var n=e.post,r=["title","excerpt","content"].map(function(t){return I(n[t])}),o=Object(d.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2]}}return t},previewLink:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REQUEST_POST_UPDATE_SUCCESS":return e.post.preview_link?e.post.preview_link:e.post.link?Object(O.addQueryArgs)(e.post.link,{preview:!0}):t;case"REQUEST_POST_UPDATE_START":if(t&&e.options.isPreview)return null}return t},postSavingLock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"LOCK_POST_SAVING":return Object(h.a)({},t,Object(p.a)({},e.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(t,e.lockName)}return t},isReady:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"SETUP_EDITOR_STATE":return!0}return t},editorSettings:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UPDATE_EDITOR_SETTINGS":return Object(h.a)({},t,e.settings)}return t}})),F=n(70),M=n.n(F),V=n(97),z=n.n(V),K=n(23),q=n.n(K),W=n(33),H=n.n(W);function G(t){return{type:"API_FETCH",request:t}}function Q(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",optimist:{type:b.BEGIN,id:E},options:t}}function ut(t){var e=t.previousPost,n=t.post,r=t.isRevision,o=t.options,i=t.postType;return{type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:e,post:n,optimist:{type:r?b.REVERT:b.COMMIT,id:E},options:o,postType:i}}function lt(t){var e=t.post,n=t.edits,r=t.error,o=t.options;return{type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:b.REVERT,id:E},post:e,edits:n,error:r,options:o}}function dt(t){return{type:"UPDATE_POST",edits:t}}function pt(t){return{type:"SETUP_EDITOR_STATE",post:t}}function ht(t){return{type:"EDIT_POST",edits:t}}function ft(t){return Object(h.a)({},dt(t),{optimist:{id:E}})}function bt(){var t,e,n,r,o,i,s,a,c,u,l,d,p,f,b,m=arguments;return q.a.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},O.next=3,Q(k,"isEditedPostSaveable");case 3:if(O.sent){O.next=6;break}return O.abrupt("return");case 6:return O.next=8,Q(k,"getPostEdits");case 8:return e=O.sent,(n=!!t.isAutosave)&&(e=Object(v.pick)(e,["title","content","excerpt"])),O.next=13,Q(k,"isEditedPostNew");case 13:return O.sent&&(e=Object(h.a)({status:"draft"},e)),O.next=17,Q(k,"getCurrentPost");case 17:return r=O.sent,O.next=20,Q(k,"getEditedPostContent");case 20:return o=O.sent,i=Object(h.a)({},e,{content:o,id:r.id}),O.next=24,Q(k,"getCurrentPostType");case 24:return s=O.sent,O.next=27,Y("core","getPostType",s);case 27:return a=O.sent,O.next=30,$(k,"__experimentalRequestPostUpdateStart",t);case 30:return O.next=32,$(k,"__experimentalOptimisticUpdatePost",i);case 32:if(c="/wp/v2/".concat(a.rest_base,"/").concat(r.id),u="PUT",!n){O.next=43;break}return O.next=37,Q(k,"getAutosave");case 37:l=O.sent,i=Object(h.a)({},Object(v.pick)(r,["title","content","excerpt"]),l,i),c+="/autosaves",u="POST",O.next=47;break;case 43:return O.next=45,$("core/notices","removeNotice",S);case 45:return O.next=47,$("core/notices","removeNotice","autosave-exists");case 47:return O.prev=47,O.next=50,G({path:c,method:u,data:i});case 50:return d=O.sent,p=n?"resetAutosave":"resetPost",O.next=54,$(k,p,d);case 54:return O.next=56,$(k,"__experimentalRequestPostUpdateSuccess",{previousPost:r,post:d,options:t,postType:a,isRevision:d.id!==r.id});case 56:if(!((f=J({previousPost:r,post:d,postType:a,options:t})).length>0)){O.next=60;break}return O.next=60,$.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(f)));case 60:O.next=70;break;case 62:return O.prev=62,O.t0=O.catch(47),O.next=66,$(k,"__experimentalRequestPostUpdateFailure",{post:r,edits:e,error:O.t0,options:t});case 66:if(!((b=tt({post:r,edits:e,error:O.t0})).length>0)){O.next=70;break}return O.next=70,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(b)));case 70:case"end":return O.stop()}},et,this,[[47,62]])}function mt(){var t,e,n,r;return q.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Q(k,"getCurrentPost");case 2:return t=o.sent,o.next=5,Q(k,"getCurrentPostType");case 5:return e=o.sent,o.next=8,Y("core","getPostType",e);case 8:return n=o.sent,o.next=11,G({path:"/wp/v2/".concat(n.rest_base,"/").concat(t.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,$(k,"resetPost",r);case 14:case"end":return o.stop()}},nt,this)}function vt(){var t,e,n;return q.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Q(k,"getCurrentPostType");case 2:return t=r.sent,r.next=5,Y("core","getPostType",t);case 5:return e=r.sent,r.next=8,$("core/notices","removeNotice",P);case 8:return r.prev=8,r.next=11,Q(k,"getCurrentPost");case 11:return n=r.sent,r.next=14,G({path:"/wp/v2/".concat(e.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,$(k,"resetPost",Object(h.a)({},n,{status:"trash"}));case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(Z.__)("Trashing failed"),{id:P}])));case 22:case"end":return r.stop()}var o},rt,this,[[8,18]])}function Ot(t){return q.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$(k,"savePost",Object(h.a)({isAutosave:!0},t));case 2:case"end":return e.stop()}},ot,this)}function gt(){return{type:"REDO"}}function yt(){return{type:"UNDO"}}function jt(){return{type:"CREATE_UNDO_LEVEL"}}function _t(t){return{type:"UPDATE_POST_LOCK",lock:t}}function kt(t){return{type:"FETCH_REUSABLE_BLOCKS",id:t}}function Et(t){return{type:"RECEIVE_REUSABLE_BLOCKS",results:t}}function St(t){return{type:"SAVE_REUSABLE_BLOCK",id:t}}function Pt(t){return{type:"DELETE_REUSABLE_BLOCK",id:t}}function wt(t,e){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:t,title:e}}function Tt(t){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:t}}function Ct(t){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(t)}}function xt(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Bt(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function At(t){return{type:"LOCK_POST_SAVING",lockName:t}}function It(t){return{type:"UNLOCK_POST_SAVING",lockName:t}}function Lt(t){return{type:"RESET_EDITOR_BLOCKS",blocks:t,shouldCreateUndoLevel:!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).__unstableShouldCreateUndoLevel}}function Rt(t){return{type:"UPDATE_EDITOR_SETTINGS",settings:t}}var Nt=function(t){return q.a.mark(function e(){var n,r,o,i=arguments;return q.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=i.length,r=new Array(n),o=0;o0}function ge(t){return t.editor.future.length>0}function ye(t){return"auto-draft"===Ee(t).status}function je(t){return t.editor.present.blocks.isDirty||"content"in t.editor.present.edits}function _e(t){return!!je(t)||(Object.keys(t.editor.present.edits).length>0||pn(t,_e))}function ke(t){return!_e(t)&&ye(t)}function Ee(t){return t.currentPost}function Se(t){return t.currentPost.type}function Pe(t){return Ee(t).id||null}function we(t){return Object(v.get)(Ee(t),["_links","version-history",0,"count"],0)}function Te(t){return Object(v.get)(Ee(t),["_links","predecessor-version",0,"id"],null)}var Ce=Object(fe.a)(function(t){return Object(h.a)({},t.initialEdits,t.editor.present.edits)},function(t){return[t.editor.present.edits,t.initialEdits]}),xe=Object(fe.a)(function(){return[]},function(t){return[t.editor]});function Be(t,e){var n=Ee(t);if(n.hasOwnProperty(e))return n[e]}var Ae=Object(fe.a)(function(t,e){var n=Ce(t);return n.hasOwnProperty(e)?Object(h.a)({},Be(t,e),n[e]):Be(t,e)},function(t,e){return[Object(v.get)(t.editor.present.edits,[e],ve),Object(v.get)(t.currentPost,[e],ve)]});function Ie(t,e){switch(e){case"content":return en(t)}var n=Ce(t);return n.hasOwnProperty(e)?_.has(e)?Ae(t,e):n[e]:Be(t,e)}function Le(t,e){if(!qe(t))return null;var n=Ke(t);return n.hasOwnProperty(e)?n[e]:void 0}function Re(t){return"private"===Ie(t,"status")?"private":Ie(t,"password")?"password":"public"}function Ne(t){return"pending"===Ee(t).status}function Ue(t){var e=Ee(t);return-1!==["publish","private"].indexOf(e.status)||"future"===e.status&&!Object(be.isInTheFuture)(new Date(Number(Object(be.getDate)(e.date))-T))}function De(t){return"future"===Ee(t).status&&!Ue(t)}function Fe(t){var e=Ee(t);return _e(t)||-1===["publish","private","future"].indexOf(e.status)}function Me(t){return!Ge(t)&&(!!Ie(t,"title")||!!Ie(t,"excerpt")||!Ve(t))}function Ve(t){var e=t.editor.present.blocks.value;if(e.length&&!("content"in Ce(t))){if(e.length>1)return!1;var n=e[0].name;if(n!==Object(s.getDefaultBlockName)()&&n!==Object(s.getFreeformContentHandlerName)())return!1}return!en(t)}function ze(t){if(!Me(t))return!1;if(!qe(t))return!0;if(je(t))return!0;var e=Ke(t);return["title","excerpt"].some(function(n){return e[n]!==Ie(t,n)})}function Ke(t){return t.autosave}function qe(t){return!!Ke(t)}function We(t){var e=Ie(t,"date"),n=new Date(Number(Object(be.getDate)(e))-T);return Object(be.isInTheFuture)(n)}function He(t){var e=Ie(t,"date"),n=Ie(t,"modified"),r=Ie(t,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&e===n}function Ge(t){return t.saving.requesting}function Qe(t){return t.saving.successful}function Ye(t){return!!t.saving.error}function $e(t){return Ge(t)&&!!t.saving.options.isAutosave}function Xe(t){return Ge(t)&&!!t.saving.options.isPreview}function Ze(t){var e=Ie(t,"featured_media"),n=t.previewLink;return n&&e?Object(O.addQueryArgs)(n,{_thumbnail_id:e}):n}function Je(t){var e,n=t.editor.present.blocks.value;switch(1===n.length&&(e=n[0].name),2===n.length&&"core/paragraph"===n[1].name&&(e=n[0].name),e){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}function tn(t){var e=t.editor.present.blocks.value;return 1===e.length&&Object(s.isUnmodifiedDefaultBlock)(e[0])?[]:e}var en=Object(fe.a)(function(t){var e=Ce(t);if("content"in e)return e.content;var n=tn(t),r=Object(s.serialize)(n);return 1===n.length&&n[0].name===Object(s.getFreeformContentHandlerName)()?Object(me.removep)(r):r},function(t){return[t.editor.present.blocks.value,t.editor.present.edits.content,t.initialEdits.content]}),nn=Object(fe.a)(function(t,e){var n=t.reusableBlocks.data[e];if(!n)return null;var r=isNaN(parseInt(e));return Object(h.a)({},n,{id:r?e:+e,isTemporary:r})},function(t,e){return[t.reusableBlocks.data[e]]});function rn(t,e){return t.reusableBlocks.isSaving[e]||!1}function on(t,e){return!!t.reusableBlocks.isFetching[e]}var sn=Object(fe.a)(function(t){return Object(v.map)(t.reusableBlocks.data,function(e,n){return nn(t,n)})},function(t){return[t.reusableBlocks.data]});function an(t,e){var n=Object(v.find)(t.optimist,function(t){return t.beforeState&&Object(v.get)(t.action,["optimist","id"])===e});return n?n.beforeState:null}function cn(t){if(!Ge(t))return!1;if(!Ue(t))return!1;var e=an(t,E);return!!e&&!Ue(e)}function un(t){var e=Ie(t,"permalink_template");return w.test(e)}function ln(t){var e=dn(t);if(!e)return null;var n=e.prefix,r=e.postName,o=e.suffix;return un(t)?n+r+o:n}function dn(t){var e=Ie(t,"permalink_template");if(!e)return null;var n=Ie(t,"slug")||Ie(t,"generated_slug"),r=e.split(w),o=Object(d.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function pn(t,e){var n=t.optimist;return!!n&&n.some(function(t){var n=t.beforeState;return n&&e(n)})}function hn(t){return t.postLock.isLocked}function fn(t){return Object.keys(t.postSavingLock).length>0}function bn(t){return t.postLock.isTakeover}function mn(t){return t.postLock.user}function vn(t){return t.postLock.activePostLock}function On(t){return Object(v.has)(Ee(t),["_links","wp:action-unfiltered-html"])}function gn(t){return t.preferences.hasOwnProperty("isPublishSidebarEnabled")?t.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function yn(t){return t.editor.present.blocks.value}function jn(t){return t.isReady}function _n(t){return t.editorSettings}function kn(t){return Object(l.createRegistrySelector)(function(e){return function(n){for(var r,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s0&&void 0!==arguments[0]?arguments[0]:{},e=t.getBlockInsertionParentClientId,n=void 0===e?Br:e,r=t.getInserterItems,o=void 0===r?Ar:r,a=t.getSelectedBlockName,c=void 0===a?Ir:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var t=c();return o(n()).filter(function(e){return t!==e.name})},getOptionKeywords:function(t){var e=t.title,n=t.keywords,r=void 0===n?[]:n;return[t.category].concat(Object(x.a)(r),[e])},getOptionLabel:function(t){var e=t.icon,n=t.title;return[Object(xr.createElement)(i.BlockIcon,{key:"icon",icon:e,showColors:!0}),n]},allowContext:function(t,e){return!(/\S/.test(t)||/\S/.test(e))},getOptionCompletion:function(t){var e=t.name,n=t.initialAttributes;return{action:"replace",value:Object(s.createBlock)(e,n)}},isOptionDisabled:function(t){return t.isDisabled}}}(),Rr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(t){var e="";return t&&(e="?search="+encodeURIComponent(t)),H()({path:"/wp/v2/users"+e})},isDebounced:!0,getOptionKeywords:function(t){return[t.slug,t.name]},getOptionLabel:function(t){return[Object(xr.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:t.avatar_urls[24]}),Object(xr.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},t.name),Object(xr.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},t.slug)]},getOptionCompletion:function(t){return"@".concat(t.slug)}},Nr=n(19),Ur=n(21),Dr=n(4),Fr=function(t){var e=t.urlQueryArgs,n=void 0===e?{}:e,r=Object(Ur.a)(t,["urlQueryArgs"]),o=Object(l.select)("core/editor").getCurrentPostId;return n=Object(h.a)({post_id:o()},n),Object(xr.createElement)(Dr.ServerSideRender,Object(Nr.a)({urlQueryArgs:n},r))},Mr=n(10),Vr=n(9),zr=n(11),Kr=n(12),qr=n(13),Wr=n(6),Hr=function(t){function e(){return Object(Mr.a)(this,e),Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.isDirty,r=e.editsReference,o=e.isAutosaveable,i=e.isAutosaving;r!==t.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&t.isAutosaving&&(this.didAutosaveForEditsReference=!0),t.isDirty===n&&t.isAutosaveable===o&&t.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(t){var e=this;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;t&&(this.pendingSave=setTimeout(function(){return e.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),e}(xr.Component),Gr=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostDirty,r=e.isEditedPostAutosaveable,o=e.getReferenceByDistinctEdits,i=e.isAutosavingPost,s=t("core/editor").getEditorSettings().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),editsReference:o(),isAutosaving:i(),autosaveInterval:s}}),Object(l.withDispatch)(function(t){return{autosave:t("core/editor").autosave}})])(Hr),Qr=n(16),Yr=n.n(Qr),$r=function(t){var e=t.children,n=t.isValid,r=t.level,o=t.path,s=void 0===o?[]:o,a=t.href,c=t.onSelect;return Object(xr.createElement)("li",{className:Yr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(xr.createElement)("a",{href:a,className:"document-outline__button",onClick:c},Object(xr.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),s.map(function(t,e){var n=t.clientId;return Object(xr.createElement)("strong",{key:e,className:"document-outline__level"},Object(xr.createElement)(i.BlockTitle,{clientId:n}))}),Object(xr.createElement)("strong",{className:"document-outline__level"},r),Object(xr.createElement)("span",{className:"document-outline__item-content"},e)))},Xr=Object(xr.createElement)("em",null,Object(Z.__)("(Empty heading)")),Zr=[Object(xr.createElement)("br",{key:"incorrect-break"}),Object(xr.createElement)("em",{key:"incorrect-message"},Object(Z.__)("(Incorrect heading level)"))],Jr=[Object(xr.createElement)("br",{key:"incorrect-break-h1"}),Object(xr.createElement)("em",{key:"incorrect-message-h1"},Object(Z.__)("(Your theme may already use a H1 for the post title)"))],to=[Object(xr.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(xr.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(Z.__)("(Multiple H1 headings are not recommended)"))],eo=function(t){return!t.attributes.content||0===t.attributes.content.length},no=Object(Wr.compose)(Object(l.withSelect)(function(t){var e=t("core/block-editor").getBlocks,n=t("core/editor").getEditedPostAttribute,r=(0,t("core").getPostType)(n("type"));return{title:n("title"),blocks:e(),isTitleSupported:Object(v.get)(r,["supports","title"],!1)}}))(function(t){var e=t.blocks,n=void 0===e?[]:e,r=t.title,o=t.onSelect,i=t.isTitleSupported,s=t.hasOutlineItemsDisabled,a=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.flatMap)(e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===e.name?Object(h.a)({},e,{path:n,level:e.attributes.level,isEmpty:eo(e)}):t(e.innerBlocks,[].concat(Object(x.a)(n),[e]))})}(n);if(a.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(a,"level")[1]>1;return Object(xr.createElement)("div",{className:"document-outline"},Object(xr.createElement)("ul",null,d&&Object(xr.createElement)($r,{level:Object(Z.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:s},r),a.map(function(t,e){var n=t.level>u+1,r=!(t.isEmpty||n||!t.level||1===t.level&&(p||d));return u=t.level,Object(xr.createElement)($r,{key:e,level:"H".concat(t.level),isValid:r,path:t.path,isDisabled:s,href:"#block-".concat(t.clientId),onSelect:o},t.isEmpty?Xr:Object(c.getTextContent)(Object(c.create)({html:t.attributes.content})),n&&Zr,1===t.level&&p&&to,d&&1===t.level&&!p&&Jr)})))});var ro=Object(l.withSelect)(function(t){return{blocks:t("core/block-editor").getBlocks()}})(function(t){var e=t.blocks,n=t.children;return Object(v.filter)(e,function(t){return"core/heading"===t.name}).length<1?null:n}),oo=n(3),io=n(18),so=n(49),ao=n.n(so);var co=Object(Wr.compose)([Object(l.withSelect)(function(t){return{isDirty:(0,t("core/editor").isEditedPostDirty)()}}),Object(l.withDispatch)(function(t,e,n){var r=n.select,o=t("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}})])(function(t){var e=t.onSave;return Object(xr.createElement)(Dr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.a)({},io.rawShortcut.primary("s"),function(t){t.preventDefault(),e()})})}),uo=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).undoOrRedo=t.undoOrRedo.bind(Object(oo.a)(Object(oo.a)(t))),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"undoOrRedo",value:function(t){var e=this.props,n=e.onRedo,r=e.onUndo;t.shiftKey?n():r(),t.preventDefault()}},{key:"render",value:function(){var t;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(xr.createElement)(Dr.KeyboardShortcuts,{shortcuts:(t={},Object(p.a)(t,io.rawShortcut.primary("z"),this.undoOrRedo),Object(p.a)(t,io.rawShortcut.primaryShift("z"),this.undoOrRedo),t)}),Object(xr.createElement)(co,null))}}]),e}(xr.Component),lo=Object(l.withDispatch)(function(t){var e=t("core/editor");return{onRedo:e.redo,onUndo:e.undo}})(uo),po=lo;function ho(){return ao()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(xr.createElement)(lo,null)}function fo(){return Object(xr.createElement)(co,null)}var bo=Object(Wr.compose)([Object(l.withSelect)(function(t){return{hasRedo:t("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(t){return{redo:t("core/editor").redo}})])(function(t){var e=t.hasRedo,n=t.redo;return Object(xr.createElement)(Dr.IconButton,{icon:"redo",label:Object(Z.__)("Redo"),shortcut:io.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?n:void 0,className:"editor-history__redo"})});var mo=Object(Wr.compose)([Object(l.withSelect)(function(t){return{hasUndo:t("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(t){return{undo:t("core/editor").undo}})])(function(t){var e=t.hasUndo,n=t.undo;return Object(xr.createElement)(Dr.IconButton,{icon:"undo",label:Object(Z.__)("Undo"),shortcut:io.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?n:void 0,className:"editor-history__undo"})});var vo=Object(Wr.compose)([Object(l.withSelect)(function(t){return{isValid:t("core/block-editor").isValidTemplate()}}),Object(l.withDispatch)(function(t){var e=t("core/block-editor"),n=e.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:e.synchronizeTemplate}})])(function(t){var e=t.isValid,n=Object(Ur.a)(t,["isValid"]);return e?null:Object(xr.createElement)(Dr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(xr.createElement)("p",null,Object(Z.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(xr.createElement)("div",null,Object(xr.createElement)(Dr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(Z.__)("Keep it as is")),Object(xr.createElement)(Dr.Button,{onClick:function(){window.confirm(Object(Z.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(Z.__)("Reset the template"))))});var Oo=Object(Wr.compose)([Object(l.withSelect)(function(t){return{notices:t("core/notices").getNotices()}}),Object(l.withDispatch)(function(t){return{onRemove:t("core/notices").removeNotice}})])(function(t){var e=t.dismissible,n=t.notices,r=Object(Ur.a)(t,["dismissible","notices"]);return void 0!==e&&(n=Object(v.filter)(n,{isDismissible:e})),Object(xr.createElement)(Dr.NoticeList,Object(Nr.a)({notices:n},r),!1!==e&&Object(xr.createElement)(vo,null))}),go=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).reboot=t.reboot.bind(Object(oo.a)(Object(oo.a)(t))),t.getContent=t.getContent.bind(Object(oo.a)(Object(oo.a)(t))),t.state={error:null},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidCatch",value:function(t){this.setState({error:t})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(l.select)("core/editor").getEditedPostContent()}catch(t){}}},{key:"render",value:function(){var t=this.state.error;return t?Object(xr.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(xr.createElement)(Dr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(Z.__)("Attempt Recovery")),Object(xr.createElement)(Dr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(Z.__)("Copy Post Text")),Object(xr.createElement)(Dr.ClipboardButton,{key:"copy-error",text:t.stack,isLarge:!0},Object(Z.__)("Copy Error"))]},Object(Z.__)("The editor has encountered an unexpected error.")):this.props.children}}]),e}(xr.Component);var yo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getEditorSettings,o=t("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(t){var e=t.availableTemplates,n=t.postType,r=t.children;return!Object(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(e)?null:r});var jo=Object(l.withSelect)(function(t){var e=t("core/editor").getEditedPostAttribute;return{postType:(0,t("core").getPostType)(e("type"))}})(function(t){var e=t.postType,n=t.children,r=t.supportKeys,o=!0;return e&&(o=Object(v.some)(Object(v.castArray)(r),function(t){return!!e.supports[t]})),o?n:null}),_o=Object(Wr.withState)({orderInput:null})(function(t){var e=t.onUpdateOrder,n=t.order,r=void 0===n?0:n,o=t.orderInput,i=t.setState,s=null===o?r:o;return Object(xr.createElement)(Dr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(Z.__)("Order"),value:s,onChange:function(t){i({orderInput:t});var n=Number(t);Number.isInteger(n)&&""!==Object(v.invoke)(t,["trim"])&&e(Number(t))},size:6,onBlur:function(){i({orderInput:null})}})});var ko=Object(Wr.compose)([Object(l.withSelect)(function(t){return{order:t("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(t){return{onUpdateOrder:function(e){t("core/editor").editPost({menu_order:e})}}})])(function(t){return Object(xr.createElement)(jo,{supportKeys:"page-attributes"},Object(xr.createElement)(_o,t))});function Eo(t){var e=t.map(function(t){return Object(h.a)({children:[],parent:null},t)}),n=Object(v.groupBy)(e,"parent");if(n.null&&n.null.length)return e;return function t(e){return e.map(function(e){var r=n[e.id];return Object(h.a)({},e,{children:r&&r.length?t(r):[]})})}(n[0]||[])}var So=Object(l.withSelect)(function(t){var e=t("core"),n=e.getPostType,r=e.getEntityRecords,o=t("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,a=s("type"),c=n(a),u=i(),l=Object(v.get)(c,["hierarchical"],!1),d={per_page:-1,exclude:u,parent_exclude:u,orderby:"menu_order",order:"asc"};return{parent:s("parent"),items:l?r("postType",a,d):[],postType:c}}),Po=Object(l.withDispatch)(function(t){var e=t("core/editor").editPost;return{onUpdateParent:function(t){e({parent:t||0})}}}),wo=Object(Wr.compose)([So,Po])(function(t){var e=t.parent,n=t.postType,r=t.items,o=t.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),s=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!s||!a.length)return null;var c=Eo(a.map(function(t){return{id:t.id,parent:t.parent,name:t.title.raw?t.title.raw:"#".concat(t.id," (").concat(Object(Z.__)("no title"),")")}}));return Object(xr.createElement)(Dr.TreeSelect,{className:"editor-page-attributes__parent",label:s,noOptionLabel:"(".concat(Object(Z.__)("no parent"),")"),tree:c,selectedId:e,onChange:o})});var To=Object(Wr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=(0,e.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.withDispatch)(function(t){return{onUpdate:function(e){t("core/editor").editPost({template:e||""})}}}))(function(t){var e=t.availableTemplates,n=t.selectedTemplate,r=t.onUpdate;return Object(v.isEmpty)(e)?null:Object(xr.createElement)(Dr.SelectControl,{label:Object(Z.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(e,function(t,e){return{value:e,label:t}})})});var Co=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(e,["_links","wp:action-assign-author"],!1),postType:t("core/editor").getCurrentPostType(),authors:t("core").getAuthors()}}),Wr.withInstanceId])(function(t){var e=t.hasAssignAuthorAction,n=t.authors,r=t.children;return!e||n.length<2?null:Object(xr.createElement)(jo,{supportKeys:"author"},r)}),xo=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).setAuthorId=t.setAuthorId.bind(Object(oo.a)(Object(oo.a)(t))),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"setAuthorId",value:function(t){var e=this.props.onUpdateAuthor,n=t.target.value;e(Number(n))}},{key:"render",value:function(){var t=this.props,e=t.postAuthor,n=t.instanceId,r=t.authors,o="post-author-selector-"+n;return Object(xr.createElement)(Co,null,Object(xr.createElement)("label",{htmlFor:o},Object(Z.__)("Author")),Object(xr.createElement)("select",{id:o,value:e,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(t){return Object(xr.createElement)("option",{key:t.id,value:t.id},t.name)})))}}]),e}(xr.Component),Bo=Object(Wr.compose)([Object(l.withSelect)(function(t){return{postAuthor:t("core/editor").getEditedPostAttribute("author"),authors:t("core").getAuthors()}}),Object(l.withDispatch)(function(t){return{onUpdateAuthor:function(e){t("core/editor").editPost({author:e})}}}),Wr.withInstanceId])(xo);var Ao=Object(Wr.compose)([Object(l.withSelect)(function(t){return{commentStatus:t("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(function(t){var e=t.commentStatus,n=void 0===e?"open":e,r=Object(Ur.a)(t,["commentStatus"]);return Object(xr.createElement)(Dr.CheckboxControl,{label:Object(Z.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Io=Object(Wr.compose)([Object(l.withSelect)(function(t){return{excerpt:t("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(t){return{onUpdateExcerpt:function(e){t("core/editor").editPost({excerpt:e})}}})])(function(t){var e=t.excerpt,n=t.onUpdateExcerpt;return Object(xr.createElement)("div",{className:"editor-post-excerpt"},Object(xr.createElement)(Dr.TextareaControl,{label:Object(Z.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(t){return n(t)},value:e}),Object(xr.createElement)(Dr.ExternalLink,{href:Object(Z.__)("https://codex.wordpress.org/Excerpt")},Object(Z.__)("Learn more about manual excerpts")))});var Lo=function(t){return Object(xr.createElement)(jo,Object(Nr.a)({},t,{supportKeys:"excerpt"}))};var Ro=Object(l.withSelect)(function(t){var e=t("core").getThemeSupports;return{postType:(0,t("core/editor").getEditedPostAttribute)("type"),themeSupports:e()}})(function(t){var e=t.themeSupports,n=t.children,r=t.postType,o=t.supportKeys;return Object(v.some)(Object(v.castArray)(o),function(t){var n=Object(v.get)(e,[t],!1);return"post-thumbnails"===t&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var No=function(t){return Object(xr.createElement)(Ro,{supportKeys:"post-thumbnails"},Object(xr.createElement)(jo,Object(Nr.a)({},t,{supportKeys:"thumbnail"})))},Uo=["image"],Do=Object(Z.__)("Featured Image"),Fo=Object(Z.__)("Set featured image"),Mo=Object(Z.__)("Remove image");var Vo=Object(l.withSelect)(function(t){var e=t("core"),n=e.getMedia,r=e.getPostType,o=t("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,a=s("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(s("type")),featuredImageId:a}}),zo=Object(l.withDispatch)(function(t){var e=t("core/editor").editPost;return{onUpdateImage:function(t){e({featured_media:t.id})},onRemoveImage:function(){e({featured_media:0})}}}),Ko=Object(Wr.compose)(Vo,zo,Object(Dr.withFilters)("editor.PostFeaturedImage"))(function(t){var e,n,r,o=t.currentPostId,s=t.featuredImageId,a=t.onUpdateImage,c=t.onRemoveImage,u=t.media,l=t.postType,d=Object(v.get)(l,["labels"],{}),p=Object(xr.createElement)("p",null,Object(Z.__)("To edit the featured image, you need permission to upload media."));if(u){var h=Object(Cr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",u.id,o);Object(v.has)(u,["media_details","sizes",h])?(e=u.media_details.sizes[h].width,n=u.media_details.sizes[h].height,r=u.media_details.sizes[h].source_url):(e=u.media_details.width,n=u.media_details.height,r=u.source_url)}return Object(xr.createElement)(No,null,Object(xr.createElement)("div",{className:"editor-post-featured-image"},Object(xr.createElement)(i.MediaUploadCheck,{fallback:p},Object(xr.createElement)(i.MediaUpload,{title:d.featured_image||Do,onSelect:a,allowedTypes:Uo,modalClass:"editor-post-featured-image__media-modal",render:function(t){var o=t.open;return Object(xr.createElement)(Dr.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":s?Object(Z.__)("Edit or update the image"):null},!!s&&u&&Object(xr.createElement)(Dr.ResponsiveWrapper,{naturalWidth:e,naturalHeight:n},Object(xr.createElement)("img",{src:r,alt:""})),!!s&&!u&&Object(xr.createElement)(Dr.Spinner,null),!s&&(d.set_featured_image||Fo))},value:s})),!!s&&u&&!u.isLoading&&Object(xr.createElement)(i.MediaUploadCheck,null,Object(xr.createElement)(i.MediaUpload,{title:d.featured_image||Do,onSelect:a,allowedTypes:Uo,modalClass:"editor-post-featured-image__media-modal",render:function(t){var e=t.open;return Object(xr.createElement)(Dr.Button,{onClick:e,isDefault:!0,isLarge:!0},Object(Z.__)("Replace image"))}})),!!s&&Object(xr.createElement)(i.MediaUploadCheck,null,Object(xr.createElement)(Dr.Button,{onClick:c,isLink:!0,isDestructive:!0},d.remove_featured_image||Mo))))});var qo=Object(l.withSelect)(function(t){return{disablePostFormats:t("core/editor").getEditorSettings().disablePostFormats}})(function(t){var e=t.disablePostFormats,n=Object(Ur.a)(t,["disablePostFormats"]);return!e&&Object(xr.createElement)(jo,Object(Nr.a)({},n,{supportKeys:"post-formats"}))}),Wo=[{id:"aside",caption:Object(Z.__)("Aside")},{id:"gallery",caption:Object(Z.__)("Gallery")},{id:"link",caption:Object(Z.__)("Link")},{id:"image",caption:Object(Z.__)("Image")},{id:"quote",caption:Object(Z.__)("Quote")},{id:"standard",caption:Object(Z.__)("Standard")},{id:"status",caption:Object(Z.__)("Status")},{id:"video",caption:Object(Z.__)("Video")},{id:"audio",caption:Object(Z.__)("Audio")},{id:"chat",caption:Object(Z.__)("Chat")}];var Ho=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getSuggestedPostFormat,o=n("format"),i=t("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.withDispatch)(function(t){return{onUpdatePostFormat:function(e){t("core/editor").editPost({format:e})}}}),Wr.withInstanceId])(function(t){var e=t.onUpdatePostFormat,n=t.postFormat,r=void 0===n?"standard":n,o=t.supportedFormats,i=t.suggestedFormat,s="post-format-selector-"+t.instanceId,a=Wo.filter(function(t){return Object(v.includes)(o,t.id)}),c=Object(v.find)(a,function(t){return t.id===i});return Object(xr.createElement)(qo,null,Object(xr.createElement)("div",{className:"editor-post-format"},Object(xr.createElement)("div",{className:"editor-post-format__content"},Object(xr.createElement)("label",{htmlFor:s},Object(Z.__)("Post Format")),Object(xr.createElement)(Dr.SelectControl,{value:r,onChange:function(t){return e(t)},id:s,options:a.map(function(t){return{label:t.caption,value:t.id}})})),c&&c.id!==r&&Object(xr.createElement)("div",{className:"editor-post-format__suggestion"},Object(Z.__)("Suggestion:")," ",Object(xr.createElement)(Dr.Button,{isLink:!0,onClick:function(){return e(c.id)}},c.caption))))});var Go=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPostLastRevisionId,r=e.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(t){var e=t.lastRevisionId,n=t.revisionsCount,r=t.children;return!e||n<2?null:Object(xr.createElement)(jo,{supportKeys:"revisions"},r)});function Qo(t,e){return Object(O.addQueryArgs)(t,e)}function Yo(t){return Object(v.toLower)(Object(v.deburr)(Object(v.trim)(t.replace(/[\s\.\/_]+/g,"-"),"-")))}var $o=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPostLastRevisionId,r=e.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(t){var e=t.lastRevisionId,n=t.revisionsCount;return Object(xr.createElement)(Go,null,Object(xr.createElement)(Dr.IconButton,{href:Qo("revision.php",{revision:e,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(Z.sprintf)(Object(Z._n)("%d Revision","%d Revisions",n),n)))});var Xo=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).openPreviewWindow=t.openPreviewWindow.bind(Object(oo.a)(Object(oo.a)(t))),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props.previewLink;e&&!t.previewLink&&this.setPreviewWindowLink(e)}},{key:"setPreviewWindowLink",value:function(t){var e=this.previewWindow;e&&!e.closed&&(e.location=t)}},{key:"getWindowTarget",value:function(){var t=this.props.postId;return"wp-preview-".concat(t)}},{key:"openPreviewWindow",value:function(t){var e,n;(t.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),e=this.previewWindow.document,n=Object(xr.renderToString)(Object(xr.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(xr.createElement)(Dr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(xr.createElement)(Dr.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(xr.createElement)(Dr.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(xr.createElement)("p",null,Object(Z.__)("Generating preview…")))),n+='\n\t\t\n\t',n=Object(Cr.applyFilters)("editor.PostPreview.interstitialMarkup",n),e.write(n),e.title=Object(Z.__)("Generating preview…"),e.close()):this.setPreviewWindowLink(t.target.href)}},{key:"render",value:function(){var t=this.props,e=t.previewLink,n=t.currentPostLink,r=t.isSaveable,o=e||n;return Object(xr.createElement)(Dr.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(Z._x)("Preview","imperative verb"),Object(xr.createElement)("span",{className:"screen-reader-text"},Object(Z.__)("(opens in a new tab)")),Object(xr.createElement)(a.DotTip,{tipId:"core/editor.preview"},Object(Z.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),e}(xr.Component),Zo=Object(Wr.compose)([Object(l.withSelect)(function(t,e){var n=e.forcePreviewLink,r=e.forceIsAutosaveable,o=t("core/editor"),i=o.getCurrentPostId,s=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,c=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=t("core").getPostType,p=l(),h=d(a("type"));return{postId:i(),currentPostLink:s("link"),previewLink:void 0!==n?n:p,isSaveable:c(),isAutosaveable:r||u(),isViewable:Object(v.get)(h,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(t){return{autosave:t("core/editor").autosave,savePost:t("core/editor").savePost}}),Object(Wr.ifCondition)(function(t){return t.isViewable})])(Xo),Jo=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).sendPostLock=t.sendPostLock.bind(Object(oo.a)(Object(oo.a)(t))),t.receivePostLock=t.receivePostLock.bind(Object(oo.a)(Object(oo.a)(t))),t.releasePostLock=t.releasePostLock.bind(Object(oo.a)(Object(oo.a)(t))),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidMount",value:function(){var t=this.getHookName();Object(Cr.addAction)("heartbeat.send",t,this.sendPostLock),Object(Cr.addAction)("heartbeat.tick",t,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var t=this.getHookName();Object(Cr.removeAction)("heartbeat.send",t),Object(Cr.removeAction)("heartbeat.tick",t)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(t){var e=this.props,n=e.isLocked,r=e.activePostLock,o=e.postId;n||(t["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(t){if(t["wp-refresh-post-lock"]){var e=this.props,n=e.autosave,r=e.updatePostLock,o=t["wp-refresh-post-lock"];o.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&r({isLocked:!1,activePostLock:o.new_lock})}}},{key:"releasePostLock",value:function(){var t=this.props,e=t.isLocked,n=t.activePostLock,r=t.postLockUtils,o=t.postId;if(!e&&n){var i=new window.FormData;i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n);var s=new window.XMLHttpRequest;s.open("POST",r.ajaxUrl,!1),s.send(i)}}},{key:"render",value:function(){var t=this.props,e=t.user,n=t.postId,r=t.isLocked,o=t.isTakeover,i=t.postLockUtils,s=t.postType;if(!r)return null;var a=e.name,c=e.avatar,u=Object(O.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Qo("edit.php",{post_type:Object(v.get)(s,["slug"])}),d=Object(Z.__)("Exit the Editor");return Object(xr.createElement)(Dr.Modal,{title:o?Object(Z.__)("Someone else has taken over this post."):Object(Z.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!c&&Object(xr.createElement)("img",{src:c,alt:Object(Z.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(xr.createElement)("div",null,Object(xr.createElement)("div",null,a?Object(Z.sprintf)(Object(Z.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(Z.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(xr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(xr.createElement)(Dr.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(xr.createElement)("div",null,Object(xr.createElement)("div",null,a?Object(Z.sprintf)(Object(Z.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(Z.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(xr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(xr.createElement)(Dr.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(xr.createElement)(Zo,null),Object(xr.createElement)(Dr.Button,{isPrimary:!0,isLarge:!0,href:u},Object(Z.__)("Take Over")))))}}]),e}(xr.Component),ti=Object(Wr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isPostLocked,r=e.isPostLockTakeover,o=e.getPostLockUser,i=e.getCurrentPostId,s=e.getActivePostLock,a=e.getEditedPostAttribute,c=e.getEditorSettings,u=t("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:c().postLockUtils,activePostLock:s(),postType:u(a("type"))}}),Object(l.withDispatch)(function(t){var e=t("core/editor");return{autosave:e.autosave,updatePostLock:e.updatePostLock}}),Wr.withInstanceId,Object(Wr.withGlobalEvents)({beforeunload:"releasePostLock"}))(Jo);var ei=Object(Wr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isCurrentPostPublished,r=e.getCurrentPostType,o=e.getCurrentPost;return{hasPublishAction:Object(v.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(t){var e=t.hasPublishAction,n=t.isPublished,r=t.children;return n||!e?null:r});var ni=Object(Wr.compose)(Object(l.withSelect)(function(t){return{status:t("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(t){return{onUpdateStatus:function(e){t("core/editor").editPost({status:e})}}}))(function(t){var e=t.status,n=t.onUpdateStatus;return Object(xr.createElement)(ei,null,Object(xr.createElement)(Dr.CheckboxControl,{label:Object(Z.__)("Pending Review"),checked:"pending"===e,onChange:function(){n("pending"===e?"draft":"pending")}}))});var ri=Object(Wr.compose)([Object(l.withSelect)(function(t){return{pingStatus:t("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(function(t){var e=t.pingStatus,n=void 0===e?"open":e,r=Object(Ur.a)(t,["pingStatus"]);return Object(xr.createElement)(Dr.CheckboxControl,{label:Object(Z.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var oi=Object(Wr.compose)([Object(l.withSelect)(function(t,e){var n=e.forceIsSaving,r=t("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,s=r.isSavingPost,a=r.isPublishingPost,c=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||s(),isPublishing:a(),hasPublishAction:Object(v.get)(c(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}})])(function(t){var e=t.isPublished,n=t.isBeingScheduled,r=t.isSaving,o=t.isPublishing,i=t.hasPublishAction,s=t.isAutosaving;return o?Object(Z.__)("Publishing…"):e&&r&&!s?Object(Z.__)("Updating…"):n&&r&&!s?Object(Z.__)("Scheduling…"):i?e?Object(Z.__)("Update"):n?Object(Z.__)("Schedule"):Object(Z.__)("Publish"):Object(Z.__)("Submit for Review")}),ii=function(t){function e(t){var n;return Object(Mr.a)(this,e),(n=Object(zr.a)(this,Object(Kr.a)(e).call(this,t))).buttonNode=Object(xr.createRef)(),n}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var t,e=this.props,n=e.forceIsDirty,r=e.forceIsSaving,o=e.hasPublishAction,i=e.isBeingScheduled,s=e.isOpen,c=e.isPostSavingLocked,u=e.isPublishable,l=e.isPublished,d=e.isSaveable,p=e.isSaving,h=e.isToggle,f=e.onSave,b=e.onStatusChange,m=e.onSubmit,O=void 0===m?v.noop:m,g=e.onToggle,y=e.visibility,j=p||r||!d||c||!u&&!n,_=l||p||r||!d||!u&&!n;t=o?i?"future":"private"===y?"private":"publish":"pending";var k={"aria-disabled":j,className:"editor-post-publish-button",isBusy:p&&l,isLarge:!0,isPrimary:!0,onClick:function(){j||(O(),b(t),f())}},E={"aria-disabled":_,"aria-expanded":s,className:"editor-post-publish-panel__toggle",isBusy:p&&l,isPrimary:!0,onClick:function(){_||g()}},S=i?Object(Z.__)("Schedule…"):Object(Z.__)("Publish…"),P=Object(xr.createElement)(oi,{forceIsSaving:r}),w=h?E:k,T=h?S:P;return Object(xr.createElement)(Dr.Button,Object(Nr.a)({ref:this.buttonNode},w),T,Object(xr.createElement)(a.DotTip,{tipId:"core/editor.publish"},Object(Z.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),e}(xr.Component),si=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isSavingPost,r=e.isEditedPostBeingScheduled,o=e.getEditedPostVisibility,i=e.isCurrentPostPublished,s=e.isEditedPostSaveable,a=e.isEditedPostPublishable,c=e.isPostSavingLocked,u=e.getCurrentPost,l=e.getCurrentPostType;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:s(),isPostSavingLocked:c(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost;return{onStatusChange:function(t){return n({status:t})},onSave:e.savePost}})])(ii),ai=[{value:"public",label:Object(Z.__)("Public"),info:Object(Z.__)("Visible to everyone.")},{value:"private",label:Object(Z.__)("Private"),info:Object(Z.__)("Only visible to site admins and editors.")},{value:"password",label:Object(Z.__)("Password Protected"),info:Object(Z.__)("Protected with a password you choose. Only those with the password can view this post.")}],ci=function(t){function e(t){var n;return Object(Mr.a)(this,e),(n=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).setPublic=n.setPublic.bind(Object(oo.a)(Object(oo.a)(n))),n.setPrivate=n.setPrivate.bind(Object(oo.a)(Object(oo.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(oo.a)(Object(oo.a)(n))),n.updatePassword=n.updatePassword.bind(Object(oo.a)(Object(oo.a)(n))),n.state={hasPassword:!!t.password},n}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"setPublic",value:function(){var t=this.props,e=t.visibility,n=t.onUpdateVisibility,r=t.status;n("private"===e?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(Z.__)("Would you like to privately publish this post now?"))){var t=this.props,e=t.onUpdateVisibility,n=t.onSave;e("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var t=this.props,e=t.visibility,n=t.onUpdateVisibility,r=t.status;n("private"===e?"draft":r,t.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(t){var e=this.props,n=e.status;(0,e.onUpdateVisibility)(n,t.target.value)}},{key:"render",value:function(){var t=this.props,e=t.visibility,n=t.password,r=t.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===e&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===e},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(xr.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(xr.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(Z.__)("Post Visibility")),ai.map(function(t){var e=t.value,n=t.label,i=t.info;return Object(xr.createElement)("div",{key:e,className:"editor-post-visibility__choice"},Object(xr.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:e,onChange:o[e].onSelect,checked:o[e].checked,id:"editor-post-".concat(e,"-").concat(r),"aria-describedby":"editor-post-".concat(e,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(xr.createElement)("label",{htmlFor:"editor-post-".concat(e,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(xr.createElement)("p",{id:"editor-post-".concat(e,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(xr.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(xr.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(Z.__)("Create password")),Object(xr.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(Z.__)("Use a secure password")}))]}}]),e}(xr.Component),ui=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.savePost,r=e.editPost;return{onSave:n,onUpdateVisibility:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:t,password:e})}}}),Wr.withInstanceId])(ci);var li=Object(l.withSelect)(function(t){return{visibility:t("core/editor").getEditedPostVisibility()}})(function(t){var e=t.visibility;return Object(v.find)(ai,{value:e}).label});var di=Object(Wr.compose)([Object(l.withSelect)(function(t){return{date:t("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(t){return{onUpdateDate:function(e){t("core/editor").editPost({date:e})}}})])(function(t){var e=t.date,n=t.onUpdateDate,r=Object(be.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(xr.createElement)(Dr.DateTimePicker,{key:"date-time-picker",currentDate:e,onChange:n,is12Hour:o})});var pi=Object(l.withSelect)(function(t){return{date:t("core/editor").getEditedPostAttribute("date"),isFloating:t("core/editor").isEditedPostDateFloating()}})(function(t){var e=t.date,n=t.isFloating,r=Object(be.__experimentalGetSettings)();return e&&!n?Object(be.dateI18n)(r.formats.datetimeAbbreviated,e):Object(Z.__)("Immediately")}),hi={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},fi=function(t,e){return t.toLowerCase()===e.toLowerCase()},bi=function(t){return Object(h.a)({},t,{name:Object(v.unescape)(t.name)})},mi=function(t){return Object(v.map)(t,bi)},vi=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(oo.a)(Object(oo.a)(t))),t.searchTerms=Object(v.throttle)(t.searchTerms.bind(Object(oo.a)(Object(oo.a)(t))),500),t.findOrCreateTerm=t.findOrCreateTerm.bind(Object(oo.a)(Object(oo.a)(t))),t.state={loading:!Object(v.isEmpty)(t.props.terms),availableTerms:[],selectedTerms:[]},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidMount",value:function(){var t=this;Object(v.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(function(){t.setState({loading:!1})},function(e){"abort"!==e.statusText&&t.setState({loading:!1})}))}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.initRequest,["abort"]),Object(v.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(t){t.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(h.a)({},hi,e),o=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(mi).then(function(e){t.setState(function(t){return{availableTerms:t.availableTerms.concat(e.filter(function(e){return!Object(v.find)(t.availableTerms,function(t){return t.id===e.id})}))}}),t.updateSelectedTerms(t.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,n){var r=Object(v.find)(t.state.availableTerms,function(t){return t.id===n});return r&&e.push(r.name),e},[]);this.setState({selectedTerms:e})}},{key:"findOrCreateTerm",value:function(t){var e=this,n=this.props.taxonomy,r=Object(v.escape)(t);return H()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch(function(o){return"term_exists"===o.code?(e.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(h.a)({},hi,{search:r}))}).then(mi),e.addRequest.then(function(e){return Object(v.find)(e,function(e){return fi(e.name,t)})})):Promise.reject(o)}).then(bi)}},{key:"onChange",value:function(t){var e=this,n=Object(v.uniqBy)(t,function(t){return t.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(t){return!Object(v.find)(e.state.availableTerms,function(e){return fi(e.name,t)})}),o=function(t,e){return t.map(function(t){return Object(v.find)(e,function(e){return fi(e.name,t)}).id})};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then(function(t){var r=e.state.availableTerms.concat(t);return e.setState({availableTerms:r}),e.props.onUpdateTerms(o(n,r),e.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(v.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:t})}},{key:"render",value:function(){var t=this.props,e=t.slug,n=t.taxonomy;if(!t.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,s=r.selectedTerms,a=i.map(function(t){return t.name}),c=Object(v.get)(n,["labels","add_new_item"],"post_tag"===e?Object(Z.__)("Add New Tag"):Object(Z.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===e?Object(Z.__)("Tag"):Object(Z.__)("Term")),l=Object(Z.sprintf)(Object(Z._x)("%s added","term"),u),d=Object(Z.sprintf)(Object(Z._x)("%s removed","term"),u),p=Object(Z.sprintf)(Object(Z._x)("Remove %s","term"),u);return Object(xr.createElement)(Dr.FormTokenField,{value:s,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:c,messages:{added:l,removed:d,remove:p}})}}]),e}(xr.Component),Oi=Object(Wr.compose)(Object(l.withSelect)(function(t,e){var n=e.slug,r=t("core/editor").getCurrentPost,o=(0,t("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?t("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(t){return{onUpdateTerms:function(e,n){t("core/editor").editPost(Object(p.a)({},n,e))}}}),Object(Dr.withFilters)("editor.PostTaxonomyType"))(vi),gi=function(){var t=[Object(Z.__)("Suggestion:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Add tags"))];return Object(xr.createElement)(Dr.PanelBody,{initialOpen:!1,title:t},Object(xr.createElement)("p",null,Object(Z.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(xr.createElement)(Oi,{slug:"post_tag"}))},yi=function(t){function e(t){var n;return Object(Mr.a)(this,e),(n=Object(zr.a)(this,Object(Kr.a)(e).call(this,t))).state={hadTagsWhenOpeningThePanel:t.hasTags},n}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(xr.createElement)(gi,null)}}]),e}(xr.Component),ji=Object(Wr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPostType(),n=t("core").getTaxonomy("post_tag"),r=n&&t("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(v.some)(n.types,function(t){return t===e}),hasTags:r&&r.length}}),Object(Wr.ifCondition)(function(t){var e=t.areTagsFetched;return t.isPostTypeSupported&&e}))(yi),_i=function(t){var e=t.suggestedPostFormat,n=t.suggestionText,r=t.onUpdatePostFormat;return Object(xr.createElement)(Dr.Button,{isLink:!0,onClick:function(){return r(e)}},n)},ki=function(t,e){var n=Wo.filter(function(e){return Object(v.includes)(t,e.id)});return Object(v.find)(n,function(t){return t.id===e})},Ei=Object(Wr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getSuggestedPostFormat,o=Object(v.get)(t("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:ki(o,r())}}),Object(l.withDispatch)(function(t){return{onUpdatePostFormat:function(e){t("core/editor").editPost({format:e})}}}),Object(Wr.ifCondition)(function(t){var e=t.suggestion,n=t.currentPostFormat;return e&&e.id!==n}))(function(t){var e=t.suggestion,n=t.onUpdatePostFormat,r=[Object(Z.__)("Suggestion:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Use a post format"))];return Object(xr.createElement)(Dr.PanelBody,{initialOpen:!1,title:r},Object(xr.createElement)("p",null,Object(Z.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(xr.createElement)("p",null,Object(xr.createElement)(_i,{onUpdatePostFormat:n,suggestedPostFormat:e.id,suggestionText:Object(Z.sprintf)(Object(Z.__)('Apply the "%1$s" format.'),e.caption)})))});var Si=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(t){var e,n,r=t.hasPublishAction,o=t.isBeingScheduled,i=t.children;return r?o?(e=Object(Z.__)("Are you ready to schedule?"),n=Object(Z.__)("Your work will be published at the specified date and time.")):(e=Object(Z.__)("Are you ready to publish?"),n=Object(Z.__)("Double-check your settings before publishing.")):(e=Object(Z.__)("Are you ready to submit for review?"),n=Object(Z.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(xr.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(xr.createElement)("div",null,Object(xr.createElement)("strong",null,e)),Object(xr.createElement)("p",null,n),r&&Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(Dr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Visibility:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(xr.createElement)(li,null))]},Object(xr.createElement)(ui,null)),Object(xr.createElement)(Dr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Publish:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(xr.createElement)(pi,null))]},Object(xr.createElement)(di,null)),Object(xr.createElement)(Ei,null),Object(xr.createElement)(ji,null),i))}),Pi=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).state={showCopyConfirmation:!1},t.onCopy=t.onCopy.bind(Object(oo.a)(Object(oo.a)(t))),t.onSelectInput=t.onSelectInput.bind(Object(oo.a)(Object(oo.a)(t))),t.postLink=Object(xr.createRef)(),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var t=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){t.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(t){t.target.select()}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.isScheduled,r=t.post,o=t.postType,i=Object(v.get)(o,["labels","singular_name"]),s=Object(v.get)(o,["labels","view_item"]),a=n?Object(xr.createElement)(xr.Fragment,null,Object(Z.__)("is now scheduled. It will go live on")," ",Object(xr.createElement)(pi,null),"."):Object(Z.__)("is now live.");return Object(xr.createElement)("div",{className:"post-publish-panel__postpublish"},Object(xr.createElement)(Dr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(xr.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(Z.__)("(no title)"))," ",a),Object(xr.createElement)(Dr.PanelBody,null,Object(xr.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(xr.createElement)("strong",null,Object(Z.__)("What’s next?"))),Object(xr.createElement)(Dr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(Z.sprintf)(Object(Z.__)("%s address"),i),value:Object(O.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(xr.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(xr.createElement)(Dr.Button,{isDefault:!0,href:r.link},s),Object(xr.createElement)(Dr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(Z.__)("Copied!"):Object(Z.__)("Copy Link")))),e)}}]),e}(xr.Component),wi=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getCurrentPost,o=e.isCurrentPostScheduled,i=t("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(Pi),Ti=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).onSubmit=t.onSubmit.bind(Object(oo.a)(Object(oo.a)(t))),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidUpdate",value:function(t){t.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var t=this.props,e=t.onClose,n=t.hasPublishAction,r=t.isPostTypeViewable;n&&r||e()}},{key:"render",value:function(){var t=this.props,e=t.forceIsDirty,n=t.forceIsSaving,r=t.isBeingScheduled,o=t.isPublished,i=t.isPublishSidebarEnabled,s=t.isScheduled,a=t.isSaving,c=t.onClose,u=t.onTogglePublishSidebar,l=t.PostPublishExtension,d=t.PrePublishExtension,p=Object(Ur.a)(t,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),h=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||s&&r,b=!f&&!a,m=f&&!a;return Object(xr.createElement)("div",Object(Nr.a)({className:"editor-post-publish-panel"},h),Object(xr.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(xr.createElement)("div",{className:"editor-post-publish-panel__header-published"},s?Object(Z.__)("Scheduled"):Object(Z.__)("Published")):Object(xr.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(xr.createElement)(si,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:n}),Object(xr.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(xr.createElement)(Dr.IconButton,{"aria-expanded":!0,onClick:c,icon:"no-alt",label:Object(Z.__)("Close panel")})),Object(xr.createElement)("div",{className:"editor-post-publish-panel__content"},b&&Object(xr.createElement)(Si,null,d&&Object(xr.createElement)(d,null)),m&&Object(xr.createElement)(wi,{focusOnMount:!0},l&&Object(xr.createElement)(l,null)),a&&Object(xr.createElement)(Dr.Spinner,null)),Object(xr.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(xr.createElement)(Dr.CheckboxControl,{label:Object(Z.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),e}(xr.Component),Ci=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core").getPostType,n=t("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,s=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,c=n.isEditedPostDirty,u=n.isSavingPost,l=t("core/editor").isPublishSidebarEnabled,d=e(o("type"));return{hasPublishAction:Object(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:s()}}),Object(l.withDispatch)(function(t,e){var n=e.isPublishSidebarEnabled,r=t("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),Dr.withFocusReturn,Dr.withConstrainedTabbing])(Ti);var xi=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isSavingPost,r=e.isCurrentPostPublished,o=e.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost,r=e.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(t){var e=t.isSaving,n=t.isPublished,r=t.isScheduled,o=t.onClick;return n||r?Object(xr.createElement)(Dr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var t;n?t=Object(Z.__)("Are you sure you want to unpublish this post?"):r&&(t=Object(Z.__)("Are you sure you want to unschedule this post?")),window.confirm(t)&&o()},disabled:e,isTertiary:!0},Object(Z.__)("Switch to Draft")):null}),Bi=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).state={forceSavedMessage:!1},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this;t.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){e.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var t=this.props,e=t.post,n=t.isNew,r=t.isScheduled,o=t.isPublished,i=t.isDirty,s=t.isSaving,a=t.isSaveable,c=t.onSave,u=t.isAutosaving,l=t.isPending,d=t.isLargeViewport,p=this.state.forceSavedMessage;if(s){var h=Yr()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(xr.createElement)("span",{className:h},Object(xr.createElement)(Dr.Dashicon,{icon:"cloud"}),u?Object(Z.__)("Autosaving"):Object(Z.__)("Saving"))}if(o||r)return Object(xr.createElement)(xi,null);if(!a)return null;if(p||!n&&!i)return Object(xr.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(xr.createElement)(Dr.Dashicon,{icon:"saved"}),Object(Z.__)("Saved"));if(!Object(v.get)(e,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(Z.__)("Save as Pending"):Object(Z.__)("Save Draft");return d?Object(xr.createElement)(Dr.Button,{className:"editor-post-save-draft",onClick:c,shortcut:io.displayShortcut.primary("s"),isTertiary:!0},f):Object(xr.createElement)(Dr.IconButton,{className:"editor-post-save-draft",label:f,onClick:c,shortcut:io.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),e}(xr.Component),Ai=Object(Wr.compose)([Object(l.withSelect)(function(t,e){var n=e.forceIsDirty,r=e.forceIsSaving,o=t("core/editor"),i=o.isEditedPostNew,s=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,c=o.isEditedPostDirty,u=o.isSavingPost,l=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,h=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:s(),isScheduled:a(),isDirty:n||c(),isSaving:r||u(),isSaveable:l(),isAutosaving:p(),isPending:"pending"===h("status")}}),Object(l.withDispatch)(function(t){return{onSave:t("core/editor").savePost}}),Wr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"medium"})])(Bi);var Ii=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(t){var e=t.hasPublishAction,n=t.children;return e?n:null});var Li=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPost();return{hasStickyAction:Object(v.get)(e,["_links","wp:action-sticky"],!1),postType:t("core/editor").getCurrentPostType()}})])(function(t){var e=t.hasStickyAction,n=t.postType,r=t.children;return"post"===n&&e?r:null});var Ri=Object(Wr.compose)([Object(l.withSelect)(function(t){return{postSticky:t("core/editor").getEditedPostAttribute("sticky")}}),Object(l.withDispatch)(function(t){return{onUpdateSticky:function(e){t("core/editor").editPost({sticky:e})}}})])(function(t){var e=t.onUpdateSticky,n=t.postSticky,r=void 0!==n&&n;return Object(xr.createElement)(Li,null,Object(xr.createElement)(Dr.CheckboxControl,{label:Object(Z.__)("Stick to the top of the blog"),checked:r,onChange:function(){return e(!r)}}))}),Ni={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Ui=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).findTerm=t.findTerm.bind(Object(oo.a)(Object(oo.a)(t))),t.onChange=t.onChange.bind(Object(oo.a)(Object(oo.a)(t))),t.onChangeFormName=t.onChangeFormName.bind(Object(oo.a)(Object(oo.a)(t))),t.onChangeFormParent=t.onChangeFormParent.bind(Object(oo.a)(Object(oo.a)(t))),t.onAddTerm=t.onAddTerm.bind(Object(oo.a)(Object(oo.a)(t))),t.onToggleForm=t.onToggleForm.bind(Object(oo.a)(Object(oo.a)(t))),t.setFilterValue=t.setFilterValue.bind(Object(oo.a)(Object(oo.a)(t))),t.sortBySelected=t.sortBySelected.bind(Object(oo.a)(Object(oo.a)(t))),t.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"onChange",value:function(t){var e=this.props,n=e.onUpdateTerms,r=e.terms,o=void 0===r?[]:r,i=e.taxonomy,s=parseInt(t.target.value,10);n(-1!==o.indexOf(s)?Object(v.without)(o,s):[].concat(Object(x.a)(o),[s]),i.rest_base)}},{key:"onChangeFormName",value:function(t){var e=""===t.target.value.trim()?"":t.target.value;this.setState({formName:e})}},{key:"onChangeFormParent",value:function(t){this.setState({formParent:t})}},{key:"onToggleForm",value:function(){this.setState(function(t){return{showForm:!t.showForm}})}},{key:"findTerm",value:function(t,e,n){return Object(v.find)(t,function(t){return(!t.parent&&!e||parseInt(t.parent)===parseInt(e))&&t.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(t){var e=this;t.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,s=n.slug,a=this.state,c=a.formName,u=a.formParent,l=a.adding,d=a.availableTerms;if(""!==c&&!l){var p=this.findTerm(d,u,c);if(p)return Object(v.some)(i,function(t){return t===p.id})||r([].concat(Object(x.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=H()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:c,parent:u||void 0}}),this.addRequest.catch(function(t){return"term_exists"===t.code?(e.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(h.a)({},Ni,{parent:u||0,search:c}))}),e.addRequest.then(function(t){return e.findTerm(t,u,c)})):Promise.reject(t)}).then(function(t){var n=!!Object(v.find)(e.state.availableTerms,function(e){return e.id===t.id})?e.state.availableTerms:[t].concat(Object(x.a)(e.state.availableTerms)),a=Object(Z.sprintf)(Object(Z._x)("%s added","term"),Object(v.get)(e.props.taxonomy,["labels","singular_name"],"category"===s?Object(Z.__)("Category"):Object(Z.__)("Term")));e.props.speak(a,"assertive"),e.addRequest=null,e.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:e.sortBySelected(Eo(n))}),r([].concat(Object(x.a)(i),[t.id]),o.rest_base)},function(t){"abort"!==t.statusText&&(e.addRequest=null,e.setState({adding:!1}))})}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.fetchRequest,["abort"]),Object(v.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(t){this.props.taxonomy!==t.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var t=this,e=this.props.taxonomy;e&&(this.fetchRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(e.rest_base),Ni)}),this.fetchRequest.then(function(e){var n=t.sortBySelected(Eo(e));t.fetchRequest=null,t.setState({loading:!1,availableTermsTree:n,availableTerms:e})},function(e){"abort"!==e.statusText&&(t.fetchRequest=null,t.setState({loading:!1}))}))}},{key:"sortBySelected",value:function(t){var e=this.props.terms,n=function t(n){return-1!==e.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(t).filter(function(t){return t}).length>0)};return t.sort(function(t,e){var r=n(t),o=n(e);return r===o?0:r&&!o?-1:!r&&o?1:0}),t}},{key:"setFilterValue",value:function(t){var e=this.state.availableTermsTree,n=t.target.value,r=e.map(this.getFilterMatcher(n)).filter(function(t){return t});this.setState({filterValue:n,filteredTermsTree:r});var o=function t(e){for(var n=0,r=0;r0&&(r.children=r.children.map(e).filter(function(t){return t})),(-1!==r.name.toLowerCase().indexOf(t)||r.children.length>0)&&r}}},{key:"renderTerms",value:function(t){var e=this,n=this.props.terms,r=void 0===n?[]:n;return t.map(function(t){var n="editor-post-taxonomies-hierarchical-term-".concat(t.id);return Object(xr.createElement)("div",{key:t.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(xr.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(t.id),value:t.id,onChange:e.onChange}),Object(xr.createElement)("label",{htmlFor:n},Object(v.unescape)(t.name)),!!t.children.length&&Object(xr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},e.renderTerms(t.children)))})}},{key:"render",value:function(){var t=this.props,e=t.slug,n=t.taxonomy,r=t.instanceId,o=t.hasCreateAction;if(!t.hasAssignAction)return null;var i=this.state,s=i.availableTermsTree,a=i.availableTerms,c=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,h=i.filterValue,f=function(t,r,o){return Object(v.get)(n,["labels",t],"category"===e?r:o)},b=f("add_new_item",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),m=f("new_item_name",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),O=f("parent_item",Object(Z.__)("Parent Category"),Object(Z.__)("Parent Term")),g="— ".concat(O," —"),y=b,j="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(Z.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(Z.__)("Terms")),S=a.length>=8;return[S&&Object(xr.createElement)("label",{key:"filter-label",htmlFor:_},k),S&&Object(xr.createElement)("input",{type:"search",id:_,value:h,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(xr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==h?c:s)),!d&&o&&Object(xr.createElement)(Dr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},b),p&&Object(xr.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(xr.createElement)("label",{htmlFor:j,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(xr.createElement)("input",{type:"text",id:j,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(xr.createElement)(Dr.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:s}),Object(xr.createElement)(Dr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},y))]}}]),e}(xr.Component),Di=Object(Wr.compose)([Object(l.withSelect)(function(t,e){var n=e.slug,r=t("core/editor").getCurrentPost,o=(0,t("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?t("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(t){return{onUpdateTerms:function(e,n){t("core/editor").editPost(Object(p.a)({},n,e))}}}),Dr.withSpokenMessages,Wr.withInstanceId,Object(Dr.withFilters)("editor.PostTaxonomyType")])(Ui);var Fi=Object(Wr.compose)([Object(l.withSelect)(function(t){return{postType:t("core/editor").getCurrentPostType(),taxonomies:t("core").getTaxonomies({per_page:-1})}})])(function(t){var e=t.postType,n=t.taxonomies,r=t.taxonomyWrapper,o=void 0===r?v.identity:r,i=Object(v.filter)(n,function(t){return Object(v.includes)(t.types,e)});return Object(v.filter)(i,function(t){return t.visibility.show_ui}).map(function(t){var e=t.hierarchical?Di:Oi;return Object(xr.createElement)(xr.Fragment,{key:"taxonomy-".concat(t.slug)},o(Object(xr.createElement)(e,{slug:t.slug}),t))})});var Mi=Object(Wr.compose)([Object(l.withSelect)(function(t){return{postType:t("core/editor").getCurrentPostType(),taxonomies:t("core").getTaxonomies({per_page:-1})}})])(function(t){var e=t.postType,n=t.taxonomies,r=t.children;return Object(v.some)(n,function(t){return Object(v.includes)(t.types,e)})?r:null}),Vi=n(61),zi=n.n(Vi),Ki=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).edit=t.edit.bind(Object(oo.a)(Object(oo.a)(t))),t.stopEditing=t.stopEditing.bind(Object(oo.a)(Object(oo.a)(t))),t.state={},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"edit",value:function(t){var e=t.target.value;this.props.onChange(e),this.setState({value:e,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var t=this.state.value,e=this.props.instanceId;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("label",{htmlFor:"post-content-".concat(e),className:"screen-reader-text"},Object(Z.__)("Type text or HTML")),Object(xr.createElement)(zi.a,{autoComplete:"off",dir:"auto",value:t,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(e),placeholder:Object(Z.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return e.isDirty?null:{value:t.value,isDirty:!1}}}]),e}(xr.Component),qi=Object(Wr.compose)([Object(l.withSelect)(function(t){return{value:(0,t("core/editor").getEditedPostContent)()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost,r=e.resetEditorBlocks;return{onChange:function(t){n({content:t})},onPersist:function(t){var e=Object(s.parse)(t);r(e)}}}),Wr.withInstanceId])(Ki),Wi=n(57),Hi=function(t){function e(t){var n,r=t.permalinkParts,o=t.slug;return Object(Mr.a)(this,e),(n=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(oo.a)(Object(oo.a)(n))),n}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"onSavePermalink",value:function(t){var e=Yo(this.state.editedPostName);t.preventDefault(),this.props.onSave(),e!==this.props.postName&&(this.props.editPost({slug:e}),this.setState({editedPostName:e}))}},{key:"render",value:function(){var t=this,e=this.props.permalinkParts,n=e.prefix,r=e.suffix,o=this.state.editedPostName;return Object(xr.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(xr.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(xr.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(xr.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(Z.__)("Edit post permalink"),value:o,onChange:function(e){return t.setState({editedPostName:e.target.value})},type:"text",autoFocus:!0}),Object(xr.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(xr.createElement)(Dr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(Z.__)("Save")))}}]),e}(xr.Component),Gi=Object(Wr.compose)([Object(l.withSelect)(function(t){return{permalinkParts:(0,t("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(Hi),Qi=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).addVisibilityCheck=t.addVisibilityCheck.bind(Object(oo.a)(Object(oo.a)(t))),t.onVisibilityChange=t.onVisibilityChange.bind(Object(oo.a)(Object(oo.a)(t))),t.state={isCopied:!1,isEditingPermalink:!1},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var t=this.props,e=t.isEditable,n=t.refreshPost;e||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(t,e){e.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var t=this,e=this.props,n=e.isEditable,r=e.isNew,o=e.isPublished,i=e.isViewable,s=e.permalinkParts,a=e.postLink,c=e.postSlug,u=e.postID,l=e.postTitle;if(r||!i||!s||!a)return null;var d=this.state,p=d.isCopied,h=d.isEditingPermalink,f=p?Object(Z.__)("Permalink copied"):Object(Z.__)("Copy the permalink"),b=s.prefix,m=s.suffix,v=Object(O.safeDecodeURIComponent)(c)||Yo(l)||u,g=n?b+v+m:b;return Object(xr.createElement)("div",{className:"editor-post-permalink"},Object(xr.createElement)(Dr.ClipboardButton,{className:Yr()("editor-post-permalink__copy",{"is-copied":p}),text:g,label:f,onCopy:function(){return t.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(xr.createElement)("span",{className:"editor-post-permalink__label"},Object(Z.__)("Permalink:")),!h&&Object(xr.createElement)(Dr.ExternalLink,{className:"editor-post-permalink__link",href:o?g:a,target:"_blank",ref:function(e){return t.linkElement=e}},Object(O.safeDecodeURI)(g),"‎"),h&&Object(xr.createElement)(Gi,{slug:v,onSave:function(){return t.setState({isEditingPermalink:!1})}}),n&&!h&&Object(xr.createElement)(Dr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return t.setState({isEditingPermalink:!0})}},Object(Z.__)("Edit")),!n&&Object(xr.createElement)(Dr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Qo("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(Z.__)("Change Permalinks")))}}]),e}(xr.Component),Yi=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.isPermalinkEditable,o=e.getCurrentPost,i=e.getPermalinkParts,s=e.getEditedPostAttribute,a=e.isCurrentPostPublished,c=t("core").getPostType,u=o(),l=u.id,d=u.link,p=c(s("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:s("slug"),isEditable:r(),isPublished:a(),postTitle:s("title"),postID:l,isViewable:Object(v.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(t){return{refreshPost:t("core/editor").refreshPost}})])(Qi),$i=/[\r\n]+/g,Xi=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(oo.a)(Object(oo.a)(t))),t.onSelect=t.onSelect.bind(Object(oo.a)(Object(oo.a)(t))),t.onUnselect=t.onUnselect.bind(Object(oo.a)(Object(oo.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(oo.a)(Object(oo.a)(t))),t.redirectHistory=t.redirectHistory.bind(Object(oo.a)(Object(oo.a)(t))),t.state={isSelected:!1},t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(t){var e=t.target.value.replace($i," ");this.props.onUpdate(e)}},{key:"onKeyDown",value:function(t){t.keyCode===io.ENTER&&(t.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(t){t.shiftKey?this.props.onRedo():this.props.onUndo(),t.preventDefault()}},{key:"render",value:function(){var t=this.props,e=t.hasFixedToolbar,n=t.isCleanNewPost,r=t.isFocusMode,o=t.isPostTypeViewable,i=t.instanceId,s=t.placeholder,a=t.title,c=this.state.isSelected,u=Yr()("wp-block editor-post-title__block",{"is-selected":c,"is-focus-mode":r,"has-fixed-toolbar":e}),l=Object(Wi.decodeEntities)(s);return Object(xr.createElement)(jo,{supportKeys:"title"},Object(xr.createElement)("div",{className:"editor-post-title"},Object(xr.createElement)("div",{className:u},Object(xr.createElement)(Dr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(xr.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(Z.__)("Add title")),Object(xr.createElement)(zi.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:l||Object(Z.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),c&&o&&Object(xr.createElement)(Yi,null))))}}]),e}(xr.Component),Zi=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.isCleanNewPost,o=t("core/block-editor").getSettings,i=(0,t("core").getPostType)(n("type")),s=o(),a=s.titlePlaceholder,c=s.focusMode,u=s.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),isPostTypeViewable:Object(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:c,hasFixedToolbar:u}}),Ji=Object(l.withDispatch)(function(t){var e=t("core/block-editor"),n=e.insertDefaultBlock,r=e.clearSelectedBlock,o=t("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(t){i({title:t})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}}),ts=Object(Wr.compose)(Zi,Ji,Wr.withInstanceId,Dr.withFocusOutside)(Xi);var es=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.getCurrentPostId,o=e.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(l.withDispatch)(function(t){return{trashPost:t("core/editor").trashPost}})])(function(t){var e=t.isNew,n=t.postId,r=t.postType,o=Object(Ur.a)(t,["isNew","postId","postType"]);return e||!n?null:Object(xr.createElement)(Dr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(Z.__)("Move to trash"))});var ns=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.getCurrentPostId;return{isNew:n(),postId:r()}})(function(t){var e=t.isNew,n=t.postId,r=t.children;return e||!n?null:r});var rs=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(t){var e=t.hasPublishAction;return(0,t.render)({canEdit:e})}),os=n(98);var is=Object(l.withSelect)(function(t){return{content:t("core/editor").getEditedPostAttribute("content")}})(function(t){var e=t.content,n=Object(Z._x)("words","Word count type. Do not translate!");return Object(xr.createElement)("span",{className:"word-count"},Object(os.count)(e,n))});var ss=Object(l.withSelect)(function(t){var e=t("core/block-editor").getGlobalBlockCount;return{headingCount:e("core/heading"),paragraphCount:e("core/paragraph"),numberOfBlocks:e()}})(function(t){var e=t.headingCount,n=t.paragraphCount,r=t.numberOfBlocks,o=t.hasOutlineItemsDisabled,i=t.onRequestClose;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(Z.__)("Document Statistics"),tabIndex:"0"},Object(xr.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Words"),Object(xr.createElement)(is,null)),Object(xr.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Headings"),Object(xr.createElement)("span",{className:"table-of-contents__number"},e)),Object(xr.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Paragraphs"),Object(xr.createElement)("span",{className:"table-of-contents__number"},n)),Object(xr.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Blocks"),Object(xr.createElement)("span",{className:"table-of-contents__number"},r))),e>0&&Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("hr",null),Object(xr.createElement)("span",{className:"table-of-contents__title"},Object(Z.__)("Document Outline")),Object(xr.createElement)(no,{onSelect:i,hasOutlineItemsDisabled:o})))});var as=Object(l.withSelect)(function(t){return{hasBlocks:!!t("core/block-editor").getBlockCount()}})(function(t){var e=t.hasBlocks,n=t.hasOutlineItemsDisabled;return Object(xr.createElement)(Dr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(xr.createElement)(Dr.IconButton,{onClick:e?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(Z.__)("Content structure"),labelPosition:"bottom","aria-disabled":!e})},renderContent:function(t){var e=t.onClose;return Object(xr.createElement)(ss,{onRequestClose:e,hasOutlineItemsDisabled:n})}})}),cs=function(t){function e(){var t;return Object(Mr.a)(this,e),(t=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).warnIfUnsavedChanges=t.warnIfUnsavedChanges.bind(Object(oo.a)(Object(oo.a)(t))),t}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(t){if(this.props.isDirty)return t.returnValue=Object(Z.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue}},{key:"render",value:function(){return null}}]),e}(xr.Component),us=Object(l.withSelect)(function(t){return{isDirty:t("core/editor").isEditedPostDirty()}})(cs),ls=n(41),ds=n.n(ls),ps=n(227),hs=n.n(ps),fs=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,bs=function(t,e){e=e||{};var n=1,r=1;function o(t){var e=t.match(/\n/g);e&&(n+=e.length);var o=t.lastIndexOf("\n");r=~o?t.length-o:r+t.length}function i(){var t={line:n,column:r};return function(e){return e.position=new s(t),h(),e}}function s(t){this.start=t,this.end={line:n,column:r},this.source=e.source}s.prototype.content=t;var a=[];function c(o){var i=new Error(e.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=e.source,i.line=n,i.column=r,i.source=t,!e.silent)throw i;a.push(i)}function u(){return p(/^{\s*/)}function l(){return p(/^}/)}function d(){var e,n=[];for(h(),b(n);t.length&&"}"!==t.charAt(0)&&(e=P()||w());)!1!==e&&(n.push(e),b(n));return n}function p(e){var n=e.exec(t);if(n){var r=n[0];return o(r),t=t.slice(r.length),n}}function h(){p(/^\s*/)}function b(t){var e;for(t=t||[];e=m();)!1!==e&&t.push(e);return t}function m(){var e=i();if("/"===t.charAt(0)&&"*"===t.charAt(1)){for(var n=2;""!==t.charAt(n)&&("*"!==t.charAt(n)||"/"!==t.charAt(n+1));)++n;if(n+=2,""===t.charAt(n-1))return c("End of comment missing");var s=t.slice(2,n-2);return r+=2,o(s),t=t.slice(n),r+=2,e({type:"comment",comment:s})}}function v(){var t=p(/^([^{]+)/);if(t)return ms(t[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(t){return t.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(t){return t.replace(/\u200C/g,",")})}function O(){var t=i(),e=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=ms(e[0]),!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=t({type:"declaration",property:e.replace(fs,""),value:n?ms(n[0]).replace(fs,""):""});return p(/^[;\s]*/),r}}function g(){var t,e=[];if(!u())return c("missing '{'");for(b(e);t=O();)!1!==t&&(e.push(t),b(e));return l()?e:c("missing '}'")}function y(){for(var t,e=[],n=i();t=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),p(/^,\s*/);if(e.length)return n({type:"keyframe",values:e,declarations:g()})}var j,_=S("import"),k=S("charset"),E=S("namespace");function S(t){var e=new RegExp("^@"+t+"\\s*([^;]+);");return function(){var n=i(),r=p(e);if(r){var o={type:t};return o[t]=r[1].trim(),n(o)}}}function P(){if("@"===t[0])return function(){var t=i(),e=p(/^@([-\w]+)?keyframes\s*/);if(e){var n=e[1];if(!(e=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=e[1];if(!u())return c("@keyframes missing '{'");for(var s=b();r=y();)s.push(r),s=s.concat(b());return l()?t({type:"keyframes",name:o,vendor:n,keyframes:s}):c("@keyframes missing '}'")}}()||function(){var t=i(),e=p(/^@media *([^{]+)/);if(e){var n=ms(e[1]);if(!u())return c("@media missing '{'");var r=b().concat(d());return l()?t({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var t=i(),e=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return t({type:"custom-media",name:ms(e[1]),media:ms(e[2])})}()||function(){var t=i(),e=p(/^@supports *([^{]+)/);if(e){var n=ms(e[1]);if(!u())return c("@supports missing '{'");var r=b().concat(d());return l()?t({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||_()||k()||E()||function(){var t=i(),e=p(/^@([-\w]+)?document *([^{]+)/);if(e){var n=ms(e[1]),r=ms(e[2]);if(!u())return c("@document missing '{'");var o=b().concat(d());return l()?t({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var t=i();if(p(/^@page */)){var e=v()||[];if(!u())return c("@page missing '{'");for(var n,r=b();n=O();)r.push(n),r=r.concat(b());return l()?t({type:"page",selectors:e,declarations:r}):c("@page missing '}'")}}()||function(){var t=i();if(p(/^@host\s*/)){if(!u())return c("@host missing '{'");var e=b().concat(d());return l()?t({type:"host",rules:e}):c("@host missing '}'")}}()||function(){var t=i();if(p(/^@font-face\s*/)){if(!u())return c("@font-face missing '{'");for(var e,n=b();e=O();)n.push(e),n=n.concat(b());return l()?t({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function w(){var t=i(),e=v();return e?(b(),t({type:"rule",selectors:e,declarations:g()})):c("selector missing")}return function t(e,n){var r=e&&"string"==typeof e.type;var o=r?e:n;for(var i in e){var s=e[i];Array.isArray(s)?s.forEach(function(e){t(e,o)}):s&&"object"===Object(f.a)(s)&&t(s,o)}r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return e}((j=d(),{type:"stylesheet",stylesheet:{source:e.source,rules:j,parsingErrors:a}}))};function ms(t){return t?t.replace(/^\s+|\s+$/g,""):""}var vs=n(109),Os=n.n(vs),gs=ys;function ys(t){this.options=t||{}}ys.prototype.emit=function(t){return t},ys.prototype.visit=function(t){return this[t.type](t)},ys.prototype.mapVisit=function(t,e){var n="";e=e||"";for(var r=0,o=t.length;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(h.a)({},n,{selectors:n.selectors.map(function(n){return Object(v.includes)(e,n.trim())?n:n.match(Bs)?n.replace(/^(body|html|:root)/,t):t+" "+n})}):n}},Is=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(v.map)(t,function(t){var n=t.css,r=t.baseURL,o=[];return e&&o.push(As(e)),r&&o.push(xs(r)),o.length?Ps(n,Object(Wr.compose)(o)):n})},Ls=n(35);function Rs(){return(Rs=Object(he.a)(q.a.mark(function t(e){var n,r,o,i,s,a,c,u,l,p,f,b,m,O,g,y,j,_,k,E,S,P,w,T,C,B,A,I,L;return q.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=e.allowedTypes,r=e.additionalData,o=void 0===r?{}:r,i=e.filesList,s=e.maxUploadFileSize,a=e.onError,c=void 0===a?v.noop:a,u=e.onFileChange,l=e.wpAllowedMimeTypes,p=void 0===l?null:l,f=Object(x.a)(i),b=[],m=function(t,e){Object(Ls.revokeBlobURL)(Object(v.get)(b,[t,"url"])),b[t]=e,u(Object(v.compact)(b))},O=function(t){return!n||Object(v.some)(n,function(e){return Object(v.includes)(e,"/")?e===t:Object(v.startsWith)(t,"".concat(e,"/"))})},g=(R=p)?Object(v.flatMap)(R,function(t,e){var n=t.split("/"),r=Object(d.a)(n,1)[0],o=e.split("|");return[t].concat(Object(x.a)(Object(v.map)(o,function(t){return"".concat(r,"/").concat(t)})))}):R,y=function(t){return Object(v.includes)(g,t)},j=function(t){t.message=[Object(xr.createElement)("strong",{key:"filename"},t.file.name),": ",t.message],c(t)},_=[],k=!0,E=!1,S=void 0,t.prev=12,P=f[Symbol.iterator]();case 14:if(k=(w=P.next()).done){t.next=34;break}if(T=w.value,!g||y(T.type)){t.next=19;break}return j({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(Z.__)("Sorry, this file type is not permitted for security reasons."),file:T}),t.abrupt("continue",31);case 19:if(O(T.type)){t.next=22;break}return j({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(Z.__)("Sorry, this file type is not supported here."),file:T}),t.abrupt("continue",31);case 22:if(!(s&&T.size>s)){t.next=25;break}return j({code:"SIZE_ABOVE_LIMIT",message:Object(Z.__)("This file exceeds the maximum upload size for this site."),file:T}),t.abrupt("continue",31);case 25:if(!(T.size<=0)){t.next=28;break}return j({code:"EMPTY_FILE",message:Object(Z.__)("This file is empty."),file:T}),t.abrupt("continue",31);case 28:_.push(T),b.push({url:Object(Ls.createBlobURL)(T)}),u(b);case 31:k=!0,t.next=14;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(12),E=!0,S=t.t0;case 40:t.prev=40,t.prev=41,k||null==P.return||P.return();case 43:if(t.prev=43,!E){t.next=46;break}throw S;case 46:return t.finish(43);case 47:return t.finish(40);case 48:C=0;case 49:if(!(C<_.length)){t.next=68;break}return B=_[C],t.prev=51,t.next=54,Ns(B,o);case 54:A=t.sent,I=Object(h.a)({},Object(v.omit)(A,["alt_text","source_url"]),{alt:A.alt_text,caption:Object(v.get)(A,["caption","raw"],""),title:A.title.raw,url:A.source_url}),m(C,I),t.next=65;break;case 59:t.prev=59,t.t1=t.catch(51),m(C,null),L=void 0,L=Object(v.has)(t.t1,["message"])?Object(v.get)(t.t1,["message"]):Object(Z.sprintf)(Object(Z.__)("Error while uploading file %s to the media library."),B.name),c({code:"GENERAL",message:L,file:B});case 65:++C,t.next=49;break;case 68:case"end":return t.stop()}var R},t,this,[[12,36,40,48],[41,,43,47],[51,59]])}))).apply(this,arguments)}function Ns(t,e){var n=new window.FormData;return n.append("file",t,t.name||t.type.replace("/",".")),Object(v.forEach)(e,function(t,e){return n.append(e,t)}),H()({path:"/wp/v2/media",body:n,method:"POST"})}var Us=function(t){var e=t.additionalData,n=void 0===e?{}:e,r=t.allowedTypes,o=t.filesList,i=t.maxUploadFileSize,s=t.onError,a=void 0===s?v.noop:s,c=t.onFileChange,u=Object(l.select)("core/editor"),d=u.getCurrentPostId,p=u.getEditorSettings,f=p().allowedMimeTypes;i=i||p().maxUploadFileSize,function(t){Rs.apply(this,arguments)}({allowedTypes:r,filesList:o,onFileChange:c,additionalData:Object(h.a)({post:d()},n),maxUploadFileSize:i,onError:function(t){var e=t.message;return a(e)},wpAllowedMimeTypes:f})},Ds=function(t){function e(t){var n;return Object(Mr.a)(this,e),(n=Object(zr.a)(this,Object(Kr.a)(e).apply(this,arguments))).getBlockEditorSettings=ds()(n.getBlockEditorSettings,{maxSize:1}),t.recovery?Object(zr.a)(n):(t.updatePostLock(t.settings.postLock),t.setupEditor(t.post,t.initialEdits,t.settings.template),t.settings.autosave&&t.createWarningNotice(Object(Z.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(Z.__)("View the autosave"),url:t.settings.autosave.editLink}]}),n)}return Object(qr.a)(e,t),Object(Vr.a)(e,[{key:"getBlockEditorSettings",value:function(t,e,n,r){return Object(h.a)({},Object(v.pick)(t,["alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","colors","disableCustomColors","disableCustomFontSizes","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","templateLock","titlePlaceholder"]),{__experimentalMetaSource:{value:e,onChange:n},__experimentalReusableBlocks:r,__experimentalMediaUpload:Us})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var t=Is(this.props.settings.styles,".editor-styles-wrapper");Object(v.map)(t,function(t){if(t){var e=document.createElement("style");e.innerHTML=t,document.body.appendChild(e)}})}}},{key:"componentDidUpdate",value:function(t){this.props.settings!==t.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.blocks,r=t.resetEditorBlocks,o=t.isReady,s=t.settings,a=t.meta,c=t.onMetaChange,u=t.reusableBlocks,l=t.resetEditorBlocksWithoutUndoLevel;if(!o)return null;var d=this.getBlockEditorSettings(s,a,c,u);return Object(xr.createElement)(i.BlockEditorProvider,{value:n,onInput:l,onChange:r,settings:d},e)}}]),e}(xr.Component),Fs=Object(Wr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.__unstableIsEditorReady,r=e.getEditorBlocks,o=e.getEditedPostAttribute,i=e.__experimentalGetReusableBlocks;return{isReady:n(),blocks:r(),meta:o("meta"),reusableBlocks:i()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.setupEditor,r=e.updatePostLock,o=e.resetEditorBlocks,i=e.editPost,s=e.updateEditorSettings;return{setupEditor:n,updatePostLock:r,createWarningNotice:t("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:s,resetEditorBlocksWithoutUndoLevel:function(t){o(t,{__unstableShouldCreateUndoLevel:!1})},onMetaChange:function(t){i({meta:t})}}})])(Ds),Ms=[Rr],Vs=Object(v.once)(function(){return Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(Cr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(t,e){return t||(t=Ms.map(v.clone),e===Object(s.getDefaultBlockName)()&&(t.push(Object(v.clone)(Lr)),Vs())),t}),n.d(e,"ServerSideRender",function(){return Fr}),n.d(e,"AutosaveMonitor",function(){return Gr}),n.d(e,"DocumentOutline",function(){return no}),n.d(e,"DocumentOutlineCheck",function(){return ro}),n.d(e,"VisualEditorGlobalKeyboardShortcuts",function(){return po}),n.d(e,"EditorGlobalKeyboardShortcuts",function(){return ho}),n.d(e,"TextEditorGlobalKeyboardShortcuts",function(){return fo}),n.d(e,"EditorHistoryRedo",function(){return bo}),n.d(e,"EditorHistoryUndo",function(){return mo}),n.d(e,"EditorNotices",function(){return Oo}),n.d(e,"ErrorBoundary",function(){return go}),n.d(e,"PageAttributesCheck",function(){return yo}),n.d(e,"PageAttributesOrder",function(){return ko}),n.d(e,"PageAttributesParent",function(){return wo}),n.d(e,"PageTemplate",function(){return To}),n.d(e,"PostAuthor",function(){return Bo}),n.d(e,"PostAuthorCheck",function(){return Co}),n.d(e,"PostComments",function(){return Ao}),n.d(e,"PostExcerpt",function(){return Io}),n.d(e,"PostExcerptCheck",function(){return Lo}),n.d(e,"PostFeaturedImage",function(){return Ko}),n.d(e,"PostFeaturedImageCheck",function(){return No}),n.d(e,"PostFormat",function(){return Ho}),n.d(e,"PostFormatCheck",function(){return qo}),n.d(e,"PostLastRevision",function(){return $o}),n.d(e,"PostLastRevisionCheck",function(){return Go}),n.d(e,"PostLockedModal",function(){return ti}),n.d(e,"PostPendingStatus",function(){return ni}),n.d(e,"PostPendingStatusCheck",function(){return ei}),n.d(e,"PostPingbacks",function(){return ri}),n.d(e,"PostPreviewButton",function(){return Zo}),n.d(e,"PostPublishButton",function(){return si}),n.d(e,"PostPublishButtonLabel",function(){return oi}),n.d(e,"PostPublishPanel",function(){return Ci}),n.d(e,"PostSavedState",function(){return Ai}),n.d(e,"PostSchedule",function(){return di}),n.d(e,"PostScheduleCheck",function(){return Ii}),n.d(e,"PostScheduleLabel",function(){return pi}),n.d(e,"PostSticky",function(){return Ri}),n.d(e,"PostStickyCheck",function(){return Li}),n.d(e,"PostSwitchToDraftButton",function(){return xi}),n.d(e,"PostTaxonomies",function(){return Fi}),n.d(e,"PostTaxonomiesCheck",function(){return Mi}),n.d(e,"PostTextEditor",function(){return qi}),n.d(e,"PostTitle",function(){return ts}),n.d(e,"PostTrash",function(){return es}),n.d(e,"PostTrashCheck",function(){return ns}),n.d(e,"PostTypeSupportCheck",function(){return jo}),n.d(e,"PostVisibility",function(){return ui}),n.d(e,"PostVisibilityLabel",function(){return li}),n.d(e,"PostVisibilityCheck",function(){return rs}),n.d(e,"TableOfContents",function(){return as}),n.d(e,"UnsavedChangesWarning",function(){return us}),n.d(e,"WordCount",function(){return is}),n.d(e,"EditorProvider",function(){return Fs}),n.d(e,"blockAutocompleter",function(){return Lr}),n.d(e,"userAutocompleter",function(){return Rr}),n.d(e,"Autocomplete",function(){return i.Autocomplete}),n.d(e,"AlignmentToolbar",function(){return i.AlignmentToolbar}),n.d(e,"BlockAlignmentToolbar",function(){return i.BlockAlignmentToolbar}),n.d(e,"BlockControls",function(){return i.BlockControls}),n.d(e,"BlockEdit",function(){return i.BlockEdit}),n.d(e,"BlockEditorKeyboardShortcuts",function(){return i.BlockEditorKeyboardShortcuts}),n.d(e,"BlockFormatControls",function(){return i.BlockFormatControls}),n.d(e,"BlockIcon",function(){return i.BlockIcon}),n.d(e,"BlockInspector",function(){return i.BlockInspector}),n.d(e,"BlockList",function(){return i.BlockList}),n.d(e,"BlockMover",function(){return i.BlockMover}),n.d(e,"BlockNavigationDropdown",function(){return i.BlockNavigationDropdown}),n.d(e,"BlockSelectionClearer",function(){return i.BlockSelectionClearer}),n.d(e,"BlockSettingsMenu",function(){return i.BlockSettingsMenu}),n.d(e,"BlockTitle",function(){return i.BlockTitle}),n.d(e,"BlockToolbar",function(){return i.BlockToolbar}),n.d(e,"ColorPalette",function(){return i.ColorPalette}),n.d(e,"ContrastChecker",function(){return i.ContrastChecker}),n.d(e,"CopyHandler",function(){return i.CopyHandler}),n.d(e,"createCustomColorsHOC",function(){return i.createCustomColorsHOC}),n.d(e,"DefaultBlockAppender",function(){return i.DefaultBlockAppender}),n.d(e,"FontSizePicker",function(){return i.FontSizePicker}),n.d(e,"getColorClassName",function(){return i.getColorClassName}),n.d(e,"getColorObjectByAttributeValues",function(){return i.getColorObjectByAttributeValues}),n.d(e,"getColorObjectByColorValue",function(){return i.getColorObjectByColorValue}),n.d(e,"getFontSize",function(){return i.getFontSize}),n.d(e,"getFontSizeClass",function(){return i.getFontSizeClass}),n.d(e,"Inserter",function(){return i.Inserter}),n.d(e,"InnerBlocks",function(){return i.InnerBlocks}),n.d(e,"InspectorAdvancedControls",function(){return i.InspectorAdvancedControls}),n.d(e,"InspectorControls",function(){return i.InspectorControls}),n.d(e,"PanelColorSettings",function(){return i.PanelColorSettings}),n.d(e,"PlainText",function(){return i.PlainText}),n.d(e,"RichText",function(){return i.RichText}),n.d(e,"RichTextShortcut",function(){return i.RichTextShortcut}),n.d(e,"RichTextToolbarButton",function(){return i.RichTextToolbarButton}),n.d(e,"RichTextInserterItem",function(){return i.RichTextInserterItem}),n.d(e,"UnstableRichTextInputEvent",function(){return i.UnstableRichTextInputEvent}),n.d(e,"MediaPlaceholder",function(){return i.MediaPlaceholder}),n.d(e,"MediaUpload",function(){return i.MediaUpload}),n.d(e,"MediaUploadCheck",function(){return i.MediaUploadCheck}),n.d(e,"MultiBlocksSwitcher",function(){return i.MultiBlocksSwitcher}),n.d(e,"MultiSelectScrollIntoView",function(){return i.MultiSelectScrollIntoView}),n.d(e,"NavigableToolbar",function(){return i.NavigableToolbar}),n.d(e,"ObserveTyping",function(){return i.ObserveTyping}),n.d(e,"PreserveScrollInReorder",function(){return i.PreserveScrollInReorder}),n.d(e,"SkipToSelectedBlock",function(){return i.SkipToSelectedBlock}),n.d(e,"URLInput",function(){return i.URLInput}),n.d(e,"URLInputButton",function(){return i.URLInputButton}),n.d(e,"URLPopover",function(){return i.URLPopover}),n.d(e,"Warning",function(){return i.Warning}),n.d(e,"WritingFlow",function(){return i.WritingFlow}),n.d(e,"withColorContext",function(){return i.withColorContext}),n.d(e,"withColors",function(){return i.withColors}),n.d(e,"withFontSizes",function(){return i.withFontSizes}),n.d(e,"mediaUpload",function(){return Us}),n.d(e,"cleanForSlug",function(){return Yo}),n.d(e,"transformStyles",function(){return Is})},37:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,"a",function(){return r})},38:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(e,"a",function(){return r})},4:function(t,e){!function(){t.exports=this.wp.components}()},40:function(t,e){!function(){t.exports=this.wp.viewport}()},41:function(t,e,n){t.exports=function(t,e){var n,r,o,i=0;function s(){var e,s,a=r,c=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(55),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},55:function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=y;var d="suspendedStart",p="suspendedYield",h="executing",f="completed",b={},m={};m[s]=function(){return this};var v=Object.getPrototypeOf,O=v&&v(v(B([])));O&&O!==r&&o.call(O,s)&&(m=O);var g=E.prototype=_.prototype=Object.create(m);k.prototype=g.constructor=E,E.constructor=k,E[c]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},S(P.prototype),P.prototype[a]=function(){return this},l.AsyncIterator=P,l.async=function(t,e,n,r){var o=new P(y(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(g),g[c]="Generator",g[s]=function(){return this},g.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=B,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:B(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),b}}}function y(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),s=new x(r||[]);return i._invoke=function(t,e,n){var r=d;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===b)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=j(t,e,n);if("normal"===c.type){if(r=n.done?f:p,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=f,n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function j(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function k(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function P(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,s){var a=j(t[n],t,r);if("throw"!==a.type){var c=a.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,s)})}s(a.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,w(t,e),"throw"===e.method))return b;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var o=j(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,b;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,b):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function B(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),d=["%","/","?",";","#"].concat(l),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=n(120);function g(t,e,n){if(t&&o.isObject(t)&&t instanceof i)return t;var r=new i;return r.parse(t,e,n),r}i.prototype.parse=function(t,e,n){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i127?I+="x":I+=A[L];if(!I.match(h)){var N=x.slice(0,w),U=x.slice(w+1),D=A.match(f);D&&(N.push(D[1]),U.unshift(D[2])),U.length&&(g="/"+U.join(".")+g),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[_])for(w=0,B=l.length;w0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=t.search,n.query=t.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],P=(n.host||t.host||k.length>1)&&("."===S||".."===S)||""===S,w=0,T=k.length;T>=0;T--)"."===(S=k[T])?k.splice(T,1):".."===S?(k.splice(T,1),w++):w&&(k.splice(T,1),w--);if(!j&&!_)for(;w--;w)k.unshift("..");!j||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),P&&"/"!==k.join("/").substr(-1)&&k.push("");var C,x=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=x?"":k.length?k.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(j=j||n.host&&k.length)&&!x&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},89:function(t,e,n){"use strict";var r=n(90);function o(){}t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){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 e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=o,n.PropTypes=n,n}},9:function(t,e,n){"use strict";function r(t,e){for(var n=0;n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",function(){return r})},227:function(t,e){var n=t.exports=function(t){return new r(t)};function r(t){this.value=t}function o(t,e,n){var r=[],o=[],a=!0;return function t(d){var p=n?i(d):d,h={},f=!0,b={node:p,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){b.isRoot||(b.parent.node[b.key]=t),b.node=t,e&&(f=!1)},delete:function(t){delete b.parent.node[b.key],t&&(f=!1)},remove:function(t){c(b.parent.node)?b.parent.node.splice(b.key,1):delete b.parent.node[b.key],t&&(f=!1)},keys:null,before:function(t){h.before=t},after:function(t){h.after=t},pre:function(t){h.pre=t},post:function(t){h.post=t},stop:function(){a=!1},block:function(){f=!1}};if(!a)return b;function m(){if("object"==typeof b.node&&null!==b.node){b.keys&&b.node_===b.node||(b.keys=s(b.node)),b.isLeaf=0==b.keys.length;for(var t=0;t=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["optimist"])}}return{optimist:a,innerState:t}}t.exports=function(t){function e(e,n,o){return e.length&&(e=e.concat([{action:o}])),u(n=t(n,o),o),r({optimist:e},n)}return function(n,a){if(a.optimist)switch(a.optimist.type){case o:return function(e,n){var o=l(e),i=o.optimist,s=o.innerState;return i=i.concat([{beforeState:s,action:n}]),u(s=t(s,n),n),r({optimist:i},s)}(n,a);case i:return function(t,n){var r=l(t),o=r.optimist,i=r.innerState,s=[],a=!1,u=!1;o.forEach(function(t){a?t.beforeState&&c(t.action,n.optimist.id)?(u=!0,s.push({action:t.action})):s.push(t):t.beforeState&&!c(t.action,n.optimist.id)?(a=!0,s.push(t)):t.beforeState&&c(t.action,n.optimist.id)&&(u=!0)}),u||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist');return e(o=s,i,n)}(n,a);case s:return function(n,r){var o=l(n),i=o.optimist,s=o.innerState,a=[],d=!1,p=!1,h=s;i.forEach(function(e){e.beforeState&&c(e.action,r.optimist.id)&&(h=e.beforeState,p=!0),c(e.action,r.optimist.id)||(e.beforeState&&(d=!0),d&&(p&&e.beforeState?a.push({beforeState:h,action:e.action}):a.push(e)),p&&(h=t(h,e.action),u(s,r)))}),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist');return e(i=a,h,r)}(n,a)}var d=l(n),p=d.optimist,h=d.innerState;if(n&&!p.length){var f=t(h,a);return f===h?n:(u(f,a),r({optimist:p},f))}return e(p,h,a)}},t.exports.BEGIN=o,t.exports.COMMIT=i,t.exports.REVERT=s},35:function(t,e){!function(){t.exports=this.wp.blob}()},358:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"setupEditor",function(){return it}),n.d(r,"resetPost",function(){return st}),n.d(r,"resetAutosave",function(){return at}),n.d(r,"__experimentalRequestPostUpdateStart",function(){return ct}),n.d(r,"__experimentalRequestPostUpdateSuccess",function(){return ut}),n.d(r,"__experimentalRequestPostUpdateFailure",function(){return lt}),n.d(r,"updatePost",function(){return dt}),n.d(r,"setupEditorState",function(){return pt}),n.d(r,"editPost",function(){return ht}),n.d(r,"__experimentalOptimisticUpdatePost",function(){return ft}),n.d(r,"savePost",function(){return bt}),n.d(r,"refreshPost",function(){return mt}),n.d(r,"trashPost",function(){return vt}),n.d(r,"autosave",function(){return Ot}),n.d(r,"redo",function(){return gt}),n.d(r,"undo",function(){return yt}),n.d(r,"createUndoLevel",function(){return jt}),n.d(r,"updatePostLock",function(){return _t}),n.d(r,"__experimentalFetchReusableBlocks",function(){return kt}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return Et}),n.d(r,"__experimentalSaveReusableBlock",function(){return St}),n.d(r,"__experimentalDeleteReusableBlock",function(){return Pt}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return wt}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Tt}),n.d(r,"__experimentalConvertBlockToReusable",function(){return Ct}),n.d(r,"enablePublishSidebar",function(){return xt}),n.d(r,"disablePublishSidebar",function(){return Bt}),n.d(r,"lockPostSaving",function(){return At}),n.d(r,"unlockPostSaving",function(){return It}),n.d(r,"resetEditorBlocks",function(){return Lt}),n.d(r,"updateEditorSettings",function(){return Rt}),n.d(r,"resetBlocks",function(){return Ut}),n.d(r,"receiveBlocks",function(){return Dt}),n.d(r,"updateBlock",function(){return Ft}),n.d(r,"updateBlockAttributes",function(){return Mt}),n.d(r,"selectBlock",function(){return Vt}),n.d(r,"startMultiSelect",function(){return zt}),n.d(r,"stopMultiSelect",function(){return Kt}),n.d(r,"multiSelect",function(){return qt}),n.d(r,"clearSelectedBlock",function(){return Wt}),n.d(r,"toggleSelection",function(){return Ht}),n.d(r,"replaceBlocks",function(){return Gt}),n.d(r,"replaceBlock",function(){return Qt}),n.d(r,"moveBlocksDown",function(){return Yt}),n.d(r,"moveBlocksUp",function(){return $t}),n.d(r,"moveBlockToPosition",function(){return Xt}),n.d(r,"insertBlock",function(){return Zt}),n.d(r,"insertBlocks",function(){return Jt}),n.d(r,"showInsertionPoint",function(){return te}),n.d(r,"hideInsertionPoint",function(){return ee}),n.d(r,"setTemplateValidity",function(){return ne}),n.d(r,"synchronizeTemplate",function(){return re}),n.d(r,"mergeBlocks",function(){return oe}),n.d(r,"removeBlocks",function(){return ie}),n.d(r,"removeBlock",function(){return se}),n.d(r,"toggleBlockMode",function(){return ae}),n.d(r,"startTyping",function(){return ce}),n.d(r,"stopTyping",function(){return ue}),n.d(r,"enterFormattedText",function(){return le}),n.d(r,"exitFormattedText",function(){return de}),n.d(r,"insertDefaultBlock",function(){return pe}),n.d(r,"updateBlockListSettings",function(){return he});var o={};n.r(o),n.d(o,"hasEditorUndo",function(){return ge}),n.d(o,"hasEditorRedo",function(){return ye}),n.d(o,"isEditedPostNew",function(){return je}),n.d(o,"hasChangedContent",function(){return _e}),n.d(o,"isEditedPostDirty",function(){return ke}),n.d(o,"isCleanNewPost",function(){return Ee}),n.d(o,"getCurrentPost",function(){return Se}),n.d(o,"getCurrentPostType",function(){return Pe}),n.d(o,"getCurrentPostId",function(){return we}),n.d(o,"getCurrentPostRevisionsCount",function(){return Te}),n.d(o,"getCurrentPostLastRevisionId",function(){return Ce}),n.d(o,"getPostEdits",function(){return xe}),n.d(o,"getReferenceByDistinctEdits",function(){return Be}),n.d(o,"getCurrentPostAttribute",function(){return Ae}),n.d(o,"getEditedPostAttribute",function(){return Le}),n.d(o,"getAutosaveAttribute",function(){return Re}),n.d(o,"getEditedPostVisibility",function(){return Ne}),n.d(o,"isCurrentPostPending",function(){return Ue}),n.d(o,"isCurrentPostPublished",function(){return De}),n.d(o,"isCurrentPostScheduled",function(){return Fe}),n.d(o,"isEditedPostPublishable",function(){return Me}),n.d(o,"isEditedPostSaveable",function(){return Ve}),n.d(o,"isEditedPostEmpty",function(){return ze}),n.d(o,"isEditedPostAutosaveable",function(){return Ke}),n.d(o,"getAutosave",function(){return qe}),n.d(o,"hasAutosave",function(){return We}),n.d(o,"isEditedPostBeingScheduled",function(){return He}),n.d(o,"isEditedPostDateFloating",function(){return Ge}),n.d(o,"isSavingPost",function(){return Qe}),n.d(o,"didPostSaveRequestSucceed",function(){return Ye}),n.d(o,"didPostSaveRequestFail",function(){return $e}),n.d(o,"isAutosavingPost",function(){return Xe}),n.d(o,"isPreviewingPost",function(){return Ze}),n.d(o,"getEditedPostPreviewLink",function(){return Je}),n.d(o,"getSuggestedPostFormat",function(){return tn}),n.d(o,"getBlocksForSerialization",function(){return en}),n.d(o,"getEditedPostContent",function(){return nn}),n.d(o,"__experimentalGetReusableBlock",function(){return rn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return on}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return sn}),n.d(o,"__experimentalGetReusableBlocks",function(){return an}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return cn}),n.d(o,"isPublishingPost",function(){return un}),n.d(o,"isPermalinkEditable",function(){return ln}),n.d(o,"getPermalink",function(){return dn}),n.d(o,"getPermalinkParts",function(){return pn}),n.d(o,"inSomeHistory",function(){return hn}),n.d(o,"isPostLocked",function(){return fn}),n.d(o,"isPostSavingLocked",function(){return bn}),n.d(o,"isPostLockTakeover",function(){return mn}),n.d(o,"getPostLockUser",function(){return vn}),n.d(o,"getActivePostLock",function(){return On}),n.d(o,"canUserUseUnfilteredHTML",function(){return gn}),n.d(o,"isPublishSidebarEnabled",function(){return yn}),n.d(o,"getEditorBlocks",function(){return jn}),n.d(o,"__unstableIsEditorReady",function(){return _n}),n.d(o,"getEditorSettings",function(){return kn}),n.d(o,"getBlockDependantsCacheBust",function(){return Sn}),n.d(o,"getBlockName",function(){return Pn}),n.d(o,"isBlockValid",function(){return wn}),n.d(o,"getBlockAttributes",function(){return Tn}),n.d(o,"getBlock",function(){return Cn}),n.d(o,"getBlocks",function(){return xn}),n.d(o,"__unstableGetBlockWithoutInnerBlocks",function(){return Bn}),n.d(o,"getClientIdsOfDescendants",function(){return An}),n.d(o,"getClientIdsWithDescendants",function(){return In}),n.d(o,"getGlobalBlockCount",function(){return Ln}),n.d(o,"getBlocksByClientId",function(){return Rn}),n.d(o,"getBlockCount",function(){return Nn}),n.d(o,"getBlockSelectionStart",function(){return Un}),n.d(o,"getBlockSelectionEnd",function(){return Dn}),n.d(o,"getSelectedBlockCount",function(){return Fn}),n.d(o,"hasSelectedBlock",function(){return Mn}),n.d(o,"getSelectedBlockClientId",function(){return Vn}),n.d(o,"getSelectedBlock",function(){return zn}),n.d(o,"getBlockRootClientId",function(){return Kn}),n.d(o,"getBlockHierarchyRootClientId",function(){return qn}),n.d(o,"getAdjacentBlockClientId",function(){return Wn}),n.d(o,"getPreviousBlockClientId",function(){return Hn}),n.d(o,"getNextBlockClientId",function(){return Gn}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Qn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Yn}),n.d(o,"getMultiSelectedBlocks",function(){return $n}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return Xn}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return Zn}),n.d(o,"isFirstMultiSelectedBlock",function(){return Jn}),n.d(o,"isBlockMultiSelected",function(){return tr}),n.d(o,"isAncestorMultiSelected",function(){return er}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return nr}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return rr}),n.d(o,"getBlockOrder",function(){return or}),n.d(o,"getBlockIndex",function(){return ir}),n.d(o,"isBlockSelected",function(){return sr}),n.d(o,"hasSelectedInnerBlock",function(){return ar}),n.d(o,"isBlockWithinSelection",function(){return cr}),n.d(o,"hasMultiSelection",function(){return ur}),n.d(o,"isMultiSelecting",function(){return lr}),n.d(o,"isSelectionEnabled",function(){return dr}),n.d(o,"getBlockMode",function(){return pr}),n.d(o,"isTyping",function(){return hr}),n.d(o,"isCaretWithinFormattedText",function(){return fr}),n.d(o,"getBlockInsertionPoint",function(){return br}),n.d(o,"isBlockInsertionPointVisible",function(){return mr}),n.d(o,"isValidTemplate",function(){return vr}),n.d(o,"getTemplate",function(){return Or}),n.d(o,"getTemplateLock",function(){return gr}),n.d(o,"canInsertBlockType",function(){return yr}),n.d(o,"getInserterItems",function(){return jr}),n.d(o,"hasInserterItems",function(){return _r}),n.d(o,"getBlockListSettings",function(){return kr});var i=n(8),s=n(14),a=(n(72),n(133),n(60)),c=n(20),u=n(40),l=n(5),d=n(28),p=n(15),h=n(7),f=n(32),b=n(62),m=n.n(b),v=n(2),O=n(25),g={isPublishSidebarEnabled:!0},y={},j=Object(h.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,enableCustomFields:!1}),_=new Set(["meta"]),k="core/editor",E="post-update",S="SAVE_POST_NOTICE_ID",P="TRASH_POST_NOTICE_ID",w=/%(?:postname|pagename)%/,T=6e4,C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){return function(n,r){var o=e(n,r),i=void 0===n||Object(v.includes)(t.resetTypes,r.type),s=n!==o;if(!s&&!i)return n;s&&void 0!==n||(o=Object(h.a)({},o));var a=Object(v.includes)(t.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&s,o}}},x=n(17),B={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){(t=Object(h.a)({},B,t)).shouldOverwriteState=Object(v.overSome)([t.shouldOverwriteState,function(e){return Object(v.includes)(t.ignoreTypes,e.type)}]);var n={past:[],present:e(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=t,o=r.resetTypes,i=void 0===o?[]:o,s=r.shouldOverwriteState,a=void 0===s?function(){return!1}:s;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=t.past,s=t.present,c=t.future,u=t.lastAction,l=t.shouldCreateUndoLevel,d=u;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[s].concat(Object(x.a)(c)),lastAction:null,shouldCreateUndoLevel:!1}:t;case"REDO":return c.length?{past:[].concat(Object(x.a)(o),[s]),present:Object(v.first)(c),future:Object(v.drop)(c),lastAction:null,shouldCreateUndoLevel:!1}:t;case"CREATE_UNDO_LEVEL":return Object(h.a)({},t,{lastAction:null,shouldCreateUndoLevel:!0})}var p=e(s,r);if(Object(v.includes)(i,r.type))return{past:[],present:p,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(s===p)return t;var f=o,b=d;return!l&&o.length&&a(r,d)||(f=[].concat(Object(x.a)(o),[s]),b=r),{past:f,present:p,future:[],shouldCreateUndoLevel:!1,lastAction:b}}}};function I(t){return t&&"object"===Object(f.a)(t)&&"raw"in t?t.raw:t}function L(t,e){return t===e?Object(h.a)({},t):e}function R(t,e){return"EDIT_POST"===t.type&&(n=t.edits,r=e.edits,Object(v.isEqual)(Object(v.keys)(n),Object(v.keys)(r)));var n,r}var N=Object(v.flow)([l.combineReducers,A({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RESET_POST","UPDATE_POST"],shouldOverwriteState:function(t,e){return"RESET_EDITOR_BLOCKS"===t.type?!t.shouldCreateUndoLevel:!(!e||t.type!==e.type)&&R(t,e)}})])({blocks:C({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"]})(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{value:[]},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RESET_EDITOR_BLOCKS":return e.blocks===t.value?t:{value:e.blocks}}return t}),edits:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"EDIT_POST":return Object(v.reduce)(e.edits,function(e,n,r){return n!==t[r]&&(e=L(t,e),_.has(r)?e[r]=Object(h.a)({},e[r],n):e[r]=n),e},t);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===e.type?function(t){return e.edits[t]}:function(t){return I(e.post[t])};return Object(v.reduce)(t,function(e,r,o){return Object(v.isEqual)(r,n(o))?(delete(e=L(t,e))[o],e):e},t);case"RESET_EDITOR_BLOCKS":return"content"in t?Object(v.omit)(t,"content"):t}return t}});var U=Object(l.combineReducers)({data:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(v.reduce)(e.results,function(e,n){var r=n.reusableBlock,o=r.id,i=r.title,s={clientId:n.parsedBlock.clientId,title:i};return Object(v.isEqual)(e[o],s)||((e=L(t,e))[o]=s),e},t);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=e.id,r=e.title;return t[n]&&t[n].title!==r?Object(h.a)({},t,Object(p.a)({},n,Object(h.a)({},t[n],{title:r}))):t;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=e.id,i=e.updatedId;if(o===i)return t;var s=t[o];return Object(h.a)({},Object(v.omit)(t,o),Object(p.a)({},i,s));case"REMOVE_REUSABLE_BLOCK":var a=e.id;return Object(v.omit)(t,a)}return t},isFetching:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"FETCH_REUSABLE_BLOCKS":var n=e.id;return n?Object(h.a)({},t,Object(p.a)({},n,!0)):t;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=e.id;return Object(v.omit)(t,r)}return t},isSaving:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SAVE_REUSABLE_BLOCK":return Object(h.a)({},t,Object(p.a)({},e.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=e.id;return Object(v.omit)(t,n)}return t}});var D=m()(Object(l.combineReducers)({editor:N,initialEdits:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SETUP_EDITOR":if(!e.edits)break;return e.edits;case"SETUP_EDITOR_STATE":return"content"in t?Object(v.omit)(t,"content"):t;case"UPDATE_POST":return Object(v.reduce)(e.edits,function(e,n,r){return e.hasOwnProperty(r)?(delete(e=L(t,e))[r],e):e},t);case"RESET_POST":return y}return t},currentPost:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(e.post)n=e.post;else{if(!e.edits)return t;n=Object(h.a)({},t,e.edits)}return Object(v.mapValues)(n,I)}return t},preferences:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;switch((arguments.length>1?arguments[1]:void 0).type){case"ENABLE_PUBLISH_SIDEBAR":return Object(h.a)({},t,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(h.a)({},t,{isPublishSidebarEnabled:!1})}return t},saving:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,options:e.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:e.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:e.error,options:e.options||{}}}return t},postLock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UPDATE_POST_LOCK":return e.lock}return t},reusableBlocks:U,template:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_TEMPLATE_VALIDITY":return Object(h.a)({},t,{isValid:e.isValid})}return t},autosave:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"RESET_AUTOSAVE":var n=e.post,r=["title","excerpt","content"].map(function(t){return I(n[t])}),o=Object(d.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2]}}return t},previewLink:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"REQUEST_POST_UPDATE_SUCCESS":return e.post.preview_link?e.post.preview_link:e.post.link?Object(O.addQueryArgs)(e.post.link,{preview:!0}):t;case"REQUEST_POST_UPDATE_START":if(t&&e.options.isPreview)return null}return t},postSavingLock:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"LOCK_POST_SAVING":return Object(h.a)({},t,Object(p.a)({},e.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(t,e.lockName)}return t},isReady:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"SETUP_EDITOR_STATE":return!0}return t},editorSettings:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UPDATE_EDITOR_SETTINGS":return Object(h.a)({},t,e.settings)}return t}})),F=n(70),M=n.n(F),V=n(97),z=n.n(V),K=n(23),q=n.n(K),W=n(33),H=n.n(W);function G(t){return{type:"API_FETCH",request:t}}function Q(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",optimist:{type:b.BEGIN,id:E},options:t}}function ut(t){var e=t.previousPost,n=t.post,r=t.isRevision,o=t.options,i=t.postType;return{type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:e,post:n,optimist:{type:r?b.REVERT:b.COMMIT,id:E},options:o,postType:i}}function lt(t){var e=t.post,n=t.edits,r=t.error,o=t.options;return{type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:b.REVERT,id:E},post:e,edits:n,error:r,options:o}}function dt(t){return{type:"UPDATE_POST",edits:t}}function pt(t){return{type:"SETUP_EDITOR_STATE",post:t}}function ht(t){return{type:"EDIT_POST",edits:t}}function ft(t){return Object(h.a)({},dt(t),{optimist:{id:E}})}function bt(){var t,e,n,r,o,i,s,a,c,u,l,d,p,f,b,m=arguments;return q.a.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},O.next=3,Q(k,"isEditedPostSaveable");case 3:if(O.sent){O.next=6;break}return O.abrupt("return");case 6:return O.next=8,Q(k,"getPostEdits");case 8:return e=O.sent,(n=!!t.isAutosave)&&(e=Object(v.pick)(e,["title","content","excerpt"])),O.next=13,Q(k,"isEditedPostNew");case 13:return O.sent&&(e=Object(h.a)({status:"draft"},e)),O.next=17,Q(k,"getCurrentPost");case 17:return r=O.sent,O.next=20,Q(k,"getEditedPostContent");case 20:return o=O.sent,i=Object(h.a)({},e,{content:o,id:r.id}),O.next=24,Q(k,"getCurrentPostType");case 24:return s=O.sent,O.next=27,Y("core","getPostType",s);case 27:return a=O.sent,O.next=30,$(k,"__experimentalRequestPostUpdateStart",t);case 30:return O.next=32,$(k,"__experimentalOptimisticUpdatePost",i);case 32:if(c="/wp/v2/".concat(a.rest_base,"/").concat(r.id),u="PUT",!n){O.next=43;break}return O.next=37,Q(k,"getAutosave");case 37:l=O.sent,i=Object(h.a)({},Object(v.pick)(r,["title","content","excerpt"]),l,i),c+="/autosaves",u="POST",O.next=47;break;case 43:return O.next=45,$("core/notices","removeNotice",S);case 45:return O.next=47,$("core/notices","removeNotice","autosave-exists");case 47:return O.prev=47,O.next=50,G({path:c,method:u,data:i});case 50:return d=O.sent,p=n?"resetAutosave":"resetPost",O.next=54,$(k,p,d);case 54:return O.next=56,$(k,"__experimentalRequestPostUpdateSuccess",{previousPost:r,post:d,options:t,postType:a,isRevision:d.id!==r.id});case 56:if(!((f=J({previousPost:r,post:d,postType:a,options:t})).length>0)){O.next=60;break}return O.next=60,$.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(f)));case 60:O.next=70;break;case 62:return O.prev=62,O.t0=O.catch(47),O.next=66,$(k,"__experimentalRequestPostUpdateFailure",{post:r,edits:e,error:O.t0,options:t});case 66:if(!((b=tt({post:r,edits:e,error:O.t0})).length>0)){O.next=70;break}return O.next=70,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(b)));case 70:case"end":return O.stop()}},et,this,[[47,62]])}function mt(){var t,e,n,r;return q.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Q(k,"getCurrentPost");case 2:return t=o.sent,o.next=5,Q(k,"getCurrentPostType");case 5:return e=o.sent,o.next=8,Y("core","getPostType",e);case 8:return n=o.sent,o.next=11,G({path:"/wp/v2/".concat(n.rest_base,"/").concat(t.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,$(k,"resetPost",r);case 14:case"end":return o.stop()}},nt,this)}function vt(){var t,e,n;return q.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Q(k,"getCurrentPostType");case 2:return t=r.sent,r.next=5,Y("core","getPostType",t);case 5:return e=r.sent,r.next=8,$("core/notices","removeNotice",P);case 8:return r.prev=8,r.next=11,Q(k,"getCurrentPost");case 11:return n=r.sent,r.next=14,G({path:"/wp/v2/".concat(e.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,$(k,"resetPost",Object(h.a)({},n,{status:"trash"}));case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(Z.__)("Trashing failed"),{id:P}])));case 22:case"end":return r.stop()}var o},rt,this,[[8,18]])}function Ot(t){return q.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$(k,"savePost",Object(h.a)({isAutosave:!0},t));case 2:case"end":return e.stop()}},ot,this)}function gt(){return{type:"REDO"}}function yt(){return{type:"UNDO"}}function jt(){return{type:"CREATE_UNDO_LEVEL"}}function _t(t){return{type:"UPDATE_POST_LOCK",lock:t}}function kt(t){return{type:"FETCH_REUSABLE_BLOCKS",id:t}}function Et(t){return{type:"RECEIVE_REUSABLE_BLOCKS",results:t}}function St(t){return{type:"SAVE_REUSABLE_BLOCK",id:t}}function Pt(t){return{type:"DELETE_REUSABLE_BLOCK",id:t}}function wt(t,e){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:t,title:e}}function Tt(t){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:t}}function Ct(t){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(t)}}function xt(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Bt(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function At(t){return{type:"LOCK_POST_SAVING",lockName:t}}function It(t){return{type:"UNLOCK_POST_SAVING",lockName:t}}function Lt(t){return{type:"RESET_EDITOR_BLOCKS",blocks:t,shouldCreateUndoLevel:!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).__unstableShouldCreateUndoLevel}}function Rt(t){return{type:"UPDATE_EDITOR_SETTINGS",settings:t}}var Nt=function(t){return q.a.mark(function e(){var n,r,o,i=arguments;return q.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=i.length,r=new Array(n),o=0;o0}function ye(t){return t.editor.future.length>0}function je(t){return"auto-draft"===Se(t).status}function _e(t){return t.editor.present.blocks.isDirty||"content"in t.editor.present.edits}function ke(t){return!!_e(t)||(Object.keys(t.editor.present.edits).length>0||hn(t,ke))}function Ee(t){return!ke(t)&&je(t)}function Se(t){return t.currentPost}function Pe(t){return t.currentPost.type}function we(t){return Se(t).id||null}function Te(t){return Object(v.get)(Se(t),["_links","version-history",0,"count"],0)}function Ce(t){return Object(v.get)(Se(t),["_links","predecessor-version",0,"id"],null)}var xe=Object(be.a)(function(t){return Object(h.a)({},t.initialEdits,t.editor.present.edits)},function(t){return[t.editor.present.edits,t.initialEdits]}),Be=Object(be.a)(function(){return[]},function(t){return[t.editor]});function Ae(t,e){var n=Se(t);if(n.hasOwnProperty(e))return n[e]}var Ie=Object(be.a)(function(t,e){var n=xe(t);return n.hasOwnProperty(e)?Object(h.a)({},Ae(t,e),n[e]):Ae(t,e)},function(t,e){return[Object(v.get)(t.editor.present.edits,[e],Oe),Object(v.get)(t.currentPost,[e],Oe)]});function Le(t,e){switch(e){case"content":return nn(t)}var n=xe(t);return n.hasOwnProperty(e)?_.has(e)?Ie(t,e):n[e]:Ae(t,e)}function Re(t,e){if(!We(t))return null;var n=qe(t);return n.hasOwnProperty(e)?n[e]:void 0}function Ne(t){return"private"===Le(t,"status")?"private":Le(t,"password")?"password":"public"}function Ue(t){return"pending"===Se(t).status}function De(t){var e=Se(t);return-1!==["publish","private"].indexOf(e.status)||"future"===e.status&&!Object(me.isInTheFuture)(new Date(Number(Object(me.getDate)(e.date))-T))}function Fe(t){return"future"===Se(t).status&&!De(t)}function Me(t){var e=Se(t);return ke(t)||-1===["publish","private","future"].indexOf(e.status)}function Ve(t){return!Qe(t)&&(!!Le(t,"title")||!!Le(t,"excerpt")||!ze(t))}function ze(t){var e=t.editor.present.blocks.value;if(e.length&&!("content"in xe(t))){if(e.length>1)return!1;var n=e[0].name;if(n!==Object(s.getDefaultBlockName)()&&n!==Object(s.getFreeformContentHandlerName)())return!1}return!nn(t)}function Ke(t){if(!Ve(t))return!1;if(!We(t))return!0;if(_e(t))return!0;var e=qe(t);return["title","excerpt"].some(function(n){return e[n]!==Le(t,n)})}function qe(t){return t.autosave}function We(t){return!!qe(t)}function He(t){var e=Le(t,"date"),n=new Date(Number(Object(me.getDate)(e))-T);return Object(me.isInTheFuture)(n)}function Ge(t){var e=Le(t,"date"),n=Le(t,"modified"),r=Le(t,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&e===n}function Qe(t){return t.saving.requesting}function Ye(t){return t.saving.successful}function $e(t){return!!t.saving.error}function Xe(t){return Qe(t)&&!!t.saving.options.isAutosave}function Ze(t){return Qe(t)&&!!t.saving.options.isPreview}function Je(t){var e=Le(t,"featured_media"),n=t.previewLink;return n&&e?Object(O.addQueryArgs)(n,{_thumbnail_id:e}):n}function tn(t){var e,n=t.editor.present.blocks.value;switch(1===n.length&&(e=n[0].name),2===n.length&&"core/paragraph"===n[1].name&&(e=n[0].name),e){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}function en(t){var e=t.editor.present.blocks.value;return 1===e.length&&Object(s.isUnmodifiedDefaultBlock)(e[0])?[]:e}var nn=Object(be.a)(function(t){var e=xe(t);if("content"in e)return e.content;var n=en(t),r=Object(s.serialize)(n);return 1===n.length&&n[0].name===Object(s.getFreeformContentHandlerName)()?Object(ve.removep)(r):r},function(t){return[t.editor.present.blocks.value,t.editor.present.edits.content,t.initialEdits.content]}),rn=Object(be.a)(function(t,e){var n=t.reusableBlocks.data[e];if(!n)return null;var r=isNaN(parseInt(e));return Object(h.a)({},n,{id:r?e:+e,isTemporary:r})},function(t,e){return[t.reusableBlocks.data[e]]});function on(t,e){return t.reusableBlocks.isSaving[e]||!1}function sn(t,e){return!!t.reusableBlocks.isFetching[e]}var an=Object(be.a)(function(t){return Object(v.map)(t.reusableBlocks.data,function(e,n){return rn(t,n)})},function(t){return[t.reusableBlocks.data]});function cn(t,e){var n=Object(v.find)(t.optimist,function(t){return t.beforeState&&Object(v.get)(t.action,["optimist","id"])===e});return n?n.beforeState:null}function un(t){if(!Qe(t))return!1;if(!De(t))return!1;var e=cn(t,E);return!!e&&!De(e)}function ln(t){var e=Le(t,"permalink_template");return w.test(e)}function dn(t){var e=pn(t);if(!e)return null;var n=e.prefix,r=e.postName,o=e.suffix;return ln(t)?n+r+o:n}function pn(t){var e=Le(t,"permalink_template");if(!e)return null;var n=Le(t,"slug")||Le(t,"generated_slug"),r=e.split(w),o=Object(d.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function hn(t,e){var n=t.optimist;return!!n&&n.some(function(t){var n=t.beforeState;return n&&e(n)})}function fn(t){return t.postLock.isLocked}function bn(t){return Object.keys(t.postSavingLock).length>0}function mn(t){return t.postLock.isTakeover}function vn(t){return t.postLock.user}function On(t){return t.postLock.activePostLock}function gn(t){return Object(v.has)(Se(t),["_links","wp:action-unfiltered-html"])}function yn(t){return t.preferences.hasOwnProperty("isPublishSidebarEnabled")?t.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function jn(t){return t.editor.present.blocks.value}function _n(t){return t.isReady}function kn(t){return t.editorSettings}function En(t){return Object(l.createRegistrySelector)(function(e){return function(n){for(var r,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s0&&void 0!==arguments[0]?arguments[0]:{},e=t.getBlockInsertionParentClientId,n=void 0===e?Ar:e,r=t.getInserterItems,o=void 0===r?Ir:r,a=t.getSelectedBlockName,c=void 0===a?Lr:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var t=c();return o(n()).filter(function(e){return t!==e.name})},getOptionKeywords:function(t){var e=t.title,n=t.keywords,r=void 0===n?[]:n;return[t.category].concat(Object(x.a)(r),[e])},getOptionLabel:function(t){var e=t.icon,n=t.title;return[Object(Br.createElement)(i.BlockIcon,{key:"icon",icon:e,showColors:!0}),n]},allowContext:function(t,e){return!(/\S/.test(t)||/\S/.test(e))},getOptionCompletion:function(t){var e=t.name,n=t.initialAttributes;return{action:"replace",value:Object(s.createBlock)(e,n)}},isOptionDisabled:function(t){return t.isDisabled}}}(),Nr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(t){var e="";return t&&(e="?search="+encodeURIComponent(t)),H()({path:"/wp/v2/users"+e})},isDebounced:!0,getOptionKeywords:function(t){return[t.slug,t.name]},getOptionLabel:function(t){return[Object(Br.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:t.avatar_urls[24]}),Object(Br.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},t.name),Object(Br.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},t.slug)]},getOptionCompletion:function(t){return"@".concat(t.slug)}},Ur=n(19),Dr=n(21),Fr=n(4),Mr=function(t){var e=t.urlQueryArgs,n=void 0===e?{}:e,r=Object(Dr.a)(t,["urlQueryArgs"]),o=Object(l.select)("core/editor").getCurrentPostId;return n=Object(h.a)({post_id:o()},n),Object(Br.createElement)(Fr.ServerSideRender,Object(Ur.a)({urlQueryArgs:n},r))},Vr=n(10),zr=n(9),Kr=n(11),qr=n(12),Wr=n(13),Hr=n(6),Gr=function(t){function e(){return Object(Vr.a)(this,e),Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.isDirty,r=e.editsReference,o=e.isAutosaveable,i=e.isAutosaving;r!==t.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&t.isAutosaving&&(this.didAutosaveForEditsReference=!0),t.isDirty===n&&t.isAutosaveable===o&&t.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(t){var e=this;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;t&&(this.pendingSave=setTimeout(function(){return e.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),e}(Br.Component),Qr=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostDirty,r=e.isEditedPostAutosaveable,o=e.getReferenceByDistinctEdits,i=e.isAutosavingPost,s=t("core/editor").getEditorSettings().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),editsReference:o(),isAutosaving:i(),autosaveInterval:s}}),Object(l.withDispatch)(function(t){return{autosave:t("core/editor").autosave}})])(Gr),Yr=n(16),$r=n.n(Yr),Xr=function(t){var e=t.children,n=t.isValid,r=t.level,o=t.path,s=void 0===o?[]:o,a=t.href,c=t.onSelect;return Object(Br.createElement)("li",{className:$r()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(Br.createElement)("a",{href:a,className:"document-outline__button",onClick:c},Object(Br.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),s.map(function(t,e){var n=t.clientId;return Object(Br.createElement)("strong",{key:e,className:"document-outline__level"},Object(Br.createElement)(i.BlockTitle,{clientId:n}))}),Object(Br.createElement)("strong",{className:"document-outline__level"},r),Object(Br.createElement)("span",{className:"document-outline__item-content"},e)))},Zr=Object(Br.createElement)("em",null,Object(Z.__)("(Empty heading)")),Jr=[Object(Br.createElement)("br",{key:"incorrect-break"}),Object(Br.createElement)("em",{key:"incorrect-message"},Object(Z.__)("(Incorrect heading level)"))],to=[Object(Br.createElement)("br",{key:"incorrect-break-h1"}),Object(Br.createElement)("em",{key:"incorrect-message-h1"},Object(Z.__)("(Your theme may already use a H1 for the post title)"))],eo=[Object(Br.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(Br.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(Z.__)("(Multiple H1 headings are not recommended)"))],no=function(t){return!t.attributes.content||0===t.attributes.content.length},ro=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/block-editor").getBlocks,n=t("core/editor").getEditedPostAttribute,r=(0,t("core").getPostType)(n("type"));return{title:n("title"),blocks:e(),isTitleSupported:Object(v.get)(r,["supports","title"],!1)}}))(function(t){var e=t.blocks,n=void 0===e?[]:e,r=t.title,o=t.onSelect,i=t.isTitleSupported,s=t.hasOutlineItemsDisabled,a=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.flatMap)(e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===e.name?Object(h.a)({},e,{path:n,level:e.attributes.level,isEmpty:no(e)}):t(e.innerBlocks,[].concat(Object(x.a)(n),[e]))})}(n);if(a.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(a,"level")[1]>1;return Object(Br.createElement)("div",{className:"document-outline"},Object(Br.createElement)("ul",null,d&&Object(Br.createElement)(Xr,{level:Object(Z.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:s},r),a.map(function(t,e){var n=t.level>u+1,r=!(t.isEmpty||n||!t.level||1===t.level&&(p||d));return u=t.level,Object(Br.createElement)(Xr,{key:e,level:"H".concat(t.level),isValid:r,path:t.path,isDisabled:s,href:"#block-".concat(t.clientId),onSelect:o},t.isEmpty?Zr:Object(c.getTextContent)(Object(c.create)({html:t.attributes.content})),n&&Jr,1===t.level&&p&&eo,d&&1===t.level&&!p&&to)})))});var oo=Object(l.withSelect)(function(t){return{blocks:t("core/block-editor").getBlocks()}})(function(t){var e=t.blocks,n=t.children;return Object(v.filter)(e,function(t){return"core/heading"===t.name}).length<1?null:n}),io=n(3),so=n(18),ao=n(49),co=n.n(ao);var uo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{isDirty:(0,t("core/editor").isEditedPostDirty)()}}),Object(l.withDispatch)(function(t,e,n){var r=n.select,o=t("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}})])(function(t){var e=t.onSave;return Object(Br.createElement)(Fr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.a)({},so.rawShortcut.primary("s"),function(t){t.preventDefault(),e()})})}),lo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).undoOrRedo=t.undoOrRedo.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"undoOrRedo",value:function(t){var e=this.props,n=e.onRedo,r=e.onUndo;t.shiftKey?n():r(),t.preventDefault()}},{key:"render",value:function(){var t;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(Br.createElement)(Fr.KeyboardShortcuts,{shortcuts:(t={},Object(p.a)(t,so.rawShortcut.primary("z"),this.undoOrRedo),Object(p.a)(t,so.rawShortcut.primaryShift("z"),this.undoOrRedo),t)}),Object(Br.createElement)(uo,null))}}]),e}(Br.Component),po=Object(l.withDispatch)(function(t){var e=t("core/editor");return{onRedo:e.redo,onUndo:e.undo}})(lo),ho=po;function fo(){return co()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(Br.createElement)(po,null)}function bo(){return Object(Br.createElement)(uo,null)}var mo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{hasRedo:t("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(t){return{redo:t("core/editor").redo}})])(function(t){var e=t.hasRedo,n=t.redo;return Object(Br.createElement)(Fr.IconButton,{icon:"redo",label:Object(Z.__)("Redo"),shortcut:so.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?n:void 0,className:"editor-history__redo"})});var vo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{hasUndo:t("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(t){return{undo:t("core/editor").undo}})])(function(t){var e=t.hasUndo,n=t.undo;return Object(Br.createElement)(Fr.IconButton,{icon:"undo",label:Object(Z.__)("Undo"),shortcut:so.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?n:void 0,className:"editor-history__undo"})});var Oo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{isValid:t("core/block-editor").isValidTemplate()}}),Object(l.withDispatch)(function(t){var e=t("core/block-editor"),n=e.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:e.synchronizeTemplate}})])(function(t){var e=t.isValid,n=Object(Dr.a)(t,["isValid"]);return e?null:Object(Br.createElement)(Fr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Br.createElement)("p",null,Object(Z.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(Br.createElement)("div",null,Object(Br.createElement)(Fr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(Z.__)("Keep it as is")),Object(Br.createElement)(Fr.Button,{onClick:function(){window.confirm(Object(Z.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(Z.__)("Reset the template"))))});var go=Object(Hr.compose)([Object(l.withSelect)(function(t){return{notices:t("core/notices").getNotices()}}),Object(l.withDispatch)(function(t){return{onRemove:t("core/notices").removeNotice}})])(function(t){var e=t.dismissible,n=t.notices,r=Object(Dr.a)(t,["dismissible","notices"]);return void 0!==e&&(n=Object(v.filter)(n,{isDismissible:e})),Object(Br.createElement)(Fr.NoticeList,Object(Ur.a)({notices:n},r),!1!==e&&Object(Br.createElement)(Oo,null))}),yo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).reboot=t.reboot.bind(Object(io.a)(Object(io.a)(t))),t.getContent=t.getContent.bind(Object(io.a)(Object(io.a)(t))),t.state={error:null},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidCatch",value:function(t){this.setState({error:t})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(l.select)("core/editor").getEditedPostContent()}catch(t){}}},{key:"render",value:function(){var t=this.state.error;return t?Object(Br.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(Br.createElement)(Fr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(Z.__)("Attempt Recovery")),Object(Br.createElement)(Fr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(Z.__)("Copy Post Text")),Object(Br.createElement)(Fr.ClipboardButton,{key:"copy-error",text:t.stack,isLarge:!0},Object(Z.__)("Copy Error"))]},Object(Z.__)("The editor has encountered an unexpected error.")):this.props.children}}]),e}(Br.Component);var jo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getEditorSettings,o=t("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(t){var e=t.availableTemplates,n=t.postType,r=t.children;return!Object(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(e)?null:r});var _o=Object(l.withSelect)(function(t){var e=t("core/editor").getEditedPostAttribute;return{postType:(0,t("core").getPostType)(e("type"))}})(function(t){var e=t.postType,n=t.children,r=t.supportKeys,o=!0;return e&&(o=Object(v.some)(Object(v.castArray)(r),function(t){return!!e.supports[t]})),o?n:null}),ko=Object(Hr.withState)({orderInput:null})(function(t){var e=t.onUpdateOrder,n=t.order,r=void 0===n?0:n,o=t.orderInput,i=t.setState,s=null===o?r:o;return Object(Br.createElement)(Fr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(Z.__)("Order"),value:s,onChange:function(t){i({orderInput:t});var n=Number(t);Number.isInteger(n)&&""!==Object(v.invoke)(t,["trim"])&&e(Number(t))},size:6,onBlur:function(){i({orderInput:null})}})});var Eo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{order:t("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(t){return{onUpdateOrder:function(e){t("core/editor").editPost({menu_order:e})}}})])(function(t){return Object(Br.createElement)(_o,{supportKeys:"page-attributes"},Object(Br.createElement)(ko,t))});function So(t){var e=t.map(function(t){return Object(h.a)({children:[],parent:null},t)}),n=Object(v.groupBy)(e,"parent");if(n.null&&n.null.length)return e;return function t(e){return e.map(function(e){var r=n[e.id];return Object(h.a)({},e,{children:r&&r.length?t(r):[]})})}(n[0]||[])}var Po=Object(l.withSelect)(function(t){var e=t("core"),n=e.getPostType,r=e.getEntityRecords,o=t("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,a=s("type"),c=n(a),u=i(),l=Object(v.get)(c,["hierarchical"],!1),d={per_page:-1,exclude:u,parent_exclude:u,orderby:"menu_order",order:"asc"};return{parent:s("parent"),items:l?r("postType",a,d):[],postType:c}}),wo=Object(l.withDispatch)(function(t){var e=t("core/editor").editPost;return{onUpdateParent:function(t){e({parent:t||0})}}}),To=Object(Hr.compose)([Po,wo])(function(t){var e=t.parent,n=t.postType,r=t.items,o=t.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),s=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!s||!a.length)return null;var c=So(a.map(function(t){return{id:t.id,parent:t.parent,name:t.title.raw?t.title.raw:"#".concat(t.id," (").concat(Object(Z.__)("no title"),")")}}));return Object(Br.createElement)(Fr.TreeSelect,{className:"editor-page-attributes__parent",label:s,noOptionLabel:"(".concat(Object(Z.__)("no parent"),")"),tree:c,selectedId:e,onChange:o})});var Co=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=(0,e.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.withDispatch)(function(t){return{onUpdate:function(e){t("core/editor").editPost({template:e||""})}}}))(function(t){var e=t.availableTemplates,n=t.selectedTemplate,r=t.onUpdate;return Object(v.isEmpty)(e)?null:Object(Br.createElement)(Fr.SelectControl,{label:Object(Z.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(e,function(t,e){return{value:e,label:t}})})});var xo=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(e,["_links","wp:action-assign-author"],!1),postType:t("core/editor").getCurrentPostType(),authors:t("core").getAuthors()}}),Hr.withInstanceId])(function(t){var e=t.hasAssignAuthorAction,n=t.authors,r=t.children;return!e||n.length<2?null:Object(Br.createElement)(_o,{supportKeys:"author"},r)}),Bo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).setAuthorId=t.setAuthorId.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"setAuthorId",value:function(t){var e=this.props.onUpdateAuthor,n=t.target.value;e(Number(n))}},{key:"render",value:function(){var t=this.props,e=t.postAuthor,n=t.instanceId,r=t.authors,o="post-author-selector-"+n;return Object(Br.createElement)(xo,null,Object(Br.createElement)("label",{htmlFor:o},Object(Z.__)("Author")),Object(Br.createElement)("select",{id:o,value:e,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(t){return Object(Br.createElement)("option",{key:t.id,value:t.id},t.name)})))}}]),e}(Br.Component),Ao=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postAuthor:t("core/editor").getEditedPostAttribute("author"),authors:t("core").getAuthors()}}),Object(l.withDispatch)(function(t){return{onUpdateAuthor:function(e){t("core/editor").editPost({author:e})}}}),Hr.withInstanceId])(Bo);var Io=Object(Hr.compose)([Object(l.withSelect)(function(t){return{commentStatus:t("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(function(t){var e=t.commentStatus,n=void 0===e?"open":e,r=Object(Dr.a)(t,["commentStatus"]);return Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Lo=Object(Hr.compose)([Object(l.withSelect)(function(t){return{excerpt:t("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(t){return{onUpdateExcerpt:function(e){t("core/editor").editPost({excerpt:e})}}})])(function(t){var e=t.excerpt,n=t.onUpdateExcerpt;return Object(Br.createElement)("div",{className:"editor-post-excerpt"},Object(Br.createElement)(Fr.TextareaControl,{label:Object(Z.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(t){return n(t)},value:e}),Object(Br.createElement)(Fr.ExternalLink,{href:Object(Z.__)("https://codex.wordpress.org/Excerpt")},Object(Z.__)("Learn more about manual excerpts")))});var Ro=function(t){return Object(Br.createElement)(_o,Object(Ur.a)({},t,{supportKeys:"excerpt"}))};var No=Object(l.withSelect)(function(t){var e=t("core").getThemeSupports;return{postType:(0,t("core/editor").getEditedPostAttribute)("type"),themeSupports:e()}})(function(t){var e=t.themeSupports,n=t.children,r=t.postType,o=t.supportKeys;return Object(v.some)(Object(v.castArray)(o),function(t){var n=Object(v.get)(e,[t],!1);return"post-thumbnails"===t&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var Uo=function(t){return Object(Br.createElement)(No,{supportKeys:"post-thumbnails"},Object(Br.createElement)(_o,Object(Ur.a)({},t,{supportKeys:"thumbnail"})))},Do=["image"],Fo=Object(Z.__)("Featured Image"),Mo=Object(Z.__)("Set featured image"),Vo=Object(Z.__)("Remove image");var zo=Object(l.withSelect)(function(t){var e=t("core"),n=e.getMedia,r=e.getPostType,o=t("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,a=s("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(s("type")),featuredImageId:a}}),Ko=Object(l.withDispatch)(function(t){var e=t("core/editor").editPost;return{onUpdateImage:function(t){e({featured_media:t.id})},onRemoveImage:function(){e({featured_media:0})}}}),qo=Object(Hr.compose)(zo,Ko,Object(Fr.withFilters)("editor.PostFeaturedImage"))(function(t){var e,n,r,o=t.currentPostId,s=t.featuredImageId,a=t.onUpdateImage,c=t.onRemoveImage,u=t.media,l=t.postType,d=Object(v.get)(l,["labels"],{}),p=Object(Br.createElement)("p",null,Object(Z.__)("To edit the featured image, you need permission to upload media."));if(u){var h=Object(xr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",u.id,o);Object(v.has)(u,["media_details","sizes",h])?(e=u.media_details.sizes[h].width,n=u.media_details.sizes[h].height,r=u.media_details.sizes[h].source_url):(e=u.media_details.width,n=u.media_details.height,r=u.source_url)}return Object(Br.createElement)(Uo,null,Object(Br.createElement)("div",{className:"editor-post-featured-image"},Object(Br.createElement)(i.MediaUploadCheck,{fallback:p},Object(Br.createElement)(i.MediaUpload,{title:d.featured_image||Fo,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(t){var o=t.open;return Object(Br.createElement)(Fr.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":s?Object(Z.__)("Edit or update the image"):null},!!s&&u&&Object(Br.createElement)(Fr.ResponsiveWrapper,{naturalWidth:e,naturalHeight:n},Object(Br.createElement)("img",{src:r,alt:""})),!!s&&!u&&Object(Br.createElement)(Fr.Spinner,null),!s&&(d.set_featured_image||Mo))},value:s})),!!s&&u&&!u.isLoading&&Object(Br.createElement)(i.MediaUploadCheck,null,Object(Br.createElement)(i.MediaUpload,{title:d.featured_image||Fo,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(t){var e=t.open;return Object(Br.createElement)(Fr.Button,{onClick:e,isDefault:!0,isLarge:!0},Object(Z.__)("Replace image"))}})),!!s&&Object(Br.createElement)(i.MediaUploadCheck,null,Object(Br.createElement)(Fr.Button,{onClick:c,isLink:!0,isDestructive:!0},d.remove_featured_image||Vo))))});var Wo=Object(l.withSelect)(function(t){return{disablePostFormats:t("core/editor").getEditorSettings().disablePostFormats}})(function(t){var e=t.disablePostFormats,n=Object(Dr.a)(t,["disablePostFormats"]);return!e&&Object(Br.createElement)(_o,Object(Ur.a)({},n,{supportKeys:"post-formats"}))}),Ho=[{id:"aside",caption:Object(Z.__)("Aside")},{id:"gallery",caption:Object(Z.__)("Gallery")},{id:"link",caption:Object(Z.__)("Link")},{id:"image",caption:Object(Z.__)("Image")},{id:"quote",caption:Object(Z.__)("Quote")},{id:"standard",caption:Object(Z.__)("Standard")},{id:"status",caption:Object(Z.__)("Status")},{id:"video",caption:Object(Z.__)("Video")},{id:"audio",caption:Object(Z.__)("Audio")},{id:"chat",caption:Object(Z.__)("Chat")}];var Go=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getSuggestedPostFormat,o=n("format"),i=t("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.withDispatch)(function(t){return{onUpdatePostFormat:function(e){t("core/editor").editPost({format:e})}}}),Hr.withInstanceId])(function(t){var e=t.onUpdatePostFormat,n=t.postFormat,r=void 0===n?"standard":n,o=t.supportedFormats,i=t.suggestedFormat,s="post-format-selector-"+t.instanceId,a=Ho.filter(function(t){return Object(v.includes)(o,t.id)}),c=Object(v.find)(a,function(t){return t.id===i});return Object(Br.createElement)(Wo,null,Object(Br.createElement)("div",{className:"editor-post-format"},Object(Br.createElement)("div",{className:"editor-post-format__content"},Object(Br.createElement)("label",{htmlFor:s},Object(Z.__)("Post Format")),Object(Br.createElement)(Fr.SelectControl,{value:r,onChange:function(t){return e(t)},id:s,options:a.map(function(t){return{label:t.caption,value:t.id}})})),c&&c.id!==r&&Object(Br.createElement)("div",{className:"editor-post-format__suggestion"},Object(Z.__)("Suggestion:")," ",Object(Br.createElement)(Fr.Button,{isLink:!0,onClick:function(){return e(c.id)}},c.caption))))});var Qo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPostLastRevisionId,r=e.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(t){var e=t.lastRevisionId,n=t.revisionsCount,r=t.children;return!e||n<2?null:Object(Br.createElement)(_o,{supportKeys:"revisions"},r)});function Yo(t,e){return Object(O.addQueryArgs)(t,e)}function $o(t){return Object(v.toLower)(Object(v.deburr)(Object(v.trim)(t.replace(/[\s\.\/_]+/g,"-"),"-")))}var Xo=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPostLastRevisionId,r=e.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(t){var e=t.lastRevisionId,n=t.revisionsCount;return Object(Br.createElement)(Qo,null,Object(Br.createElement)(Fr.IconButton,{href:Yo("revision.php",{revision:e,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(Z.sprintf)(Object(Z._n)("%d Revision","%d Revisions",n),n)))});var Zo=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).openPreviewWindow=t.openPreviewWindow.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props.previewLink;e&&!t.previewLink&&this.setPreviewWindowLink(e)}},{key:"setPreviewWindowLink",value:function(t){var e=this.previewWindow;e&&!e.closed&&(e.location=t)}},{key:"getWindowTarget",value:function(){var t=this.props.postId;return"wp-preview-".concat(t)}},{key:"openPreviewWindow",value:function(t){var e,n;(t.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),e=this.previewWindow.document,n=Object(Br.renderToString)(Object(Br.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Br.createElement)(Fr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Br.createElement)(Fr.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(Br.createElement)(Fr.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(Br.createElement)("p",null,Object(Z.__)("Generating preview…")))),n+='\n\t\t\n\t',n=Object(xr.applyFilters)("editor.PostPreview.interstitialMarkup",n),e.write(n),e.title=Object(Z.__)("Generating preview…"),e.close()):this.setPreviewWindowLink(t.target.href)}},{key:"render",value:function(){var t=this.props,e=t.previewLink,n=t.currentPostLink,r=t.isSaveable,o=e||n;return Object(Br.createElement)(Fr.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(Z._x)("Preview","imperative verb"),Object(Br.createElement)("span",{className:"screen-reader-text"},Object(Z.__)("(opens in a new tab)")),Object(Br.createElement)(a.DotTip,{tipId:"core/editor.preview"},Object(Z.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),e}(Br.Component),Jo=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.forcePreviewLink,r=e.forceIsAutosaveable,o=t("core/editor"),i=o.getCurrentPostId,s=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,c=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=t("core").getPostType,p=l(),h=d(a("type"));return{postId:i(),currentPostLink:s("link"),previewLink:void 0!==n?n:p,isSaveable:c(),isAutosaveable:r||u(),isViewable:Object(v.get)(h,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(t){return{autosave:t("core/editor").autosave,savePost:t("core/editor").savePost}}),Object(Hr.ifCondition)(function(t){return t.isViewable})])(Zo),ti=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).sendPostLock=t.sendPostLock.bind(Object(io.a)(Object(io.a)(t))),t.receivePostLock=t.receivePostLock.bind(Object(io.a)(Object(io.a)(t))),t.releasePostLock=t.releasePostLock.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){var t=this.getHookName();Object(xr.addAction)("heartbeat.send",t,this.sendPostLock),Object(xr.addAction)("heartbeat.tick",t,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var t=this.getHookName();Object(xr.removeAction)("heartbeat.send",t),Object(xr.removeAction)("heartbeat.tick",t)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(t){var e=this.props,n=e.isLocked,r=e.activePostLock,o=e.postId;n||(t["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(t){if(t["wp-refresh-post-lock"]){var e=this.props,n=e.autosave,r=e.updatePostLock,o=t["wp-refresh-post-lock"];o.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&r({isLocked:!1,activePostLock:o.new_lock})}}},{key:"releasePostLock",value:function(){var t=this.props,e=t.isLocked,n=t.activePostLock,r=t.postLockUtils,o=t.postId;if(!e&&n){var i=new window.FormData;i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n);var s=new window.XMLHttpRequest;s.open("POST",r.ajaxUrl,!1),s.send(i)}}},{key:"render",value:function(){var t=this.props,e=t.user,n=t.postId,r=t.isLocked,o=t.isTakeover,i=t.postLockUtils,s=t.postType;if(!r)return null;var a=e.name,c=e.avatar,u=Object(O.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Yo("edit.php",{post_type:Object(v.get)(s,["slug"])}),d=Object(Z.__)("Exit the Editor");return Object(Br.createElement)(Fr.Modal,{title:o?Object(Z.__)("Someone else has taken over this post."):Object(Z.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!c&&Object(Br.createElement)("img",{src:c,alt:Object(Z.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(Z.sprintf)(Object(Z.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(Z.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Fr.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,a?Object(Z.sprintf)(Object(Z.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(Z.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Fr.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(Br.createElement)(Jo,null),Object(Br.createElement)(Fr.Button,{isPrimary:!0,isLarge:!0,href:u},Object(Z.__)("Take Over")))))}}]),e}(Br.Component),ei=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isPostLocked,r=e.isPostLockTakeover,o=e.getPostLockUser,i=e.getCurrentPostId,s=e.getActivePostLock,a=e.getEditedPostAttribute,c=e.getEditorSettings,u=t("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:c().postLockUtils,activePostLock:s(),postType:u(a("type"))}}),Object(l.withDispatch)(function(t){var e=t("core/editor");return{autosave:e.autosave,updatePostLock:e.updatePostLock}}),Hr.withInstanceId,Object(Hr.withGlobalEvents)({beforeunload:"releasePostLock"}))(ti);var ni=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isCurrentPostPublished,r=e.getCurrentPostType,o=e.getCurrentPost;return{hasPublishAction:Object(v.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(t){var e=t.hasPublishAction,n=t.isPublished,r=t.children;return n||!e?null:r});var ri=Object(Hr.compose)(Object(l.withSelect)(function(t){return{status:t("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(t){return{onUpdateStatus:function(e){t("core/editor").editPost({status:e})}}}))(function(t){var e=t.status,n=t.onUpdateStatus;return Object(Br.createElement)(ni,null,Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Pending Review"),checked:"pending"===e,onChange:function(){n("pending"===e?"draft":"pending")}}))});var oi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{pingStatus:t("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(function(t){var e=t.pingStatus,n=void 0===e?"open":e,r=Object(Dr.a)(t,["pingStatus"]);return Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var ii=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.forceIsSaving,r=t("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,s=r.isSavingPost,a=r.isPublishingPost,c=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||s(),isPublishing:a(),hasPublishAction:Object(v.get)(c(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}})])(function(t){var e=t.isPublished,n=t.isBeingScheduled,r=t.isSaving,o=t.isPublishing,i=t.hasPublishAction,s=t.isAutosaving;return o?Object(Z.__)("Publishing…"):e&&r&&!s?Object(Z.__)("Updating…"):n&&r&&!s?Object(Z.__)("Scheduling…"):i?e?Object(Z.__)("Update"):n?Object(Z.__)("Schedule"):Object(Z.__)("Publish"):Object(Z.__)("Submit for Review")}),si=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).call(this,t))).buttonNode=Object(Br.createRef)(),n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var t,e=this.props,n=e.forceIsDirty,r=e.forceIsSaving,o=e.hasPublishAction,i=e.isBeingScheduled,s=e.isOpen,c=e.isPostSavingLocked,u=e.isPublishable,l=e.isPublished,d=e.isSaveable,p=e.isSaving,h=e.isToggle,f=e.onSave,b=e.onStatusChange,m=e.onSubmit,O=void 0===m?v.noop:m,g=e.onToggle,y=e.visibility,j=p||r||!d||c||!u&&!n,_=l||p||r||!d||!u&&!n;t=o?i?"future":"private"===y?"private":"publish":"pending";var k={"aria-disabled":j,className:"editor-post-publish-button",isBusy:p&&l,isLarge:!0,isPrimary:!0,onClick:function(){j||(O(),b(t),f())}},E={"aria-disabled":_,"aria-expanded":s,className:"editor-post-publish-panel__toggle",isBusy:p&&l,isPrimary:!0,onClick:function(){_||g()}},S=i?Object(Z.__)("Schedule…"):Object(Z.__)("Publish…"),P=Object(Br.createElement)(ii,{forceIsSaving:r}),w=h?E:k,T=h?S:P;return Object(Br.createElement)(Fr.Button,Object(Ur.a)({ref:this.buttonNode},w),T,Object(Br.createElement)(a.DotTip,{tipId:"core/editor.publish"},Object(Z.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),e}(Br.Component),ai=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isSavingPost,r=e.isEditedPostBeingScheduled,o=e.getEditedPostVisibility,i=e.isCurrentPostPublished,s=e.isEditedPostSaveable,a=e.isEditedPostPublishable,c=e.isPostSavingLocked,u=e.getCurrentPost,l=e.getCurrentPostType;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:s(),isPostSavingLocked:c(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost;return{onStatusChange:function(t){return n({status:t})},onSave:e.savePost}})])(si),ci=[{value:"public",label:Object(Z.__)("Public"),info:Object(Z.__)("Visible to everyone.")},{value:"private",label:Object(Z.__)("Private"),info:Object(Z.__)("Only visible to site admins and editors.")},{value:"password",label:Object(Z.__)("Password Protected"),info:Object(Z.__)("Protected with a password you choose. Only those with the password can view this post.")}],ui=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).setPublic=n.setPublic.bind(Object(io.a)(Object(io.a)(n))),n.setPrivate=n.setPrivate.bind(Object(io.a)(Object(io.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(io.a)(Object(io.a)(n))),n.updatePassword=n.updatePassword.bind(Object(io.a)(Object(io.a)(n))),n.state={hasPassword:!!t.password},n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"setPublic",value:function(){var t=this.props,e=t.visibility,n=t.onUpdateVisibility,r=t.status;n("private"===e?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(Z.__)("Would you like to privately publish this post now?"))){var t=this.props,e=t.onUpdateVisibility,n=t.onSave;e("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var t=this.props,e=t.visibility,n=t.onUpdateVisibility,r=t.status;n("private"===e?"draft":r,t.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(t){var e=this.props,n=e.status;(0,e.onUpdateVisibility)(n,t.target.value)}},{key:"render",value:function(){var t=this.props,e=t.visibility,n=t.password,r=t.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===e&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===e},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(Br.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Br.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(Z.__)("Post Visibility")),ci.map(function(t){var e=t.value,n=t.label,i=t.info;return Object(Br.createElement)("div",{key:e,className:"editor-post-visibility__choice"},Object(Br.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:e,onChange:o[e].onSelect,checked:o[e].checked,id:"editor-post-".concat(e,"-").concat(r),"aria-describedby":"editor-post-".concat(e,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(Br.createElement)("label",{htmlFor:"editor-post-".concat(e,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Br.createElement)("p",{id:"editor-post-".concat(e,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(Br.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Br.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(Z.__)("Create password")),Object(Br.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(Z.__)("Use a secure password")}))]}}]),e}(Br.Component),li=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.savePost,r=e.editPost;return{onSave:n,onUpdateVisibility:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:t,password:e})}}}),Hr.withInstanceId])(ui);var di=Object(l.withSelect)(function(t){return{visibility:t("core/editor").getEditedPostVisibility()}})(function(t){var e=t.visibility;return Object(v.find)(ci,{value:e}).label});var pi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{date:t("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(t){return{onUpdateDate:function(e){t("core/editor").editPost({date:e})}}})])(function(t){var e=t.date,n=t.onUpdateDate,r=Object(me.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Br.createElement)(Fr.DateTimePicker,{key:"date-time-picker",currentDate:e,onChange:n,is12Hour:o})});var hi=Object(l.withSelect)(function(t){return{date:t("core/editor").getEditedPostAttribute("date"),isFloating:t("core/editor").isEditedPostDateFloating()}})(function(t){var e=t.date,n=t.isFloating,r=Object(me.__experimentalGetSettings)();return e&&!n?Object(me.dateI18n)(r.formats.datetimeAbbreviated,e):Object(Z.__)("Immediately")}),fi={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},bi=function(t,e){return t.toLowerCase()===e.toLowerCase()},mi=function(t){return Object(h.a)({},t,{name:Object(v.unescape)(t.name)})},vi=function(t){return Object(v.map)(t,mi)},Oi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(io.a)(Object(io.a)(t))),t.searchTerms=Object(v.throttle)(t.searchTerms.bind(Object(io.a)(Object(io.a)(t))),500),t.findOrCreateTerm=t.findOrCreateTerm.bind(Object(io.a)(Object(io.a)(t))),t.state={loading:!Object(v.isEmpty)(t.props.terms),availableTerms:[],selectedTerms:[]},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){var t=this;Object(v.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(function(){t.setState({loading:!1})},function(e){"abort"!==e.statusText&&t.setState({loading:!1})}))}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.initRequest,["abort"]),Object(v.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(t){t.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(h.a)({},fi,e),o=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(vi).then(function(e){t.setState(function(t){return{availableTerms:t.availableTerms.concat(e.filter(function(e){return!Object(v.find)(t.availableTerms,function(t){return t.id===e.id})}))}}),t.updateSelectedTerms(t.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,n){var r=Object(v.find)(t.state.availableTerms,function(t){return t.id===n});return r&&e.push(r.name),e},[]);this.setState({selectedTerms:e})}},{key:"findOrCreateTerm",value:function(t){var e=this,n=this.props.taxonomy,r=Object(v.escape)(t);return H()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch(function(o){return"term_exists"===o.code?(e.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(h.a)({},fi,{search:r}))}).then(vi),e.addRequest.then(function(e){return Object(v.find)(e,function(e){return bi(e.name,t)})})):Promise.reject(o)}).then(mi)}},{key:"onChange",value:function(t){var e=this,n=Object(v.uniqBy)(t,function(t){return t.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(t){return!Object(v.find)(e.state.availableTerms,function(e){return bi(e.name,t)})}),o=function(t,e){return t.map(function(t){return Object(v.find)(e,function(e){return bi(e.name,t)}).id})};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then(function(t){var r=e.state.availableTerms.concat(t);return e.setState({availableTerms:r}),e.props.onUpdateTerms(o(n,r),e.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(v.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:t})}},{key:"render",value:function(){var t=this.props,e=t.slug,n=t.taxonomy;if(!t.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,s=r.selectedTerms,a=i.map(function(t){return t.name}),c=Object(v.get)(n,["labels","add_new_item"],"post_tag"===e?Object(Z.__)("Add New Tag"):Object(Z.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===e?Object(Z.__)("Tag"):Object(Z.__)("Term")),l=Object(Z.sprintf)(Object(Z._x)("%s added","term"),u),d=Object(Z.sprintf)(Object(Z._x)("%s removed","term"),u),p=Object(Z.sprintf)(Object(Z._x)("Remove %s","term"),u);return Object(Br.createElement)(Fr.FormTokenField,{value:s,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:c,messages:{added:l,removed:d,remove:p}})}}]),e}(Br.Component),gi=Object(Hr.compose)(Object(l.withSelect)(function(t,e){var n=e.slug,r=t("core/editor").getCurrentPost,o=(0,t("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?t("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(t){return{onUpdateTerms:function(e,n){t("core/editor").editPost(Object(p.a)({},n,e))}}}),Object(Fr.withFilters)("editor.PostTaxonomyType"))(Oi),yi=function(){var t=[Object(Z.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Add tags"))];return Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:t},Object(Br.createElement)("p",null,Object(Z.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Br.createElement)(gi,{slug:"post_tag"}))},ji=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).call(this,t))).state={hadTagsWhenOpeningThePanel:t.hasTags},n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Br.createElement)(yi,null)}}]),e}(Br.Component),_i=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPostType(),n=t("core").getTaxonomy("post_tag"),r=n&&t("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(v.some)(n.types,function(t){return t===e}),hasTags:r&&r.length}}),Object(Hr.ifCondition)(function(t){var e=t.areTagsFetched;return t.isPostTypeSupported&&e}))(ji),ki=function(t){var e=t.suggestedPostFormat,n=t.suggestionText,r=t.onUpdatePostFormat;return Object(Br.createElement)(Fr.Button,{isLink:!0,onClick:function(){return r(e)}},n)},Ei=function(t,e){var n=Ho.filter(function(e){return Object(v.includes)(t,e.id)});return Object(v.find)(n,function(t){return t.id===e})},Si=Object(Hr.compose)(Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getSuggestedPostFormat,o=Object(v.get)(t("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Ei(o,r())}}),Object(l.withDispatch)(function(t){return{onUpdatePostFormat:function(e){t("core/editor").editPost({format:e})}}}),Object(Hr.ifCondition)(function(t){var e=t.suggestion,n=t.currentPostFormat;return e&&e.id!==n}))(function(t){var e=t.suggestion,n=t.onUpdatePostFormat,r=[Object(Z.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Use a post format"))];return Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:r},Object(Br.createElement)("p",null,Object(Z.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(Br.createElement)("p",null,Object(Br.createElement)(ki,{onUpdatePostFormat:n,suggestedPostFormat:e.id,suggestionText:Object(Z.sprintf)(Object(Z.__)('Apply the "%1$s" format.'),e.caption)})))});var Pi=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(t){var e,n,r=t.hasPublishAction,o=t.isBeingScheduled,i=t.children;return r?o?(e=Object(Z.__)("Are you ready to schedule?"),n=Object(Z.__)("Your work will be published at the specified date and time.")):(e=Object(Z.__)("Are you ready to publish?"),n=Object(Z.__)("Double-check your settings before publishing.")):(e=Object(Z.__)("Are you ready to submit for review?"),n=Object(Z.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Br.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Br.createElement)("div",null,Object(Br.createElement)("strong",null,e)),Object(Br.createElement)("p",null,n),r&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Visibility:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(di,null))]},Object(Br.createElement)(li,null)),Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Publish:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(hi,null))]},Object(Br.createElement)(pi,null)),Object(Br.createElement)(Si,null),Object(Br.createElement)(_i,null),i))}),wi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).state={showCopyConfirmation:!1},t.onCopy=t.onCopy.bind(Object(io.a)(Object(io.a)(t))),t.onSelectInput=t.onSelectInput.bind(Object(io.a)(Object(io.a)(t))),t.postLink=Object(Br.createRef)(),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var t=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){t.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(t){t.target.select()}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.isScheduled,r=t.post,o=t.postType,i=Object(v.get)(o,["labels","singular_name"]),s=Object(v.get)(o,["labels","view_item"]),a=n?Object(Br.createElement)(Br.Fragment,null,Object(Z.__)("is now scheduled. It will go live on")," ",Object(Br.createElement)(hi,null),"."):Object(Z.__)("is now live.");return Object(Br.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Br.createElement)(Fr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Br.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(Z.__)("(no title)"))," ",a),Object(Br.createElement)(Fr.PanelBody,null,Object(Br.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Br.createElement)("strong",null,Object(Z.__)("What’s next?"))),Object(Br.createElement)(Fr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(Z.sprintf)(Object(Z.__)("%s address"),i),value:Object(O.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(Br.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Br.createElement)(Fr.Button,{isDefault:!0,href:r.link},s),Object(Br.createElement)(Fr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(Z.__)("Copied!"):Object(Z.__)("Copy Link")))),e)}}]),e}(Br.Component),Ti=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.getCurrentPost,o=e.isCurrentPostScheduled,i=t("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(wi),Ci=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).onSubmit=t.onSubmit.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){t.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var t=this.props,e=t.onClose,n=t.hasPublishAction,r=t.isPostTypeViewable;n&&r||e()}},{key:"render",value:function(){var t=this.props,e=t.forceIsDirty,n=t.forceIsSaving,r=t.isBeingScheduled,o=t.isPublished,i=t.isPublishSidebarEnabled,s=t.isScheduled,a=t.isSaving,c=t.onClose,u=t.onTogglePublishSidebar,l=t.PostPublishExtension,d=t.PrePublishExtension,p=Object(Dr.a)(t,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),h=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||s&&r,b=!f&&!a,m=f&&!a;return Object(Br.createElement)("div",Object(Ur.a)({className:"editor-post-publish-panel"},h),Object(Br.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-published"},s?Object(Z.__)("Scheduled"):Object(Z.__)("Published")):Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Br.createElement)(ai,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:n}),Object(Br.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(Br.createElement)(Fr.IconButton,{"aria-expanded":!0,onClick:c,icon:"no-alt",label:Object(Z.__)("Close panel")})),Object(Br.createElement)("div",{className:"editor-post-publish-panel__content"},b&&Object(Br.createElement)(Pi,null,d&&Object(Br.createElement)(d,null)),m&&Object(Br.createElement)(Ti,{focusOnMount:!0},l&&Object(Br.createElement)(l,null)),a&&Object(Br.createElement)(Fr.Spinner,null)),Object(Br.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),e}(Br.Component),xi=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core").getPostType,n=t("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,s=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,c=n.isEditedPostDirty,u=n.isSavingPost,l=t("core/editor").isPublishSidebarEnabled,d=e(o("type"));return{hasPublishAction:Object(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:s()}}),Object(l.withDispatch)(function(t,e){var n=e.isPublishSidebarEnabled,r=t("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),Fr.withFocusReturn,Fr.withConstrainedTabbing])(Ci);var Bi=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isSavingPost,r=e.isCurrentPostPublished,o=e.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost,r=e.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(t){var e=t.isSaving,n=t.isPublished,r=t.isScheduled,o=t.onClick;return n||r?Object(Br.createElement)(Fr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var t;n?t=Object(Z.__)("Are you sure you want to unpublish this post?"):r&&(t=Object(Z.__)("Are you sure you want to unschedule this post?")),window.confirm(t)&&o()},disabled:e,isTertiary:!0},Object(Z.__)("Switch to Draft")):null}),Ai=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).state={forceSavedMessage:!1},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidUpdate",value:function(t){var e=this;t.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){e.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var t=this.props,e=t.post,n=t.isNew,r=t.isScheduled,o=t.isPublished,i=t.isDirty,s=t.isSaving,a=t.isSaveable,c=t.onSave,u=t.isAutosaving,l=t.isPending,d=t.isLargeViewport,p=this.state.forceSavedMessage;if(s){var h=$r()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(Br.createElement)("span",{className:h},Object(Br.createElement)(Fr.Dashicon,{icon:"cloud"}),u?Object(Z.__)("Autosaving"):Object(Z.__)("Saving"))}if(o||r)return Object(Br.createElement)(Bi,null);if(!a)return null;if(p||!n&&!i)return Object(Br.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Br.createElement)(Fr.Dashicon,{icon:"saved"}),Object(Z.__)("Saved"));if(!Object(v.get)(e,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(Z.__)("Save as Pending"):Object(Z.__)("Save Draft");return d?Object(Br.createElement)(Fr.Button,{className:"editor-post-save-draft",onClick:c,shortcut:so.displayShortcut.primary("s"),isTertiary:!0},f):Object(Br.createElement)(Fr.IconButton,{className:"editor-post-save-draft",label:f,onClick:c,shortcut:so.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),e}(Br.Component),Ii=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.forceIsDirty,r=e.forceIsSaving,o=t("core/editor"),i=o.isEditedPostNew,s=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,c=o.isEditedPostDirty,u=o.isSavingPost,l=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,h=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:s(),isScheduled:a(),isDirty:n||c(),isSaving:r||u(),isSaveable:l(),isAutosaving:p(),isPending:"pending"===h("status")}}),Object(l.withDispatch)(function(t){return{onSave:t("core/editor").savePost}}),Hr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"medium"})])(Ai);var Li=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(t){var e=t.hasPublishAction,n=t.children;return e?n:null});var Ri=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor").getCurrentPost();return{hasStickyAction:Object(v.get)(e,["_links","wp:action-sticky"],!1),postType:t("core/editor").getCurrentPostType()}})])(function(t){var e=t.hasStickyAction,n=t.postType,r=t.children;return"post"===n&&e?r:null});var Ni=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postSticky:t("core/editor").getEditedPostAttribute("sticky")}}),Object(l.withDispatch)(function(t){return{onUpdateSticky:function(e){t("core/editor").editPost({sticky:e})}}})])(function(t){var e=t.onUpdateSticky,n=t.postSticky,r=void 0!==n&&n;return Object(Br.createElement)(Ri,null,Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Stick to the top of the blog"),checked:r,onChange:function(){return e(!r)}}))}),Ui={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Di=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).findTerm=t.findTerm.bind(Object(io.a)(Object(io.a)(t))),t.onChange=t.onChange.bind(Object(io.a)(Object(io.a)(t))),t.onChangeFormName=t.onChangeFormName.bind(Object(io.a)(Object(io.a)(t))),t.onChangeFormParent=t.onChangeFormParent.bind(Object(io.a)(Object(io.a)(t))),t.onAddTerm=t.onAddTerm.bind(Object(io.a)(Object(io.a)(t))),t.onToggleForm=t.onToggleForm.bind(Object(io.a)(Object(io.a)(t))),t.setFilterValue=t.setFilterValue.bind(Object(io.a)(Object(io.a)(t))),t.sortBySelected=t.sortBySelected.bind(Object(io.a)(Object(io.a)(t))),t.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"onChange",value:function(t){var e=this.props,n=e.onUpdateTerms,r=e.terms,o=void 0===r?[]:r,i=e.taxonomy,s=parseInt(t.target.value,10);n(-1!==o.indexOf(s)?Object(v.without)(o,s):[].concat(Object(x.a)(o),[s]),i.rest_base)}},{key:"onChangeFormName",value:function(t){var e=""===t.target.value.trim()?"":t.target.value;this.setState({formName:e})}},{key:"onChangeFormParent",value:function(t){this.setState({formParent:t})}},{key:"onToggleForm",value:function(){this.setState(function(t){return{showForm:!t.showForm}})}},{key:"findTerm",value:function(t,e,n){return Object(v.find)(t,function(t){return(!t.parent&&!e||parseInt(t.parent)===parseInt(e))&&t.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(t){var e=this;t.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,s=n.slug,a=this.state,c=a.formName,u=a.formParent,l=a.adding,d=a.availableTerms;if(""!==c&&!l){var p=this.findTerm(d,u,c);if(p)return Object(v.some)(i,function(t){return t===p.id})||r([].concat(Object(x.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=H()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:c,parent:u||void 0}}),this.addRequest.catch(function(t){return"term_exists"===t.code?(e.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(h.a)({},Ui,{parent:u||0,search:c}))}),e.addRequest.then(function(t){return e.findTerm(t,u,c)})):Promise.reject(t)}).then(function(t){var n=!!Object(v.find)(e.state.availableTerms,function(e){return e.id===t.id})?e.state.availableTerms:[t].concat(Object(x.a)(e.state.availableTerms)),a=Object(Z.sprintf)(Object(Z._x)("%s added","term"),Object(v.get)(e.props.taxonomy,["labels","singular_name"],"category"===s?Object(Z.__)("Category"):Object(Z.__)("Term")));e.props.speak(a,"assertive"),e.addRequest=null,e.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:e.sortBySelected(So(n))}),r([].concat(Object(x.a)(i),[t.id]),o.rest_base)},function(t){"abort"!==t.statusText&&(e.addRequest=null,e.setState({adding:!1}))})}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.fetchRequest,["abort"]),Object(v.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(t){this.props.taxonomy!==t.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var t=this,e=this.props.taxonomy;e&&(this.fetchRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(e.rest_base),Ui)}),this.fetchRequest.then(function(e){var n=t.sortBySelected(So(e));t.fetchRequest=null,t.setState({loading:!1,availableTermsTree:n,availableTerms:e})},function(e){"abort"!==e.statusText&&(t.fetchRequest=null,t.setState({loading:!1}))}))}},{key:"sortBySelected",value:function(t){var e=this.props.terms,n=function t(n){return-1!==e.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(t).filter(function(t){return t}).length>0)};return t.sort(function(t,e){var r=n(t),o=n(e);return r===o?0:r&&!o?-1:!r&&o?1:0}),t}},{key:"setFilterValue",value:function(t){var e=this.state.availableTermsTree,n=t.target.value,r=e.map(this.getFilterMatcher(n)).filter(function(t){return t});this.setState({filterValue:n,filteredTermsTree:r});var o=function t(e){for(var n=0,r=0;r0&&(r.children=r.children.map(e).filter(function(t){return t})),(-1!==r.name.toLowerCase().indexOf(t)||r.children.length>0)&&r}}},{key:"renderTerms",value:function(t){var e=this,n=this.props.terms,r=void 0===n?[]:n;return t.map(function(t){var n="editor-post-taxonomies-hierarchical-term-".concat(t.id);return Object(Br.createElement)("div",{key:t.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Br.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(t.id),value:t.id,onChange:e.onChange}),Object(Br.createElement)("label",{htmlFor:n},Object(v.unescape)(t.name)),!!t.children.length&&Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},e.renderTerms(t.children)))})}},{key:"render",value:function(){var t=this.props,e=t.slug,n=t.taxonomy,r=t.instanceId,o=t.hasCreateAction;if(!t.hasAssignAction)return null;var i=this.state,s=i.availableTermsTree,a=i.availableTerms,c=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,h=i.filterValue,f=function(t,r,o){return Object(v.get)(n,["labels",t],"category"===e?r:o)},b=f("add_new_item",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),m=f("new_item_name",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),O=f("parent_item",Object(Z.__)("Parent Category"),Object(Z.__)("Parent Term")),g="— ".concat(O," —"),y=b,j="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(Z.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(Z.__)("Terms")),S=a.length>=8;return[S&&Object(Br.createElement)("label",{key:"filter-label",htmlFor:_},k),S&&Object(Br.createElement)("input",{type:"search",id:_,value:h,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==h?c:s)),!d&&o&&Object(Br.createElement)(Fr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},b),p&&Object(Br.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Br.createElement)("label",{htmlFor:j,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Br.createElement)("input",{type:"text",id:j,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Br.createElement)(Fr.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:s}),Object(Br.createElement)(Fr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},y))]}}]),e}(Br.Component),Fi=Object(Hr.compose)([Object(l.withSelect)(function(t,e){var n=e.slug,r=t("core/editor").getCurrentPost,o=(0,t("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?t("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(t){return{onUpdateTerms:function(e,n){t("core/editor").editPost(Object(p.a)({},n,e))}}}),Fr.withSpokenMessages,Hr.withInstanceId,Object(Fr.withFilters)("editor.PostTaxonomyType")])(Di);var Mi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postType:t("core/editor").getCurrentPostType(),taxonomies:t("core").getTaxonomies({per_page:-1})}})])(function(t){var e=t.postType,n=t.taxonomies,r=t.taxonomyWrapper,o=void 0===r?v.identity:r,i=Object(v.filter)(n,function(t){return Object(v.includes)(t.types,e)});return Object(v.filter)(i,function(t){return t.visibility.show_ui}).map(function(t){var e=t.hierarchical?Fi:gi;return Object(Br.createElement)(Br.Fragment,{key:"taxonomy-".concat(t.slug)},o(Object(Br.createElement)(e,{slug:t.slug}),t))})});var Vi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{postType:t("core/editor").getCurrentPostType(),taxonomies:t("core").getTaxonomies({per_page:-1})}})])(function(t){var e=t.postType,n=t.taxonomies,r=t.children;return Object(v.some)(n,function(t){return Object(v.includes)(t.types,e)})?r:null}),zi=n(61),Ki=n.n(zi),qi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).edit=t.edit.bind(Object(io.a)(Object(io.a)(t))),t.stopEditing=t.stopEditing.bind(Object(io.a)(Object(io.a)(t))),t.state={},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"edit",value:function(t){var e=t.target.value;this.props.onChange(e),this.setState({value:e,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var t=this.state.value,e=this.props.instanceId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("label",{htmlFor:"post-content-".concat(e),className:"screen-reader-text"},Object(Z.__)("Type text or HTML")),Object(Br.createElement)(Ki.a,{autoComplete:"off",dir:"auto",value:t,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(e),placeholder:Object(Z.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return e.isDirty?null:{value:t.value,isDirty:!1}}}]),e}(Br.Component),Wi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{value:(0,t("core/editor").getEditedPostContent)()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.editPost,r=e.resetEditorBlocks;return{onChange:function(t){n({content:t})},onPersist:function(t){var e=Object(s.parse)(t);r(e)}}}),Hr.withInstanceId])(qi),Hi=n(57),Gi=function(t){function e(t){var n,r=t.permalinkParts,o=t.slug;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(io.a)(Object(io.a)(n))),n}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"onSavePermalink",value:function(t){var e=$o(this.state.editedPostName);t.preventDefault(),this.props.onSave(),e!==this.props.postName&&(this.props.editPost({slug:e}),this.setState({editedPostName:e}))}},{key:"render",value:function(){var t=this,e=this.props.permalinkParts,n=e.prefix,r=e.suffix,o=this.state.editedPostName;return Object(Br.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Br.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Br.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Br.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(Z.__)("Edit post permalink"),value:o,onChange:function(e){return t.setState({editedPostName:e.target.value})},type:"text",autoFocus:!0}),Object(Br.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(Z.__)("Save")))}}]),e}(Br.Component),Qi=Object(Hr.compose)([Object(l.withSelect)(function(t){return{permalinkParts:(0,t("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(t){return{editPost:t("core/editor").editPost}})])(Gi),Yi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).addVisibilityCheck=t.addVisibilityCheck.bind(Object(io.a)(Object(io.a)(t))),t.onVisibilityChange=t.onVisibilityChange.bind(Object(io.a)(Object(io.a)(t))),t.state={isCopied:!1,isEditingPermalink:!1},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var t=this.props,e=t.isEditable,n=t.refreshPost;e||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(t,e){e.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var t=this,e=this.props,n=e.isEditable,r=e.isNew,o=e.isPublished,i=e.isViewable,s=e.permalinkParts,a=e.postLink,c=e.postSlug,u=e.postID,l=e.postTitle;if(r||!i||!s||!a)return null;var d=this.state,p=d.isCopied,h=d.isEditingPermalink,f=p?Object(Z.__)("Permalink copied"):Object(Z.__)("Copy the permalink"),b=s.prefix,m=s.suffix,v=Object(O.safeDecodeURIComponent)(c)||$o(l)||u,g=n?b+v+m:b;return Object(Br.createElement)("div",{className:"editor-post-permalink"},Object(Br.createElement)(Fr.ClipboardButton,{className:$r()("editor-post-permalink__copy",{"is-copied":p}),text:g,label:f,onCopy:function(){return t.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(Br.createElement)("span",{className:"editor-post-permalink__label"},Object(Z.__)("Permalink:")),!h&&Object(Br.createElement)(Fr.ExternalLink,{className:"editor-post-permalink__link",href:o?g:a,target:"_blank",ref:function(e){return t.linkElement=e}},Object(O.safeDecodeURI)(g),"‎"),h&&Object(Br.createElement)(Qi,{slug:v,onSave:function(){return t.setState({isEditingPermalink:!1})}}),n&&!h&&Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return t.setState({isEditingPermalink:!0})}},Object(Z.__)("Edit")),!n&&Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Yo("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(Z.__)("Change Permalinks")))}}]),e}(Br.Component),$i=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.isPermalinkEditable,o=e.getCurrentPost,i=e.getPermalinkParts,s=e.getEditedPostAttribute,a=e.isCurrentPostPublished,c=t("core").getPostType,u=o(),l=u.id,d=u.link,p=c(s("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:s("slug"),isEditable:r(),isPublished:a(),postTitle:s("title"),postID:l,isViewable:Object(v.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(t){return{refreshPost:t("core/editor").refreshPost}})])(Yi),Xi=/[\r\n]+/g,Zi=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(io.a)(Object(io.a)(t))),t.onSelect=t.onSelect.bind(Object(io.a)(Object(io.a)(t))),t.onUnselect=t.onUnselect.bind(Object(io.a)(Object(io.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(io.a)(Object(io.a)(t))),t.redirectHistory=t.redirectHistory.bind(Object(io.a)(Object(io.a)(t))),t.state={isSelected:!1},t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(t){var e=t.target.value.replace(Xi," ");this.props.onUpdate(e)}},{key:"onKeyDown",value:function(t){t.keyCode===so.ENTER&&(t.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(t){t.shiftKey?this.props.onRedo():this.props.onUndo(),t.preventDefault()}},{key:"render",value:function(){var t=this.props,e=t.hasFixedToolbar,n=t.isCleanNewPost,r=t.isFocusMode,o=t.isPostTypeViewable,i=t.instanceId,s=t.placeholder,a=t.title,c=this.state.isSelected,u=$r()("wp-block editor-post-title__block",{"is-selected":c,"is-focus-mode":r,"has-fixed-toolbar":e}),l=Object(Hi.decodeEntities)(s);return Object(Br.createElement)(_o,{supportKeys:"title"},Object(Br.createElement)("div",{className:"editor-post-title"},Object(Br.createElement)("div",{className:u},Object(Br.createElement)(Fr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(Br.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(Z.__)("Add title")),Object(Br.createElement)(Ki.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:l||Object(Z.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),c&&o&&Object(Br.createElement)($i,null))))}}]),e}(Br.Component),Ji=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getEditedPostAttribute,r=e.isCleanNewPost,o=t("core/block-editor").getSettings,i=(0,t("core").getPostType)(n("type")),s=o(),a=s.titlePlaceholder,c=s.focusMode,u=s.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),isPostTypeViewable:Object(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:c,hasFixedToolbar:u}}),ts=Object(l.withDispatch)(function(t){var e=t("core/block-editor"),n=e.insertDefaultBlock,r=e.clearSelectedBlock,o=t("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(t){i({title:t})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}}),es=Object(Hr.compose)(Ji,ts,Hr.withInstanceId,Fr.withFocusOutside)(Zi);var ns=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.getCurrentPostId,o=e.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(l.withDispatch)(function(t){return{trashPost:t("core/editor").trashPost}})])(function(t){var e=t.isNew,n=t.postId,r=t.postType,o=Object(Dr.a)(t,["isNew","postId","postType"]);return e||!n?null:Object(Br.createElement)(Fr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(Z.__)("Move to trash"))});var rs=Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.isEditedPostNew,r=e.getCurrentPostId;return{isNew:n(),postId:r()}})(function(t){var e=t.isNew,n=t.postId,r=t.children;return e||!n?null:r});var os=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.getCurrentPost,r=e.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(t){var e=t.hasPublishAction;return(0,t.render)({canEdit:e})}),is=n(98);var ss=Object(l.withSelect)(function(t){return{content:t("core/editor").getEditedPostAttribute("content")}})(function(t){var e=t.content,n=Object(Z._x)("words","Word count type. Do not translate!");return Object(Br.createElement)("span",{className:"word-count"},Object(is.count)(e,n))});var as=Object(l.withSelect)(function(t){var e=t("core/block-editor").getGlobalBlockCount;return{headingCount:e("core/heading"),paragraphCount:e("core/paragraph"),numberOfBlocks:e()}})(function(t){var e=t.headingCount,n=t.paragraphCount,r=t.numberOfBlocks,o=t.hasOutlineItemsDisabled,i=t.onRequestClose;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(Z.__)("Document Statistics"),tabIndex:"0"},Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Words"),Object(Br.createElement)(ss,null)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Headings"),Object(Br.createElement)("span",{className:"table-of-contents__number"},e)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Paragraphs"),Object(Br.createElement)("span",{className:"table-of-contents__number"},n)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Blocks"),Object(Br.createElement)("span",{className:"table-of-contents__number"},r))),e>0&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("hr",null),Object(Br.createElement)("span",{className:"table-of-contents__title"},Object(Z.__)("Document Outline")),Object(Br.createElement)(ro,{onSelect:i,hasOutlineItemsDisabled:o})))});var cs=Object(l.withSelect)(function(t){return{hasBlocks:!!t("core/block-editor").getBlockCount()}})(function(t){var e=t.hasBlocks,n=t.hasOutlineItemsDisabled;return Object(Br.createElement)(Fr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(t){var n=t.isOpen,r=t.onToggle;return Object(Br.createElement)(Fr.IconButton,{onClick:e?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(Z.__)("Content structure"),labelPosition:"bottom","aria-disabled":!e})},renderContent:function(t){var e=t.onClose;return Object(Br.createElement)(as,{onRequestClose:e,hasOutlineItemsDisabled:n})}})}),us=function(t){function e(){var t;return Object(Vr.a)(this,e),(t=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).warnIfUnsavedChanges=t.warnIfUnsavedChanges.bind(Object(io.a)(Object(io.a)(t))),t}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(t){if(this.props.isDirty)return t.returnValue=Object(Z.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue}},{key:"render",value:function(){return null}}]),e}(Br.Component),ls=Object(l.withSelect)(function(t){return{isDirty:t("core/editor").isEditedPostDirty()}})(us),ds=n(41),ps=n.n(ds),hs=n(227),fs=n.n(hs),bs=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,ms=function(t,e){e=e||{};var n=1,r=1;function o(t){var e=t.match(/\n/g);e&&(n+=e.length);var o=t.lastIndexOf("\n");r=~o?t.length-o:r+t.length}function i(){var t={line:n,column:r};return function(e){return e.position=new s(t),h(),e}}function s(t){this.start=t,this.end={line:n,column:r},this.source=e.source}s.prototype.content=t;var a=[];function c(o){var i=new Error(e.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=e.source,i.line=n,i.column=r,i.source=t,!e.silent)throw i;a.push(i)}function u(){return p(/^{\s*/)}function l(){return p(/^}/)}function d(){var e,n=[];for(h(),b(n);t.length&&"}"!==t.charAt(0)&&(e=P()||w());)!1!==e&&(n.push(e),b(n));return n}function p(e){var n=e.exec(t);if(n){var r=n[0];return o(r),t=t.slice(r.length),n}}function h(){p(/^\s*/)}function b(t){var e;for(t=t||[];e=m();)!1!==e&&t.push(e);return t}function m(){var e=i();if("/"===t.charAt(0)&&"*"===t.charAt(1)){for(var n=2;""!==t.charAt(n)&&("*"!==t.charAt(n)||"/"!==t.charAt(n+1));)++n;if(n+=2,""===t.charAt(n-1))return c("End of comment missing");var s=t.slice(2,n-2);return r+=2,o(s),t=t.slice(n),r+=2,e({type:"comment",comment:s})}}function v(){var t=p(/^([^{]+)/);if(t)return vs(t[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(t){return t.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(t){return t.replace(/\u200C/g,",")})}function O(){var t=i(),e=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=vs(e[0]),!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=t({type:"declaration",property:e.replace(bs,""),value:n?vs(n[0]).replace(bs,""):""});return p(/^[;\s]*/),r}}function g(){var t,e=[];if(!u())return c("missing '{'");for(b(e);t=O();)!1!==t&&(e.push(t),b(e));return l()?e:c("missing '}'")}function y(){for(var t,e=[],n=i();t=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),p(/^,\s*/);if(e.length)return n({type:"keyframe",values:e,declarations:g()})}var j,_=S("import"),k=S("charset"),E=S("namespace");function S(t){var e=new RegExp("^@"+t+"\\s*([^;]+);");return function(){var n=i(),r=p(e);if(r){var o={type:t};return o[t]=r[1].trim(),n(o)}}}function P(){if("@"===t[0])return function(){var t=i(),e=p(/^@([-\w]+)?keyframes\s*/);if(e){var n=e[1];if(!(e=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=e[1];if(!u())return c("@keyframes missing '{'");for(var s=b();r=y();)s.push(r),s=s.concat(b());return l()?t({type:"keyframes",name:o,vendor:n,keyframes:s}):c("@keyframes missing '}'")}}()||function(){var t=i(),e=p(/^@media *([^{]+)/);if(e){var n=vs(e[1]);if(!u())return c("@media missing '{'");var r=b().concat(d());return l()?t({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var t=i(),e=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return t({type:"custom-media",name:vs(e[1]),media:vs(e[2])})}()||function(){var t=i(),e=p(/^@supports *([^{]+)/);if(e){var n=vs(e[1]);if(!u())return c("@supports missing '{'");var r=b().concat(d());return l()?t({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||_()||k()||E()||function(){var t=i(),e=p(/^@([-\w]+)?document *([^{]+)/);if(e){var n=vs(e[1]),r=vs(e[2]);if(!u())return c("@document missing '{'");var o=b().concat(d());return l()?t({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var t=i();if(p(/^@page */)){var e=v()||[];if(!u())return c("@page missing '{'");for(var n,r=b();n=O();)r.push(n),r=r.concat(b());return l()?t({type:"page",selectors:e,declarations:r}):c("@page missing '}'")}}()||function(){var t=i();if(p(/^@host\s*/)){if(!u())return c("@host missing '{'");var e=b().concat(d());return l()?t({type:"host",rules:e}):c("@host missing '}'")}}()||function(){var t=i();if(p(/^@font-face\s*/)){if(!u())return c("@font-face missing '{'");for(var e,n=b();e=O();)n.push(e),n=n.concat(b());return l()?t({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function w(){var t=i(),e=v();return e?(b(),t({type:"rule",selectors:e,declarations:g()})):c("selector missing")}return function t(e,n){var r=e&&"string"==typeof e.type;var o=r?e:n;for(var i in e){var s=e[i];Array.isArray(s)?s.forEach(function(e){t(e,o)}):s&&"object"===Object(f.a)(s)&&t(s,o)}r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return e}((j=d(),{type:"stylesheet",stylesheet:{source:e.source,rules:j,parsingErrors:a}}))};function vs(t){return t?t.replace(/^\s+|\s+$/g,""):""}var Os=n(109),gs=n.n(Os),ys=js;function js(t){this.options=t||{}}js.prototype.emit=function(t){return t},js.prototype.visit=function(t){return this[t.type](t)},js.prototype.mapVisit=function(t,e){var n="";e=e||"";for(var r=0,o=t.length;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(h.a)({},n,{selectors:n.selectors.map(function(n){return Object(v.includes)(e,n.trim())?n:n.match(As)?n.replace(/^(body|html|:root)/,t):t+" "+n})}):n}},Ls=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(v.map)(t,function(t){var n=t.css,r=t.baseURL,o=[];return e&&o.push(Is(e)),r&&o.push(Bs(r)),o.length?ws(n,Object(Hr.compose)(o)):n})},Rs=n(35);function Ns(){return(Ns=Object(fe.a)(q.a.mark(function t(e){var n,r,o,i,s,a,c,u,l,p,f,b,m,O,g,y,j,_,k,E,S,P,w,T,C,B,A,I,L;return q.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=e.allowedTypes,r=e.additionalData,o=void 0===r?{}:r,i=e.filesList,s=e.maxUploadFileSize,a=e.onError,c=void 0===a?v.noop:a,u=e.onFileChange,l=e.wpAllowedMimeTypes,p=void 0===l?null:l,f=Object(x.a)(i),b=[],m=function(t,e){Object(Rs.revokeBlobURL)(Object(v.get)(b,[t,"url"])),b[t]=e,u(Object(v.compact)(b))},O=function(t){return!n||Object(v.some)(n,function(e){return Object(v.includes)(e,"/")?e===t:Object(v.startsWith)(t,"".concat(e,"/"))})},g=(R=p)?Object(v.flatMap)(R,function(t,e){var n=t.split("/"),r=Object(d.a)(n,1)[0],o=e.split("|");return[t].concat(Object(x.a)(Object(v.map)(o,function(t){return"".concat(r,"/").concat(t)})))}):R,y=function(t){return Object(v.includes)(g,t)},j=function(t){t.message=[Object(Br.createElement)("strong",{key:"filename"},t.file.name),": ",t.message],c(t)},_=[],k=!0,E=!1,S=void 0,t.prev=12,P=f[Symbol.iterator]();case 14:if(k=(w=P.next()).done){t.next=34;break}if(T=w.value,!g||y(T.type)){t.next=19;break}return j({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(Z.__)("Sorry, this file type is not permitted for security reasons."),file:T}),t.abrupt("continue",31);case 19:if(O(T.type)){t.next=22;break}return j({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(Z.__)("Sorry, this file type is not supported here."),file:T}),t.abrupt("continue",31);case 22:if(!(s&&T.size>s)){t.next=25;break}return j({code:"SIZE_ABOVE_LIMIT",message:Object(Z.__)("This file exceeds the maximum upload size for this site."),file:T}),t.abrupt("continue",31);case 25:if(!(T.size<=0)){t.next=28;break}return j({code:"EMPTY_FILE",message:Object(Z.__)("This file is empty."),file:T}),t.abrupt("continue",31);case 28:_.push(T),b.push({url:Object(Rs.createBlobURL)(T)}),u(b);case 31:k=!0,t.next=14;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(12),E=!0,S=t.t0;case 40:t.prev=40,t.prev=41,k||null==P.return||P.return();case 43:if(t.prev=43,!E){t.next=46;break}throw S;case 46:return t.finish(43);case 47:return t.finish(40);case 48:C=0;case 49:if(!(C<_.length)){t.next=68;break}return B=_[C],t.prev=51,t.next=54,Us(B,o);case 54:A=t.sent,I=Object(h.a)({},Object(v.omit)(A,["alt_text","source_url"]),{alt:A.alt_text,caption:Object(v.get)(A,["caption","raw"],""),title:A.title.raw,url:A.source_url}),m(C,I),t.next=65;break;case 59:t.prev=59,t.t1=t.catch(51),m(C,null),L=void 0,L=Object(v.has)(t.t1,["message"])?Object(v.get)(t.t1,["message"]):Object(Z.sprintf)(Object(Z.__)("Error while uploading file %s to the media library."),B.name),c({code:"GENERAL",message:L,file:B});case 65:++C,t.next=49;break;case 68:case"end":return t.stop()}var R},t,this,[[12,36,40,48],[41,,43,47],[51,59]])}))).apply(this,arguments)}function Us(t,e){var n=new window.FormData;return n.append("file",t,t.name||t.type.replace("/",".")),Object(v.forEach)(e,function(t,e){return n.append(e,t)}),H()({path:"/wp/v2/media",body:n,method:"POST"})}var Ds=function(t){var e=t.additionalData,n=void 0===e?{}:e,r=t.allowedTypes,o=t.filesList,i=t.maxUploadFileSize,s=t.onError,a=void 0===s?v.noop:s,c=t.onFileChange,u=Object(l.select)("core/editor"),d=u.getCurrentPostId,p=u.getEditorSettings,f=p().allowedMimeTypes;i=i||p().maxUploadFileSize,function(t){Ns.apply(this,arguments)}({allowedTypes:r,filesList:o,onFileChange:c,additionalData:Object(h.a)({post:d()},n),maxUploadFileSize:i,onError:function(t){var e=t.message;return a(e)},wpAllowedMimeTypes:f})},Fs=function(t){function e(t){var n;return Object(Vr.a)(this,e),(n=Object(Kr.a)(this,Object(qr.a)(e).apply(this,arguments))).getBlockEditorSettings=ps()(n.getBlockEditorSettings,{maxSize:1}),t.recovery?Object(Kr.a)(n):(t.updatePostLock(t.settings.postLock),t.setupEditor(t.post,t.initialEdits,t.settings.template),t.settings.autosave&&t.createWarningNotice(Object(Z.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(Z.__)("View the autosave"),url:t.settings.autosave.editLink}]}),n)}return Object(Wr.a)(e,t),Object(zr.a)(e,[{key:"getBlockEditorSettings",value:function(t,e,n,r){return Object(h.a)({},Object(v.pick)(t,["alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","colors","disableCustomColors","disableCustomFontSizes","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","templateLock","titlePlaceholder"]),{__experimentalMetaSource:{value:e,onChange:n},__experimentalReusableBlocks:r,__experimentalMediaUpload:Ds})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var t=Ls(this.props.settings.styles,".editor-styles-wrapper");Object(v.map)(t,function(t){if(t){var e=document.createElement("style");e.innerHTML=t,document.body.appendChild(e)}})}}},{key:"componentDidUpdate",value:function(t){this.props.settings!==t.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var t=this.props,e=t.children,n=t.blocks,r=t.resetEditorBlocks,o=t.isReady,s=t.settings,a=t.meta,c=t.onMetaChange,u=t.reusableBlocks,l=t.resetEditorBlocksWithoutUndoLevel;if(!o)return null;var d=this.getBlockEditorSettings(s,a,c,u);return Object(Br.createElement)(i.BlockEditorProvider,{value:n,onInput:l,onChange:r,settings:d},e)}}]),e}(Br.Component),Ms=Object(Hr.compose)([Object(l.withSelect)(function(t){var e=t("core/editor"),n=e.__unstableIsEditorReady,r=e.getEditorBlocks,o=e.getEditedPostAttribute,i=e.__experimentalGetReusableBlocks;return{isReady:n(),blocks:r(),meta:o("meta"),reusableBlocks:i()}}),Object(l.withDispatch)(function(t){var e=t("core/editor"),n=e.setupEditor,r=e.updatePostLock,o=e.resetEditorBlocks,i=e.editPost,s=e.updateEditorSettings;return{setupEditor:n,updatePostLock:r,createWarningNotice:t("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:s,resetEditorBlocksWithoutUndoLevel:function(t){o(t,{__unstableShouldCreateUndoLevel:!1})},onMetaChange:function(t){i({meta:t})}}})])(Fs),Vs=[Nr],zs=Object(v.once)(function(){return Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(xr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(t,e){return t||(t=Vs.map(v.clone),e===Object(s.getDefaultBlockName)()&&(t.push(Object(v.clone)(Rr)),zs())),t}),n.d(e,"ServerSideRender",function(){return Mr}),n.d(e,"AutosaveMonitor",function(){return Qr}),n.d(e,"DocumentOutline",function(){return ro}),n.d(e,"DocumentOutlineCheck",function(){return oo}),n.d(e,"VisualEditorGlobalKeyboardShortcuts",function(){return ho}),n.d(e,"EditorGlobalKeyboardShortcuts",function(){return fo}),n.d(e,"TextEditorGlobalKeyboardShortcuts",function(){return bo}),n.d(e,"EditorHistoryRedo",function(){return mo}),n.d(e,"EditorHistoryUndo",function(){return vo}),n.d(e,"EditorNotices",function(){return go}),n.d(e,"ErrorBoundary",function(){return yo}),n.d(e,"PageAttributesCheck",function(){return jo}),n.d(e,"PageAttributesOrder",function(){return Eo}),n.d(e,"PageAttributesParent",function(){return To}),n.d(e,"PageTemplate",function(){return Co}),n.d(e,"PostAuthor",function(){return Ao}),n.d(e,"PostAuthorCheck",function(){return xo}),n.d(e,"PostComments",function(){return Io}),n.d(e,"PostExcerpt",function(){return Lo}),n.d(e,"PostExcerptCheck",function(){return Ro}),n.d(e,"PostFeaturedImage",function(){return qo}),n.d(e,"PostFeaturedImageCheck",function(){return Uo}),n.d(e,"PostFormat",function(){return Go}),n.d(e,"PostFormatCheck",function(){return Wo}),n.d(e,"PostLastRevision",function(){return Xo}),n.d(e,"PostLastRevisionCheck",function(){return Qo}),n.d(e,"PostLockedModal",function(){return ei}),n.d(e,"PostPendingStatus",function(){return ri}),n.d(e,"PostPendingStatusCheck",function(){return ni}),n.d(e,"PostPingbacks",function(){return oi}),n.d(e,"PostPreviewButton",function(){return Jo}),n.d(e,"PostPublishButton",function(){return ai}),n.d(e,"PostPublishButtonLabel",function(){return ii}),n.d(e,"PostPublishPanel",function(){return xi}),n.d(e,"PostSavedState",function(){return Ii}),n.d(e,"PostSchedule",function(){return pi}),n.d(e,"PostScheduleCheck",function(){return Li}),n.d(e,"PostScheduleLabel",function(){return hi}),n.d(e,"PostSticky",function(){return Ni}),n.d(e,"PostStickyCheck",function(){return Ri}),n.d(e,"PostSwitchToDraftButton",function(){return Bi}),n.d(e,"PostTaxonomies",function(){return Mi}),n.d(e,"PostTaxonomiesCheck",function(){return Vi}),n.d(e,"PostTextEditor",function(){return Wi}),n.d(e,"PostTitle",function(){return es}),n.d(e,"PostTrash",function(){return ns}),n.d(e,"PostTrashCheck",function(){return rs}),n.d(e,"PostTypeSupportCheck",function(){return _o}),n.d(e,"PostVisibility",function(){return li}),n.d(e,"PostVisibilityLabel",function(){return di}),n.d(e,"PostVisibilityCheck",function(){return os}),n.d(e,"TableOfContents",function(){return cs}),n.d(e,"UnsavedChangesWarning",function(){return ls}),n.d(e,"WordCount",function(){return ss}),n.d(e,"EditorProvider",function(){return Ms}),n.d(e,"blockAutocompleter",function(){return Rr}),n.d(e,"userAutocompleter",function(){return Nr}),n.d(e,"Autocomplete",function(){return i.Autocomplete}),n.d(e,"AlignmentToolbar",function(){return i.AlignmentToolbar}),n.d(e,"BlockAlignmentToolbar",function(){return i.BlockAlignmentToolbar}),n.d(e,"BlockControls",function(){return i.BlockControls}),n.d(e,"BlockEdit",function(){return i.BlockEdit}),n.d(e,"BlockEditorKeyboardShortcuts",function(){return i.BlockEditorKeyboardShortcuts}),n.d(e,"BlockFormatControls",function(){return i.BlockFormatControls}),n.d(e,"BlockIcon",function(){return i.BlockIcon}),n.d(e,"BlockInspector",function(){return i.BlockInspector}),n.d(e,"BlockList",function(){return i.BlockList}),n.d(e,"BlockMover",function(){return i.BlockMover}),n.d(e,"BlockNavigationDropdown",function(){return i.BlockNavigationDropdown}),n.d(e,"BlockSelectionClearer",function(){return i.BlockSelectionClearer}),n.d(e,"BlockSettingsMenu",function(){return i.BlockSettingsMenu}),n.d(e,"BlockTitle",function(){return i.BlockTitle}),n.d(e,"BlockToolbar",function(){return i.BlockToolbar}),n.d(e,"ColorPalette",function(){return i.ColorPalette}),n.d(e,"ContrastChecker",function(){return i.ContrastChecker}),n.d(e,"CopyHandler",function(){return i.CopyHandler}),n.d(e,"createCustomColorsHOC",function(){return i.createCustomColorsHOC}),n.d(e,"DefaultBlockAppender",function(){return i.DefaultBlockAppender}),n.d(e,"FontSizePicker",function(){return i.FontSizePicker}),n.d(e,"getColorClassName",function(){return i.getColorClassName}),n.d(e,"getColorObjectByAttributeValues",function(){return i.getColorObjectByAttributeValues}),n.d(e,"getColorObjectByColorValue",function(){return i.getColorObjectByColorValue}),n.d(e,"getFontSize",function(){return i.getFontSize}),n.d(e,"getFontSizeClass",function(){return i.getFontSizeClass}),n.d(e,"Inserter",function(){return i.Inserter}),n.d(e,"InnerBlocks",function(){return i.InnerBlocks}),n.d(e,"InspectorAdvancedControls",function(){return i.InspectorAdvancedControls}),n.d(e,"InspectorControls",function(){return i.InspectorControls}),n.d(e,"PanelColorSettings",function(){return i.PanelColorSettings}),n.d(e,"PlainText",function(){return i.PlainText}),n.d(e,"RichText",function(){return i.RichText}),n.d(e,"RichTextShortcut",function(){return i.RichTextShortcut}),n.d(e,"RichTextToolbarButton",function(){return i.RichTextToolbarButton}),n.d(e,"RichTextInserterItem",function(){return i.RichTextInserterItem}),n.d(e,"UnstableRichTextInputEvent",function(){return i.UnstableRichTextInputEvent}),n.d(e,"MediaPlaceholder",function(){return i.MediaPlaceholder}),n.d(e,"MediaUpload",function(){return i.MediaUpload}),n.d(e,"MediaUploadCheck",function(){return i.MediaUploadCheck}),n.d(e,"MultiBlocksSwitcher",function(){return i.MultiBlocksSwitcher}),n.d(e,"MultiSelectScrollIntoView",function(){return i.MultiSelectScrollIntoView}),n.d(e,"NavigableToolbar",function(){return i.NavigableToolbar}),n.d(e,"ObserveTyping",function(){return i.ObserveTyping}),n.d(e,"PreserveScrollInReorder",function(){return i.PreserveScrollInReorder}),n.d(e,"SkipToSelectedBlock",function(){return i.SkipToSelectedBlock}),n.d(e,"URLInput",function(){return i.URLInput}),n.d(e,"URLInputButton",function(){return i.URLInputButton}),n.d(e,"URLPopover",function(){return i.URLPopover}),n.d(e,"Warning",function(){return i.Warning}),n.d(e,"WritingFlow",function(){return i.WritingFlow}),n.d(e,"withColorContext",function(){return i.withColorContext}),n.d(e,"withColors",function(){return i.withColors}),n.d(e,"withFontSizes",function(){return i.withFontSizes}),n.d(e,"mediaUpload",function(){return Ds}),n.d(e,"cleanForSlug",function(){return $o}),n.d(e,"transformStyles",function(){return Ls})},37:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,"a",function(){return r})},38:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(e,"a",function(){return r})},4:function(t,e){!function(){t.exports=this.wp.components}()},40:function(t,e){!function(){t.exports=this.wp.viewport}()},41:function(t,e,n){t.exports=function(t,e){var n,r,o,i=0;function s(){var e,s,a=r,c=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(55),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},55:function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=y;var d="suspendedStart",p="suspendedYield",h="executing",f="completed",b={},m={};m[s]=function(){return this};var v=Object.getPrototypeOf,O=v&&v(v(B([])));O&&O!==r&&o.call(O,s)&&(m=O);var g=E.prototype=_.prototype=Object.create(m);k.prototype=g.constructor=E,E.constructor=k,E[c]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},S(P.prototype),P.prototype[a]=function(){return this},l.AsyncIterator=P,l.async=function(t,e,n,r){var o=new P(y(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(g),g[c]="Generator",g[s]=function(){return this},g.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=B,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:B(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),b}}}function y(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,i=Object.create(o.prototype),s=new x(r||[]);return i._invoke=function(t,e,n){var r=d;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===b)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=j(t,e,n);if("normal"===c.type){if(r=n.done?f:p,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=f,n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function j(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function k(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function P(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,s){var a=j(t[n],t,r);if("throw"!==a.type){var c=a.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,s)})}s(a.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,w(t,e),"throw"===e.method))return b;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var o=j(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,b;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,b):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function B(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),d=["%","/","?",";","#"].concat(l),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=n(120);function g(t,e,n){if(t&&o.isObject(t)&&t instanceof i)return t;var r=new i;return r.parse(t,e,n),r}i.prototype.parse=function(t,e,n){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i127?I+="x":I+=A[L];if(!I.match(h)){var N=x.slice(0,w),U=x.slice(w+1),D=A.match(f);D&&(N.push(D[1]),U.unshift(D[2])),U.length&&(g="/"+U.join(".")+g),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[_])for(w=0,B=l.length;w0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=t.search,n.query=t.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],P=(n.host||t.host||k.length>1)&&("."===S||".."===S)||""===S,w=0,T=k.length;T>=0;T--)"."===(S=k[T])?k.splice(T,1):".."===S?(k.splice(T,1),w++):w&&(k.splice(T,1),w--);if(!j&&!_)for(;w--;w)k.unshift("..");!j||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),P&&"/"!==k.join("/").substr(-1)&&k.push("");var C,x=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=x?"":k.length?k.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(j=j||n.host&&k.length)&&!x&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},89:function(t,e,n){"use strict";var r=n(90);function o(){}t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){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 e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=o,n.PropTypes=n,n}},9:function(t,e,n){"use strict";function r(t,e){for(var n=0;n 0 ? selection.getRangeAt(0) : null; if (!range) { return; diff --git a/wp-includes/js/dist/format-library.min.js b/wp-includes/js/dist/format-library.min.js index f6fab79fc4..f2eb5f88cd 100644 --- a/wp-includes/js/dist/format-library.min.js +++ b/wp-includes/js/dist/format-library.min.js @@ -9,4 +9,4 @@ this.wp=this.wp||{},this.wp.formatLibrary=function(t){var e={};function n(r){if( Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",function(){return r})},24:function(t,e){!function(){t.exports=this.wp.dom}()},25:function(t,e){!function(){t.exports=this.wp.url}()},3:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},32:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},367:function(t,e,n){"use strict";n.r(e);var r=n(21),o=n(20),i=n(0),a=n(1),c=n(8),u={name:"core/bold",title:Object(a.__)("Bold"),tagName:"strong",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,u=function(){return r(Object(o.toggleFormat)(n,{type:"core/bold"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"b",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{name:"bold",icon:"editor-bold",title:Object(a.__)("Bold"),onClick:u,isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),Object(i.createElement)(c.UnstableRichTextInputEvent,{inputType:"formatBold",onInput:u}))}},l={name:"core/code",title:Object(a.__)("Code"),tagName:"code",className:null,edit:function(t){var e=t.value,n=t.onChange,r=t.isActive,u=function(){return n(Object(o.toggleFormat)(e,{type:"core/code"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"x",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{icon:"editor-code",title:Object(a.__)("Code"),onClick:u,isActive:r,shortcutType:"access",shortcutCharacter:"x"}))}},s=n(7),b=n(10),p=n(9),f=n(11),d=n(12),m=n(13),h=n(3),O=n(4),j=n(18),v=["image"],y=function(t){return t.stopPropagation()},g={name:"core/image",title:Object(a.__)("Image"),keywords:[Object(a.__)("photo"),Object(a.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function(t){function e(){var t;return Object(b.a)(this,e),(t=Object(f.a)(this,Object(d.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(h.a)(Object(h.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(h.a)(Object(h.a)(t))),t.openModal=t.openModal.bind(Object(h.a)(Object(h.a)(t))),t.closeModal=t.closeModal.bind(Object(h.a)(Object(h.a)(t))),t.state={modal:!1},t}return Object(m.a)(e,t),Object(p.a)(e,[{key:"onChange",value:function(t){this.setState({width:t})}},{key:"onKeyDown",value:function(t){[j.LEFT,j.DOWN,j.RIGHT,j.UP,j.BACKSPACE,j.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}},{key:"openModal",value:function(){this.setState({modal:!0})}},{key:"closeModal",value:function(){this.setState({modal:!1})}},{key:"render",value:function(){var t=this,e=this.props,n=e.value,r=e.onChange,u=e.isObjectActive,l=e.activeObjectAttributes,b=l.style,p=n.start+b;return Object(i.createElement)(c.MediaUploadCheck,null,Object(i.createElement)(c.RichTextToolbarButton,{icon:Object(i.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(O.Path,{d:"M4 16h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2zM4 5h10v9H4V5zm14 9v2h4v-2h-4zM2 20h20v-2H2v2zm6.4-8.8L7 9.4 5 12h8l-2.6-3.4-2 2.6z"})),title:Object(a.__)("Inline Image"),onClick:this.openModal,isActive:u}),this.state.modal&&Object(i.createElement)(c.MediaUpload,{allowedTypes:v,onSelect:function(e){var i=e.id,a=e.url,c=e.alt,u=e.width;t.closeModal(),r(Object(o.insertObject)(n,{type:"core/image",attributes:{className:"wp-image-".concat(i),style:"width: ".concat(Math.min(u,150),"px;"),url:a,alt:c}}))},onClose:this.closeModal,render:function(t){return(0,t.open)(),null}}),u&&Object(i.createElement)(O.__unstablePositionedAtSelection,{key:p},Object(i.createElement)(O.Popover,{position:"bottom center",focusOnMount:!1},Object(i.createElement)("form",{className:"editor-format-toolbar__image-container-content block-editor-format-toolbar__image-container-content",onKeyPress:y,onKeyDown:this.onKeyDown,onSubmit:function(e){var o=n.replacements.slice();o[n.start]={type:"core/image",attributes:Object(s.a)({},l,{style:"width: ".concat(t.state.width,"px;")})},r(Object(s.a)({},n,{replacements:o})),e.preventDefault()}},Object(i.createElement)(O.TextControl,{className:"editor-format-toolbar__image-container-value block-editor-format-toolbar__image-container-value",type:"number",label:Object(a.__)("Width"),value:this.state.width,min:1,onChange:this.onChange}),Object(i.createElement)(O.IconButton,{icon:"editor-break",label:Object(a.__)("Apply"),type:"submit"})))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeObjectAttributes.style;return n===e.previousStyle?null:n?{width:n.replace(/\D/g,""),previousStyle:n}:{width:void 0,previousStyle:n}}}]),e}(i.Component)},k={name:"core/italic",title:Object(a.__)("Italic"),tagName:"em",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,u=function(){return r(Object(o.toggleFormat)(n,{type:"core/italic"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"i",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{name:"italic",icon:"editor-italic",title:Object(a.__)("Italic"),onClick:u,isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),Object(i.createElement)(c.UnstableRichTextInputEvent,{inputType:"formatItalic",onInput:u}))}},_=n(25),w=n(19),E=n(16),S=n.n(E),C=n(24),T=n(2);function x(t){if(!t)return!1;var e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){var n=Object(_.getProtocol)(e);if(!Object(_.isValidProtocol)(n))return!1;if(Object(T.startsWith)(n,"http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;var r=Object(_.getAuthority)(e);if(!Object(_.isValidAuthority)(r))return!1;var o=Object(_.getPath)(e);if(o&&!Object(_.isValidPath)(o))return!1;var i=Object(_.getQueryString)(e);if(i&&!Object(_.isValidQueryString)(i))return!1;var a=Object(_.getFragment)(e);if(a&&!Object(_.isValidFragment)(a))return!1}return!(Object(T.startsWith)(e,"#")&&!Object(_.isValidFragment)(e))}function L(t){var e=t.url,n=t.opensInNewWindow,r=t.text,o={type:"core/link",attributes:{url:e}};if(n){var i=Object(a.sprintf)(Object(a.__)("%s (opens in a new tab)"),r);o.attributes.target="_blank",o.attributes.rel="noreferrer noopener",o.attributes["aria-label"]=i}return o}var R=function(t){return t.stopPropagation()};function A(t,e){return t.addingLink||e.editLink}var P=function(t){var e=t.value,n=t.onChangeInputValue,r=t.onKeyDown,o=t.submitLink,u=t.autocompleteRef;return Object(i.createElement)("form",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:R,onKeyDown:r,onSubmit:o},Object(i.createElement)(c.URLInput,{value:e,onChange:n,autocompleteRef:u}),Object(i.createElement)(O.IconButton,{icon:"editor-break",label:Object(a.__)("Apply"),type:"submit"}))},N=function(t){var e=t.url,n=Object(_.prependHTTP)(e),r=S()("editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value",{"has-invalid-link":!x(n)});return e?Object(i.createElement)(O.ExternalLink,{className:r,href:e},Object(_.filterURLForDisplay)(Object(_.safeDecodeURI)(e))):Object(i.createElement)("span",{className:r})},I=function(t){var e=t.isActive,n=t.addingLink,o=t.value,a=Object(r.a)(t,["isActive","addingLink","value"]),u=Object(i.useMemo)(function(){var t=window.getSelection().getRangeAt(0);if(t){if(n)return Object(C.getRectangleFromRange)(t);var e=t.startContainer;for(e=e.nextElementSibling||e;e.nodeType!==window.Node.ELEMENT_NODE;)e=e.parentNode;var r=e.closest("a");return r?r.getBoundingClientRect():void 0}},[e,n,o.start,o.end]);return u?Object(i.createElement)(c.URLPopover,Object(w.a)({anchorRect:u},a)):null},F=function(t){var e=t.url,n=t.editLink;return Object(i.createElement)("div",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:R},Object(i.createElement)(N,{url:e}),Object(i.createElement)(O.IconButton,{icon:"edit",label:Object(a.__)("Edit"),onClick:n}))},M=function(t){function e(){var t;return Object(b.a)(this,e),(t=Object(f.a)(this,Object(d.a)(e).apply(this,arguments))).editLink=t.editLink.bind(Object(h.a)(Object(h.a)(t))),t.submitLink=t.submitLink.bind(Object(h.a)(Object(h.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(h.a)(Object(h.a)(t))),t.onChangeInputValue=t.onChangeInputValue.bind(Object(h.a)(Object(h.a)(t))),t.setLinkTarget=t.setLinkTarget.bind(Object(h.a)(Object(h.a)(t))),t.onClickOutside=t.onClickOutside.bind(Object(h.a)(Object(h.a)(t))),t.resetState=t.resetState.bind(Object(h.a)(Object(h.a)(t))),t.autocompleteRef=Object(i.createRef)(),t.state={opensInNewWindow:!1,inputValue:""},t}return Object(m.a)(e,t),Object(p.a)(e,[{key:"onKeyDown",value:function(t){[j.LEFT,j.DOWN,j.RIGHT,j.UP,j.BACKSPACE,j.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}},{key:"onChangeInputValue",value:function(t){this.setState({inputValue:t})}},{key:"setLinkTarget",value:function(t){var e=this.props,n=e.activeAttributes.url,r=void 0===n?"":n,i=e.value,a=e.onChange;if(this.setState({opensInNewWindow:t}),!A(this.props,this.state)){var c=Object(o.getTextContent)(Object(o.slice)(i));a(Object(o.applyFormat)(i,L({url:r,opensInNewWindow:t,text:c})))}}},{key:"editLink",value:function(t){this.setState({editLink:!0}),t.preventDefault()}},{key:"submitLink",value:function(t){var e=this.props,n=e.isActive,r=e.value,i=e.onChange,c=e.speak,u=this.state,l=u.inputValue,s=u.opensInNewWindow,b=Object(_.prependHTTP)(l),p=L({url:b,opensInNewWindow:s,text:Object(o.getTextContent)(Object(o.slice)(r))});if(t.preventDefault(),Object(o.isCollapsed)(r)&&!n){var f=Object(o.applyFormat)(Object(o.create)({text:b}),p,0,b.length);i(Object(o.insert)(r,f))}else i(Object(o.applyFormat)(r,p));this.resetState(),x(b)?c(n?Object(a.__)("Link edited."):Object(a.__)("Link inserted."),"assertive"):c(Object(a.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")}},{key:"onClickOutside",value:function(t){var e=this.autocompleteRef.current;e&&e.contains(t.target)||this.resetState()}},{key:"resetState",value:function(){this.props.stopAddingLink(),this.setState({editLink:!1})}},{key:"render",value:function(){var t=this,e=this.props,n=e.isActive,r=e.activeAttributes.url,o=e.addingLink,c=e.value;if(!n&&!o)return null;var u=this.state,l=u.inputValue,s=u.opensInNewWindow,b=A(this.props,this.state);return Object(i.createElement)(I,{value:c,isActive:n,addingLink:o,onClickOutside:this.onClickOutside,onClose:this.resetState,focusOnMount:!!b&&"firstElement",renderSettings:function(){return Object(i.createElement)(O.ToggleControl,{label:Object(a.__)("Open in New Tab"),checked:s,onChange:t.setLinkTarget})}},b?Object(i.createElement)(P,{value:l,onChangeInputValue:this.onChangeInputValue,onKeyDown:this.onKeyDown,submitLink:this.submitLink,autocompleteRef:this.autocompleteRef}):Object(i.createElement)(F,{url:r,editLink:this.editLink}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeAttributes,r=n.url,o="_blank"===n.target;if(!A(t,e)){if(r!==e.inputValue)return{inputValue:r};if(o!==e.opensInNewWindow)return{opensInNewWindow:o}}return null}}]),e}(i.Component),D=Object(O.withSpokenMessages)(M),U={name:"core/link",title:Object(a.__)("Link"),tagName:"a",className:null,attributes:{url:"href",target:"target"},edit:Object(O.withSpokenMessages)(function(t){function e(){var t;return Object(b.a)(this,e),(t=Object(f.a)(this,Object(d.a)(e).apply(this,arguments))).addLink=t.addLink.bind(Object(h.a)(Object(h.a)(t))),t.stopAddingLink=t.stopAddingLink.bind(Object(h.a)(Object(h.a)(t))),t.onRemoveFormat=t.onRemoveFormat.bind(Object(h.a)(Object(h.a)(t))),t.state={addingLink:!1},t}return Object(m.a)(e,t),Object(p.a)(e,[{key:"addLink",value:function(){var t=this.props,e=t.value,n=t.onChange,r=Object(o.getTextContent)(Object(o.slice)(e));r&&Object(_.isURL)(r)?n(Object(o.applyFormat)(e,{type:"core/link",attributes:{url:r}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1})}},{key:"onRemoveFormat",value:function(){var t=this.props,e=t.value,n=t.onChange,r=t.speak;n(Object(o.removeFormat)(e,"core/link")),r(Object(a.__)("Link removed."),"assertive")}},{key:"render",value:function(){var t=this.props,e=t.isActive,n=t.activeAttributes,r=t.value,o=t.onChange;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"a",onUse:this.addLink}),Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"s",onUse:this.onRemoveFormat}),Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"k",onUse:this.addLink}),Object(i.createElement)(c.RichTextShortcut,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&Object(i.createElement)(c.RichTextToolbarButton,{name:"link",icon:"editor-unlink",title:Object(a.__)("Unlink"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&Object(i.createElement)(c.RichTextToolbarButton,{name:"link",icon:"admin-links",title:Object(a.__)("Link"),onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),Object(i.createElement)(D,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:n,value:r,onChange:o}))}}]),e}(i.Component))},V={name:"core/strikethrough",title:Object(a.__)("Strikethrough"),tagName:"s",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,u=function(){return r(Object(o.toggleFormat)(n,{type:"core/strikethrough"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"d",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{icon:"editor-strikethrough",title:Object(a.__)("Strikethrough"),onClick:u,isActive:e,shortcutType:"access",shortcutCharacter:"d"}))}};[u,l,g,k,U,V,{name:"core/underline",title:Object(a.__)("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit:function(t){var e=t.value,n=t.onChange,r=function(){n(Object(o.toggleFormat)(e,{type:"core/underline",attributes:{style:"text-decoration: underline;"}}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"u",onUse:r}),Object(i.createElement)(c.UnstableRichTextInputEvent,{inputType:"formatUnderline",onInput:r}))}}].forEach(function(t){var e=t.name,n=Object(r.a)(t,["name"]);return Object(o.registerFormatType)(e,n)})},4:function(t,e){!function(){t.exports=this.wp.components}()},7:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(15);function o(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",function(){return r})},24:function(t,e){!function(){t.exports=this.wp.dom}()},25:function(t,e){!function(){t.exports=this.wp.url}()},3:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},32:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},367:function(t,e,n){"use strict";n.r(e);var r=n(21),o=n(20),i=n(0),a=n(1),c=n(8),u={name:"core/bold",title:Object(a.__)("Bold"),tagName:"strong",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,u=function(){return r(Object(o.toggleFormat)(n,{type:"core/bold"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"b",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{name:"bold",icon:"editor-bold",title:Object(a.__)("Bold"),onClick:u,isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),Object(i.createElement)(c.UnstableRichTextInputEvent,{inputType:"formatBold",onInput:u}))}},l={name:"core/code",title:Object(a.__)("Code"),tagName:"code",className:null,edit:function(t){var e=t.value,n=t.onChange,r=t.isActive,u=function(){return n(Object(o.toggleFormat)(e,{type:"core/code"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"x",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{icon:"editor-code",title:Object(a.__)("Code"),onClick:u,isActive:r,shortcutType:"access",shortcutCharacter:"x"}))}},s=n(7),b=n(10),p=n(9),f=n(11),d=n(12),m=n(13),h=n(3),O=n(4),j=n(18),v=["image"],y=function(t){return t.stopPropagation()},g={name:"core/image",title:Object(a.__)("Image"),keywords:[Object(a.__)("photo"),Object(a.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function(t){function e(){var t;return Object(b.a)(this,e),(t=Object(f.a)(this,Object(d.a)(e).apply(this,arguments))).onChange=t.onChange.bind(Object(h.a)(Object(h.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(h.a)(Object(h.a)(t))),t.openModal=t.openModal.bind(Object(h.a)(Object(h.a)(t))),t.closeModal=t.closeModal.bind(Object(h.a)(Object(h.a)(t))),t.state={modal:!1},t}return Object(m.a)(e,t),Object(p.a)(e,[{key:"onChange",value:function(t){this.setState({width:t})}},{key:"onKeyDown",value:function(t){[j.LEFT,j.DOWN,j.RIGHT,j.UP,j.BACKSPACE,j.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}},{key:"openModal",value:function(){this.setState({modal:!0})}},{key:"closeModal",value:function(){this.setState({modal:!1})}},{key:"render",value:function(){var t=this,e=this.props,n=e.value,r=e.onChange,u=e.isObjectActive,l=e.activeObjectAttributes,b=l.style,p=n.start+b;return Object(i.createElement)(c.MediaUploadCheck,null,Object(i.createElement)(c.RichTextToolbarButton,{icon:Object(i.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(O.Path,{d:"M4 16h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2zM4 5h10v9H4V5zm14 9v2h4v-2h-4zM2 20h20v-2H2v2zm6.4-8.8L7 9.4 5 12h8l-2.6-3.4-2 2.6z"})),title:Object(a.__)("Inline Image"),onClick:this.openModal,isActive:u}),this.state.modal&&Object(i.createElement)(c.MediaUpload,{allowedTypes:v,onSelect:function(e){var i=e.id,a=e.url,c=e.alt,u=e.width;t.closeModal(),r(Object(o.insertObject)(n,{type:"core/image",attributes:{className:"wp-image-".concat(i),style:"width: ".concat(Math.min(u,150),"px;"),url:a,alt:c}}))},onClose:this.closeModal,render:function(t){return(0,t.open)(),null}}),u&&Object(i.createElement)(O.__unstablePositionedAtSelection,{key:p},Object(i.createElement)(O.Popover,{position:"bottom center",focusOnMount:!1},Object(i.createElement)("form",{className:"editor-format-toolbar__image-container-content block-editor-format-toolbar__image-container-content",onKeyPress:y,onKeyDown:this.onKeyDown,onSubmit:function(e){var o=n.replacements.slice();o[n.start]={type:"core/image",attributes:Object(s.a)({},l,{style:"width: ".concat(t.state.width,"px;")})},r(Object(s.a)({},n,{replacements:o})),e.preventDefault()}},Object(i.createElement)(O.TextControl,{className:"editor-format-toolbar__image-container-value block-editor-format-toolbar__image-container-value",type:"number",label:Object(a.__)("Width"),value:this.state.width,min:1,onChange:this.onChange}),Object(i.createElement)(O.IconButton,{icon:"editor-break",label:Object(a.__)("Apply"),type:"submit"})))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeObjectAttributes.style;return n===e.previousStyle?null:n?{width:n.replace(/\D/g,""),previousStyle:n}:{width:void 0,previousStyle:n}}}]),e}(i.Component)},k={name:"core/italic",title:Object(a.__)("Italic"),tagName:"em",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,u=function(){return r(Object(o.toggleFormat)(n,{type:"core/italic"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"i",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{name:"italic",icon:"editor-italic",title:Object(a.__)("Italic"),onClick:u,isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),Object(i.createElement)(c.UnstableRichTextInputEvent,{inputType:"formatItalic",onInput:u}))}},_=n(25),w=n(19),E=n(16),C=n.n(E),S=n(24),T=n(2);function x(t){if(!t)return!1;var e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){var n=Object(_.getProtocol)(e);if(!Object(_.isValidProtocol)(n))return!1;if(Object(T.startsWith)(n,"http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;var r=Object(_.getAuthority)(e);if(!Object(_.isValidAuthority)(r))return!1;var o=Object(_.getPath)(e);if(o&&!Object(_.isValidPath)(o))return!1;var i=Object(_.getQueryString)(e);if(i&&!Object(_.isValidQueryString)(i))return!1;var a=Object(_.getFragment)(e);if(a&&!Object(_.isValidFragment)(a))return!1}return!(Object(T.startsWith)(e,"#")&&!Object(_.isValidFragment)(e))}function L(t){var e=t.url,n=t.opensInNewWindow,r=t.text,o={type:"core/link",attributes:{url:e}};if(n){var i=Object(a.sprintf)(Object(a.__)("%s (opens in a new tab)"),r);o.attributes.target="_blank",o.attributes.rel="noreferrer noopener",o.attributes["aria-label"]=i}return o}var R=function(t){return t.stopPropagation()};function A(t,e){return t.addingLink||e.editLink}var P=function(t){var e=t.value,n=t.onChangeInputValue,r=t.onKeyDown,o=t.submitLink,u=t.autocompleteRef;return Object(i.createElement)("form",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:R,onKeyDown:r,onSubmit:o},Object(i.createElement)(c.URLInput,{value:e,onChange:n,autocompleteRef:u}),Object(i.createElement)(O.IconButton,{icon:"editor-break",label:Object(a.__)("Apply"),type:"submit"}))},N=function(t){var e=t.url,n=Object(_.prependHTTP)(e),r=C()("editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value",{"has-invalid-link":!x(n)});return e?Object(i.createElement)(O.ExternalLink,{className:r,href:e},Object(_.filterURLForDisplay)(Object(_.safeDecodeURI)(e))):Object(i.createElement)("span",{className:r})},I=function(t){var e=t.isActive,n=t.addingLink,o=t.value,a=Object(r.a)(t,["isActive","addingLink","value"]),u=Object(i.useMemo)(function(){var t=window.getSelection(),e=t.rangeCount>0?t.getRangeAt(0):null;if(e){if(n)return Object(S.getRectangleFromRange)(e);var r=e.startContainer;for(r=r.nextElementSibling||r;r.nodeType!==window.Node.ELEMENT_NODE;)r=r.parentNode;var o=r.closest("a");return o?o.getBoundingClientRect():void 0}},[e,n,o.start,o.end]);return u?Object(i.createElement)(c.URLPopover,Object(w.a)({anchorRect:u},a)):null},F=function(t){var e=t.url,n=t.editLink;return Object(i.createElement)("div",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:R},Object(i.createElement)(N,{url:e}),Object(i.createElement)(O.IconButton,{icon:"edit",label:Object(a.__)("Edit"),onClick:n}))},M=function(t){function e(){var t;return Object(b.a)(this,e),(t=Object(f.a)(this,Object(d.a)(e).apply(this,arguments))).editLink=t.editLink.bind(Object(h.a)(Object(h.a)(t))),t.submitLink=t.submitLink.bind(Object(h.a)(Object(h.a)(t))),t.onKeyDown=t.onKeyDown.bind(Object(h.a)(Object(h.a)(t))),t.onChangeInputValue=t.onChangeInputValue.bind(Object(h.a)(Object(h.a)(t))),t.setLinkTarget=t.setLinkTarget.bind(Object(h.a)(Object(h.a)(t))),t.onClickOutside=t.onClickOutside.bind(Object(h.a)(Object(h.a)(t))),t.resetState=t.resetState.bind(Object(h.a)(Object(h.a)(t))),t.autocompleteRef=Object(i.createRef)(),t.state={opensInNewWindow:!1,inputValue:""},t}return Object(m.a)(e,t),Object(p.a)(e,[{key:"onKeyDown",value:function(t){[j.LEFT,j.DOWN,j.RIGHT,j.UP,j.BACKSPACE,j.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}},{key:"onChangeInputValue",value:function(t){this.setState({inputValue:t})}},{key:"setLinkTarget",value:function(t){var e=this.props,n=e.activeAttributes.url,r=void 0===n?"":n,i=e.value,a=e.onChange;if(this.setState({opensInNewWindow:t}),!A(this.props,this.state)){var c=Object(o.getTextContent)(Object(o.slice)(i));a(Object(o.applyFormat)(i,L({url:r,opensInNewWindow:t,text:c})))}}},{key:"editLink",value:function(t){this.setState({editLink:!0}),t.preventDefault()}},{key:"submitLink",value:function(t){var e=this.props,n=e.isActive,r=e.value,i=e.onChange,c=e.speak,u=this.state,l=u.inputValue,s=u.opensInNewWindow,b=Object(_.prependHTTP)(l),p=L({url:b,opensInNewWindow:s,text:Object(o.getTextContent)(Object(o.slice)(r))});if(t.preventDefault(),Object(o.isCollapsed)(r)&&!n){var f=Object(o.applyFormat)(Object(o.create)({text:b}),p,0,b.length);i(Object(o.insert)(r,f))}else i(Object(o.applyFormat)(r,p));this.resetState(),x(b)?c(n?Object(a.__)("Link edited."):Object(a.__)("Link inserted."),"assertive"):c(Object(a.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")}},{key:"onClickOutside",value:function(t){var e=this.autocompleteRef.current;e&&e.contains(t.target)||this.resetState()}},{key:"resetState",value:function(){this.props.stopAddingLink(),this.setState({editLink:!1})}},{key:"render",value:function(){var t=this,e=this.props,n=e.isActive,r=e.activeAttributes.url,o=e.addingLink,c=e.value;if(!n&&!o)return null;var u=this.state,l=u.inputValue,s=u.opensInNewWindow,b=A(this.props,this.state);return Object(i.createElement)(I,{value:c,isActive:n,addingLink:o,onClickOutside:this.onClickOutside,onClose:this.resetState,focusOnMount:!!b&&"firstElement",renderSettings:function(){return Object(i.createElement)(O.ToggleControl,{label:Object(a.__)("Open in New Tab"),checked:s,onChange:t.setLinkTarget})}},b?Object(i.createElement)(P,{value:l,onChangeInputValue:this.onChangeInputValue,onKeyDown:this.onKeyDown,submitLink:this.submitLink,autocompleteRef:this.autocompleteRef}):Object(i.createElement)(F,{url:r,editLink:this.editLink}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeAttributes,r=n.url,o="_blank"===n.target;if(!A(t,e)){if(r!==e.inputValue)return{inputValue:r};if(o!==e.opensInNewWindow)return{opensInNewWindow:o}}return null}}]),e}(i.Component),D=Object(O.withSpokenMessages)(M),U={name:"core/link",title:Object(a.__)("Link"),tagName:"a",className:null,attributes:{url:"href",target:"target"},edit:Object(O.withSpokenMessages)(function(t){function e(){var t;return Object(b.a)(this,e),(t=Object(f.a)(this,Object(d.a)(e).apply(this,arguments))).addLink=t.addLink.bind(Object(h.a)(Object(h.a)(t))),t.stopAddingLink=t.stopAddingLink.bind(Object(h.a)(Object(h.a)(t))),t.onRemoveFormat=t.onRemoveFormat.bind(Object(h.a)(Object(h.a)(t))),t.state={addingLink:!1},t}return Object(m.a)(e,t),Object(p.a)(e,[{key:"addLink",value:function(){var t=this.props,e=t.value,n=t.onChange,r=Object(o.getTextContent)(Object(o.slice)(e));r&&Object(_.isURL)(r)?n(Object(o.applyFormat)(e,{type:"core/link",attributes:{url:r}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1})}},{key:"onRemoveFormat",value:function(){var t=this.props,e=t.value,n=t.onChange,r=t.speak;n(Object(o.removeFormat)(e,"core/link")),r(Object(a.__)("Link removed."),"assertive")}},{key:"render",value:function(){var t=this.props,e=t.isActive,n=t.activeAttributes,r=t.value,o=t.onChange;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"a",onUse:this.addLink}),Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"s",onUse:this.onRemoveFormat}),Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"k",onUse:this.addLink}),Object(i.createElement)(c.RichTextShortcut,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&Object(i.createElement)(c.RichTextToolbarButton,{name:"link",icon:"editor-unlink",title:Object(a.__)("Unlink"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&Object(i.createElement)(c.RichTextToolbarButton,{name:"link",icon:"admin-links",title:Object(a.__)("Link"),onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),Object(i.createElement)(D,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:n,value:r,onChange:o}))}}]),e}(i.Component))},V={name:"core/strikethrough",title:Object(a.__)("Strikethrough"),tagName:"s",className:null,edit:function(t){var e=t.isActive,n=t.value,r=t.onChange,u=function(){return r(Object(o.toggleFormat)(n,{type:"core/strikethrough"}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"access",character:"d",onUse:u}),Object(i.createElement)(c.RichTextToolbarButton,{icon:"editor-strikethrough",title:Object(a.__)("Strikethrough"),onClick:u,isActive:e,shortcutType:"access",shortcutCharacter:"d"}))}};[u,l,g,k,U,V,{name:"core/underline",title:Object(a.__)("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit:function(t){var e=t.value,n=t.onChange,r=function(){n(Object(o.toggleFormat)(e,{type:"core/underline",attributes:{style:"text-decoration: underline;"}}))};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.RichTextShortcut,{type:"primary",character:"u",onUse:r}),Object(i.createElement)(c.UnstableRichTextInputEvent,{inputType:"formatUnderline",onInput:r}))}}].forEach(function(t){var e=t.name,n=Object(r.a)(t,["name"]);return Object(o.registerFormatType)(e,n)})},4:function(t,e){!function(){t.exports=this.wp.components}()},7:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(15);function o(t){for(var e=1;e 2 && arguments[2] !== undefined ? arguments[2] : value.start; var endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : value.end; var formats = value.formats, - _value$activeFormats = value.activeFormats, - activeFormats = _value$activeFormats === void 0 ? [] : _value$activeFormats; + activeFormats = value.activeFormats; var newFormats = formats.slice(); // The selection is collapsed. if (startIndex === endIndex) { @@ -840,13 +839,7 @@ function applyFormat(value, format) { while (Object(external_lodash_["find"])(newFormats[endIndex], startFormat)) { applyFormats(newFormats, endIndex, format); endIndex++; - } // Otherwise, insert a placeholder with the format so new input appears - // with the format applied. - - } else { - return Object(objectSpread["a" /* default */])({}, value, { - activeFormats: [].concat(Object(toConsumableArray["a" /* default */])(activeFormats), [format]) - }); + } } } else { for (var index = startIndex; index < endIndex; index++) { @@ -855,7 +848,13 @@ function applyFormat(value, format) { } return normaliseFormats(Object(objectSpread["a" /* default */])({}, value, { - formats: newFormats + formats: newFormats, + // Always revise active formats. This serves as a placeholder for new + // inputs with the format so new input appears with the format applied, + // and ensures a format of the same type uses the latest values. + activeFormats: [].concat(Object(toConsumableArray["a" /* default */])(Object(external_lodash_["reject"])(activeFormats, { + type: format.type + })), [format]) })); } @@ -1980,12 +1979,6 @@ function removeFormat(value, formatType) { filterFormats(newFormats, endIndex, formatType); endIndex++; } - } else { - return Object(objectSpread["a" /* default */])({}, value, { - activeFormats: Object(external_lodash_["reject"])(activeFormats, { - type: formatType - }) - }); } } else { for (var i = startIndex; i < endIndex; i++) { @@ -1996,7 +1989,10 @@ function removeFormat(value, formatType) { } return normaliseFormats(Object(objectSpread["a" /* default */])({}, value, { - formats: newFormats + formats: newFormats, + activeFormats: Object(external_lodash_["reject"])(activeFormats, { + type: formatType + }) })); } diff --git a/wp-includes/js/dist/rich-text.min.js b/wp-includes/js/dist/rich-text.min.js index ef965918db..97f0c016c7 100644 --- a/wp-includes/js/dist/rich-text.min.js +++ b/wp-includes/js/dist/rich-text.min.js @@ -1 +1 @@ -this.wp=this.wp||{},this.wp.richText=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=361)}({0:function(e,t){!function(){e.exports=this.wp.element}()},15:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",function(){return n})},17:function(e,t,r){"use strict";var n=r(34);function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return Object(o.a)({},e,Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),l=r(30),s=Object(l.a)(function(e){return Object.values(e.formatTypes)},function(e){return[e.formatTypes]});function f(e,t){return e.formatTypes[t]}function d(e,t){return Object(c.find)(s(e),function(e){var r=e.tagName;return t===r})}function p(e,t){return Object(c.find)(s(e),function(e){var r=e.className;return null!==r&&" ".concat(t," ").indexOf(" ".concat(r," "))>=0})}function m(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(c.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}Object(i.registerStore)("core/rich-text",{reducer:u,selectors:n,actions:a});var g=r(17);function h(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;var a=Object.keys(r),i=Object.keys(n);if(a.length!==i.length)return!1;for(var o=a.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.activeFormats,u=void 0===i?[]:i,l=a.slice();if(r===n){var s=Object(c.find)(l[r],{type:t.type});if(!s)return Object(o.a)({},e,{activeFormats:[].concat(Object(g.a)(u),[t])});for(;Object(c.find)(l[r],s);)x(l,r,t),r--;for(n++;Object(c.find)(l[n],s);)x(l,n,t),n++}else for(var f=r;f0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,i=e.multilineTag,o=e.multilineWrapperTags,c=e.__unstableIsEditableTree;return"string"==typeof r&&r.length>0?{formats:Array(r.length),replacements:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=j(document,n)),"object"!==Object(O.a)(t)?{formats:[],replacements:[],text:""}:i?I({element:t,range:a,multilineTag:i,multilineWrapperTags:o,isEditableTree:c}):D({element:t,range:a,isEditableTree:c}))}function S(e,t,r,n){if(r){var a=t.parentNode,i=r.startContainer,o=r.startOffset,c=r.endContainer,u=r.endOffset,l=e.text.length;void 0!==n.start?e.start=l+n.start:t===i&&t.nodeType===F?e.start=l+o:a===i&&t===i.childNodes[o]?e.start=l:a===i&&t===i.childNodes[o-1]?e.start=l+n.text.length:t===i&&(e.start=l),void 0!==n.end?e.end=l+n.end:t===c&&t.nodeType===F?e.end=l+u:a===c&&t===c.childNodes[u-1]?e.end=l+n.text.length:a===c&&t===c.childNodes[u]?e.end=l:t===c&&(e.end=l+u)}}function P(e){return e.replace(/[\n\r\t]+/g," ")}function D(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,c=e.currentWrapperTags,u=void 0===c?[]:c,l=e.isEditableTree,s={formats:[],replacements:[],text:""};if(!t)return s;if(!t.hasChildNodes())return S(s,t,r,{formats:[],replacements:[],text:""}),s;for(var f=t.childNodes.length,d=function(e){var c=t.childNodes[e],f=c.nodeName.toLowerCase();if(c.nodeType===F){var d=P(c.nodeValue);return r=function(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,i=t.startOffset,o=t.endOffset;return e===n&&(i=r(e.nodeValue.slice(0,i)).length),e===a&&(o=r(e.nodeValue.slice(0,o)).length),{startContainer:n,startOffset:i,endContainer:a,endOffset:o}}}(c,r,P),S(s,c,r,{text:d}),s.formats.length+=d.length,s.replacements.length+=d.length,s.text+=d,"continue"}if(c.nodeType!==C)return"continue";if(c.getAttribute("data-rich-text-padding")||l&&"br"===f&&!c.getAttribute("data-rich-text-line-break"))return S(s,c,r,{formats:[],replacements:[],text:""}),"continue";if("br"===f)return S(s,c,r,{formats:[],replacements:[],text:""}),M(s,A({text:"\n"})),"continue";var p=s.formats[s.formats.length-1],m=p&&p[p.length-1],v=function(e){var t,r=e.type,n=e.attributes;if(n&&n.class&&(t=Object(i.select)("core/rich-text").getFormatTypeForClassName(n.class))&&(n.class=" ".concat(n.class," ").replace(" ".concat(t.className," ")," ").trim(),n.class||delete n.class),t||(t=Object(i.select)("core/rich-text").getFormatTypeForBareElement(r)),!t)return n?{type:r,attributes:n}:{type:r};if(t.__experimentalCreatePrepareEditableTree&&!t.__experimentalCreateOnChangeEditableValue)return null;if(!n)return{type:t.name};var a={},o={};for(var c in n){var u=N(t.attributes,c);u?a[u]=n[c]:o[c]=n[c]}return{type:t.name,attributes:a,unregisteredAttributes:o}}({type:f,attributes:k({element:c})}),b=h(v,m)?m:v;if(a&&-1!==a.indexOf(f)){var y=I({element:c,range:r,multilineTag:n,multilineWrapperTags:a,currentWrapperTags:[].concat(Object(g.a)(u),[b]),isEditableTree:l});return S(s,c,r,y),M(s,y),"continue"}var x=D({element:c,range:r,multilineTag:n,multilineWrapperTags:a,isEditableTree:l});S(s,c,r,x),b?0===x.text.length?b.attributes&&M(s,{formats:[,],replacements:[b],text:w}):M(s,Object(o.a)({},x,{formats:Array.from(x.formats,function(e){return e?[b].concat(Object(g.a)(e)):[b]})})):M(s,x)},p=0;p0)&&M(u,{formats:[,],replacements:o.length>0?[o]:[,],text:E}),S(u,f,r,d),M(u,d)}}return u}function k(e){var t=e.element;if(t.hasAttributes()){for(var r,n=t.attributes.length,a=0;a1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=A({text:t})),b(e.reduce(function(e,r){var n=r.formats,a=r.replacements,i=r.text;return{formats:e.formats.concat(t.formats,n),replacements:e.replacements.concat(t.replacements,a),text:e.text+t.text+i}}))}var $=r(15),X=r(19),Z=r(0),K=r(41),J=r.n(K),Q=r(26),ee=r(6),te=[];function re(e,t){if("string"==typeof(t=Object(o.a)({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(i.select)("core/rich-text").getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){var r=Object(i.select)("core/rich-text").getFormatTypeForBareElement(t.tagName);if(r)return void window.console.error('Format "'.concat(r.name,'" is already registered to handle bare tag name "').concat(t.tagName,'".'))}else{var n=Object(i.select)("core/rich-text").getFormatTypeForClassName(t.className);if(n)return void window.console.error('Format "'.concat(n.name,'" is already registered to handle class name "').concat(t.className,'".'))}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title){Object(i.dispatch)("core/rich-text").addFormatTypes(t);var a=J()(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0;return[].concat(Object(g.a)(e),[t])});return t.__experimentalCreatePrepareEditableTree&&Object(Q.addFilter)("experimentalRichText",e,function(r){var n=r;(t.__experimentalCreatePrepareEditableTree||t.__experimentalCreateFormatToValue||t.__experimentalCreateValueToFormat)&&(n=function(n){var i={};if(t.__experimentalCreatePrepareEditableTree&&(i.prepareEditableTree=a(n.prepareEditableTree,t.__experimentalCreatePrepareEditableTree(n["format_".concat(e)],{richTextIdentifier:n.identifier,blockClientId:n.clientId}))),t.__experimentalCreateOnChangeEditableValue){var c=Object.keys(n).reduce(function(t,r){var a=n[r],i="format_".concat(e,"_dispatch_");r.startsWith(i)&&(t[r.replace(i,"")]=a);return t},{});i.onChangeEditableValue=a(n.onChangeEditableValue,t.__experimentalCreateOnChangeEditableValue(Object(o.a)({},n["format_".concat(e)],c),{richTextIdentifier:n.identifier,blockClientId:n.clientId}))}return Object(Z.createElement)(r,Object(X.a)({},n,i))});var u=[];return t.__experimentalGetPropsForEditableTreePreparation&&u.push(Object(i.withSelect)(function(r,n){var a=n.clientId,i=n.identifier;return Object($.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:i,blockClientId:a}))})),t.__experimentalGetPropsForEditableTreeChangeHandler&&u.push(Object(i.withDispatch)(function(r,n){var a=n.clientId,i=n.identifier,o=t.__experimentalGetPropsForEditableTreeChangeHandler(r,{richTextIdentifier:i,blockClientId:a});return Object(c.mapKeys)(o,function(t,r){return"format_".concat(e,"_dispatch_").concat(r)})})),Object(ee.compose)(u)(n)}),t}window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.activeFormats,u=a.slice();if(r===n){var l=Object(c.find)(u[r],{type:t});if(!l)return Object(o.a)({},e,{activeFormats:Object(c.reject)(i,{type:t})});for(;Object(c.find)(u[r],l);)ae(u,r,t),r--;for(n++;Object(c.find)(u[n],l);)ae(u,n,t),n++}else for(var s=r;s2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.replacements,o=e.text;"string"==typeof t&&(t=A({text:t}));var c=r+t.text.length;return b({formats:a.slice(0,r).concat(t.formats,a.slice(n)),replacements:i.slice(0,r).concat(t.replacements,i.slice(n)),text:o.slice(0,r)+t.text+o.slice(n),start:c,end:c})}function oe(e,t,r){return ie(e,A(),t,r)}function ce(e,t,r){var n=e.formats,a=e.replacements,i=e.text,o=e.start,c=e.end;return i=i.replace(t,function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),u=1;u1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=H(e).slice(0,t).lastIndexOf(E),a=e.replacements[n],i=[,];return a&&(i=[a]),ie(e,{formats:[,],replacements:i,text:E},t,r)}var se="";function fe(e,t,r,n){return ie(e,{formats:[,],replacements:[t],text:se},r,n)}function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=e.formats,a=e.replacements,i=e.text;return void 0===t||void 0===r?Object(o.a)({},e):{formats:n.slice(t,r),replacements:a.slice(t,r),text:i.slice(t,r)}}function pe(e,t){var r=e.formats,n=e.replacements,a=e.text,i=e.start,o=e.end;if("string"!=typeof t)return function(e){var t=e.formats,r=e.replacements,n=e.text,a=e.start,i=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u={formats:t.slice(0,o),replacements:r.slice(0,o),text:n.slice(0,o)},l={formats:t.slice(c),replacements:r.slice(c),text:n.slice(c),start:0,end:0};return[ce(u,/\u2028+$/,""),ce(l,/^\u2028+/,"")]}.apply(void 0,arguments);var c=0;return a.split(t).map(function(e){var a=c,u={formats:r.slice(a,a+e.length),replacements:n.slice(a,a+e.length),text:e};return c+=t.length+e.length,void 0!==i&&void 0!==o&&(i>=a&&ia&&(u.start=0),o>=a&&oc&&(u.end=e.length)),u})}function me(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=e.boundaryClass,u=function(e){return Object(i.select)("core/rich-text").getFormatType(e)}(t),l={};if(c&&(l["data-rich-text-format-boundary"]="true"),!u)return r&&(l=Object(o.a)({},r,l)),{type:t,attributes:l,object:a};for(var s in l=Object(o.a)({},n,l),r){var f=!!u.attributes&&u.attributes[s];f?l[f]=r[s]:l[s]=r[s]}return u.className&&(l.class?l.class="".concat(u.className," ").concat(l.class):l.class=u.className),{type:u.tagName,object:u.object,attributes:l}}var ve={type:"br",attributes:{"data-rich-text-padding":"true"},object:!0};function ge(e){var t,r,n,a=e.value,i=e.multilineTag,c=e.createEmpty,u=e.append,l=e.getLastChild,s=e.getParent,f=e.isText,d=e.getText,p=e.remove,m=e.appendText,v=e.onStartIndex,h=e.onEndIndex,b=e.isEditableTree,y=a.formats,x=a.replacements,T=a.text,O=a.start,j=a.end,_=y.length+1,F=c(),C={type:i},N=V(a),A=N[N.length-1];i?(u(u(F,{type:i}),""),r=t=[C]):u(F,"");for(var S=function(e){var a=T.charAt(e),c=b&&(!n||n===E||"\n"===n),_=y[e];i&&(_=a===E?t=(x[e]||[]).reduce(function(e,t){return e.push(t,C),e},[C]):[].concat(Object(g.a)(t),Object(g.a)(_||[])));var N=l(F);if(c&&a===E){for(var S=N;!f(S);)S=l(S);u(s(S),ve),u(s(S),"")}if(n===E){for(var P=N;!f(P);)P=l(P);v&&O===e&&v(F,P),h&&j===e&&h(F,P)}if(_&&_.forEach(function(e,t){if(!N||!r||e!==r[t]||a===E&&_.length-1===t){var n=e.type,i=e.attributes,o=e.unregisteredAttributes,c=b&&a!==E&&e===A,m=s(N),v=u(m,me({type:n,attributes:i,unregisteredAttributes:o,boundaryClass:c}));f(N)&&0===d(N).length&&p(N),N=u(v,"")}else N=l(N)}),a===E)return r=_,n=a,"continue";0===e&&(v&&0===O&&v(F,N),h&&0===j&&h(F,N)),a===w?(N=u(s(N),me(Object(o.a)({},x[e],{object:!0}))),N=u(s(N),"")):"\n"===a?(N=u(s(N),{type:"br",attributes:b?{"data-rich-text-line-break":"true"}:void 0,object:!0}),N=u(s(N),"")):f(N)?m(N,a):N=u(s(N),a),v&&O===e+1&&v(F,N),h&&j===e+1&&h(F,N),c&&e===T.length&&u(s(N),ve),r=_,n=a},P=0;P<_;P++)S(P);return F}var he=window.Node.TEXT_NODE;function be(e,t,r){for(var n=e.parentNode,a=0;e=e.previousSibling;)a++;return r=[a].concat(Object(g.a)(r)),n!==t&&(r=be(n,t,r)),r}function ye(e,t){for(t=Object(g.a)(t);e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}var xe=function(){return j(document,"")};function Te(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var i in t=e.ownerDocument.createElement(n),a)t.setAttribute(i,a[i]);return e.appendChild(t)}function Oe(e,t){e.appendData(t)}function je(e){return e.lastChild}function Ee(e){return e.parentNode}function we(e){return e.nodeType===he}function _e(e){return e.nodeValue}function Fe(e){return e.parentNode.removeChild(e)}function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce(function(e,r){return r(e,t.text)},t.formats)}function Ne(e){var t=e.value,r=e.multilineTag,n=e.prepareEditableTree,a=e.isEditableTree,i=void 0===a||a,c=[],u=[];return{body:ge({value:Object(o.a)({},t,{formats:Ce(n,t)}),multilineTag:r,createEmpty:xe,append:Te,getLastChild:je,getParent:Ee,isText:we,getText:_e,remove:Fe,appendText:Oe,onStartIndex:function(e,t){c=be(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){u=be(t,e,[t.nodeValue.length])},isEditableTree:i}),selection:{startPath:c,endPath:u}}}function Ae(e){var t=e.value,r=e.current,n=e.multilineTag,a=e.prepareEditableTree,i=e.__unstableDomOnly,o=Ne({value:t,multilineTag:n,prepareEditableTree:a}),c=o.body,u=o.selection;!function e(t,r){var n=0;var a;for(;a=t.firstChild;){var i=r.childNodes[n];if(i)if(i.isEqualNode(a))t.removeChild(a);else if(i.nodeName!==a.nodeName||i.nodeType===he&&i.data!==a.data)r.replaceChild(a,i);else{var o=i.attributes,c=a.attributes;if(o)for(var u=0;u0){if(p=d,m=s.getRangeAt(0),p.startContainer===m.startContainer&&p.startOffset===m.startOffset&&p.endContainer===m.endContainer&&p.endOffset===m.endOffset)return void(f.activeElement!==t&&t.focus());s.removeAllRanges()}var p,m;s.addRange(d)}(u,r)}var Se=r(69);function Pe(e){return ze(ge({value:e.value,multilineTag:e.multilineTag,createEmpty:De,append:ke,getLastChild:Ie,getParent:Le,isText:Ve,getText:Re,remove:We,appendText:Me}).children)}function De(){return{}}function Ie(e){var t=e.children;return t&&t[t.length-1]}function ke(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Me(e,t){e.text+=t}function Le(e){return e.parent}function Ve(e){return"string"==typeof e.text}function Re(e){return e.text}function We(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function ze(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return void 0===e.text?function(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,i="";for(var o in r)Object(Se.isValidAttributeName)(o)&&(i+=" ".concat(o,'="').concat(Object(Se.escapeAttribute)(r[o]),'"'));return n?"<".concat(t).concat(i,">"):"<".concat(t).concat(i,">").concat(ze(a),"")}(e):Object(Se.escapeHTML)(e.text)}).join("")}function Be(e,t){return R(e,t.type)?ne(e,t.type):y(e,t)}function He(e){var t=Object(i.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(Q.removeFilter)("experimentalRichText",e),Object(i.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}function Ge(e){for(var t=e.start,r=e.text,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;n--;)if(r[n]===E)return n}function Ye(e,t){var r=Ge(e);if(void 0===r)return e;var n=e.text,a=e.replacements,i=e.end,c=Ge(e,r),u=a[r]||[],l=a[c]||[];if(u.length>l.length)return e;for(var s=a.slice(),f=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],i=t;i-- >=0;)if(r[i]===E){var o=n[i]||[];if(o.length===a.length+1)return i;if(o.length<=a.length)return}}(e,r),d=r;d=0;){if(r[i]===E)if((n[i]||[]).length===a.length-1)return i}}function Ue(e){var t=e.text,r=e.replacements,n=e.start,a=e.end,i=Ge(e,n);if(void 0===r[i])return e;for(var c=r.slice(0),u=r[qe(e,i)]||[],l=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],i=t,o=t||0;o=a.length))return i;i=o}return i}(e,Ge(e,a)),s=i;s<=l;s++)if(t[s]===E){var f=c[s]||[];c[s]=u.concat(f.slice(u.length+1)),0===c[s].length&&delete c[s]}return Object(o.a)({},e,{replacements:c})}function $e(e,t){for(var r,n=e.text,a=e.replacements,i=e.start,c=e.end,u=Ge(e,i),l=a[u]||[],s=a[Ge(e,c)]||[],f=qe(e,u),d=a.slice(),p=l.length-1,m=s.length-1,v=f+1||0;vm?e:t}))}return r?Object(o.a)({},e,{replacements:d}):e}function Xe(e){var t=e.value,r=e.start,n=e.end,a=e.formats,i=t.formats[r-1]||[],o=t.formats[n]||[];for(t.activeFormats=a.map(function(e,t){if(i[t]){if(h(e,i[t]))return i[t]}else if(o[t]&&h(e,o[t]))return o[t];return e});--n>=r;)t.activeFormats.length>0?t.formats[n]=t.activeFormats:delete t.formats[n];return t}r.d(t,"applyFormat",function(){return y}),r.d(t,"charAt",function(){return T}),r.d(t,"concat",function(){return L}),r.d(t,"create",function(){return A}),r.d(t,"getActiveFormat",function(){return R}),r.d(t,"getActiveObject",function(){return W}),r.d(t,"getSelectionEnd",function(){return z}),r.d(t,"getSelectionStart",function(){return B}),r.d(t,"getTextContent",function(){return H}),r.d(t,"isCollapsed",function(){return G}),r.d(t,"isEmpty",function(){return Y}),r.d(t,"isEmptyLine",function(){return q}),r.d(t,"join",function(){return U}),r.d(t,"registerFormatType",function(){return re}),r.d(t,"removeFormat",function(){return ne}),r.d(t,"remove",function(){return oe}),r.d(t,"replace",function(){return ce}),r.d(t,"insert",function(){return ie}),r.d(t,"insertLineBreak",function(){return ue}),r.d(t,"insertLineSeparator",function(){return le}),r.d(t,"insertObject",function(){return fe}),r.d(t,"slice",function(){return de}),r.d(t,"split",function(){return pe}),r.d(t,"apply",function(){return Ae}),r.d(t,"unstableToDom",function(){return Ne}),r.d(t,"toHTMLString",function(){return Pe}),r.d(t,"toggleFormat",function(){return Be}),r.d(t,"LINE_SEPARATOR",function(){return E}),r.d(t,"unregisterFormatType",function(){return He}),r.d(t,"indentListItems",function(){return Ye}),r.d(t,"outdentListItems",function(){return Ue}),r.d(t,"changeListType",function(){return $e}),r.d(t,"__unstableUpdateFormats",function(){return Xe}),r.d(t,"__unstableGetActiveFormats",function(){return V})},41:function(e,t,r){e.exports=function(e,t){var r,n,a,i=0;function o(){var t,o,c=n,u=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return Object(o.a)({},e,Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),l=r(30),s=Object(l.a)(function(e){return Object.values(e.formatTypes)},function(e){return[e.formatTypes]});function f(e,t){return e.formatTypes[t]}function d(e,t){return Object(c.find)(s(e),function(e){var r=e.tagName;return t===r})}function p(e,t){return Object(c.find)(s(e),function(e){var r=e.className;return null!==r&&" ".concat(t," ").indexOf(" ".concat(r," "))>=0})}function m(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(c.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}Object(i.registerStore)("core/rich-text",{reducer:u,selectors:n,actions:a});var g=r(17);function h(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;var a=Object.keys(r),i=Object.keys(n);if(a.length!==i.length)return!1;for(var o=a.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.activeFormats,u=a.slice();if(r===n){var l=Object(c.find)(u[r],{type:t.type});if(l){for(;Object(c.find)(u[r],l);)x(u,r,t),r--;for(n++;Object(c.find)(u[n],l);)x(u,n,t),n++}}else for(var s=r;s0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,i=e.multilineTag,o=e.multilineWrapperTags,c=e.__unstableIsEditableTree;return"string"==typeof r&&r.length>0?{formats:Array(r.length),replacements:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=j(document,n)),"object"!==Object(O.a)(t)?{formats:[],replacements:[],text:""}:i?I({element:t,range:a,multilineTag:i,multilineWrapperTags:o,isEditableTree:c}):D({element:t,range:a,isEditableTree:c}))}function S(e,t,r,n){if(r){var a=t.parentNode,i=r.startContainer,o=r.startOffset,c=r.endContainer,u=r.endOffset,l=e.text.length;void 0!==n.start?e.start=l+n.start:t===i&&t.nodeType===F?e.start=l+o:a===i&&t===i.childNodes[o]?e.start=l:a===i&&t===i.childNodes[o-1]?e.start=l+n.text.length:t===i&&(e.start=l),void 0!==n.end?e.end=l+n.end:t===c&&t.nodeType===F?e.end=l+u:a===c&&t===c.childNodes[u-1]?e.end=l+n.text.length:a===c&&t===c.childNodes[u]?e.end=l:t===c&&(e.end=l+u)}}function P(e){return e.replace(/[\n\r\t]+/g," ")}function D(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,c=e.currentWrapperTags,u=void 0===c?[]:c,l=e.isEditableTree,s={formats:[],replacements:[],text:""};if(!t)return s;if(!t.hasChildNodes())return S(s,t,r,{formats:[],replacements:[],text:""}),s;for(var f=t.childNodes.length,d=function(e){var c=t.childNodes[e],f=c.nodeName.toLowerCase();if(c.nodeType===F){var d=P(c.nodeValue);return r=function(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,i=t.startOffset,o=t.endOffset;return e===n&&(i=r(e.nodeValue.slice(0,i)).length),e===a&&(o=r(e.nodeValue.slice(0,o)).length),{startContainer:n,startOffset:i,endContainer:a,endOffset:o}}}(c,r,P),S(s,c,r,{text:d}),s.formats.length+=d.length,s.replacements.length+=d.length,s.text+=d,"continue"}if(c.nodeType!==C)return"continue";if(c.getAttribute("data-rich-text-padding")||l&&"br"===f&&!c.getAttribute("data-rich-text-line-break"))return S(s,c,r,{formats:[],replacements:[],text:""}),"continue";if("br"===f)return S(s,c,r,{formats:[],replacements:[],text:""}),M(s,A({text:"\n"})),"continue";var p=s.formats[s.formats.length-1],m=p&&p[p.length-1],v=function(e){var t,r=e.type,n=e.attributes;if(n&&n.class&&(t=Object(i.select)("core/rich-text").getFormatTypeForClassName(n.class))&&(n.class=" ".concat(n.class," ").replace(" ".concat(t.className," ")," ").trim(),n.class||delete n.class),t||(t=Object(i.select)("core/rich-text").getFormatTypeForBareElement(r)),!t)return n?{type:r,attributes:n}:{type:r};if(t.__experimentalCreatePrepareEditableTree&&!t.__experimentalCreateOnChangeEditableValue)return null;if(!n)return{type:t.name};var a={},o={};for(var c in n){var u=N(t.attributes,c);u?a[u]=n[c]:o[c]=n[c]}return{type:t.name,attributes:a,unregisteredAttributes:o}}({type:f,attributes:k({element:c})}),b=h(v,m)?m:v;if(a&&-1!==a.indexOf(f)){var y=I({element:c,range:r,multilineTag:n,multilineWrapperTags:a,currentWrapperTags:[].concat(Object(g.a)(u),[b]),isEditableTree:l});return S(s,c,r,y),M(s,y),"continue"}var x=D({element:c,range:r,multilineTag:n,multilineWrapperTags:a,isEditableTree:l});S(s,c,r,x),b?0===x.text.length?b.attributes&&M(s,{formats:[,],replacements:[b],text:w}):M(s,Object(o.a)({},x,{formats:Array.from(x.formats,function(e){return e?[b].concat(Object(g.a)(e)):[b]})})):M(s,x)},p=0;p0)&&M(u,{formats:[,],replacements:o.length>0?[o]:[,],text:E}),S(u,f,r,d),M(u,d)}}return u}function k(e){var t=e.element;if(t.hasAttributes()){for(var r,n=t.attributes.length,a=0;a1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=A({text:t})),b(e.reduce(function(e,r){var n=r.formats,a=r.replacements,i=r.text;return{formats:e.formats.concat(t.formats,n),replacements:e.replacements.concat(t.replacements,a),text:e.text+t.text+i}}))}var $=r(15),X=r(19),Z=r(0),K=r(41),J=r.n(K),Q=r(26),ee=r(6),te=[];function re(e,t){if("string"==typeof(t=Object(o.a)({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(i.select)("core/rich-text").getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){var r=Object(i.select)("core/rich-text").getFormatTypeForBareElement(t.tagName);if(r)return void window.console.error('Format "'.concat(r.name,'" is already registered to handle bare tag name "').concat(t.tagName,'".'))}else{var n=Object(i.select)("core/rich-text").getFormatTypeForClassName(t.className);if(n)return void window.console.error('Format "'.concat(n.name,'" is already registered to handle class name "').concat(t.className,'".'))}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title){Object(i.dispatch)("core/rich-text").addFormatTypes(t);var a=J()(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0;return[].concat(Object(g.a)(e),[t])});return t.__experimentalCreatePrepareEditableTree&&Object(Q.addFilter)("experimentalRichText",e,function(r){var n=r;(t.__experimentalCreatePrepareEditableTree||t.__experimentalCreateFormatToValue||t.__experimentalCreateValueToFormat)&&(n=function(n){var i={};if(t.__experimentalCreatePrepareEditableTree&&(i.prepareEditableTree=a(n.prepareEditableTree,t.__experimentalCreatePrepareEditableTree(n["format_".concat(e)],{richTextIdentifier:n.identifier,blockClientId:n.clientId}))),t.__experimentalCreateOnChangeEditableValue){var c=Object.keys(n).reduce(function(t,r){var a=n[r],i="format_".concat(e,"_dispatch_");r.startsWith(i)&&(t[r.replace(i,"")]=a);return t},{});i.onChangeEditableValue=a(n.onChangeEditableValue,t.__experimentalCreateOnChangeEditableValue(Object(o.a)({},n["format_".concat(e)],c),{richTextIdentifier:n.identifier,blockClientId:n.clientId}))}return Object(Z.createElement)(r,Object(X.a)({},n,i))});var u=[];return t.__experimentalGetPropsForEditableTreePreparation&&u.push(Object(i.withSelect)(function(r,n){var a=n.clientId,i=n.identifier;return Object($.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:i,blockClientId:a}))})),t.__experimentalGetPropsForEditableTreeChangeHandler&&u.push(Object(i.withDispatch)(function(r,n){var a=n.clientId,i=n.identifier,o=t.__experimentalGetPropsForEditableTreeChangeHandler(r,{richTextIdentifier:i,blockClientId:a});return Object(c.mapKeys)(o,function(t,r){return"format_".concat(e,"_dispatch_").concat(r)})})),Object(ee.compose)(u)(n)}),t}window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.activeFormats,u=a.slice();if(r===n){var l=Object(c.find)(u[r],{type:t});if(l){for(;Object(c.find)(u[r],l);)ae(u,r,t),r--;for(n++;Object(c.find)(u[n],l);)ae(u,n,t),n++}}else for(var s=r;s2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.replacements,o=e.text;"string"==typeof t&&(t=A({text:t}));var c=r+t.text.length;return b({formats:a.slice(0,r).concat(t.formats,a.slice(n)),replacements:i.slice(0,r).concat(t.replacements,i.slice(n)),text:o.slice(0,r)+t.text+o.slice(n),start:c,end:c})}function oe(e,t,r){return ie(e,A(),t,r)}function ce(e,t,r){var n=e.formats,a=e.replacements,i=e.text,o=e.start,c=e.end;return i=i.replace(t,function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),u=1;u1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=H(e).slice(0,t).lastIndexOf(E),a=e.replacements[n],i=[,];return a&&(i=[a]),ie(e,{formats:[,],replacements:i,text:E},t,r)}var se="";function fe(e,t,r,n){return ie(e,{formats:[,],replacements:[t],text:se},r,n)}function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=e.formats,a=e.replacements,i=e.text;return void 0===t||void 0===r?Object(o.a)({},e):{formats:n.slice(t,r),replacements:a.slice(t,r),text:i.slice(t,r)}}function pe(e,t){var r=e.formats,n=e.replacements,a=e.text,i=e.start,o=e.end;if("string"!=typeof t)return function(e){var t=e.formats,r=e.replacements,n=e.text,a=e.start,i=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u={formats:t.slice(0,o),replacements:r.slice(0,o),text:n.slice(0,o)},l={formats:t.slice(c),replacements:r.slice(c),text:n.slice(c),start:0,end:0};return[ce(u,/\u2028+$/,""),ce(l,/^\u2028+/,"")]}.apply(void 0,arguments);var c=0;return a.split(t).map(function(e){var a=c,u={formats:r.slice(a,a+e.length),replacements:n.slice(a,a+e.length),text:e};return c+=t.length+e.length,void 0!==i&&void 0!==o&&(i>=a&&ia&&(u.start=0),o>=a&&oc&&(u.end=e.length)),u})}function me(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=e.boundaryClass,u=function(e){return Object(i.select)("core/rich-text").getFormatType(e)}(t),l={};if(c&&(l["data-rich-text-format-boundary"]="true"),!u)return r&&(l=Object(o.a)({},r,l)),{type:t,attributes:l,object:a};for(var s in l=Object(o.a)({},n,l),r){var f=!!u.attributes&&u.attributes[s];f?l[f]=r[s]:l[s]=r[s]}return u.className&&(l.class?l.class="".concat(u.className," ").concat(l.class):l.class=u.className),{type:u.tagName,object:u.object,attributes:l}}var ve={type:"br",attributes:{"data-rich-text-padding":"true"},object:!0};function ge(e){var t,r,n,a=e.value,i=e.multilineTag,c=e.createEmpty,u=e.append,l=e.getLastChild,s=e.getParent,f=e.isText,d=e.getText,p=e.remove,m=e.appendText,v=e.onStartIndex,h=e.onEndIndex,b=e.isEditableTree,y=a.formats,x=a.replacements,T=a.text,O=a.start,j=a.end,_=y.length+1,F=c(),C={type:i},N=V(a),A=N[N.length-1];i?(u(u(F,{type:i}),""),r=t=[C]):u(F,"");for(var S=function(e){var a=T.charAt(e),c=b&&(!n||n===E||"\n"===n),_=y[e];i&&(_=a===E?t=(x[e]||[]).reduce(function(e,t){return e.push(t,C),e},[C]):[].concat(Object(g.a)(t),Object(g.a)(_||[])));var N=l(F);if(c&&a===E){for(var S=N;!f(S);)S=l(S);u(s(S),ve),u(s(S),"")}if(n===E){for(var P=N;!f(P);)P=l(P);v&&O===e&&v(F,P),h&&j===e&&h(F,P)}if(_&&_.forEach(function(e,t){if(!N||!r||e!==r[t]||a===E&&_.length-1===t){var n=e.type,i=e.attributes,o=e.unregisteredAttributes,c=b&&a!==E&&e===A,m=s(N),v=u(m,me({type:n,attributes:i,unregisteredAttributes:o,boundaryClass:c}));f(N)&&0===d(N).length&&p(N),N=u(v,"")}else N=l(N)}),a===E)return r=_,n=a,"continue";0===e&&(v&&0===O&&v(F,N),h&&0===j&&h(F,N)),a===w?(N=u(s(N),me(Object(o.a)({},x[e],{object:!0}))),N=u(s(N),"")):"\n"===a?(N=u(s(N),{type:"br",attributes:b?{"data-rich-text-line-break":"true"}:void 0,object:!0}),N=u(s(N),"")):f(N)?m(N,a):N=u(s(N),a),v&&O===e+1&&v(F,N),h&&j===e+1&&h(F,N),c&&e===T.length&&u(s(N),ve),r=_,n=a},P=0;P<_;P++)S(P);return F}var he=window.Node.TEXT_NODE;function be(e,t,r){for(var n=e.parentNode,a=0;e=e.previousSibling;)a++;return r=[a].concat(Object(g.a)(r)),n!==t&&(r=be(n,t,r)),r}function ye(e,t){for(t=Object(g.a)(t);e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}var xe=function(){return j(document,"")};function Te(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var i in t=e.ownerDocument.createElement(n),a)t.setAttribute(i,a[i]);return e.appendChild(t)}function Oe(e,t){e.appendData(t)}function je(e){return e.lastChild}function Ee(e){return e.parentNode}function we(e){return e.nodeType===he}function _e(e){return e.nodeValue}function Fe(e){return e.parentNode.removeChild(e)}function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce(function(e,r){return r(e,t.text)},t.formats)}function Ne(e){var t=e.value,r=e.multilineTag,n=e.prepareEditableTree,a=e.isEditableTree,i=void 0===a||a,c=[],u=[];return{body:ge({value:Object(o.a)({},t,{formats:Ce(n,t)}),multilineTag:r,createEmpty:xe,append:Te,getLastChild:je,getParent:Ee,isText:we,getText:_e,remove:Fe,appendText:Oe,onStartIndex:function(e,t){c=be(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){u=be(t,e,[t.nodeValue.length])},isEditableTree:i}),selection:{startPath:c,endPath:u}}}function Ae(e){var t=e.value,r=e.current,n=e.multilineTag,a=e.prepareEditableTree,i=e.__unstableDomOnly,o=Ne({value:t,multilineTag:n,prepareEditableTree:a}),c=o.body,u=o.selection;!function e(t,r){var n=0;var a;for(;a=t.firstChild;){var i=r.childNodes[n];if(i)if(i.isEqualNode(a))t.removeChild(a);else if(i.nodeName!==a.nodeName||i.nodeType===he&&i.data!==a.data)r.replaceChild(a,i);else{var o=i.attributes,c=a.attributes;if(o)for(var u=0;u0){if(p=d,m=s.getRangeAt(0),p.startContainer===m.startContainer&&p.startOffset===m.startOffset&&p.endContainer===m.endContainer&&p.endOffset===m.endOffset)return void(f.activeElement!==t&&t.focus());s.removeAllRanges()}var p,m;s.addRange(d)}(u,r)}var Se=r(69);function Pe(e){return ze(ge({value:e.value,multilineTag:e.multilineTag,createEmpty:De,append:ke,getLastChild:Ie,getParent:Le,isText:Ve,getText:Re,remove:We,appendText:Me}).children)}function De(){return{}}function Ie(e){var t=e.children;return t&&t[t.length-1]}function ke(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Me(e,t){e.text+=t}function Le(e){return e.parent}function Ve(e){return"string"==typeof e.text}function Re(e){return e.text}function We(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function ze(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return void 0===e.text?function(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,i="";for(var o in r)Object(Se.isValidAttributeName)(o)&&(i+=" ".concat(o,'="').concat(Object(Se.escapeAttribute)(r[o]),'"'));return n?"<".concat(t).concat(i,">"):"<".concat(t).concat(i,">").concat(ze(a),"")}(e):Object(Se.escapeHTML)(e.text)}).join("")}function Be(e,t){return R(e,t.type)?ne(e,t.type):y(e,t)}function He(e){var t=Object(i.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(Q.removeFilter)("experimentalRichText",e),Object(i.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}function Ge(e){for(var t=e.start,r=e.text,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;n--;)if(r[n]===E)return n}function Ye(e,t){var r=Ge(e);if(void 0===r)return e;var n=e.text,a=e.replacements,i=e.end,c=Ge(e,r),u=a[r]||[],l=a[c]||[];if(u.length>l.length)return e;for(var s=a.slice(),f=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],i=t;i-- >=0;)if(r[i]===E){var o=n[i]||[];if(o.length===a.length+1)return i;if(o.length<=a.length)return}}(e,r),d=r;d=0;){if(r[i]===E)if((n[i]||[]).length===a.length-1)return i}}function Ue(e){var t=e.text,r=e.replacements,n=e.start,a=e.end,i=Ge(e,n);if(void 0===r[i])return e;for(var c=r.slice(0),u=r[qe(e,i)]||[],l=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],i=t,o=t||0;o=a.length))return i;i=o}return i}(e,Ge(e,a)),s=i;s<=l;s++)if(t[s]===E){var f=c[s]||[];c[s]=u.concat(f.slice(u.length+1)),0===c[s].length&&delete c[s]}return Object(o.a)({},e,{replacements:c})}function $e(e,t){for(var r,n=e.text,a=e.replacements,i=e.start,c=e.end,u=Ge(e,i),l=a[u]||[],s=a[Ge(e,c)]||[],f=qe(e,u),d=a.slice(),p=l.length-1,m=s.length-1,v=f+1||0;vm?e:t}))}return r?Object(o.a)({},e,{replacements:d}):e}function Xe(e){var t=e.value,r=e.start,n=e.end,a=e.formats,i=t.formats[r-1]||[],o=t.formats[n]||[];for(t.activeFormats=a.map(function(e,t){if(i[t]){if(h(e,i[t]))return i[t]}else if(o[t]&&h(e,o[t]))return o[t];return e});--n>=r;)t.activeFormats.length>0?t.formats[n]=t.activeFormats:delete t.formats[n];return t}r.d(t,"applyFormat",function(){return y}),r.d(t,"charAt",function(){return T}),r.d(t,"concat",function(){return L}),r.d(t,"create",function(){return A}),r.d(t,"getActiveFormat",function(){return R}),r.d(t,"getActiveObject",function(){return W}),r.d(t,"getSelectionEnd",function(){return z}),r.d(t,"getSelectionStart",function(){return B}),r.d(t,"getTextContent",function(){return H}),r.d(t,"isCollapsed",function(){return G}),r.d(t,"isEmpty",function(){return Y}),r.d(t,"isEmptyLine",function(){return q}),r.d(t,"join",function(){return U}),r.d(t,"registerFormatType",function(){return re}),r.d(t,"removeFormat",function(){return ne}),r.d(t,"remove",function(){return oe}),r.d(t,"replace",function(){return ce}),r.d(t,"insert",function(){return ie}),r.d(t,"insertLineBreak",function(){return ue}),r.d(t,"insertLineSeparator",function(){return le}),r.d(t,"insertObject",function(){return fe}),r.d(t,"slice",function(){return de}),r.d(t,"split",function(){return pe}),r.d(t,"apply",function(){return Ae}),r.d(t,"unstableToDom",function(){return Ne}),r.d(t,"toHTMLString",function(){return Pe}),r.d(t,"toggleFormat",function(){return Be}),r.d(t,"LINE_SEPARATOR",function(){return E}),r.d(t,"unregisterFormatType",function(){return He}),r.d(t,"indentListItems",function(){return Ye}),r.d(t,"outdentListItems",function(){return Ue}),r.d(t,"changeListType",function(){return $e}),r.d(t,"__unstableUpdateFormats",function(){return Xe}),r.d(t,"__unstableGetActiveFormats",function(){return V})},41:function(e,t,r){e.exports=function(e,t){var r,n,a,i=0;function o(){var t,o,c=n,u=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(o=0;o '2.2.0', - 'annotations' => '1.2.2', + 'annotations' => '1.2.3', 'api-fetch' => '3.1.2', 'autop' => '2.0.0', 'blob' => '2.3.0', - 'block-editor' => '2.0.1', - 'block-library' => '2.4.4', + 'block-editor' => '2.0.2', + 'block-library' => '2.4.5', 'block-serialization-default-parser' => '3.1.0', - 'blocks' => '6.2.4', - 'components' => '7.3.1', + 'blocks' => '6.2.5', + 'components' => '7.3.2', 'compose' => '3.2.0', 'core-data' => '2.2.2', 'data' => '4.4.0', 'date' => '3.2.0', 'deprecated' => '2.2.0', - 'dom' => '2.2.4', + 'dom' => '2.2.5', 'dom-ready' => '2.2.0', - 'edit-post' => '3.3.4', - 'editor' => '9.2.4', + 'edit-post' => '3.3.5', + 'editor' => '9.2.5', 'element' => '2.3.0', 'escape-html' => '1.2.0', - 'format-library' => '1.4.4', + 'format-library' => '1.4.5', 'hooks' => '2.2.0', 'html-entities' => '2.2.0', 'i18n' => '3.3.0', 'is-shallow-equal' => '1.2.0', 'keycodes' => '2.2.0', - 'list-reusable-blocks' => '1.3.4', + 'list-reusable-blocks' => '1.3.5', 'notices' => '1.3.0', - 'nux' => '3.2.4', + 'nux' => '3.2.5', 'plugins' => '2.2.0', 'priority-queue' => '1.1.0', 'redux-routine' => '3.2.0', - 'rich-text' => '3.2.2', + 'rich-text' => '3.2.3', 'shortcode' => '2.2.0', 'token-list' => '1.2.0', 'url' => '2.5.0', diff --git a/wp-includes/version.php b/wp-includes/version.php index fc525ca4c7..57d4cf4bbb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2.1-alpha-45318'; +$wp_version = '5.2.1-alpha-45320'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.