this.wp=this.wp||{},this.wp.blockEditor=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=357)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return o}))},11:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(32),r=n(3);function i(e,t){return!t||"object"!==Object(o.a)(t)&&"function"!=typeof t?Object(r.a)(e):t}},111:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t,n=null,o=null,c=null,a=function(){e.clientWidth!==o&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",o=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o0?!0===c?o.scrollTop(t,O.top+k.top):!1===c?o.scrollTop(t,O.top+j.top):k.top<0?o.scrollTop(t,O.top+k.top):o.scrollTop(t,O.top+j.top):i||((c=void 0===c||!!c)?o.scrollTop(t,O.top+k.top):o.scrollTop(t,O.top+j.top)),r&&(k.left<0||j.left>0?!0===a?o.scrollLeft(t,O.left+k.left):!1===a?o.scrollLeft(t,O.left+j.left):k.left<0?o.scrollLeft(t,O.left+k.left):o.scrollLeft(t,O.left+j.left):i||((a=void 0===a||!!a)?o.scrollLeft(t,O.left+k.left):o.scrollLeft(t,O.left+j.left)))}},116:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Kevin Decker nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 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}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var c=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var i=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var h=d&&d.newPos+1=l&&p+1>=s)return a(o(c,i.components,t,e,c.useLongestToken));b[n]=i}else b[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>d)return i();p()||e()}),0)}();else for(;u<=d;){var h=p();if(h)return h}},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"):o.removed&&t.push(""),t.push((r=o.value,void 0,r.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),o.added?t.push(""):o.removed&&t.push("")}var r;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";n.d(t,"a",(function(){return i}));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)()}},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 e===t?Object(s.a)({},e):t}function S(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 C=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||!S(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){return o!==n[r]&&((n=_(e[t.clientId],n))[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],S=_.indexOf(k);return Object(s.a)({},e,Object(b.a)({},v,g(e[v],S,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 C=t.clientIds,E=t.rootClientId,w=void 0===E?"":E,I=Object(f.first)(C),T=e[w];if(!T.length||I===Object(f.first)(T))return e;var B=T.indexOf(I);return Object(s.a)({},e,Object(b.a)({},w,g(T,B,B-1,C.length)));case"MOVE_BLOCKS_DOWN":var x=t.clientIds,L=t.rootClientId,N=void 0===L?"":L,M=Object(f.first)(x),R=Object(f.last)(x),A=e[N];if(!A.length||R===Object(f.last)(A))return e;var D=A.indexOf(M);return Object(s.a)({},e,Object(b.a)({},N,g(A,D,D+1,x.length)));case"REPLACE_BLOCKS":var P=t.clientIds;if(!t.blocks)return e;var F=O(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,P)},function(e){return Object(s.a)({},e,Object(f.omit)(F,""))},function(e){return Object(f.mapValues)(e,(function(e){return Object(f.reduce)(e,(function(e,t){return t===P[0]?[].concat(Object(d.a)(e),Object(d.a)(F[""])):(-1===P.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 E=Object(l.combineReducers)({blocks:C,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.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],t=arguments.length>1?arguments[1]:void 0;switch(t.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":var n=t.rootClientId,o=t.index;return{rootClientId:n,index:o};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}}),w=n(70),I=n.n(w),T=n(97),B=n.n(T),x=n(28),L=n(48),N=n(23),M=n.n(N);function R(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;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function X(e){var t;return M.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,R("core/block-editor","getPreviousBlockClientId",e);case 2:return t=n.sent,n.next=5,$(t,-1);case 5:case"end":return n.stop()}}),P,this)}function J(e){var t;return M.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,R("core/block-editor","getNextBlockClientId",e);case 2:return t=n.sent,n.next=5,$(t);case 5:case"end":return n.stop()}}),F,this)}function Z(){return{type:"START_MULTI_SELECT"}}function Q(){return{type:"STOP_MULTI_SELECT"}}function ee(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function te(){return{type:"CLEAR_SELECTED_BLOCK"}}function ne(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function oe(e,t){var n,o,r;return M.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,R("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];return ue([e],t,n,o)}function ue(e,t,n){var o,r,i,c,a,l,s,u,d=arguments;return M.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,R("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()}}),V,this,[[6,19,23,31],[24,,26,30]])}function de(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function be(){return{type:"HIDE_INSERTION_POINT"}}function fe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function pe(){return{type:"SYNCHRONIZE_TEMPLATE"}}function he(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function ve(e){var t,n=arguments;return M.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,X(e[0]);case 5:return o.next=7,{type:"REMOVE_BLOCKS",clientIds:e};case 7:return o.delegateYield(K(),"t0",8);case 8:case"end":return o.stop()}}),z,this)}function me(e,t){return ve([e],t)}function ge(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function Oe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ke(){return{type:"START_TYPING"}}function je(){return{type:"STOP_TYPING"}}function ye(){return{type:"ENTER_FORMATTED_TEXT"}}function _e(){return{type:"EXIT_FORMATTED_TEXT"}}function Se(e,t,n){return se(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function Ce(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ee(e){return{type:"UPDATE_SETTINGS",settings:e}}function we(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Ie(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}var Te=n(30),Be=3,xe=2,Le=1,Ne=0,Me=[],Re={},Ae=Object(Te.a)((function(){return[]}),(function(e,t){return Object(f.map)(vt(e,t),(function(t){return He(e,t)}))}));function De(e,t){var n=e.blocks.byClientId[t];return n?n.name:null}function Pe(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}var Fe=Object(Te.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]=zt(e,n.meta)),t}),o)),o}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t],zt(e)]})),He=Object(Te.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Fe(e,t),innerBlocks:Ve(e,t)}):null}),(function(e,t){return[].concat(Object(d.a)(Fe.getDependants(e,t)),[Ae(e,t)])})),Ue=Object(Te.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Object(s.a)({},n,{attributes:Fe(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t]].concat(Object(d.a)(Fe.getDependants(e,t)))})),Ve=Object(Te.a)((function(e,t){return Object(f.map)(vt(e,t),(function(t){return He(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ze=function e(t,n){return Object(f.flatMap)(n,(function(n){var o=vt(t,n);return[].concat(Object(d.a)(o),Object(d.a)(e(t,o)))}))},Ke=Object(Te.a)((function(e){var t=vt(e);return[].concat(Object(d.a)(t),Object(d.a)(ze(e,t)))}),(function(e){return[e.blocks.order]})),We=Object(Te.a)((function(e,t){var n=Ke(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]})),Ge=Object(Te.a)((function(e,t){return Object(f.map)(Object(f.castArray)(t),(function(t){return He(e,t)}))}),(function(e){return[zt(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function qe(e,t){return vt(e,t).length}function Ye(e){return e.blockSelection.start}function $e(e){return e.blockSelection.end}function Xe(e){var t=ct(e).length;return t||(e.blockSelection.start?1:0)}function Je(e){var t=e.blockSelection,n=t.start,o=t.end;return!!n&&n===o}function Ze(e){var t=e.blockSelection,n=t.start,o=t.end;return n&&n===o&&e.blocks.byClientId[n]?n:null}function Qe(e){var t=Ze(e);return t?He(e,t):null}var et=Object(Te.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]})),tt=Object(Te.a)((function(e,t){for(var n=t,o=t;n;)n=et(e,o=n);return o}),(function(e){return[e.blocks.order]}));function nt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Ze(e)),void 0===t&&(t=n<0?lt(e):st(e)),!t)return null;var o=et(e,t);if(null===o)return null;var r=e.blocks.order,i=r[o],c=i.indexOf(t),a=c+1*n;return a<0||a===i.length?null:i[a]}function ot(e,t){return nt(e,t,-1)}function rt(e,t){return nt(e,t,1)}function it(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var ct=Object(Te.a)((function(e){var t=e.blockSelection,n=t.start,o=t.end;if(n===o)return[];var r=et(e,n);if(null===r)return[];var i=vt(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]})),at=Object(Te.a)((function(e){var t=ct(e);return t.length?t.map((function(t){return He(e,t)})):Me}),(function(e){return[].concat(Object(d.a)(ct.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes,zt(e)])}));function lt(e){return Object(f.first)(ct(e))||null}function st(e){return Object(f.last)(ct(e))||null}var ut=Object(Te.a)((function(e,t,n){for(var o=n;t!==o&&o;)o=et(e,o);return t===o}),(function(e){return[e.blocks.order]}));function dt(e,t){return lt(e)===t}function bt(e,t){return-1!==ct(e).indexOf(t)}var ft=Object(Te.a)((function(e,t){for(var n=t,o=!1;n&&!o;)o=bt(e,n=et(e,n));return o}),(function(e){return[e.blocks.order,e.blockSelection.start,e.blockSelection.end]}));function pt(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function ht(e){var t=e.blockSelection,n=t.start,o=t.end;return n===o?null:o||null}function vt(e,t){return e.blocks.order[t||""]||Me}function mt(e,t,n){return vt(e,n).indexOf(t)}function gt(e,t){var n=e.blockSelection,o=n.start;return o===n.end&&o===t}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(vt(e,t),(function(t){return gt(e,t)||bt(e,t)||n&&Ot(e,t,n)}))}function kt(e,t){if(!t)return!1;var n=ct(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;var c=Ht(e),a=c.allowedBlockTypes,l=o(a,t,!0);if(!l)return!1;var s=!!xt(e,n);if(s)return!1;var u=Ft(e,n),d=Object(f.get)(u,["allowedBlocks"]),b=o(d,t),p=r.parent,h=De(e,n),v=o(p,h);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Nt=Object(Te.a)(Lt,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Mt(e,t){return e.preferences.insertUsage[t]||null}var Rt=function(e,t,n){return!!Object(i.hasBlockSupport)(t,"inserter",!0)&&Lt(e,t.name,n)},At=function(e,t,n){if(!Lt(e,"core/block",n))return!1;var o=De(e,t.clientId);return!!o&&(!!Object(i.getBlockType)(o)&&(!!Lt(e,o,n)&&!ut(e,t.clientId,n)))},Dt=Object(Te.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?Be:t>0?xe:"common"===e?Le:Ne},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=function(t){var r=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(f.some)(Ge(e,Ke(e)),{name:t.name}));var a=Object(f.isArray)(t.parent),l=Mt(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=function(t){var r="core/block/".concat(t.id),c=De(e,t.clientId),a=Object(i.getBlockType)(c),l=Mt(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}},a=Object(i.getBlockTypes)().filter((function(n){return Rt(e,n,t)})).map(r),l=Kt(e).filter((function(n){return At(e,n,t)})).map(c);return Object(f.orderBy)([].concat(Object(d.a)(a),Object(d.a)(l)),["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,Kt(e),Object(i.getBlockTypes)()]})),Pt=Object(Te.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(f.some)(Object(i.getBlockTypes)(),(function(n){return Rt(e,n,t)}));if(n)return!0;var o=Object(f.some)(Kt(e),(function(n){return At(e,n,t)}));return o}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Kt(e),Object(i.getBlockTypes)()]}));function Ft(e,t){return e.blockListSettings[t]}function Ht(e){return e.settings}function Ut(e){return e.blocks.isPersistentChange}function Vt(e){return e.blocks.isIgnoredChange}function zt(e,t){return void 0===t?Object(f.get)(e,["settings","__experimentalMetaSource","value"],Re):Object(f.get)(e,["settings","__experimentalMetaSource","value",t])}function Kt(e){return Object(f.get)(e,["settings","__experimentalReusableBlocks"],Me)}var Wt={MERGE_BLOCKS:function(e,t){var n=t.dispatch,o=t.getState(),r=Object(x.a)(e.blocks,2),c=r[0],a=r[1],l=He(o,c),u=Object(i.getBlockType)(l.name);if(u.merge){var b=He(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($(l.clientId,-1)),n(oe([l.clientId,b.clientId],[Object(s.a)({},l,{attributes:Object(s.a)({},l.attributes,p)})].concat(Object(d.a)(f.slice(1)))))}}else n($(l.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),o=Bt(n),r=xt(n),c=!o||"all"!==r||Object(i.doBlocksMatchTemplate)(e.blocks,o);if(c!==Tt(n))return fe(c)}],MULTI_SELECT:function(e,t){var n=Xe((0,t.getState)());Object(L.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=Ve(n),r=Bt(n);return W(Object(i.synchronizeBlocksWithTemplate)(o,r))}};var Gt=function(e){var t,n=[I()(Wt),B.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},qt=Object(l.registerStore)("core/block-editor",{reducer:E,selectors:r,actions:o,controls:A,persist:["preferences"]});Gt(qt);var Yt=n(19),$t=n(0),Xt=n(16),Jt=n.n(Xt),Zt=n(6),Qt=n(26),en=n(10),tn=n(9),nn=n(11),on=n(12),rn=n(13),cn=n(3),an=n(4),ln=Object($t.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:f.noop,clientId:null}),sn=ln.Consumer,un=ln.Provider,dn=function(e){return Object(Zt.createHigherOrderComponent)((function(t){return function(n){return Object($t.createElement)(sn,null,(function(o){return Object($t.createElement)(t,Object(Yt.a)({},n,e(o,n)))}))}}),"withBlockEditContext")},bn=Object(Zt.createHigherOrderComponent)((function(e){return function(t){return Object($t.createElement)(sn,null,(function(n){return n.isSelected&&Object($t.createElement)(e,t)}))}}),"ifBlockEditSelected"),fn=[];var pn=Object(Zt.compose)([dn((function(e){return{blockName:e.name}})),function(e){return function(t){function n(){var e;return Object(en.a)(this,n),(e=Object(nn.a)(this,Object(on.a)(n).call(this))).state={completers:fn},e.saveParentRef=e.saveParentRef.bind(Object(cn.a)(Object(cn.a)(e))),e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(n,t),Object(tn.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(Qt.hasFilter)("editor.Autocomplete.completers")&&(n=Object(Qt.applyFilters)("editor.Autocomplete.completers",n&&n.map(f.clone),t)),this.setState({lastFilteredCompletersProp:o,completers:n||fn})}},{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($t.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object($t.createElement)(e,Object(Yt.a)({onFocus:this.onFocus},n)))}}]),n}($t.Component)}])(an.Autocomplete),hn=[{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 vn=Object(Zt.compose)(dn((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?hn: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($t.createElement)(an.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)})}))})})),mn={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")}},gn=["left","center","right","wide","full"],On=["wide","full"];var kn=Object(Zt.compose)(dn((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?gn:r,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter((function(e){return-1===On.indexOf(e)})),l=mn[n];return Object($t.createElement)(an.Toolbar,{isCollapsed:t,icon:l?l.icon:"align-left",label:Object(p.__)("Change Alignment"),controls:a.map((function(e){return Object(s.a)({},mn[e],{isActive:n===e,onClick:(t=e,function(){return o(n===t?void 0:t)})});var t}))})})),jn=Object(an.createSlotFill)("BlockControls"),yn=jn.Fill,_n=jn.Slot,Sn=bn((function(e){var t=e.controls,n=e.children;return Object($t.createElement)(yn,null,Object($t.createElement)(an.Toolbar,{controls:t}),n)}));Sn.Slot=_n;var Cn=Sn,En=Object(an.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=Jt()(c,n.className),l=r.edit||r.save;return Object($t.createElement)(l,Object(Yt.a)({},e,{className:a}))})),wn=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(cn.a)(Object(cn.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"setFocusedElement",value:function(e){this.setState((function(t){return t.focusedElement===e?null:{focusedElement:e}}))}},{key:"render",value:function(){return Object($t.createElement)(un,{value:this.state},Object($t.createElement)(En,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}($t.Component),In=Object(an.createSlotFill)("BlockFormatControls"),Tn=In.Fill,Bn=In.Slot,xn=bn(Tn);xn.Slot=Bn;var Ln=xn,Nn=n(18);function Mn(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($t.createElement)(an.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($t.createElement)(an.Path,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object($t.createElement)(an.Icon,{icon:t&&t.src?t.src:t}),c=o?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object($t.createElement)("span",{style:c,className:Jt()("editor-block-icon block-editor-block-icon",r,{"has-colors":o})},i)}function Rn(e){var t=e.blocks,n=e.selectedBlockClientId,o=e.selectBlock,r=e.showNestedBlocks;return Object($t.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($t.createElement)("li",{key:e.clientId},Object($t.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object($t.createElement)(an.Button,{className:Jt()("editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":c}),onClick:function(){return o(e.clientId)}},Object($t.createElement)(Mn,{icon:t.icon,showColors:!0}),t.title,c&&Object($t.createElement)("span",{className:"screen-reader-text"},Object(p.__)("(selected block)")))),r&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object($t.createElement)(Rn,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:o,showNestedBlocks:!0}))})))}var An=Object(Zt.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($t.createElement)(an.NavigableMenu,{role:"presentation",className:"editor-block-navigation__container block-editor-block-navigation__container"},Object($t.createElement)("p",{className:"editor-block-navigation__label block-editor-block-navigation__label"},Object(p.__)("Block Navigation")),i&&Object($t.createElement)(Rn,{blocks:[t],selectedBlockClientId:o,selectBlock:r,showNestedBlocks:!0}),!i&&Object($t.createElement)(Rn,{blocks:n,selectedBlockClientId:o,selectBlock:r}))})),Dn=Object($t.createElement)(an.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object($t.createElement)(an.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var Pn=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($t.createElement)(an.Dropdown,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object($t.createElement)($t.Fragment,null,o&&Object($t.createElement)(an.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Nn.rawShortcut.access("o"),n)}),Object($t.createElement)(an.IconButton,{icon:Dn,"aria-expanded":t,onClick:o?n:void 0,label:Object(p.__)("Block Navigation"),className:"editor-block-navigation block-editor-block-navigation",shortcut:Nn.displayShortcut.access("o"),"aria-disabled":!o}))},renderContent:function(e){var t=e.onClose;return Object($t.createElement)(An,{onSelect:t})}})})),Fn=Object(Zt.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"),Hn=Fn(an.ColorPalette),Un=n(45),Vn=n.n(Un),zn=function(e,t,n){if(t){var o=Object(f.find)(e,{slug:t});if(o)return o}return{color:n}},Kn=function(e,t){return Object(f.find)(e,{color:t})};function Wn(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var Gn=[],qn=function(e){return Object(Zt.createHigherOrderComponent)((function(t){return function(n){return Object($t.createElement)(t,Object(Yt.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Yn=function(){return Object(l.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{colors:Object(f.get)(t,["colors"],Gn)}}))};function $n(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(Zt.compose)([t,function(e){return function(t){function o(e){var t;return Object(en.a)(this,o),(t=Object(nn.a)(this,Object(on.a)(o).call(this,e))).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(cn.a)(Object(cn.a)(t)))},t.state={},t}return Object(rn.a)(o,t),Object(tn.a)(o,[{key:"getMostReadableColor",value:function(e){return function(e,t){return Vn.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=Kn(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($t.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=zn(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:Wn(n,c.slug)}),e}),{})}}]),o}($t.Component)}])}function Xn(e){return function(){for(var t=qn(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 ao=Object($t.createElement)(an.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object($t.createElement)(an.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),lo=Object($t.createElement)(an.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object($t.createElement)(an.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),so=Object($t.createElement)(an.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object($t.createElement)(an.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"})),uo=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($t.createElement)(an.Draggable,{elementId:r,transferData:l,onDragStart:c,onDragEnd:a},(function(e){var n=e.onDraggableStart,o=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:o})}))})),bo=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=Jt()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object($t.createElement)(uo,{clientId:a,blockElementId:c,onDragStart:r,onDragEnd:i},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object($t.createElement)("div",{className:l,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},o)}))},fo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e.onBlur=e.onBlur.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",{className:Jt()("editor-block-mover block-editor-block-mover",{"is-visible":m||!v})},Object($t.createElement)(an.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:t,icon:ao,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($t.createElement)(bo,{className:"editor-block-mover__control block-editor-block-mover__control",icon:so,clientId:l,blockElementId:s,isVisible:i,onDragStart:c,onDragEnd:a}),Object($t.createElement)(an.IconButton,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:n,icon:lo,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($t.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},co(g,u&&u.title,d,o,r,-1)),Object($t.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},co(g,u&&u.title,d,o,r,1)))}}]),t}($t.Component),po=Object(Zt.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)}})),Zt.withInstanceId)(fo);var ho=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})),vo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(cn.a)(Object(cn.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(cn.a)(Object(cn.a)(e))),e.onDrop=e.onDrop.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},$t.Children.map(n,(function(e,t){return Object($t.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)})))),r&&Object($t.createElement)(an.Dropdown,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object($t.createElement)(an.IconButton,{icon:"ellipsis",label:Object(p.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object($t.createElement)(an.MenuGroup,null,r.map((function(e,t){return Object($t.createElement)(an.MenuItem,{onClick:e.onClick,key:t},e.title)})))}}))},Oo=n(207),ko=function(e){var t=e.title,n=e.rawContent,o=e.renderedContent,r=e.action,i=e.actionText,c=e.className;return Object($t.createElement)("div",{className:c},Object($t.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object($t.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object($t.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object($t.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},o)),Object($t.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object($t.createElement)(an.Button,{isLarge:!0,tabIndex:"0",onClick:r},i)))},jo=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"getDifference",value:function(e,t){return Object(Oo.diffChars)(e,t).map((function(e,t){var n=Jt()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object($t.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($t.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object($t.createElement)(ko,{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($t.createElement)(ko,{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}($t.Component),yo=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(cn.a)(Object(cn.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(cn.a)(Object(cn.a)(n))),n}return Object(rn.a)(t,e),Object(tn.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($t.createElement)(an.Modal,{title:Object(p.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object($t.createElement)(jo,{block:c,onKeep:t,onConvert:n,convertor:_o,convertButtonText:Object(p.__)("Convert to Blocks")})):Object($t.createElement)(go,{actions:[Object($t.createElement)(an.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},Object(p._x)("Resolve","imperative verb")),a&&Object($t.createElement)(an.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}($t.Component),_o=function(e){return Object(i.rawHandler)({HTML:e.originalContent})},So=Object(Zt.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,_o(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)))}}}))])(yo),Co=Object($t.createElement)(go,null,Object(p.__)("This block has encountered an error and cannot be previewed.")),Eo=function(){return Co},wo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(rn.a)(t,e),Object(tn.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}($t.Component),Io=n(61),To=n.n(Io),Bo=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(cn.a)(Object(cn.a)(n))),n.onBlur=n.onBlur.bind(Object(cn.a)(Object(cn.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(rn.a)(t,e),Object(tn.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($t.createElement)(To.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}($t.Component),xo=Object(Zt.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})}}}))])(Bo);var Lo=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})),No=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(cn.a)(Object(cn.a)(e))),e.onBlur=e.onBlur.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object($t.createElement)(an.Toolbar,null,n&&Object($t.createElement)($t.Fragment,null,Object($t.createElement)(Lo,{clientId:n}),Object($t.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object($t.createElement)(Lo,{clientId:t})))}}]),t}($t.Component),Mo=Object(Zt.compose)([Object(l.withSelect)((function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}}))])(No),Ro=window,Ao=Ro.Node,Do=Ro.getSelection,Po=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Object(cn.a)(Object(cn.a)(e))),e.focusSelection=e.focusSelection.bind(Object(cn.a)(Object(cn.a)(e))),e.switchOnKeyDown=Object(f.cond)([[Object(f.matchesProperty)(["keyCode"],Nn.ESCAPE),e.focusSelection]]),e.toolbar=Object($t.createRef)(),e}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"focusToolbar",value:function(){var e=io.focus.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Do();if(e){var t=e.focusNode;t.nodeType!==Ao.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($t.createElement)(an.NavigableMenu,Object(Yt.a)({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(f.omit)(n,["focusOnMount"])),Object($t.createElement)(an.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}($t.Component);var Fo=function(e){var t=e.focusOnMount;return Object($t.createElement)(Po,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":Object(p.__)("Block tools")},Object($t.createElement)(dc,null))};var Ho=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($t.createElement)(po,{key:"mover",clientId:n,clientIds:t,isFirst:r,isLast:i})})),Uo=n(67),Vo=n.n(Uo),zo=n(25);function Ko(e){var t=e.name,n=e.attributes,o=Object(i.createBlock)(t,n);return Object($t.createElement)(an.Disabled,{className:"editor-block-preview__content block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object($t.createElement)(wn,{name:t,focus:!1,attributes:o.attributes,setAttributes:f.noop}))}var Wo=function(e){return Object($t.createElement)("div",{className:"editor-block-preview block-editor-block-preview"},Object($t.createElement)("div",{className:"editor-block-preview__title block-editor-block-preview__title"},Object(p.__)("Preview")),Object($t.createElement)(Ko,e))};var Go=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($t.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object($t.createElement)("button",Object(Yt.a)({className:Jt()("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($t.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:l},Object($t.createElement)(Mn,{icon:t,showColors:!0}),n&&Object($t.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:s})),Object($t.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},i)))};var qo=function(e){var t=e.items,n=e.onSelect,o=e.onHover,r=void 0===o?function(){}:o,c=e.children;return Object($t.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map((function(e){return Object($t.createElement)(Go,{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 Yo=Object(Zt.compose)(Object(Zt.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($t.createElement)("div",{className:"editor-inserter__child-blocks block-editor-inserter__child-blocks"},(t||n)&&Object($t.createElement)("div",{className:"editor-inserter__parent-block-header block-editor-inserter__parent-block-header"},Object($t.createElement)(Mn,{icon:t,showColors:!0}),n&&Object($t.createElement)("h2",null,n)),Object($t.createElement)(qo,Object(Yt.a)({items:o},r)))})),$o=function(e){return e.stopPropagation()},Xo=function(e,t){var n=Jo(t),o=function(e){return-1!==Jo(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)}))},Jo=function(e){return e=(e=(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Zo=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(cn.a)(Object(cn.a)(e))),e.onHover=e.onHover.bind(Object(cn.a)(Object(cn.a)(e))),e.panels={},e.inserterResults=Object($t.createRef)(),e}return Object(rn.a)(t,e),Object(tn.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(){Vo()(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=Xo(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),v=Object(p.sprintf)(Object(p._n)("%d result found.","%d results found.",h),h);n(v)}},{key:"onKeyDown",value:function(e){Object(f.includes)([Nn.LEFT,Nn.DOWN,Nn.RIGHT,Nn.UP,Nn.BACKSPACE,Nn.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($t.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu",onKeyPress:$o,onKeyDown:this.onKeyDown},Object($t.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(p.__)("Search for a block")),Object($t.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($t.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($t.createElement)(Yo,{rootClientId:r,items:a,onSelect:o,onHover:this.onHover}),!!b.length&&Object($t.createElement)(an.PanelBody,{title:Object(p._x)("Most Used","blocks"),opened:h("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object($t.createElement)(qo,{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($t.createElement)(an.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($t.createElement)(qo,{items:n,onSelect:o,onHover:e.onHover})):null})),!!d.length&&Object($t.createElement)(an.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($t.createElement)(qo,{items:d,onSelect:o,onHover:this.onHover}),Object($t.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(zo.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($t.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(p.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object($t.createElement)(Wo,{name:l.name,attributes:l.initialAttributes}))}}]),t}($t.Component),Qo=Object(Zt.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()}}})),an.withSpokenMessages,Zt.withInstanceId,Zt.withSafeTimeout)(Zo),er=function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object($t.createElement)(an.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})},tr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(cn.a)(Object(cn.a)(e))),e.renderToggle=e.renderToggle.bind(Object(cn.a)(Object(cn.a)(e))),e.renderContent=e.renderContent.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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?er: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($t.createElement)(Qo,{onSelect:t,rootClientId:o,clientId:r,isAppender:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object($t.createElement)(an.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}($t.Component),nr=Object(Zt.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(Zt.ifCondition)((function(e){return e.hasItems}))])(tr);var or=Object(a.ifViewportMatches)("< small")((function(e){var t=e.clientId;return Object($t.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object($t.createElement)(nr,null),Object($t.createElement)(po,{clientIds:[t]}))})),rr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(cn.a)(Object(cn.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object($t.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object($t.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Jt()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object($t.createElement)(nr,{rootClientId:o,clientId:r})))}}]),t}($t.Component),ir=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}}))(rr),cr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(cn.a)(Object(cn.a)(e))),e.eventMap={},e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",Object(Yt.a)({ref:r},i,c))}}]),t}($t.Component),ar=function(e,t){return Object($t.createElement)(cr,Object(Yt.a)({},e,{forwardedRef:t}))};ar.displayName="IgnoreNestedEvents";var lr=Object($t.forwardRef)(ar);var sr=Object(Zt.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($t.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},r.map((function(e){return Object($t.createElement)(an.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($t.createElement)(Mn,{icon:e.icon})})})))})),ur=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(cn.a)(Object(cn.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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],n=t?"addEventListener":"removeEventListener";e[n]("mousemove",this.onMouseMove),e[n]("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)}}})),vr=Object(Zt.compose)(Zt.pure,Object(a.withViewportMatch)({isLargeViewport:"medium"}),pr,hr,Object(an.withFilters)("editor.BlockListBlock"))(fr),mr=n(57);var gr=Object(Zt.compose)(Object(Zt.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(mr.decodeEntities)(i)||Object(p.__)("Start writing or type / to choose a block");return Object($t.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($t.createElement)(mo,{rootClientId:c}),Object($t.createElement)(To.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($t.createElement)(sr,{rootClientId:c}),Object($t.createElement)(nr,{rootClientId:c,position:"top right",isAppender:!0}))}));var Or=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($t.createElement)(lr,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object($t.createElement)(gr,{rootClientId:n,lastBlockClientId:Object(f.last)(t)})):Object($t.createElement)("div",{className:"block-list-appender"},Object($t.createElement)(nr,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,o=e.isOpen;return Object($t.createElement)(an.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}))})),kr=function(e){function t(e){var n;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(cn.a)(Object(cn.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(cn.a)(Object(cn.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(cn.a)(Object(cn.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(cn.a)(Object(cn.a)(n))),n.onPointerMove=Object(f.throttle)(n.onPointerMove.bind(Object(cn.a)(Object(cn.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(rn.a)(t,e),Object(tn.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=br(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!Ar(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($t.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=Kn(i||t,o),a=c&&c.name,l=Object(p.sprintf)(Dr,r.toLowerCase(),a||o);return Object($t.createElement)(an.ColorIndicator,{key:n,colorValue:o,"aria-label":l})}))}(o,n));return Object($t.createElement)(an.PanelBody,Object(Yt.a)({className:"editor-panel-color-settings block-editor-panel-color-settings",title:a},c),o.map((function(e,t){return Object($t.createElement)(Rr,Object(Yt.a)({key:t},Object(s.a)({colors:n,disableCustomColors:r},e)))})),t)})),Fr=Fn(Pr);var Hr=function(e){var t=e.onChange,n=e.className,o=Object(u.a)(e,["onChange","className"]);return Object($t.createElement)(To.a,Object(Yt.a)({className:Jt()("editor-plain-text block-editor-plain-text",n),onChange:function(e){return t(e.target.value)}},o))},Ur=n(41),Vr=n.n(Ur),zr=n(35),Kr=n(49),Wr=n.n(Kr),Gr=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($t.createElement)($t.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($t.createElement)(r,{key:t,isActive:a,activeAttributes:a&&i.attributes||{},isObjectActive:s,activeObjectAttributes:s&&l.attributes||{},value:o,onChange:n})})))})),qr=function(e){var t=e.controls;return Object($t.createElement)("div",{className:"editor-format-toolbar block-editor-format-toolbar"},Object($t.createElement)(an.Toolbar,null,t.map((function(e){return Object($t.createElement)(an.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object($t.createElement)(an.Slot,{name:"RichText.ToolbarControls"},(function(e){return e.length&&Object($t.createElement)(an.DropdownMenu,{icon:!1,position:"bottom left",label:Object(p.__)("More Rich Text Controls"),controls:Object(f.orderBy)(e.map((function(e){return Object(x.a)(e,1)[0].props})),"title")})}))))},Yr=function(e){return Object(f.pickBy)(e,(function(e,t){return n=t,Object(f.startsWith)(n,"aria-")&&!Object(f.isNil)(e);var n}))},$r=window.navigator.userAgent;var Xr=$r.indexOf("Trident")>=0,Jr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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=Jt()("block-editor-rich-text__editable","editor-rich-text__editable",e.className));var n=function(e,t){var n=Object(f.keys)(Yr(e)),o=Object(f.keys)(Yr(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),Xr&&(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((Nn.BACKSPACE===o||Nn.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($t.createElement)(o,Object(s.a)((e={role:"textbox","aria-multiline":!0,className:Jt()("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}($t.Component);function Zr(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))}]}var Qr=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)(an.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},Nn.rawShortcut[n](t),this.onUse)})}}]),t}($t.Component),ei=window.Node,ti=ei.TEXT_NODE,ni=ei.ELEMENT_NODE;function oi(){var e=window.getSelection();if(0!==e.rangeCount){var t=e.getRangeAt(0).startContainer;if(t.nodeType===ti&&(t=t.parentNode),t.nodeType===ni){var n=t.closest("*[contenteditable]");if(n&&n.contains(t))return t.closest("ol,ul")}}}function ri(){var e=oi();return!e||"true"===e.contentEditable}function ii(e,t){var n=oi();return n?n.nodeName.toLowerCase()===e:e===t}var ci=function(e){var t=e.onTagNameChange,n=e.tagName,o=e.value,r=e.onChange;return Object($t.createElement)($t.Fragment,null,Object($t.createElement)(Qr,{type:"primary",character:"[",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object($t.createElement)(Qr,{type:"primary",character:"]",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object($t.createElement)(Qr,{type:"primary",character:"m",onUse:function(){r(Object(c.indentListItems)(o,{type:n}))}}),Object($t.createElement)(Qr,{type:"primaryShift",character:"m",onUse:function(){r(Object(c.outdentListItems)(o))}}),Object($t.createElement)(Ln,null,Object($t.createElement)(an.Toolbar,{controls:[t&&{icon:"editor-ul",title:Object(p.__)("Convert to unordered list"),isActive:ii("ul",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ul"})),ri()&&t("ul")}},t&&{icon:"editor-ol",title:Object(p.__)("Convert to ordered list"),isActive:ii("ol",n),onClick:function(){r(Object(c.changeListType)(o,{type:"ol"})),ri()&&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)})))},ai=[Nn.rawShortcut.primary("z"),Nn.rawShortcut.primaryShift("z"),Nn.rawShortcut.primary("y")],li=Object($t.createElement)(an.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(ai.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),si=function(){return li};function ui(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=Nn.displayShortcut[o](r)),Object($t.createElement)(an.Fill,{name:c},Object($t.createElement)(an.ToolbarButton,Object(Yt.a)({},i,{shortcut:t})))}var di=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onInput=e.onInput.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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}($t.Component),bi=window,fi=bi.getSelection,pi=bi.getComputedStyle,hi=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),vi=document.createElement("style");document.head.appendChild(vi);var mi=function(e){function t(e){var n,o=e.value,r=e.onReplace,c=e.multiline;return Object(en.a)(this,t),n=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments)),!0!==c&&"p"!==c&&"li"!==c||(n.multilineTag=!0===c?"p":c),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.props.onSplit?(n.onSplit=n.props.onSplit,Wr()("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(cn.a)(Object(cn.a)(n))),n.onBlur=n.onBlur.bind(Object(cn.a)(Object(cn.a)(n))),n.onChange=n.onChange.bind(Object(cn.a)(Object(cn.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(cn.a)(Object(cn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(cn.a)(Object(cn.a)(n))),n.onPaste=n.onPaste.bind(Object(cn.a)(Object(cn.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(cn.a)(Object(cn.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(cn.a)(Object(cn.a)(n))),n.onInput=n.onInput.bind(Object(cn.a)(Object(cn.a)(n))),n.onCompositionEnd=n.onCompositionEnd.bind(Object(cn.a)(Object(cn.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(cn.a)(Object(cn.a)(n))),n.getRecord=n.getRecord.bind(Object(cn.a)(Object(cn.a)(n))),n.createRecord=n.createRecord.bind(Object(cn.a)(Object(cn.a)(n))),n.applyRecord=n.applyRecord.bind(Object(cn.a)(Object(cn.a)(n))),n.isEmpty=n.isEmpty.bind(Object(cn.a)(Object(cn.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(cn.a)(Object(cn.a)(n))),n.setRef=n.setRef.bind(Object(cn.a)(Object(cn.a)(n))),n.valueToEditableHTML=n.valueToEditableHTML.bind(Object(cn.a)(Object(cn.a)(n))),n.handleHorizontalNavigation=n.handleHorizontalNavigation.bind(Object(cn.a)(Object(cn.a)(n))),n.onPointerDown=n.onPointerDown.bind(Object(cn.a)(Object(cn.a)(n))),n.formatToValue=Vr()(n.formatToValue.bind(Object(cn.a)(Object(cn.a)(n))),{maxSize:1}),n.savedContent=o,n.patterns=Zr({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(rn.a)(t,e),Object(tn.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=fi(),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]:{},n=t.domOnly;Object(c.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,prepareEditableTree:this.props.prepareEditableTree,__unstableDomOnly:n})}},{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(zo.isURL)(h))return this.onChange(Object(c.applyFormat)(p,{type:"a",attributes:{href:Object(mr.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")||hi.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=pi(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);vi.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]:{},n=t.withoutHistory;this.applyRecord(e);var o=e.start,r=e.end,i=e.activeFormats,c=void 0===i?[]:i;this.onChangeEditableValue(e),this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:o,end:r,activeFormats:c}),n||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===Nn.BACKSPACE;if(Object(c.isCollapsed)(this.createRecord())){var i=this.isEmpty();(i||Object(io.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!==Nn.LEFT&&t!==Nn.RIGHT||this.handleHorizontalNavigation(e),t===Nn.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===Nn.DELETE||t===Nn.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===Nn.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===Nn.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"===pi(this.editableRef).direction?Nn.RIGHT:Nn.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(x.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=fi();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=Yr(this.props),O=u&&(!f||b)&&this.isEmpty(),k=Jt()(i,"editor-rich-text block-editor-rich-text"),j=this.getRecord();return Object($t.createElement)("div",{className:k,onFocus:this.setFocusedElement},f&&"li"===this.multilineTag&&Object($t.createElement)(ci,{onTagNameChange:h,tagName:o,value:j,onChange:this.onChange}),f&&!l&&Object($t.createElement)(Ln,null,Object($t.createElement)(qr,{controls:s})),f&&l&&Object($t.createElement)(an.IsolatedEventContainer,{className:"editor-rich-text__inline-toolbar block-editor-rich-text__inline-toolbar"},Object($t.createElement)(qr,{controls:s})),Object($t.createElement)(pn,{onReplace:this.props.onReplace,completers:p,record:j,onChange:this.onChange},(function(t){var n=t.listBoxId,i=t.activeId;return Object($t.createElement)($t.Fragment,null,Object($t.createElement)(Jr,Object(Yt.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($t.createElement)(o,{className:Jt()("editor-rich-text__editable block-editor-rich-text__editable",c),style:r},m?Object($t.createElement)(m,null,u):u),f&&Object($t.createElement)(Gr,{value:j,onChange:e.onChange}))})),f&&Object($t.createElement)(si,null))}}]),t}($t.Component);mi.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var gi=Object(Zt.compose)([Zt.withInstanceId,dn((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}})),Zt.withSafeTimeout,Object(an.withFilters)("experimentalRichText")])(mi);gi.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($t.createElement)($t.RawHTML,null,a);return o?Object($t.createElement)(o,Object(f.omit)(c,["format"]),l):l},gi.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},gi.Content.defaultProps={format:"string",value:""};var Oi=gi,ki=Object(an.withFilters)("editor.MediaUpload")((function(){return null})),ji=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(cn.a)(Object(cn.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)(an.Popover,Object(Yt.a)({className:"editor-url-popover block-editor-url-popover",focusOnMount:c,position:r},a),Object($t.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row"},t,!!n&&Object($t.createElement)(an.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($t.createElement)("div",{className:"editor-url-popover__row block-editor-url-popover__row editor-url-popover__settings block-editor-url-popover__settings"},n()))}}]),t}($t.Component),yi=function(e){var t=e.src,n=e.onChange,o=e.onSubmit,r=e.onClose;return Object($t.createElement)(ji,{onClose:r},Object($t.createElement)("form",{className:"editor-media-placeholder__url-input-form block-editor-media-placeholder__url-input-form",onSubmit:o},Object($t.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($t.createElement)(an.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"})))},_i=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(cn.a)(Object(cn.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(cn.a)(Object(cn.a)(e))),e.onUpload=e.onUpload.bind(Object(cn.a)(Object(cn.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(cn.a)(Object(cn.a)(e))),e.openURLInput=e.openURLInput.bind(Object(cn.a)(Object(cn.a)(e))),e.closeURLInput=e.closeURLInput.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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(x.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($t.createElement)(an.Placeholder,{icon:n,label:C,instructions:S,className:Jt()("editor-media-placeholder block-editor-media-placeholder",o),notices:v},Object($t.createElement)(ho,null,!!k&&Object($t.createElement)($t.Fragment,null,Object($t.createElement)(an.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:d}),Object($t.createElement)(an.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onChange:this.onUpload,accept:t,multiple:h},Object(p.__)("Upload"))),Object($t.createElement)(ki,{gallery:h&&this.onlyAllowsImages(),multiple:h,onSelect:c,allowedTypes:g,value:l.id,render:function(e){var t=e.open;return Object($t.createElement)(an.Button,{isLarge:!0,className:"editor-media-placeholder__button block-editor-media-placeholder__button",onClick:t},Object(p.__)("Media Library"))}})),s&&Object($t.createElement)("div",{className:"editor-media-placeholder__url-input-container block-editor-media-placeholder__url-input-container"},Object($t.createElement)(an.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($t.createElement)(yi,{src:_,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput})))}}]),t}($t.Component),Si=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}})),Ci=Object(Zt.compose)(Si,Object(an.withFilters)("editor.MediaPlaceholder"))(_i),Ei=n(33),wi=n.n(Ei),Ii=function(e){return e.stopPropagation()},Ti=function(e){function t(e){var n,o=e.autocompleteRef;return Object(en.a)(this,t),(n=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(cn.a)(Object(cn.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(cn.a)(Object(cn.a)(n))),n.autocompleteRef=o||Object($t.createRef)(),n.inputRef=Object($t.createRef)(),n.updateSuggestions=Object(f.throttle)(n.updateSuggestions.bind(Object(cn.a)(Object(cn.a)(n))),200),n.suggestionNodes=[],n.state={posts:[],showSuggestions:!1,selectedSuggestion:null},n}return Object(rn.a)(t,e),Object(tn.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,Vo()(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=wi()({path:Object(zo.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 Nn.UP:e.stopPropagation(),e.preventDefault();var a=o?o-1:r.length-1;this.setState({selectedSuggestion:a});break;case Nn.DOWN:e.stopPropagation(),e.preventDefault();var l=null===o||o===r.length-1?0:o+1;this.setState({selectedSuggestion:l});break;case Nn.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(c),this.props.speak(Object(p.__)("Link selected.")));break;case Nn.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(c))}}else switch(e.keyCode){case Nn.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Nn.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($t.createElement)("div",{className:Jt()("editor-url-input block-editor-url-input",a)},Object($t.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(p.__)("URL"),required:!0,value:o,onChange:this.onChange,onInput:Ii,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($t.createElement)(an.Spinner,null),s&&!!u.length&&Object($t.createElement)(an.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object($t.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($t.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"block-editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:Jt()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":n===d}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===d},Object(mr.decodeEntities)(t.title)||Object(p.__)("(no title)"))})))))}}]),t}($t.Component),Bi=Object(an.withSpokenMessages)(Object(Zt.withInstanceId)(Ti)),xi=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(cn.a)(Object(cn.a)(e))),e.submitLink=e.submitLink.bind(Object(cn.a)(Object(cn.a)(e))),e.state={expanded:!1},e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",{className:"editor-url-input__button block-editor-url-input__button"},Object($t.createElement)(an.IconButton,{icon:"admin-links",label:r,onClick:this.toggle,className:Jt()("components-toolbar__control",{"is-active":t})}),o&&Object($t.createElement)("form",{className:"editor-url-input__button-modal block-editor-url-input__button-modal",onSubmit:this.submitLink},Object($t.createElement)("div",{className:"editor-url-input__button-modal-line block-editor-url-input__button-modal-line"},Object($t.createElement)(an.IconButton,{className:"editor-url-input__back block-editor-url-input__back",icon:"arrow-left-alt",label:Object(p.__)("Close"),onClick:this.toggle}),Object($t.createElement)(Bi,{value:t||"",onChange:n}),Object($t.createElement)(an.IconButton,{icon:"editor-break",label:Object(p.__)("Submit"),type:"submit"}))))}}]),t}($t.Component);var Li=Object(Zt.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})})),Ni=function(e){return e.preventDefault(),e},Mi={duplicate:{raw:Nn.rawShortcut.primaryShift("d"),display:Nn.displayShortcut.primaryShift("d")},removeBlock:{raw:Nn.rawShortcut.access("z"),display:Nn.displayShortcut.access("z")},insertBefore:{raw:Nn.rawShortcut.primaryAlt("t"),display:Nn.displayShortcut.primaryAlt("t")},insertAfter:{raw:Nn.rawShortcut.primaryAlt("y"),display:Nn.displayShortcut.primaryAlt("y")}},Ri=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(cn.a)(Object(cn.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(cn.a)(Object(cn.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)($t.Fragment,null,Object($t.createElement)(an.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,Nn.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($t.createElement)(Li,{clientIds:t},(function(e){var t,n=e.onDuplicate,o=e.onRemove,r=e.onInsertAfter,i=e.onInsertBefore;return Object($t.createElement)(an.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(b.a)(t,Mi.duplicate.raw,Object(f.flow)(Ni,n)),Object(b.a)(t,Mi.removeBlock.raw,Object(f.flow)(Ni,o)),Object(b.a)(t,Mi.insertBefore.raw,Object(f.flow)(Ni,i)),Object(b.a)(t,Mi.insertAfter.raw,Object(f.flow)(Ni,r)),t)})})))}}]),t}($t.Component),Ai=Object(Zt.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}}))])(Ri),Di=Object(l.withSelect)((function(e){return{selectedBlockClientId:e("core/block-editor").getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t&&Object($t.createElement)(an.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block block-editor-skip-to-selected-block",onClick:function(){br(t).closest(".block-editor-block-list__block").focus()}},Object(p.__)("Skip to the selected block"))})),Pi=n(135),Fi=n.n(Pi);function Hi(e,t,n){var o=new Fi.a(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}var Ui=Object(Zt.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 Fi.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=Hi(n,h,e);o(t),b(null),l()}return Object($t.createElement)("div",{className:"editor-block-styles block-editor-block-styles"},t.map((function(e){var t=Hi(n,h,e);return Object($t.createElement)("div",{key:e.name,className:Jt()("editor-block-styles__item block-editor-block-styles__item",{"is-active":h===e}),onClick:function(){return v(e)},onKeyDown:function(t){Nn.ENTER!==t.keyCode&&Nn.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($t.createElement)("div",{className:"editor-block-styles__item-preview block-editor-block-styles__item-preview"},Object($t.createElement)(Ko,{name:r,attributes:Object(s.a)({},i,{className:t})})),Object($t.createElement)("div",{className:"editor-block-styles__item-label block-editor-block-styles__item-label"},e.label||e.name))})))})),Vi=n(98);var zi=Object(l.withSelect)((function(e){return{blocks:(0,e("core/block-editor").getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Vi.count)(Object(i.serialize)(t),"words");return Object($t.createElement)("div",{className:"editor-multi-selection-inspector__card block-editor-multi-selection-inspector__card"},Object($t.createElement)(Mn,{icon:Object($t.createElement)(an.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($t.createElement)(an.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($t.createElement)("div",{className:"editor-multi-selection-inspector__card-content block-editor-multi-selection-inspector__card-content"},Object($t.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($t.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))))})),Ki=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($t.createElement)(zi,null);var a=n===Object(i.getUnregisteredTypeHandlerName)();return o&&t&&!a?Object($t.createElement)($t.Fragment,null,Object($t.createElement)("div",{className:"editor-block-inspector__card block-editor-block-inspector__card"},Object($t.createElement)(Mn,{icon:o.icon,showColors:!0}),Object($t.createElement)("div",{className:"editor-block-inspector__card-content block-editor-block-inspector__card-content"},Object($t.createElement)("div",{className:"editor-block-inspector__card-title block-editor-block-inspector__card-title"},o.title),Object($t.createElement)("div",{className:"editor-block-inspector__card-description block-editor-block-inspector__card-description"},o.description))),c&&Object($t.createElement)("div",null,Object($t.createElement)(an.PanelBody,{title:Object(p.__)("Styles"),initialOpen:!1},Object($t.createElement)(Ui,{clientId:t}))),Object($t.createElement)("div",null,Object($t.createElement)(Nr.Slot,null)),Object($t.createElement)("div",null,Object($t.createElement)(Ir.Slot,null,(function(e){return!Object(f.isEmpty)(e)&&Object($t.createElement)(an.PanelBody,{className:"editor-block-inspector__advanced block-editor-block-inspector__advanced",title:Object(p.__)("Advanced"),initialOpen:!1},e)}))),Object($t.createElement)(Di,{key:"back"})):Object($t.createElement)("span",{className:"editor-block-inspector__no-blocks block-editor-block-inspector__no-blocks"},Object(p.__)("No block selected."))})),Wi=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(cn.a)(Object(cn.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)("div",Object(Yt.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(f.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}($t.Component),Gi=Object(Zt.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}}))])(Wi);var qi=Object(Zt.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($t.createElement)(an.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"html"},!c&&a)}));var Yi=Object(Zt.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($t.createElement)($t.Fragment,null,!n&&Object($t.createElement)(an.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($t.createElement)(an.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 $i=Object(Zt.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($t.createElement)(an.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 Xi(e){var t=e.shouldRender,n=e.onClick,o=e.small;if(!t)return null;var r=Object(p.__)("Convert to Blocks");return Object($t.createElement)(an.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:n,icon:"screenoptions"},!o&&r)}var Ji=Object(Zt.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)}))}}})))(Xi),Zi=Object(Zt.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)}))}}})))(Xi),Qi=Object(an.createSlotFill)("_BlockSettingsMenuFirstItem"),ec=Qi.Fill,tc=Qi.Slot;ec.Slot=tc;var nc=ec,oc=Object(an.createSlotFill)("_BlockSettingsMenuPluginsExtension"),rc=oc.Fill,ic=oc.Slot;rc.Slot=ic;var cc=rc;var ac=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($t.createElement)(Li,{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($t.createElement)(an.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=Jt()("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($t.createElement)(an.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($t.createElement)(an.NavigableMenu,{className:"editor-block-settings-menu__content block-editor-block-settings-menu__content"},Object($t.createElement)(nc.Slot,{fillProps:{onClose:n}}),1===r&&Object($t.createElement)(Zi,{clientId:i}),1===r&&Object($t.createElement)(Ji,{clientId:i}),!u&&s&&Object($t.createElement)(an.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:o,icon:"admin-page",shortcut:Mi.duplicate.display},Object(p.__)("Duplicate")),!u&&Object($t.createElement)($t.Fragment,null,Object($t.createElement)(an.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:l,icon:"insert-before",shortcut:Mi.insertBefore.display},Object(p.__)("Insert Before")),Object($t.createElement)(an.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:Mi.insertAfter.display},Object(p.__)("Insert After"))),1===r&&Object($t.createElement)(qi,{clientId:i,onToggle:n}),Object($t.createElement)(Yi,{clientIds:t,onToggle:n}),Object($t.createElement)(cc.Slot,{fillProps:{clientIds:t,onClose:n}}),Object($t.createElement)("div",{className:"editor-block-settings-menu__separator block-editor-block-settings-menu__separator"}),1===r&&Object($t.createElement)($i,{clientId:i,onToggle:n}),!u&&Object($t.createElement)(an.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:Mi.removeBlock.display},Object(p.__)("Remove Block")))}})}))})),lc=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(cn.a)(Object(cn.a)(e))),e}return Object(rn.a)(t,e),Object(tn.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($t.createElement)(an.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($t.createElement)(an.Toolbar,null,Object($t.createElement)(an.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!==Nn.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object($t.createElement)($t.Fragment,null,Object($t.createElement)(Mn,{icon:l,showColors:!0}),Object($t.createElement)(an.SVG,{className:"editor-block-switcher__transform block-editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($t.createElement)(an.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($t.createElement)($t.Fragment,null,c&&Object($t.createElement)(an.PanelBody,{title:Object(p.__)("Block Styles"),initialOpen:!0},Object($t.createElement)(Ui,{clientId:n[0].clientId,onSwitch:r,onHoverClassName:e.onHoverClassName})),0!==d.length&&Object($t.createElement)(an.PanelBody,{title:Object(p.__)("Transform To:"),initialOpen:!0},Object($t.createElement)(qo,{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($t.createElement)(Wo,{name:n[0].name,attributes:Object(s.a)({},n[0].attributes,{className:a})}))}}):Object($t.createElement)(an.Toolbar,null,Object($t.createElement)(an.IconButton,{disabled:!0,className:"editor-block-switcher__no-switcher-icon block-editor-block-switcher__no-switcher-icon",label:Object(p.__)("Block icon")},Object($t.createElement)(Mn,{icon:l,showColors:!0})))}}]),t}($t.Component),sc=Object(Zt.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))}}})))(lc);var uc=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($t.createElement)(sc,{key:"switcher",clientIds:n}):null}));var dc=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($t.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},Object($t.createElement)(uc,null),Object($t.createElement)(ac,{clientIds:t})):Object($t.createElement)("div",{className:"editor-block-toolbar block-editor-block-toolbar"},"visual"===o&&n&&Object($t.createElement)($t.Fragment,null,Object($t.createElement)(sc,{clientIds:t}),Object($t.createElement)(Cn.Slot,null),Object($t.createElement)(Ln.Slot,null)),Object($t.createElement)(ac,{clientIds:t}))}));var bc=Object(Zt.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(io.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($t.createElement)("div",{onCopy:n,onCut:o},t)})),fc=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=br(e);if(t){var n=Object(io.getScrollContainer)(t);n&&Vo()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}($t.Component),pc=Object(l.withSelect)((function(e){return{extentClientId:(0,e("core/block-editor").getLastMultiSelectedBlockClientId)()}}))(fc),hc=[Nn.UP,Nn.RIGHT,Nn.DOWN,Nn.LEFT,Nn.ENTER,Nn.BACKSPACE];var vc=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(cn.a)(Object(cn.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(cn.a)(Object(cn.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(cn.a)(Object(cn.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(cn.a)(Object(cn.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(cn.a)(Object(cn.a)(e))),e.onKeyDown=Object(f.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(rn.a)(t,e),Object(tn.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===Nn.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(io.isTextField)(i)||i.closest(".block-editor-block-toolbar")||("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&Object(f.includes)(hc,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(io.isTextField)(i)&&r()}))}},{key:"render",value:function(){var e=this.props.children;return Object($t.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}($t.Component),mc=Object(Zt.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}})),Zt.withSafeTimeout])(vc),gc=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.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=br(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=br(this.props.selectionStart);if(t){var n=Object(io.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}($t.Component),Oc=Object(l.withSelect)((function(e){return{blockOrder:e("core/block-editor").getBlockOrder(),selectionStart:e("core/block-editor").getBlockSelectionStart()}}))(gc),kc=window,jc=kc.getSelection,yc=kc.getComputedStyle,_c=Object(f.overEvery)([io.isTextField,io.focus.tabbable.isTabbableIndex]);var Sc=function(e){function t(){var e;return Object(en.a)(this,t),(e=Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(cn.a)(Object(cn.a)(e))),e.bindContainer=e.bindContainer.bind(Object(cn.a)(Object(cn.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(cn.a)(Object(cn.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(cn.a)(Object(cn.a)(e))),e.verticalRect=null,e}return Object(rn.a)(t,e),Object(tn.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=io.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(!io.focus.tabbable.isTabbableIndex(n))return!1;if(Object(io.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===Nn.UP,u=a===Nn.DOWN,d=a===Nn.LEFT,b=a===Nn.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?io.isVerticalEdge:io.isHorizontalEdge;if(v?this.verticalRect||(this.verticalRect=Object(io.computeCaretRect)(l)):this.verticalRect=null,!m)return Nn.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(io.isEntirelySelected)(l)),void(Nn.isKeyboardEvent.primary(e,"a")&&((l.isContentEditable?this.isEntirelySelected:Object(io.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===Nn.UP||t===Nn.DOWN)&&!n)return!0;var o=e.tagName;return"INPUT"!==o&&"TEXTAREA"!==o}(l,a,O)){var j="rtl"===yc(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(io.isVerticalEdge)(l,p)){var y=this.getClosestTabbable(l,p);y&&(Object(io.placeCaretAtVerticalEdge)(y,p,this.verticalRect),e.preventDefault())}else if(h&&jc().isCollapsed&&Object(io.isHorizontalEdge)(l,j)){var _=this.getClosestTabbable(l,j);Object(io.placeCaretAtHorizontalEdge)(_,j),e.preventDefault()}}}},{key:"focusLastTextField",value:function(){var e=io.focus.focusable.find(this.container),t=Object(f.findLast)(e,_c);t&&Object(io.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object($t.createElement)("div",{className:"editor-writing-flow block-editor-writing-flow"},Object($t.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object($t.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}($t.Component),Cc=Object(Zt.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}}))])(Sc),Ec=function(e){function t(){return Object(en.a)(this,t),Object(nn.a)(this,Object(on.a)(t).apply(this,arguments))}return Object(rn.a)(t,e),Object(tn.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($t.createElement)(an.SlotFillProvider,null,Object($t.createElement)(an.DropZoneProvider,null,e))}}]),t}($t.Component),wc=Object(Zt.compose)([Object(l.withDispatch)((function(e){var t=e("core/block-editor");return{updateSettings:t.updateSettings,resetBlocks:t.resetBlocks}})),l.withRegistry])(Ec),Ic=["left","center","right","wide","full"],Tc=["wide","full"];function Bc(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?Ic:[],!o||!0===e&&!n?f.without.apply(void 0,[t].concat(Tc)):t}var xc=Object(Zt.createHigherOrderComponent)((function(e){return function(t){var n=t.name,o=Bc(Object(i.getBlockSupport)(n,"align"),Object(i.hasBlockSupport)(n,"alignWide",!0));return[o.length>0&&t.isSelected&&Object($t.createElement)(Cn,{key:"align-controls"},Object($t.createElement)(kn,{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($t.createElement)(e,Object(Yt.a)({key:"edit"},t))]}}),"withToolbarControls"),Lc=Object(Zt.createHigherOrderComponent)(Object(Zt.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=Bc(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($t.createElement)(e,Object(Yt.a)({},t,{wrapperProps:l}))}}]));Object(Qt.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(f.has)(e.attributes,["align","type"])||Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(f.assign)(e.attributes,{align:{type:"string"}})),e})),Object(Qt.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Lc),Object(Qt.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",xc),Object(Qt.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)(Bc(r,c),o)&&(e.className=Jt()("align".concat(o),e.className)),e}));var Nc=/[\s#]/g;var Mc=Object(Zt.createHigherOrderComponent)((function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object($t.createElement)($t.Fragment,null,Object($t.createElement)(e,t),Object($t.createElement)(Ir,null,Object($t.createElement)(an.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(Nc,"-"),t.setAttributes({anchor:e})}}))):Object($t.createElement)(e,t)}}),"withInspectorControl");Object(Qt.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(Qt.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Mc),Object(Qt.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 Rc=Object(Zt.createHigherOrderComponent)((function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object($t.createElement)($t.Fragment,null,Object($t.createElement)(e,t),Object($t.createElement)(Ir,null,Object($t.createElement)(an.TextControl,{label:Object(p.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})}}))):Object($t.createElement)(e,t)}}),"withInspectorControl");function Ac(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(Qt.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(Qt.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Rc),Object(Qt.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=Jt()(e.className,n.className)),e})),Object(Qt.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=Ac(r),a=Ac(n),l=Object(f.difference)(a,c);l.length?e.className=l.join(" "):r&&delete e.className}return e})),Object(Qt.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}))},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=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag",l="object"==typeof e,s=t.regeneratorRuntime;if(s)l&&(e.exports=s);else{(s=t.regeneratorRuntime=l?e.exports:{}).wrap=h;var u={},d={};d[i]=function(){return this};var b=Object.getPrototypeOf,f=b&&b(b(E([])));f&&f!==n&&o.call(f,i)&&(d=f);var p=O.prototype=m.prototype=Object.create(d);g.prototype=p.constructor=O,O.constructor=g,O[a]=g.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(p),e},s.awrap=function(e){return{__await:e}},k(j.prototype),j.prototype[c]=function(){return this},s.AsyncIterator=j,s.async=function(e,t,n,o){var r=new j(h(e,t,n,o));return s.isGeneratorFunction(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},k(p),p[a]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},s.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}},s.values=E,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 n(n,o){return c.type="throw",c.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(a&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),u}},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;S(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,n,o){var r=t&&t.prototype instanceof m?t:m,i=Object.create(r.prototype),c=new C(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return w()}for(n.method=r,n.arg=i;;){var c=n.delegate;if(c){var a=y(c,n);if(a){if(a===u)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=v(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,c),i}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function m(){}function g(){}function O(){}function k(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function j(e){var t;this._invoke=function(n,r){function i(){return new Promise((function(t,i){!function t(n,r,i,c){var a=v(e[n],e,r);if("throw"!==a.type){var l=a.arg,s=l.value;return s&&"object"==typeof s&&o.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,r,t,i)}))}return t=t?t.then(i,i):i()}}function y(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,y(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=v(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n