this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=219)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.data}()},,function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){"use strict";function r(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 r})},,function(e,t){!function(){e.exports=this.wp.blocks}()},,function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(25);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){var r;
/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(44),o=n(7);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},,,,,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(47);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return o})},,,function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.dom}()},,function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",function(){return r})},,,function(e,t){!function(){e.exports=this.wp.apiFetch}()},,,function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},,function(e,t,n){"use strict";var r=n(49);var o=n(48);function i(e,t){return Object(r.a)(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||Object(o.a)()}n.d(t,"a",function(){return i})},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(e){return!!e&&"object"==typeof e}function a(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function u(){n=o?new WeakMap:a()}function d(){var n,r,o,i,c,a=arguments.length;for(i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];for(c=t.apply(null,i),(n=l(c)).isUniqueByDependants||(n.lastDependants&&!s(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),r=n.head;r;){if(s(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=i),l=o?function(e){var t,o,i,s,l=n,u=!0;for(t=0;t<e.length;t++){if(!c(o=e[t])){u=!1;break}l.has(o)?l=l.get(o):(i=new WeakMap,l.set(o,i),l=i)}return l.has(r)||((s=a()).isUniqueByDependants=u,l.set(r,s)),l.get(r)}:function(){return n},d.getDependants=t,d.clear=u,u(),d}},function(e,t){!function(){e.exports=this.wp.blob}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},,function(e,t,n){"use strict";function r(e,t,n,r,o,i,c){try{var a=e[i](c),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)})}}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},function(e,t){!function(){e.exports=this.wp.viewport}()},,function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,function(e,t){!function(){e.exports=this.wp.deprecated}()},,,,,,function(e,t){!function(){e.exports=this.wp.nux}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},,function(e,t,n){e.exports=n(234)},,function(e,t){!function(){e.exports=this.wp.date}()},,,function(e,t){!function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=0;t[n]&&t[n]!==this;)++n;return Boolean(t[n])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype)},,,function(e,t){!function(){e.exports=this.wp.autop}()},,function(e,t,n){var r=n(94),o=n(93);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var c=(e=e||{}).random||(e.rng||r)();if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,t)for(var a=0;a<16;++a)t[i+a]=c[a];return t||o(c)}},function(e,t,n){"use strict";e.exports=n(130)},,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";t.__esModule=!0;var r=n(233);t.default=r.default},function(e,t,n){var r;!function(o){var i=/^\s+/,c=/\s+$/,a=0,s=o.round,l=o.min,u=o.max,d=o.random;function p(e,t){if(e=e||"",t=t||{},e instanceof p)return e;if(!(this instanceof p))return new p(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,s=null,d=!1,p=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(c,"").toLowerCase();var t,n=!1;if(P[e])e=P[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=U.hex6.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),format:n?"name":"hex"};if(t=U.hex4.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=U.hex3.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(H(e.r)&&H(e.g)&&H(e.b)?(t=function(e,t,n){return{r:255*L(e,255),g:255*L(t,255),b:255*L(n,255)}}(e.r,e.g,e.b),d=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):H(e.h)&&H(e.s)&&H(e.v)?(r=D(e.s),a=D(e.v),t=function(e,t,n){e=6*L(e,360),t=L(t,100),n=L(n,100);var r=o.floor(e),i=e-r,c=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,c,c,s,n][l],g:255*[s,n,n,a,c,c][l],b:255*[c,c,s,n,n,a][l]}}(e.h,r,a),d=!0,p="hsv"):H(e.h)&&H(e.s)&&H(e.l)&&(r=D(e.s),s=D(e.l),t=function(e,t,n){var r,o,i;function c(e,t,n){return n<0&&(n+=1),n>1&&(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=L(e,360),t=L(t,100),n=L(n,100),0===t)r=o=i=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=c(s,a,e+1/3),o=c(s,a,e),i=c(s,a,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,s),d=!0,p="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=A(n),{ok:d,format:e.format||p,r:l(255,u(t.r,0)),g:l(255,u(t.g,0)),b:l(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=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,o,i=u(e,t,n),c=l(e,t,n),a=(i+c)/2;if(i==c)r=o=0;else{var s=i-c;switch(o=a>.5?s/(2-i-c):s/(i+c),i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,l:a}}function b(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,o,i=u(e,t,n),c=l(e,t,n),a=i,s=i-c;if(o=0===i?0:s/i,i==c)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,v:a}}function h(e,t,n,r){var o=[R(s(e).toString(16)),R(s(t).toString(16)),R(s(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function m(e,t,n,r){return[R(M(r)),R(s(e).toString(16)),R(s(t).toString(16)),R(s(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s-=t/100,n.s=x(n.s),p(n)}function O(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s+=t/100,n.s=x(n.s),p(n)}function g(e){return p(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l+=t/100,n.l=x(n.l),p(n)}function y(e,t){t=0===t?0:t||10;var n=p(e).toRgb();return n.r=u(0,l(255,n.r-s(-t/100*255))),n.g=u(0,l(255,n.g-s(-t/100*255))),n.b=u(0,l(255,n.b-s(-t/100*255))),p(n)}function k(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l-=t/100,n.l=x(n.l),p(n)}function _(e,t){var n=p(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,p(n)}function S(e){var t=p(e).toHsl();return t.h=(t.h+180)%360,p(t)}function E(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+120)%360,s:t.s,l:t.l}),p({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+90)%360,s:t.s,l:t.l}),p({h:(n+180)%360,s:t.s,l:t.l}),p({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+72)%360,s:t.s,l:t.l}),p({h:(n+216)%360,s:t.s,l:t.l})]}function T(e,t,n){t=t||6,n=n||30;var r=p(e).toHsl(),o=360/n,i=[p(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(p(r));return i}function I(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,i=n.v,c=[],a=1/t;t--;)c.push(p({h:r,s:o,v:i})),i=(i+a)%1;return c}p.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,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=b(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=b(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+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=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+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,r,o){var i=[R(s(e).toString(16)),R(s(t).toString(16)),R(s(n).toString(16)),R(M(r))];if(o&&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:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*L(this._r,255))+"%",g:s(100*L(this._g,255))+"%",b:s(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*L(this._r,255))+"%, "+s(100*L(this._g,255))+"%, "+s(100*L(this._b,255))+"%)":"rgba("+s(100*L(this._r,255))+"%, "+s(100*L(this._g,255))+"%, "+s(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+m(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"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 p(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(j,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(g,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(T,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:D(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),i=n/100;return p({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,i=p.readability(e,t);switch(o=!1,(r=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+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},p.mostReadable=function(e,t,n){var r,o,i,c,a=null,s=0;o=(n=n||{}).includeFallbackColors,i=n.level,c=n.size;for(var l=0;l<t.length;l++)(r=p.readability(e,t[l]))>s&&(s=r,a=p(t[l]));return p.isReadable(e,a,{level:i,size:c})||!o?a:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var P=p.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"},B=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(P);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function L(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function x(e){return l(1,u(0,e))}function N(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return N(e)/255}var U=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),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 H(e){return!!U.CSS_UNIT.exec(e)}void 0!==e&&e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},,,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},,,,,,,function(e,t,n){"use strict";var r=n(127),o=n(126);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=g,t.resolve=function(e,t){return g(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?g(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=g(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var c=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),d=["%","/","?",";","#"].concat(u),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=n(125);function g(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i<e.indexOf("#")?"?":"#",l=e.split(a);l[0]=l[0].replace(/\\/g,"/");var g=e=l.join(a);if(g=g.trim(),!n&&1===e.split("#").length){var j=s.exec(g);if(j)return this.path=g,this.href=g,this.pathname=j[1],j[2]?(this.search=j[2],this.query=t?O.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=c.exec(g);if(y){var k=(y=y[0]).toLowerCase();this.protocol=k,g=g.substr(y.length)}if(n||y||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var _="//"===g.substr(0,2);!_||y&&m[y]||(g=g.substr(2),this.slashes=!0)}if(!m[y]&&(_||y&&!v[y])){for(var S,E,C=-1,w=0;w<p.length;w++){-1!==(T=g.indexOf(p[w]))&&(-1===C||T<C)&&(C=T)}-1!==(E=-1===C?g.lastIndexOf("@"):g.lastIndexOf("@",C))&&(S=g.slice(0,E),g=g.slice(E+1),this.auth=decodeURIComponent(S)),C=-1;for(w=0;w<d.length;w++){var T;-1!==(T=g.indexOf(d[w]))&&(-1===C||T<C)&&(C=T)}-1===C&&(C=g.length),this.host=g.slice(0,C),g=g.slice(C),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var P=this.hostname.split(/\./),B=(w=0,P.length);w<B;w++){var A=P[w];if(A&&!A.match(f)){for(var L="",x=0,N=A.length;x<N;x++)A.charCodeAt(x)>127?L+="x":L+=A[x];if(!L.match(f)){var R=P.slice(0,w),D=P.slice(w+1),M=A.match(b);M&&(R.push(M[1]),D.unshift(M[2])),D.length&&(g="/"+D.join(".")+g),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!h[k])for(w=0,B=u.length;w<B;w++){var H=u[w];if(-1!==g.indexOf(H)){var V=encodeURIComponent(H);V===H&&(V=escape(H)),g=g.split(H).join(V)}}var K=g.indexOf("#");-1!==K&&(this.hash=g.substr(K),g=g.slice(0,K));var z=g.indexOf("?");if(-1!==z?(this.search=g.substr(z),this.query=g.substr(z+1),t&&(this.query=O.parse(this.query)),g=g.slice(0,z)):t&&(this.search="",this.query={}),g&&(this.pathname=g),v[k]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,c="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(c=O.stringify(this.query));var a=this.search||c&&"?"+c||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+i+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(g(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),c=0;c<r.length;c++){var a=r[c];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var u=s[l];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),p=0;p<d.length;p++){var f=d[p];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var b=(e.pathname||"").split("/");b.length&&!(e.host=b.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==b[0]&&b.unshift(""),b.length<2&&b.unshift(""),n.pathname=b.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",O=n.search||"";n.path=h+O}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),j=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=j||g||n.host&&e.pathname,k=y,_=n.pathname&&n.pathname.split("/")||[],S=(b=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===_[0]?_[0]=n.host:_.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===b[0]?b[0]=e.host:b.unshift(e.host)),e.host=null),y=y&&(""===b[0]||""===_[0])),j)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,_=b;else if(b.length)_||(_=[]),_.pop(),_=_.concat(b),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=_.shift(),(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=_.slice(-1)[0],C=(n.host||e.host||_.length>1)&&("."===E||".."===E)||""===E,w=0,T=_.length;T>=0;T--)"."===(E=_[T])?_.splice(T,1):".."===E?(_.splice(T,1),w++):w&&(_.splice(T,1),w--);if(!y&&!k)for(;w--;w)_.unshift("..");!y||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),C&&"/"!==_.join("/").substr(-1)&&_.push("");var I,P=""===_[0]||_[0]&&"/"===_[0].charAt(0);S&&(n.hostname=n.host=P?"":_.length?_.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(y=y||n.host&&_.length)&&!P&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},,,function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]}},function(e,t,n){(function(t){var n,r=t.crypto||t.msCrypto;if(r&&r.getRandomValues){var o=new Uint8Array(16);n=function(){return r.getRandomValues(o),o}}if(!n){var i=new Array(16);n=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}e.exports=n}).call(this,n(53))},function(e,t,n){e.exports=n(134)()},,,,,,,,,,,,,function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,i,c=t[r.type],a=n(r);if(c)for(o=0;o<c.length;o++)(i=c[o](r,e))&&e.dispatch(i);return a}}}}}()},,,,,,,,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){!function(){e.exports=this.tinymce}()},,,,function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(c(e),function(c){var a=encodeURIComponent(r(c))+n;return o(e[c])?i(e[c],function(e){return a+encodeURIComponent(r(e))}).join(t):a+encodeURIComponent(r(e[c]))}).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var c=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var c={};if("string"!=typeof e||0===e.length)return c;var a=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var u=0;u<l;++u){var d,p,f,b,h=e[u].replace(a,"%20"),m=h.indexOf(n);m>=0?(d=h.substr(0,m),p=h.substr(m+1)):(d=h,p=""),f=decodeURIComponent(d),b=decodeURIComponent(p),r(c,f)?o(c[f])?c[f].push(b):c[f]=[c[f],b]:c[f]=b}return c};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";t.decode=t.parse=n(124),t.encode=t.stringify=n(123)},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var c="object"==typeof r&&r;c.global!==c&&c.window!==c&&c.self;var a,s=2147483647,l=36,u=1,d=26,p=38,f=700,b=72,h=128,m="-",v=/^xn--/,O=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=l-u,k=Math.floor,_=String.fromCharCode;function S(e){throw new RangeError(j[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function C(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(g,".")).split("."),t).join(".")}function w(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function T(e){return E(e,function(e){var t="";return e>65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function I(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:l}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function B(e,t,n){var r=0;for(e=n?k(e/f):e>>1,e+=k(e/t);e>y*d>>1;r+=l)e=k(e/y);return k(r+(y+1)*e/(e+p))}function A(e){var t,n,r,o,i,c,a,p,f,v,O=[],g=e.length,j=0,y=h,_=b;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&S("not-basic"),O.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(i=j,c=1,a=l;o>=g&&S("invalid-input"),((p=I(e.charCodeAt(o++)))>=l||p>k((s-j)/c))&&S("overflow"),j+=p*c,!(p<(f=a<=_?u:a>=_+d?d:a-_));a+=l)c>k(s/(v=l-f))&&S("overflow"),c*=v;_=B(j-i,t=O.length+1,0==i),k(j/t)>s-y&&S("overflow"),y+=k(j/t),j%=t,O.splice(j++,0,y)}return T(O)}function L(e){var t,n,r,o,i,c,a,p,f,v,O,g,j,y,E,C=[];for(g=(e=w(e)).length,t=h,n=0,i=b,c=0;c<g;++c)(O=e[c])<128&&C.push(_(O));for(r=o=C.length,o&&C.push(m);r<g;){for(a=s,c=0;c<g;++c)(O=e[c])>=t&&O<a&&(a=O);for(a-t>k((s-n)/(j=r+1))&&S("overflow"),n+=(a-t)*j,t=a,c=0;c<g;++c)if((O=e[c])<t&&++n>s&&S("overflow"),O==t){for(p=n,f=l;!(p<(v=f<=i?u:f>=i+d?d:f-i));f+=l)E=p-v,y=l-v,C.push(_(P(v+E%y,0))),p=k(E/y);C.push(_(P(p,0))),i=B(n,j,r==o),n=0,++r}++n,++t}return C.join("")}a={version:"1.4.1",ucs2:{decode:w,encode:T},decode:A,encode:L,toASCII:function(e){return C(e,function(e){return O.test(e)?"xn--"+L(e):e})},toUnicode:function(e){return C(e,function(e){return v.test(e)?A(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(83)(e),n(53))},function(e,t){!function(){e.exports=this.wp.coreData}()},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function i(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function c(e){return i(e)}function a(e){return i(e,!0)}function s(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,i=o.body,c=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=c.clientLeft||i.clientLeft||0,top:r-=c.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=c(r),t.top+=a(r),t}var l=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="currentStyle",p="runtimeStyle",f="left",b="px";var h=void 0;function m(e,t){for(var n=0;n<e.length;n++)t(e[n])}function v(e){return"border-box"===h(e,"boxSizing")}"undefined"!=typeof window&&(h=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,i=n||o.defaultView.getComputedStyle(e,null);return i&&(r=i.getPropertyValue(t)||i[t]),r}:function(e,t){var n=e[d]&&e[d][t];if(l.test(n)&&!u.test(t)){var r=e.style,o=r[f],i=e[p][f];e[p][f]=e[d][f],r[f]="fontSize"===t?"1em":n||0,n=r.pixelLeft+b,r[f]=o,e[p][f]=i}return""===n?"auto":n});var O=["margin","border","padding"],g=-1,j=2,y=1;function k(e,t,n){var r=0,o=void 0,i=void 0,c=void 0;for(i=0;i<t.length;i++)if(o=t[i])for(c=0;c<n.length;c++){var a=void 0;a="border"===o?o+n[c]+"Width":o+n[c],r+=parseFloat(h(e,a))||0}return r}function _(e){return null!=e&&e==e.window}var S={};function E(e,t,n){if(_(e))return"width"===t?S.viewportWidth(e):S.viewportHeight(e);if(9===e.nodeType)return"width"===t?S.docWidth(e):S.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,i=(h(e),v(e)),c=0;(null==o||o<=0)&&(o=void 0,(null==(c=h(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===n&&(n=i?y:g);var a=void 0!==o||i,s=o||c;if(n===g)return a?s-k(e,["border","padding"],r):c;if(a){var l=n===j?-k(e,["border"],r):k(e,["margin"],r);return s+(n===y?0:l)}return c+k(e,O.slice(n),r)}m(["Width","Height"],function(e){S["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],S["viewport"+e](n))},S["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,i=r.documentElement[n];return"CSS1Compat"===r.compatMode&&i||o&&o[n]||i}});var C={position:"absolute",visibility:"hidden",display:"block"};function w(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=E.apply(void 0,n):function(e,t,n){var r={},o=e.style,i=void 0;for(i in t)t.hasOwnProperty(i)&&(r[i]=o[i],o[i]=t[i]);for(i in n.call(e),t)t.hasOwnProperty(i)&&(o[i]=r[i])}(e,C,function(){t=E.apply(void 0,n)}),t}function T(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):h(e,t);for(var i in t)t.hasOwnProperty(i)&&T(e,i,t[i])}m(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);S["outer"+t]=function(t,n){return t&&w(t,e,n?0:y)};var n="width"===e?["Left","Right"]:["Top","Bottom"];S[e]=function(t,r){if(void 0===r)return t&&w(t,e,g);if(t){h(t);return v(t)&&(r+=k(t,["padding","border"],n)),T(t,e,r)}}}),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return s(e);!function(e,t){"static"===T(e,"position")&&(e.style.position="relative");var n=s(e),r={},o=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(o=parseFloat(T(e,i))||0,r[i]=o+t[i]-n[i]);T(e,r)}(e,t)},isWindow:_,each:m,css:T,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(_(e)){if(void 0===t)return c(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(_(e)){if(void 0===t)return a(e);window.scrollTo(c(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},S)},function(e,t,n){"use strict";var r=n(129);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,c=n.alignWithTop,a=n.alignWithLeft,s=n.offsetTop||0,l=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var p=r.isWindow(t),f=r.offset(e),b=r.outerHeight(e),h=r.outerWidth(e),m=void 0,v=void 0,O=void 0,g=void 0,j=void 0,y=void 0,k=void 0,_=void 0,S=void 0,E=void 0;p?(k=t,E=r.height(k),S=r.width(k),_={left:r.scrollLeft(k),top:r.scrollTop(k)},j={left:f.left-_.left-l,top:f.top-_.top-s},y={left:f.left+h-(_.left+S)+d,top:f.top+b-(_.top+E)+u},g=_):(m=r.offset(t),v=t.clientHeight,O=t.clientWidth,g={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(m.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-l,top:f.top-(m.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-s},y={left:f.left+h-(m.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+b-(m.top+v+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||y.top>0?!0===c?r.scrollTop(t,g.top+j.top):!1===c?r.scrollTop(t,g.top+y.top):j.top<0?r.scrollTop(t,g.top+j.top):r.scrollTop(t,g.top+y.top):i||((c=void 0===c||!!c)?r.scrollTop(t,g.top+j.top):r.scrollTop(t,g.top+y.top)),o&&(j.left<0||y.left>0?!0===a?r.scrollLeft(t,g.left+j.left):!1===a?r.scrollLeft(t,g.left+y.left):j.left<0?r.scrollLeft(t,g.left+j.left):r.scrollLeft(t,g.left+y.left):i||((a=void 0===a||!!a)?r.scrollLeft(t,g.left+j.left):r.scrollLeft(t,g.left+y.left)))}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,c,a,s){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,i,c,a,s],d=0;(l=new Error(t.replace(/%s/g,function(){return u[d++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(133),o=n(132),i=n(131);e.exports=function(){function e(e,t,n,r,c,a){a!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},,,,,,,,,,,,,,,,,function(e,t){!function(){e.exports=this.wp.tokenList}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var p={},f=!0,b={node:n?i(d):d,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){b.isRoot||(b.parent.node[b.key]=e),b.node=e,t&&(f=!1)},delete:function(e){delete b.parent.node[b.key],e&&(f=!1)},remove:function(e){s(b.parent.node)?b.parent.node.splice(b.key,1):delete b.parent.node[b.key],e&&(f=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){a=!1},block:function(){f=!1}};if(!a)return b;function h(){if("object"==typeof b.node&&null!==b.node){b.keys&&b.node_===b.node||(b.keys=c(b.node)),b.isLeaf=0==b.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){b.circular=o[e];break}}else b.isLeaf=!0,b.keys=null;b.notLeaf=!b.isLeaf,b.notRoot=!b.isRoot}h();var m=t.call(b,b.node);return void 0!==m&&b.update&&b.update(m),p.before&&p.before.call(b,b.node),f?("object"!=typeof b.node||null===b.node||b.circular||(o.push(b),h(),l(b.keys,function(t,o){r.push(t),p.pre&&p.pre.call(b,b.node[t],t);var i=e(b.node[t]);n&&u.call(b.node,t)&&(b.node[t]=i.node),i.isLast=o==b.keys.length-1,i.isFirst=0==o,p.post&&p.post.call(b,i),r.pop()}),o.pop()),p.after&&p.after.call(b,b.node),b):b}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if(function(e){return"[object Date]"===a(e)}(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return l(c(e),function(n){t[n]=e[n]}),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach(function(t){this.isRoot&&n||(r=e.call(this,r,t))}),r},r.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e},r.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=i(r);return e.push(r),t.push(a),l(c(r),function(e){a[e]=n(r[e])}),e.pop(),t.pop(),a}return r}(this.value)};var c=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},l=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};l(c(r.prototype),function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}});var u=Object.hasOwnProperty||function(e,t){return t in e}},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){
/*!

 diff v3.5.0

Software License Agreement (BSD License)

Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>

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
*/
!function(t,n){e.exports=n()}(0,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.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 r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(2),i=n(3),c=n(5),a=n(6),s=n(7),l=n(8),u=n(9),d=n(10),p=n(11),f=n(13),b=n(14),h=n(16),m=n(17);t.Diff=r.default,t.diffChars=o.diffChars,t.diffWords=i.diffWords,t.diffWordsWithSpace=i.diffWordsWithSpace,t.diffLines=c.diffLines,t.diffTrimmedLines=c.diffTrimmedLines,t.diffSentences=a.diffSentences,t.diffCss=s.diffCss,t.diffJson=l.diffJson,t.diffArrays=u.diffArrays,t.structuredPatch=b.structuredPatch,t.createTwoFilesPatch=b.createTwoFilesPatch,t.createPatch=b.createPatch,t.applyPatch=d.applyPatch,t.applyPatches=d.applyPatches,t.parsePatch=p.parsePatch,t.merge=f.merge,t.convertChangesToDMP=h.convertChangesToDMP,t.convertChangesToXML=m.convertChangesToXML,t.canonicalize=l.canonicalize},function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,c=t.length,a=0,s=0;i<c;i++){var l=t[i];if(l.removed){if(l.value=e.join(r.slice(s,s+l.count)),s+=l.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!l.added&&o){var d=n.slice(a,a+l.count);d=d.map(function(e,t){var n=r[s+t];return n.length>e.length?n:e}),l.value=e.join(d)}else l.value=e.join(n.slice(a,a+l.count));a+=l.count,l.added||(s+=l.count)}}var p=t[c-1];return c>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[c-2].value+=p.value,t.pop()),t}function o(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 s=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,u=1,d=s+l,p=[{newPos:-1,components:[]}],f=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=s&&f+1>=l)return a([{value:this.join(t),count:t.length}]);function b(){for(var n=-1*u;n<=u;n+=2){var i=void 0,d=p[n-1],f=p[n+1],b=(f?f.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<s,m=f&&0<=b&&b<l;if(h||m){if(!h||m&&d.newPos<f.newPos?(i=o(f),c.pushComponent(i.components,void 0,!0)):((i=d).newPos++,c.pushComponent(i.components,!0,void 0)),b=c.extractCommon(i,t,e,n),i.newPos+1>=s&&b+1>=l)return a(r(c,i.components,t,e,c.useLongestToken));p[n]=i}else p[n]=void 0}u++}if(i)!function e(){setTimeout(function(){if(u>d)return i();b()||e()},0)}();else for(;u<=d;){var h=b();if(h)return h}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,c=e.newPos,a=c-r,s=0;c+1<o&&a+1<i&&this.equals(t[c+1],n[a+1]);)c++,a++,s++;return s&&e.components.push({count:s}),e.newPos=c,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";t.__esModule=!0,t.characterDiff=void 0,t.diffChars=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.characterDiff=new r.default},function(e,t,n){"use strict";t.__esModule=!0,t.wordDiff=void 0,t.diffWords=function(e,t,n){return n=(0,o.generateOptions)(n,{ignoreWhitespace:!0}),a.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return a.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4);var i=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,c=/\S/,a=t.wordDiff=new r.default;a.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!c.test(e)&&!c.test(t)},a.tokenize=function(e){for(var t=e.split(/(\s+|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&i.test(t[n])&&i.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t}},function(e,t){"use strict";t.__esModule=!0,t.generateOptions=function(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}},function(e,t,n){"use strict";t.__esModule=!0,t.lineDiff=void 0,t.diffLines=function(e,t,n){return i.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var r=(0,o.generateOptions)(n,{ignoreWhitespace:!0});return i.diff(e,t,r)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4);var i=t.lineDiff=new r.default;i.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t}},function(e,t,n){"use strict";t.__esModule=!0,t.sentenceDiff=void 0,t.diffSentences=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.sentenceDiff=new r.default;o.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.cssDiff=void 0,t.diffCss=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.cssDiff=new r.default;o.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.jsonDiff=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.diffJson=function(e,t,n){return a.diff(e,t,n)},t.canonicalize=s;var o=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),i=n(5);var c=Object.prototype.toString,a=t.jsonDiff=new o.default;function s(e,t,n,o,i){t=t||[],n=n||[],o&&(e=o(i,e));var a=void 0;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var l=void 0;if("[object Array]"===c.call(e)){for(t.push(e),l=new Array(e.length),n.push(l),a=0;a<e.length;a+=1)l[a]=s(e[a],t,n,o,i);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),"object"===(void 0===e?"undefined":r(e))&&null!==e){t.push(e),l={},n.push(l);var u=[],d=void 0;for(d in e)e.hasOwnProperty(d)&&u.push(d);for(u.sort(),a=0;a<u.length;a+=1)l[d=u[a]]=s(e[d],t,n,o,d);t.pop(),n.pop()}else l=e;return l}a.useLongestToken=!0,a.tokenize=i.lineDiff.tokenize,a.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(s(e,null,null,o),o,"  ")},a.equals=function(e,t){return o.default.prototype.equals.call(a,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))}},function(e,t,n){"use strict";t.__esModule=!0,t.arrayDiff=void 0,t.diffArrays=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.arrayDiff=new r.default;o.tokenize=function(e){return e.slice()},o.join=o.removeEmpty=function(e){return e}},function(e,t,n){"use strict";t.__esModule=!0,t.applyPatch=i,t.applyPatches=function(e,t){"string"==typeof e&&(e=(0,r.parsePatch)(e));var n=0;!function r(){var o=e[n++];if(!o)return t.complete();t.loadFile(o,function(e,n){if(e)return t.complete(e);var c=i(n,o,t);t.patched(o,c,function(e){if(e)return t.complete(e);r()})})}()};var r=n(11),o=function(e){return e&&e.__esModule?e:{default:e}}(n(12));function i(e,t){var n=arguments.length>2&&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 i=e.split(/\r\n|[\n\v\f\r\x85]/),c=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],a=t.hunks,s=n.compareLine||function(e,t,n,r){return t===r},l=0,u=n.fuzzFactor||0,d=0,p=0,f=void 0,b=void 0;function h(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],o=r.length>0?r[0]:" ",c=r.length>0?r.substr(1):r;if(" "===o||"-"===o){if(!s(t+1,i[t],o,c)&&++l>u)return!1;t++}}return!0}for(var m=0;m<a.length;m++){for(var v=a[m],O=i.length-v.oldLines,g=0,j=p+v.oldStart-1,y=(0,o.default)(j,d,O);void 0!==g;g=y())if(h(v,j+g)){v.offset=p+=g;break}if(void 0===g)return!1;d=v.offset+v.oldStart+v.oldLines}for(var k=0,_=0;_<a.length;_++){var S=a[_],E=S.oldStart+S.offset+k-1;k+=S.newLines-S.oldLines,E<0&&(E=0);for(var C=0;C<S.lines.length;C++){var w=S.lines[C],T=w.length>0?w[0]:" ",I=w.length>0?w.substr(1):w,P=S.linedelimiters[C];if(" "===T)E++;else if("-"===T)i.splice(E,1),c.splice(E,1);else if("+"===T)i.splice(E,0,I),c.splice(E,0,P),E++;else if("\\"===T){var B=S.lines[C-1]?S.lines[C-1][0]:null;"+"===B?f=!0:"-"===B&&(b=!0)}}}if(f)for(;!i[i.length-1];)i.pop(),c.pop();else b&&(i.push(""),c.push("\n"));for(var A=0;A<i.length-1;A++)i[A]=i[A]+c[A];return i.join("")}},function(e,t){"use strict";t.__esModule=!0,t.parsePatch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=[],i=0;function c(){var e={};for(o.push(e);i<n.length;){var r=n[i];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var c=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);c&&(e.index=c[1]),i++}for(a(e),a(e),e.hunks=[];i<n.length;){var l=n[i];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(l))break;if(/^@@/.test(l))e.hunks.push(s());else{if(l&&t.strict)throw new Error("Unknown line "+(i+1)+" "+JSON.stringify(l));i++}}}function a(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[i]);if(t){var r="---"===t[1]?"old":"new",o=t[2].split("\t",2),c=o[0].replace(/\\\\/g,"\\");/^".*"$/.test(c)&&(c=c.substr(1,c.length-2)),e[r+"FileName"]=c,e[r+"Header"]=(o[1]||"").trim(),i++}}function s(){for(var e=i,o=n[i++],c=o.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),a={oldStart:+c[1],oldLines:+c[2]||1,newStart:+c[3],newLines:+c[4]||1,lines:[],linedelimiters:[]},s=0,l=0;i<n.length&&!(0===n[i].indexOf("--- ")&&i+2<n.length&&0===n[i+1].indexOf("+++ ")&&0===n[i+2].indexOf("@@"));i++){var u=0==n[i].length&&i!=n.length-1?" ":n[i][0];if("+"!==u&&"-"!==u&&" "!==u&&"\\"!==u)break;a.lines.push(n[i]),a.linedelimiters.push(r[i]||"\n"),"+"===u?s++:"-"===u?l++:" "===u&&(s++,l++)}if(s||1!==a.newLines||(a.newLines=0),l||1!==a.oldLines||(a.oldLines=0),t.strict){if(s!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(l!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return a}for(;i<n.length;)c();return o}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t,n){var r=!0,o=!1,i=!1,c=1;return function a(){if(r&&!i){if(o?c++:r=!1,e+c<=n)return c;i=!0}if(!o)return i||(r=!0),t<=e-c?-c++:(o=!0,a())}}},function(e,t,n){"use strict";t.__esModule=!0,t.calcLineCount=a,t.merge=function(e,t,n){e=s(e,n),t=s(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index);(e.newFileName||t.newFileName)&&(l(e)?l(t)?(r.oldFileName=u(r,e.oldFileName,t.oldFileName),r.newFileName=u(r,e.newFileName,t.newFileName),r.oldHeader=u(r,e.oldHeader,t.oldHeader),r.newHeader=u(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader));r.hunks=[];var o=0,i=0,c=0,a=0;for(;o<e.hunks.length||i<t.hunks.length;){var b=e.hunks[o]||{oldStart:1/0},h=t.hunks[i]||{oldStart:1/0};if(d(b,h))r.hunks.push(p(b,c)),o++,a+=b.newLines-b.oldLines;else if(d(h,b))r.hunks.push(p(h,a)),i++,c+=h.newLines-h.oldLines;else{var m={oldStart:Math.min(b.oldStart,h.oldStart),oldLines:0,newStart:Math.min(b.newStart+c,h.oldStart+a),newLines:0,lines:[]};f(m,b.oldStart,b.lines,h.oldStart,h.lines),i++,o++,r.hunks.push(m)}}return r};var r=n(14),o=n(11),i=n(15);function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e){var t=function e(t){var n=0;var r=0;t.forEach(function(t){if("string"!=typeof t){var o=e(t.mine),i=e(t.theirs);void 0!==n&&(o.oldLines===i.oldLines?n+=o.oldLines:n=void 0),void 0!==r&&(o.newLines===i.newLines?r+=o.newLines:r=void 0)}else void 0===r||"+"!==t[0]&&" "!==t[0]||r++,void 0===n||"-"!==t[0]&&" "!==t[0]||n++});return{oldLines:n,newLines:r}}(e.lines),n=t.oldLines,r=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function s(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,o.parsePatch)(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return(0,r.structuredPatch)(void 0,void 0,t,e)}return e}function l(e){return e.newFileName&&e.newFileName!==e.oldFileName}function u(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function d(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function p(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function f(e,t,n,r,o){var i={offset:t,lines:n,index:0},s={offset:r,lines:o,index:0};for(v(e,i,s),v(e,s,i);i.index<i.lines.length&&s.index<s.lines.length;){var l=i.lines[i.index],u=s.lines[s.index];if("-"!==l[0]&&"+"!==l[0]||"-"!==u[0]&&"+"!==u[0])if("+"===l[0]&&" "===u[0]){var d;(d=e.lines).push.apply(d,c(g(i)))}else if("+"===u[0]&&" "===l[0]){var p;(p=e.lines).push.apply(p,c(g(s)))}else"-"===l[0]&&" "===u[0]?h(e,i,s):"-"===u[0]&&" "===l[0]?h(e,s,i,!0):l===u?(e.lines.push(l),i.index++,s.index++):m(e,g(i),g(s));else b(e,i,s)}O(e,i),O(e,s),a(e)}function b(e,t,n){var r=g(t),o=g(n);if(j(r)&&j(o)){var a,s;if((0,i.arrayStartsWith)(r,o)&&y(n,r,r.length-o.length))return void(a=e.lines).push.apply(a,c(r));if((0,i.arrayStartsWith)(o,r)&&y(t,o,o.length-r.length))return void(s=e.lines).push.apply(s,c(o))}else if((0,i.arrayEqual)(r,o)){var l;return void(l=e.lines).push.apply(l,c(r))}m(e,r,o)}function h(e,t,n,r){var o,i=g(t),a=function(e,t){var n=[],r=[],o=0,i=!1,c=!1;for(;o<t.length&&e.index<e.lines.length;){var a=e.lines[e.index],s=t[o];if("+"===s[0])break;if(i=i||" "!==a[0],r.push(s),o++,"+"===a[0])for(c=!0;"+"===a[0];)n.push(a),a=e.lines[++e.index];s.substr(1)===a.substr(1)?(n.push(a),e.index++):c=!0}"+"===(t[o]||"")[0]&&i&&(c=!0);if(c)return n;for(;o<t.length;)r.push(t[o++]);return{merged:r,changes:n}}(n,i);a.merged?(o=e.lines).push.apply(o,c(a.merged)):m(e,r?a:i,r?i:a)}function m(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function v(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function O(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function g(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function j(e){return e.reduce(function(e,t){return e&&"-"===t[0]},!0)}function y(e,t,n){for(var r=0;r<n;r++){var o=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+o)return!1}return e.index+=n,!0}},function(e,t,n){"use strict";t.__esModule=!0,t.structuredPatch=i,t.createTwoFilesPatch=c,t.createPatch=function(e,t,n,r,o,i){return c(e,e,t,n,r,o,i)};var r=n(5);function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,i,c,a,s){s||(s={}),void 0===s.context&&(s.context=4);var l=(0,r.diffLines)(n,i,s);function u(e){return e.map(function(e){return" "+e})}l.push({value:"",lines:[]});for(var d=[],p=0,f=0,b=[],h=1,m=1,v=function(e){var t=l[e],r=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=r,t.added||t.removed){var c;if(!p){var a=l[e-1];p=h,f=m,a&&(b=s.context>0?u(a.lines.slice(-s.context)):[],p-=b.length,f-=b.length)}(c=b).push.apply(c,o(r.map(function(e){return(t.added?"+":"-")+e}))),t.added?m+=r.length:h+=r.length}else{if(p)if(r.length<=2*s.context&&e<l.length-2){var v;(v=b).push.apply(v,o(u(r)))}else{var O,g=Math.min(r.length,s.context);(O=b).push.apply(O,o(u(r.slice(0,g))));var j={oldStart:p,oldLines:h-p+g,newStart:f,newLines:m-f+g,lines:b};if(e>=l.length-2&&r.length<=s.context){var y=/\n$/.test(n),k=/\n$/.test(i);0!=r.length||y?y&&k||b.push("\\ No newline at end of file"):b.splice(j.oldLines,0,"\\ No newline at end of file")}d.push(j),p=0,f=0,b=[]}h+=r.length,m+=r.length}},O=0;O<l.length;O++)v(O);return{oldFileName:e,newFileName:t,oldHeader:c,newHeader:a,hunks:d}}function c(e,t,n,r,o,c,a){var s=i(e,t,n,r,o,c,a),l=[];e==t&&l.push("Index: "+e),l.push("==================================================================="),l.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),l.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var u=0;u<s.hunks.length;u++){var d=s.hunks[u];l.push("@@ -"+d.oldStart+","+d.oldLines+" +"+d.newStart+","+d.newLines+" @@"),l.push.apply(l,d.lines)}return l.join("\n")+"\n"}},function(e,t){"use strict";function n(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}t.__esModule=!0,t.arrayEqual=function(e,t){if(e.length!==t.length)return!1;return n(e,t)},t.arrayStartsWith=n},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToDMP=function(e){for(var t=[],n=void 0,r=void 0,o=0;o<e.length;o++)n=e[o],r=n.added?1:n.removed?-1:0,t.push([r,n.value]);return t}},function(e,t){"use strict";function n(e){var t=e;return t=(t=(t=(t=t.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],r=0;r<e.length;r++){var o=e[r];o.added?t.push("<ins>"):o.removed&&t.push("<del>"),t.push(n(o.value)),o.added?t.push("</ins>"):o.removed&&t.push("</del>")}return t.join("")}}])})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r={};n.d(r,"setupEditor",function(){return W}),n.d(r,"resetPost",function(){return q}),n.d(r,"resetAutosave",function(){return G}),n.d(r,"updatePost",function(){return $}),n.d(r,"setupEditorState",function(){return Y}),n.d(r,"resetBlocks",function(){return Q}),n.d(r,"receiveBlocks",function(){return X}),n.d(r,"updateBlockAttributes",function(){return Z}),n.d(r,"updateBlock",function(){return J}),n.d(r,"selectBlock",function(){return ee}),n.d(r,"startMultiSelect",function(){return te}),n.d(r,"stopMultiSelect",function(){return ne}),n.d(r,"multiSelect",function(){return re}),n.d(r,"clearSelectedBlock",function(){return oe}),n.d(r,"toggleSelection",function(){return ie}),n.d(r,"replaceBlocks",function(){return ce}),n.d(r,"replaceBlock",function(){return ae}),n.d(r,"moveBlocksDown",function(){return le}),n.d(r,"moveBlocksUp",function(){return ue}),n.d(r,"moveBlockToPosition",function(){return de}),n.d(r,"insertBlock",function(){return pe}),n.d(r,"insertBlocks",function(){return fe}),n.d(r,"showInsertionPoint",function(){return be}),n.d(r,"hideInsertionPoint",function(){return he}),n.d(r,"setTemplateValidity",function(){return me}),n.d(r,"checkTemplateValidity",function(){return ve}),n.d(r,"synchronizeTemplate",function(){return Oe}),n.d(r,"editPost",function(){return ge}),n.d(r,"savePost",function(){return je}),n.d(r,"refreshPost",function(){return ye}),n.d(r,"trashPost",function(){return ke}),n.d(r,"mergeBlocks",function(){return _e}),n.d(r,"autosave",function(){return Se}),n.d(r,"redo",function(){return Ee}),n.d(r,"undo",function(){return Ce}),n.d(r,"createUndoLevel",function(){return we}),n.d(r,"removeBlocks",function(){return Te}),n.d(r,"removeBlock",function(){return Ie}),n.d(r,"toggleBlockMode",function(){return Pe}),n.d(r,"startTyping",function(){return Be}),n.d(r,"stopTyping",function(){return Ae}),n.d(r,"createNotice",function(){return Le}),n.d(r,"removeNotice",function(){return xe}),n.d(r,"createSuccessNotice",function(){return Ne}),n.d(r,"createInfoNotice",function(){return Re}),n.d(r,"createErrorNotice",function(){return De}),n.d(r,"createWarningNotice",function(){return Me}),n.d(r,"fetchReusableBlocks",function(){return Fe}),n.d(r,"receiveReusableBlocks",function(){return Ue}),n.d(r,"saveReusableBlock",function(){return He}),n.d(r,"deleteReusableBlock",function(){return Ve}),n.d(r,"updateReusableBlockTitle",function(){return Ke}),n.d(r,"convertBlockToStatic",function(){return ze}),n.d(r,"convertBlockToReusable",function(){return We}),n.d(r,"insertDefaultBlock",function(){return qe}),n.d(r,"updateBlockListSettings",function(){return Ge}),n.d(r,"updateEditorSettings",function(){return $e}),n.d(r,"registerToken",function(){return Ye}),n.d(r,"unregisterToken",function(){return Qe});var o={};n.d(o,"POST_UPDATE_TRANSACTION_ID",function(){return et}),n.d(o,"INSERTER_UTILITY_HIGH",function(){return nt}),n.d(o,"INSERTER_UTILITY_MEDIUM",function(){return rt}),n.d(o,"INSERTER_UTILITY_LOW",function(){return ot}),n.d(o,"INSERTER_UTILITY_NONE",function(){return it}),n.d(o,"hasEditorUndo",function(){return at}),n.d(o,"hasEditorRedo",function(){return st}),n.d(o,"isEditedPostNew",function(){return lt}),n.d(o,"isEditedPostDirty",function(){return ut}),n.d(o,"isCleanNewPost",function(){return dt}),n.d(o,"getCurrentPost",function(){return pt}),n.d(o,"getCurrentPostType",function(){return ft}),n.d(o,"getCurrentPostId",function(){return bt}),n.d(o,"getCurrentPostRevisionsCount",function(){return ht}),n.d(o,"getCurrentPostLastRevisionId",function(){return mt}),n.d(o,"getPostEdits",function(){return vt}),n.d(o,"getCurrentPostAttribute",function(){return Ot}),n.d(o,"getEditedPostAttribute",function(){return gt}),n.d(o,"getAutosaveAttribute",function(){return jt}),n.d(o,"getEditedPostVisibility",function(){return yt}),n.d(o,"isCurrentPostPending",function(){return kt}),n.d(o,"isCurrentPostPublished",function(){return _t}),n.d(o,"isCurrentPostScheduled",function(){return St}),n.d(o,"isEditedPostPublishable",function(){return Et}),n.d(o,"isEditedPostSaveable",function(){return Ct}),n.d(o,"isEditedPostEmpty",function(){return wt}),n.d(o,"isEditedPostAutosaveable",function(){return Tt}),n.d(o,"getAutosave",function(){return It}),n.d(o,"hasAutosave",function(){return Pt}),n.d(o,"isEditedPostBeingScheduled",function(){return Bt}),n.d(o,"getBlockDependantsCacheBust",function(){return At}),n.d(o,"getBlockName",function(){return Lt}),n.d(o,"getBlock",function(){return xt}),n.d(o,"getBlocks",function(){return Nt}),n.d(o,"getClientIdsWithDescendants",function(){return Rt}),n.d(o,"getGlobalBlockCount",function(){return Dt}),n.d(o,"getBlocksByClientId",function(){return Mt}),n.d(o,"getBlockCount",function(){return Ft}),n.d(o,"getBlockSelectionStart",function(){return Ut}),n.d(o,"getBlockSelectionEnd",function(){return Ht}),n.d(o,"getSelectedBlockCount",function(){return Vt}),n.d(o,"hasSelectedBlock",function(){return Kt}),n.d(o,"getSelectedBlockClientId",function(){return zt}),n.d(o,"getSelectedBlock",function(){return Wt}),n.d(o,"getBlockRootClientId",function(){return qt}),n.d(o,"getAdjacentBlockClientId",function(){return Gt}),n.d(o,"getPreviousBlockClientId",function(){return $t}),n.d(o,"getNextBlockClientId",function(){return Yt}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Qt}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Xt}),n.d(o,"getMultiSelectedBlocks",function(){return Zt}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return Jt}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return en}),n.d(o,"isFirstMultiSelectedBlock",function(){return tn}),n.d(o,"isBlockMultiSelected",function(){return nn}),n.d(o,"isAncestorMultiSelected",function(){return rn}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return on}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return cn}),n.d(o,"getBlockOrder",function(){return an}),n.d(o,"getBlockIndex",function(){return sn}),n.d(o,"isBlockSelected",function(){return ln}),n.d(o,"hasSelectedInnerBlock",function(){return un}),n.d(o,"isBlockWithinSelection",function(){return dn}),n.d(o,"hasMultiSelection",function(){return pn}),n.d(o,"isMultiSelecting",function(){return fn}),n.d(o,"isSelectionEnabled",function(){return bn}),n.d(o,"getBlockMode",function(){return hn}),n.d(o,"isTyping",function(){return mn}),n.d(o,"getBlockInsertionPoint",function(){return vn}),n.d(o,"isBlockInsertionPointVisible",function(){return On}),n.d(o,"isValidTemplate",function(){return gn}),n.d(o,"getTemplate",function(){return jn}),n.d(o,"getTemplateLock",function(){return yn}),n.d(o,"isSavingPost",function(){return kn}),n.d(o,"didPostSaveRequestSucceed",function(){return _n}),n.d(o,"didPostSaveRequestFail",function(){return Sn}),n.d(o,"isAutosavingPost",function(){return En}),n.d(o,"getSuggestedPostFormat",function(){return Cn}),n.d(o,"getEditedPostContent",function(){return wn}),n.d(o,"getNotices",function(){return Tn}),n.d(o,"canInsertBlockType",function(){return In}),n.d(o,"getInserterItems",function(){return Bn}),n.d(o,"getReusableBlock",function(){return An}),n.d(o,"isSavingReusableBlock",function(){return Ln}),n.d(o,"isFetchingReusableBlock",function(){return xn}),n.d(o,"getReusableBlocks",function(){return Nn}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return Rn}),n.d(o,"isPublishingPost",function(){return Dn}),n.d(o,"isPermalinkEditable",function(){return Mn}),n.d(o,"getPermalink",function(){return Fn}),n.d(o,"getPermalinkParts",function(){return Un}),n.d(o,"inSomeHistory",function(){return Hn}),n.d(o,"getBlockListSettings",function(){return Vn}),n.d(o,"getEditorSettings",function(){return Kn}),n.d(o,"getTokenSettings",function(){return zn}),n.d(o,"canUserUseUnfilteredHTML",function(){return Wn});var i={};n.d(i,"name",function(){return ar}),n.d(i,"settings",function(){return sr});var c={};n.d(c,"image",function(){return i});var a=n(9),s=(n(128),n(61)),l=n(50),u=n(1),d=n(4),p=n(40),f=n(11),b=n(38),h=n(26),m=n(25),v=n(44),O=n(65),g=n.n(O),j={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(f.a)({},j,e)).shouldOverwriteState=Object(u.overSome)([e.shouldOverwriteState,function(t){return Object(u.includes)(e.ignoreTypes,t.type)}]);var n={past:[],present:t(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=e,o=r.resetTypes,i=void 0===o?[]:o,c=r.shouldOverwriteState,a=void 0===c?function(){return!1}:c;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=e.past,c=e.present,s=e.future,l=e.lastAction,d=e.shouldCreateUndoLevel,p=l;switch(r.type){case"UNDO":return o.length?{past:Object(u.dropRight)(o),present:Object(u.last)(o),future:[c].concat(Object(h.a)(s)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return s.length?{past:Object(h.a)(o).concat([c]),present:Object(u.first)(s),future:Object(u.drop)(s),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(f.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var b=t(c,r);if(Object(u.includes)(i,r.type))return{past:[],present:b,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(c===b)return e;var m=o;return!d&&o.length&&a(r,p)||(m=Object(h.a)(o).concat([c])),{past:m,present:b,future:[],shouldCreateUndoLevel:!1,lastAction:r}}}},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n,r){var o=t(n,r),i=void 0===n||Object(u.includes)(e.resetTypes,r.type),c=n!==o;if(!c&&!i)return n;c&&void 0!==n||(o=Object(f.a)({},o));var a=Object(u.includes)(e.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&c,o}}},_=n(2),S={insertUsage:{}},E={alignWide:!1,colors:[{name:Object(_.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(_.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(_.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(_.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(_.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(_.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(_.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(_.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(_.__)("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:Object(_.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(_.__)("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],fontSizes:[{name:Object(_.__)("Small"),shortName:Object(_.__)("S"),size:14,slug:"small"},{name:Object(_.__)("Regular"),shortName:Object(_.__)("M"),size:16,slug:"regular"},{name:Object(_.__)("Large"),shortName:Object(_.__)("L"),size:36,slug:"large"},{name:Object(_.__)("Larger"),shortName:Object(_.__)("XL"),size:48,slug:"larger"}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null};function C(e,t,n){return Object(h.a)(e.slice(0,n)).concat(Object(h.a)(Object(u.castArray)(t)),Object(h.a)(e.slice(n)))}function w(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(h.a)(e);return o.splice(t,r),C(o,e.slice(t,t+r),n)}function T(e){return e&&"object"===Object(v.a)(e)&&"raw"in e?e.raw:e}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(m.a)({},t,[]);return e.forEach(function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,I(o,r))}),n}function P(e){for(var t={},n=Object(h.a)(e);n.length;){var r=n.shift(),o=r.innerBlocks,i=Object(b.a)(r,["innerBlocks"]);n.push.apply(n,Object(h.a)(o)),t[i.clientId]=i}return t}function B(e,t){return Object(u.isEqual)(Object(u.keys)(e),Object(u.keys)(t))}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&e.clientId===t.clientId&&B(e.attributes,t.attributes)}function L(e,t){return"EDIT_POST"===e.type&&B(e.edits,t.edits)}var x=Object(u.flow)([d.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var r=Object(h.a)(n.clientIds),o=0;o<r.length;o++)r.push.apply(r,Object(h.a)(t.blockOrder[r[o]]));n=Object(f.a)({},n,{clientIds:r})}return e(t,n)}},y({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RECEIVE_BLOCKS","RESET_POST","UPDATE_POST"],shouldOverwriteState:function(e,t){return!(!t||e.type!==t.type)&&Object(u.overSome)([A,L])(e,t)}}),k({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"],ignoreTypes:["RECEIVE_BLOCKS","RESET_POST","UPDATE_POST"]})])({edits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_POST":case"SETUP_EDITOR_STATE":return Object(u.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t===e&&(t=Object(f.a)({},e)),t[r]=n),t},e);case"RESET_BLOCKS":return"content"in e?Object(u.omit)(e,"content"):e;case"DIRTY_ARTIFICIALLY":return Object(f.a)({},e);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return T(t.post[e])};return Object(u.reduce)(e,function(t,r,o){return r!==n(o)?t:(e===t&&(t=Object(f.a)({},e)),delete t[o],t)},e)}return e},blocksByClientId: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":case"SETUP_EDITOR_STATE":return P(t.blocks);case"RECEIVE_BLOCKS":return Object(f.a)({},e,P(t.blocks));case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(u.reduce)(t.attributes,function(n,r,o){return r!==n[o]&&(n===e[t.clientId].attributes&&(n=Object(f.a)({},n)),n[o]=r),n},e[t.clientId].attributes);return n===e[t.clientId].attributes?e:Object(f.a)({},e,Object(m.a)({},t.clientId,Object(f.a)({},e[t.clientId],{attributes:n})));case"MOVE_BLOCK_TO_POSITION":return e[t.clientId].attributes.layout===t.layout?e:Object(f.a)({},e,Object(m.a)({},t.clientId,Object(f.a)({},e[t.clientId],{attributes:Object(f.a)({},e[t.clientId].attributes,{layout:t.layout})})));case"UPDATE_BLOCK":return e[t.clientId]?Object(f.a)({},e,Object(m.a)({},t.clientId,Object(f.a)({},e[t.clientId],t.updates))):e;case"INSERT_BLOCKS":return Object(f.a)({},e,P(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(f.a)({},Object(u.omit)(e,t.clientIds),P(t.blocks)):e;case"REMOVE_BLOCKS":return Object(u.omit)(e,t.clientIds);case"SAVE_REUSABLE_BLOCK_SUCCESS":var r=t.id,o=t.updatedId;return r===o?e:Object(u.mapValues)(e,function(e){return"core/block"===e.name&&e.attributes.ref===r?Object(f.a)({},e,{attributes:Object(f.a)({},e.attributes,{ref:o})}):e})}return e},blockOrder: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":case"SETUP_EDITOR_STATE":return I(t.blocks);case"RECEIVE_BLOCKS":return Object(f.a)({},e,Object(u.omit)(I(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=t.blocks,i=e[r]||[],c=I(o,r),a=t.index,s=void 0===a?i.length:a;return Object(f.a)({},e,c,Object(m.a)({},r,C(i,c[r],s)));case"MOVE_BLOCK_TO_POSITION":var l,d=t.fromRootClientId,p=void 0===d?"":d,b=t.toRootClientId,v=void 0===b?"":b,O=t.clientId,g=t.index,j=void 0===g?e[v].length:g;if(p===v){var y=e[v].indexOf(O);return Object(f.a)({},e,Object(m.a)({},v,w(e[v],y,j)))}return Object(f.a)({},e,(l={},Object(m.a)(l,p,Object(u.without)(e[p],O)),Object(m.a)(l,v,C(e[v],O,j)),l));case"MOVE_BLOCKS_UP":var k=t.clientIds,_=t.rootClientId,S=void 0===_?"":_,E=Object(u.first)(k),T=e[S];if(!T.length||E===Object(u.first)(T))return e;var P=T.indexOf(E);return Object(f.a)({},e,Object(m.a)({},S,w(T,P,P-1,k.length)));case"MOVE_BLOCKS_DOWN":var B=t.clientIds,A=t.rootClientId,L=void 0===A?"":A,x=Object(u.first)(B),N=Object(u.last)(B),R=e[L];if(!R.length||N===Object(u.last)(R))return e;var D=R.indexOf(x);return Object(f.a)({},e,Object(m.a)({},L,w(R,D,D+1,B.length)));case"REPLACE_BLOCKS":var M=t.blocks,F=t.clientIds;if(!M)return e;var U=I(M);return Object(u.flow)([function(e){return Object(u.omit)(e,F)},function(e){return Object(f.a)({},e,Object(u.omit)(U,""))},function(e){return Object(u.mapValues)(e,function(e){return Object(u.reduce)(e,function(e,t){return t===F[0]?Object(h.a)(e).concat(Object(h.a)(U[""])):(-1===F.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(u.flow)([function(e){return Object(u.omit)(e,t.clientIds)},function(e){return Object(u.mapValues)(e,function(e){return u.without.apply(void 0,[e].concat(Object(h.a)(t.clientIds)))})}])(e)}return e}});var N=Object(d.combineReducers)({data:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(u.reduce)(t.results,function(t,n){var r=n.reusableBlock,o=r.id,i=r.title,c={clientId:n.parsedBlock.clientId,title:i};return Object(u.isEqual)(t[o],c)||(t===e&&(t=Object(f.a)({},t)),t[o]=c),t},e);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=t.id,r=t.title;return e[n]&&e[n].title!==r?Object(f.a)({},e,Object(m.a)({},n,Object(f.a)({},e[n],{title:r}))):e;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return Object(f.a)({},Object(u.omit)(e,o),Object(m.a)({},i,c));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(u.omit)(e,a)}return e},isFetching:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_REUSABLE_BLOCKS":var n=t.id;return n?Object(f.a)({},e,Object(m.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(u.omit)(e,r)}return e},isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_REUSABLE_BLOCK":return Object(f.a)({},e,Object(m.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(u.omit)(e,n)}return e}});var R=g()(Object(d.combineReducers)({editor:x,currentPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(t.post)n=t.post;else{if(!t.edits)return e;n=Object(f.a)({},e,t.edits)}return Object(u.mapValues)(n,T)}return e},isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},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(f.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(f.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(f.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(f.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(f.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"INSERT_BLOCKS":return Object(f.a)({},e,{start:t.blocks[0].clientId,end:t.blocks[0].clientId,initialPosition:null,isMultiSelecting:!1});case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.start)?Object(f.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(u.get)(t.blocks,[0,"clientId"],null);return Object(f.a)({},e,{start:n,end:n,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(f.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(f.a)({},e,Object(m.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(u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(u.isEqual)(e[n],t.settings)?e:Object(f.a)({},e,Object(m.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(u.omit)(e,n):e}return e},isInsertionPointVisible:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,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 r=n.name,o={name:n.name};return Object(a.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Object(f.a)({},e,{insertUsage:Object(f.a)({},e.insertUsage,Object(m.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})},e);case"REMOVE_REUSABLE_BLOCK":return Object(f.a)({},e,{insertUsage:Object(u.omitBy)(e.insertUsage,function(e){return e.insert.ref===t.id})})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,isAutosave:t.isAutosave};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:t.error}}return e},notices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return Object(h.a)(Object(u.reject)(e,{id:t.notice.id})).concat([t.notice]);case"REMOVE_NOTICE":var n=t.noticeId,r=Object(u.findIndex)(e,{id:n});return-1===r?e:Object(h.a)(e.slice(0,r)).concat(Object(h.a)(e.slice(r+1)))}return e},reusableBlocks:N,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(f.a)({},e,{isValid:t.isValid})}return e},autosave: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"RESET_AUTOSAVE":var n=t.post,r=["title","excerpt","content"].map(function(e){return T(n[e])}),o=Object(p.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2],preview_link:n.preview_link};case"REQUEST_POST_UPDATE":if(e&&t.options.autosave)return Object(u.omit)(e,"preview_link")}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(f.a)({},e,t.settings)}return e},tokens:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REGISTER_TOKEN":return Object(f.a)({},e,Object(m.a)({},t.name,t.settings));case"UNREGISTER_TOKEN":return Object(u.omit)(e,t.name)}return e}})),D=n(108),M=n.n(D),F=n(190),U=n.n(F),H=n(0),V=n(78),K=n(75),z=n.n(K);function W(e,t){return{type:"SETUP_EDITOR",autosave:t,post:e}}function q(e){return{type:"RESET_POST",post:e}}function G(e){return{type:"RESET_AUTOSAVE",post:e}}function $(e){return{type:"UPDATE_POST",edits:e}}function Y(e,t,n){return{type:"SETUP_EDITOR_STATE",post:e,blocks:t,edits:n}}function Q(e){return{type:"RESET_BLOCKS",blocks:e}}function X(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Z(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientId:e,attributes:t}}function J(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ee(e){return{type:"SELECT_BLOCK",initialPosition:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function te(){return{type:"START_MULTI_SELECT"}}function ne(){return{type:"STOP_MULTI_SELECT"}}function re(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function oe(){return{type:"CLEAR_SELECTED_BLOCK"}}function ie(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function ce(e,t){return{type:"REPLACE_BLOCKS",clientIds:Object(u.castArray)(e),blocks:Object(u.castArray)(t),time:Date.now()}}function ae(e,t){return ce(e,t)}function se(e){return function(t,n){return{clientIds:Object(u.castArray)(t),type:e,rootClientId:n}}}var le=se("MOVE_BLOCKS_DOWN"),ue=se("MOVE_BLOCKS_UP");function de(e,t,n,r,o){return{type:"MOVE_BLOCK_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientId:e,index:o,layout:r}}function pe(e,t,n){return fe([e],t,n)}function fe(e,t,n){return{type:"INSERT_BLOCKS",blocks:Object(u.castArray)(e),index:t,rootClientId:n,time:Date.now()}}function be(){return{type:"SHOW_INSERTION_POINT"}}function he(){return{type:"HIDE_INSERTION_POINT"}}function me(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function ve(){return{type:"CHECK_TEMPLATE_VALIDITY"}}function Oe(){return{type:"SYNCHRONIZE_TEMPLATE"}}function ge(e){return{type:"EDIT_POST",edits:e}}function je(){return{type:"REQUEST_POST_UPDATE",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function ye(){return{type:"REFRESH_POST"}}function ke(e,t){return{type:"TRASH_POST",postId:e,postType:t}}function _e(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function Se(){return je({autosave:!0})}function Ee(){return{type:"REDO"}}function Ce(){return{type:"UNDO"}}function we(){return{type:"CREATE_UNDO_LEVEL"}}function Te(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"REMOVE_BLOCKS",clientIds:Object(u.castArray)(e),selectPrevious:t}}function Ie(e,t){return Te([e],t)}function Pe(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Be(){return{type:"START_TYPING"}}function Ae(){return{type:"STOP_TYPING"}}function Le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.id,o=void 0===r?z()():r,i=n.isDismissible;return{type:"CREATE_NOTICE",notice:{id:o,status:e,content:t,isDismissible:void 0===i||i,spokenMessage:n.spokenMessage}}}function xe(e){return{type:"REMOVE_NOTICE",noticeId:e}}var Ne=Object(u.partial)(Le,"success"),Re=Object(u.partial)(Le,"info"),De=Object(u.partial)(Le,"error"),Me=Object(u.partial)(Le,"warning");function Fe(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Ue(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function He(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Ve(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function Ke(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function ze(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function We(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(u.castArray)(e)}}function qe(e,t,n){return pe(Object(a.createBlock)(Object(a.getDefaultBlockName)(),e),n,t)}function Ge(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function $e(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}function Ye(e,t){return{type:"REGISTER_TOKEN",name:e,settings:t}}function Qe(e){return{type:"UNREGISTER_TOKEN",name:e}}var Xe=n(42),Ze=n(67),Je=n(73),et="post-update",tt=/%(?:postname|pagename)%/,nt=3,rt=2,ot=1,it=0,ct=[];function at(e){return e.editor.past.length>0}function st(e){return e.editor.future.length>0}function lt(e){return"auto-draft"===pt(e).status}function ut(e){return e.editor.isDirty||Hn(e,ut)}function dt(e){return!ut(e)&&lt(e)}function pt(e){return e.currentPost}function ft(e){return e.currentPost.type}function bt(e){return pt(e).id||null}function ht(e){return Object(u.get)(pt(e),["_links","version-history",0,"count"],0)}function mt(e){return Object(u.get)(pt(e),["_links","predecessor-version",0,"id"],null)}function vt(e){return e.editor.present.edits}function Ot(e,t){var n=pt(e);if(n.hasOwnProperty(t))return n[t]}function gt(e,t){var n=vt(e);switch(t){case"content":return wn(e)}return n.hasOwnProperty(t)?n[t]:Ot(e,t)}function jt(e,t){if(!Pt(e))return null;var n=It(e);return n.hasOwnProperty(t)?n[t]:void 0}function yt(e){var t=gt(e,"status"),n=gt(e,"password");return"private"===t?"private":n?"password":"public"}function kt(e){return"pending"===pt(e).status}function _t(e){var t=pt(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&Object(Ze.moment)(t.date).isBefore(Object(Ze.moment)())}function St(e){return"future"===pt(e).status&&!_t(e)}function Et(e){var t=pt(e);return ut(e)||-1===["publish","private","future"].indexOf(t.status)}function Ct(e){return!kn(e)&&(!!gt(e,"title")||!!gt(e,"excerpt")||!wt(e))}function wt(e){return!Ft(e)&&!gt(e,"content")}function Tt(e){if(!Ct(e))return!1;if(!Pt(e))return!0;var t=It(e);return["title","excerpt","content"].some(function(n){return t[n]!==gt(e,n)})}function It(e){return e.autosave}function Pt(e){return!!It(e)}function Bt(e){var t=Object(Ze.moment)(gt(e,"date")),n=Object(Ze.moment)().add(1,"minute");return t.isAfter(n)}var At=Object(Xe.a)(function(){return[]},function(e,t){return Object(u.map)(an(e,t),function(t){return xt(e,t)})});function Lt(e,t){var n=e.editor.present.blocksByClientId[t];return n?n.name:null}var xt=Object(Xe.a)(function(e,t){var n=e.editor.present.blocksByClientId[t];if(!n)return null;var r=n.attributes,o=Object(a.getBlockType)(n.name);return o&&(r=Object(u.reduce)(o.attributes,function(t,n,o){return"meta"===n.source&&(t===r&&(t=Object(f.a)({},t)),t[o]=function(e,t){return Object(u.has)(e,["editor","present","edits","meta",t])?Object(u.get)(e,["editor","present","edits","meta",t]):Object(u.get)(e,["currentPost","meta",t])}(e,n.meta)),t},r)),Object(f.a)({},n,{attributes:r,innerBlocks:Nt(e,t)})},function(e,t){return[e.editor.present.blocksByClientId[t],At(e,t),e.editor.present.edits.meta,e.currentPost.meta]});var Nt=Object(Xe.a)(function(e,t){return Object(u.map)(an(e,t),function(t){return xt(e,t)})},function(e){return[e.editor.present.blockOrder,e.editor.present.blocksByClientId]}),Rt=Object(Xe.a)(function(e){var t=an(e);return Object(h.a)(t).concat(Object(h.a)(function t(n){return Object(u.flatMap)(n,function(n){var r=an(e,n);return Object(h.a)(r).concat(Object(h.a)(t(r)))})}(t)))},function(e){return[e.editor.present.blockOrder]}),Dt=Object(Xe.a)(function(e,t){return t?Object(u.reduce)(e.editor.present.blocksByClientId,function(e,n){return n.name===t?e+1:e},0):Object(u.size)(e.editor.present.blocksByClientId)},function(e){return[e.editor.present.blocksByClientId]}),Mt=Object(Xe.a)(function(e,t){return Object(u.map)(Object(u.castArray)(t),function(t){return xt(e,t)})},function(e){return[e.editor.present.blocksByClientId,e.editor.present.blockOrder,e.editor.present.edits.meta,e.currentPost.meta,e.editor.present.blocksByClientId]});function Ft(e,t){return an(e,t).length}function Ut(e){return e.blockSelection.start}function Ht(e){return e.blockSelection.end}function Vt(e){var t=Xt(e).length;return t||(e.blockSelection.start?1:0)}function Kt(e){var t=e.blockSelection,n=t.start,r=t.end;return!!n&&n===r}function zt(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?n:null}function Wt(e){var t=zt(e);return t?xt(e,t):null}function qt(e,t){var n=e.editor.present.blockOrder;for(var r in n)if(Object(u.includes)(n[r],t))return r;return null}function Gt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=zt(e)),void 0===t&&(t=n<0?Jt(e):en(e)),!t)return null;var r=qt(e,t);if(null===r)return null;var o=e.editor.present.blockOrder[r],i=o.indexOf(t)+1*n;return i<0?null:i===o.length?null:o[i]}function $t(e,t){return Gt(e,t,-1)}function Yt(e,t){return Gt(e,t,1)}function Qt(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var Xt=Object(Xe.a)(function(e){var t=e.blockSelection,n=t.start,r=t.end;if(n===r)return[];var o=qt(e,n);if(null===o)return[];var i=an(e,o),c=i.indexOf(n),a=i.indexOf(r);return c>a?i.slice(a,c+1):i.slice(c,a+1)},function(e){return[e.editor.present.blockOrder,e.blockSelection.start,e.blockSelection.end]}),Zt=Object(Xe.a)(function(e){var t=Xt(e);return t.length?t.map(function(t){return xt(e,t)}):ct},function(e){return[e.editor.present.blockOrder,e.blockSelection.start,e.blockSelection.end,e.editor.present.blocksByClientId,e.editor.present.edits.meta,e.currentPost.meta]});function Jt(e){return Object(u.first)(Xt(e))||null}function en(e){return Object(u.last)(Xt(e))||null}function tn(e,t){return Jt(e)===t}function nn(e,t){return-1!==Xt(e).indexOf(t)}var rn=Object(Xe.a)(function(e,t){for(var n=t,r=!1;n&&!r;)r=nn(e,n=qt(e,n));return r},function(e){return[e.editor.present.blockOrder,e.blockSelection.start,e.blockSelection.end]});function on(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function cn(e){var t=e.blockSelection,n=t.start,r=t.end;return n===r?null:r||null}function an(e,t){return e.editor.present.blockOrder[t||""]||ct}function sn(e,t,n){return an(e,n).indexOf(t)}function ln(e,t){var n=e.blockSelection,r=n.start;return r===n.end&&r===t}function un(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(u.some)(an(e,t),function(t){return ln(e,t)||nn(e,t)||n&&un(e,t,n)})}function dn(e,t){if(!t)return!1;var n=Xt(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function pn(e){var t=e.blockSelection;return t.start!==t.end}function fn(e){return e.blockSelection.isMultiSelecting}function bn(e){return e.blockSelection.isEnabled}function hn(e,t){return e.blocksMode[t]||"visual"}function mn(e){return e.isTyping}function vn(e){var t,n,r,o=e.blockSelection.end;return o?(t=qt(e,o)||void 0,n=Object(u.get)(xt(e,o),["attributes","layout"]),r=sn(e,o,t)+1):r=an(e).length,{rootClientId:t,layout:n,index:r}}function On(e){return e.isInsertionPointVisible}function gn(e){return e.template.isValid}function jn(e){return e.settings.template}function yn(e,t){if(!t)return e.settings.templateLock;var n=Vn(e,t);return n?n.templateLock:null}function kn(e){return e.saving.requesting}function _n(e){return e.saving.successful}function Sn(e){return!!e.saving.error}function En(e){return kn(e)&&e.saving.isAutosave}function Cn(e){var t,n=an(e);switch(1===n.length&&(t=xt(e,n[0]).name),2===n.length&&"core/paragraph"===xt(e,n[1]).name&&(t=xt(e,n[0]).name),t){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}var wn=Object(Xe.a)(function(e){var t=vt(e);if("content"in t)return t.content;var n=Nt(e);return 1===n.length&&n[0].name===Object(a.getUnknownTypeHandlerName)()?Object(Je.removep)(Object(a.serialize)(n)):Object(a.serialize)(n)},function(e){return[e.editor.present.edits.content,e.editor.present.blocksByClientId,e.editor.present.blockOrder]});function Tn(e){return e.notices}var In=Object(Xe.a)(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(u.isBoolean)(e)?e:Object(u.isArray)(e)?Object(u.includes)(e,t):n},o=Object(a.getBlockType)(t);if(!o)return!1;if(!r(Kn(e).allowedBlockTypes,t,!0))return!1;if(!!yn(e,n))return!1;var i=Vn(e,n),c=r(Object(u.get)(i,["allowedBlocks"]),t),s=r(o.parent,Lt(e,n));return null!==c&&null!==s?c||s:null!==c?c:null===s||s},function(e,t,n){return[e.blockListSettings[n],e.editor.present.blocksByClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function Pn(e,t){return e.preferences.insertUsage[t]||null}var Bn=Object(Xe.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?nt:t>0?rt:"common"===e?ot:it},r=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}},o=Object(a.getBlockTypes)().filter(function(n){return!!Object(a.hasBlockSupport)(n,"inserter",!0)&&In(e,n.name,t)}).map(function(t){var o=t.name,i=!1;Object(a.hasBlockSupport)(t.name,"multiple",!0)||(i=Object(u.some)(Mt(e,Rt(e)),{name:t.name}));var c=Object(u.isArray)(t.parent),s=Pn(e,o)||{},l=s.time,d=s.count,p=void 0===d?0:d;return{id:o,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:i,utility:n(t.category,p,c),frecency:r(l,p),hasChildBlocksWithInserterSupport:Object(a.hasChildBlocksWithInserterSupport)(t.name)}}),i=Nn(e).filter(function(n){if(!In(e,"core/block",t))return!1;var r=xt(e,n.clientId);if(!r)return!1;var o=Object(a.getBlockType)(r.name);return!!o&&!!In(e,o.name,t)}).map(function(t){var o="core/block/".concat(t.id),i=xt(e,t.clientId),c=Object(a.getBlockType)(i.name),s=Pn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u,p=n("reusable",d,!1),f=r(l,d);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:c.icon,category:"reusable",keywords:[],isDisabled:!1,utility:p,frecency:f}});return Object(u.orderBy)(Object(h.a)(o).concat(Object(h.a)(i)),["utility","frecency"],["desc","desc"])},function(e,t){return[e.blockListSettings[t],e.editor.present.blockOrder,e.editor.present.blocksByClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,e.reusableBlocks.data,Object(a.getBlockTypes)()]}),An=Object(Xe.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(f.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function Ln(e,t){return e.reusableBlocks.isSaving[t]||!1}function xn(e,t){return!!e.reusableBlocks.isFetching[t]}function Nn(e){return Object(u.map)(e.reusableBlocks.data,function(t,n){return An(e,n)})}function Rn(e,t){var n=Object(u.find)(e.optimist,function(e){return e.beforeState&&Object(u.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function Dn(e){if(!kn(e))return!1;if(!_t(e))return!1;var t=Rn(e,et);return!!t&&!_t(t)}function Mn(e){var t=gt(e,"permalink_template");return tt.test(t)}function Fn(e){var t=Un(e),n=t.prefix,r=t.postName,o=t.suffix;return Mn(e)?n+r+o:n}function Un(e){var t=gt(e,"permalink_template"),n=gt(e,"slug")||gt(e,"generated_slug"),r=t.split(tt),o=Object(p.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function Hn(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function Vn(e,t){return e.blockListSettings[t]}function Kn(e){return e.settings}function zn(e,t){return t?e.tokens[t]:e.tokens}function Wn(e){return Object(u.has)(pt(e),["_links","wp:action-unfiltered_html"])}var qn=n(46),Gn=n(35),$n=n.n(Gn);function Yn(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return new Promise(function(n){var o=function(){return Object(d.select)("core/data").hasFinishedResolution(e,t,r)},i=function(){return Object(d.select)(e)[t].apply(null,r)},c=i();if(o())return n(c);var a=Object(d.subscribe)(function(){o()&&(a(),n(i()))})})}var Qn=function(){var e=Object(qn.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,Yn("core","getPostType","wp_block");case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return c=r?$n()({path:"/wp/v2/".concat(i.rest_base,"/").concat(r)}):$n()({path:"/wp/v2/".concat(i.rest_base,"?per_page=-1")}),e.prev=8,e.next=11,c;case 11:s=e.sent,o(Ue(Object(u.map)(Object(u.castArray)(s),function(e){var t=Object(a.parse)(e.content);return 1===t.length?{reusableBlock:e,parsedBlock:t[0]}:{reusableBlock:e,parsedBlock:Object(a.createBlock)("core/template",{},t)}}))),o({type:"FETCH_REUSABLE_BLOCKS_SUCCESS",id:r}),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),o({type:"FETCH_REUSABLE_BLOCKS_FAILURE",id:r,error:e.t0});case 19:case"end":return e.stop()}},e,this,[[8,16]])}));return function(t,n){return e.apply(this,arguments)}}(),Xn=function(){var e=Object(qn.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,s,l,u,d,p,f,b,h,m,v,O;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Yn("core","getPostType","wp_block");case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:return o=t.id,i=n.dispatch,c=n.getState(),s=An(c,o),l=s.clientId,u=s.title,d=s.isTemporary,p=xt(c,l),f=Object(a.serialize)("core/template"===p.name?p.innerBlocks:p),b=d?{title:u,content:f}:{id:o,title:u,content:f},h=d?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),m=d?"POST":"PUT",e.prev=14,e.next=17,$n()({path:h,data:b,method:m});case 17:v=e.sent,i({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:v.id,id:o}),O=d?Object(_.__)("Block created."):Object(_.__)("Block updated."),i(Ne(O,{id:"REUSABLE_BLOCK_NOTICE_ID"})),e.next=27;break;case 23:e.prev=23,e.t0=e.catch(14),i({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),i(De(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID",spokenMessage:e.t0.message}));case 27:case"end":return e.stop()}},e,this,[[14,23]])}));return function(t,n){return e.apply(this,arguments)}}(),Zn=function(){var e=Object(qn.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,s,l,d,p,f,b;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Yn("core","getPostType","wp_block");case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(o=t.id,i=n.getState,c=n.dispatch,(s=An(i(),o))&&!s.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return l=Nt(i()),d=l.filter(function(e){return Object(a.isReusableBlock)(e)&&e.attributes.ref===o}),p=d.map(function(e){return e.clientId}),f=Object(u.uniqueId)(),c({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:O.BEGIN,id:f}}),c(Te(Object(h.a)(p).concat([s.clientId]))),e.prev=16,e.next=19,$n()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:c({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:O.COMMIT,id:f}}),b=Object(_.__)("Block deleted."),c(Ne(b,{id:"REUSABLE_BLOCK_NOTICE_ID"})),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(16),c({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:O.REVERT,id:f}}),c(De(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID",spokenMessage:e.t0.message}));case 28:case"end":return e.stop()}},e,this,[[16,24]])}));return function(t,n){return e.apply(this,arguments)}}(),Jn=n(41),er=function(){var e=Object(qn.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,a,s,l,d,p,b,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.dispatch,o=n.getState,i=o(),c=pt(i),a=!!t.options.autosave,(a?Tt:Ct)(i)){e.next=7;break}return e.abrupt("return");case 7:return s=vt(i),a&&(s=Object(u.pick)(s,["title","content","excerpt"])),lt(i)&&(s=Object(f.a)({status:"draft"},s)),l=Object(f.a)({},s,{content:wn(i),id:c.id}),e.next=13,Yn("core","getPostType",ft(i));case 13:return d=e.sent,r({type:"REQUEST_POST_UPDATE_START",optimist:{type:O.BEGIN,id:et},isAutosave:a}),r(Object(f.a)({},$(l),{optimist:{id:et}})),a?(l=Object(f.a)({},Object(u.pick)(c,["title","content","excerpt"]),It(i),l,{parent:c.id}),p=$n()({path:"/wp/v2/".concat(d.rest_base,"/").concat(c.id,"/autosaves"),method:"POST",data:l})):(r(xe("SAVE_POST_NOTICE_ID")),r(xe("AUTOSAVE_POST_NOTICE_ID")),p=$n()({path:"/wp/v2/".concat(d.rest_base,"/").concat(c.id),method:"PUT",data:l})),e.prev=17,e.next=20,p;case 20:b=e.sent,r((a?G:q)(b)),h=b.id!==c.id,r({type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:c,post:b,optimist:{type:h?O.REVERT:O.COMMIT,id:et},isAutosave:a}),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(17),r({type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:O.REVERT,id:et},post:c,edits:s,error:e.t0});case 30:case"end":return e.stop()}},e,this,[[17,27]])}));return function(t,n){return e.apply(this,arguments)}}(),tr=function(){var e=Object(qn.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,a,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.dispatch,o=n.getState,i=t.postId,c=ft(o()),e.next=5,Yn("core","getPostType",c);case 5:return a=e.sent,r(xe("TRASH_POST_NOTICE_ID")),e.prev=7,e.next=10,$n()({path:"/wp/v2/".concat(a.rest_base,"/").concat(i),method:"DELETE"});case 10:s=pt(o()),r(q(Object(f.a)({},s,{status:"trash"}))),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),r(Object(f.a)({},t,{type:"TRASH_POST_FAILURE",error:e.t0}));case 17:case"end":return e.stop()}},e,this,[[7,14]])}));return function(t,n){return e.apply(this,arguments)}}(),nr=function(){var e=Object(qn.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,a,s,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.dispatch,o=n.getState,i=o(),c=pt(i),a=ft(o()),e.next=6,Yn("core","getPostType",a);case 6:return s=e.sent,e.next=9,$n()({path:"/wp/v2/".concat(s.rest_base,"/").concat(c.id),data:{context:"edit"}});case 9:l=e.sent,r(q(l));case 11:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),rr={REQUEST_POST_UPDATE:function(e,t){er(e,t)},REQUEST_POST_UPDATE_SUCCESS:function(e,t){var n=e.previousPost,r=e.post,o=e.isAutosave,i=t.dispatch,c=t.getState;if(Object.keys(vt(c())).length&&i({type:"DIRTY_ARTIFICIALLY"}),!o){var a,s=["publish","private","future"],l=Object(u.includes)(s,n.status),d=Object(u.includes)(s,r.status),p=!0;l||d?l&&!d?(a=Object(_.__)("Post reverted to draft."),p=!1):a=!l&&d?{publish:Object(_.__)("Post published!"),private:Object(_.__)("Post published privately!"),future:Object(_.__)("Post scheduled!")}[r.status]:Object(_.__)("Post updated!"):a=null,a&&i(Ne(Object(H.createElement)("p",null,a," ",p&&Object(H.createElement)("a",{href:r.link},Object(_.__)("View post"))),{id:"SAVE_POST_NOTICE_ID",spokenMessage:a}))}},REQUEST_POST_UPDATE_FAILURE:function(e,t){var n=e.post,r=e.edits,o=e.error;if(!o||"rest_autosave_no_changes"!==o.code){var i=t.dispatch,c=["publish","private","future"],a=-1!==c.indexOf(n.status),s={publish:Object(_.__)("Publishing failed"),private:Object(_.__)("Publishing failed"),future:Object(_.__)("Scheduling failed")},l=a||-1===c.indexOf(r.status)?Object(_.__)("Updating failed"):s[r.status],u=Object(Jn.addQueryArgs)("post.php",{post:n.id,action:"edit","classic-editor":"","cloudflare-error":""}),d=o&&"cloudflare_error"===o.code?Object(H.createElement)("p",null,l,Object(H.createElement)("br",null),Object(_.__)("Cloudflare is blocking REST API requests.")," ",Object(H.createElement)("a",{href:u},Object(_.__)("Learn More")," ")):l;i(De(d,{id:"SAVE_POST_NOTICE_ID"}))}},TRASH_POST:function(e,t){tr(e,t)},TRASH_POST_FAILURE:function(e,t){var n=e.error.message&&"unknown_error"!==e.error.code?e.error.message:Object(_.__)("Trashing failed");t.dispatch(De(n,{id:"TRASH_POST_NOTICE_ID"}))},REFRESH_POST:function(e,t){nr(e,t)},MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(p.a)(e.blocks,2),i=o[0],c=o[1],s=xt(r,i),l=xt(r,c),u=Object(a.getBlockType)(s.name);if(u.merge){var d=s.name===l.name?[l]:Object(a.switchToBlockType)(l,s.name);if(d&&d.length){var b=u.merge(s.attributes,d[0].attributes);n(ee(s.clientId,-1)),n(ce([s.clientId,l.clientId],[Object(f.a)({},s,{attributes:Object(f.a)({},s.attributes,b)})].concat(Object(h.a)(d.slice(1)))))}}else n(ee(s.clientId))},SETUP_EDITOR:function(e,t){var n=t.getState,r=e.post,o=e.autosave,i=n(),c=jn(i),s=yn(i),l="auto-draft"===r.status,u=Object(a.parse)(r.content.raw),d=!0;l&&c?u=Object(a.synchronizeBlocksWithTemplate)(u,c):d=!c||"all"!==s||Object(a.doBlocksMatchTemplate)(u,c);var p,f={};if(l&&(f.title=r.title.raw),o){var b=Object(_.__)("There is an autosave of this post that is more recent than the version below.");p=Me(Object(H.createElement)("p",null,b," ",Object(H.createElement)("a",{href:o.editLink},Object(_.__)("View the autosave"))),{id:"AUTOSAVE_POST_NOTICE_ID",spokenMessage:b})}return[me(d),Y(r,u,f)].concat(Object(h.a)(p?[p]:[]))},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=Nt(n),o=jn(n);return[Q(Object(a.synchronizeBlocksWithTemplate)(r,o)),me(!0)]},CHECK_TEMPLATE_VALIDITY:function(e,t){var n=(0,t.getState)(),r=Nt(n),o=jn(n),i=yn(n);return me(!o||"all"!==i||Object(a.doBlocksMatchTemplate)(r,o))},FETCH_REUSABLE_BLOCKS:function(e,t){Qn(e,t)},SAVE_REUSABLE_BLOCK:function(e,t){Xn(e,t)},DELETE_REUSABLE_BLOCK:function(e,t){Zn(e,t)},RECEIVE_REUSABLE_BLOCKS:function(e){return X(Object(u.map)(e.results,"parsedBlock"))},CONVERT_BLOCK_TO_STATIC:function(e,t){var n,r=t.getState(),o=xt(r,e.clientId),i=An(r,o.attributes.ref),c=xt(r,i.clientId);n="core/template"===c.name?c.innerBlocks.map(function(e){return Object(a.cloneBlock)(e)}):[Object(a.createBlock)(c.name,c.attributes)],t.dispatch(ce(o.clientId,n))},CONVERT_BLOCK_TO_REUSABLE:function(e,t){var n,r=t.getState,o=t.dispatch;1===e.clientIds.length?n=xt(r(),e.clientIds[0]):o(X([n=Object(a.createBlock)("core/template",{},Mt(r(),e.clientIds))]));var i={id:Object(u.uniqueId)("reusable"),clientId:n.clientId,title:Object(_.__)("Untitled Reusable Block")};o(Ue([{reusableBlock:i,parsedBlock:n}])),o(He(i.id)),o(ce(e.clientIds,Object(a.createBlock)("core/block",{ref:i.id,layout:n.attributes.layout}))),o(X([n]))},CREATE_NOTICE:function(e){var t=e.notice,n=t.content,r=t.spokenMessage||n;Object(V.speak)(r,"assertive")},REMOVE_BLOCKS:function(e,t){var n=t.getState,r=t.dispatch;if(e.selectPrevious){var o=e.clientIds[0],i=n(),c=Wt(i),a=Object(f.a)({},i,{editor:{present:Object(u.last)(i.editor.past)}}),s=qt(a,o),l=$t(a,o)||s;l!==c&&r(ee(l,-1))}}};var or=function(e){var t,n=[M()(rr),U.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map(function(e){return e(o)}),r=u.flowRight.apply(void 0,Object(h.a)(t))(e.dispatch),e.dispatch=r,e},ir=n(3),cr=Object(ir.withFilters)("editor.MediaUpload")(function(){return null}),ar="core/image",sr={id:"image",title:Object(_.__)("Inline Image"),type:"image",icon:Object(H.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(H.createElement)("path",{d:"M4 16h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2zM4 5h10v9H4V5zm14 9v2h4v-2h-4zM2 20h20v-2H2v2zm6.4-8.8L7 9.4 5 12h8l-2.6-3.4-2 2.6z"})),edit:function(e){var t=e.onSave;return Object(H.createElement)(cr,{type:"image",onSelect:function(e){return t(e)},onClose:function(){return t(null)},render:function(e){return(0,e.open)(),null}})},save:function(e){var t=e.id,n=e.url,r=e.alt,o=e.width;return Object(H.createElement)("img",{className:"wp-image-".concat(t),style:{width:"".concat(Math.min(o,150),"px")},src:n,alt:r})}},lr=n(29),ur=window.console.error;var dr=Object(d.registerStore)("core/editor",{reducer:R,selectors:o,actions:r,persist:["preferences"]});or(dr),Object(u.forOwn)(c,function(e){var t=e.name,n=e.settings;(n=function(e,t,n){if("string"==typeof e)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e))if(Object(u.has)(n,[e]))ur('Token "'+e+'" is already registered.');else if((t=Object(lr.applyFilters)("editor.registerToken",t,e))&&Object(u.isFunction)(t.save))if(!Object(u.has)(t,["edit"])||Object(u.isFunction)(t.edit))if(Object(u.has)(t,["keywords"])&&t.keywords.length>3)ur('The token "'+e+'" can have a maximum of 3 keywords.');else if(Object(u.has)(t,["title"])&&""!==t.title)if("string"==typeof t.title){if(t.icon=Object(a.normalizeIconObject)(t.icon),Object(a.isValidIcon)(t.icon.src))return t;ur("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/block-api/#icon-optional")}else ur("Token titles must be strings.");else ur('The token "'+e+'" must have a title.');else ur('The "edit" property must be a valid function.');else ur('The "save" property must be specified and must be a valid function.');else ur("Token names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-token");else ur("Token names must be strings.")}(t,n,dr.getState()))&&dr.dispatch(Ye(t,n))});var pr=n(32),fr=n(13),br=n.n(fr),hr=n(6),mr=n(16),vr=n(15),Or=n(19),gr=n(18),jr=n(17),yr=n(7),kr=Object(H.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:u.noop,clientId:null}),_r=kr.Consumer,Sr=kr.Provider,Er=function(e){return Object(hr.createHigherOrderComponent)(function(t){return function(n){return Object(H.createElement)(_r,null,function(r){return Object(H.createElement)(t,Object(pr.a)({},n,e(r,n)))})}},"withBlockEditContext")},Cr=Object(hr.createHigherOrderComponent)(function(e){return function(t){return Object(H.createElement)(_r,null,function(n){return n.isSelected&&Object(H.createElement)(e,t)})}},"ifBlockEditSelected"),wr=[];var Tr=Object(hr.compose)([Er(function(e){return{blockName:e.name}}),function(e){return function(t){function n(){var e;return Object(mr.a)(this,n),(e=Object(Or.a)(this,Object(gr.a)(n).call(this))).state={completers:wr},e.saveParentRef=e.saveParentRef.bind(Object(yr.a)(Object(yr.a)(e))),e.onFocus=e.onFocus.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(n,t),Object(vr.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,r=n;Object(lr.hasFilter)("editor.Autocomplete.completers")&&(n=Object(lr.applyFilters)("editor.Autocomplete.completers",n&&n.map(u.clone),t)),this.setState({lastFilteredCompletersProp:r,completers:n||wr})}},{key:"saveParentRef",value:function(e){this.parentNode=e}},{key:"render",value:function(){var t=this.state.completers,n=Object(f.a)({},this.props,{completers:t});return Object(H.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(H.createElement)(e,Object(pr.a)({onFocus:this.onFocus},n)))}}]),n}(H.Component)}])(ir.Autocomplete);function Ir(e){var t=e.icon,n=e.showColors,r=void 0!==n&&n,o=e.className,i=function(e){return"string"==typeof e?Object(H.createElement)(ir.Dashicon,{icon:e}):"function"==typeof e?e.prototype instanceof H.Component?Object(H.createElement)(e):e():e&&"svg"===e.type?Object(H.createElement)(ir.AccessibleSVG,e.props):e||null}(t&&t.src?t.src:t),c=r?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return i?Object(H.createElement)("div",{style:c,className:br()("editor-block-icon",o,{"has-colors":r})},i):null}function Pr(){return Object(d.select)("core/editor").getBlockInsertionPoint().rootClientId}function Br(e){return Object(d.select)("core/editor").getInserterItems(e)}function Ar(){var e=Object(d.select)("core/editor").getSelectedBlock();return e?e.name:null}var Lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Pr:t,r=e.getInserterItems,o=void 0===r?Br:r,i=e.getSelectedBlockName,c=void 0===i?Ar:i;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var e=c();return o(n()).filter(function(t){return e!==t.name})},getOptionKeywords:function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return Object(h.a)(r).concat([t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(H.createElement)(Ir,{key:"icon",icon:t&&t.src,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e.toString())||/\S/.test(t.toString()))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(a.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),xr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),$n()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(H.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(H.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(H.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},allowNode:function(){return!0},getOptionCompletion:function(e){return"@".concat(e.slug)}},Nr=[{icon:"editor-alignleft",title:Object(_.__)("Align left"),align:"left"},{icon:"editor-aligncenter",title:Object(_.__)("Align center"),align:"center"},{icon:"editor-alignright",title:Object(_.__)("Align right"),align:"right"}];var Rr=Object(hr.compose)(Er(function(e){return{clientId:e.clientId}}),Object(l.withViewportMatch)({isLargeViewport:"medium"}),Object(d.withSelect)(function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/editor"),c=i.getBlockRootClientId,a=i.getEditorSettings;return{isCollapsed:o||!r||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=Object(u.find)(Nr,function(e){return e.align===n});return Object(H.createElement)(ir.Toolbar,{isCollapsed:t,icon:o?o.icon:"editor-alignleft",label:Object(_.__)("Change Text Alignment"),controls:Nr.map(function(e){var t=e.align,o=n===t;return Object(f.a)({},e,{isActive:o,onClick:function(e){return function(){return r(n===e?void 0:e)}}(t)})})})}),Dr={left:{icon:"align-left",title:Object(_.__)("Align left")},center:{icon:"align-center",title:Object(_.__)("Align center")},right:{icon:"align-right",title:Object(_.__)("Align right")},wide:{icon:"align-wide",title:Object(_.__)("Wide width")},full:{icon:"align-full-width",title:Object(_.__)("Full width")}},Mr=["left","center","right","wide","full"],Fr=["wide","full"];var Ur=Object(hr.compose)(Er(function(e){return{clientId:e.clientId}}),Object(l.withViewportMatch)({isLargeViewport:"medium"}),Object(d.withSelect)(function(e,t){var n=t.clientId,r=t.isLargeViewport,o=t.isCollapsed,i=e("core/editor"),c=i.getBlockRootClientId,a=i.getEditorSettings;return{wideControlsEnabled:e("core/editor").getEditorSettings().alignWide,isCollapsed:o||!r||!a().hasFixedToolbar&&c(n)}}))(function(e){var t=e.isCollapsed,n=e.value,r=e.onChange,o=e.controls,i=void 0===o?Mr:o,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===Fr.indexOf(e)}),s=Dr[n];return Object(H.createElement)(ir.Toolbar,{isCollapsed:t,icon:s?s.icon:"align-left",label:Object(_.__)("Change Alignment"),controls:a.map(function(e){return Object(f.a)({},Dr[e],{isActive:n===e,onClick:function(e){return function(){return r(n===e?void 0:e)}}(e)})})})}),Hr=Object(ir.createSlotFill)("BlockControls"),Vr=Hr.Fill,Kr=Hr.Slot,zr=Cr(function(e){var t=e.controls,n=e.children;return Object(H.createElement)(Vr,null,Object(H.createElement)(ir.Toolbar,{controls:t}),n)});zr.Slot=Kr;var Wr=zr,qr=Object(ir.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(a.getBlockType)(r);if(!o)return null;var i=Object(a.hasBlockSupport)(o,"className",!0)?Object(a.getBlockDefaultClassName)(r):null,c=br()(i,n.className),s=o.edit||o.save;return Object(H.createElement)(s,Object(pr.a)({},e,{className:c}))}),Gr=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(yr.a)(Object(yr.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(H.createElement)(Sr,{value:this.state},Object(H.createElement)(qr,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(H.Component),$r=Object(ir.createSlotFill)("BlockFormatControls"),Yr=$r.Fill,Qr=$r.Slot,Xr=Cr(Yr);Xr.Slot=Qr;var Zr=Xr,Jr=Object(hr.createHigherOrderComponent)(Object(d.withSelect)(function(e){var t=e("core/editor").getEditorSettings(),n=t.colors,r=t.disableCustomColors;return{colors:n,disableCustomColors:r,hasColorsToChoose:!Object(u.isEmpty)(n)||!r}}),"withColorContext"),eo=Jr(ir.ColorPalette),to=function(e,t,n){if(t){var r=Object(u.find)(e,{slug:t});if(r)return r}return{color:n}},no=function(e,t){return Object(u.find)(e,{color:t})};function ro(e,t){if(e&&t)return"has-".concat(Object(u.kebabCase)(t),"-").concat(e)}var oo=[],io=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(u.reduce)(t,function(e,t){return Object(f.a)({},e,Object(u.isString)(t)?Object(m.a)({},t,Object(u.kebabCase)(t)):t)},{});return Object(hr.createHigherOrderComponent)(Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor").getEditorSettings();return{colors:Object(u.get)(t,["colors"],oo)}}),function(e){return function(t){function n(e){var t;return Object(mr.a)(this,n),(t=Object(Or.a)(this,Object(gr.a)(n).call(this,e))).setters=t.createSetters(),t.state={},t}return Object(jr.a)(n,t),Object(vr.a)(n,[{key:"createSetters",value:function(){var e=this;return Object(u.reduce)(r,function(t,n,r){var o=Object(u.upperFirst)(r),i="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,i),t},{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,i=no(n.props.colors,r);n.props.setAttributes((o={},Object(m.a)(o,e,i&&i.slug?i.slug:void 0),Object(m.a)(o,t,i&&i.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(H.createElement)(e,Object(f.a)({},this.props,{colors:void 0},this.state,this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.colors;return Object(u.reduce)(r,function(e,r,i){var c=to(o,n[i],n["custom".concat(Object(u.upperFirst)(i))]),a=t[i];return Object(u.get)(a,["color"])===c.color&&a?e[i]=a:e[i]=Object(f.a)({},c,{class:ro(r,c.slug)}),e},{})}}]),n}(H.Component)}]),"withColors")},co=n(80),ao=n.n(co);var so=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,i=e.isLargeText,c=e.textColor;if(!t&&!n||!c&&!r)return null;var a=ao()(t||n),s=ao()(c||r);if(1!==a.getAlpha()||1!==s.getAlpha()||ao.a.isReadable(a,s,{level:"AA",size:i||!1!==i&&o>=18?"large":"small"}))return null;var l=a.getBrightness()<s.getBrightness()?Object(_.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(_.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(H.createElement)("div",{className:"editor-contrast-checker"},Object(H.createElement)(ir.Notice,{status:"warning",isDismissible:!1},l))},lo=function(e,t,n){if(t){var r=Object(u.find)(e,{slug:t});if(r)return r}return{size:n}};function uo(e){if(e)return"has-".concat(Object(u.kebabCase)(e),"-font-size")}var po=Object(d.withSelect)(function(e){return{fontSizes:e("core/editor").getEditorSettings().fontSizes}})(ir.FontSizePicker),fo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(u.reduce)(t,function(e,t){return e[t]="custom".concat(Object(u.upperFirst)(t)),e},{});return Object(hr.createHigherOrderComponent)(Object(hr.compose)([Object(d.withSelect)(function(e){return{fontSizes:e("core/editor").getEditorSettings().fontSizes}}),function(e){return function(t){function n(e){var t;return Object(mr.a)(this,n),(t=Object(Or.a)(this,Object(gr.a)(n).call(this,e))).setters=t.createSetters(),t.state={},t}return Object(jr.a)(n,t),Object(vr.a)(n,[{key:"createSetters",value:function(){var e=this;return Object(u.reduce)(r,function(t,n,r){var o=Object(u.upperFirst)(r);return t["set".concat(o)]=e.createSetFontSize(r,n),t},{})}},{key:"createSetFontSize",value:function(e,t){var n=this;return function(r){var o,i=Object(u.find)(n.props.fontSizes,{size:r});n.props.setAttributes((o={},Object(m.a)(o,e,i&&i.slug?i.slug:void 0),Object(m.a)(o,t,i&&i.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(H.createElement)(e,Object(f.a)({},this.props,{fontSizes:void 0},this.state,this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,i=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(u.some)(r,i))return null;var c=Object(u.reduce)(Object(u.pickBy)(r,i),function(e,t,r){var i=n[r],c=lo(o,i,n[t]);return e[r]=Object(f.a)({},c,{class:uo(i)}),e},{});return Object(f.a)({},t,c)}}]),n}(H.Component)}]),"withFontSizes")},bo=n(52),ho=n.n(bo),mo=(n(70),n(30)),vo=n(14);function Oo(e,t,n,r,o,i){var c=n+1;return e>1?function(e,t,n,r,o){var i=t+1;if(o<0&&n)return Object(_.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(_.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(_.sprintf)(Object(_._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(o>0&&!r)return Object(_.sprintf)(Object(_._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,r,o,i):r&&o?Object(_.sprintf)(Object(_.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!o?Object(_.sprintf)(Object(_.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&o?Object(_.sprintf)(Object(_.__)("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!r?Object(_.sprintf)(Object(_.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&r?Object(_.sprintf)(Object(_.__)("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var go=Object(H.createElement)(ir.AccessibleSVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(H.createElement)("polygon",{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),jo=Object(H.createElement)(ir.AccessibleSVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(H.createElement)("polygon",{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),yo=Object(H.createElement)(ir.AccessibleSVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(H.createElement)("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"})),ko=Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlockIndex,i=r.getBlockRootClientId;return{index:o(n),rootClientId:i(n)}})(function(e){var t=e.children,n=e.clientId,r=e.rootClientId,o=e.blockElementId,i=e.index,c=e.layout,a=e.onDragStart,s=e.onDragEnd,l={type:"block",fromIndex:i,rootClientId:r,clientId:n,layout:c};return Object(H.createElement)(ir.Draggable,{elementId:o,transferData:l,onDragStart:a,onDragEnd:s},function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})})}),_o=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId,s=e.layout;if(!t)return null;var l=br()("editor-block-mover__control-drag-handle",n);return Object(H.createElement)(ko,{clientId:a,blockElementId:c,layout:s,onDragStart:o,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(H.createElement)("div",{className:l,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)})},So=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(yr.a)(Object(yr.a)(e))),e.onBlur=e.onBlur.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.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,r=e.isFirst,o=e.isLast,i=e.isDraggable,c=e.onDragStart,a=e.onDragEnd,s=e.clientIds,l=e.blockElementId,d=e.layout,p=e.blockType,f=e.firstIndex,b=e.isLocked,h=e.instanceId,m=e.isHidden,v=this.state.isFocused,O=Object(u.castArray)(s).length;return b||r&&o?null:Object(H.createElement)("div",{className:br()("editor-block-mover",{"is-visible":v||!m})},Object(H.createElement)(ir.IconButton,{className:"editor-block-mover__control",onClick:r?null:t,icon:go,label:Object(_.__)("Move up"),"aria-describedby":"editor-block-mover__up-description-".concat(h),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(H.createElement)(_o,{className:"editor-block-mover__control",icon:yo,clientId:s,blockElementId:l,layout:d,isVisible:i,onDragStart:c,onDragEnd:a}),Object(H.createElement)(ir.IconButton,{className:"editor-block-mover__control",onClick:o?null:n,icon:jo,label:Object(_.__)("Move down"),"aria-describedby":"editor-block-mover__down-description-".concat(h),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(H.createElement)("span",{id:"editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description"},Oo(O,p&&p.title,f,r,o,-1)),Object(H.createElement)("span",{id:"editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description"},Oo(O,p&&p.title,f,r,o,1)))}}]),t}(H.Component),Eo=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlock,i=r.getBlockIndex,c=r.getTemplateLock,s=r.getBlockRootClientId,l=Object(u.first)(Object(u.castArray)(n)),d=o(l),p=s(Object(u.first)(Object(u.castArray)(n)));return{firstIndex:i(l,p),blockType:d?Object(a.getBlockType)(d.name):null,isLocked:"all"===c(p),rootClientId:p}}),Object(d.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/editor"),i=o.moveBlocksDown,c=o.moveBlocksUp;return{onMoveDown:Object(u.partial)(i,n,r),onMoveUp:Object(u.partial)(c,n,r)}}),hr.withInstanceId)(So),Co=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(yr.a)(Object(yr.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(yr.a)(Object(yr.a)(e))),e.onDrop=e.onDrop.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"getInsertIndex",value:function(e){var t=this.props.index;if(void 0!==t)return"top"===e.y?t:t+1}},{key:"onFilesDrop",value:function(e,t){var n=Object(a.findTransform)(Object(a.getBlockTransforms)("from"),function(t){return"files"===t.type&&t.isMatch(e)});if(n){var r=this.getInsertIndex(t),o=n.transform(e,this.props.updateBlockAttributes);this.props.insertBlocks(o,r)}}},{key:"onHTMLDrop",value:function(e,t){var n=Object(a.rawHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){if(e.dataTransfer){var n,r,o,i;try{var c=JSON.parse(e.dataTransfer.getData("text"));n=c.clientId,r=c.type,o=c.rootClientId,i=c.fromIndex}catch(e){return}if("block"===r){var a=this.props.index,s=this.getInsertIndex(t),l=a&&i<a&&o===this.props.rootClientId?s-1:s;this.props.moveBlockToPosition(n,o,l)}}}},{key:"render",value:function(){var e=this.props,t=e.isLocked,n=e.index;if(t)return null;var r=void 0===n;return Object(H.createElement)(ir.DropZone,{className:br()("editor-block-drop-zone",{"is-appender":r}),onFilesDrop:this.onFilesDrop,onHTMLDrop:this.onHTMLDrop,onDrop:this.onDrop})}}]),t}(H.Component),wo=Object(hr.compose)(Object(d.withDispatch)(function(e,t){var n=e("core/editor"),r=n.insertBlocks,o=n.updateBlockAttributes,i=n.moveBlockToPosition;return{insertBlocks:function(e,n){var o=t.rootClientId,i=t.layout;i&&(e=Object(u.castArray)(e).map(function(e){return Object(a.cloneBlock)(e,{layout:i})})),r(e,n,o)},updateBlockAttributes:function(){o.apply(void 0,arguments)},moveBlockToPosition:function(e,n,r){var o=t.rootClientId,c=t.layout;i(e,n,o,c,r)}}}),Object(d.withSelect)(function(e,t){var n=t.rootClientId;return{isLocked:!!(0,e("core/editor").getTemplateLock)(n)}}))(Co);var To=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(H.createElement)("div",{className:br()(t,"editor-warning")},Object(H.createElement)("div",{className:"editor-warning__contents"},Object(H.createElement)("p",{className:"editor-warning__message"},r),H.Children.count(n)>0&&Object(H.createElement)("div",{className:"editor-warning__actions"},H.Children.map(n,function(e,t){return Object(H.createElement)("span",{key:t,className:"editor-warning__action"},e)}))),o&&Object(H.createElement)(ir.Dropdown,{className:"editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(H.createElement)(ir.IconButton,{icon:"ellipsis",label:Object(_.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(H.createElement)(ir.MenuGroup,{label:Object(_.__)("More options")},o.map(function(e,t){return Object(H.createElement)(ir.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},Io=n(189),Po=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,c=e.className;return Object(H.createElement)("div",{className:c},Object(H.createElement)("div",{className:"editor-block-compare__content"},Object(H.createElement)("h1",{className:"editor-block-compare__heading"},t),Object(H.createElement)("div",{className:"editor-block-compare__html"},n),Object(H.createElement)("div",{className:"editor-block-compare__preview edit-post-visual-editor"},r)),Object(H.createElement)("div",{className:"editor-block-compare__action"},Object(H.createElement)(ir.Button,{isLarge:!0,tabIndex:"0",onClick:o},i)))},Bo=function(e){function t(){return Object(mr.a)(this,t),Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"getDifference",value:function(e,t){return Object(Io.diffChars)(e,t).map(function(e,t){var n=br()({"editor-block-compare__added":e.added,"editor-block-compare__removed":e.removed});return Object(H.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){var t=Object(a.getBlockType)(e.name);return{rawContent:e.originalContent,renderedContent:Object(a.getSaveElement)(t,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(u.castArray)(e),n=t.map(function(e){return Object(a.getSaveContent)(Object(a.getBlockType)(e.name),e.attributes,e.innerBlocks)}),r=t.map(function(e){return Object(a.getSaveElement)(Object(a.getBlockType)(e.name),e.attributes,e.innerBlocks)});return{rawContent:n.join(""),renderedContent:r}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,r=e.onConvert,o=e.convertor,i=e.convertButtonText,c=this.getOriginalContent(t),a=this.getConvertedContent(o(t)),s=this.getDifference(c.rawContent,a.rawContent);return Object(H.createElement)("div",{className:"editor-block-compare__wrapper"},Object(H.createElement)(Po,{title:Object(_.__)("Current"),className:"editor-block-compare__current",action:n,actionText:Object(_.__)("Keep as HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(H.createElement)(Po,{title:Object(_.__)("After Conversion"),className:"editor-block-compare__converted",action:r,actionText:i,rawContent:s,renderedContent:a.renderedContent}))}}]),t}(H.Component),Ao=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(yr.a)(Object(yr.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(yr.a)(Object(yr.a)(n))),n}return Object(jr.a)(t,e),Object(vr.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,r=e.convertToClassic,o=e.block,i=!!Object(a.getBlockType)("core/html"),c=this.state.compare,s=[{title:Object(_.__)("Convert to Blocks"),onClick:n},{title:Object(_.__)("Convert to Classic Block"),onClick:r},{title:Object(_.__)("Compare Conversion"),onClick:this.onCompare}];return c?Object(H.createElement)(ir.Modal,{title:Object(_.__)("Compare Block Conversion"),onRequestClose:this.onCompareClose,className:"editor-block-compare"},Object(H.createElement)(Bo,{block:o,onKeep:t,onConvert:n,convertor:Lo,convertButtonText:Object(_.__)("Convert to Blocks")})):Object(H.createElement)(To,{actions:[Object(H.createElement)(ir.Button,{key:"convert",onClick:n,isLarge:!0,isPrimary:!i},Object(_.__)("Convert to Blocks")),i&&Object(H.createElement)(ir.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(_.__)("Keep as HTML"))],secondaryActions:s},Object(_.__)("This block has been modified externally."))}}]),t}(H.Component),Lo=function(e){return Object(a.rawHandler)({HTML:e.originalContent,mode:"BLOCKS"})},xo=Object(d.withDispatch)(function(e,t){var n=t.block,r=e("core/editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(a.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(a.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Lo(n))}}})(Ao),No=Object(H.createElement)(To,null,Object(_.__)("This block has encountered an error and cannot be previewed.")),Ro=function(){return No},Do=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(jr.a)(t,e),Object(vr.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}(H.Component),Mo=n(79),Fo=n.n(Mo),Uo=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(yr.a)(Object(yr.a)(n))),n.onBlur=n.onBlur.bind(Object(yr.a)(Object(yr.a)(n))),n.state={html:e.block.isValid?Object(a.getBlockContent)(e.block):e.block.originalContent},n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(e){Object(u.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(a.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(a.getBlockType)(this.props.block.name),n=Object(a.getBlockAttributes)(t,e,this.props.block.attributes),r=e||Object(a.getSaveContent)(t,n),o=!e||Object(a.isValidBlock)(r,t,n);this.props.onChange(this.props.clientId,n,r,o),e||this.setState({html:r})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(H.createElement)(Fo.a,{className:"editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(H.Component),Ho=Object(hr.compose)([Object(d.withSelect)(function(e,t){return{block:e("core/editor").getBlock(t.clientId)}}),Object(d.withDispatch)(function(e){return{onChange:function(t,n,r,o){e("core/editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}})])(Uo);var Vo=Object(d.withSelect)(function(e,t){return{name:(0,e("core/editor").getBlockName)(t.clientId)}})(function(e){var t=e.name;if(!t)return null;var n=Object(a.getBlockType)(t);return n?n.title:null}),Ko=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(yr.a)(Object(yr.a)(e))),e.onBlur=e.onBlur.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.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,r=e.isLight;return Object(H.createElement)("div",{className:br()("editor-block-list__breadcrumb",{"is-light":r})},Object(H.createElement)(ir.Toolbar,null,n&&Object(H.createElement)(H.Fragment,null,Object(H.createElement)(Vo,{clientId:n}),Object(H.createElement)("span",{className:"editor-block-list__descendant-arrow"})),Object(H.createElement)(Vo,{clientId:t})))}}]),t}(H.Component),zo=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockRootClientId,o=n.getEditorSettings;return{rootClientId:r(t.clientId),isLight:o().hasFixedToolbar}})])(Ko),Wo=window,qo=Wo.Node,Go=Wo.getSelection,$o=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(yr.a)(Object(yr.a)(e))),e.focusToolbar=e.focusToolbar.bind(Object(yr.a)(Object(yr.a)(e))),e.focusSelection=e.focusSelection.bind(Object(yr.a)(Object(yr.a)(e))),e.switchOnKeyDown=Object(u.cond)([[Object(u.matchesProperty)(["keyCode"],vo.ESCAPE),e.focusSelection]]),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"bindNode",value:function(e){this.toolbar=Object(H.findDOMNode)(e)}},{key:"focusToolbar",value:function(){var e=mo.focus.tabbable.find(this.toolbar);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Go();if(e){var t=e.focusNode;t.nodeType!==qo.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(b.a)(e,["children"]);return Object(H.createElement)(ir.NavigableMenu,Object(pr.a)({orientation:"horizontal",role:"toolbar",ref:this.bindNode,onKeyDown:this.switchOnKeyDown},n),Object(H.createElement)(ir.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(H.Component);var Yo=function(){return Object(H.createElement)($o,{className:"editor-block-contextual-toolbar","aria-label":Object(_.__)("Block Toolbar")},Object(H.createElement)(pl,null))};var Qo=Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getMultiSelectedBlockClientIds,i=r.isMultiSelecting,c=r.getBlockIndex,a=r.getBlockCount,s=o(),l=c(Object(u.first)(s),n),d=c(Object(u.last)(s),n);return{multiSelectedBlockClientIds:s,isSelecting:i(),isFirst:0===l,isLast:d+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,r=e.isSelecting,o=e.isFirst,i=e.isLast;return r?null:Object(H.createElement)(Eo,{key:"mover",clientId:n,clientIds:t,isFirst:o,isLast:i})}),Xo=n(76),Zo=n.n(Xo);function Jo(e){var t=e.name,n=e.attributes,r=Object(a.createBlock)(t,n);return Object(H.createElement)(ir.Disabled,{className:"editor-block-preview__content","aria-hidden":!0},Object(H.createElement)(Gr,{name:t,focus:!1,attributes:r.attributes,setAttributes:u.noop}))}var ei=function(e){return Object(H.createElement)("div",{className:"editor-block-preview"},Object(H.createElement)("div",{className:"editor-block-preview__title"},Object(_.__)("Preview")),Object(H.createElement)(Jo,e))},ti=function(e){function t(){return Object(mr.a)(this,t),Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"render",value:function(){var e=this.props,t=e.items,n=e.onSelect,r=e.onHover,o=void 0===r?u.noop:r;return Object(H.createElement)("ul",{role:"list",className:"editor-block-types-list"},t.map(function(e){var t=e.icon?{backgroundColor:e.icon.background,color:e.icon.foreground}:{},r=e.icon&&e.icon.shadowColor?{backgroundColor:e.icon.shadowColor}:{};return Object(H.createElement)("li",{className:"editor-block-types-list__list-item",key:e.id},Object(H.createElement)("button",{className:br()("editor-block-types-list__item",Object(a.getBlockMenuDefaultClassName)(e.id),{"editor-block-types-list__item-has-children":e.hasChildBlocksWithInserterSupport}),onClick:function(){n(e),o(null)},disabled:e.isDisabled,onMouseEnter:function(){return o(e)},onMouseLeave:function(){return o(null)},onFocus:function(){return o(e)},onBlur:function(){return o(null)},"aria-label":e.title},Object(H.createElement)("span",{className:"editor-block-types-list__item-icon",style:t},Object(H.createElement)(Ir,{icon:e.icon&&e.icon.src,showColors:!0}),e.hasChildBlocksWithInserterSupport&&Object(H.createElement)("span",{className:"editor-block-types-list__item-icon-stack",style:r})),Object(H.createElement)("span",{className:"editor-block-types-list__item-title"},e.title)))}))}}]),t}(H.Component);var ni=Object(hr.compose)(Object(hr.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(d.withSelect)(function(e,t){var n=t.rootClientId,r=(0,e("core/blocks").getBlockType)((0,e("core/editor").getBlockName)(n));return{rootBlockTitle:r&&r.title,rootBlockIcon:r&&r.icon}}))(function(e){var t=e.rootBlockIcon,n=e.rootBlockTitle,r=e.items,o=Object(b.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(H.createElement)("div",{className:"editor-inserter__child-blocks"},(t||n)&&Object(H.createElement)("div",{className:"editor-inserter__parent-block-header"},Object(H.createElement)(Ir,{icon:t,showColors:!0}),n&&Object(H.createElement)("h2",null,n)),Object(H.createElement)(ti,Object(pr.a)({items:r},o)))}),ri=Object(ir.createSlotFill)("InserterResultsPortal"),oi=ri.Fill,ii=ri.Slot,ci=function(e){var t=e.items,n=e.title,r=e.onSelect,o=e.onHover,i=Object(b.a)(e,["items","title","onSelect","onHover"]);return Object(H.createElement)(oi,null,function(e){var c=e.filterValue,a=si(t,c);return a.length?Object(H.createElement)(ir.PanelBody,Object(pr.a)({title:n},i,{className:"editor-inserter__results-portal"}),Object(H.createElement)(ti,{items:a,onSelect:r,onHover:o})):null})};ci.Slot=ii;var ai=ci,si=function(e,t){var n=li(t),r=function(e){return-1!==li(e).indexOf(n)};return e.filter(function(e){return r(e.title)||Object(u.some)(e.keywords,r)})},li=function(e){return e=(e=(e=(e=Object(u.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},ui=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(yr.a)(Object(yr.a)(e))),e.onHover=e.onHover.bind(Object(yr.a)(Object(yr.a)(e))),e.panels={},e.inserterResults=Object(H.createRef)(),e}return Object(jr.a)(t,e),Object(vr.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}),e?this.props.showInsertionPoint():this.props.hideInsertionPoint()}},{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(u.without)(t.state.openPanels,e)}):(t.setState({openPanels:Object(h.a)(t.state.openPanels).concat([e])}),t.props.setTimeout(function(){Zo()(Object(H.findDOMNode)(t.panels[e]),t.inserterResults.current,{alignWithTop:!0})}))}}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.items,r=t.rootChildBlocks,o=si(n,e),i=Object(u.filter)(o,function(e){var t=e.name;return Object(u.includes)(r,t)}),c=[];if(!e){var s=this.props.maxSuggestedItems||9;c=Object(u.filter)(n,function(e){return e.utility>0}).slice(0,s)}var l=Object(u.filter)(o,{category:"reusable"}),d=function(e){return Object(u.findIndex)(Object(a.getCategories)(),function(t){return t.slug===e.category})},p=Object(u.flow)(function(e){return Object(u.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(u.sortBy)(e,d)},function(e){return Object(u.groupBy)(e,"category")})(o),f=this.state.openPanels;if(e!==this.state.filterValue)if(e){if(l.length)f=["reusable"];else if(o.length){f=[Object(u.find)(Object(a.getCategories)(),function(e){var t=e.slug;return p[t]&&p[t].length}).slug]}}else f=["suggested"];this.setState({hoveredItem:null,childItems:i,filterValue:e,suggestedItems:c,reusableItems:l,itemsPerCategory:p,openPanels:f})}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.onSelect,o=t.rootClientId,i=this.state,c=i.childItems,s=i.filterValue,l=i.hoveredItem,d=i.suggestedItems,p=i.reusableItems,f=i.itemsPerCategory,b=i.openPanels,h=function(e){return-1!==b.indexOf(e)},m=!!s;return Object(H.createElement)("div",{className:"editor-inserter__menu"},Object(H.createElement)("label",{htmlFor:"editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(_.__)("Search for a block")),Object(H.createElement)("input",{id:"editor-inserter__search-".concat(n),type:"search",placeholder:Object(_.__)("Search for a block"),className:"editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(H.createElement)("div",{className:"editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(_.__)("Available block types")},Object(H.createElement)(ni,{rootClientId:o,items:c,onSelect:r,onHover:this.onHover}),!!d.length&&Object(H.createElement)(ir.PanelBody,{title:Object(_.__)("Most Used"),opened:h("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(H.createElement)(ti,{items:d,onSelect:r,onHover:this.onHover})),Object(H.createElement)(ai.Slot,{fillProps:{filterValue:s}}),Object(u.map)(Object(a.getCategories)(),function(t){var n=f[t.slug];return n&&n.length?Object(H.createElement)(ir.PanelBody,{key:t.slug,title:t.title,opened:m||h(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(H.createElement)(ti,{items:n,onSelect:r,onHover:e.onHover})):null}),!!p.length&&Object(H.createElement)(ir.PanelBody,{className:"editor-inserter__reusable-blocks-panel",title:Object(_.__)("Reusable"),opened:h("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(H.createElement)(ti,{items:p,onSelect:r,onHover:this.onHover}),Object(H.createElement)(ir.IconButton,{className:"editor-inserter__manage-reusable-blocks",icon:"admin-generic",label:Object(_.__)("Manage All Reusable Blocks"),href:"edit.php?post_type=wp_block"})),Object(u.isEmpty)(d)&&Object(u.isEmpty)(p)&&Object(u.isEmpty)(f)&&Object(H.createElement)("p",{className:"editor-inserter__no-results"},Object(_.__)("No blocks found."))),l&&Object(a.isReusableBlock)(l)&&Object(H.createElement)(ei,{name:l.name,attributes:l.initialAttributes}))}}]),t}(H.Component),di=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.rootClientId;return{rootChildBlocks:(0,e("core/blocks").getChildBlockNames)((0,e("core/editor").getBlockName)(n))}}),Object(d.withDispatch)(function(e){return{fetchReusableBlocks:e("core/editor").fetchReusableBlocks,showInsertionPoint:e("core/editor").showInsertionPoint,hideInsertionPoint:e("core/editor").hideInsertionPoint}}),ir.withSpokenMessages,hr.withInstanceId,hr.withSafeTimeout)(ui),pi=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"render",value:function(){var e=this.props,t=e.items,n=e.position,r=e.title,o=e.children,i=e.onInsertBlock,c=e.rootClientId,a=e.disabled;return 0===t.length?null:Object(H.createElement)(ir.Dropdown,{className:"editor-inserter",contentClassName:"editor-inserter__popover",position:n,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:r,renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(H.createElement)(ir.IconButton,{icon:"insert",label:Object(_.__)("Add block"),onClick:t,className:"editor-inserter__toggle","aria-haspopup":"true","aria-expanded":n,disabled:a},o)},renderContent:function(e){var n=e.onClose;return Object(H.createElement)(di,{items:t,onSelect:function(e){i(e),n()},rootClientId:c})}})}}]),t}(H.Component),fi=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getBlockInsertionPoint,o=t.getSelectedBlock,i=t.getInserterItems,c=r(),a=c.rootClientId;return{title:n("title"),insertionPoint:c,selectedBlock:o(),items:i(a),rootClientId:a}}),Object(d.withDispatch)(function(e,t){return{onInsertBlock:function(n){var r=t.insertionPoint,o=t.selectedBlock,i=r.index,c=r.rootClientId,s=r.layout,l=n.name,u=n.initialAttributes,d=Object(a.createBlock)(l,Object(f.a)({},u,{layout:s}));return o&&Object(a.isUnmodifiedDefaultBlock)(o)?e("core/editor").replaceBlocks(o.clientId,d):e("core/editor").insertBlock(d,i,c)}}})])(pi);var bi=Object(l.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(H.createElement)("div",{className:"editor-block-list__block-mobile-toolbar"},Object(H.createElement)(fi,null),Object(H.createElement)(Eo,{clientIds:[t]}))}),hi=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(yr.a)(Object(yr.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(yr.a)(Object(yr.a)(e))),e.onClick=e.onClick.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"onClick",value:function(){var e=this.props,t=e.layout,n=e.rootClientId,r=e.index,o=Object(b.a)(e,["layout","rootClientId","index"]);o.insertDefaultBlock({layout:t},n,r),o.startTyping(),this.onBlurInserter(),o.onInsert&&this.props.onInsert()}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.showInserter;return Object(H.createElement)("div",{className:"editor-block-list__insertion-point"},n&&Object(H.createElement)("div",{className:"editor-block-list__insertion-point-indicator"}),r&&Object(H.createElement)("div",{className:br()("editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(H.createElement)(ir.IconButton,{icon:"insert",className:"editor-block-list__insertion-point-button",onClick:this.onClick,label:Object(_.__)("Insert block"),onFocus:this.onFocusInserter,onBlur:this.onBlurInserter})))}}]),t}(H.Component),mi=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.clientId,r=t.rootClientId,o=t.canShowInserter,i=e("core/editor"),c=i.canInsertBlockType,s=i.getBlockIndex,l=i.getBlockInsertionPoint,u=i.getBlock,d=i.isBlockInsertionPointVisible,p=i.isTyping,f=e("core/blocks").getDefaultBlockName,b=n?s(n,r):-1,h=l(),m=n?u(n):null,v=d()&&h.index===b&&h.rootClientId===r&&(!m||!Object(a.isUnmodifiedDefaultBlock)(m));return{canInsertDefaultBlock:c(f(),r),showInserter:!p()&&o,index:b,showInsertionPoint:v}}),Object(hr.ifCondition)(function(e){return e.canInsertDefaultBlock}),Object(d.withDispatch)(function(e){var t=e("core/editor");return{insertDefaultBlock:t.insertDefaultBlock,startTyping:t.startTyping}}))(hi),vi=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(yr.a)(Object(yr.a)(e))),e.eventMap={},e}return Object(jr.a)(t,e),Object(vr.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,r=void 0===n?[]:n,o=Object(b.a)(t,["childHandledEvents"]),i=Object(u.reduce)(Object(h.a)(r).concat(Object(h.a)(Object.keys(o))),function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(r){!!r[2]&&delete o[n];var i="on"+r[1];t[i]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=i}return t},{});return Object(H.createElement)("div",Object(pr.a)({},o,i))}}]),t}(H.Component);var Oi=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getInserterItems,i=r.getTemplateLock;return{items:o(n),isLocked:!!i(n)}}),Object(d.withDispatch)(function(e,t){var n=t.clientId,r=t.rootClientId,o=t.layout;return{onInsert:function(t){var i=t.name,c=t.initialAttributes,s=Object(a.createBlock)(i,Object(f.a)({},c,{layout:o}));n?e("core/editor").replaceBlocks(n,s):e("core/editor").insertBlock(s,void 0,r)}}}))(function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(u.filter)(t,function(e){return!(e.isDisabled||e.name===Object(a.getDefaultBlockName)()&&Object(u.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(H.createElement)("div",{className:"editor-inserter-with-shortcuts"},o.map(function(e){return Object(H.createElement)(ir.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:Object(_.sprintf)(Object(_.__)("Add %s"),e.title),icon:Object(H.createElement)(Ir,{icon:e.icon&&e.icon.src})})}))}),gi=Object(hr.createHigherOrderComponent)(function(e){var t=function(t){function n(){var e;return Object(mr.a)(this,n),(e=Object(Or.a)(this,Object(gr.a)(n).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(yr.a)(Object(yr.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(n,t),Object(vr.a)(n,[{key:"componentDidMount",value:function(){this.container=Object(H.findDOMNode)(this),this.container.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("mouseleave",this.onMouseLeave)}},{key:"componentWillUnmount",value:function(){this.container.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("mouseleave",this.onMouseLeave)}},{key:"onMouseLeave",value:function(){this.state.hoverArea&&this.setState({hoverArea:null})}},{key:"onMouseMove",value:function(e){var t=this.props.isRTL,n=this.container.getBoundingClientRect(),r=n.width,o=n.left,i=n.right,c=null;e.clientX-o<r/3?c=t?"right":"left":i-e.clientX<r/3&&(c=t?"left":"right"),c!==this.state.hoverArea&&this.setState({hoverArea:c})}},{key:"render",value:function(){var t=this.state.hoverArea;return Object(H.createElement)(e,Object(pr.a)({},this.props,{hoverArea:t}))}}]),n}(H.Component);return Object(d.withSelect)(function(e){return{isRTL:e("core/editor").getEditorSettings().isRTL}})(t)}),ji=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).setBlockListRef=e.setBlockListRef.bind(Object(yr.a)(Object(yr.a)(e))),e.bindBlockNode=e.bindBlockNode.bind(Object(yr.a)(Object(yr.a)(e))),e.setAttributes=e.setAttributes.bind(Object(yr.a)(Object(yr.a)(e))),e.maybeHover=e.maybeHover.bind(Object(yr.a)(Object(yr.a)(e))),e.hideHoverEffects=e.hideHoverEffects.bind(Object(yr.a)(Object(yr.a)(e))),e.mergeBlocks=e.mergeBlocks.bind(Object(yr.a)(Object(yr.a)(e))),e.insertBlocksAfter=e.insertBlocksAfter.bind(Object(yr.a)(Object(yr.a)(e))),e.onFocus=e.onFocus.bind(Object(yr.a)(Object(yr.a)(e))),e.preventDrag=e.preventDrag.bind(Object(yr.a)(Object(yr.a)(e))),e.onPointerDown=e.onPointerDown.bind(Object(yr.a)(Object(yr.a)(e))),e.deleteOrInsertAfterWrapper=e.deleteOrInsertAfterWrapper.bind(Object(yr.a)(Object(yr.a)(e))),e.onBlockError=e.onBlockError.bind(Object(yr.a)(Object(yr.a)(e))),e.onTouchStart=e.onTouchStart.bind(Object(yr.a)(Object(yr.a)(e))),e.onClick=e.onClick.bind(Object(yr.a)(Object(yr.a)(e))),e.onDragStart=e.onDragStart.bind(Object(yr.a)(Object(yr.a)(e))),e.onDragEnd=e.onDragEnd.bind(Object(yr.a)(Object(yr.a)(e))),e.selectOnOpen=e.selectOnOpen.bind(Object(yr.a)(Object(yr.a)(e))),e.hadTouchStart=!1,e.state={error:null,dragging:!1,isHovered:!1},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.props.isSelected&&this.focusTabbable()}},{key:"componentDidUpdate",value:function(e){(this.props.isTypingWithinBlock||this.props.isSelected)&&this.hideHoverEffects(),this.props.isSelected&&!e.isSelected&&this.focusTabbable()}},{key:"setBlockListRef",value:function(e){e=Object(H.findDOMNode)(e),this.wrapperNode=e,this.props.blockRef(e,this.props.clientId)}},{key:"bindBlockNode",value:function(e){this.node=Object(H.findDOMNode)(e)}},{key:"focusTabbable",value:function(){var e=this.props.initialPosition;if(!this.wrapperNode.contains(document.activeElement)){var t=mo.focus.tabbable.find(this.node).filter(mo.isTextField),n=-1===e,r=(n?u.last:u.first)(t);r?(r.focus(),n&&(Object(mo.placeCaretAtHorizontalEdge)(r,!0),Object(mo.placeCaretAtVerticalEdge)(r,!0))):this.wrapperNode.focus()}}},{key:"setAttributes",value:function(e){var t=this.props,n=t.block,r=t.onChange,o=Object(a.getBlockType)(n.name);r(n.clientId,e);var i=Object(u.reduce)(e,function(e,t,n){return"meta"===Object(u.get)(o,["attributes",n,"source"])&&(e[o.attributes[n].meta]=t),e},{});Object(u.size)(i)&&this.props.onMetaChange(Object(f.a)({},this.props.meta,i))}},{key:"onTouchStart",value:function(){this.hadTouchStart=!0}},{key:"onClick",value:function(){this.hadTouchStart=!1}},{key:"maybeHover",value:function(){var e=this.props,t=e.isPartOfMultiSelection,n=e.isSelected;this.state.isHovered||t||n||this.props.isMultiSelecting||this.hadTouchStart||this.setState({isHovered:!0})}},{key:"hideHoverEffects",value:function(){this.state.isHovered&&this.setState({isHovered:!1})}},{key:"mergeBlocks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.block,r=t.previousBlockClientId,o=t.nextBlockClientId,i=t.onMerge;!e&&!r||e&&!o||(e?i(n.clientId,o):i(r,n.clientId))}},{key:"insertBlocksAfter",value:function(e){this.props.onInsertBlocks(e,this.props.order+1)}},{key:"onFocus",value:function(){this.props.isSelected||this.props.isPartOfMultiSelection||this.props.onSelect()}},{key:"preventDrag",value:function(e){e.preventDefault()}},{key:"onPointerDown",value:function(e){0===e.button&&(e.shiftKey?this.props.isSelected||(this.props.onShiftSelection(this.props.clientId),e.preventDefault()):(this.props.onSelectionStart(this.props.clientId),this.props.isPartOfMultiSelection&&this.props.onSelect()))}},{key:"deleteOrInsertAfterWrapper",value:function(e){var t=e.keyCode;if(e.target===this.wrapperNode&&!this.props.isLocked)switch(t){case vo.ENTER:this.props.onInsertDefaultBlockAfter(),e.preventDefault();break;case vo.BACKSPACE:case vo.DELETE:var n=this.props,r=n.clientId;(0,n.onRemove)(r),e.preventDefault()}}},{key:"onBlockError",value:function(e){this.setState({error:e})}},{key:"onDragStart",value:function(){this.setState({dragging:!0})}},{key:"onDragEnd",value:function(){this.setState({dragging:!1})}},{key:"selectOnOpen",value:function(e){e&&!this.props.isSelected&&this.props.onSelect()}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.order,r=e.mode,o=e.isFocusMode,i=e.hasFixedToolbar,c=e.isLocked,s=e.isFirst,l=e.isLast,u=e.clientId,d=e.rootClientId,p=e.layout,b=e.isSelected,h=e.isPartOfMultiSelection,m=e.isFirstMultiSelected,v=e.isTypingWithinBlock,O=e.isMultiSelecting,g=e.hoverArea,j=e.isEmptyDefaultBlock,y=e.isMovable,k=e.isPreviousBlockADefaultEmptyBlock,S=e.hasSelectedInnerBlock,E=e.isParentOfSelectedBlock,C=e.hasMultiSelection,w=e.isDraggable,T=this.state.isHovered&&!O,I=t.name,P=t.isValid,B=Object(a.getBlockType)(I),A=Object(_.sprintf)(Object(_.__)("Block: %s"),B.title),L=(b||T)&&j&&P,x=(b||T)&&j,N=!o&&!i&&!x&&b&&!v,R=!o&&!i&&!x&&S&&!v&&!C,D=!o&&!i&&T&&!j,M=!o&&(b||"left"===g)&&!L&&!O&&!h&&!v,F=!o&&T&&!j,U=!i&&!x&&(b&&!v||m),V=N,K=this.state,z=K.error,W=K.dragging,q=h&&s||!h,G=!j&&!k,$=br()("editor-block-list__block",{"has-warning":!P||!!z,"is-selected":N,"is-multi-selected":h,"is-selected-parent":R,"is-hovered":D,"is-reusable":Object(a.isReusableBlock)(B),"is-dragging":W,"is-typing":v,"is-focused":o&&(b||E),"is-focus-mode":o}),Y=this.props.onReplace,Q=this.props.wrapperProps;B.getEditWrapperProps&&(Q=Object(f.a)({},Q,B.getEditWrapperProps(t.attributes)));var X="block-".concat(u),Z=Object(H.createElement)(Gr,{name:I,isSelected:b,attributes:t.attributes,setAttributes:this.setAttributes,insertBlocksAfter:c?void 0:this.insertBlocksAfter,onReplace:c?void 0:Y,mergeBlocks:c?void 0:this.mergeBlocks,clientId:u,isSelectionEnabled:this.props.isSelectionEnabled,toggleSelection:this.props.toggleSelection});return"visual"!==r&&(Z=Object(H.createElement)("div",{style:{display:"none"}},Z)),Object(H.createElement)(vi,Object(pr.a)({id:X,ref:this.setBlockListRef,onMouseOver:this.maybeHover,onMouseOverHandled:this.hideHoverEffects,onMouseLeave:this.hideHoverEffects,className:$,"data-type":t.name,onTouchStart:this.onTouchStart,onFocus:this.onFocus,onClick:this.onClick,onKeyDown:this.deleteOrInsertAfterWrapper,tabIndex:"0","aria-label":A,childHandledEvents:["onDragStart","onMouseDown"]},Q),q&&Object(H.createElement)(mi,{clientId:u,rootClientId:d,layout:p,canShowInserter:G,onInsert:this.hideHoverEffects}),Object(H.createElement)(wo,{index:n,rootClientId:d,layout:p}),M&&Object(H.createElement)(Eo,{clientIds:u,blockElementId:X,layout:p,isFirst:s,isLast:l,isHidden:!(T||b)||"left"!==g,isDraggable:!1!==w&&!h&&y,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}),F&&Object(H.createElement)(zo,{clientId:u,isHidden:!(T||b)||"left"!==g}),U&&Object(H.createElement)(Yo,null),m&&Object(H.createElement)(Qo,{rootClientId:d}),Object(H.createElement)(vi,{ref:this.bindBlockNode,onDragStart:this.preventDrag,onMouseDown:this.onPointerDown,className:"editor-block-list__block-edit","data-block":u},Object(H.createElement)(Do,{onError:this.onBlockError},P&&Z,P&&"html"===r&&Object(H.createElement)(Ho,{clientId:u}),!P&&[Object(H.createElement)(xo,{key:"invalid-warning",block:t}),Object(H.createElement)("div",{key:"invalid-preview"},Object(a.getSaveElement)(B,t.attributes))]),V&&Object(H.createElement)(bi,{clientId:u}),!!z&&Object(H.createElement)(Ro,null)),L&&Object(H.createElement)(H.Fragment,null,Object(H.createElement)("div",{className:"editor-block-list__side-inserter"},Object(H.createElement)(Oi,{clientId:u,rootClientId:d,layout:p,onToggle:this.selectOnOpen})),Object(H.createElement)("div",{className:"editor-block-list__empty-block-inserter"},Object(H.createElement)(fi,{position:"top right",onToggle:this.selectOnOpen}))))}}]),t}(H.Component),yi=Object(d.withSelect)(function(e,t){var n=t.clientId,r=t.rootClientId,o=t.isLargeViewport,i=e("core/editor"),c=i.isBlockSelected,s=i.getPreviousBlockClientId,l=i.getNextBlockClientId,u=i.getBlock,d=i.isAncestorMultiSelected,p=i.isBlockMultiSelected,f=i.isFirstMultiSelectedBlock,b=i.isMultiSelecting,h=i.isTyping,m=i.getBlockIndex,v=i.getEditedPostAttribute,O=i.getBlockMode,g=i.isSelectionEnabled,j=i.getSelectedBlocksInitialCaretPosition,y=i.getEditorSettings,k=i.hasSelectedInnerBlock,_=i.getTemplateLock,S=i.hasMultiSelection,E=c(n),C=y(),w=C.hasFixedToolbar,T=C.focusMode,I=u(n),P=s(n),B=u(P),A=_(r),L=k(n,!0);return{nextBlockClientId:l(n),isPartOfMultiSelection:p(n)||d(n),isFirstMultiSelected:f(n),isMultiSelecting:b(),hasSelectedInnerBlock:k(n,!1),isTypingWithinBlock:(E||L)&&h(),order:m(n,r),meta:v("meta"),mode:O(n),isSelectionEnabled:g(),initialPosition:j(),isEmptyDefaultBlock:I&&Object(a.isUnmodifiedDefaultBlock)(I),isPreviousBlockADefaultEmptyBlock:B&&Object(a.isUnmodifiedDefaultBlock)(B),isMovable:"all"!==A,isLocked:!!A,isFocusMode:T&&o,hasFixedToolbar:w&&o,previousBlockClientId:P,block:I,isSelected:E,isParentOfSelectedBlock:L,hasMultiSelection:S()}}),ki=Object(d.withDispatch)(function(e,t){var n=e("core/editor"),r=n.updateBlockAttributes,o=n.selectBlock,i=n.insertBlocks,c=n.insertDefaultBlock,s=n.removeBlock,l=n.mergeBlocks,d=n.replaceBlocks,p=n.editPost,f=n.toggleSelection;return{onChange:function(e,t){r(e,t)},onSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.clientId,n=arguments.length>1?arguments[1]:void 0;o(e,n)},onInsertBlocks:function(e,n){var r=t.rootClientId,o=t.layout;e=e.map(function(e){return Object(a.cloneBlock)(e,{layout:o})}),i(e,n,r)},onInsertDefaultBlockAfter:function(){var e=t.order,n=t.rootClientId;c({},n,e+1)},onRemove:function(e){s(e)},onMerge:function(){l.apply(void 0,arguments)},onReplace:function(e){var n=t.layout;e=Object(u.castArray)(e).map(function(e){return Object(a.cloneBlock)(e,{layout:n})}),d([t.clientId],e)},onMetaChange:function(e){p({meta:e})},toggleSelection:function(e){f(e)}}}),_i=Object(hr.compose)(Object(l.withViewportMatch)({isLargeViewport:"medium"}),yi,ki,Object(ir.withFilters)("editor.BlockListBlock"),gi)(ji),Si=n(63);var Ei=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockCount,o=n.getBlock,i=n.getEditorSettings,c=n.getTemplateLock,s=!r(t.rootClientId),l=o(t.lastBlockClientId),d=Object(u.get)(l,["name"])===Object(a.getDefaultBlockName)(),p=Object(u.get)(l,["isValid"]),f=i().bodyPlaceholder;return{isVisible:s||!d||!p,showPrompt:s,isLocked:!!c(t.rootClientId),placeholder:f}}),Object(d.withDispatch)(function(e,t){var n=e("core/editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e,n=t.layout,i=t.rootClientId;n&&(e={layout:n}),r(e,i),o()}}}))(function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,i=e.placeholder,c=e.layout,a=e.rootClientId;if(t||!n)return null;var s=Object(Si.decodeEntities)(i)||Object(_.__)("Write your story");return Object(H.createElement)("div",{"data-root-client-id":a||"",className:"editor-default-block-appender"},Object(H.createElement)(wo,{rootClientId:a,layout:c}),Object(H.createElement)("input",{role:"button","aria-label":Object(_.__)("Add block"),className:"editor-default-block-appender__content",type:"text",readOnly:!0,onFocus:r,value:o?s:""}),Object(H.createElement)(Oi,{rootClientId:a,layout:c}),Object(H.createElement)(fi,{position:"top right"}))}),Ci=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(yr.a)(Object(yr.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(yr.a)(Object(yr.a)(n))),n.onShiftSelection=n.onShiftSelection.bind(Object(yr.a)(Object(yr.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(yr.a)(Object(yr.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(yr.a)(Object(yr.a)(n))),n.onPointerMove=Object(u.throttle)(n.onPointerMove.bind(Object(yr.a)(Object(yr.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(jr.a)(t,e),Object(vr.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(f.a)({},this.nodes,Object(m.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=t-this.nodes[this.selectionAtStart].getBoundingClientRect().top,r=Object(u.findLast)(this.coordMapKeys,function(e){return e<n});this.onSelectionChange(this.coordMap[r])}},{key:"onSelectionStart",value:function(e){if(this.props.isSelectionEnabled){var t=this.nodes[e].getBoundingClientRect(),n=Object(u.mapValues)(this.nodes,function(e){return e.getBoundingClientRect().top-t.top});this.coordMap=Object(u.invert)(n),this.coordMapKeys=Object(u.sortBy)(Object.values(n)),this.selectionAtStart=e,window.addEventListener("mousemove",this.onPointerMove),window.addEventListener("scroll",this.onScroll,!0),window.addEventListener("mouseup",this.onSelectionEnd)}}},{key:"onSelectionChange",value:function(e){var t=this.props,n=t.onMultiSelect,r=t.selectionStart,o=t.selectionEnd,i=this.selectionAtStart,c=i===e;i&&this.props.isSelectionEnabled&&(c&&r&&n(null,null),c||o===e||n(i,e))}},{key:"onSelectionEnd",value:function(){this.onPointerMove.cancel(),delete this.coordMap,delete this.coordMapKeys,delete this.selectionAtStart,window.removeEventListener("mousemove",this.onPointerMove),window.removeEventListener("scroll",this.onScroll,!0),window.removeEventListener("mouseup",this.onSelectionEnd),this.props.isMultiSelecting&&this.props.onStopMultiSelect()}},{key:"onShiftSelection",value:function(e){if(this.props.isSelectionEnabled){var t=this.props,n=t.selectionStartClientId,r=t.onMultiSelect,o=t.onSelect;n?r(n,e):o(e)}}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.blockClientIds,o=n.layout,i=n.isGroupedByLayout,c=n.rootClientId,a=n.canInsertDefaultBlock,s=n.isDraggable;i&&(e=o);var l=br()("editor-block-list__layout",Object(m.a)({},"layout-".concat(o),o));return Object(H.createElement)("div",{className:l},Object(u.map)(r,function(n,o){return Object(H.createElement)(_i,{key:"block-"+n,index:o,clientId:n,blockRef:t.setBlockRef,onSelectionStart:t.onSelectionStart,onShiftSelection:t.onShiftSelection,rootClientId:c,layout:e,isFirst:0===o,isLast:o===r.length-1,isDraggable:s})}),a&&Object(H.createElement)(vi,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(H.createElement)(Ei,{rootClientId:c,lastBlockClientId:Object(u.last)(r),layout:e})))}}]),t}(H.Component),wi=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockOrder,o=n.isSelectionEnabled,i=n.isMultiSelecting,c=n.getMultiSelectedBlocksStartClientId,s=n.getMultiSelectedBlocksEndClientId,l=n.getBlockSelectionStart,u=n.canInsertBlockType,d=t.rootClientId;return{blockClientIds:r(d),selectionStart:c(),selectionEnd:s(),selectionStartClientId:l(),isSelectionEnabled:o(),isMultiSelecting:i(),canInsertDefaultBlock:u(Object(a.getDefaultBlockName)(),d)}}),Object(d.withDispatch)(function(e){var t=e("core/editor");return{onStartMultiSelect:t.startMultiSelect,onStopMultiSelect:t.stopMultiSelect,onMultiSelect:t.multiSelect,onSelect:t.selectBlock}})])(Ci),Ti=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).updateNestedSettings(),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.synchronizeBlocksWithTemplate()}},{key:"componentDidUpdate",value:function(e){var t=this.props.template;this.updateNestedSettings(),!Object(u.isEqual)(t,e.template)&&this.synchronizeBlocksWithTemplate()}},{key:"synchronizeBlocksWithTemplate",value:function(){var e=this.props,t=e.template,n=e.block,r=e.replaceInnerBlocks,o=n.innerBlocks,i=Object(a.synchronizeBlocksWithTemplate)(o,t);Object(u.isEqual)(i,o)||r(i)}},{key:"updateNestedSettings",value:function(){var e=this.props,t=e.blockListSettings,n=e.allowedBlocks,r=e.templateLock,o=e.parentLock,i=e.updateNestedSettings,c={allowedBlocks:n,templateLock:void 0===r?o:r};ho()(t,c)||i(c)}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.layouts,r=e.allowedBlocks,o=e.templateLock,i=e.template,c=e.isSmallScreen,a=e.isSelectedBlockInRoot,s=br()("editor-inner-blocks",{"has-overlay":c&&!a});return Object(H.createElement)("div",{className:s},Object(H.createElement)(wi,Object(pr.a)({rootClientId:t},{layouts:n,allowedBlocks:r,templateLock:o,template:i})))}}]),t}(H.Component);(Ti=Object(hr.compose)([Er(function(e){return Object(u.pick)(e,["clientId"])}),Object(l.withViewportMatch)({isSmallScreen:"< medium"}),Object(d.withSelect)(function(e,t){var n=e("core/editor"),r=n.isBlockSelected,o=n.hasSelectedInnerBlock,i=n.getBlock,c=n.getBlockListSettings,a=n.getBlockRootClientId,s=n.getTemplateLock,l=t.clientId,u=a(l);return{isSelectedBlockInRoot:r(l)||o(l),block:i(l),blockListSettings:c(l),parentLock:s(u)}}),Object(d.withDispatch)(function(e,t){var n=e("core/editor"),r=n.replaceBlocks,o=n.insertBlocks,i=n.updateBlockListSettings,c=t.block,a=t.clientId;return{replaceInnerBlocks:function(e){var t=Object(u.map)(c.innerBlocks,"clientId");t.length?r(t,e):o(e,void 0,a)},updateNestedSettings:function(t){e(i(a,t))}}})])(Ti)).Content=Object(a.withBlockContentContext)(function(e){var t=e.BlockContent;return Object(H.createElement)(t,null)});var Ii=Ti,Pi=Object(ir.createSlotFill)("InspectorAdvancedControls"),Bi=Pi.Fill,Ai=Pi.Slot,Li=Cr(Bi);Li.Slot=Ai;var xi=Li,Ni=Object(ir.createSlotFill)("InspectorControls"),Ri=Ni.Fill,Di=Ni.Slot,Mi=Cr(Ri);Mi.Slot=Di;var Fi=Mi;var Ui=Object(hr.compose)([Jr,Object(hr.ifCondition)(function(e){return e.hasColorsToChoose})])(function(e){var t=e.colors,n=e.title,r=e.colorValue,o=e.initialOpen,i=Object(b.a)(e,["colors","title","colorValue","initialOpen"]),c=no(t,r),a=c&&c.name;return Object(H.createElement)(ir.PanelColor,{title:n,colorName:a,colorValue:r,initialOpen:o},Object(H.createElement)(eo,Object(pr.a)({value:r},Object(u.omit)(i,["disableCustomColors"]))))}),Hi=Object(_.__)("(current %s: %s)");var Vi=Jr(function(e){var t=e.label,n=e.value,r=e.onChange,o=e.colors,i=no(o,n),c=i&&i.name,a=Object(_.sprintf)(Hi,t.toLowerCase(),c||n),s=Object(H.createElement)(H.Fragment,null,t,n&&Object(H.createElement)(ir.ColorIndicator,{colorValue:n,"aria-label":a}));return Object(H.createElement)(ir.BaseControl,{className:"editor-color-palette-control",label:s},Object(H.createElement)(eo,{className:"editor-color-palette-control__color-palette",value:n,onChange:r}))}),Ki=Object(_.__)("(%s: %s)"),zi=function(e,t){return e.map(function(e,n){var r=e.value,o=e.label;if(!r)return null;var i=no(t,r),c=i&&i.name,a=Object(_.sprintf)(Ki,o.toLowerCase(),c||r);return Object(H.createElement)(ir.ColorIndicator,{key:n,colorValue:r,"aria-label":a})})};var Wi=Object(hr.compose)([Jr,Object(hr.ifCondition)(function(e){return e.hasColorsToChoose})])(function(e){var t=e.title,n=e.colorSettings,r=e.colors,o=e.children,i=Object(b.a)(e,["title","colorSettings","colors","children"]),c=Object(H.createElement)("span",{className:"".concat("editor-panel-color-settings","__panel-title")},t,zi(n,r));return Object(H.createElement)(ir.PanelBody,Object(pr.a)({className:"editor-panel-color-settings",title:c},Object(u.omit)(i,"colors")),n.map(function(e,t){return Object(H.createElement)(Vi,Object(pr.a)({key:t},e))}),o)});var qi=function(e){var t=e.onChange,n=e.className,r=Object(b.a)(e,["onChange","className"]);return Object(H.createElement)(Fo.a,Object(pr.a)({className:br()("editor-plain-text",n),onChange:function(e){return t(e.target.value)}},r))},Gi=n(43),$i=[{icon:"editor-bold",title:Object(_.__)("Bold"),shortcut:vo.displayShortcut.primary("b"),format:"bold"},{icon:"editor-italic",title:Object(_.__)("Italic"),shortcut:vo.displayShortcut.primary("i"),format:"italic"},{icon:"admin-links",title:Object(_.__)("Link"),shortcut:vo.displayShortcut.primary("k"),activeShortcut:vo.displayShortcut.access("s"),format:"link"},{icon:"editor-strikethrough",title:Object(_.__)("Strikethrough"),shortcut:vo.displayShortcut.access("d"),format:"strikethrough"}];var Yi=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={style:function(){var e=window.getSelection();if(0===e.rangeCount)return{};var t=Object(mo.getRectangleFromRange)(e.getRangeAt(0)),n=t.top+t.height,r=t.left+t.width/2,o=Object(mo.getOffsetParent)(e.anchorNode);if(o){var i=o.getBoundingClientRect();n-=i.top,r-=i.left}return{top:n,left:r}}()},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=this.state.style;return Object(H.createElement)("div",{className:t,style:r},n)}}]),t}(H.Component),Qi=function(e){return e.stopPropagation()},Xi=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(yr.a)(Object(yr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.bindListNode=e.bindListNode.bind(Object(yr.a)(Object(yr.a)(e))),e.updateSuggestions=Object(u.throttle)(e.updateSuggestions.bind(Object(yr.a)(Object(yr.a)(e))),200),e.suggestionNodes=[],e.state={posts:[],showSuggestions:!1,selectedSuggestion:null},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,r=t.selectedSuggestion;n&&null!==r&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Zo()(this.suggestionNodes[r],this.listNode,{onlyScrollIfNeeded:!0}),setTimeout(function(){e.scrollingIntoView=!1},100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindListNode",value:function(e){this.listNode=e}},{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=$n()({path:Object(Jn.addQueryArgs)("/gutenberg/v1/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(_.sprintf)(Object(_._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(_.__)("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,r=t.selectedSuggestion,o=t.posts,i=t.loading;if(n&&o.length&&!i)switch(e.keyCode){case vo.UP:e.stopPropagation(),e.preventDefault();var c=r?r-1:o.length-1;this.setState({selectedSuggestion:c});break;case vo.DOWN:e.stopPropagation(),e.preventDefault();var a=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:a});break;case vo.ENTER:if(null!==this.state.selectedSuggestion){e.stopPropagation();var s=this.state.posts[this.state.selectedSuggestion];this.selectLink(s)}}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=void 0===n?"":n,o=t.autoFocus,i=void 0===o||o,c=t.instanceId,a=this.state,s=a.showSuggestions,l=a.posts,u=a.selectedSuggestion,d=a.loading;return Object(H.createElement)(H.Fragment,null,Object(H.createElement)("div",{className:"editor-url-input"},Object(H.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(_.__)("URL"),required:!0,value:r,onChange:this.onChange,onInput:Qi,placeholder:Object(_.__)("Paste URL or type"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":s,"aria-autocomplete":"list","aria-owns":"editor-url-input-suggestions-".concat(c),"aria-activedescendant":null!==u?"editor-url-input-suggestion-".concat(c,"-").concat(u):void 0}),d&&Object(H.createElement)(ir.Spinner,null)),s&&!!l.length&&Object(H.createElement)(ir.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(H.createElement)("div",{className:"editor-url-input__suggestions",id:"editor-url-input-suggestions-".concat(c),ref:this.bindListNode,role:"listbox"},l.map(function(t,n){return Object(H.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:br()("editor-url-input__suggestion",{"is-selected":n===u}),onClick:function(){return e.selectLink(t)},"aria-selected":n===u},Object(Si.decodeEntities)(t.title)||Object(_.__)("(no title)"))}))))}}]),t}(H.Component),Zi=Object(ir.withSpokenMessages)(Object(hr.withInstanceId)(Xi));function Ji(e,t){return Object(Jn.addQueryArgs)(e,t)}var ec=function(e){return e.stopPropagation()},tc=function(e){var t=e.editLink,n=e.formats,r=e.isEditing,o=e.isPreviewing,i=e.linkValue,c=e.onChangeLinkValue,a=e.onKeyDown,s=e.opensInNewWindow,l=e.selectedNodeId,u=e.setLinkTarget,d=e.settingsVisible,p=e.submitLink,f=e.toggleLinkSettingsVisibility,b=d&&Object(H.createElement)("div",{className:"editor-format-toolbar__link-modal-line editor-format-toolbar__link-settings"},Object(H.createElement)(ir.ToggleControl,{label:Object(_.__)("Open in New Window"),checked:s,onChange:u}));return Object(H.createElement)(ir.Fill,{name:"RichText.Siblings"},Object(H.createElement)(Yi,{className:"editor-format-toolbar__link-container"},Object(H.createElement)(ir.Popover,{position:"bottom center",focusOnMount:!!r&&"firstElement",key:l},r&&Object(H.createElement)("form",{className:"editor-format-toolbar__link-modal",onKeyPress:ec,onKeyDown:a,onSubmit:p},Object(H.createElement)("div",{className:"editor-format-toolbar__link-modal-line"},Object(H.createElement)(Zi,{value:i,onChange:c}),Object(H.createElement)(ir.IconButton,{icon:"editor-break",label:Object(_.__)("Apply"),type:"submit"}),Object(H.createElement)(ir.IconButton,{className:"editor-format-toolbar__link-settings-toggle",icon:"ellipsis",label:Object(_.__)("Link Settings"),onClick:f,"aria-expanded":d})),b),o&&Object(H.createElement)("div",{className:"editor-format-toolbar__link-modal",onKeyPress:ec},Object(H.createElement)("div",{className:"editor-format-toolbar__link-modal-line"},Object(H.createElement)(ir.ExternalLink,{className:"editor-format-toolbar__link-value",href:n.link.value},n.link.value&&function(e){var t=e.replace(new RegExp("^https?://(www.)?"),"");return t.match("^[^/]+/$")?t.replace("/",""):t}(decodeURI(n.link.value))),Object(H.createElement)(ir.IconButton,{icon:"edit",label:Object(_.__)("Edit"),onClick:t}),Object(H.createElement)(ir.IconButton,{className:"editor-format-toolbar__link-settings-toggle",icon:"ellipsis",label:Object(_.__)("Link Settings"),onClick:f,"aria-expanded":d})),b))))},nc=function(e){return Object(H.createElement)("div",{className:"editor-format-toolbar"},e.children)};var rc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={},e.addLink=e.addLink.bind(Object(yr.a)(Object(yr.a)(e))),e.editLink=e.editLink.bind(Object(yr.a)(Object(yr.a)(e))),e.dropLink=e.dropLink.bind(Object(yr.a)(Object(yr.a)(e))),e.submitLink=e.submitLink.bind(Object(yr.a)(Object(yr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.onChangeLinkValue=e.onChangeLinkValue.bind(Object(yr.a)(Object(yr.a)(e))),e.toggleLinkSettingsVisibility=e.toggleLinkSettingsVisibility.bind(Object(yr.a)(Object(yr.a)(e))),e.setLinkTarget=e.setLinkTarget.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"onKeyDown",value:function(e){if(e.keyCode===vo.ESCAPE){var t=this.props.formats.link;t&&t.isAdding&&(e.stopPropagation(),t.value?this.props.onChange({link:Object(f.a)({},t,{isAdding:!1})}):this.dropLink())}[vo.LEFT,vo.DOWN,vo.RIGHT,vo.UP,vo.BACKSPACE,vo.ENTER].indexOf(e.keyCode)>-1&&e.stopPropagation()}},{key:"onChangeLinkValue",value:function(e){this.setState({linkValue:e})}},{key:"toggleFormat",value:function(e){var t=this;return function(){t.props.onChange(Object(m.a)({},e,!t.props.formats[e]))}}},{key:"toggleLinkSettingsVisibility",value:function(){this.setState(function(e){return{settingsVisible:!e.settingsVisible}})}},{key:"setLinkTarget",value:function(e){this.setState({opensInNewWindow:e}),this.props.formats.link&&!this.props.formats.link.isAdding&&this.props.onChange({link:{value:this.props.formats.link.value,target:e?"_blank":null,rel:e?"noreferrer noopener":null}})}},{key:"addLink",value:function(){this.props.onChange({link:{isAdding:!0}})}},{key:"dropLink",value:function(){this.props.onChange({link:null})}},{key:"editLink",value:function(e){e.preventDefault(),this.setState({linkValue:this.props.formats.link.value,isEditingLink:!0})}},{key:"submitLink",value:function(e){e.preventDefault();var t=Object(Jn.prependHTTP)(this.state.linkValue);this.props.onChange({link:{isAdding:!1,target:this.state.opensInNewWindow?"_blank":null,rel:this.state.opensInNewWindow?"noreferrer noopener":null,value:t}}),this.props.formats.link.value||this.props.speak(Object(_.__)("Link added."),"assertive")}},{key:"isFormatActive",value:function(e){return this.props.formats[e]&&this.props.formats[e].isActive}},{key:"render",value:function(){var e=this,t=this.props,n=t.formats,r=t.enabledControls,o=void 0===r?[]:r,i=t.customControls,c=void 0===i?[]:i,a=t.selectedNodeId,s=this.state,l=s.linkValue,u=s.settingsVisible,d=s.opensInNewWindow,p=s.isEditingLink,b=n.link&&n.link.isAdding,h=b||p,m=!h&&n.link,v=$i.concat(c).filter(function(e){return-1!==o.indexOf(e.format)}).map(function(t){if("link"===t.format){var n=e.isFormatActive("link"),r=n||b;return Object(f.a)({},t,{shortcut:n?t.activeShortcut:t.shortcut,icon:n?"editor-unlink":"admin-links",title:n?Object(_.__)("Unlink"):Object(_.__)("Link"),onClick:r?e.dropLink:e.addLink,isActive:r})}return Object(f.a)({},t,{onClick:e.toggleFormat(t.format),isActive:e.isFormatActive(t.format)})});return Object(H.createElement)(nc,null,Object(H.createElement)(ir.Toolbar,{controls:v}),(h||m)&&Object(H.createElement)(tc,{editLink:this.editLink,formats:n,isEditing:h,isPreviewing:m,linkValue:l,onChangeLinkValue:this.onChangeLinkValue,onKeyDown:this.onKeyDown,opensInNewWindow:d,selectedNodeId:a,setLinkTarget:this.setLinkTarget,settingsVisible:u,submitLink:this.submitLink,toggleLinkSettingsVisibility:this.toggleLinkSettingsVisibility}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.selectedNodeId!==e.selectedNodeId?function(e){return{selectedNodeId:e.selectedNodeId,settingsVisible:!1,opensInNewWindow:!!e.formats.link&&!!e.formats.link.target,isEditingLink:!1,linkValue:Object(u.get)(e,["formats","link","value"],"")}}(e):null}}]),t}(H.Component),oc=Object(ir.withSpokenMessages)(rc),ic=n(119),cc=n.n(ic),ac=function(e){return Object(u.pickBy)(e,function(e,t){return function(e){return Object(u.startsWith)(e,"aria-")}(t)&&!Object(u.isNil)(e)})},sc=window.Node,lc=sc.TEXT_NODE,uc=sc.ELEMENT_NODE,dc=new RegExp("\ufeff","g");function pc(e){return 0===e.indexOf("data-mce-")}function fc(e){return"all"===e.getAttribute("data-mce-bogus")}function bc(e){return e.hasAttribute("data-mce-bogus")&&!fc(e)}function hc(e){return e.nodeValue.replace(dc,"")}function mc(e,t){if(!e)return"";switch(t){case"string":return e;case"children":return a.children.toHTML(e)}}function vc(e){for(var t={},n=0;n<e.attributes.length;n++){var r=e.attributes[n],o=r.name,i=r.value;pc(o)||(t[o]=i)}return{type:e.nodeName.toLowerCase(),props:Object(f.a)({},t,{children:Oc(e.childNodes)})}}function Oc(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];switch(r.nodeType){case lc:(r=hc(r)).length&&t.push(r);break;case uc:if(fc(r))break;bc(r)?r.hasChildNodes()&&t.push.apply(t,Object(h.a)(Oc(r.childNodes))):t.push(vc(r))}}return t}function gc(e,t){switch(t){case"string":return function(e){return a.children.toHTML(Oc(e))}(e);case"children":return Oc(e)}}var jc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.initialize()}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(u.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(u.isEqual)(this.props.className,e.className)||(this.editorNode.className=br()(e.className,"editor-rich-text__tinymce"));var n=function(e,t){var n=Object(u.keys)(ac(e)),r=Object(u.keys)(ac(t));return{removedKeys:Object(u.difference)(n,r),updatedKeys:r.filter(function(n){return!Object(u.isEqual)(e[n],t[n])})}}(this.props,e),r=n.removedKeys,o=n.updatedKeys;r.forEach(function(e){return t.editorNode.removeAttribute(e)}),o.forEach(function(n){return t.editorNode.setAttribute(n,e[n])})}},{key:"componentWillUnmount",value:function(){this.editor&&(this.editor.destroy(),delete this.editor)}},{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:"initialize",value:function(){var e=this,t=this.props.getSettings({theme:!1,inline:!0,toolbar:!1,browser_spellcheck:!0,entity_encoding:"raw",convert_urls:!1,inline_boundaries_selector:"a[href],code,b,i,strong,em,del,ins,sup,sub",plugins:[],formats:{strikethrough:{inline:"del"}}});cc.a.init(Object(f.a)({},t,{target:this.editorNode,setup:function(t){e.editor=t,e.props.onSetup(t)}}))}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.removeInternetExplorerInputFix&&(this.removeInternetExplorerInputFix(),this.removeInternetExplorerInputFix=null),e&&function(e){return/Trident/.test(window.navigator.userAgent)&&!/input/i.test(e.tagName)&&!/textarea/i.test(e.tagName)}(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,r=t.keyCode;if((vo.BACKSPACE===r||vo.DELETE===r)&&e.contains(n)){var o=document.createEvent("Event");o.initEvent("input",!0,!1),o.data=null,n.dispatchEvent(o)}}return e.addEventListener("textinput",t),document.addEventListener("keyup",n,!0),function(){e.removeEventListener("textinput",t),document.removeEventListener("keyup",n,!0)}}(e))}},{key:"render",value:function(){var e,t=this.props,n=t.tagName,r=void 0===n?"div":n,o=t.style,i=t.defaultValue,c=t.className,a=t.isPlaceholderVisible,s=t.format,l=t.onPaste,u=ac(this.props);return"table"!==r&&(u.role="textbox",u["aria-multiline"]=!0),Object(H.createElement)(r,Object(f.a)({},u,(e={className:br()(c,"editor-rich-text__tinymce"),contentEditable:!0},Object(m.a)(e,"data-is-placeholder-visible",a),Object(m.a)(e,"ref",this.bindEditorNode),Object(m.a)(e,"style",o),Object(m.a)(e,"suppressContentEditableWarning",!0),Object(m.a)(e,"dangerouslySetInnerHTML",{__html:mc(i,s)}),Object(m.a)(e,"onPaste",l),e)))}}]),t}(H.Component),yc=function(e){var t,n=this.getContent.bind(this),r=this.props,o=r.setTimeout,i=r.onReplace,c=cc.a.util.VK,s=e.settings.wptextpattern||{},l=Object(u.groupBy)(Object(u.filter)(Object(a.getBlockTransforms)("from"),{type:"pattern"}),"trigger"),d=l.enter,p=l.undefined,f=s.inline||[{delimiter:"`",format:"code"}];function b(){var n=e.selection.getRng(),r=n.startContainer,i=n.startOffset;if(r&&3===r.nodeType&&r.data.length&&i){var c=r.data.slice(0,i),a=r.data.charAt(i-1),s=f.reduce(function(e,t){if(e.result)return e;if(a!==t.delimiter.slice(-1))return e;var n=Object(u.escapeRegExp)(t.delimiter),r=new RegExp("(.*)"+n+".+"+n+"$"),o=c.match(r);if(!o)return e;var s=o[1].length,l=i-t.delimiter.length,d=c.charAt(s-1),p=c.charAt(s+t.delimiter.length),f=t.delimiter.charAt(0);if(s&&/\S/.test(d)&&(/\s/.test(p)||d===f))return e;var b=new RegExp("^[\\s"+Object(u.escapeRegExp)(f)+"]+$"),h=c.slice(s,l);return b.test(h)?e:{start:s,pattern:t}},{}),l=s.start,d=s.pattern;if(d){var p=d.delimiter,b=d.format,h=e.formatter.get(b);h&&h[0].inline&&(e.undoManager.add(),e.undoManager.transact(function(){r.insertData(i,"\ufeff");var n=r.splitText(l),c=n.splitText(i-l);n.deleteData(0,p.length),n.deleteData(n.data.length-p.length,p.length),e.formatter.apply(b,{},n),e.selection.setCursorLocation(c,1),o(function(){t="space",e.once("selectionchange",function(){if(c){var e=c.data.indexOf("\ufeff");-1!==e&&c.deleteData(e,e+1)}})})}))}}}e.on("selectionchange",function(){t=null}),e.on("keydown",function(r){var s=r.keyCode;(t&&s===vo.ESCAPE||"space"===t&&s===vo.BACKSPACE)&&(e.undoManager.undo(),r.preventDefault(),r.stopImmediatePropagation()),c.metaKeyPressed(r)||(s===vo.ENTER?function(t){if(!i)return;e.getBody().normalize();var r=n();if(!r.length)return;var o=Object(a.findTransform)(d,function(e){var t=e.regExp;return t.test(r[0])});if(!o)return;var c=o.transform({content:r});i([c]),t.preventDefault(),t.stopImmediatePropagation()}(r):s===vo.SPACE?o(function(){return function(t){if(!i)return;e.getBody().normalize();var r=n();if(!r.length)return;var o=r[0],c=Object(a.findTransform)(t,function(e){return e.regExp.test(o)});if(!c)return;var s=o.match(c.regExp),l=e.selection.getRng(),d=s[0].length,p=o.slice(d);if(l.startOffset!==d)return;var f=c.transform({content:[p].concat(Object(h.a)(Object(u.drop)(r))),match:s});i([f])}(p)}):s>47&&!(s>=91&&s<=93)&&o(b))},!0)},kc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onHover=e.onHover.bind(Object(yr.a)(Object(yr.a)(e))),e.onSelect=e.onSelect.bind(Object(yr.a)(Object(yr.a)(e))),e.onSave=e.onSave.bind(Object(yr.a)(Object(yr.a)(e))),e.state={selected:null,hovered:null},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"getInsertPosition",value:function(){var e=this.props,t=e.containerRef,n=e.editor,r=t.current.getBoundingClientRect(),o=Object(mo.getRectangleFromRange)(n.selection.getRng());return{top:o.top-r.top,left:o.right-r.left,height:o.height}}},{key:"onSave",value:function(e){var t=this,n=e.save;return function(e){var r=t.props.editor;e&&r.insertContent(Object(H.renderToString)(n(e))),t.setState({selected:null})}}},{key:"onHover",value:function(e){this.setState({hovered:!!e})}},{key:"onSelect",value:function(e){this.setState({selected:e})}},{key:"render",value:function(){var e=this.state,t=e.hovered,n=e.selected;return Object(H.createElement)(H.Fragment,null,Object(H.createElement)(ai,{title:Object(_.__)("Inline Elements"),items:this.props.items,onSelect:this.onSelect,onHover:this.onHover,initialOpen:!1}),t&&Object(H.createElement)("div",{style:Object(f.a)({position:"absolute"},this.getInsertPosition()),className:"blocks-inline-insertion-point"}),n&&Object(H.createElement)(n.edit,{onSave:this.onSave(n)}))}}]),t}(H.Component),_c=Object(d.withSelect)(function(e){var t=e("core/editor").getTokenSettings;return{items:Object.values(t())}})(kc),Sc=window,Ec=Sc.Node,Cc=Sc.getSelection,wc=function(e){return!e||!e.length};var Tc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onInit=e.onInit.bind(Object(yr.a)(Object(yr.a)(e))),e.getSettings=e.getSettings.bind(Object(yr.a)(Object(yr.a)(e))),e.onSetup=e.onSetup.bind(Object(yr.a)(Object(yr.a)(e))),e.onFocus=e.onFocus.bind(Object(yr.a)(Object(yr.a)(e))),e.onChange=e.onChange.bind(Object(yr.a)(Object(yr.a)(e))),e.onNodeChange=e.onNodeChange.bind(Object(yr.a)(Object(yr.a)(e))),e.onDeleteKeyDown=e.onDeleteKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.onHorizontalNavigationKeyDown=e.onHorizontalNavigationKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.onKeyUp=e.onKeyUp.bind(Object(yr.a)(Object(yr.a)(e))),e.changeFormats=e.changeFormats.bind(Object(yr.a)(Object(yr.a)(e))),e.onPropagateUndo=e.onPropagateUndo.bind(Object(yr.a)(Object(yr.a)(e))),e.onPaste=e.onPaste.bind(Object(yr.a)(Object(yr.a)(e))),e.onCreateUndoLevel=e.onCreateUndoLevel.bind(Object(yr.a)(Object(yr.a)(e))),e.setFocusedElement=e.setFocusedElement.bind(Object(yr.a)(Object(yr.a)(e))),e.state={formats:{},selectedNodeId:0},e.containerRef=Object(H.createRef)(),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"getSettings",value:function(e){e=Object(f.a)({},e,{forced_root_block:this.props.multiline||!1,custom_undo_redo_levels:1});var t=this.props.unstableGetSettings;return t&&(e=t(e)),e}},{key:"onSetup",value:function(e){this.editor=e,e.on("init",this.onInit),e.on("nodechange",this.onNodeChange),e.on("keydown",this.onKeyDown),e.on("keyup",this.onKeyUp),e.on("BeforeExecCommand",this.onPropagateUndo),e.on("focus",this.onFocus),e.on("input",this.onChange),e.on("change",this.onCreateUndoLevel),yc.apply(this,[e]);var t=this.props.unstableOnSetup;t&&t(e)}},{key:"setFocusedElement",value:function(){this.props.setFocusedElement&&this.props.setFocusedElement(this.props.instanceId)}},{key:"onInit",value:function(){var e=this;this.registerCustomFormatters(),this.editor.shortcuts.add(vo.rawShortcut.primary("k"),"",function(){return e.changeFormats({link:{isAdding:!0}})}),this.editor.shortcuts.add(vo.rawShortcut.access("a"),"",function(){return e.changeFormats({link:{isAdding:!0}})}),this.editor.shortcuts.add(vo.rawShortcut.access("s"),"",function(){return e.changeFormats({link:void 0})}),this.editor.shortcuts.add(vo.rawShortcut.access("d"),"",function(){return e.changeFormats({strikethrough:!e.state.formats.strikethrough})}),this.editor.shortcuts.add(vo.rawShortcut.access("x"),"",function(){return e.changeFormats({code:!e.state.formats.code})}),this.editor.shortcuts.add(vo.rawShortcut.primary("z"),"","Undo"),this.editor.shortcuts.add(vo.rawShortcut.primaryShift("z"),"","Redo"),this.editor.shortcuts.remove("meta+y","","Redo")}},{key:"adaptFormatter",value:function(e){switch(e.type){case"inline-style":return{inline:"span",styles:Object(f.a)({},e.style)}}}},{key:"registerCustomFormatters",value:function(){var e=this;Object(u.forEach)(this.props.formatters,function(t){e.editor.formatter.register(t.format,e.adaptFormatter(t))})}},{key:"onPropagateUndo",value:function(e){var t=this.props,n=t.onUndo,r=t.onRedo,o=e.command;"Undo"===o&&n&&(Object(u.defer)(n),e.preventDefault()),"Redo"===o&&r&&(Object(u.defer)(r),e.preventDefault())}},{key:"onPaste",value:function(e){var t=this,n=e.clipboardData,r=n.items,o=void 0===r?[]:r,i=n.files,c=void 0===i?[]:i,s=Object(u.find)(Object(h.a)(o).concat(Object(h.a)(c)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}),l="",d="";try{l=n.getData("text/plain"),d=n.getData("text/html")}catch(e){try{d=n.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",d),window.console.log("Received plain text:\n\n",l),s&&!d){var p=s.getAsFile?s.getAsFile():s,f=Object(a.rawHandler)({HTML:'<img src="'.concat(Object(Gi.createBlobURL)(p),'">'),mode:"BLOCKS",tagName:this.props.tagName}),b=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",p),void(b?this.props.setTimeout(function(){return t.props.onReplace(f)}):this.props.onSplit&&this.props.setTimeout(function(){return t.splitContent(f)}))}if(!this.editor.selection.isCollapsed()){var m=(d||l).replace(/<[^>]+>/g,"").trim();if(Object(Jn.isURL)(m))return this.editor.execCommand("mceInsertLink",!1,{href:this.editor.dom.decode(m)}),void window.console.log("Created link:\n\n",m)}var v=this.props.onReplace&&this.isEmpty(),O="INLINE";v?O="BLOCKS":this.props.onSplit&&(O="AUTO");var g=Object(a.rawHandler)({HTML:d,plainText:l,mode:O,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof g)this.editor.insertContent(g);else if(this.props.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()}},{key:"onChange",value:function(){this.savedContent=this.getContent(),this.props.onChange(this.savedContent)}},{key:"onCreateUndoLevel",value:function(e){e&&null===e.lastLevel||(e&&e.originalEvent&&"blur"===e.originalEvent.type||this.onChange(),this.props.onCreateUndoLevel())}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,r=t.onRemove;if(n||r){var o=e.keyCode===vo.BACKSPACE;if(!vo.isKeyboardEvent.primaryAlt(e,"Backspace"))if(Cc().isCollapsed){var i=this.isEmpty();(i||Object(mo.isHorizontalEdge)(this.editor.getBody(),o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault(),e.stopImmediatePropagation())}}}},{key:"onHorizontalNavigationKeyDown",value:function(e){var t=Cc().focusNode,n=t.nodeType,r=t.nodeValue;n===Ec.TEXT_NODE&&(1===r.length&&"\ufeff"===r[0]&&(t[e.keyCode===vo.LEFT?"previousSibling":"nextSibling"]||(e.preventDefault=u.noop)))}},{key:"onKeyDown",value:function(e){var t=this.editor.dom,n=this.editor.getBody(),r=e.keyCode;if((r===vo.DELETE||r===vo.BACKSPACE)&&this.onDeleteKeyDown(e),(r===vo.LEFT||r===vo.RIGHT)&&this.onHorizontalNavigationKeyDown(e),r===vo.ENTER)if(this.props.multiline){if(!this.props.onSplit)return;var o=this.editor.selection.getNode();if(o.parentNode!==n)return;if(!t.isEmpty(o))return;e.preventDefault();var i=Array.from(n.childNodes),c=t.nodeIndex(o),a=i.slice(0,c),s=i.slice(c+1),l=this.props.format,u=gc(a,l),d=gc(s,l);this.props.onSplit(u,d)}else e.preventDefault(),e.shiftKey||!this.props.onSplit?this.editor.execCommand("InsertLineBreak",!1,e):this.splitContent()}},{key:"onKeyUp",value:function(e){var t=e.keyCode;t===vo.BACKSPACE&&this.onChange(),this.props.isViewportSmall&&t!==vo.BACKSPACE&&t!==vo.ENTER&&this.scrollToRect(Object(mo.getRectangleFromRange)(this.editor.selection.getRng()))}},{key:"scrollToRect",value:function(e){var t=e.top,n=Object(mo.getScrollContainer)(this.editor.getBody());if(n){var r=t-100;Math.abs(r)>10&&n.scrollTo(n.scrollLeft,n.scrollTop+r)}}},{key:"splitContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.props.onSplit;if(n){var r,o,i=this.editor.getBody();if(i.childNodes.length){var c=this.editor.dom,a=c.createRng(),s=c.createRng(),l=this.editor.selection.getRng();a.setStart(i,0),a.setEnd(l.startContainer,l.startOffset),s.setStart(l.endContainer,l.endOffset),s.setEnd(i,c.nodeIndex(i.lastChild)+1);var u=a.cloneContents(),d=s.cloneContents(),p=this.props.format;r=gc(u.childNodes,p),o=gc(d.childNodes,p)}else r=[],o=[];wc(o)?r=this.props.value:wc(r)&&(o=this.props.value),t.paste&&(r=wc(r)?null:r,o=wc(o)?null:o),n.apply(void 0,[r,o].concat(Object(h.a)(e)))}}},{key:"onNodeChange",value:function(e){var t=e.parents;if(document.activeElement===this.editor.getBody()){this.removePlaceholderLinks(t);var n=this.props.formattingControls,r=this.editor.formatter.matchAll(n).reduce(function(e,n){return e[n]=function(e,t){if("link"===e){var n=Object(u.find)(t,function(e){return"A"===e.nodeName});if(n)return n.hasAttribute("data-wp-placeholder")?{isAdding:!0}:{isActive:!0,value:n.getAttribute("href")||"",target:n.getAttribute("target")||"",node:n}}return{isActive:!0}}(n,t),e},{});if(this.setState({formats:r,selectedNodeId:this.state.selectedNodeId+1}),this.props.isViewportSmall){var o,i=Object(u.find)(t,function(e){return"A"===e.tagName});o=i?i.getBoundingClientRect():Object(mo.getRectangleFromRange)(this.editor.selection.getRng()),this.scrollToRect(o)}}}},{key:"setContent",value:function(e){var t,n=this.props.format;this.editor.hasFocus()&&(t=this.editor.selection.getBookmark(2,!0)),this.savedContent=e,this.editor.setContent(mc(e,n)),t&&this.editor.selection.moveToBookmark(t)}},{key:"getContent",value:function(){var e=this.props.format;return gc(this.editor.getBody().childNodes,e)}},{key:"componentDidUpdate",value:function(e){!this.editor||this.props.tagName!==e.tagName||this.props.value===e.value||this.props.value===this.savedContent||Object(u.isEqual)(this.props.value,e.value)||Object(u.isEqual)(this.props.value,this.savedContent)||this.setContent(this.props.value),!this.props.isSelected&&e.isSelected&&(this.removePlaceholderLinks(),this.setState({formats:{}}))}},{key:"removePlaceholderLinks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.editor.$("a[data-wp-placeholder]").toArray(),n=!0,r=!1,o=void 0;try{for(var i,c=Object(u.difference)(t,e)[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;this.editor.dom.remove(a,!0)}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}},{key:"isEmpty",value:function(){return wc(this.props.value)}},{key:"isFormatActive",value:function(e){return this.state.formats[e]&&this.state.formats[e].isActive}},{key:"removeFormat",value:function(e){this.editor.focus(),this.editor.formatter.remove(e),this.onCreateUndoLevel()}},{key:"applyFormat",value:function(e,t,n){this.editor.focus(),this.editor.formatter.apply(e,t,n),this.onCreateUndoLevel()}},{key:"changeFormats",value:function(e){var t=this;Object(u.forEach)(e,function(e,n){var r=t.isFormatActive(n);if("link"===n){if(!e)return void t.editor.execCommand("Unlink");var o=e.isAdding,i=e.value,c=e.target,a=t.editor.selection.isCollapsed();if(o){var s=t.editor.selection.getContent({format:"text"});return Object(Jn.isURL)(s)?(e.isAdding=!1,void t.editor.execCommand("mceInsertLink",!1,{href:s})):void(a||t.editor.formatter.apply(n,{href:"#","data-wp-placeholder":!0,"data-mce-bogus":!0}))}return a&&!r?void t.editor.insertContent(t.editor.dom.createHTML("a",{href:i,target:c},t.editor.dom.encode(i))):void t.editor.execCommand("mceInsertLink",!1,{href:i,target:c,"data-wp-placeholder":null,"data-mce-bogus":null})}r&&!e?t.removeFormat(n):!r&&e&&t.applyFormat(n)}),this.setState(function(t){return{formats:Object(u.merge)({},t.formats,e)}})}},{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,r=void 0===n?"div":n,o=t.style,i=t.value,c=t.wrapperClassName,a=t.className,s=t.inlineToolbar,l=void 0!==s&&s,u=t.formattingControls,d=t.placeholder,p=t.multiline,f=t.keepPlaceholderOnFocus,b=void 0!==f&&f,h=t.isSelected,m=t.formatters,v=t.autocompleters,O=t.format,g=ac(this.props),j=["editor",r].join(),y=d&&(!h||b)&&this.isEmpty(),k=br()(c,"editor-rich-text"),_=Object(H.createElement)(oc,{selectedNodeId:this.state.selectedNodeId,formats:this.state.formats,onChange:this.changeFormats,enabledControls:u,customControls:m});return Object(H.createElement)("div",{className:k,ref:this.containerRef,onFocus:this.setFocusedElement},h&&!l&&Object(H.createElement)(Zr,null,_),h&&l&&Object(H.createElement)("div",{className:"editor-rich-text__inline-toolbar"},_),h&&Object(H.createElement)(_c,{editor:this.editor,containerRef:this.containerRef}),Object(H.createElement)(Tr,{onReplace:this.props.onReplace,completers:v},function(t){var n=t.isExpanded,c=t.listBoxId,s=t.activeId;return Object(H.createElement)(H.Fragment,null,Object(H.createElement)(jc,Object(pr.a)({tagName:r,getSettings:e.getSettings,onSetup:e.onSetup,style:o,defaultValue:i,format:O,isPlaceholderVisible:y,"aria-label":d,"aria-autocomplete":"list","aria-expanded":n,"aria-owns":c,"aria-activedescendant":s},g,{className:a,key:j,onPaste:e.onPaste})),y&&Object(H.createElement)(r,{className:br()("editor-rich-text__tinymce",a),style:o},p?Object(H.createElement)(p,null,d):d),h&&Object(H.createElement)(ir.Slot,{name:"RichText.Siblings"}))}))}}]),t}(H.Component);Tc.defaultProps={formattingControls:$i.map(function(e){return e.format}),formatters:[],format:"children"};var Ic=Object(hr.compose)([hr.withInstanceId,Er(function(e,t){return!1===t.isSelected?{}:!0===t.isSelected?{isSelected:e.isSelected}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement}}),Object(d.withSelect)(function(e){var t=(e("core/viewport")||{}).isViewportMatch,n=void 0===t?u.identity:t,r=e("core/editor").canUserUseUnfilteredHTML;return{isViewportSmall:n("< small"),canUserUseUnfilteredHTML:r()}}),Object(d.withDispatch)(function(e){var t=e("core/editor");return{onCreateUndoLevel:t.createUndoLevel,onRedo:t.redo,onUndo:t.undo}}),hr.withSafeTimeout])(Tc);Ic.Content=function(e){var t,n=e.value,r=e.format,o=e.tagName,i=Object(b.a)(e,["value","format","tagName"]);switch(r){case"string":t=Object(H.createElement)(H.RawHTML,null,n);break;case"children":t=Object(H.createElement)(H.RawHTML,null,a.children.toHTML(n))}return o?Object(H.createElement)(o,i,t):t},Ic.isEmpty=wc,Ic.Content.defaultProps={format:"children"};var Pc=Ic,Bc=n(55),Ac=n.n(Bc),Lc=function(e){function t(){return Object(mr.a)(this,t),Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"getChildContext",value:function(){return Ac()("wp.editor.RichTextProvider",{alternative:"wp.data.select( 'core/editor' ) methods",version:"4.0.0",plugin:"Gutenberg",hint:"This is a global warning, shown regardless of whether the component is used."}),Object(u.pick)(this.props,Object.keys(this.constructor.childContextTypes))}},{key:"render",value:function(){return this.props.children}}]),t}(H.Component);Lc.childContextTypes={onUndo:u.noop,onRedo:u.noop,onCreateUndoLevel:u.noop};var xc=Lc,Nc=function(e){var t=e.urlQueryArgs,n=void 0===t?{}:t,r=Object(b.a)(e,["urlQueryArgs"]),o=Object(d.select)("core/editor").getCurrentPostId;return n=Object(f.a)({post_id:o()},n),Object(H.createElement)(ir.ServerSideRender,Object(pr.a)({urlQueryArgs:n},r))};function Rc(e){var t=e.allowedType,n=e.additionalData,r=void 0===n?{}:n,o=e.filesList,i=e.maxUploadFileSize,c=e.onError,a=void 0===c?u.noop:c,s=e.onFileChange,l=e.allowedMimeTypes,d=void 0===l?null:l,f=Object(h.a)(o),b=[],m=function(e,t){b[e]=t,s(Object(u.compact)(b))},v=function(e){return e?Object(u.flatMap)(e,function(e,t){var n=e.split("/"),r=Object(p.a)(n,1)[0],o=t.split("|");return[e].concat(Object(h.a)(Object(u.map)(o,function(e){return"".concat(r,"/").concat(e)})))}):e}(d),O=function(e){e.message=[Object(H.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],a(e)};f.forEach(function(e,n){if(!v||function(e){return Object(u.includes)(v,e)}(e.type))if(function(e){return"*"===t||Object(u.startsWith)(e,"".concat(t,"/"))}(e.type))if(i&&e.size>i)O({code:"SIZE_ABOVE_LIMIT",message:Object(_.__)("This file exceeds the maximum upload size for this site."),file:e});else{if(!(e.size<=0))return b.push({url:window.URL.createObjectURL(e)}),s(b),function(e,t){var n=new window.FormData;return n.append("file",e,e.name||e.type.replace("/",".")),n.append("title",e.name?e.name.replace(/\.[^.]+$/,""):e.type.replace("/",".")),Object(u.forEach)(t,function(e,t){return n.append(t,e)}),$n()({path:"/wp/v2/media",body:n,method:"POST"})}(e,r).then(function(e){var t={alt:e.alt_text,caption:Object(u.get)(e,["caption","raw"],""),id:e.id,link:e.link,title:e.title.raw,url:e.source_url,mediaDetails:{}};Object(u.has)(e,["media_details","sizes"])&&(t.mediaDetails.sizes=Object(u.get)(e,["media_details","sizes"],{})),m(n,t)}).catch(function(t){var r;m(n,null),r=Object(u.has)(t,["message"])?Object(u.get)(t,["message"]):Object(_.sprintf)(Object(_.__)("Error while uploading file %s to the media library."),e.name),a({code:"GENERAL",message:r,file:e})});O({code:"EMPTY_FILE",message:Object(_.__)("This file is empty."),file:e})}else O({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(_.__)("Sorry, this file type is not supported here."),file:e});else O({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(_.__)("Sorry, this file type is not permitted for security reasons."),file:e})})}var Dc=function(e){var t=e.allowedType,n=e.filesList,r=e.maxUploadFileSize,o=e.onError,i=void 0===o?u.noop:o,c=e.onFileChange,a=Object(d.select)("core/editor"),s=a.getCurrentPostId,l=a.getEditorSettings,p=l().allowedMimeTypes;r=r||l().maxUploadFileSize,Rc({allowedType:t,filesList:n,onFileChange:c,additionalData:{post:s()},maxUploadFileSize:r,onError:function(e){var t=e.message;return i(t)},allowedMimeTypes:p})},Mc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={src:""},e.onChangeSrc=e.onChangeSrc.bind(Object(yr.a)(Object(yr.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(yr.a)(Object(yr.a)(e))),e.onUpload=e.onUpload.bind(Object(yr.a)(Object(yr.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.setState({src:Object(u.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(u.get)(e.value,["src"],"")!==Object(u.get)(this.props.value,["src"],"")&&this.setState({src:Object(u.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)}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t=this.props,n=t.onSelect,r=t.type,o=t.multiple,i=t.onError;Dc({allowedType:r,filesList:e,onFileChange:o?n:function(e){var t=Object(p.a)(e,1)[0];return n(t)},onError:i})}},{key:"render",value:function(){var e=this.props,t=e.type,n=e.accept,r=e.icon,o=e.className,i=e.labels,c=e.onSelect,a=e.value,s=void 0===a?{}:a,l=e.onSelectURL,d=e.onHTMLDrop,p=void 0===d?u.noop:d,f=e.multiple,b=void 0!==f&&f,h=e.notices;return Object(H.createElement)(ir.Placeholder,{icon:r,label:i.title,instructions:Object(_.sprintf)(Object(_.__)("Drag %s, upload a new one or select a file from your library."),i.name),className:br()("editor-media-placeholder",o),notices:h},Object(H.createElement)(ir.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:p}),l&&Object(H.createElement)("form",{onSubmit:this.onSubmitSrc},Object(H.createElement)("input",{type:"url",className:"components-placeholder__input","aria-label":i.title,placeholder:Object(_.__)("Enter URL here…"),onChange:this.onChangeSrc,value:this.state.src}),Object(H.createElement)(ir.Button,{isLarge:!0,type:"submit"},Object(_.__)("Use URL"))),Object(H.createElement)(ir.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__upload-button",onChange:this.onUpload,accept:n,multiple:b},Object(_.__)("Upload")),Object(H.createElement)(cr,{gallery:b&&"image"===t,multiple:b,onSelect:c,type:t,value:s.id,render:function(e){var t=e.open;return Object(H.createElement)(ir.Button,{isLarge:!0,onClick:t},Object(_.__)("Media Library"))}}))}}]),t}(H.Component),Fc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(yr.a)(Object(yr.a)(e))),e.submitLink=e.submitLink.bind(Object(yr.a)(Object(yr.a)(e))),e.state={expanded:!1},e}return Object(jr.a)(t,e),Object(vr.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,r=this.state.expanded,o=t?Object(_.__)("Edit Link"):Object(_.__)("Insert Link");return Object(H.createElement)("div",{className:"editor-url-input__button"},Object(H.createElement)(ir.IconButton,{icon:"admin-links",label:o,onClick:this.toggle,className:br()("components-toolbar__control",{"is-active":t})}),r&&Object(H.createElement)("form",{className:"editor-url-input__button-modal",onSubmit:this.submitLink},Object(H.createElement)("div",{className:"editor-url-input__button-modal-line"},Object(H.createElement)(ir.IconButton,{className:"editor-url-input__back",icon:"arrow-left-alt",label:Object(_.__)("Close"),onClick:this.toggle}),Object(H.createElement)(Zi,{value:t||"",onChange:n}),Object(H.createElement)(ir.IconButton,{icon:"editor-break",label:Object(_.__)("Submit"),type:"submit"}))))}}]),t}(H.Component),Uc=function(e){function t(){return Object(mr.a)(this,t),Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDirty,r=t.isAutosaveable;e.isDirty===n&&e.isAutosaveable===r||this.toggleTimer(n&&r)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(e){var t=this;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;e&&(this.pendingSave=setTimeout(function(){return t.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),t}(H.Component),Hc=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostDirty,r=t.isEditedPostAutosaveable,o=(0,t.getEditorSettings)().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),autosaveInterval:o}}),Object(d.withDispatch)(function(e){return{autosave:e("core/editor").autosave}})])(Uc),Vc=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.onClick,i=e.path,c=void 0===i?[]:i;return Object(H.createElement)("li",{className:br()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(H.createElement)("button",{className:"document-outline__button",onClick:o},Object(H.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map(function(e,t){var n=e.clientId;return Object(H.createElement)("strong",{key:t,className:"document-outline__level"},Object(H.createElement)(Vo,{clientId:n}))}),Object(H.createElement)("strong",{className:"document-outline__level"},r),Object(H.createElement)("span",{className:"document-outline__item-content"},t),Object(H.createElement)("span",{className:"screen-reader-text"},Object(_.__)("(Click to focus this heading)"))))},Kc=Object(H.createElement)("em",null,Object(_.__)("(Empty heading)")),zc=[Object(H.createElement)("br",{key:"incorrect-break"}),Object(H.createElement)("em",{key:"incorrect-message"},Object(_.__)("(Incorrect heading level)"))],Wc=[Object(H.createElement)("br",{key:"incorrect-break-h1"}),Object(H.createElement)("em",{key:"incorrect-message-h1"},Object(_.__)("(Your theme may already use a H1 for the post title)"))],qc=[Object(H.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(H.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(_.__)("(Multiple H1 headings are not recommended)"))],Gc=function(e){return!e.attributes.content||0===e.attributes.content.length},$c=Object(hr.compose)(Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getBlocks,o=(0,e("core").getPostType)(n("type"));return{title:n("title"),blocks:r(),isTitleSupported:Object(u.get)(o,["supports","title"],!1)}}),Object(d.withDispatch)(function(e){return{onSelect:e("core/editor").selectBlock}}))(function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.title,o=e.onSelect,i=e.isTitleSupported,c=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(u.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(f.a)({},t,{path:n,level:t.attributes.level,isEmpty:Gc(t)}):e(t.innerBlocks,Object(h.a)(n).concat([t]))})}(n);if(c.length<1)return null;var a=1,s=i&&r,l=Object(u.countBy)(c,"level")[1]>1;return Object(H.createElement)("div",{className:"document-outline"},Object(H.createElement)("ul",null,s&&Object(H.createElement)(Vc,{level:Object(_.__)("Title"),isValid:!0,onClick:function(){var e=document.querySelector(".editor-post-title__input");e&&e.focus()}},r),c.map(function(e,t){var n=e.level>a+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(l||s));return a=e.level,Object(H.createElement)(Vc,{key:t,level:"H".concat(e.level),isValid:r,onClick:function(){return function(e){return o(e)}(e.clientId)},path:e.path},e.isEmpty?Kc:Object(H.createElement)(Pc.Content,{tagName:"span",value:e.attributes.content}),n&&zc,1===e.level&&l&&qc,s&&1===e.level&&!l&&Wc)})))});var Yc=Object(d.withSelect)(function(e){return{blocks:e("core/editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(u.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n});var Qc=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlocksByClientId,o=n.getBlockIndex,i=n.getTemplateLock,c=n.getBlockRootClientId,s=r(t.clientIds),l=Object(u.every)(s,function(e){return!!e&&Object(a.hasBlockSupport)(e.name,"multiple",!0)}),d=c(t.clientIds[0]);return{firstSelectedIndex:o(Object(u.first)(Object(u.castArray)(t.clientIds)),d),lastSelectedIndex:o(Object(u.last)(Object(u.castArray)(t.clientIds)),d),isLocked:!!i(d),blocks:s,canDuplicate:l,rootClientId:d,extraProps:t}}),Object(d.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=t.blocks,i=t.firstSelectedIndex,c=t.lastSelectedIndex,s=t.isLocked,l=t.canDuplicate,d=e("core/editor"),p=d.insertBlocks,f=d.multiSelect,b=d.removeBlocks,h=d.insertDefaultBlock;return{onDuplicate:function(){if(!s&&l){var e=o.map(function(e){return Object(a.cloneBlock)(e)});p(e,c+1,r),e.length>1&&f(Object(u.first)(e).clientId,Object(u.last)(e).clientId)}},onRemove:function(){s||b(n)},onInsertBefore:function(){s||h({},r,i)},onInsertAfter:function(){s||h({},r,c+1)}}})])(function(e){var t=e.onDuplicate,n=e.onRemove,r=e.onInsertBefore,o=e.onInsertAfter,i=e.isLocked,c=e.canDuplicate;return(0,e.children)({onDuplicate:t,onRemove:n,onInsertAfter:o,onInsertBefore:r,isLocked:i,canDuplicate:c})}),Xc=function(e){return e.preventDefault(),e},Zc={duplicate:{raw:vo.rawShortcut.primaryShift("d"),display:vo.displayShortcut.primaryShift("d")},removeBlock:{raw:vo.rawShortcut.primaryAlt("backspace"),display:vo.displayShortcut.primaryAlt("Backspace")},insertBefore:{raw:vo.rawShortcut.primaryAlt("t"),display:vo.displayShortcut.primaryAlt("t")},insertAfter:{raw:vo.rawShortcut.primaryAlt("y"),display:vo.displayShortcut.primaryAlt("y")}},Jc=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(yr.a)(Object(yr.a)(e))),e.undoOrRedo=e.undoOrRedo.bind(Object(yr.a)(Object(yr.a)(e))),e.save=e.save.bind(Object(yr.a)(Object(yr.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(yr.a)(Object(yr.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,r=t.onMultiSelect;e.preventDefault(),r(Object(u.first)(n),Object(u.last)(n))}},{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"save",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"deleteSelectedBlocks",value:function(e){var t=this.props,n=t.selectedBlockClientIds,r=t.hasMultiSelection,o=t.onRemove,i=t.isLocked;r&&(e.preventDefault(),i||o(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(H.createElement)(H.Fragment,null,Object(H.createElement)(ir.KeyboardShortcuts,{shortcuts:(e={},Object(m.a)(e,vo.rawShortcut.primary("a"),this.selectAll),Object(m.a)(e,vo.rawShortcut.primary("z"),this.undoOrRedo),Object(m.a)(e,vo.rawShortcut.primaryShift("z"),this.undoOrRedo),Object(m.a)(e,"backspace",this.deleteSelectedBlocks),Object(m.a)(e,"del",this.deleteSelectedBlocks),Object(m.a)(e,"escape",this.clearMultiSelection),e)}),Object(H.createElement)(ir.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(m.a)({},vo.rawShortcut.primary("s"),this.save)}),t.length>0&&Object(H.createElement)(Qc,{clientIds:t},function(e){var t,n=e.onDuplicate,r=e.onRemove,o=e.onInsertAfter,i=e.onInsertBefore;return Object(H.createElement)(ir.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(m.a)(t,Zc.duplicate.raw,Object(u.flow)(Xc,n)),Object(m.a)(t,Zc.removeBlock.raw,Object(u.flow)(Xc,r)),Object(m.a)(t,Zc.insertBefore.raw,Object(u.flow)(Xc,i)),Object(m.a)(t,Zc.insertAfter.raw,Object(u.flow)(Xc,o)),t)})}))}}]),t}(H.Component),ea=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getBlockOrder,r=t.getMultiSelectedBlockClientIds,o=t.hasMultiSelection,i=t.isEditedPostDirty,c=t.getBlockRootClientId,a=t.getTemplateLock,s=(0,t.getSelectedBlock)(),l=s?[s.clientId]:r();return{rootBlocksClientIds:n(),hasMultiSelection:o(),isLocked:Object(u.some)(l,function(e){return!!a(c(e))}),isDirty:i(),selectedBlockClientIds:l}}),Object(d.withDispatch)(function(e,t){var n=e("core/editor"),r=n.clearSelectedBlock,o=n.multiSelect,i=n.redo,c=n.undo,a=n.removeBlocks,s=n.savePost;return{onSave:function(){t.isDirty&&s()},clearSelectedBlock:r,onMultiSelect:o,onRedo:i,onUndo:c,onRemove:a}})])(Jc);var ta=Object(hr.compose)([Object(d.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(d.withDispatch)(function(e){return{redo:function(){return e("core/editor").redo()}}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(H.createElement)(ir.IconButton,{icon:"redo",label:Object(_.__)("Redo"),shortcut:vo.displayShortcut.primaryShift("z"),disabled:!t,onClick:n,className:"editor-history__redo"})});var na=Object(hr.compose)([Object(d.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(d.withDispatch)(function(e){return{undo:function(){return e("core/editor").undo()}}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(H.createElement)(ir.IconButton,{icon:"undo",label:Object(_.__)("Undo"),shortcut:vo.displayShortcut.primary("z"),disabled:!t,onClick:n,className:"editor-history__undo"})});var ra=Object(hr.compose)([Object(d.withSelect)(function(e){return{isValid:e("core/editor").isValidTemplate()}}),Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}})])(function(e){var t=e.isValid,n=Object(b.a)(e,["isValid"]);return t?null:Object(H.createElement)(ir.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(H.createElement)("p",null,Object(_.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(H.createElement)("div",null,Object(H.createElement)(ir.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(_.__)("Keep it as is")),Object(H.createElement)(ir.Button,{onClick:function(){window.confirm(Object(_.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(_.__)("Reset the template"))))});var oa=Object(hr.compose)([Object(d.withSelect)(function(e){return{notices:e("core/editor").getNotices()}}),Object(d.withDispatch)(function(e){return{onRemove:e("core/editor").removeNotice}})])(function(e){return Object(H.createElement)(ir.NoticeList,e,Object(H.createElement)(ra,null))});var ia=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(u.get)(n,["supports","page-attributes"],!1)&&Object(u.isEmpty)(t)?null:r});var ca=Object(d.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}})(function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(u.some)(Object(u.castArray)(r),function(e){return!!t.supports[e]})),o?n:null});function aa(e){var t=e.onUpdateOrder,n=e.instanceId,r=e.order,o="editor-page-attributes__order-".concat(n);return Object(H.createElement)(H.Fragment,null,Object(H.createElement)("label",{htmlFor:o},Object(_.__)("Order")),Object(H.createElement)("input",{type:"text",value:r||0,onChange:function(e){var n=Number(e.target.value);n>=0&&t(n)},id:o,size:6}))}var sa=Object(hr.compose)([Object(d.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(d.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}}),hr.withInstanceId])(function(e){return Object(H.createElement)(ca,{supportKeys:"page-attributes"},Object(H.createElement)(aa,e))});function la(e){var t=Object(u.groupBy)(e,"parent");return function e(n){return n.map(function(n){var r=t[n.id];return Object(f.a)({},n,{children:r&&r.length?e(r):[]})})}(t[0]||[])}var ua=Object(d.withSelect)(function(e){var t=e("core"),n=t.getPostType,r=t.getEntityRecords,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("type"),s=n(a),l=i(),d=Object(u.get)(s,["hierarchical"],!1),p={per_page:-1,exclude:l,parent_exclude:l,orderby:"menu_order",order:"asc"};return{parent:c("parent"),items:d?r("postType",a,p):[],postType:s}}),da=Object(d.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),pa=Object(hr.compose)([ua,da])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(u.get)(n,["hierarchical"],!1),c=Object(u.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=la(a.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(_.__)("no title"),")")}}));return Object(H.createElement)(ir.TreeSelect,{label:c,noOptionLabel:"(".concat(Object(_.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})});var fa=Object(hr.compose)(Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(d.withDispatch)(function(e){return{onUpdate:function(t){e("core/editor").editPost({template:t||""})}}}))(function(e){var t=e.availableTemplates,n=e.selectedTemplate,r=e.onUpdate;return Object(u.isEmpty)(t)?null:Object(H.createElement)(ir.SelectControl,{label:Object(_.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(u.map)(t,function(e,t){return{value:t,label:e}})})});var ba=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(u.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}}),hr.withInstanceId])(function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(H.createElement)(ca,{supportKeys:"author"},r)}),ha=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"setAuthorId",value:function(e){var t=this.props.onUpdateAuthor,n=e.target.value;t(Number(n))}},{key:"render",value:function(){var e=this.props,t=e.postAuthor,n=e.instanceId,r=e.authors,o="post-author-selector-"+n;return Object(H.createElement)(ba,null,Object(H.createElement)("label",{htmlFor:o},Object(_.__)("Author")),Object(H.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(H.createElement)("option",{key:e.id,value:e.id},e.name)})))}}]),t}(H.Component),ma=Object(hr.compose)([Object(d.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(d.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),hr.withInstanceId])(ha);var va=Object(hr.compose)([Object(d.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(d.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(b.a)(e,["commentStatus"]);return Object(H.createElement)(ir.CheckboxControl,{label:Object(_.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Oa=Object(hr.compose)([Object(d.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(d.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(H.createElement)("div",{className:"editor-post-excerpt"},Object(H.createElement)(ir.TextareaControl,{label:Object(_.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(H.createElement)(ir.ExternalLink,{href:"https://codex.wordpress.org/Excerpt"},Object(_.__)("Learn more about manual excerpts")))});var ga=function(e){return Object(H.createElement)(ca,Object(pr.a)({},e,{supportKeys:"excerpt"}))};var ja=Object(d.withSelect)(function(e){var t=e("core").getThemeSupports;return{postType:(0,e("core/editor").getEditedPostAttribute)("type"),themeSupports:t()}})(function(e){var t=e.themeSupports,n=e.children,r=e.postType,o=e.supportKeys;return Object(u.some)(Object(u.castArray)(o),function(e){var n=Object(u.get)(t,[e],!1);return"post-thumbnails"===e&&Object(u.isArray)(n)?Object(u.includes)(n,r):n})?n:null});var ya=function(e){return Object(H.createElement)(ja,{supportKeys:"post-thumbnails"},Object(H.createElement)(ca,Object(pr.a)({},e,{supportKeys:"thumbnail"})))},ka=Object(_.__)("Set featured image"),_a=Object(_.__)("Remove image");var Sa=Object(d.withSelect)(function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(c("type")),featuredImageId:a}}),Ea=Object(d.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),Ca=Object(hr.compose)(Sa,Ea,Object(ir.withFilters)("editor.PostFeaturedImage"))(function(e){var t,n,r,o=e.currentPostId,i=e.featuredImageId,c=e.onUpdateImage,a=e.onRemoveImage,s=e.media,l=e.postType,d=Object(u.get)(l,["labels"],{});if(s){var p=Object(lr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",s.id,o);Object(u.has)(s,["media_details","sizes",p])?(t=s.media_details.sizes[p].width,n=s.media_details.sizes[p].height,r=s.media_details.sizes[p].source_url):(t=s.media_details.width,n=s.media_details.height,r=s.source_url)}return Object(H.createElement)(ya,null,Object(H.createElement)("div",{className:"editor-post-featured-image"},!!i&&Object(H.createElement)(cr,{title:Object(_.__)("Set featured image"),onSelect:c,type:"image",modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(H.createElement)(ir.Button,{className:"editor-post-featured-image__preview",onClick:o},s&&Object(H.createElement)(ir.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(H.createElement)("img",{src:r,alt:Object(_.__)("Featured image")})),!s&&Object(H.createElement)(ir.Spinner,null))}}),!!i&&s&&!s.isLoading&&Object(H.createElement)(cr,{title:d.set_featured_image||ka,onSelect:c,type:"image",modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(H.createElement)(ir.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(_.__)("Replace image"))}}),!i&&Object(H.createElement)("div",null,Object(H.createElement)(cr,{title:d.set_featured_image||ka,onSelect:c,type:"image",modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(H.createElement)(ir.Button,{className:"editor-post-featured-image__toggle",onClick:t},Object(_.__)("Set featured image"))}})),!!i&&Object(H.createElement)(ir.Button,{onClick:a,isLink:!0,isDestructive:!0},d.remove_featured_image||_a)))});var wa=Object(d.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(b.a)(e,["disablePostFormats"]);return!t&&Object(H.createElement)(ca,Object(pr.a)({},n,{supportKeys:"post-formats"}))}),Ta=[{id:"aside",caption:Object(_.__)("Aside")},{id:"gallery",caption:Object(_.__)("Gallery")},{id:"link",caption:Object(_.__)("Link")},{id:"image",caption:Object(_.__)("Image")},{id:"quote",caption:Object(_.__)("Quote")},{id:"standard",caption:Object(_.__)("Standard")},{id:"status",caption:Object(_.__)("Status")},{id:"video",caption:Object(_.__)("Video")},{id:"audio",caption:Object(_.__)("Audio")},{id:"chat",caption:Object(_.__)("Chat")}];var Ia=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(u.union)([o],Object(u.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(d.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),hr.withInstanceId])(function(e){var t=e.onUpdatePostFormat,n=e.postFormat,r=void 0===n?"standard":n,o=e.supportedFormats,i=e.suggestedFormat,c="post-format-selector-"+e.instanceId,a=Ta.filter(function(e){return Object(u.includes)(o,e.id)}),s=Object(u.find)(a,function(e){return e.id===i});return Object(H.createElement)(wa,null,Object(H.createElement)("div",{className:"editor-post-format"},Object(H.createElement)("div",{className:"editor-post-format__content"},Object(H.createElement)("label",{htmlFor:c},Object(_.__)("Post Format")),Object(H.createElement)("select",{value:r,onChange:function(e){return t(e.target.value)},id:c},a.map(function(e){return Object(H.createElement)("option",{key:e.id,value:e.id},e.caption)}))),s&&s.id!==r&&Object(H.createElement)("div",{className:"editor-post-format__suggestion"},Object(_.__)("Suggestion:")," ",Object(H.createElement)(ir.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))});var Pa=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount,r=e.children;return!t||n<2?null:Object(H.createElement)(ca,{supportKeys:"revisions"},r)});var Ba=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount;return Object(H.createElement)(Pa,null,Object(H.createElement)(ir.IconButton,{href:Ji("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(_.sprintf)(Object(_._n)("%d Revision","%d Revisions",n),n)))});var Aa=Object(hr.compose)(Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(u.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r});var La=Object(hr.compose)(Object(d.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(d.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(H.createElement)(Aa,null,Object(H.createElement)(ir.CheckboxControl,{label:Object(_.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var xa=Object(hr.compose)([Object(d.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(d.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(b.a)(e,["pingStatus"]);return Object(H.createElement)(ir.CheckboxControl,{label:Object(_.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})}),Na=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.previewLink;t&&!e.previewLink&&(this.setPreviewWindowLink(t),delete this.previewWindow)}},{key:"setPreviewWindowLink",value:function(e){var t=this.previewWindow;t&&!t.closed&&(t.location=e)}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(){var e=this.props,t=e.isAutosaveable,n=e.previewLink,r=e.currentPostLink;if(this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),t||n||!r)if(t){this.props.autosave();this.previewWindow.document.write('\n\t\t\t<div class="editor-post-preview-button__interstitial-message">\n\t\t\t\t<p>Please wait&hellip;</p>\n\t\t\t\t<p>Generating preview.</p>\n\t\t\t</div>\n\t\t\t<style>\n\t\t\t\tbody {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\theight: 100vh;\n\t\t\t\t\twidth: 100vw;\n\t\t\t\t}\n\t\t\t\tp {\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t\t}\n\t\t\t</style>'),this.previewWindow.document.close()}else this.setPreviewWindowLink(n);else this.setPreviewWindowLink(r)}},{key:"render",value:function(){var e=this.props.isSaveable;return Object(H.createElement)(ir.Button,{className:"editor-post-preview",isLarge:!0,onClick:this.openPreviewWindow,disabled:!e},Object(_._x)("Preview","imperative verb"),Object(H.createElement)(s.DotTip,{id:"core/editor.preview"},Object(_.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),t}(H.Component),Ra=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostId,r=t.getCurrentPostAttribute,o=t.getAutosaveAttribute,i=t.getEditedPostAttribute,c=t.isEditedPostDirty,a=t.isEditedPostNew,s=t.isEditedPostSaveable,l=t.isEditedPostAutosaveable,d=(0,e("core").getPostType)(i("type"));return{postId:n(),currentPostLink:r("link"),previewLink:o("preview_link"),isDirty:c(),isNew:a(),isSaveable:s(),isAutosaveable:l(),isViewable:Object(u.get)(d,["viewable"],!1)}}),Object(d.withDispatch)(function(e){return{autosave:e("core/editor").autosave}}),Object(hr.ifCondition)(function(e){return e.isViewable})])(Na);var Da=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,c=r.isSavingPost,a=r.isPublishingPost,s=r.getCurrentPost,l=r.getCurrentPostType,d=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:a(),hasPublishAction:Object(u.get)(s(),["_links","wp:action-publish"],!1),postType:l(),isAutosaving:d()}})])(function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving;return o?Object(_.__)("Publishing…"):t&&r&&!c?Object(_.__)("Updating…"):n&&r&&!c?Object(_.__)("Scheduling…"):i?t?Object(_.__)("Update"):n?Object(_.__)("Schedule"):Object(_.__)("Publish"):Object(_.__)("Submit for Review")}),Ma=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).call(this,e))).buttonNode=Object(H.createRef)(),n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.isSaving,r=t.onStatusChange,o=t.onSave,i=t.isBeingScheduled,c=t.visibility,a=t.isPublishable,s=t.isSaveable,l=t.hasPublishAction,d=t.onSubmit,p=void 0===d?u.noop:d,f=t.forceIsSaving,b=a&&s;e=l?i?"future":"private"===c?"private":"publish":"pending";return Object(H.createElement)(ir.Button,{ref:this.buttonNode,className:"editor-post-publish-button",isPrimary:!0,isLarge:!0,onClick:function(){p(),r(e),o()},disabled:!b,isBusy:n},Object(H.createElement)(Da,{forceIsSaving:f}))}}]),t}(H.Component),Fa=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.forceIsSaving,r=t.forceIsDirty,o=e("core/editor"),i=o.isSavingPost,c=o.isEditedPostBeingScheduled,a=o.getEditedPostVisibility,s=o.isEditedPostSaveable,l=o.isEditedPostPublishable,d=o.getCurrentPost,p=o.getCurrentPostType;return{isSaving:n||i(),isBeingScheduled:c(),visibility:a(),isSaveable:s(),isPublishable:r||l(),hasPublishAction:Object(u.get)(d(),["_links","wp:action-publish"],!1),postType:p()}}),Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(Ma),Ua=[{value:"public",label:Object(_.__)("Public"),info:Object(_.__)("Visible to everyone.")},{value:"private",label:Object(_.__)("Private"),info:Object(_.__)("Only visible to site admins and editors.")},{value:"password",label:Object(_.__)("Password Protected"),info:Object(_.__)("Protected with a password you choose. Only those with the password can view this post.")}],Ha=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(yr.a)(Object(yr.a)(n))),n.setPrivate=n.setPrivate.bind(Object(yr.a)(Object(yr.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(yr.a)(Object(yr.a)(n))),n.updatePassword=n.updatePassword.bind(Object(yr.a)(Object(yr.a)(n))),n.state={hasPassword:!!e.password},n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"setPublic",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(_.__)("Would you like to privately publish this post now?"))){var e=this.props,t=e.onUpdateVisibility,n=e.onSave;t("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status,o=e.password;n("private"===t?"draft":r,o||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(e){var t=this.props,n=t.status;(0,t.onUpdateVisibility)(n,e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.visibility,n=e.password,r=e.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===t&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===t},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(H.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(H.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(_.__)("Post Visibility")),Ua.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(H.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(H.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:t,onChange:o[t].onSelect,checked:o[t].checked,id:"editor-post-".concat(t,"-").concat(r),"aria-describedby":"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(H.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(H.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(H.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(H.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(_.__)("Create password")),Object(H.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(_.__)("Use a secure password")}))]}}]),t}(H.Component),Va=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.savePost,r=t.editPost;return{onSave:n,onUpdateVisibility:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:e,password:t})}}}),hr.withInstanceId])(Ha);var Ka=Object(d.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(u.find)(Ua,{value:t}).label});var za=Object(hr.compose)([Object(d.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(d.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(Ze.getSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(H.createElement)(ir.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,locale:r.l10n.locale,is12Hour:o})});var Wa=Object(d.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})(function(e){var t=e.date,n=Object(Ze.getSettings)();return t?Object(Ze.dateI18n)(n.formats.datetime,t):Object(_.__)("Immediately")}),qa={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},Ga=function(e,t){return e.toLowerCase()===t.toLowerCase()},$a=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(yr.a)(Object(yr.a)(e))),e.searchTerms=Object(u.throttle)(e.searchTerms.bind(Object(yr.a)(Object(yr.a)(e))),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(yr.a)(Object(yr.a)(e))),e.state={loading:!1,availableTerms:[],selectedTerms:[]},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(u.isEmpty)(this.props.terms)||(this.setState({loading:!1}),this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:100}),this.initRequest.then(function(){e.setState({loading:!1})},function(t){"abort"!==t.statusText&&e.setState({loading:!1})})),this.searchTerms()}},{key:"componentWillUnmount",value:function(){Object(u.invoke)(this.initRequest,["abort"]),Object(u.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(f.a)({},qa,t),o=$n()({path:Object(Jn.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(function(t){e.setState(function(e){return{availableTerms:e.availableTerms.concat(t.filter(function(t){return!Object(u.find)(e.availableTerms,function(e){return e.id===t.id})}))}}),e.updateSelectedTerms(e.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(t,n){var r=Object(u.find)(e.state.availableTerms,function(e){return e.id===n});return r&&t.push(r.name),t},[]);this.setState({selectedTerms:t})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy;return $n()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:e}}).catch(function(r){return"term_exists"===r.code?(t.addRequest=$n()({path:Object(Jn.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(f.a)({},qa,{search:e}))}),t.addRequest.then(function(t){return Object(u.find)(t,function(t){return Ga(t.name,e)})})):Promise.reject(r)})}},{key:"onChange",value:function(e){var t=this,n=Object(u.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(u.find)(t.state.availableTerms,function(t){return Ga(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(u.find)(t,function(t){return Ga(t.name,e)}).id})};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then(function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(u.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map(function(e){return e.name}),s=Object(u.get)(n,["data","labels","add_new_item"],"post_tag"===t?Object(_.__)("Add New Tag"):Object(_.__)("Add New Term")),l=Object(u.get)(n,["data","labels","singular_name"],"post_tag"===t?Object(_.__)("Tag"):Object(_.__)("Term")),d=Object(_.sprintf)(Object(_._x)("%s added","term"),l),p=Object(_.sprintf)(Object(_._x)("%s removed","term"),l),f=Object(_.sprintf)(Object(_._x)("Remove %s","term"),l);return Object(H.createElement)(ir.FormTokenField,{value:c,displayTransform:u.unescape,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,placeholder:s,messages:{added:d,removed:p,remove:f}})}}]),t}(H.Component),Ya=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(u.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(u.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(d.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(m.a)({},n,t))}}}),Object(ir.withFilters)("editor.PostTaxonomyType"))($a),Qa=function(){var e=[Object(_.__)("Suggestion:"),Object(H.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(_.__)("Add tags"))];return Object(H.createElement)(ir.PanelBody,{initialOpen:!1,title:e},Object(H.createElement)("p",null,Object(_.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(H.createElement)(Ya,{slug:"post_tag"}))},Xa=function(e){function t(e){var n;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(H.createElement)(Qa,null)}}]),t}(H.Component),Za=Object(hr.compose)(Object(d.withSelect)(function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(u.some)(n.types,function(e){return e===t}),hasTags:r&&r.length}}),Object(hr.ifCondition)(function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t}))(Xa),Ja=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(H.createElement)(ir.Button,{isLink:!0,onClick:function(){return r(t)}},n)},es=Object(hr.compose)(Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(u.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:function(e,t){var n=Ta.filter(function(t){return Object(u.includes)(e,t.id)});return Object(u.find)(n,function(e){return e.id===t})}(o,r())}}),Object(d.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Object(hr.ifCondition)(function(e){var t=e.suggestion,n=e.currentPostFormat;return t&&t.id!==n}))(function(e){var t=e.suggestion,n=e.onUpdatePostFormat,r=[Object(_.__)("Suggestion:"),Object(H.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(_.__)("Use a post format"))];return Object(H.createElement)(ir.PanelBody,{initialOpen:!1,title:r},Object(H.createElement)("p",null,Object(_.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(H.createElement)("p",null,Object(H.createElement)(Ja,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(_.sprintf)(Object(_.__)('Apply the "%1$s" format.'),t.caption)})))});var ts=Object(d.withSelect)(function(e){var t=e("core/editor").getCurrentPost;return{hasPublishAction:Object(u.get)(t(),["_links","wp:action-publish"],!1)}})(function(e){var t=e.hasPublishAction,n=e.children;return Object(H.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(H.createElement)("div",null,Object(H.createElement)("strong",null,t?Object(_.__)("Are you ready to publish?"):Object(_.__)("Are you ready to submit for review?"))),Object(H.createElement)("p",null,t?Object(_.__)("Double-check your settings, then use the button to publish your post."):Object(_.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),t&&Object(H.createElement)(H.Fragment,null,Object(H.createElement)(ir.PanelBody,{initialOpen:!1,title:[Object(_.__)("Visibility:"),Object(H.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(H.createElement)(Ka,null))]},Object(H.createElement)(Va,null)),Object(H.createElement)(ir.PanelBody,{initialOpen:!1,title:[Object(_.__)("Publish:"),Object(H.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(H.createElement)(Wa,null))]},Object(H.createElement)(za,null)),Object(H.createElement)(es,null),Object(H.createElement)(Za,null),n))}),ns=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(yr.a)(Object(yr.a)(e))),e.onSelectInput=e.onSelectInput.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){e.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(u.get)(o,["labels","view_item"]),c=n?Object(H.createElement)(H.Fragment,null,Object(_.__)("is now scheduled. It will go live on")," ",Object(H.createElement)(Wa,null),"."):Object(_.__)("is now live."),a=n?Object(_.__)("The post address will be:"):Object(_.__)("What’s next?");return Object(H.createElement)("div",{className:"post-publish-panel__postpublish"},Object(H.createElement)(ir.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(H.createElement)("a",{href:r.link},r.title||Object(_.__)("(no title)"))," ",c),Object(H.createElement)(ir.PanelBody,null,Object(H.createElement)("div",null,Object(H.createElement)("strong",null,a)),Object(H.createElement)("input",{className:"post-publish-panel__postpublish-link-input",readOnly:!0,value:r.link,onFocus:this.onSelectInput,type:"text"}),Object(H.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(H.createElement)(ir.Button,{isDefault:!0,href:r.link},i),Object(H.createElement)(ir.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(_.__)("Copied!"):Object(_.__)("Copy Link")))),t)}}]),t}(H.Component),rs=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(ns),os=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(yr.a)(Object(yr.a)(e))),e.state={loading:!1,submitted:!1},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose;e.hasPublishAction?this.setState({loading:!0}):t()}},{key:"render",value:function(){var e=this.props,t=e.isScheduled,n=e.onClose,r=e.forceIsDirty,o=e.forceIsSaving,i=e.PrePublishExtension,c=e.PostPublishExtension,a=Object(b.a)(e,["isScheduled","onClose","forceIsDirty","forceIsSaving","PrePublishExtension","PostPublishExtension"]),s=this.state,l=s.loading,u=s.submitted;return Object(H.createElement)("div",Object(pr.a)({className:"editor-post-publish-panel"},a),Object(H.createElement)("div",{className:"editor-post-publish-panel__header"},!u&&Object(H.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(H.createElement)(Fa,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:r,forceIsSaving:o})),u&&Object(H.createElement)("div",{className:"editor-post-publish-panel__header-published"},t?Object(_.__)("Scheduled"):Object(_.__)("Published")),Object(H.createElement)(ir.IconButton,{"aria-expanded":!0,onClick:n,icon:"no-alt",label:Object(_.__)("Close panel")})),Object(H.createElement)("div",{className:"editor-post-publish-panel__content"},!l&&!u&&Object(H.createElement)(ts,null,i&&Object(H.createElement)(i,null)),l&&!u&&Object(H.createElement)(ir.Spinner,null),u&&Object(H.createElement)(rs,null,c&&Object(H.createElement)(c,null))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.submitted||e.isSaving||!e.isPublished&&!e.isScheduled?null:{submitted:!0,loading:!1}}}]),t}(H.Component),is=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType,o=t.isCurrentPostPublished,i=t.isCurrentPostScheduled,c=t.isSavingPost,a=t.isEditedPostDirty;return{postType:r(),hasPublishAction:Object(u.get)(n(),["_links","wp:action-publish"],!1),isPublished:o(),isScheduled:i(),isSaving:c(),isDirty:a()}})])(os);var cs=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostSaveable,o=t.isEditedPostPublishable,i=t.isCurrentPostPending,c=t.isCurrentPostPublished,a=t.isEditedPostBeingScheduled,s=t.isCurrentPostScheduled,l=t.getCurrentPost,d=t.getCurrentPostType;return{hasPublishAction:Object(u.get)(l(),["_links","wp:action-publish"],!1),isSaving:n(),isSaveable:r(),isPublishable:o(),isPending:i(),isPublished:c(),isScheduled:s(),isBeingScheduled:a(),postType:d()}})])(function(e){var t=e.hasPublishAction,n=e.isSaving,r=e.isPublishable,o=e.isSaveable,i=e.isPublished,c=e.isBeingScheduled,a=e.isPending,l=e.isScheduled,u=e.onToggle,d=e.isOpen,p=e.forceIsDirty,f=e.forceIsSaving,b=!n&&!f&&r&&o||i;return i||l&&c||a&&!t?Object(H.createElement)(Fa,{forceIsDirty:p,forceIsSaving:f}):Object(H.createElement)(ir.Button,{className:"editor-post-publish-panel__toggle",isPrimary:!0,onClick:u,"aria-expanded":d,disabled:!b,isBusy:n&&i},c?Object(_.__)("Schedule…"):Object(_.__)("Publish…"),Object(H.createElement)(s.DotTip,{id:"core/editor.publish"},Object(_.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))});var as=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick;return n||r?Object(H.createElement)(ir.Button,{className:"editor-post-switch-to-draft",isLarge:!0,onClick:function(){var e;n?e=Object(_.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(_.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t},Object(_.__)("Switch to Draft")):null}),ss=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){t.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var e=this.props,t=e.isNew,n=e.isScheduled,r=e.isPublished,o=e.isDirty,i=e.isSaving,c=e.isSaveable,a=e.onSave,s=e.isAutosaving,l=this.state.forceSavedMessage;if(i){var u=br()("editor-post-saved-state","is-saving",{"is-autosaving":s});return Object(H.createElement)("span",{className:u},Object(H.createElement)(ir.Dashicon,{icon:"cloud"}),s?Object(_.__)("Autosaving"):Object(_.__)("Saving"))}return r||n?Object(H.createElement)(as,null):c?l||!t&&!o?Object(H.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(H.createElement)(ir.Dashicon,{icon:"saved"}),Object(_.__)("Saved")):Object(H.createElement)(ir.IconButton,{className:"editor-post-save-draft",onClick:a,icon:"cloud-upload",shortcut:vo.displayShortcut.primary("s")},Object(_.__)("Save Draft")):null}}]),t}(H.Component),ls=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.forceIsDirty,r=t.forceIsSaving,o=e("core/editor"),i=o.isEditedPostNew,c=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,s=o.isEditedPostDirty,l=o.isSavingPost,u=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost;return{post:d(),isNew:i(),isPublished:c(),isScheduled:a(),isDirty:n||s(),isSaving:r||l(),isSaveable:u(),isAutosaving:p()}}),Object(d.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),hr.withSafeTimeout])(ss);var us=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(u.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var ds=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(u.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}})])(function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null});var ps=Object(hr.compose)([Object(d.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(d.withDispatch)(function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}})])(function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(H.createElement)(ds,null,Object(H.createElement)(ir.CheckboxControl,{label:Object(_.__)("Stick to the Front Page"),checked:r,onChange:function(){return t(!r)}}))}),fs={per_page:-1,orderby:"count",order:"desc",_fields:"id,name,parent"},bs=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(yr.a)(Object(yr.a)(e))),e.onChange=e.onChange.bind(Object(yr.a)(Object(yr.a)(e))),e.onChangeFormName=e.onChangeFormName.bind(Object(yr.a)(Object(yr.a)(e))),e.onChangeFormParent=e.onChangeFormParent.bind(Object(yr.a)(Object(yr.a)(e))),e.onAddTerm=e.onAddTerm.bind(Object(yr.a)(Object(yr.a)(e))),e.onToggleForm=e.onToggleForm.bind(Object(yr.a)(Object(yr.a)(e))),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy,c=parseInt(e.target.value,10);n(-1!==o.indexOf(c)?Object(u.without)(o,c):Object(h.a)(o).concat([c]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState(function(e){return{showForm:!e.showForm}})}},{key:"findTerm",value:function(e,t,n){return Object(u.find)(e,function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,c=n.slug,a=this.state,s=a.formName,l=a.formParent,d=a.adding,p=a.availableTerms;if(""!==s&&!d){var b=this.findTerm(p,l,s);if(b)return Object(u.some)(i,function(e){return e===b.id})||r(Object(h.a)(i).concat([b.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=$n()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:s,parent:l||void 0}}),this.addRequest.catch(function(e){return"term_exists"===e.code?(t.addRequest=$n()({path:Object(Jn.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(f.a)({},fs,{parent:l||0,search:s}))}),t.addRequest.then(function(e){return t.findTerm(e,l,s)})):Promise.reject(e)}).then(function(e){var n=!!Object(u.find)(t.state.availableTerms,function(t){return t.id===e.id})?t.state.availableTerms:[e].concat(Object(h.a)(t.state.availableTerms)),a=Object(_.sprintf)(Object(_._x)("%s added","term"),Object(u.get)(t.props.taxonomy,["data","labels","singular_name"],"category"===c?Object(_.__)("Category"):Object(_.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:la(n)}),r(Object(h.a)(i).concat([e.id]),o.rest_base)},function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))})}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(u.invoke)(this.fetchRequest,["abort"]),Object(u.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=$n()({path:Object(Jn.addQueryArgs)("/wp/v2/".concat(t.rest_base),fs)}),this.fetchRequest.then(function(t){var n=la(t);e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})},function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))}))}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map(function(e){var n="editor-post-taxonomies-hierarchical-term-".concat(e.id);return Object(H.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(H.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(e.id),value:e.id,onChange:t.onChange}),Object(H.createElement)("label",{htmlFor:n},Object(u.unescape)(e.name)),!!e.children.length&&Object(H.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.formName,l=i.formParent,d=i.loading,p=i.showForm,f=function(e,r,o){return Object(u.get)(n,["data","labels",e],"category"===t?r:o)},b=f("add_new_item",Object(_.__)("Add new category"),Object(_.__)("Add new term")),m=f("new_item_name",Object(_.__)("Add new category"),Object(_.__)("Add new term")),v=f("parent_item",Object(_.__)("Parent Category"),Object(_.__)("Parent Term")),O="— ".concat(v," —"),g=b,j="editor-post-taxonomies__hierarchical-terms-input-".concat(r);return Object(h.a)(this.renderTerms(c)).concat([!d&&o&&Object(H.createElement)(ir.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},b),p&&Object(H.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(H.createElement)("label",{htmlFor:j,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(H.createElement)("input",{type:"text",id:j,className:"editor-post-taxonomies__hierarchical-terms-input",value:s,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(H.createElement)(ir.TreeSelect,{label:v,noOptionLabel:O,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(H.createElement)(ir.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},g))])}}]),t}(H.Component),hs=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(u.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(u.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(d.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(m.a)({},n,t))}}}),ir.withSpokenMessages,hr.withInstanceId,Object(ir.withFilters)("editor.PostTaxonomyType")])(bs);var ms=Object(hr.compose)([Object(d.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?u.identity:r,i=Object(u.filter)(n,function(e){return Object(u.includes)(e.types,t)});return Object(u.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?hs:Ya;return Object(H.createElement)(H.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(H.createElement)(t,{slug:e.slug}),e))})});var vs=Object(hr.compose)([Object(d.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies()}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(u.some)(n,function(e){return Object(u.includes)(e.types,t)})?r:null}),Os=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(yr.a)(Object(yr.a)(e))),e.stopEditing=e.stopEditing.bind(Object(yr.a)(Object(yr.a)(e))),e.state={},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props,n=t.placeholder,r=t.instanceId,o=Object(Si.decodeEntities)(n);return Object(H.createElement)(H.Fragment,null,Object(H.createElement)("label",{htmlFor:"post-content-".concat(r),className:"screen-reader-text"},o||Object(_.__)("Write your story")),Object(H.createElement)(Fo.a,{autoComplete:"off",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(r),placeholder:o||Object(_.__)("Write your story")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(H.Component),gs=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostContent,r=(0,t.getEditorSettings)().bodyPlaceholder;return{value:n(),placeholder:r}}),Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.resetBlocks,o=t.checkTemplateValidity;return{onChange:function(e){n({content:e})},onPersist:function(e){r(Object(a.parse)(e)),o()}}}),hr.withInstanceId])(Os),js=function(e){function t(e){var n,r=e.permalinkParts;return Object(mr.a)(this,t),(n=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={editedPostName:r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(yr.a)(Object(yr.a)(n))),n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"onSavePermalink",value:function(e){var t=this.state.editedPostName.replace(/\s+/g,"-");e.preventDefault(),this.props.onSave(),t!==this.props.postName&&(this.props.editPost({slug:t}),this.setState({editedPostName:t}))}},{key:"render",value:function(){var e=this,t=this.props.permalinkParts,n=t.prefix,r=t.suffix,o=this.state.editedPostName;return Object(H.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(H.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(H.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(H.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(_.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(H.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(H.createElement)(ir.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(_.__)("OK")))}}]),t}(H.Component),ys=Object(hr.compose)([Object(d.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(d.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(js),ks=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(yr.a)(Object(yr.a)(e))),e.onVisibilityChange=e.onVisibilityChange.bind(Object(yr.a)(Object(yr.a)(e))),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var e=this.props,t=e.isEditable,n=e.refreshPost;t||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(e,t){t.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isNew,r=t.postLink,o=t.isEditable,i=t.samplePermalink,c=t.isPublished,a=this.state,s=a.isCopied,l=a.isEditingPermalink,u=s?Object(_.__)("Permalink copied"):Object(_.__)("Copy the permalink");return n||!r?null:Object(H.createElement)("div",{className:"editor-post-permalink"},Object(H.createElement)(ir.ClipboardButton,{className:br()("editor-post-permalink__copy",{"is-copied":s}),text:i,label:u,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":s,icon:"admin-links"}),Object(H.createElement)("span",{className:"editor-post-permalink__label"},Object(_.__)("Permalink:")),!l&&Object(H.createElement)(ir.ExternalLink,{className:"editor-post-permalink__link",href:c?i:r,target:"_blank",ref:function(t){return e.linkElement=t}},decodeURI(i),"‎"),l&&Object(H.createElement)(ys,{onSave:function(){return e.setState({isEditingPermalink:!1})}}),o&&!l&&Object(H.createElement)(ir.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(_.__)("Edit")),!o&&Object(H.createElement)(ir.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Ji("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(_.__)("Change Permalinks")))}}]),t}(H.Component),_s=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.isPermalinkEditable,o=t.getCurrentPost,i=t.getPermalink,c=t.isCurrentPostPublished,a=o().link;return{isNew:n(),postLink:a,isEditable:r(),samplePermalink:i(),isPublished:c()}}),Object(d.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(ks),Ss=/[\r\n]+/g,Es=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(yr.a)(Object(yr.a)(e))),e.onSelect=e.onSelect.bind(Object(yr.a)(Object(yr.a)(e))),e.onUnselect=e.onUnselect.bind(Object(yr.a)(Object(yr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.redirectHistory=e.redirectHistory.bind(Object(yr.a)(Object(yr.a)(e))),e.state={isSelected:!1},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace(Ss," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===vo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.isPostTypeViewable,i=e.instanceId,c=e.placeholder,a=e.title,s=this.state.isSelected,l=br()("editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),u=Object(Si.decodeEntities)(c);return Object(H.createElement)(ca,{supportKeys:"title"},Object(H.createElement)("div",{className:"editor-post-title"},Object(H.createElement)("div",{className:l},Object(H.createElement)(ir.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(H.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},u||Object(_.__)("Add title")),Object(H.createElement)(Fo.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:u||Object(_.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),s&&o&&Object(H.createElement)(_s,null))))}}]),t}(H.Component),Cs=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=t.isCleanNewPost,i=(0,e("core").getPostType)(n("type")),c=r(),a=c.titlePlaceholder,s=c.focusMode,l=c.hasFixedToolbar;return{isCleanNewPost:o(),title:n("title"),isPostTypeViewable:Object(u.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:l}}),ws=Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.insertDefaultBlock,r=t.editPost,o=t.clearSelectedBlock;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){r({title:e})},onUndo:t.undo,onRedo:t.redo,clearSelectedBlock:o}}),Ts=Object(hr.compose)(Cs,ws,hr.withInstanceId,ir.withFocusOutside)(Es);var Is=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(d.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(b.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(H.createElement)(ir.Button,{isLink:!0,className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)}},Object(_.__)("Move to trash"),Object(H.createElement)(ir.Dashicon,{icon:"trash"}))});var Ps=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId;return{isNew:n(),postId:r()}})(function(e){var t=e.isNew,n=e.postId,r=e.children;return t||!n?null:r});var Bs=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(u.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),As=n(188);var Ls=Object(d.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content;return Object(H.createElement)("span",{className:"word-count"},Object(As.count)(t,"words"))});var xs=Object(d.withSelect)(function(e){var t=e("core/editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}})(function(e){var t=e.headingCount,n=e.paragraphCount,r=e.numberOfBlocks;return Object(H.createElement)(H.Fragment,null,Object(H.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(_.__)("Document Statistics"),tabIndex:"0"},Object(H.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Words"),Object(H.createElement)(Ls,null)),Object(H.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Headings"),Object(H.createElement)("span",{className:"table-of-contents__number"},t)),Object(H.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Paragraphs"),Object(H.createElement)("span",{className:"table-of-contents__number"},n)),Object(H.createElement)("div",{className:"table-of-contents__count"},Object(_.__)("Blocks"),Object(H.createElement)("span",{className:"table-of-contents__number"},r))),t>0&&Object(H.createElement)(H.Fragment,null,Object(H.createElement)("hr",null),Object(H.createElement)("span",{className:"table-of-contents__title"},Object(_.__)("Document Outline")),Object(H.createElement)($c,null)))});var Ns=Object(d.withSelect)(function(e){return{hasBlocks:!!e("core/editor").getBlockCount()}})(function(e){var t=e.hasBlocks;return Object(H.createElement)(ir.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(H.createElement)(ir.IconButton,{onClick:r,icon:"info-outline","aria-expanded":n,label:Object(_.__)("Content structure"),disabled:!t})},renderContent:function(){return Object(H.createElement)(xs,null)}})}),Rs=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){var t=this.props,n=t.isDirty,r=t.forceIsDirty;if(n||(void 0===r?function(){return!1}:r)())return e.returnValue=Object(_.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(H.Component),Ds=Object(d.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(Rs);function Ms(e){return document.querySelector('[data-block="'+e+'"]')}var Fs=Object(d.withSelect)(function(e){return{selectedBlockClientId:e("core/editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(H.createElement)(ir.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block",onClick:function(){(function(e){return Ms(e).closest(".editor-block-list__block")})(t).focus()}},Object(_.__)("Skip to the selected block"))}),Us=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlock,r=t.getSelectedBlockCount,o=n();return{selectedBlock:o,blockType:o&&Object(a.getBlockType)(o.name),count:r()}})(function(e){var t=e.selectedBlock,n=e.blockType;return e.count>1?Object(H.createElement)("span",{className:"editor-block-inspector__multi-blocks"},Object(_.__)("Coming Soon")):t?[Object(H.createElement)("div",{className:"editor-block-inspector__card",key:"card"},Object(H.createElement)(Ir,{icon:n.icon,showColors:!0}),Object(H.createElement)("div",{className:"editor-block-inspector__card-content"},Object(H.createElement)("div",{className:"editor-block-inspector__card-title"},n.title),Object(H.createElement)("div",{className:"editor-block-inspector__card-description"},n.description))),Object(H.createElement)("div",{key:"inspector-controls"},Object(H.createElement)(Fi.Slot,null)),Object(H.createElement)("div",{key:"inspector-advanced-controls"},Object(H.createElement)(xi.Slot,null,function(e){return!Object(u.isEmpty)(e)&&Object(H.createElement)(ir.PanelBody,{className:"editor-block-inspector__advanced",title:Object(_.__)("Advanced"),initialOpen:!1},e)})),Object(H.createElement)(Fs,{key:"back"})]:Object(H.createElement)("span",{className:"editor-block-inspector__no-blocks"},Object(_.__)("No block selected."))}),Hs=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(yr.a)(Object(yr.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,i=n||r;e.target===this.container&&i&&o()}},{key:"render",value:function(){return Object(H.createElement)("div",Object(pr.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(u.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(H.Component),Vs=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}}),Object(d.withDispatch)(function(e){return{clearSelectedBlock:e("core/editor").clearSelectedBlock}})])(Hs);var Ks=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,i=r.getBlockMode,c=o(n);return{mode:i(n),blockType:c?Object(a.getBlockType)(c.name):null}}),Object(d.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?u.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/editor").toggleBlockMode(o),r()}}})])(function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,i=void 0!==o&&o;if(!Object(a.hasBlockSupport)(t,"html",!0))return null;var c="visual"===n?Object(_.__)("Edit as HTML"):Object(_.__)("Edit visually");return Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"html",label:i?c:void 0},!i&&c)});var zs=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlock,i=r.getReusableBlock,c=e("core/blocks").getFallbackBlockName,s=Object(u.map)(n,function(e){return o(e)}),l=Object(u.every)(s,function(e){return!!e})&&(1!==s.length||s[0].name!==c());return{isStaticBlock:l&&(1!==s.length||!Object(a.isReusableBlock)(s[0])||!i(s[0].attributes.ref)),isVisible:l}}),Object(d.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?u.noop:r,i=e("core/editor"),c=i.convertBlockToReusable,a=i.convertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),o())},onConvertToReusable:function(){c(n),o()}}})])(function(e){var t=e.isVisible,n=e.isStaticBlock,r=e.onConvertToStatic,o=e.onConvertToReusable;return t?Object(H.createElement)(H.Fragment,null,n&&Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(_.__)("Add to Reusable Blocks")),!n&&Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(_.__)("Convert to Regular Block"))):null});var Ws=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,i=r.getReusableBlock,c=o(n);return{reusableBlock:c&&Object(a.isReusableBlock)(c)?i(c.attributes.ref):null}}),Object(d.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?u.noop:n,o=e("core/editor").deleteReusableBlock;return{onDelete:function(e){window.confirm(Object(_.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))&&(o(e),r())}}})])(function(e){var t=e.reusableBlock,n=e.onDelete;return t?Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",icon:"no",disabled:t.isTemporary,onClick:function(){return n(t.id)}},Object(_.__)("Remove from Reusable Blocks")):null});function qs(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(_.__)("Convert to Blocks");return Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",onClick:n,icon:"screenoptions",label:r?o:void 0},!r&&o)}var Gs=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,i=r.canUserUseUnfilteredHTML,c=o(n);return{block:c,canUserUseUnfilteredHTML:i(),shouldRender:c&&"core/html"===c.name}}),Object(d.withDispatch)(function(e,t){var n=t.block,r=t.canUserUseUnfilteredHTML;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(a.rawHandler)({HTML:Object(a.getBlockContent)(n),mode:"BLOCKS",canUserUseUnfilteredHTML:r}))}}}))(qs),$s=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.canUserUseUnfilteredHTML,i=(0,r.getBlock)(n);return{block:i,canUserUseUnfilteredHTML:o(),shouldRender:i&&i.name===Object(a.getUnknownTypeHandlerName)()}}),Object(d.withDispatch)(function(e,t){var n=t.block,r=t.canUserUseUnfilteredHTML;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(a.rawHandler)({HTML:Object(a.serialize)(n),mode:"BLOCKS",canUserUseUnfilteredHTML:r}))}}}))(qs),Ys=Object(ir.createSlotFill)("_BlockSettingsMenuFirstItem"),Qs=Ys.Fill,Xs=Ys.Slot;Qs.Slot=Xs;var Zs=Qs,Js=Object(ir.createSlotFill)("_BlockSettingsMenuPluginsExtension"),el=Js.Fill,tl=Js.Slot;el.Slot=tl;var nl=el;var rl=Object(d.withDispatch)(function(e){var t=e("core/editor").selectBlock;return{onSelect:function(e){t(e)}}})(function(e){var t=e.clientIds,n=e.onSelect,r=Object(u.castArray)(t),o=r.length,i=r[0];return Object(H.createElement)(Qc,{clientIds:t},function(e){var r=e.onDuplicate,c=e.onRemove,a=e.onInsertAfter,s=e.onInsertBefore,l=e.canDuplicate,u=e.isLocked;return Object(H.createElement)(ir.Dropdown,{contentClassName:"editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,c=br()("editor-block-settings-menu__toggle",{"is-opened":r}),a=r?Object(_.__)("Hide options"):Object(_.__)("More options");return Object(H.createElement)(ir.Toolbar,{controls:[{icon:"ellipsis",title:a,onClick:function(){1===o&&n(i),t()},className:c,extraProps:{"aria-expanded":r}}]})},renderContent:function(e){var n=e.onClose;return Object(H.createElement)(ir.NavigableMenu,{className:"editor-block-settings-menu__content"},Object(H.createElement)(Zs.Slot,{fillProps:{onClose:n}}),1===o&&Object(H.createElement)($s,{clientId:i}),1===o&&Object(H.createElement)(Gs,{clientId:i}),!u&&l&&Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"admin-page",shortcut:Zc.duplicate.display},Object(_.__)("Duplicate")),!u&&Object(H.createElement)(H.Fragment,null,Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",onClick:s,icon:"insert-before",shortcut:Zc.insertBefore.display},Object(_.__)("Insert Before")),Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:Zc.insertAfter.display},Object(_.__)("Insert After"))),1===o&&Object(H.createElement)(Ks,{clientId:i,onToggle:n}),Object(H.createElement)(zs,{clientIds:t,onToggle:n}),Object(H.createElement)(nl.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(H.createElement)("div",{className:"editor-block-settings-menu__separator"}),1===o&&Object(H.createElement)(Ws,{clientId:i,onToggle:n}),!u&&Object(H.createElement)(ir.MenuItem,{className:"editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:Zc.removeBlock.display},Object(_.__)("Remove Block")))}})})}),ol=n(151),il=n.n(ol);function cl(e,t,n){var r=new il.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}var al=Object(hr.compose)([Object(d.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor").getBlock(n);return{name:r.name,attributes:r.attributes,className:r.attributes.className||"",styles:Object(u.get)(Object(a.getBlockType)(r.name),["styles"])}}),Object(d.withDispatch)(function(e,t){var n=t.clientId;return{onChangeClassName:function(t){e("core/editor").updateBlockAttributes(n,{className:t})}}})])(function(e){var t=e.styles,n=e.className,r=e.onChangeClassName,o=e.name,i=e.attributes,c=e.onSwitch,a=e.onHoverClassName;if(!t)return null;var s=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,c=new il.a(t).values()[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;if(-1!==a.indexOf("is-style-")){var s=a.substring(9),l=Object(u.find)(e,{name:s});if(l)return l}}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}return Object(u.find)(e,"isDefault")}(t,n);return Object(H.createElement)("div",{className:"editor-block-styles"},t.map(function(e){var t=cl(n,s,e);return Object(H.createElement)("div",{key:e.name,className:br()("editor-block-styles__item",{"is-active":s===e}),onClick:function(){return function(e){var t=cl(n,s,e);r(t),c()}(e)},onMouseEnter:function(){return a(t)},onMouseLeave:function(){return a(null)},role:"button",tabIndex:"0","aria-label":Object(_.sprintf)(Object(_.__)('Apply style variation "%s"'),e.label||e.name)},Object(H.createElement)("div",{className:"editor-block-styles__item-preview"},Object(H.createElement)(Jo,{name:o,attributes:Object(f.a)({},i,{className:t})})),Object(H.createElement)("div",{className:"editor-block-styles__item-label"},e.label||e.name))}))}),sl=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,i=this.state.hoveredClassName;if(!n||!n.length)return null;var c=Object(u.mapKeys)(o,function(e){return e.name}),s=Object(u.orderBy)(Object(u.filter)(Object(a.getPossibleBlockTransformations)(n),function(e){return!!c[e.name]}),function(e){return c[e.name].frecency},"desc"),l=n[0].name,d=Object(a.getBlockType)(l),p=1===n.length&&0!==Object(u.get)(d,["styles"],[]).length;return p||s.length?Object(H.createElement)(ir.Dropdown,{position:"bottom right",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,o=1===n.length?Object(_.__)("Change block type"):Object(_.sprintf)(Object(_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(H.createElement)(ir.Toolbar,null,Object(H.createElement)(ir.IconButton,{className:"editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":r,label:o,tooltip:o,onKeyDown:function(e){r||e.keyCode!==vo.DOWN||(e.preventDefault(),e.stopPropagation(),t())}},Object(H.createElement)(Ir,{icon:d.icon&&d.icon.src,showColors:!0}),Object(H.createElement)(ir.AccessibleSVG,{className:"editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(H.createElement)("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 o=t.onClose;return Object(H.createElement)(H.Fragment,null,p&&Object(H.createElement)(ir.PanelBody,{title:Object(_.__)("Block Styles"),initialOpen:!0},Object(H.createElement)(al,{clientId:n[0].clientId,onSwitch:o,onHoverClassName:e.onHoverClassName})),0!==s.length&&Object(H.createElement)(ir.PanelBody,{title:Object(_.__)("Transform To:"),initialOpen:!0},Object(H.createElement)(ti,{items:s.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(a.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){r(n,e.id),o()}})),null!==i&&Object(H.createElement)(ei,{name:n[0].name,attributes:Object(f.a)({},n[0].attributes,{className:i})}))}}):null}}]),t}(H.Component),ll=Object(hr.compose)(Object(d.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlocksByClientId,i=r.getBlockRootClientId,c=r.getInserterItems,a=i(Object(u.first)(Object(u.castArray)(n)));return{blocks:o(n),inserterItems:c(a)}}),Object(d.withDispatch)(function(e,t){return{onTransform:function(n,r){e("core/editor").replaceBlocks(t.clientIds,Object(a.switchToBlockType)(n,r))}}}))(sl);var ul=Object(d.withSelect)(function(e){var t=e("core/editor").getMultiSelectedBlockClientIds();return{isMultiBlockSelection:t.length>1,selectedBlockClientIds:t}})(function(e){var t=e.isMultiBlockSelection,n=e.selectedBlockClientIds;return t?Object(H.createElement)(ll,{key:"switcher",clientIds:n}):null}),dl=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).container=Object(H.createRef)(),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.props.blockClientIds.length>1&&this.focusContainer()}},{key:"componentDidUpdate",value:function(e){e.blockClientIds.length<=1&&this.props.blockClientIds.length>1&&this.focusContainer()}},{key:"focusContainer",value:function(){var e=mo.focus.tabbable.find(this.container.current);e.length&&e[0].focus()}},{key:"render",value:function(){var e=this.props,t=e.blockClientIds,n=e.isValid,r=e.mode;return 0===t.length?null:t.length>1?Object(H.createElement)("div",{className:"editor-block-toolbar",ref:this.container},Object(H.createElement)(ul,null),Object(H.createElement)(rl,{clientIds:t})):Object(H.createElement)("div",{className:"editor-block-toolbar"},"visual"===r&&n&&Object(H.createElement)(H.Fragment,null,Object(H.createElement)(ll,{clientIds:t}),Object(H.createElement)(Wr.Slot,null),Object(H.createElement)(Zr.Slot,null)),Object(H.createElement)(rl,{clientIds:t}))}}]),t}(H.Component),pl=Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlock,r=t.getBlockMode,o=t.getMultiSelectedBlockClientIds,i=n();return{blockClientIds:i?[i.clientId]:o(),isValid:i?i.isValid:null,mode:i?r(i.clientId):null}})(dl),fl=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onCopy=e.onCopy.bind(Object(yr.a)(Object(yr.a)(e))),e.onCut=e.onCut.bind(Object(yr.a)(Object(yr.a)(e))),e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.onCopy),document.addEventListener("cut",this.onCut)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.onCopy),document.removeEventListener("cut",this.onCut)}},{key:"onCopy",value:function(e){var t=this.props,n=t.multiSelectedBlocks,r=t.selectedBlock;if((n.length||r)&&(!r||!Object(mo.documentHasSelection)())){var o=Object(a.serialize)(r||n);e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",o),e.preventDefault()}}},{key:"onCut",value:function(e){var t=this.props.multiSelectedBlockClientIds;this.onCopy(e),t.length&&this.props.onRemove(t)}},{key:"render",value:function(){return null}}]),t}(H.Component),bl=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getMultiSelectedBlocks,r=t.getMultiSelectedBlockClientIds,o=t.getSelectedBlock;return{multiSelectedBlocks:n(),multiSelectedBlockClientIds:r(),selectedBlock:o()}}),Object(d.withDispatch)(function(e){return{onRemove:e("core/editor").removeBlocks}})])(fl),hl=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(yr.a)(Object(yr.a)(e))),e.getContent=e.getContent.bind(Object(yr.a)(Object(yr.a)(e))),e.state={error:null},e}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return wn(this.context.store.getState())}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(H.createElement)(To,{className:"editor-error-boundary",actions:[Object(H.createElement)(ir.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(_.__)("Attempt Recovery")),Object(H.createElement)(ir.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(_.__)("Copy Post Text")),Object(H.createElement)(ir.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(_.__)("Copy Error"))]},Object(_.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(H.Component);hl.contextTypes={store:u.noop};var ml=hl,vl=function(e){function t(){return Object(mr.a)(this,t),Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=Ms(e);if(t){var n=Object(mo.getScrollContainer)(t);n&&Zo()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(H.Component),Ol=Object(d.withSelect)(function(e){return{extentClientId:(0,e("core/editor").getLastMultiSelectedBlockClientId)()}})(vl),gl=[vo.UP,vo.RIGHT,vo.DOWN,vo.LEFT,vo.ENTER,vo.BACKSPACE];var jl=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(yr.a)(Object(yr.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(yr.a)(Object(yr.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(yr.a)(Object(yr.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(yr.a)(Object(yr.a)(e))),e.lastMouseMove=null,e}return Object(jr.a)(t,e),Object(vr.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 r=this.lastMouseMove,o=r.clientX,i=r.clientY;o===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:"startTypingInTextField",value:function(e){var t=this.props,n=t.isTyping,r=t.onStartTyping,o=e.type,i=e.target;n||!Object(mo.isTextField)(i)||i.closest(".editor-block-toolbar")||("keydown"!==o||function(e){var t=e.keyCode;return!e.shiftKey&&Object(u.includes)(gl,t)}(e))&&r()}},{key:"stopTypingOnNonTextField",value:function(e){var t=this;e.persist(),this.props.setTimeout(function(){var n=t.props,r=n.isTyping,o=n.onStopTyping,i=e.target;r&&!Object(mo.isTextField)(i)&&o()})}},{key:"render",value:function(){var e=this.props.children;return Object(H.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.startTypingInTextField},e)}}]),t}(H.Component),yl=Object(hr.compose)([Object(d.withSelect)(function(e){return{isTyping:(0,e("core/editor").isTyping)()}}),Object(d.withDispatch)(function(e){var t=e("core/editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),hr.withSafeTimeout])(jl),kl=function(e){function t(){return Object(mr.a)(this,t),Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props,n=t.blockOrder,r=t.selectionStart;return n!==e.blockOrder&&r?this.getOffset(r):null}},{key:"componentDidUpdate",value:function(e,t,n){n&&this.restorePreviousOffset(n)}},{key:"getOffset",value:function(e){var t=Ms(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=Ms(this.props.selectionStart);if(t){var n=Object(mo.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(H.Component),_l=Object(d.withSelect)(function(e){return{blockOrder:e("core/editor").getBlockOrder(),selectionStart:e("core/editor").getBlockSelectionStart()}})(kl),Sl=window.getSelection,El=Object(u.overEvery)([mo.isTextField,mo.focus.tabbable.isTabbableIndex]),Cl=function(e){function t(){var e;return Object(mr.a)(this,t),(e=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(yr.a)(Object(yr.a)(e))),e.bindContainer=e.bindContainer.bind(Object(yr.a)(Object(yr.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(yr.a)(Object(yr.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(yr.a)(Object(yr.a)(e))),e.verticalRect=null,e}return Object(jr.a)(t,e),Object(vr.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=mo.focus.focusable.find(this.container);return t&&(n=Object(u.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(u.find)(n,function t(n,r,o){if(!mo.focus.tabbable.isTabbableIndex(n))return!1;if(Object(mo.isTextField)(n))return!0;if(!function(e){return e.classList.contains("editor-block-list__block")}(n))return!1;if(function(e){return!!e.querySelector(".editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var i,c=1;(i=o[r+c])&&n.contains(i);c++)if(t(i,r+c,o))return!1;return!0})}},{key:"expandSelection",value:function(e){var t=this.props,n=t.selectedBlockClientId,r=t.selectionStartClientId,o=t.selectionBeforeEndClientId,i=t.selectionAfterEndClientId,c=e?o:i;c&&this.props.onMultiSelect(r||n,c)}},{key:"moveSelection",value:function(e){var t=this.props,n=t.selectedFirstClientId,r=t.selectedLastClientId,o=e?n:r;o&&this.props.onSelectBlock(o)}},{key:"isTabbableEdge",value:function(e,t){var n=this.getClosestTabbable(e,t);return!n||!function(e,t){return e.closest("[data-block]")===t.closest("[data-block]")}(e,n)}},{key:"onKeyDown",value:function(e){var t=this.props,n=t.hasMultiSelection,r=t.onMultiSelect,o=t.blocks,i=e.keyCode,c=e.target,a=i===vo.UP,s=i===vo.DOWN,l=i===vo.LEFT,d=i===vo.RIGHT,p=a||l,f=l||d,b=a||s,h=f||b,m=e.shiftKey,v=b?mo.isVerticalEdge:mo.isHorizontalEdge;if(!h)return vo.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(mo.isEntirelySelected)(c)),void(vo.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?this.isEntirelySelected:Object(mo.isEntirelySelected)(c))&&(r(Object(u.first)(o),Object(u.last)(o)),e.preventDefault()),this.isEntirelySelected=Object(mo.isEntirelySelected)(c)));if(!e.nativeEvent.defaultPrevented)if(b?this.verticalRect||(this.verticalRect=Object(mo.computeCaretRect)(c)):this.verticalRect=null,m&&(n||this.isTabbableEdge(c,p)&&v(c,p)))this.expandSelection(p),e.preventDefault();else if(n)this.moveSelection(p),e.preventDefault();else if(b&&Object(mo.isVerticalEdge)(c,p)){var O=this.getClosestTabbable(c,p);O&&(Object(mo.placeCaretAtVerticalEdge)(O,p,this.verticalRect),e.preventDefault())}else if(f&&Sl().isCollapsed&&Object(mo.isHorizontalEdge)(c,p)){var g=this.getClosestTabbable(c,p);Object(mo.placeCaretAtHorizontalEdge)(g,p),e.preventDefault()}}},{key:"focusLastTextField",value:function(){var e=mo.focus.focusable.find(this.container),t=Object(u.findLast)(e,El);t&&Object(mo.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(H.createElement)("div",{className:"editor-writing-flow"},Object(H.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(H.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"editor-writing-flow__click-redirect"}))}}]),t}(H.Component),wl=Object(hr.compose)([Object(d.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,i=t.getPreviousBlockClientId,c=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,s=t.getLastMultiSelectedBlockClientId,l=t.hasMultiSelection,u=t.getBlockOrder,d=n(),p=r(),f=o();return{selectedBlockClientId:d,selectionStartClientId:p,selectionBeforeEndClientId:i(f||d),selectionAfterEndClientId:c(f||d),selectedFirstClientId:a(),selectedLastClientId:s(),hasMultiSelection:l(),blocks:u()}}),Object(d.withDispatch)(function(e){var t=e("core/editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(Cl),Tl=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Il=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new c(e),f(),t}}function c(e){this.start=e,this.end={line:n,column:r},this.source=t.source}c.prototype.content=e;var a=[];function s(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,n=[];for(f(),b(n);e.length&&"}"!==e.charAt(0)&&(t=E()||C());)!1!==t&&(n.push(t),b(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){p(/^\s*/)}function b(e){var t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");var c=e.slice(2,n-2);return r+=2,o(c),e=e.slice(n),r+=2,t({type:"comment",comment:c})}}function m(){var e=p(/^([^{]+)/);if(e)return Pl(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function O(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Pl(t[0]),!p(/^:\s*/))return s("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Tl,""),value:n?Pl(n[0]).replace(Tl,""):""});return p(/^[;\s]*/),r}}function g(){var e,t=[];if(!l())return s("missing '{'");for(b(t);e=O();)!1!==e&&(t.push(e),b(t));return u()?t:s("missing '}'")}function j(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var y=S("import"),k=S("charset"),_=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function E(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return s("@keyframes missing name");var r,o=t[1];if(!l())return s("@keyframes missing '{'");for(var c=b();r=j();)c.push(r),c=c.concat(b());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:c}):s("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=Pl(t[1]);if(!l())return s("@media missing '{'");var r=b().concat(d());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Pl(t[1]),media:Pl(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=Pl(t[1]);if(!l())return s("@supports missing '{'");var r=b().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}}()||y()||k()||_()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Pl(t[1]),r=Pl(t[2]);if(!l())return s("@document missing '{'");var o=b().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=m()||[];if(!l())return s("@page missing '{'");for(var n,r=b();n=O();)r.push(n),r=r.concat(b());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!l())return s("@host missing '{'");var t=b().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!l())return s("@font-face missing '{'");for(var t,n=b();t=O();)n.push(t),n=n.concat(b());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}}()}function C(){var e=i(),t=m();return t?(b(),e({type:"rule",selectors:t,declarations:g()})):s("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i in t){var c=t[i];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"===Object(v.a)(c)&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}(function(){var e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())};function Pl(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Bl=n(118),Al=n.n(Bl),Ll=xl;function xl(e){this.options=e||{}}xl.prototype.emit=function(e){return e},xl.prototype.visit=function(e){return this[e.type](e)},xl.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var Nl=Rl;function Rl(e){Ll.call(this,e)}Al()(Rl,Ll),Rl.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Rl.prototype.comment=function(e){return this.emit("",e.position)},Rl.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Rl.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Rl.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Rl.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Rl.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Rl.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Rl.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Rl.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Rl.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Rl.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Rl.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Rl.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Rl.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Rl.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Dl=Ml;function Ml(e){e=e||{},Ll.call(this,e),this.indentation=e.indent}Al()(Ml,Ll),Ml.prototype.compile=function(e){return this.stylesheet(e)},Ml.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Ml.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Ml.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Ml.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ml.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("  {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ml.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Ml.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Ml.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ml.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Ml.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Ml.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Ml.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Ml.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Ml.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Ml.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map(function(e){return t+e}).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Ml.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Ml.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||"  ")};var Fl=function(e,t){return((t=t||{}).compress?new Nl(t):new Dl(t)).compile(e)},Ul=n(187),Hl=n.n(Ul);var Vl=function(e,t){try{var n=Il(e),r=Hl.a.map(n,function(e){if(!e)return e;var n=t(e);return this.update(n)});return Fl(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}},Kl=n(90);function zl(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(!function(e){return/^\/(?!\/)/.test(e)}(e.value)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value))}function Wl(e){return function(t){var n=function(e,t){var n=Object(Kl.parse)(e).pathname;return Object(Kl.resolve)(t,n)}(t.value,e);return Object(f.a)({},t,{newUrl:"url("+t.before+t.quote+n+t.quote+t.after+")"})}}var ql=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};zl(o)&&r.push(o)}return r}(t.value).map(Wl(e));return Object(f.a)({},t,{value:function(e,t){return t.forEach(function(t){e=e.replace(t.source,t.newUrl)}),e}(t.value,n)})}return t}},Gl=/^(body|html).*$/,$l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(f.a)({},n,{selectors:n.selectors.map(function(n){return Object(u.includes)(t,n.trim())?n:n.match(Gl)?n.replace(/^(body|html)/,e):e+" "+n})}):n}},Yl=function(e){if("rule"===e.type&&Object(u.find)(e.selectors,function(e){return".wp-block"===e.trim()})){var t=Object(u.find)(e.declarations,function(e){return"width"===e.property});if(t)return function(e){return{type:"rule",selectors:["body.gutenberg-editor-page .editor-post-title__block","body.gutenberg-editor-page .editor-default-block-appender","body.gutenberg-editor-page .editor-block-list__block"],declarations:[{type:"declaration",property:"max-width",value:e}]}}(t.value)}return e},Ql=function(e){function t(e){var n;return Object(mr.a)(this,t),n=Object(Or.a)(this,Object(gr.a)(t).apply(this,arguments)),e.recovery||(n.props.updateEditorSettings(e.settings),n.props.setupEditor(e.post,e.settings.autosave)),n}return Object(jr.a)(t,e),Object(vr.a)(t,[{key:"componentDidMount",value:function(){this.props.settings.styles&&Object(u.map)(this.props.settings.styles,function(e){var t=e.css,n=e.baseURL,r=[Yl,$l(".editor-block-list__block",[".wp-block"])];n&&r.push(ql(n));var o=Vl(t,Object(hr.compose)(r));if(o){var i=document.createElement("style");i.innerHTML=o,document.body.appendChild(i)}})}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.undo,r=e.redo,o=e.createUndoLevel,i=[[xc,{onUndo:n,onRedo:r,onCreateUndoLevel:o}],[ir.SlotFillProvider],[ir.DropZoneProvider]];return Object(u.flow)(i.map(function(e){var t=Object(p.a)(e,2),n=t[0],r=t[1];return function(e){return Object(H.createElement)(n,r,e)}}))(t)}}]),t}(H.Component),Xl=Object(d.withDispatch)(function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updateEditorSettings;return{setupEditor:n,undo:t.undo,redo:t.redo,createUndoLevel:t.createUndoLevel,updateEditorSettings:r}})(Ql);function Zl(e){var t=Object(a.getBlockSupport)(e,"align");if(Array.isArray(t))return t;var n=[];return!0===t&&(n.push("left","center","right"),Object(a.hasBlockSupport)(e,"alignWide",!0)&&n.push("wide","full")),n}var Jl=Object(hr.createHigherOrderComponent)(function(e){return function(t){var n=Zl(t.name);return[n.length>0&&t.isSelected&&Object(H.createElement)(Wr,{key:"align-controls"},Object(H.createElement)(Ur,{value:t.attributes.align,onChange:function(e){return t.setAttributes({align:e})},controls:n})),Object(H.createElement)(e,Object(pr.a)({key:"edit"},t))]}},"withToolbarControls"),eu=Object(hr.createHigherOrderComponent)(function(e){return function(t){var n=t.block.attributes.align,r=Zl(t.block.name),o=t.wrapperProps;return Object(u.includes)(r,n)&&(o=Object(f.a)({},o,{"data-align":n})),Object(H.createElement)(e,Object(pr.a)({},t,{wrapperProps:o}))}},"withDataAlign");Object(lr.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return"string"===Object(u.get)(e.attributes,["align","type"])?e:(Object(a.hasBlockSupport)(e,"align")&&(e.attributes=Object(u.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(lr.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",eu),Object(lr.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Jl),Object(lr.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var r=n.align;return Object(u.includes)(Zl(t),r)&&(e.className=br()("align".concat(r),e.className)),e});var tu=/[\s#]/g;var nu=Object(hr.createHigherOrderComponent)(function(e){return function(t){return Object(a.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(H.createElement)(H.Fragment,null,Object(H.createElement)(e,t),Object(H.createElement)(xi,null,Object(H.createElement)(ir.TextControl,{label:Object(_.__)("HTML Anchor"),help:Object(_.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(tu,"-"),t.setAttributes({anchor:e})}}))):Object(H.createElement)(e,t)}},"withInspectorControl");Object(lr.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(a.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(u.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(lr.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",nu),Object(lr.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(a.hasBlockSupport)(t,"anchor")&&(e.id=n.anchor),e});var ru=Object(hr.createHigherOrderComponent)(function(e){return function(t){return Object(a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(H.createElement)(H.Fragment,null,Object(H.createElement)(e,t),Object(H.createElement)(xi,null,Object(H.createElement)(ir.TextControl,{label:Object(_.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:e})}}))):Object(H.createElement)(e,t)}},"withInspectorControl");function ou(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(a.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(lr.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(u.assign)(e.attributes,{className:{type:"string"}})),e}),Object(lr.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ru),Object(lr.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=br()(e.className,n.className)),e}),Object(lr.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(a.hasBlockSupport)(t,"customClassName",!0)){var r=Object(u.omit)(e,["className"]),o=ou(Object(a.getSaveContent)(t,r)),i=ou(n),c=Object(u.difference)(i,o);c.length?e.className=c.join(" "):delete e.className}return e});var iu=[xr],cu=Object(u.once)(function(){return Object(d.dispatch)("core/editor").fetchReusableBlocks()});Object(lr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=iu.map(u.clone),t===Object(a.getDefaultBlockName)()&&(e.push(Object(u.clone)(Lr)),cu())),e}),Object(lr.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(u.uniq)([Object(a.getBlockDefaultClassName)(t.name)].concat(Object(h.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(a.getBlockDefaultClassName)(t.name)),e}),Object(lr.addFilter)("blocks.registerBlockType","core/layout/attribute",function(e){return e.attributes=Object(u.assign)(e.attributes,{layout:{type:"string"}}),e}),Object(lr.addFilter)("blocks.getSaveContent.extraProps","core/layout/save-props",function(e,t,n){var r=n.layout;return r&&(e.className=Object(u.compact)([e.className,"layout-"+r]).join(" ")),e}),Object(lr.addFilter)("blocks.switchToBlockType.transformedBlock","core/layout/preserve-layout",function(e,t){var n=Object(u.get)(t,[0,"attributes","layout"]);return e.attributes.layout=n,e}),Object(lr.addFilter)("blocks.isUnmodifiedDefaultBlock.attributes","core/layout/exclude-layout-attribute-check",function(e){return Object(u.without)(e,"layout")}),n.d(t,"Autocomplete",function(){return Tr}),n.d(t,"AlignmentToolbar",function(){return Rr}),n.d(t,"BlockAlignmentToolbar",function(){return Ur}),n.d(t,"BlockControls",function(){return Wr}),n.d(t,"BlockEdit",function(){return Gr}),n.d(t,"BlockFormatControls",function(){return Zr}),n.d(t,"BlockIcon",function(){return Ir}),n.d(t,"ColorPalette",function(){return eo}),n.d(t,"withColorContext",function(){return Jr}),n.d(t,"ContrastChecker",function(){return so}),n.d(t,"InnerBlocks",function(){return Ii}),n.d(t,"InspectorAdvancedControls",function(){return xi}),n.d(t,"InspectorControls",function(){return Fi}),n.d(t,"PanelColor",function(){return Ui}),n.d(t,"PanelColorSettings",function(){return Wi}),n.d(t,"PlainText",function(){return qi}),n.d(t,"RichText",function(){return Pc}),n.d(t,"RichTextProvider",function(){return xc}),n.d(t,"ServerSideRender",function(){return Nc}),n.d(t,"MediaPlaceholder",function(){return Mc}),n.d(t,"MediaUpload",function(){return cr}),n.d(t,"URLInput",function(){return Zi}),n.d(t,"URLInputButton",function(){return Fc}),n.d(t,"AutosaveMonitor",function(){return Hc}),n.d(t,"DocumentOutline",function(){return $c}),n.d(t,"DocumentOutlineCheck",function(){return Yc}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return ea}),n.d(t,"EditorHistoryRedo",function(){return ta}),n.d(t,"EditorHistoryUndo",function(){return na}),n.d(t,"EditorNotices",function(){return oa}),n.d(t,"PageAttributesCheck",function(){return ia}),n.d(t,"PageAttributesOrder",function(){return sa}),n.d(t,"PageAttributesParent",function(){return pa}),n.d(t,"PageTemplate",function(){return fa}),n.d(t,"PostAuthor",function(){return ma}),n.d(t,"PostAuthorCheck",function(){return ba}),n.d(t,"PostComments",function(){return va}),n.d(t,"PostExcerpt",function(){return Oa}),n.d(t,"PostExcerptCheck",function(){return ga}),n.d(t,"PostFeaturedImage",function(){return Ca}),n.d(t,"PostFeaturedImageCheck",function(){return ya}),n.d(t,"PostFormat",function(){return Ia}),n.d(t,"PostFormatCheck",function(){return wa}),n.d(t,"PostLastRevision",function(){return Ba}),n.d(t,"PostLastRevisionCheck",function(){return Pa}),n.d(t,"PostPendingStatus",function(){return La}),n.d(t,"PostPendingStatusCheck",function(){return Aa}),n.d(t,"PostPingbacks",function(){return xa}),n.d(t,"PostPreviewButton",function(){return Ra}),n.d(t,"PostPublishButton",function(){return Fa}),n.d(t,"PostPublishButtonLabel",function(){return Da}),n.d(t,"PostPublishPanel",function(){return is}),n.d(t,"PostPublishPanelToggle",function(){return cs}),n.d(t,"PostSavedState",function(){return ls}),n.d(t,"PostSchedule",function(){return za}),n.d(t,"PostScheduleCheck",function(){return us}),n.d(t,"PostScheduleLabel",function(){return Wa}),n.d(t,"PostSticky",function(){return ps}),n.d(t,"PostStickyCheck",function(){return ds}),n.d(t,"PostSwitchToDraftButton",function(){return as}),n.d(t,"PostTaxonomies",function(){return ms}),n.d(t,"PostTaxonomiesCheck",function(){return vs}),n.d(t,"PostTextEditor",function(){return gs}),n.d(t,"PostTitle",function(){return Ts}),n.d(t,"PostTrash",function(){return Is}),n.d(t,"PostTrashCheck",function(){return Ps}),n.d(t,"PostTypeSupportCheck",function(){return ca}),n.d(t,"PostVisibility",function(){return Va}),n.d(t,"PostVisibilityLabel",function(){return Ka}),n.d(t,"PostVisibilityCheck",function(){return Bs}),n.d(t,"TableOfContents",function(){return Ns}),n.d(t,"UnsavedChangesWarning",function(){return Ds}),n.d(t,"WordCount",function(){return Ls}),n.d(t,"BlockInspector",function(){return Us}),n.d(t,"BlockList",function(){return wi}),n.d(t,"BlockMover",function(){return Eo}),n.d(t,"BlockSelectionClearer",function(){return Vs}),n.d(t,"BlockSettingsMenu",function(){return rl}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return Zs}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return nl}),n.d(t,"BlockTitle",function(){return Vo}),n.d(t,"BlockToolbar",function(){return pl}),n.d(t,"CopyHandler",function(){return bl}),n.d(t,"DefaultBlockAppender",function(){return Ei}),n.d(t,"ErrorBoundary",function(){return ml}),n.d(t,"Inserter",function(){return fi}),n.d(t,"MultiBlocksSwitcher",function(){return ul}),n.d(t,"MultiSelectScrollIntoView",function(){return Ol}),n.d(t,"NavigableToolbar",function(){return $o}),n.d(t,"ObserveTyping",function(){return yl}),n.d(t,"PreserveScrollInReorder",function(){return _l}),n.d(t,"SkipToSelectedBlock",function(){return Fs}),n.d(t,"Warning",function(){return To}),n.d(t,"WritingFlow",function(){return wl}),n.d(t,"EditorProvider",function(){return Xl}),n.d(t,"blockAutocompleter",function(){return Lr}),n.d(t,"userAutocompleter",function(){return xr}),n.d(t,"getColorClassName",function(){return ro}),n.d(t,"getColorObjectByAttributeValues",function(){return to}),n.d(t,"getColorObjectByColorValue",function(){return no}),n.d(t,"withColors",function(){return io}),n.d(t,"getFontSize",function(){return lo}),n.d(t,"getFontSizeClass",function(){return uo}),n.d(t,"FontSizePicker",function(){return po}),n.d(t,"withFontSizes",function(){return fo}),n.d(t,"mediaUpload",function(){return Dc})},,,,,,,,,,,function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]}},function(e,t,n){var r=n(230);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,c=document.createElement(i);c.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&c.setAttribute("rows","1");var a=r(e,"font-size");c.style.fontSize=a,c.style.padding="0px",c.style.border="0px";var s=document.body;s.appendChild(c),n=c.offsetHeight,s.removeChild(c)}return n}},function(e,t,n){var r,o,i;
/*!
	autosize 4.0.2
	license: MIT
	http://www.jacklmoore.com/autosize
*/o=[e,t],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,r){-1===e.indexOf(n)&&(e.push(n),t.push(r))},delete:function(n){var r=e.indexOf(n);r>-1&&(e.splice(r,1),t.splice(r,1))}}}(),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function o(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t=null,o=null,i=null,c=function(){e.clientWidth!==o&&u()},a=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",u,!1),e.removeEventListener("keyup",u,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",u,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",u,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",u,!1),e.addEventListener("autosize:update",u,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:a,update:u}),function(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),u()}()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function l(){if(0!==e.scrollHeight){var n=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+t+"px",o=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function u(){l();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(o<t?"hidden"===n.overflowY&&(s("scroll"),l(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),l(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==o){i=o;var c=r("autosize:resized");try{e.dispatchEvent(c)}catch(e){}}}}function i(e){var t=n.get(e);t&&t.destroy()}function c(e){var t=n.get(e);t&&t.update()}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((a=function(e){return e}).destroy=function(e){return e},a.update=function(e){return e}):((a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return o(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],c),e}),t.default=a,e.exports=t.default})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var c=n(12),a=n(95),s=n(232),l=n(231),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:l(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),c=(n.onChange,n.style),a=(n.innerRef,i(n,["onResize","maxRows","onChange","style","innerRef"])),s=e.state.lineHeight,l=e.saveDOMNodeRef,u=r&&s?s*r:null;return o({},a,{saveDOMNodeRef:l,style:u?o({},c,{maxHeight:u}):c,onChange:t.onChange})},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout(function(){return s(e.textarea)}),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=i(e,["children","saveDOMNodeRef"]);return c.createElement("textarea",o({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(){this.props.value!==this.currentValue&&this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.func},t}(c.Component);t.default=u},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var o="BEGIN",i="COMMIT",c="REVERT",a=[];function s(e,t){return e.optimist&&e.optimist.id===t}function l(e,t){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError('Error while handling "'+t.type+'": Optimist requires that state is always a plain object.')}function u(e){if(e){var t=e.optimist;return{optimist:void 0===t?a:t,innerState:function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:a,innerState:e}}e.exports=function(e){function t(t,n,o){return t.length&&(t=t.concat([{action:o}])),l(n=e(n,o),o),r({optimist:t},n)}return function(n,a){if(a.optimist)switch(a.optimist.type){case o:return function(t,n){var o=u(t),i=o.optimist,c=o.innerState;return i=i.concat([{beforeState:c,action:n}]),l(c=e(c,n),n),r({optimist:i},c)}(n,a);case i:return function(e,n){var r=u(e),o=r.optimist,i=r.innerState,c=[],a=!1,l=!1;o.forEach(function(e){a?e.beforeState&&s(e.action,n.optimist.id)?(l=!0,c.push({action:e.action})):c.push(e):e.beforeState&&!s(e.action,n.optimist.id)?(a=!0,c.push(e)):e.beforeState&&s(e.action,n.optimist.id)&&(l=!0)}),l||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist');return t(o=c,i,n)}(n,a);case c:return function(n,r){var o=u(n),i=o.optimist,c=o.innerState,a=[],d=!1,p=!1,f=c;i.forEach(function(t){t.beforeState&&s(t.action,r.optimist.id)&&(f=t.beforeState,p=!0),s(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?a.push({beforeState:f,action:t.action}):a.push(t)),p&&(f=e(f,t.action),l(c,r)))}),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist');return t(i=a,f,r)}(n,a)}var d=u(n),p=d.optimist,f=d.innerState;if(n&&!p.length){var b=e(f,a);return b===f?n:(l(b,a),r({optimist:p},b))}return t(p,f,a)}},e.exports.BEGIN=o,e.exports.COMMIT=i,e.exports.REVERT=c}]);