WordPress/wp-includes/js/dist/editor.min.js

55 lines
361 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=304)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},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.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";n.d(t,"a",function(){return o});var r=n(15);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,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";n.d(t,"a",function(){return i});var r=n(27),o=n(3);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t){!function(){e.exports=this.wp.blocks}()},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";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,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){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 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)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,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(){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,n){"use strict";var r=n(32);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,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){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){"use strict";var r=n(36);var o=n(37);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.React}()},,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){e.exports=n(109)()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t){!function(){e.exports=this.wp.blob}()},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){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(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,s;function l(){n=o?new WeakMap:c()}function u(){var n,r,o,i,c,l=arguments.length;for(i=new Array(l),o=0;o<l;o++)i[o]=arguments[o];for(c=t.apply(null,i),(n=s(c)).isUniqueByDependants||(n.lastDependants&&!a(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),r=n.head;r;){if(a(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),s=o?function(e){var t,o,i,a,s,l=n,u=!0;for(t=0;t<e.length;t++){if(o=e[t],!(s=o)||"object"!=typeof s){u=!1;break}l.has(o)?l=l.get(o):(i=new WeakMap,l.set(o,i),l=i)}return l.has(r)||((a=c()).isUniqueByDependants=u,l.set(r,a)),l.get(r)}:function(){return n},u.getDependants=t,u.clear=l,l(),u}},,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,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){!function(){e.exports=this.wp.viewport}()},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){!function(){e.exports=this.wp.isShallowEqual}()},,,function(e,t){!function(){e.exports=this.wp.a11y}()},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(t=t||{},(e=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(I[e])e=I[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=K.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=K.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=K.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=K.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=K.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=K.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=K.hex8.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),a:M(t[4]),format:n?"name":"hex8"};if(t=K.hex6.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),format:n?"name":"hex"};if(t=K.hex4.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),a:M(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=K.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&&(z(e.r)&&z(e.g)&&z(e.b)?(b=e.r,f=e.g,h=e.b,t={r:255*L(b,255),g:255*L(f,255),b:255*L(h,255)},d=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(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"):z(e.h)&&z(e.s)&&z(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));var b,f,h;return n=x(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 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+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 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,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(F(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=A(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=A(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=A(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=A(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 P(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=x(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(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=b(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=b(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(F(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(P,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 I=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}(I);function x(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 A(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 F(e){return o.round(255*parseFloat(e)).toString(16)}function M(e){return N(e)/255}var U,H,V,K=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",V="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function z(e){return!!K.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t){!function(){e.exports=this.wp.date}()},,,,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){e.exports=function(e,t){var n,r,o,i=0;function c(){var t,c,a=r,s=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c<s;c++)if(a.args[c]!==arguments[c]){a=a.next;continue e}return a!==r&&(a===o&&(o=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(t=new Array(s),c=0;c<s;c++)t[c]=arguments[c];return a={args:t,val:e.apply(null,t)},r?(r.prev=a,a.next=r):o=a,i===n?(o=o.prev).next=null:i++,r=a,a.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,i=0},c}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){!function(){e.exports=this.wp.nux}()},function(e,t,n){e.exports=n(270)},,function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";e.exports=n(118)},,,,,function(e,t,n){"use strict";t.__esModule=!0;var r=n(271);t.default=r.default},,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(100),o=n(102);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=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+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(103);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 P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var I=this.hostname.split(/\./),B=(w=0,I.length);w<B;w++){var x=I[w];if(x&&!x.match(b)){for(var L="",A=0,N=x.length;A<N;A++)x.charCodeAt(A)>127?L+="x":L+=x[A];if(!L.match(b)){var R=I.slice(0,w),D=I.slice(w+1),F=x.match(f);F&&(R.push(F[1]),D.unshift(F[2])),D.length&&(g="/"+D.join(".")+g),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=r.toASCII(this.hostname));var M=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+M,this.href+=this.host,P&&(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){M=this.pathname||"";var W=this.search||"";this.path=M+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 b=d[p];n[b]=e[b]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.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=(f=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&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),y=y&&(""===f[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,_=f;else if(f.length)_||(_=[]),_.pop(),_=_.concat(f),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=_.shift(),(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.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 P,I=""===_[0]||_[0]&&"/"===_[0].charAt(0);S&&(n.hostname=n.host=I?"":_.length?_.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift()));return(y=y||n.host&&_.length)&&!I&&_.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){!function(){e.exports=this.wp.coreData}()},,,,,,,,function(e,t,n){"use strict";e.exports=function(e){var t,n={};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])}(n,e),(t=function(e){return function(t){return function(r){var o,i,c=n[r.type],a=t(r);if(c)for(o=0;o<c.length;o++)(i=c[o](r,e))&&e.dispatch(i);return a}}}).effects=n,t}},,,,,,,,,,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.jQuery}()},,,,function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,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,b=700,f=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 P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function I(e,t,n){var r=0;for(e=n?k(e/b):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 B(e){var t,n,r,o,i,c,a,p,b,v,O,g=[],j=e.length,y=0,_=h,E=f;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&S("not-basic"),g.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<j;){for(i=y,c=1,a=l;o>=j&&S("invalid-input"),((p=(O=e.charCodeAt(o++))-48<10?O-22:O-65<26?O-65:O-97<26?O-97:l)>=l||p>k((s-y)/c))&&S("overflow"),y+=p*c,!(p<(b=a<=E?u:a>=E+d?d:a-E));a+=l)c>k(s/(v=l-b))&&S("overflow"),c*=v;E=I(y-i,t=g.length+1,0==i),k(y/t)>s-_&&S("overflow"),_+=k(y/t),y%=t,g.splice(y++,0,_)}return T(g)}function x(e){var t,n,r,o,i,c,a,p,b,v,O,g,j,y,E,C=[];for(g=(e=w(e)).length,t=h,n=0,i=f,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,b=l;!(p<(v=b<=i?u:b>=i+d?d:b-i));b+=l)E=p-v,y=l-v,C.push(_(P(v+E%y,0))),p=k(E/y);C.push(_(P(p,0))),i=I(n,j,r==o),n=0,++r}++n,++t}return C.join("")}a={version:"1.4.1",ucs2:{decode:w,encode:T},decode:B,encode:x,toASCII:function(e){return C(e,function(e){return O.test(e)?"xn--"+x(e):e})},toUnicode:function(e){return C(e,function(e){return v.test(e)?B(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(101)(e),n(52))},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";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){"use strict";t.decode=t.parse=n(104),t.encode=t.stringify=n(105)},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,b,f,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=""),b=decodeURIComponent(d),f=decodeURIComponent(p),r(c,b)?o(c[b])?c[b].push(f):c[b]=[c[b],f]:c[b]=f}return c};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},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";var r=n(110);function o(){}e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function 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,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},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=n(119);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),b=r.offset(e),f=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:b.left-_.left-l,top:b.top-_.top-s},y={left:b.left+h-(_.left+S)+d,top:b.top+f-(_.top+E)+u},g=_):(m=r.offset(t),v=t.clientHeight,O=t.clientWidth,g={left:t.scrollLeft,top:t.scrollTop},j={left:b.left-(m.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-l,top:b.top-(m.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-s},y={left:b.left+h-(m.left+O+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:b.top+f-(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";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",b="left",f="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[b],i=e[p][b];e[p][b]=e[d][b],r[b]="fontSize"===t?"1em":n||0,n=r.pixelLeft+f,r[b]=o,e[p][b]=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){!function(){e.exports=this.wp.tokenList}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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){
/*!
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
*/
var r;r=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,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},c=n(2),a=n(3),s=n(5),l=n(6),u=n(7),d=n(8),p=n(9),b=n(10),f=n(11),h=n(13),m=n(14),v=n(16),O=n(17);t.Diff=i.default,t.diffChars=c.diffChars,t.diffWords=a.diffWords,t.diffWordsWithSpace=a.diffWordsWithSpace,t.diffLines=s.diffLines,t.diffTrimmedLines=s.diffTrimmedLines,t.diffSentences=l.diffSentences,t.diffCss=u.diffCss,t.diffJson=d.diffJson,t.diffArrays=p.diffArrays,t.structuredPatch=m.structuredPatch,t.createTwoFilesPatch=m.createTwoFilesPatch,t.createPatch=m.createPatch,t.applyPatch=b.applyPatch,t.applyPatches=b.applyPatches,t.parsePatch=f.parsePatch,t.merge=h.merge,t.convertChangesToDMP=v.convertChangesToDMP,t.convertChangesToXML=O.convertChangesToXML,t.canonicalize=d.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}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.callback;"function"==typeof n&&(o=n,n={}),this.options=n;var i=this;function c(e){return o?(setTimeout(function(){o(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,l=1,u=a+s,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=a&&p+1>=s)return c([{value:this.join(t),count:t.length}]);function b(){for(var n=-1*l;n<=l;n+=2){var o=void 0,u=d[n-1],p=d[n+1],b=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var f=u&&u.newPos+1<a,h=p&&0<=b&&b<s;if(f||h){if(!f||h&&u.newPos<p.newPos?(o={newPos:(m=p).newPos,components:m.components.slice(0)},i.pushComponent(o.components,void 0,!0)):((o=u).newPos++,i.pushComponent(o.components,!0,void 0)),b=i.extractCommon(o,t,e,n),o.newPos+1>=a&&b+1>=s)return c(r(i,o.components,t,e,i.useLongestToken));d[n]=o}else d[n]=void 0}var m;l++}if(o)!function e(){setTimeout(function(){if(l>u)return o();b()||e()},0)}();else for(;l<=u;){var f=b();if(f)return f}},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 c.diff(e,t,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var c=t.characterDiff=new i.default},function(e,t,n){"use strict";t.__esModule=!0,t.wordDiff=void 0,t.diffWords=function(e,t,n){return n=(0,c.generateOptions)(n,{ignoreWhitespace:!0}),l.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return l.diff(e,t,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},c=n(4);var a=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,s=/\S/,l=t.wordDiff=new i.default;l.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!s.test(e)&&!s.test(t)},l.tokenize=function(e){for(var t=e.split(/(\s+|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&a.test(t[n])&&a.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 a.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var r=(0,c.generateOptions)(n,{ignoreWhitespace:!0});return a.diff(e,t,r)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},c=n(4);var a=t.lineDiff=new i.default;a.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 c.diff(e,t,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var c=t.sentenceDiff=new i.default;c.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 c.diff(e,t,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var c=t.cssDiff=new i.default;c.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 l.diff(e,t,n)},t.canonicalize=u;var o,i=n(1),c=(o=i)&&o.__esModule?o:{default:o},a=n(5);var s=Object.prototype.toString,l=t.jsonDiff=new c.default;function u(e,t,n,o,i){t=t||[],n=n||[],o&&(e=o(i,e));var c=void 0;for(c=0;c<t.length;c+=1)if(t[c]===e)return n[c];var a=void 0;if("[object Array]"===s.call(e)){for(t.push(e),a=new Array(e.length),n.push(a),c=0;c<e.length;c+=1)a[c]=u(e[c],t,n,o,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),"object"===(void 0===e?"undefined":r(e))&&null!==e){t.push(e),a={},n.push(a);var l=[],d=void 0;for(d in e)e.hasOwnProperty(d)&&l.push(d);for(l.sort(),c=0;c<l.length;c+=1)a[d=l[c]]=u(e[d],t,n,o,d);t.pop(),n.pop()}else a=e;return a}l.useLongestToken=!0,l.tokenize=a.lineDiff.tokenize,l.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(u(e,null,null,o),o," ")},l.equals=function(e,t){return c.default.prototype.equals.call(l,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 c.diff(e,t,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var c=t.arrayDiff=new i.default;c.tokenize=function(e){return e.slice()},c.join=c.removeEmpty=function(e){return e}},function(e,t,n){"use strict";t.__esModule=!0,t.applyPatch=a,t.applyPatches=function(e,t){"string"==typeof e&&(e=(0,o.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 i=a(n,o,t);t.patched(o,i,function(e){if(e)return t.complete(e);r()})})}()};var r,o=n(11),i=n(12),c=(r=i)&&r.__esModule?r:{default:r};function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,o.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r=e.split(/\r\n|[\n\v\f\r\x85]/),i=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,b=void 0,f=void 0;function h(e,t){for(var n=0;n<e.lines.length;n++){var o=e.lines[n],i=o.length>0?o[0]:" ",c=o.length>0?o.substr(1):o;if(" "===i||"-"===i){if(!s(t+1,r[t],i,c)&&++l>u)return!1;t++}}return!0}for(var m=0;m<a.length;m++){for(var v=a[m],O=r.length-v.oldLines,g=0,j=p+v.oldStart-1,y=(0,c.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]:" ",P=w.length>0?w.substr(1):w,I=S.linedelimiters[C];if(" "===T)E++;else if("-"===T)r.splice(E,1),i.splice(E,1);else if("+"===T)r.splice(E,0,P),i.splice(E,0,I),E++;else if("\\"===T){var B=S.lines[C-1]?S.lines[C-1][0]:null;"+"===B?b=!0:"-"===B&&(f=!0)}}}if(b)for(;!r[r.length-1];)r.pop(),i.pop();else f&&(r.push(""),i.push("\n"));for(var x=0;x<r.length-1;x++)r[x]=r[x]+i[x];return r.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 f=e.hunks[o]||{oldStart:1/0},h=t.hunks[i]||{oldStart:1/0};if(d(f,h))r.hunks.push(p(f,c)),o++,a+=f.newLines-f.oldLines;else if(d(h,f))r.hunks.push(p(h,a)),i++,c+=h.newLines-h.oldLines;else{var m={oldStart:Math.min(f.oldStart,h.oldStart),oldLines:0,newStart:Math.min(f.newStart+c,h.oldStart+a),newLines:0,lines:[]};b(m,f.oldStart,f.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 b(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 f(e,i,s)}O(e,i),O(e,s),a(e)}function f(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,b=0,f=[],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,b=m,a&&(f=s.context>0?u(a.lines.slice(-s.context)):[],p-=f.length,b-=f.length)}(c=f).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=f).push.apply(v,o(u(r)))}else{var O,g=Math.min(r.length,s.context);(O=f).push.apply(O,o(u(r.slice(0,g))));var j={oldStart:p,oldLines:h-p+g,newStart:b,newLines:m-b+g,lines:f};if(e>=l.length-2&&r.length<=s.context){var y=/\n$/.test(n),k=/\n$/.test(i);0!=r.length||y?y&&k||f.push("\\ No newline at end of file"):f.splice(j.oldLines,0,"\\ No newline at end of file")}d.push(j),p=0,b=0,f=[]}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("")}}])},e.exports=r()},function(e,t){!function(){e.exports=this.tinymce}()},function(e,t){!function(){e.exports=this.wp.wordcount}()},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=n?i(d):d,b={},f=!0,h={node:p,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){b.before=e},after:function(e){b.after=e},pre:function(e){b.pre=e},post:function(e){b.post=e},stop:function(){a=!1},block:function(){f=!1}};if(!a)return h;function m(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=c(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){h.circular=o[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}m();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),b.before&&b.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(o.push(h),m(),l(h.keys,function(t,o){r.push(t),b.pre&&b.pre.call(h,h.node[t],t);var i=e(h.node[t]);n&&u.call(h.node,t)&&(h.node[t]=i.node),i.isLast=o==h.keys.length-1,i.isFirst=0==o,b.post&&b.post.call(h,i),r.pop()}),o.pop()),b.after&&b.after.call(h,h.node),h):h}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===a(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.notices}()},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,b=c;i.forEach(function(t){t.beforeState&&s(t.action,r.optimist.id)&&(b=t.beforeState,p=!0),s(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?a.push({beforeState:b,action:t.action}):a.push(t)),p&&(b=e(b,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,b,r)}(n,a)}var d=u(n),p=d.optimist,b=d.innerState;if(n&&!p.length){var f=e(b,a);return f===b?n:(l(f,a),r({optimist:p},f))}return t(p,b,a)}},e.exports.BEGIN=o,e.exports.COMMIT=i,e.exports.REVERT=c},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,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},c=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 a=n(25),s=n(28),l=n(272),u=n(273),d=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:u(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),o=(n.onChange,n.style),a=(n.innerRef,c(n,["onResize","maxRows","onChange","style","innerRef"])),s=e.state.lineHeight,l=e.saveDOMNodeRef,u=r&&s?s*r:null;return i({},a,{saveDOMNodeRef:l,style:u?i({},o,{maxHeight:u}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout(function(){return l(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=c(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",i({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(e){this.props.value===this.currentValue&&this.props.rows===e.rows||this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.func},t}(a.Component);t.default=d},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,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,c=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),"vertical"===(s=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),d()}var s;function l(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var r=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),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(l("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(l("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==o){r=o;var c=i("autosize:resized");try{e.dispatchEvent(c)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return c(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=l,e.exports=t.default})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r=n(274);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){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){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupEditor",function(){return H}),n.d(r,"resetPost",function(){return V}),n.d(r,"resetAutosave",function(){return K}),n.d(r,"updatePost",function(){return z}),n.d(r,"setupEditorState",function(){return W}),n.d(r,"resetBlocks",function(){return q}),n.d(r,"receiveBlocks",function(){return G}),n.d(r,"updateBlockAttributes",function(){return Y}),n.d(r,"updateBlock",function(){return $}),n.d(r,"selectBlock",function(){return X}),n.d(r,"startMultiSelect",function(){return Q}),n.d(r,"stopMultiSelect",function(){return Z}),n.d(r,"multiSelect",function(){return J}),n.d(r,"clearSelectedBlock",function(){return ee}),n.d(r,"toggleSelection",function(){return te}),n.d(r,"replaceBlocks",function(){return ne}),n.d(r,"replaceBlock",function(){return re}),n.d(r,"moveBlocksDown",function(){return ie}),n.d(r,"moveBlocksUp",function(){return ce}),n.d(r,"moveBlockToPosition",function(){return ae}),n.d(r,"insertBlock",function(){return se}),n.d(r,"insertBlocks",function(){return le}),n.d(r,"showInsertionPoint",function(){return ue}),n.d(r,"hideInsertionPoint",function(){return de}),n.d(r,"setTemplateValidity",function(){return pe}),n.d(r,"synchronizeTemplate",function(){return be}),n.d(r,"editPost",function(){return fe}),n.d(r,"savePost",function(){return he}),n.d(r,"refreshPost",function(){return me}),n.d(r,"trashPost",function(){return ve}),n.d(r,"mergeBlocks",function(){return Oe}),n.d(r,"autosave",function(){return ge}),n.d(r,"redo",function(){return je}),n.d(r,"undo",function(){return ye}),n.d(r,"createUndoLevel",function(){return ke}),n.d(r,"removeBlocks",function(){return _e}),n.d(r,"removeBlock",function(){return Se}),n.d(r,"toggleBlockMode",function(){return Ee}),n.d(r,"startTyping",function(){return Ce}),n.d(r,"stopTyping",function(){return we}),n.d(r,"enterFormattedText",function(){return Te}),n.d(r,"exitFormattedText",function(){return Pe}),n.d(r,"updatePostLock",function(){return Ie}),n.d(r,"__experimentalFetchReusableBlocks",function(){return Be}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return xe}),n.d(r,"__experimentalSaveReusableBlock",function(){return Le}),n.d(r,"__experimentalDeleteReusableBlock",function(){return Ae}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return Ne}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Re}),n.d(r,"__experimentalConvertBlockToReusable",function(){return De}),n.d(r,"insertDefaultBlock",function(){return Fe}),n.d(r,"updateBlockListSettings",function(){return Me}),n.d(r,"updateEditorSettings",function(){return Ue}),n.d(r,"enablePublishSidebar",function(){return He}),n.d(r,"disablePublishSidebar",function(){return Ve}),n.d(r,"lockPostSaving",function(){return Ke}),n.d(r,"unlockPostSaving",function(){return ze}),n.d(r,"addTermToEditedPost",function(){return We}),n.d(r,"createNotice",function(){return qe}),n.d(r,"removeNotice",function(){return Ge}),n.d(r,"createSuccessNotice",function(){return Ye}),n.d(r,"createInfoNotice",function(){return $e}),n.d(r,"createErrorNotice",function(){return Xe}),n.d(r,"createWarningNotice",function(){return Qe}),n.d(r,"fetchReusableBlocks",function(){return Ze}),n.d(r,"receiveReusableBlocks",function(){return Je}),n.d(r,"saveReusableBlock",function(){return et}),n.d(r,"deleteReusableBlock",function(){return tt}),n.d(r,"updateReusableBlockTitle",function(){return nt}),n.d(r,"convertBlockToStatic",function(){return rt}),n.d(r,"convertBlockToReusable",function(){return ot});var o={};n.r(o),n.d(o,"POST_UPDATE_TRANSACTION_ID",function(){return st}),n.d(o,"INSERTER_UTILITY_HIGH",function(){return ut}),n.d(o,"INSERTER_UTILITY_MEDIUM",function(){return dt}),n.d(o,"INSERTER_UTILITY_LOW",function(){return pt}),n.d(o,"INSERTER_UTILITY_NONE",function(){return bt}),n.d(o,"hasEditorUndo",function(){return ht}),n.d(o,"hasEditorRedo",function(){return mt}),n.d(o,"isEditedPostNew",function(){return vt}),n.d(o,"isEditedPostDirty",function(){return Ot}),n.d(o,"isCleanNewPost",function(){return gt}),n.d(o,"getCurrentPost",function(){return jt}),n.d(o,"getCurrentPostType",function(){return yt}),n.d(o,"getCurrentPostId",function(){return kt}),n.d(o,"getCurrentPostRevisionsCount",function(){return _t}),n.d(o,"getCurrentPostLastRevisionId",function(){return St}),n.d(o,"getPostEdits",function(){return Et}),n.d(o,"getCurrentPostAttribute",function(){return Ct}),n.d(o,"getEditedPostAttribute",function(){return wt}),n.d(o,"getAutosaveAttribute",function(){return Tt}),n.d(o,"getEditedPostVisibility",function(){return Pt}),n.d(o,"isCurrentPostPending",function(){return It}),n.d(o,"isCurrentPostPublished",function(){return Bt}),n.d(o,"isCurrentPostScheduled",function(){return xt}),n.d(o,"isEditedPostPublishable",function(){return Lt}),n.d(o,"isEditedPostSaveable",function(){return At}),n.d(o,"isEditedPostEmpty",function(){return Nt}),n.d(o,"isEditedPostAutosaveable",function(){return Rt}),n.d(o,"getAutosave",function(){return Dt}),n.d(o,"hasAutosave",function(){return Ft}),n.d(o,"isEditedPostBeingScheduled",function(){return Mt}),n.d(o,"isEditedPostDateFloating",function(){return Ut}),n.d(o,"getBlockDependantsCacheBust",function(){return Ht}),n.d(o,"getBlockName",function(){return Vt}),n.d(o,"getBlock",function(){return Kt}),n.d(o,"getBlocks",function(){return zt}),n.d(o,"getClientIdsOfDescendants",function(){return Wt}),n.d(o,"getClientIdsWithDescendants",function(){return qt}),n.d(o,"getGlobalBlockCount",function(){return Gt}),n.d(o,"getBlocksByClientId",function(){return Yt}),n.d(o,"getBlockCount",function(){return $t}),n.d(o,"getBlockSelectionStart",function(){return Xt}),n.d(o,"getBlockSelectionEnd",function(){return Qt}),n.d(o,"getSelectedBlockCount",function(){return Zt}),n.d(o,"hasSelectedBlock",function(){return Jt}),n.d(o,"getSelectedBlockClientId",function(){return en}),n.d(o,"getSelectedBlock",function(){return tn}),n.d(o,"getBlockRootClientId",function(){return nn}),n.d(o,"getBlockHierarchyRootClientId",function(){return rn}),n.d(o,"getAdjacentBlockClientId",function(){return on}),n.d(o,"getPreviousBlockClientId",function(){return cn}),n.d(o,"getNextBlockClientId",function(){return an}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return sn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return ln}),n.d(o,"getMultiSelectedBlocks",function(){return un}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return dn}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return pn}),n.d(o,"isFirstMultiSelectedBlock",function(){return bn}),n.d(o,"isBlockMultiSelected",function(){return fn}),n.d(o,"isAncestorMultiSelected",function(){return hn}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return mn}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return vn}),n.d(o,"getBlockOrder",function(){return On}),n.d(o,"getBlockIndex",function(){return gn}),n.d(o,"isBlockSelected",function(){return jn}),n.d(o,"hasSelectedInnerBlock",function(){return yn}),n.d(o,"isBlockWithinSelection",function(){return kn}),n.d(o,"hasMultiSelection",function(){return _n}),n.d(o,"isMultiSelecting",function(){return Sn}),n.d(o,"isSelectionEnabled",function(){return En}),n.d(o,"getBlockMode",function(){return Cn}),n.d(o,"isTyping",function(){return wn}),n.d(o,"isCaretWithinFormattedText",function(){return Tn}),n.d(o,"getBlockInsertionPoint",function(){return Pn}),n.d(o,"isBlockInsertionPointVisible",function(){return In}),n.d(o,"isValidTemplate",function(){return Bn}),n.d(o,"getTemplate",function(){return xn}),n.d(o,"getTemplateLock",function(){return Ln}),n.d(o,"isSavingPost",function(){return An}),n.d(o,"didPostSaveRequestSucceed",function(){return Nn}),n.d(o,"didPostSaveRequestFail",function(){return Rn}),n.d(o,"isAutosavingPost",function(){return Dn}),n.d(o,"getSuggestedPostFormat",function(){return Fn}),n.d(o,"getBlocksForSerialization",function(){return Mn}),n.d(o,"getEditedPostContent",function(){return Un}),n.d(o,"canInsertBlockType",function(){return Hn}),n.d(o,"getInserterItems",function(){return Kn}),n.d(o,"__experimentalGetReusableBlock",function(){return zn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return Wn}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return qn}),n.d(o,"__experimentalGetReusableBlocks",function(){return Gn}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return Yn}),n.d(o,"isPublishingPost",function(){return $n}),n.d(o,"isPermalinkEditable",function(){return Xn}),n.d(o,"getPermalink",function(){return Qn}),n.d(o,"getPermalinkParts",function(){return Zn}),n.d(o,"inSomeHistory",function(){return Jn}),n.d(o,"getBlockListSettings",function(){return er}),n.d(o,"getEditorSettings",function(){return tr}),n.d(o,"getTokenSettings",function(){return nr}),n.d(o,"isPostLocked",function(){return rr}),n.d(o,"isPostSavingLocked",function(){return or}),n.d(o,"isPostLockTakeover",function(){return ir}),n.d(o,"getPostLockUser",function(){return cr}),n.d(o,"getActivePostLock",function(){return ar}),n.d(o,"canUserUseUnfilteredHTML",function(){return sr}),n.d(o,"isPublishSidebarEnabled",function(){return lr}),n.d(o,"getNotices",function(){return ur}),n.d(o,"getReusableBlock",function(){return dr}),n.d(o,"isSavingReusableBlock",function(){return pr}),n.d(o,"isFetchingReusableBlock",function(){return br}),n.d(o,"getReusableBlocks",function(){return fr});var i=n(12),c=(n(77),n(269),n(53)),a=n(38),s=n(5),l=n(24),u=n(8),d=n(20),p=n(19),b=n(15),f=n(27),h=n(54),m=n.n(h),v=n(2),O={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(u.a)({},O,e)).shouldOverwriteState=Object(v.overSome)([e.shouldOverwriteState,function(t){return Object(v.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,b=l;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[c].concat(Object(p.a)(s)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return s.length?{past:Object(p.a)(o).concat([c]),present:Object(v.first)(s),future:Object(v.drop)(s),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(u.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var f=t(c,r);if(Object(v.includes)(i,r.type))return{past:[],present:f,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(c===f)return e;var h=o;return!d&&o.length&&a(r,b)||(h=Object(p.a)(o).concat([c])),{past:h,present:f,future:[],shouldCreateUndoLevel:!1,lastAction:r}}}},j=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(v.includes)(e.resetTypes,r.type),c=n!==o;if(!c&&!i)return n;c&&void 0!==n||(o=Object(u.a)({},o));var a=Object(v.includes)(e.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&c,o}}},y=n(1),k={insertUsage:{},isPublishSidebarEnabled:!0},_={alignWide:!1,colors:[{name:Object(y.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(y.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(y.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(y.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(y.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(y.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(y.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(y.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(y.__)("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:Object(y.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(y.__)("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],fontSizes:[{name:Object(y._x)("Small","font size name"),size:13,slug:"small"},{name:Object(y._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(y._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(y._x)("Large","font size name"),size:36,slug:"large"},{name:Object(y._x)("Huge","font size name"),size:48,slug:"huge"}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null};function S(e,t,n){return Object(p.a)(e.slice(0,n)).concat(Object(p.a)(Object(v.castArray)(t)),Object(p.a)(e.slice(n)))}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(p.a)(e);return o.splice(t,r),S(o,e.slice(t,t+r),n)}function C(e){return e&&"object"===Object(f.a)(e)&&"raw"in e?e.raw:e}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(b.a)({},t,[]);return e.forEach(function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,w(o,r))}),n}function T(e){for(var t={},n=Object(p.a)(e);n.length;){var r=n.shift(),o=r.innerBlocks,i=Object(d.a)(r,["innerBlocks"]);n.push.apply(n,Object(p.a)(o)),t[i.clientId]=i}return t}function P(e,t){return Object(v.isEqual)(Object(v.keys)(e),Object(v.keys)(t))}function I(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&e.clientId===t.clientId&&P(e.attributes,t.attributes)}function B(e,t){return"EDIT_POST"===e.type&&P(e.edits,t.edits)}var x=Object(v.flow)([s.combineReducers,function(e){return function(t,n){if(t&&"REMOVE_BLOCKS"===n.type){for(var r=Object(p.a)(n.clientIds),o=0;o<r.length;o++)r.push.apply(r,Object(p.a)(t.blockOrder[r[o]]));n=Object(u.a)({},n,{clientIds:r})}return e(t,n)}},g({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RECEIVE_BLOCKS","RESET_POST","UPDATE_POST"],shouldOverwriteState:function(e,t){return!(!t||e.type!==t.type)&&Object(v.overSome)([I,B])(e,t)}}),j({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(v.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t===e&&(t=Object(u.a)({},e)),t[r]=n),t},e);case"RESET_BLOCKS":return"content"in e?Object(v.omit)(e,"content"):e;case"DIRTY_ARTIFICIALLY":return Object(u.a)({},e);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return C(t.post[e])};return Object(v.reduce)(e,function(t,r,o){return r!==n(o)?t:(e===t&&(t=Object(u.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 T(t.blocks);case"RECEIVE_BLOCKS":return Object(u.a)({},e,T(t.blocks));case"UPDATE_BLOCK_ATTRIBUTES":if(!e[t.clientId])return e;var n=Object(v.reduce)(t.attributes,function(n,r,o){return r!==n[o]&&(n===e[t.clientId].attributes&&(n=Object(u.a)({},n)),n[o]=r),n},e[t.clientId].attributes);return n===e[t.clientId].attributes?e:Object(u.a)({},e,Object(b.a)({},t.clientId,Object(u.a)({},e[t.clientId],{attributes:n})));case"UPDATE_BLOCK":return e[t.clientId]?Object(u.a)({},e,Object(b.a)({},t.clientId,Object(u.a)({},e[t.clientId],t.updates))):e;case"INSERT_BLOCKS":return Object(u.a)({},e,T(t.blocks));case"REPLACE_BLOCKS":return t.blocks?Object(u.a)({},Object(v.omit)(e,t.clientIds),T(t.blocks)):e;case"REMOVE_BLOCKS":return Object(v.omit)(e,t.clientIds);case"SAVE_REUSABLE_BLOCK_SUCCESS":var r=t.id,o=t.updatedId;return r===o?e:Object(v.mapValues)(e,function(e){return"core/block"===e.name&&e.attributes.ref===r?Object(u.a)({},e,{attributes:Object(u.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 w(t.blocks);case"RECEIVE_BLOCKS":return Object(u.a)({},e,Object(v.omit)(w(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=t.blocks,i=e[r]||[],c=w(o,r),a=t.index,s=void 0===a?i.length:a;return Object(u.a)({},e,c,Object(b.a)({},r,S(i,c[r],s)));case"MOVE_BLOCK_TO_POSITION":var l,d=t.fromRootClientId,f=void 0===d?"":d,h=t.toRootClientId,m=void 0===h?"":h,O=t.clientId,g=t.index,j=void 0===g?e[m].length:g;if(f===m){var y=e[m].indexOf(O);return Object(u.a)({},e,Object(b.a)({},m,E(e[m],y,j)))}return Object(u.a)({},e,(l={},Object(b.a)(l,f,Object(v.without)(e[f],O)),Object(b.a)(l,m,S(e[m],O,j)),l));case"MOVE_BLOCKS_UP":var k=t.clientIds,_=t.rootClientId,C=void 0===_?"":_,T=Object(v.first)(k),P=e[C];if(!P.length||T===Object(v.first)(P))return e;var I=P.indexOf(T);return Object(u.a)({},e,Object(b.a)({},C,E(P,I,I-1,k.length)));case"MOVE_BLOCKS_DOWN":var B=t.clientIds,x=t.rootClientId,L=void 0===x?"":x,A=Object(v.first)(B),N=Object(v.last)(B),R=e[L];if(!R.length||N===Object(v.last)(R))return e;var D=R.indexOf(A);return Object(u.a)({},e,Object(b.a)({},L,E(R,D,D+1,B.length)));case"REPLACE_BLOCKS":var F=t.blocks,M=t.clientIds;if(!F)return e;var U=w(F);return Object(v.flow)([function(e){return Object(v.omit)(e,M)},function(e){return Object(u.a)({},e,Object(v.omit)(U,""))},function(e){return Object(v.mapValues)(e,function(e){return Object(v.reduce)(e,function(e,t){return t===M[0]?Object(p.a)(e).concat(Object(p.a)(U[""])):(-1===M.indexOf(t)&&e.push(t),e)},[])})}])(e);case"REMOVE_BLOCKS":return Object(v.flow)([function(e){return Object(v.omit)(e,t.clientIds)},function(e){return Object(v.mapValues)(e,function(e){return v.without.apply(void 0,[e].concat(Object(p.a)(t.clientIds)))})}])(e)}return e}});var L=Object(s.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(v.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(v.isEqual)(t[o],c)||(t===e&&(t=Object(u.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(u.a)({},e,Object(b.a)({},n,Object(u.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(u.a)({},Object(v.omit)(e,o),Object(b.a)({},i,c));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(v.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(u.a)({},e,Object(b.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(v.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(u.a)({},e,Object(b.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(v.omit)(e,n)}return e}});var A=m()(Object(s.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(u.a)({},e,t.edits)}return Object(v.mapValues)(n,C)}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},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},blockSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{start:null,end:null,isMultiSelecting:!1,isEnabled:!0,initialPosition:null},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return null!==e.start||null!==e.end||e.isMultiSelecting?Object(u.a)({},e,{start:null,end:null,isMultiSelecting:!1,initialPosition:null}):e;case"START_MULTI_SELECT":return e.isMultiSelecting?e:Object(u.a)({},e,{isMultiSelecting:!0,initialPosition:null});case"STOP_MULTI_SELECT":return e.isMultiSelecting?Object(u.a)({},e,{isMultiSelecting:!1,initialPosition:null}):e;case"MULTI_SELECT":return Object(u.a)({},e,{start:t.start,end:t.end,initialPosition:null});case"SELECT_BLOCK":return t.clientId===e.start&&t.clientId===e.end?e:Object(u.a)({},e,{start:t.clientId,end:t.clientId,initialPosition:t.initialPosition});case"INSERT_BLOCKS":return Object(u.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(u.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(v.get)(t.blocks,[0,"clientId"],null);return Object(u.a)({},e,{start:n,end:n,initialPosition:null,isMultiSelecting:!1});case"TOGGLE_SELECTION":return Object(u.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(u.a)({},e,Object(b.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(v.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(v.isEqual)(e[n],t.settings)?e:Object(u.a)({},e,Object(b.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(v.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return{rootClientId:t.rootClientId,index:t.index};case"HIDE_INSERTION_POINT":return null}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,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(i.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Object(u.a)({},e,{insertUsage:Object(u.a)({},e.insertUsage,Object(b.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})},e);case"REMOVE_REUSABLE_BLOCK":return Object(u.a)({},e,{insertUsage:Object(v.omitBy)(e.insertUsage,function(e){return e.insert.ref===t.id})});case"ENABLE_PUBLISH_SIDEBAR":return Object(u.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(u.a)({},e,{isPublishSidebarEnabled:!1})}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},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},reusableBlocks:L,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(u.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 C(n[e])}),o=Object(l.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(v.omit)(e,"preview_link")}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(u.a)({},e,t.settings)}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return Object(u.a)({},e,Object(b.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(e,t.lockName)}return e}})),N=n(85),R=n.n(N),D=n(188),F=n.n(D),M=n(30),U=n.n(M);function H(e){return{type:"SETUP_EDITOR",post:e}}function V(e){return{type:"RESET_POST",post:e}}function K(e){return{type:"RESET_AUTOSAVE",post:e}}function z(e){return{type:"UPDATE_POST",edits:e}}function W(e,t,n){return{type:"SETUP_EDITOR_STATE",post:e,blocks:t,edits:n}}function q(e){return{type:"RESET_BLOCKS",blocks:e}}function G(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Y(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientId:e,attributes:t}}function $(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function X(e){return{type:"SELECT_BLOCK",initialPosition:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,clientId:e}}function Q(){return{type:"START_MULTI_SELECT"}}function Z(){return{type:"STOP_MULTI_SELECT"}}function J(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function ee(){return{type:"CLEAR_SELECTED_BLOCK"}}function te(){return{type:"TOGGLE_SELECTION",isSelectionEnabled:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}function ne(e,t){return{type:"REPLACE_BLOCKS",clientIds:Object(v.castArray)(e),blocks:Object(v.castArray)(t),time:Date.now()}}function re(e,t){return ne(e,t)}function oe(e){return function(t,n){return{clientIds:Object(v.castArray)(t),type:e,rootClientId:n}}}var ie=oe("MOVE_BLOCKS_DOWN"),ce=oe("MOVE_BLOCKS_UP");function ae(e,t,n,r){return{type:"MOVE_BLOCK_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientId:e,index:r}}function se(e,t,n){return le([e],t,n)}function le(e,t,n){return{type:"INSERT_BLOCKS",blocks:Object(v.castArray)(e),index:t,rootClientId:n,time:Date.now()}}function ue(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function de(){return{type:"HIDE_INSERTION_POINT"}}function pe(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function be(){return{type:"SYNCHRONIZE_TEMPLATE"}}function fe(e){return{type:"EDIT_POST",edits:e}}function he(){return{type:"REQUEST_POST_UPDATE",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function me(){return{type:"REFRESH_POST"}}function ve(e,t){return{type:"TRASH_POST",postId:e,postType:t}}function Oe(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function ge(){return he({autosave:!0})}function je(){return{type:"REDO"}}function ye(){return{type:"UNDO"}}function ke(){return{type:"CREATE_UNDO_LEVEL"}}function _e(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"REMOVE_BLOCKS",clientIds:Object(v.castArray)(e),selectPrevious:t}}function Se(e,t){return _e([e],t)}function Ee(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Ce(){return{type:"START_TYPING"}}function we(){return{type:"STOP_TYPING"}}function Te(){return{type:"ENTER_FORMATTED_TEXT"}}function Pe(){return{type:"EXIT_FORMATTED_TEXT"}}function Ie(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Be(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function xe(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Le(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Ae(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function Ne(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function Re(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function De(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(e)}}function Fe(e,t,n){return se(Object(i.createBlock)(Object(i.getDefaultBlockName)(),e),n,t)}function Me(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ue(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}function He(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Ve(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ke(e){return{type:"LOCK_POST_SAVING",lockName:e}}function ze(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function We(e,t){return{type:"ADD_TERM_TO_EDITED_POST",slug:e,term:t}}function qe(e,t,n){return U()("createNotice action (`core/editor` store)",{alternative:"createNotice action (`core/notices` store)",plugin:"Gutenberg",version:"4.4.0"}),Object(s.dispatch)("core/notices").createNotice(e,t,n),{type:"__INERT__"}}function Ge(e){return U()("removeNotice action (`core/editor` store)",{alternative:"removeNotice action (`core/notices` store)",plugin:"Gutenberg",version:"4.4.0"}),Object(s.dispatch)("core/notices").removeNotice(e),{type:"__INERT__"}}var Ye=Object(v.partial)(qe,"success"),$e=Object(v.partial)(qe,"info"),Xe=Object(v.partial)(qe,"error"),Qe=Object(v.partial)(qe,"warning");function Ze(e){return U()("wp.data.dispatch( 'core/editor' ).fetchReusableBlocks( id )",{alternative:"wp.data.select( 'core' ).getEntityRecords( 'postType', 'wp_block' )",plugin:"Gutenberg",version:"4.4.0"}),Be(e)}function Je(e){return U()("wp.data.dispatch( 'core/editor' ).receiveReusableBlocks( results )",{alternative:"wp.data.select( 'core' ).getEntityRecords( 'postType', 'wp_block' )",plugin:"Gutenberg",version:"4.4.0"}),xe(e)}function et(e){return U()("wp.data.dispatch( 'core/editor' ).saveReusableBlock( id )",{alternative:"wp.data.dispatch( 'core' ).saveEntityRecord( 'postType', 'wp_block', reusableBlock )",plugin:"Gutenberg",version:"4.4.0"}),Le(e)}function tt(e){return U()("deleteReusableBlock action (`core/editor` store)",{alternative:"__experimentalDeleteReusableBlock action (`core/edtior` store)",plugin:"Gutenberg",version:"4.4.0",hint:"Using experimental APIs is strongly discouraged as they are subject to removal without notice."}),Ae(e)}function nt(e,t){return U()("wp.data.dispatch( 'core/editor' ).updateReusableBlockTitle( id, title )",{alternative:"wp.data.dispatch( 'core' ).saveEntityRecord( 'postType', 'wp_block', reusableBlock )",plugin:"Gutenberg",version:"4.4.0"}),Ne(e,t)}function rt(e){return U()("convertBlockToStatic action (`core/editor` store)",{alternative:"__experimentalConvertBlockToStatic action (`core/edtior` store)",plugin:"Gutenberg",version:"4.4.0",hint:"Using experimental APIs is strongly discouraged as they are subject to removal without notice."}),Re(e)}function ot(e){return U()("convertBlockToReusable action (`core/editor` store)",{alternative:"__experimentalConvertBlockToReusable action (`core/edtior` store)",plugin:"Gutenberg",version:"4.4.0",hint:"Using experimental APIs is strongly discouraged as they are subject to removal without notice."}),De(e)}var it=n(34),ct=n(46),at=n(56),st="post-update",lt=/%(?:postname|pagename)%/,ut=3,dt=2,pt=1,bt=0,ft=[];function ht(e){return e.editor.past.length>0}function mt(e){return e.editor.future.length>0}function vt(e){return"auto-draft"===jt(e).status}function Ot(e){return e.editor.isDirty||Jn(e,Ot)}function gt(e){return!Ot(e)&&vt(e)}function jt(e){return e.currentPost}function yt(e){return e.currentPost.type}function kt(e){return jt(e).id||null}function _t(e){return Object(v.get)(jt(e),["_links","version-history",0,"count"],0)}function St(e){return Object(v.get)(jt(e),["_links","predecessor-version",0,"id"],null)}function Et(e){return e.editor.present.edits}function Ct(e,t){var n=jt(e);if(n.hasOwnProperty(t))return n[t]}function wt(e,t){var n=Et(e);switch(t){case"content":return Un(e)}return n.hasOwnProperty(t)?n[t]:Ct(e,t)}function Tt(e,t){if(!Ft(e))return null;var n=Dt(e);return n.hasOwnProperty(t)?n[t]:void 0}function Pt(e){var t=wt(e,"status"),n=wt(e,"password");return"private"===t?"private":n?"password":"public"}function It(e){return"pending"===jt(e).status}function Bt(e){var t=jt(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&Object(ct.moment)(t.date).isBefore(Object(ct.moment)())}function xt(e){return"future"===jt(e).status&&!Bt(e)}function Lt(e){var t=jt(e);return Ot(e)||-1===["publish","private","future"].indexOf(t.status)}function At(e){return!An(e)&&(!!wt(e,"title")||!!wt(e,"excerpt")||!Nt(e))}function Nt(e){return!Mn(e).length&&!wt(e,"content")}function Rt(e){if(!At(e))return!1;if(!Ft(e))return!0;var t=Dt(e);return["title","excerpt","content"].some(function(n){return t[n]!==wt(e,n)})}function Dt(e){return e.autosave}function Ft(e){return!!Dt(e)}function Mt(e){var t=Object(ct.moment)(wt(e,"date")),n=Object(ct.moment)().add(1,"minute");return t.isAfter(n)}function Ut(e){var t=wt(e,"date"),n=wt(e,"modified"),r=wt(e,"status");return("draft"===r||"auto-draft"===r)&&t===n}var Ht=Object(it.a)(function(){return[]},function(e,t){return Object(v.map)(On(e,t),function(t){return Kt(e,t)})});function Vt(e,t){var n=e.editor.present.blocksByClientId[t];return n?n.name:null}var Kt=Object(it.a)(function(e,t){var n=e.editor.present.blocksByClientId[t];if(!n)return null;var r=n.attributes,o=Object(i.getBlockType)(n.name);return o&&(r=Object(v.reduce)(o.attributes,function(t,n,o){return"meta"===n.source&&(t===r&&(t=Object(u.a)({},t)),t[o]=function(e,t){return Object(v.has)(e,["editor","present","edits","meta",t])?Object(v.get)(e,["editor","present","edits","meta",t]):Object(v.get)(e,["currentPost","meta",t])}(e,n.meta)),t},r)),Object(u.a)({},n,{attributes:r,innerBlocks:zt(e,t)})},function(e,t){return[e.editor.present.blocksByClientId[t],Ht(e,t),e.editor.present.edits.meta,e.currentPost.meta]});var zt=Object(it.a)(function(e,t){return Object(v.map)(On(e,t),function(t){return Kt(e,t)})},function(e){return[e.editor.present.blockOrder,e.editor.present.blocksByClientId]}),Wt=function e(t,n){return Object(v.flatMap)(n,function(n){var r=On(t,n);return Object(p.a)(r).concat(Object(p.a)(e(t,r)))})},qt=Object(it.a)(function(e){var t=On(e);return Object(p.a)(t).concat(Object(p.a)(Wt(e,t)))},function(e){return[e.editor.present.blockOrder]}),Gt=Object(it.a)(function(e,t){return t?Object(v.reduce)(e.editor.present.blocksByClientId,function(e,n){return n.name===t?e+1:e},0):Object(v.size)(e.editor.present.blocksByClientId)},function(e){return[e.editor.present.blocksByClientId]}),Yt=Object(it.a)(function(e,t){return Object(v.map)(Object(v.castArray)(t),function(t){return Kt(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 $t(e,t){return On(e,t).length}function Xt(e){return e.blockSelection.start}function Qt(e){return e.blockSelection.end}function Zt(e){var t=ln(e).length;return t||(e.blockSelection.start?1:0)}function Jt(e){var t=e.blockSelection,n=t.start,r=t.end;return!!n&&n===r}function en(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?n:null}function tn(e){var t=en(e);return t?Kt(e,t):null}var nn=Object(it.a)(function(e,t){var n=e.editor.present.blockOrder;for(var r in n)if(Object(v.includes)(n[r],t))return r;return null},function(e){return[e.editor.present.blockOrder]}),rn=Object(it.a)(function(e,t){for(var n=t,r=t;n;)n=nn(e,r=n);return r},function(e){return[e.editor.present.blockOrder]});function on(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=en(e)),void 0===t&&(t=n<0?dn(e):pn(e)),!t)return null;var r=nn(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 cn(e,t){return on(e,t,-1)}function an(e,t){return on(e,t,1)}function sn(e){var t=e.blockSelection,n=t.start;return n===t.end&&n?e.blockSelection.initialPosition:null}var ln=Object(it.a)(function(e){var t=e.blockSelection,n=t.start,r=t.end;if(n===r)return[];var o=nn(e,n);if(null===o)return[];var i=On(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]}),un=Object(it.a)(function(e){var t=ln(e);return t.length?t.map(function(t){return Kt(e,t)}):ft},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 dn(e){return Object(v.first)(ln(e))||null}function pn(e){return Object(v.last)(ln(e))||null}function bn(e,t){return dn(e)===t}function fn(e,t){return-1!==ln(e).indexOf(t)}var hn=Object(it.a)(function(e,t){for(var n=t,r=!1;n&&!r;)r=fn(e,n=nn(e,n));return r},function(e){return[e.editor.present.blockOrder,e.blockSelection.start,e.blockSelection.end]});function mn(e){var t=e.blockSelection,n=t.start;return n===t.end?null:n||null}function vn(e){var t=e.blockSelection,n=t.start,r=t.end;return n===r?null:r||null}function On(e,t){return e.editor.present.blockOrder[t||""]||ft}function gn(e,t,n){return On(e,n).indexOf(t)}function jn(e,t){var n=e.blockSelection,r=n.start;return r===n.end&&r===t}function yn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(v.some)(On(e,t),function(t){return jn(e,t)||fn(e,t)||n&&yn(e,t,n)})}function kn(e,t){if(!t)return!1;var n=ln(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function _n(e){var t=e.blockSelection;return t.start!==t.end}function Sn(e){return e.blockSelection.isMultiSelecting}function En(e){return e.blockSelection.isEnabled}function Cn(e,t){return e.blocksMode[t]||"visual"}function wn(e){return e.isTyping}function Tn(e){return e.isCaretWithinFormattedText}function Pn(e){var t,n,r=e.insertionPoint,o=e.blockSelection;if(null!==r)return r;var i=o.end;return n=i?gn(e,i,t=nn(e,i)||void 0)+1:On(e).length,{rootClientId:t,index:n}}function In(e){return null!==e.insertionPoint}function Bn(e){return e.template.isValid}function xn(e){return e.settings.template}function Ln(e,t){if(!t)return e.settings.templateLock;var n=er(e,t);return n?n.templateLock:null}function An(e){return e.saving.requesting}function Nn(e){return e.saving.successful}function Rn(e){return!!e.saving.error}function Dn(e){return An(e)&&e.saving.isAutosave}function Fn(e){var t,n=On(e);switch(1===n.length&&(t=Kt(e,n[0]).name),2===n.length&&"core/paragraph"===Kt(e,n[1]).name&&(t=Kt(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}function Mn(e){var t=zt(e);return 1===t.length&&Object(i.isUnmodifiedDefaultBlock)(t[0])?[]:t}var Un=Object(it.a)(function(e){var t=Et(e);if("content"in t)return t.content;var n=Mn(e),r=Object(i.serialize)(n);return 1===n.length&&n[0].name===Object(i.getFreeformContentHandlerName)()?Object(at.removep)(r):r},function(e){return[e.editor.present.edits.content,e.editor.present.blocksByClientId,e.editor.present.blockOrder]}),Hn=Object(it.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(v.isBoolean)(e)?e:Object(v.isArray)(e)?Object(v.includes)(e,t):n},o=Object(i.getBlockType)(t);if(!o)return!1;if(!r(tr(e).allowedBlockTypes,t,!0))return!1;if(!!Ln(e,n))return!1;var c=er(e,n),a=r(Object(v.get)(c,["allowedBlocks"]),t),s=r(o.parent,Vt(e,n));return null!==a&&null!==s?a||s:null!==a?a:null===s||s},function(e,t,n){return[e.blockListSettings[n],e.editor.present.blocksByClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]});function Vn(e,t){return e.preferences.insertUsage[t]||null}var Kn=Object(it.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t,n){return n?ut:t>0?dt:"common"===e?pt:bt},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(i.getBlockTypes)().filter(function(n){return!!Object(i.hasBlockSupport)(n,"inserter",!0)&&Hn(e,n.name,t)}).map(function(t){var o=t.name,c=!1;Object(i.hasBlockSupport)(t.name,"multiple",!0)||(c=Object(v.some)(Yt(e,qt(e)),{name:t.name}));var a=Object(v.isArray)(t.parent),s=Vn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u;return{id:o,name:t.name,initialAttributes:{},title:t.title,icon:t.icon,category:t.category,keywords:t.keywords,isDisabled:c,utility:n(t.category,d,a),frecency:r(l,d),hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(t.name)}}),c=Gn(e).filter(function(n){if(!Hn(e,"core/block",t))return!1;var r=Kt(e,n.clientId);if(!r)return!1;var o=Object(i.getBlockType)(r.name);return!!o&&!!Hn(e,o.name,t)}).map(function(t){var o="core/block/".concat(t.id),c=Kt(e,t.clientId),a=Object(i.getBlockType)(c.name),s=Vn(e,o)||{},l=s.time,u=s.count,d=void 0===u?0:u,p=n("reusable",d,!1),b=r(l,d);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:a.icon,category:"reusable",keywords:[],isDisabled:!1,utility:p,frecency:b}});return Object(v.orderBy)(Object(p.a)(o).concat(Object(p.a)(c)),["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(i.getBlockTypes)()]}),zn=Object(it.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(u.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function Wn(e,t){return e.reusableBlocks.isSaving[t]||!1}function qn(e,t){return!!e.reusableBlocks.isFetching[t]}function Gn(e){return Object(v.map)(e.reusableBlocks.data,function(t,n){return zn(e,n)})}function Yn(e,t){var n=Object(v.find)(e.optimist,function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function $n(e){if(!An(e))return!1;if(!Bt(e))return!1;var t=Yn(e,st);return!!t&&!Bt(t)}function Xn(e){var t=wt(e,"permalink_template");return lt.test(t)}function Qn(e){var t=Zn(e),n=t.prefix,r=t.postName,o=t.suffix;return Xn(e)?n+r+o:n}function Zn(e){var t=wt(e,"permalink_template"),n=wt(e,"slug")||wt(e,"generated_slug"),r=t.split(lt),o=Object(l.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function Jn(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function er(e,t){return e.blockListSettings[t]}function tr(e){return e.settings}function nr(e,t){return t?e.tokens[t]:e.tokens}function rr(e){return e.postLock.isLocked}function or(e){return e.postSavingLock.length>0}function ir(e){return e.postLock.isTakeover}function cr(e){return e.postLock.user}function ar(e){return e.postLock.activePostLock}function sr(e){return Object(v.has)(jt(e),["_links","wp:action-unfiltered-html"])}function lr(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:k.isPublishSidebarEnabled}function ur(){return U()("getNotices selector (`core/editor` store)",{alternative:"getNotices selector (`core/notices` store)",plugin:"Gutenberg",version:"4.4.0"}),Object(s.select)("core/notices").getNotices()}function dr(e,t){return U()("wp.data.select( 'core/editor' ).getReusableBlock( ref )",{alternative:"wp.data.select( 'core' ).getEntityRecord( 'postType', 'wp_block', ref )",plugin:"Gutenberg",version:"4.4.0"}),zn(e,t)}function pr(e,t){return U()("isSavingReusableBlock selector (`core/editor` store)",{alternative:"__experimentalIsSavingReusableBlock selector (`core/edtior` store)",plugin:"Gutenberg",version:"4.4.0",hint:"Using experimental APIs is strongly discouraged as they are subject to removal without notice."}),Wn(e,t)}function br(e,t){return U()("wp.data.select( 'core/editor' ).isFetchingReusableBlock( ref )",{alternative:"wp.data.select( 'core' ).isResolving( 'getEntityRecord', 'wp_block', ref )",plugin:"Gutenberg",version:"4.4.0"}),qn(e,t)}function fr(e){return U()("wp.data.select( 'core/editor' ).getReusableBlocks( ref )",{alternative:"wp.data.select( 'core' ).getEntityRecords( 'postType', 'wp_block' )",plugin:"Gutenberg",version:"4.4.0"}),Gn(e)}var hr=n(39),mr=n(33),vr=n.n(mr);function Or(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(s.select)("core/data").hasFinishedResolution(e,t,r)},i=function(){return Object(s.select)(e)[t].apply(null,r)},c=i();if(o())return n(c);var a=Object(s.subscribe)(function(){o()&&(a(),n(i()))})})}var gr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,Or("core","getPostType","wp_block");case 4:if(c=e.sent){e.next=7;break}return e.abrupt("return");case 7:return a=r?vr()({path:"/wp/v2/".concat(c.rest_base,"/").concat(r,"?context=edit")}):vr()({path:"/wp/v2/".concat(c.rest_base,"?per_page=-1&context=edit")}),e.prev=8,e.next=11,a;case 11:s=e.sent,o(xe(Object(v.map)(Object(v.castArray)(s),function(e){var t=Object(i.parse)(e.content.raw);return{reusableBlock:{id:e.id,title:C(e.title)},parsedBlock:1===t.length?t[0]:Object(i.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)}}(),jr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,l,u,d,p,b,f,h,m,v,O,g;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Or("core","getPostType","wp_block");case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:return o=t.id,c=n.dispatch,a=n.getState(),l=zn(a,o),u=l.clientId,d=l.title,p=l.isTemporary,b=Kt(a,u),f=Object(i.serialize)("core/template"===b.name?b.innerBlocks:b),h=p?{title:d,content:f,status:"publish"}:{id:o,title:d,content:f,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",e.prev=14,e.next=17,vr()({path:m,data:h,method:v});case 17:O=e.sent,c({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(y.__)("Block created."):Object(y.__)("Block updated."),Object(s.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=27;break;case 23:e.prev=23,e.t0=e.catch(14),c({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(s.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 27:case"end":return e.stop()}},e,this,[[14,23]])}));return function(t,n){return e.apply(this,arguments)}}(),yr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,c,a,l,u,d,b,f,m;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Or("core","getPostType","wp_block");case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(o=t.id,c=n.getState,a=n.dispatch,(l=zn(c(),o))&&!l.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=zt(c()),d=u.filter(function(e){return Object(i.isReusableBlock)(e)&&e.attributes.ref===o}),b=d.map(function(e){return e.clientId}),f=Object(v.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:h.BEGIN,id:f}}),a(_e(Object(p.a)(b).concat([l.clientId]))),e.prev=16,e.next=19,vr()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:h.COMMIT,id:f}}),m=Object(y.__)("Block deleted."),Object(s.dispatch)("core/notices").createSuccessNotice(m,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(16),a({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:h.REVERT,id:f}}),Object(s.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,this,[[16,24]])}));return function(t,n){return e.apply(this,arguments)}}(),kr=n(29),_r=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,a,l,d,p,b,f,m;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.dispatch,o=n.getState,i=o(),c=jt(i),a=!!t.options.autosave,(a?Rt:At)(i)){e.next=7;break}return e.abrupt("return");case 7:return l=Et(i),a&&(l=Object(v.pick)(l,["title","content","excerpt"])),vt(i)&&(l=Object(u.a)({status:"draft"},l)),d=Object(u.a)({},l,{content:Un(i),id:c.id}),e.next=13,Or("core","getPostType",yt(i));case 13:return p=e.sent,r({type:"REQUEST_POST_UPDATE_START",optimist:{type:h.BEGIN,id:st},isAutosave:a}),r(Object(u.a)({},z(d),{optimist:{id:st}})),a?(d=Object(u.a)({},Object(v.pick)(c,["title","content","excerpt"]),Dt(i),d,{parent:c.id}),b=vr()({path:"/wp/v2/".concat(p.rest_base,"/").concat(c.id,"/autosaves"),method:"POST",data:d})):(Object(s.dispatch)("core/notices").removeNotice("SAVE_POST_NOTICE_ID"),Object(s.dispatch)("core/notices").removeNotice("autosave-exists"),b=vr()({path:"/wp/v2/".concat(p.rest_base,"/").concat(c.id),method:"PUT",data:d})),e.prev=17,e.next=20,b;case 20:f=e.sent,r((a?K:V)(f)),m=f.id!==c.id,r({type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:c,post:f,optimist:{type:m?h.REVERT:h.COMMIT,id:st},isAutosave:a,postType:p}),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(17),r({type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:h.REVERT,id:st},post:c,edits:l,error:e.t0});case 30:case"end":return e.stop()}},e,this,[[17,27]])}));return function(t,n){return e.apply(this,arguments)}}(),Sr=function(){var e=Object(hr.a)(regeneratorRuntime.mark(function e(t,n){var r,o,i,c,a,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.dispatch,o=n.getState,i=t.postId,c=yt(o()),e.next=5,Or("core","getPostType",c);case 5:return a=e.sent,Object(s.dispatch)("core/notices").removeNotice("TRASH_POST_NOTICE_ID"),e.prev=7,e.next=10,vr()({path:"/wp/v2/".concat(a.rest_base,"/").concat(i),method:"DELETE"});case 10:l=jt(o()),r(V(Object(u.a)({},l,{status:"trash"}))),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),r(Object(u.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)}}(),Er=function(){var e=Object(hr.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=jt(i),a=yt(o()),e.next=6,Or("core","getPostType",a);case 6:return s=e.sent,e.next=9,vr()({path:"/wp/v2/".concat(s.rest_base,"/").concat(c.id),data:{context:"edit"}});case 9:l=e.sent,r(V(l));case 11:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),Cr=n(44);function wr(){return(wr=Object(hr.a)(regeneratorRuntime.mark(function e(t){var n,r,o,i,c,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slug,r=t.term,e.next=3,Or("core","getTaxonomy",n);case 3:return o=e.sent,e.next=6,Object(s.dispatch)("core").saveEntityRecord("taxonomy",n,r);case 6:i=e.sent,c=Object(s.select)("core/editor").getEditedPostAttribute(o.rest_base),a=Object(y.sprintf)(Object(y._x)("%s added","term"),Object(v.get)(o,["data","labels","singular_name"],"category"===n?Object(y.__)("Category"):Object(y.__)("Term"))),Object(Cr.speak)(a,"assertive"),Object(s.dispatch)("core/editor").editPost(Object(b.a)({},o.rest_base,Object(p.a)(c).concat([i.id])));case 11:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}function Tr(e,t){var n=t.getState(),r=xn(n),o=Ln(n),c=!r||"all"!==o||Object(i.doBlocksMatchTemplate)(e.blocks,r);if(c!==Bn(n))return pe(c)}function Pr(e,t){if(!$t(t.getState()))return Fe()}var Ir={REQUEST_POST_UPDATE:function(e,t){_r(e,t)},REQUEST_POST_UPDATE_SUCCESS:function(e,t){var n=e.previousPost,r=e.post,o=e.isAutosave,i=e.postType,c=t.dispatch,a=t.getState;if(Object.keys(Et(a())).length&&c({type:"DIRTY_ARTIFICIALLY"}),!o){var l,u=["publish","private","future"],d=Object(v.includes)(u,n.status),p=Object(v.includes)(u,r.status),b=!0;if(d||p?d&&!p?(l=i.labels.item_reverted_to_draft,b=!1):l=!d&&p?{publish:i.labels.item_published,private:i.labels.item_published_privately,future:i.labels.item_scheduled}[r.status]:i.labels.item_updated:l=null,l){var f=[];b&&f.push({label:i.labels.view_item,url:r.link}),Object(s.dispatch)("core/notices").createSuccessNotice(l,{id:"SAVE_POST_NOTICE_ID",actions:f})}}},REQUEST_POST_UPDATE_FAILURE:function(e){var t=e.post,n=e.edits,r=e.error;if(!r||"rest_autosave_no_changes"!==r.code){var o=["publish","private","future"],i=-1!==o.indexOf(t.status),c={publish:Object(y.__)("Publishing failed"),private:Object(y.__)("Publishing failed"),future:Object(y.__)("Scheduling failed")},a=i||-1===o.indexOf(n.status)?Object(y.__)("Updating failed"):c[n.status];Object(s.dispatch)("core/notices").createErrorNotice(a,{id:"SAVE_POST_NOTICE_ID"}),r&&"cloudflare_error"===r.code&&Object(s.dispatch)("core/notices").createErrorNotice(Object(y.__)("Cloudflare is blocking REST API requests."),{actions:[{label:Object(y.__)("Learn More"),url:Object(kr.addQueryArgs)("post.php",{post:t.id,action:"edit","classic-editor":"","cloudflare-error":""})}]})}},TRASH_POST:function(e,t){Sr(e,t)},TRASH_POST_FAILURE:function(e){var t=e.error.message&&"unknown_error"!==e.error.code?e.error.message:Object(y.__)("Trashing failed");Object(s.dispatch)("core/notices").createErrorNotice(t,{id:"TRASH_POST_NOTICE_ID"})},REFRESH_POST:function(e,t){Er(e,t)},MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(l.a)(e.blocks,2),c=o[0],a=o[1],s=Kt(r,c),d=Kt(r,a),b=Object(i.getBlockType)(s.name);if(b.merge){var f=s.name===d.name?[d]:Object(i.switchToBlockType)(d,s.name);if(f&&f.length){var h=b.merge(s.attributes,f[0].attributes);n(X(s.clientId,-1)),n(ne([s.clientId,d.clientId],[Object(u.a)({},s,{attributes:Object(u.a)({},s.attributes,h)})].concat(Object(p.a)(f.slice(1)))))}}else n(X(s.clientId))},SETUP_EDITOR:function(e,t){var n=e.post,r=t.getState(),o=Object(i.parse)(n.content.raw),c="auto-draft"===n.status,a=xn(r);c&&a&&(o=Object(i.synchronizeBlocksWithTemplate)(o,a));var s={};c&&(s.title=n.title.raw);var l=W(n,o,s);return Object(v.compact)([l,Tr(l,t)])},RESET_BLOCKS:[Tr],SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=zt(n),o=xn(n);return q(Object(i.synchronizeBlocksWithTemplate)(r,o))},FETCH_REUSABLE_BLOCKS:function(e,t){gr(e,t)},SAVE_REUSABLE_BLOCK:function(e,t){jr(e,t)},DELETE_REUSABLE_BLOCK:function(e,t){yr(e,t)},RECEIVE_REUSABLE_BLOCKS:function(e){return G(Object(v.map)(e.results,"parsedBlock"))},CONVERT_BLOCK_TO_STATIC:function(e,t){var n,r=t.getState(),o=Kt(r,e.clientId),c=zn(r,o.attributes.ref),a=Kt(r,c.clientId);n="core/template"===a.name?a.innerBlocks.map(function(e){return Object(i.cloneBlock)(e)}):[Object(i.cloneBlock)(a)],t.dispatch(ne(o.clientId,n))},CONVERT_BLOCK_TO_REUSABLE:function(e,t){var n,r=t.getState,o=t.dispatch;1===e.clientIds.length?n=Kt(r(),e.clientIds[0]):o(G([n=Object(i.createBlock)("core/template",{},Yt(r(),e.clientIds))]));var c={id:Object(v.uniqueId)("reusable"),clientId:n.clientId,title:Object(y.__)("Untitled Reusable Block")};o(xe([{reusableBlock:c,parsedBlock:n}])),o(Le(c.id)),o(ne(e.clientIds,Object(i.createBlock)("core/block",{ref:c.id}))),o(G([n]))},REMOVE_BLOCKS:[function(e,t){if(e.selectPrevious){var n=e.clientIds[0],r=t.getState(),o=tn(r),i=Object(u.a)({},r,{editor:{present:Object(v.last)(r.editor.past)}}),c=nn(i,n),a=cn(i,n)||c;return a!==o?X(a,-1):void 0}},Pr],REPLACE_BLOCKS:[Pr],ADD_TERM_TO_EDITED_POST:function(e){!function(e){wr.apply(this,arguments)}(e)}};var Br=function(e){var t,n=[R()(Ir),F.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=v.flowRight.apply(void 0,Object(p.a)(t))(e.dispatch),e.dispatch=r,e},xr=Object(s.registerStore)("core/editor",{reducer:A,selectors:o,actions:r,persist:["preferences"]});Br(xr);var Lr=n(18),Ar=n(0),Nr=n(16),Rr=n.n(Nr),Dr=n(6),Fr=n(23),Mr=n(10),Ur=n(9),Hr=n(11),Vr=n(13),Kr=n(14),zr=n(3),Wr=n(4),qr=Object(Ar.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:v.noop,clientId:null}),Gr=qr.Consumer,Yr=qr.Provider,$r=function(e){return Object(Dr.createHigherOrderComponent)(function(t){return function(n){return Object(Ar.createElement)(Gr,null,function(r){return Object(Ar.createElement)(t,Object(Lr.a)({},n,e(r,n)))})}},"withBlockEditContext")},Xr=Object(Dr.createHigherOrderComponent)(function(e){return function(t){return Object(Ar.createElement)(Gr,null,function(n){return n.isSelected&&Object(Ar.createElement)(e,t)})}},"ifBlockEditSelected"),Qr=[];var Zr=Object(Dr.compose)([$r(function(e){return{blockName:e.name}}),function(e){return function(t){function n(){var e;return Object(Mr.a)(this,n),(e=Object(Hr.a)(this,Object(Vr.a)(n).call(this))).state={completers:Qr},e.saveParentRef=e.saveParentRef.bind(Object(zr.a)(Object(zr.a)(e))),e.onFocus=e.onFocus.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(n,t),Object(Ur.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(Fr.hasFilter)("editor.Autocomplete.completers")&&(n=Object(Fr.applyFilters)("editor.Autocomplete.completers",n&&n.map(v.clone),t)),this.setState({lastFilteredCompletersProp:r,completers:n||Qr})}},{key:"saveParentRef",value:function(e){this.parentNode=e}},{key:"render",value:function(){var t=this.state.completers,n=Object(u.a)({},this.props,{completers:t});return Object(Ar.createElement)("div",{onFocus:this.onFocus,ref:this.saveParentRef},Object(Ar.createElement)(e,Object(Lr.a)({onFocus:this.onFocus},n)))}}]),n}(Ar.Component)}])(Wr.Autocomplete);function Jr(e){var t=e.icon,n=e.showColors,r=void 0!==n&&n,o=e.className;"block-default"===Object(v.get)(t,["src"])&&(t={src:Object(Ar.createElement)(Wr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ar.createElement)(Wr.Path,{d:"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z"}))});var i=Object(Ar.createElement)(Wr.Icon,{icon:t&&t.src?t.src:t}),c=r?{backgroundColor:t&&t.background,color:t&&t.foreground}:{};return Object(Ar.createElement)("div",{style:c,className:Rr()("editor-block-icon",o,{"has-colors":r})},i)}function eo(){return Object(s.select)("core/editor").getBlockInsertionPoint().rootClientId}function to(e){return Object(s.select)("core/editor").getInserterItems(e)}function no(){var e=Object(s.select)("core/editor").getSelectedBlock();return e?e.name:null}var ro=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?eo:t,r=e.getInserterItems,o=void 0===r?to:r,c=e.getSelectedBlockName,a=void 0===c?no:c;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var e=a();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(p.a)(r).concat([t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(Ar.createElement)(Jr,{key:"icon",icon:t,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(i.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),oo={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),vr()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(Ar.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(Ar.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(Ar.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},io=[{icon:"editor-alignleft",title:Object(y.__)("Align left"),align:"left"},{icon:"editor-aligncenter",title:Object(y.__)("Align center"),align:"center"},{icon:"editor-alignright",title:Object(y.__)("Align right"),align:"right"}];var co=Object(Dr.compose)($r(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(s.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;function o(e){return function(){return r(n===e?void 0:e)}}var i=Object(v.find)(io,function(e){return e.align===n});return Object(Ar.createElement)(Wr.Toolbar,{isCollapsed:t,icon:i?i.icon:"editor-alignleft",label:Object(y.__)("Change Text Alignment"),controls:io.map(function(e){var t=e.align,r=n===t;return Object(u.a)({},e,{isActive:r,onClick:o(t)})})})}),ao={left:{icon:"align-left",title:Object(y.__)("Align left")},center:{icon:"align-center",title:Object(y.__)("Align center")},right:{icon:"align-right",title:Object(y.__)("Align right")},wide:{icon:"align-wide",title:Object(y.__)("Wide width")},full:{icon:"align-full-width",title:Object(y.__)("Full width")}},so=["left","center","right","wide","full"],lo=["wide","full"];var uo=Object(Dr.compose)($r(function(e){return{clientId:e.clientId}}),Object(a.withViewportMatch)({isLargeViewport:"medium"}),Object(s.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?so:o,c=e.wideControlsEnabled,a=void 0!==c&&c?i:i.filter(function(e){return-1===lo.indexOf(e)}),s=ao[n];return Object(Ar.createElement)(Wr.Toolbar,{isCollapsed:t,icon:s?s.icon:"align-left",label:Object(y.__)("Change Alignment"),controls:a.map(function(e){return Object(u.a)({},ao[e],{isActive:n===e,onClick:(t=e,function(){return r(n===t?void 0:t)})});var t})})}),po=Object(Wr.createSlotFill)("BlockControls"),bo=po.Fill,fo=po.Slot,ho=Xr(function(e){var t=e.controls,n=e.children;return Object(Ar.createElement)(bo,null,Object(Ar.createElement)(Wr.Toolbar,{controls:t}),n)});ho.Slot=fo;var mo=ho,vo=Object(Wr.withFilters)("editor.BlockEdit")(function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(i.getBlockType)(r);if(!o)return null;var c=Object(i.hasBlockSupport)(o,"className",!0)?Object(i.getBlockDefaultClassName)(r):null,a=Rr()(c,n.className),s=o.edit||o.save;return Object(Ar.createElement)(s,Object(Lr.a)({},e,{className:a}))}),Oo=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).call(this,e))).setFocusedElement=n.setFocusedElement.bind(Object(zr.a)(Object(zr.a)(n))),n.state={focusedElement:null,setFocusedElement:n.setFocusedElement},n}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"setFocusedElement",value:function(e){this.setState(function(t){return t.focusedElement===e?null:{focusedElement:e}})}},{key:"render",value:function(){return Object(Ar.createElement)(Yr,{value:this.state},Object(Ar.createElement)(vo,this.props))}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.clientId;return{name:e.name,isSelected:e.isSelected,clientId:t}}}]),t}(Ar.Component),go=Object(Wr.createSlotFill)("BlockFormatControls"),jo=go.Fill,yo=go.Slot,ko=Xr(jo);ko.Slot=yo;var _o=ko,So=n(17);function Eo(e){var t=e.blocks,n=e.selectedBlockClientId,r=e.selectBlock,o=e.showNestedBlocks;return Object(Ar.createElement)("ul",{className:"editor-block-navigation__list",role:"presentation"},Object(v.map)(t,function(e){var t=Object(i.getBlockType)(e.name);return Object(Ar.createElement)("li",{key:e.clientId,role:"presentation"},Object(Ar.createElement)("div",{role:"presentation",className:"editor-block-navigation__item"},Object(Ar.createElement)(Wr.MenuItem,{className:Rr()("editor-block-navigation__item-button",{"is-selected":e.clientId===n}),onClick:function(){return r(e.clientId)},isSelected:e.clientId===n},Object(Ar.createElement)(Jr,{icon:t.icon,showColors:!0}),t.title)),o&&!!e.innerBlocks&&!!e.innerBlocks.length&&Object(Ar.createElement)(Eo,{blocks:e.innerBlocks,selectedBlockClientId:n,selectBlock:r,showNestedBlocks:!0}))}))}var Co=Object(Dr.compose)(Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,i=t.getBlocks,c=n();return{rootBlocks:i(),rootBlock:c?o(r(c)):null,selectedBlockClientId:c}}),Object(s.withDispatch)(function(e,t){var n=t.onSelect,r=void 0===n?v.noop:n;return{selectBlock:function(t){e("core/editor").selectBlock(t),r(t)}}}))(function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(Ar.createElement)(Wr.MenuGroup,{label:Object(y.__)("Block Navigation")},i&&Object(Ar.createElement)(Eo,{blocks:[t],selectedBlockClientId:r,selectBlock:o,showNestedBlocks:!0}),!i&&Object(Ar.createElement)(Eo,{blocks:n,selectedBlockClientId:r,selectBlock:o}),(!n||0===n.length)&&Object(Ar.createElement)("p",{className:"editor-block-navigation__paragraph"},Object(y.__)("No blocks created yet.")))}),wo=Object(Ar.createElement)(Wr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},Object(Ar.createElement)(Wr.Path,{d:"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z"}));var To=function(){return Object(Ar.createElement)(Wr.Dropdown,{renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(Wr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},So.rawShortcut.access("o"),n)}),Object(Ar.createElement)(Wr.IconButton,{icon:wo,"aria-expanded":t,onClick:n,label:Object(y.__)("Block Navigation"),className:"editor-block-navigation",shortcut:So.displayShortcut.access("o")}))},renderContent:function(e){var t=e.onClose;return Object(Ar.createElement)(Co,{onSelect:t})}})},Po=Object(Dr.createHigherOrderComponent)(Object(s.withSelect)(function(e,t){var n=e("core/editor").getEditorSettings(),r=void 0===t.colors?n.colors:t.colors,o=void 0===t.disableCustomColors?n.disableCustomColors:t.disableCustomColors;return{colors:r,disableCustomColors:o,hasColorsToChoose:!Object(v.isEmpty)(r)||!o}}),"withColorContext"),Io=Po(Wr.ColorPalette),Bo=n(45),xo=n.n(Bo),Lo=function(e,t,n){if(t){var r=Object(v.find)(e,{slug:t});if(r)return r}return{color:n}},Ao=function(e,t){return Object(v.find)(e,{color:t})};function No(e,t){if(e&&t)return"has-".concat(Object(v.kebabCase)(t),"-").concat(e)}var Ro=[],Do=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(v.reduce)(t,function(e,t){return Object(u.a)({},e,Object(v.isString)(t)?Object(b.a)({},t,Object(v.kebabCase)(t)):t)},{});return Object(Dr.createHigherOrderComponent)(Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor").getEditorSettings();return{colors:Object(v.get)(t,["colors"],Ro)}}),function(e){return function(t){function n(e){var t;return Object(Mr.a)(this,n),(t=Object(Hr.a)(this,Object(Vr.a)(n).call(this,e))).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(zr.a)(Object(zr.a)(t)))},t.state={},t}return Object(Kr.a)(n,t),Object(Ur.a)(n,[{key:"getMostReadableColor",value:function(e){return function(e,t){return xo.a.mostReadable(t,Object(v.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(v.reduce)(r,function(t,n,r){var o=Object(v.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=Ao(n.props.colors,r);n.props.setAttributes((o={},Object(b.a)(o,e,i&&i.slug?i.slug:void 0),Object(b.a)(o,t,i&&i.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(Ar.createElement)(e,Object(u.a)({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.colors;return Object(v.reduce)(r,function(e,r,i){var c=Lo(o,n[i],n["custom".concat(Object(v.upperFirst)(i))]),a=t[i];return Object(v.get)(a,["color"])===c.color&&a?e[i]=a:e[i]=Object(u.a)({},c,{class:No(r,c.slug)}),e},{})}}]),n}(Ar.Component)}]),"withColors")};var Fo=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=xo()(t||n),s=xo()(c||r);if(1!==a.getAlpha()||1!==s.getAlpha()||xo.a.isReadable(a,s,{level:"AA",size:i||!1!==i&&o>=18?"large":"small"}))return null;var l=a.getBrightness()<s.getBrightness()?Object(y.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(y.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(Ar.createElement)("div",{className:"editor-contrast-checker"},Object(Ar.createElement)(Wr.Notice,{status:"warning",isDismissible:!1},l))},Mo=function(e,t,n){if(t){var r=Object(v.find)(e,{slug:t});if(r)return r}return{size:n}};function Uo(e){if(e)return"has-".concat(Object(v.kebabCase)(e),"-font-size")}var Ho=Object(s.withSelect)(function(e){var t=e("core/editor").getEditorSettings();return{disableCustomFontSizes:t.disableCustomFontSizes,fontSizes:t.fontSizes}})(Wr.FontSizePicker),Vo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(v.reduce)(t,function(e,t){return e[t]="custom".concat(Object(v.upperFirst)(t)),e},{});return Object(Dr.createHigherOrderComponent)(Object(Dr.compose)([Object(s.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(Hr.a)(this,Object(Vr.a)(n).call(this,e))).setters=t.createSetters(),t.state={},t}return Object(Kr.a)(n,t),Object(Ur.a)(n,[{key:"createSetters",value:function(){var e=this;return Object(v.reduce)(r,function(t,n,r){var o=Object(v.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(v.find)(n.props.fontSizes,{size:r});n.props.setAttributes((o={},Object(b.a)(o,e,i&&i.slug?i.slug:void 0),Object(b.a)(o,t,i&&i.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(Ar.createElement)(e,Object(u.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(v.some)(r,i))return null;var c=Object(v.reduce)(Object(v.pickBy)(r,i),function(e,t,r){var i=n[r],c=Mo(o,i,n[t]);return e[r]=Object(u.a)({},c,{class:Uo(i)}),e},{});return Object(u.a)({},t,c)}}]),n}(Ar.Component)}]),"withFontSizes")},Ko=n(41),zo=n.n(Ko),Wo=n(22);function qo(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(y.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(y.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(y.sprintf)(Object(y._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(y.sprintf)(Object(y._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(y.sprintf)(Object(y.__)("Block %s is the only block, and cannot be moved"),t):i>0&&!o?Object(y.sprintf)(Object(y.__)("Move %1$s block from position %2$d down to position %3$d"),t,c,c+1):i>0&&o?Object(y.sprintf)(Object(y.__)("Block %s is at the end of the content and cant be moved down"),t):i<0&&!r?Object(y.sprintf)(Object(y.__)("Move %1$s block from position %2$d up to position %3$d"),t,c,c-1):i<0&&r?Object(y.sprintf)(Object(y.__)("Block %s is at the beginning of the content and cant be moved up"),t):void 0}var Go=Object(Ar.createElement)(Wr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Ar.createElement)(Wr.Polygon,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),Yo=Object(Ar.createElement)(Wr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Ar.createElement)(Wr.Polygon,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),$o=Object(Ar.createElement)(Wr.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(Ar.createElement)(Wr.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"})),Xo=Object(s.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.onDragStart,a=e.onDragEnd,s={type:"block",srcIndex:i,srcRootClientId:r,srcClientId:n};return Object(Ar.createElement)(Wr.Draggable,{elementId:o,transferData:s,onDragStart:c,onDragEnd:a},function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})})}),Qo=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,c=e.blockElementId,a=e.clientId;if(!t)return null;var s=Rr()("editor-block-mover__control-drag-handle",n);return Object(Ar.createElement)(Xo,{clientId:a,blockElementId:c,onDragStart:o,onDragEnd:i},function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(Ar.createElement)("div",{className:s,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)})},Zo=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(zr.a)(Object(zr.a)(e))),e.onBlur=e.onBlur.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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,u=e.blockType,d=e.firstIndex,p=e.isLocked,b=e.instanceId,f=e.isHidden,h=this.state.isFocused,m=Object(v.castArray)(s).length;return p||r&&o?null:Object(Ar.createElement)("div",{className:Rr()("editor-block-mover",{"is-visible":h||!f})},Object(Ar.createElement)(Wr.IconButton,{className:"editor-block-mover__control",onClick:r?null:t,icon:Go,label:Object(y.__)("Move up"),"aria-describedby":"editor-block-mover__up-description-".concat(b),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Ar.createElement)(Qo,{className:"editor-block-mover__control",icon:$o,clientId:s,blockElementId:l,isVisible:i,onDragStart:c,onDragEnd:a}),Object(Ar.createElement)(Wr.IconButton,{className:"editor-block-mover__control",onClick:o?null:n,icon:Yo,label:Object(y.__)("Move down"),"aria-describedby":"editor-block-mover__down-description-".concat(b),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(Ar.createElement)("span",{id:"editor-block-mover__up-description-".concat(b),className:"editor-block-mover__description"},qo(m,u&&u.title,d,r,o,-1)),Object(Ar.createElement)("span",{id:"editor-block-mover__down-description-".concat(b),className:"editor-block-mover__description"},qo(m,u&&u.title,d,r,o,1)))}}]),t}(Ar.Component),Jo=Object(Dr.compose)(Object(s.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlock,c=r.getBlockIndex,a=r.getTemplateLock,s=r.getBlockRootClientId,l=Object(v.first)(Object(v.castArray)(n)),u=o(l),d=s(Object(v.first)(Object(v.castArray)(n)));return{firstIndex:c(l,d),blockType:u?Object(i.getBlockType)(u.name):null,isLocked:"all"===a(d),rootClientId:d}}),Object(s.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/editor"),i=o.moveBlocksDown,c=o.moveBlocksUp;return{onMoveDown:Object(v.partial)(i,n,r),onMoveUp:Object(v.partial)(c,n,r)}}),Dr.withInstanceId)(Zo),ei=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onFilesDrop=e.onFilesDrop.bind(Object(zr.a)(Object(zr.a)(e))),e.onHTMLDrop=e.onHTMLDrop.bind(Object(zr.a)(Object(zr.a)(e))),e.onDrop=e.onDrop.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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(i.findTransform)(Object(i.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(i.rawHandler)({HTML:e,mode:"BLOCKS"});n.length&&this.props.insertBlocks(n,this.getInsertIndex(t))}},{key:"onDrop",value:function(e,t){var n=this.props,r=n.rootClientId,o=n.clientId,i=n.index,c=n.getClientIdsOfDescendants,a=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),s=a.srcRootClientId,l=a.srcClientId,u=a.srcIndex,d=a.type;if("block"===d&&l!==o&&!function(e,t){return c([e]).some(function(e){return e===t})}(l,o)){var p,b,f=this.getInsertIndex(t),h=i&&u<i&&((p=s)===(b=r)||1==!p&&1==!b)?f-1:f;this.props.moveBlockToPosition(l,s,h)}}},{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(Ar.createElement)(Wr.DropZone,{className:Rr()("editor-block-drop-zone",{"is-appender":r}),onFilesDrop:this.onFilesDrop,onHTMLDrop:this.onHTMLDrop,onDrop:this.onDrop})}}]),t}(Ar.Component),ti=Object(Dr.compose)(Object(s.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;r(e,n,o)},updateBlockAttributes:function(){o.apply(void 0,arguments)},moveBlockToPosition:function(e,n,r){var o=t.rootClientId;i(e,n,o,r)}}}),Object(s.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getClientIdsOfDescendants;return{isLocked:!!(0,r.getTemplateLock)(n),getClientIdsOfDescendants:o}}),Object(Wr.withFilters)("editor.BlockDropZone"))(ei);var ni=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(Ar.createElement)("div",{className:Rr()(t,"editor-warning")},Object(Ar.createElement)("div",{className:"editor-warning__contents"},Object(Ar.createElement)("p",{className:"editor-warning__message"},r),Ar.Children.count(n)>0&&Object(Ar.createElement)("div",{className:"editor-warning__actions"},Ar.Children.map(n,function(e,t){return Object(Ar.createElement)("span",{key:t,className:"editor-warning__action"},e)}))),o&&Object(Ar.createElement)(Wr.Dropdown,{className:"editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(Ar.createElement)(Wr.IconButton,{icon:"ellipsis",label:Object(y.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(Ar.createElement)(Wr.MenuGroup,{label:Object(y.__)("More options")},o.map(function(e,t){return Object(Ar.createElement)(Wr.MenuItem,{onClick:e.onClick,key:t},e.title)}))}}))},ri=n(189),oi=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,c=e.className;return Object(Ar.createElement)("div",{className:c},Object(Ar.createElement)("div",{className:"editor-block-compare__content"},Object(Ar.createElement)("h1",{className:"editor-block-compare__heading"},t),Object(Ar.createElement)("div",{className:"editor-block-compare__html"},n),Object(Ar.createElement)("div",{className:"editor-block-compare__preview edit-post-visual-editor"},r)),Object(Ar.createElement)("div",{className:"editor-block-compare__action"},Object(Ar.createElement)(Wr.Button,{isLarge:!0,tabIndex:"0",onClick:o},i)))},ii=function(e){function t(){return Object(Mr.a)(this,t),Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"getDifference",value:function(e,t){return Object(ri.diffChars)(e,t).map(function(e,t){var n=Rr()({"editor-block-compare__added":e.added,"editor-block-compare__removed":e.removed});return Object(Ar.createElement)("span",{key:t,className:n},e.value)})}},{key:"getOriginalContent",value:function(e){var t=Object(i.getBlockType)(e.name);return{rawContent:e.originalContent,renderedContent:Object(i.getSaveElement)(t,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(v.castArray)(e),n=t.map(function(e){return Object(i.getSaveContent)(Object(i.getBlockType)(e.name),e.attributes,e.innerBlocks)}),r=t.map(function(e){return Object(i.getSaveElement)(Object(i.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(Ar.createElement)("div",{className:"editor-block-compare__wrapper"},Object(Ar.createElement)(oi,{title:Object(y.__)("Current"),className:"editor-block-compare__current",action:n,actionText:Object(y.__)("Convert to HTML"),rawContent:c.rawContent,renderedContent:c.renderedContent}),Object(Ar.createElement)(oi,{title:Object(y.__)("After Conversion"),className:"editor-block-compare__converted",action:r,actionText:i,rawContent:s,renderedContent:a.renderedContent}))}}]),t}(Ar.Component),ci=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Object(zr.a)(Object(zr.a)(n))),n.onCompareClose=n.onCompareClose.bind(Object(zr.a)(Object(zr.a)(n))),n}return Object(Kr.a)(t,e),Object(Ur.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,c=!!Object(i.getBlockType)("core/html"),a=this.state.compare,s=[{title:Object(y.__)("Convert to Classic Block"),onClick:r}];return a?Object(Ar.createElement)(Wr.Modal,{title:Object(y.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare"},Object(Ar.createElement)(ii,{block:o,onKeep:t,onConvert:n,convertor:ai,convertButtonText:Object(y.__)("Convert to Blocks")})):Object(Ar.createElement)(ni,{actions:[Object(Ar.createElement)(Wr.Button,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!c},Object(y._x)("Resolve","imperative verb")),c&&Object(Ar.createElement)(Wr.Button,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},Object(y.__)("Convert to HTML"))],secondaryActions:s},Object(y.__)("This block contains unexpected or invalid content."))}}]),t}(Ar.Component),ai=function(e){return Object(i.rawHandler)({HTML:e.originalContent,mode:"BLOCKS"})},si=Object(s.withDispatch)(function(e,t){var n=t.block,r=e("core/editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(i.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(i.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,ai(n))}}})(ci),li=Object(Ar.createElement)(ni,null,Object(y.__)("This block has encountered an error and cannot be previewed.")),ui=function(){return li},di=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={hasError:!1},e}return Object(Kr.a)(t,e),Object(Ur.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}(Ar.Component),pi=n(62),bi=n.n(pi),fi=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(zr.a)(Object(zr.a)(n))),n.onBlur=n.onBlur.bind(Object(zr.a)(Object(zr.a)(n))),n.state={html:e.block.isValid?Object(i.getBlockContent)(e.block):e.block.originalContent},n}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidUpdate",value:function(e){Object(v.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Object(i.getBlockContent)(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Object(i.getBlockType)(this.props.block.name),n=Object(i.getBlockAttributes)(t,e,this.props.block.attributes),r=e||Object(i.getSaveContent)(t,n),o=!e||Object(i.isValidBlockContent)(t,n,r);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(Ar.createElement)(bi.a,{className:"editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(Ar.Component),hi=Object(Dr.compose)([Object(s.withSelect)(function(e,t){return{block:e("core/editor").getBlock(t.clientId)}}),Object(s.withDispatch)(function(e){return{onChange:function(t,n,r,o){e("core/editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}})])(fi);var mi=Object(s.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(i.getBlockType)(t);return n?n.title:null}),vi=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Object(zr.a)(Object(zr.a)(e))),e.onBlur=e.onBlur.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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(Ar.createElement)("div",{className:Rr()("editor-block-list__breadcrumb",{"is-light":r})},Object(Ar.createElement)(Wr.Toolbar,null,n&&Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(mi,{clientId:n}),Object(Ar.createElement)("span",{className:"editor-block-list__descendant-arrow"})),Object(Ar.createElement)(mi,{clientId:t})))}}]),t}(Ar.Component),Oi=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockRootClientId,o=n.getEditorSettings;return{rootClientId:r(t.clientId),isLight:o().hasFixedToolbar}})])(vi),gi=window,ji=gi.Node,yi=gi.getSelection,ki=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(zr.a)(Object(zr.a)(e))),e.focusToolbar=e.focusToolbar.bind(Object(zr.a)(Object(zr.a)(e))),e.focusSelection=e.focusSelection.bind(Object(zr.a)(Object(zr.a)(e))),e.switchOnKeyDown=Object(v.cond)([[Object(v.matchesProperty)(["keyCode"],So.ESCAPE),e.focusSelection]]),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"bindNode",value:function(e){this.toolbar=Object(Ar.findDOMNode)(e)}},{key:"focusToolbar",value:function(){var e=Wo.focus.tabbable.find(this.toolbar);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=yi();if(e){var t=e.focusNode;t.nodeType!==ji.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"render",value:function(){var e=this.props,t=e.children,n=Object(d.a)(e,["children"]);return Object(Ar.createElement)(Wr.NavigableMenu,Object(Lr.a)({orientation:"horizontal",role:"toolbar",ref:this.bindNode,onKeyDown:this.switchOnKeyDown},n),Object(Ar.createElement)(Wr.KeyboardShortcuts,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(Ar.Component);var _i=function(){return Object(Ar.createElement)(ki,{className:"editor-block-contextual-toolbar","aria-label":Object(y.__)("Block Toolbar")},Object(Ar.createElement)(Il,null))};var Si=Object(s.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(v.first)(s),n),u=c(Object(v.last)(s),n);return{multiSelectedBlockClientIds:s,isSelecting:i(),isFirst:0===l,isLast:u+1===a()}})(function(e){var t=e.multiSelectedBlockClientIds,n=e.clientId,r=e.isSelecting,o=e.isFirst,i=e.isLast;return r?null:Object(Ar.createElement)(Jo,{key:"mover",clientId:n,clientIds:t,isFirst:o,isLast:i})}),Ei=n(57),Ci=n.n(Ei);function wi(e){var t=e.name,n=e.attributes,r=Object(i.createBlock)(t,n);return Object(Ar.createElement)(Wr.Disabled,{className:"editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(Ar.createElement)(Oo,{name:t,focus:!1,attributes:r.attributes,setAttributes:v.noop}))}var Ti=function(e){return Object(Ar.createElement)("div",{className:"editor-block-preview"},Object(Ar.createElement)("div",{className:"editor-block-preview__title"},Object(y.__)("Preview")),Object(Ar.createElement)(wi,e))};var Pi=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,r=e.onClick,o=e.isDisabled,i=e.title,c=e.className,a=Object(d.a)(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),s=t?{backgroundColor:t.background,color:t.foreground}:{},l=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(Ar.createElement)("li",{className:"editor-block-types-list__list-item"},Object(Ar.createElement)("button",Object(Lr.a)({className:Rr()("editor-block-types-list__item",c,{"editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),r()},disabled:o,"aria-label":i},a),Object(Ar.createElement)("span",{className:"editor-block-types-list__item-icon",style:s},Object(Ar.createElement)(Jr,{icon:t,showColors:!0}),n&&Object(Ar.createElement)("span",{className:"editor-block-types-list__item-icon-stack",style:l})),Object(Ar.createElement)("span",{className:"editor-block-types-list__item-title"},i)))};var Ii=function(e){var t=e.items,n=e.onSelect,r=e.onHover,o=void 0===r?function(){}:r,c=e.children;return Object(Ar.createElement)("ul",{role:"list",className:"editor-block-types-list"},t&&t.map(function(e){return Object(Ar.createElement)(Pi,{key:e.id,className:Object(i.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),o(null)},onFocus:function(){return o(e)},onMouseEnter:function(){return o(e)},onMouseLeave:function(){return o(null)},onBlur:function(){return o(null)},isDisabled:e.isDisabled,title:e.title})}),c)};var Bi=Object(Dr.compose)(Object(Dr.ifCondition)(function(e){var t=e.items;return t&&t.length>0}),Object(s.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(d.a)(e,["rootBlockIcon","rootBlockTitle","items"]);return Object(Ar.createElement)("div",{className:"editor-inserter__child-blocks"},(t||n)&&Object(Ar.createElement)("div",{className:"editor-inserter__parent-block-header"},Object(Ar.createElement)(Jr,{icon:t,showColors:!0}),n&&Object(Ar.createElement)("h2",null,n)),Object(Ar.createElement)(Ii,Object(Lr.a)({items:r},o)))}),xi=function(e){var t=e.filterValue;return Object(Ar.createElement)(Wr.Slot,{name:"Inserter.InlineElements",fillProps:{filterValue:t}},function(e){return!Object(v.isEmpty)(e)&&Object(Ar.createElement)(Wr.PanelBody,{title:Object(y.__)("Inline Elements"),initialOpen:!1,className:"editor-inserter__inline-elements"},Object(Ar.createElement)(Ii,null,e))})},Li=function(e){return e.stopPropagation()},Ai=function(e){return e=(e=(e=(e=Object(v.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Ni=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},e.onChangeSearchInput=e.onChangeSearchInput.bind(Object(zr.a)(Object(zr.a)(e))),e.onHover=e.onHover.bind(Object(zr.a)(Object(zr.a)(e))),e.panels={},e.inserterResults=Object(Ar.createRef)(),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchReusableBlocks(),this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"onChangeSearchInput",value:function(e){this.filter(e.target.value)}},{key:"onHover",value:function(e){this.setState({hoveredItem:e});var t=this.props,n=t.showInsertionPoint,r=t.hideInsertionPoint;if(e){var o=this.props;n(o.rootClientId,o.index)}else r()}},{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(v.without)(t.state.openPanels,e)}):(t.setState({openPanels:Object(p.a)(t.state.openPanels).concat([e])}),t.props.setTimeout(function(){Ci()(Object(Ar.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.debouncedSpeak,r=t.items,o=t.rootChildBlocks,c=function(e,t){var n=Ai(t),r=function(e){return-1!==Ai(e).indexOf(n)},o=Object(i.getCategories)();return e.filter(function(e){var t=Object(v.find)(o,{slug:e.category});return r(e.title)||Object(v.some)(e.keywords,r)||t&&r(t.title)})}(r,e),a=Object(v.filter)(c,function(e){var t=e.name;return Object(v.includes)(o,t)}),s=[];if(!e){var l=this.props.maxSuggestedItems||9;s=Object(v.filter)(r,function(e){return e.utility>0}).slice(0,l)}var u=Object(v.filter)(c,{category:"reusable"}),d=function(e){return Object(v.findIndex)(Object(i.getCategories)(),function(t){return t.slug===e.category})},p=Object(v.flow)(function(e){return Object(v.filter)(e,function(e){return"reusable"!==e.category})},function(e){return Object(v.sortBy)(e,d)},function(e){return Object(v.groupBy)(e,"category")})(c),b=this.state.openPanels;if(e!==this.state.filterValue)if(e){if(u.length)b=["reusable"];else if(c.length){b=[Object(v.find)(Object(i.getCategories)(),function(e){var t=e.slug;return p[t]&&p[t].length}).slug]}}else b=["suggested"];this.setState({hoveredItem:null,childItems:a,filterValue:e,suggestedItems:s,reusableItems:u,itemsPerCategory:p,openPanels:b});var f=Object.keys(p).reduce(function(e,t){return e+p[t].length},0);n(Object(y.sprintf)(Object(y._n)("%d result found.","%d results found.",f),f),"assertive")}},{key:"onKeyDown",value:function(e){Object(v.includes)([So.LEFT,So.DOWN,So.RIGHT,So.UP,So.BACKSPACE,So.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.onSelect,o=t.rootClientId,c=this.state,a=c.childItems,s=c.filterValue,l=c.hoveredItem,u=c.suggestedItems,d=c.reusableItems,p=c.itemsPerCategory,b=c.openPanels,f=function(e){return-1!==b.indexOf(e)},h=!!s;return Object(Ar.createElement)("div",{className:"editor-inserter__menu",onKeyPress:Li,onKeyDown:this.onKeyDown},Object(Ar.createElement)("label",{htmlFor:"editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(y.__)("Search for a block")),Object(Ar.createElement)("input",{id:"editor-inserter__search-".concat(n),type:"search",placeholder:Object(y.__)("Search for a block"),className:"editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(Ar.createElement)("div",{className:"editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(y.__)("Available block types")},Object(Ar.createElement)(Bi,{rootClientId:o,items:a,onSelect:r,onHover:this.onHover}),!!u.length&&Object(Ar.createElement)(Wr.PanelBody,{title:Object(y._x)("Most Used","blocks"),opened:f("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(Ar.createElement)(Ii,{items:u,onSelect:r,onHover:this.onHover})),Object(Ar.createElement)(xi,{filterValue:s}),Object(v.map)(Object(i.getCategories)(),function(t){var n=p[t.slug];return n&&n.length?Object(Ar.createElement)(Wr.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:h||f(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(Ar.createElement)(Ii,{items:n,onSelect:r,onHover:e.onHover})):null}),!!d.length&&Object(Ar.createElement)(Wr.PanelBody,{className:"editor-inserter__reusable-blocks-panel",title:Object(y.__)("Reusable"),opened:f("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(Ar.createElement)(Ii,{items:d,onSelect:r,onHover:this.onHover}),Object(Ar.createElement)("a",{className:"editor-inserter__manage-reusable-blocks",href:"edit.php?post_type=wp_block"},Object(y.__)("Manage All Reusable Blocks"))),Object(v.isEmpty)(u)&&Object(v.isEmpty)(d)&&Object(v.isEmpty)(p)&&Object(Ar.createElement)("p",{className:"editor-inserter__no-results"},Object(y.__)("No blocks found."))),l&&Object(i.isReusableBlock)(l)&&Object(Ar.createElement)(Ti,{name:l.name,attributes:l.initialAttributes}))}}]),t}(Ar.Component),Ri=Object(Dr.compose)(Object(s.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getEditedPostAttribute,i=r.getSelectedBlock,c=r.getInserterItems,a=r.getBlockName,s=e("core/blocks").getChildBlockNames,l=a(n);return{selectedBlock:i(),rootChildBlocks:s(l),title:o("title"),items:c(n),rootClientId:n}}),Object(s.withDispatch)(function(e,t){var n=e("core/editor");return{fetchReusableBlocks:n.__experimentalFetchReusableBlocks,showInsertionPoint:n.showInsertionPoint,hideInsertionPoint:n.hideInsertionPoint,onSelect:function(n){var r=e("core/editor"),o=r.replaceBlocks,c=r.insertBlock,a=t.selectedBlock,s=t.index,l=t.rootClientId,u=n.name,d=n.initialAttributes,p=Object(i.createBlock)(u,d);a&&Object(i.isUnmodifiedDefaultBlock)(a)?o(a.clientId,p):c(p,s,l),t.onSelect()}}}),Wr.withSpokenMessages,Dr.withInstanceId,Dr.withSafeTimeout)(Ni),Di=function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(Ar.createElement)(Wr.IconButton,{icon:"insert",label:Object(y.__)("Add block"),onClick:t,className:"editor-inserter__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n})},Fi=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onToggle=e.onToggle.bind(Object(zr.a)(Object(zr.a)(e))),e.renderToggle=e.renderToggle.bind(Object(zr.a)(Object(zr.a)(e))),e.renderContent=e.renderContent.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,i=r.renderToggle,c=void 0===i?Di:i;return c({onToggle:t,isOpen:n,disabled:o})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.index;return Object(Ar.createElement)(Ri,{onSelect:t,rootClientId:r,index:o})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.title;return Object(Ar.createElement)(Wr.Dropdown,{className:"editor-inserter",contentClassName:"editor-inserter__popover",position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:n,renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),t}(Ar.Component),Mi=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=t.rootClientId,r=t.index,o=e("core/editor"),i=o.getEditedPostAttribute,c=o.getBlockInsertionPoint,a=o.getInserterItems;if(void 0===n&&void 0===r){var s=c();n=s.rootClientId,r=s.index}return{title:i("title"),hasItems:a(n).length>0,rootClientId:n,index:r}}),Object(Dr.ifCondition)(function(e){return e.hasItems})])(Fi);var Ui=Object(a.ifViewportMatches)("< small")(function(e){var t=e.clientId;return Object(Ar.createElement)("div",{className:"editor-block-list__block-mobile-toolbar"},Object(Ar.createElement)(Mi,null),Object(Ar.createElement)(Jo,{clientIds:[t]}))}),Hi=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Object(zr.a)(Object(zr.a)(e))),e.onFocusInserter=e.onFocusInserter.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.canShowInserter,o=t.rootClientId,i=t.insertIndex;return Object(Ar.createElement)("div",{className:"editor-block-list__insertion-point"},n&&Object(Ar.createElement)("div",{className:"editor-block-list__insertion-point-indicator"}),r&&Object(Ar.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,className:Rr()("editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(Ar.createElement)(Mi,{rootClientId:o,index:i})))}}]),t}(Ar.Component),Vi=Object(s.withSelect)(function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/editor"),c=o.getBlockIndex,a=o.getBlockInsertionPoint,s=o.getBlock,l=o.isBlockInsertionPointVisible,u=c(n,r),d=a(),p=s(n);return{showInsertionPoint:l()&&d.index===u&&d.rootClientId===r&&!Object(i.isUnmodifiedDefaultBlock)(p),insertIndex:u}})(Hi),Ki=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Object(zr.a)(Object(zr.a)(e))),e.eventMap={},e}return Object(Kr.a)(t,e),Object(Ur.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(d.a)(t,["childHandledEvents"]),i=Object(v.reduce)(Object(p.a)(r).concat(Object(p.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(Ar.createElement)("div",Object(Lr.a)({},o,i))}}]),t}(Ar.Component);var zi=Object(Dr.compose)(Object(s.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(s.withDispatch)(function(e,t){var n=t.clientId,r=t.rootClientId;return{onInsert:function(t){var o=t.name,c=t.initialAttributes,a=Object(i.createBlock)(o,c);n?e("core/editor").replaceBlocks(n,a):e("core/editor").insertBlock(a,void 0,r)}}}))(function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(v.filter)(t,function(e){return!(e.isDisabled||e.name===Object(i.getDefaultBlockName)()&&Object(v.isEmpty)(e.initialAttributes))}).slice(0,3);return Object(Ar.createElement)("div",{className:"editor-inserter-with-shortcuts"},o.map(function(e){return Object(Ar.createElement)(Wr.IconButton,{key:e.id,className:"editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:Object(y.sprintf)(Object(y.__)("Add %s"),e.title),icon:Object(Ar.createElement)(Jr,{icon:e.icon})})}))}),Wi=Object(Dr.createHigherOrderComponent)(function(e){var t=function(t){function n(){var e;return Object(Mr.a)(this,n),(e=Object(Hr.a)(this,Object(Vr.a)(n).apply(this,arguments))).state={hoverArea:null},e.onMouseLeave=e.onMouseLeave.bind(Object(zr.a)(Object(zr.a)(e))),e.onMouseMove=e.onMouseMove.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(n,t),Object(Ur.a)(n,[{key:"componentDidMount",value:function(){this.container=Object(Ar.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(Ar.createElement)(e,Object(Lr.a)({},this.props,{hoverArea:t}))}}]),n}(Ar.Component);return Object(s.withSelect)(function(e){return{isRTL:e("core/editor").getEditorSettings().isRTL}})(t)});function qi(e){return document.querySelector('[data-block="'+e+'"]')}var Gi=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setBlockListRef=e.setBlockListRef.bind(Object(zr.a)(Object(zr.a)(e))),e.bindBlockNode=e.bindBlockNode.bind(Object(zr.a)(Object(zr.a)(e))),e.setAttributes=e.setAttributes.bind(Object(zr.a)(Object(zr.a)(e))),e.maybeHover=e.maybeHover.bind(Object(zr.a)(Object(zr.a)(e))),e.hideHoverEffects=e.hideHoverEffects.bind(Object(zr.a)(Object(zr.a)(e))),e.mergeBlocks=e.mergeBlocks.bind(Object(zr.a)(Object(zr.a)(e))),e.insertBlocksAfter=e.insertBlocksAfter.bind(Object(zr.a)(Object(zr.a)(e))),e.onFocus=e.onFocus.bind(Object(zr.a)(Object(zr.a)(e))),e.preventDrag=e.preventDrag.bind(Object(zr.a)(Object(zr.a)(e))),e.onPointerDown=e.onPointerDown.bind(Object(zr.a)(Object(zr.a)(e))),e.deleteOrInsertAfterWrapper=e.deleteOrInsertAfterWrapper.bind(Object(zr.a)(Object(zr.a)(e))),e.onBlockError=e.onBlockError.bind(Object(zr.a)(Object(zr.a)(e))),e.onTouchStart=e.onTouchStart.bind(Object(zr.a)(Object(zr.a)(e))),e.onClick=e.onClick.bind(Object(zr.a)(Object(zr.a)(e))),e.onDragStart=e.onDragStart.bind(Object(zr.a)(Object(zr.a)(e))),e.onDragEnd=e.onDragEnd.bind(Object(zr.a)(Object(zr.a)(e))),e.selectOnOpen=e.selectOnOpen.bind(Object(zr.a)(Object(zr.a)(e))),e.hadTouchStart=!1,e.state={error:null,dragging:!1,isHovered:!1},e}return Object(Kr.a)(t,e),Object(Ur.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(!0),this.props.isFirstMultiSelected&&!e.isFirstMultiSelected&&this.wrapperNode.focus()}},{key:"setBlockListRef",value:function(e){e=Object(Ar.findDOMNode)(e),this.wrapperNode=e,this.props.blockRef(e,this.props.clientId)}},{key:"bindBlockNode",value:function(e){this.node=Object(Ar.findDOMNode)(e)}},{key:"focusTabbable",value:function(e){var t=this,n=this.props.initialPosition;if(!this.wrapperNode.contains(document.activeElement)){var r=Wo.focus.tabbable.find(this.node).filter(Wo.isTextField).filter(function(n){return!e||(r=t.node,o=n,i=r.querySelector(".editor-block-list__layout"),r.contains(o)&&(!i||!i.contains(o)));var r,o,i}),o=-1===n,i=(o?v.last:v.first)(r);i?(i.focus(),o&&(Object(Wo.placeCaretAtHorizontalEdge)(i,!0),Object(Wo.placeCaretAtVerticalEdge)(i,!0))):this.wrapperNode.focus()}}},{key:"setAttributes",value:function(e){var t=this.props,n=t.block,r=t.onChange,o=Object(i.getBlockType)(n.name);r(n.clientId,e);var c=Object(v.reduce)(e,function(e,t,n){return"meta"===Object(v.get)(o,["attributes",n,"source"])&&(e[o.attributes[n].meta]=t),e},{});Object(v.size)(c)&&this.props.onMetaChange(Object(u.a)({},this.props.meta,c))}},{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,n=e.target;if(this.props.isSelected&&n===this.wrapperNode&&!this.props.isLocked)switch(t){case So.ENTER:this.props.onInsertDefaultBlockAfter(),e.preventDefault();break;case So.BACKSPACE:case So.DELETE:var r=this.props,o=r.clientId;(0,r.onRemove)(o),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,c=e.hasFixedToolbar,a=e.isLocked,s=e.isFirst,l=e.isLast,d=e.clientId,p=e.rootClientId,b=e.isSelected,f=e.isPartOfMultiSelection,h=e.isFirstMultiSelected,m=e.isTypingWithinBlock,v=e.isCaretWithinFormattedText,O=e.isMultiSelecting,g=e.hoverArea,j=e.isEmptyDefaultBlock,k=e.isMovable,_=e.isPreviousBlockADefaultEmptyBlock,S=e.isParentOfSelectedBlock,E=e.isDraggable,C=this.state.isHovered&&!O,w=t.name,T=t.isValid,P=Object(i.getBlockType)(w),I=Object(y.sprintf)(Object(y.__)("Block: %s"),P.title),B=t.name===Object(i.getUnregisteredTypeHandlerName)(),x=(b||C)&&j&&T,L=(b||C)&&j,A=!o&&!c&&!L&&b&&!m,N=!o&&!c&&C&&!j,R=!o&&(b||"left"===g)&&!x&&!O&&!f&&!m,D=!o&&C&&!j,F=!c&&!L&&(b&&(!m||v)||h),M=A,U=this.state,H=U.error,V=U.dragging,K=f&&h||!f,z=!j&&!_,W=Rr()("wp-block editor-block-list__block",{"has-warning":!T||!!H||B,"is-selected":A,"is-multi-selected":f,"is-hovered":N,"is-reusable":Object(i.isReusableBlock)(P),"is-dragging":V,"is-typing":m,"is-focused":o&&(b||S),"is-focus-mode":o}),q=this.props.onReplace,G=this.props.wrapperProps;P.getEditWrapperProps&&(G=Object(u.a)({},G,P.getEditWrapperProps(t.attributes)));var Y="block-".concat(d),$=Object(Ar.createElement)(Oo,{name:w,isSelected:b,attributes:t.attributes,setAttributes:this.setAttributes,insertBlocksAfter:a?void 0:this.insertBlocksAfter,onReplace:a?void 0:q,mergeBlocks:a?void 0:this.mergeBlocks,clientId:d,isSelectionEnabled:this.props.isSelectionEnabled,toggleSelection:this.props.toggleSelection});return"visual"!==r&&($=Object(Ar.createElement)("div",{style:{display:"none"}},$)),Object(Ar.createElement)(Ki,Object(Lr.a)({id:Y,ref:this.setBlockListRef,onMouseOver:this.maybeHover,onMouseOverHandled:this.hideHoverEffects,onMouseLeave:this.hideHoverEffects,className:W,"data-type":t.name,onTouchStart:this.onTouchStart,onFocus:this.onFocus,onClick:this.onClick,onKeyDown:this.deleteOrInsertAfterWrapper,tabIndex:"0","aria-label":I,childHandledEvents:["onDragStart","onMouseDown"]},G),K&&Object(Ar.createElement)(Vi,{clientId:d,rootClientId:p,canShowInserter:z}),Object(Ar.createElement)(ti,{index:n,clientId:d,rootClientId:p}),R&&Object(Ar.createElement)(Jo,{clientIds:d,blockElementId:Y,isFirst:s,isLast:l,isHidden:!(C||b)||"left"!==g,isDraggable:!1!==E&&!f&&k,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}),D&&Object(Ar.createElement)(Oi,{clientId:d,isHidden:!(C||b)||"left"!==g}),F&&Object(Ar.createElement)(_i,null),h&&Object(Ar.createElement)(Si,{rootClientId:p}),Object(Ar.createElement)(Ki,{ref:this.bindBlockNode,onDragStart:this.preventDrag,onMouseDown:this.onPointerDown,className:"editor-block-list__block-edit","data-block":d},Object(Ar.createElement)(di,{onError:this.onBlockError},T&&$,T&&"html"===r&&Object(Ar.createElement)(hi,{clientId:d}),!T&&[Object(Ar.createElement)(si,{key:"invalid-warning",block:t}),Object(Ar.createElement)("div",{key:"invalid-preview"},Object(i.getSaveElement)(P,t.attributes))]),M&&Object(Ar.createElement)(Ui,{clientId:d}),!!H&&Object(Ar.createElement)(ui,null)),x&&Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)("div",{className:"editor-block-list__side-inserter"},Object(Ar.createElement)(zi,{clientId:d,rootClientId:p,onToggle:this.selectOnOpen})),Object(Ar.createElement)("div",{className:"editor-block-list__empty-block-inserter"},Object(Ar.createElement)(Mi,{position:"top right",onToggle:this.selectOnOpen}))))}}]),t}(Ar.Component),Yi=Object(s.withSelect)(function(e,t){var n=t.clientId,r=t.rootClientId,o=t.isLargeViewport,c=e("core/editor"),a=c.isBlockSelected,s=c.getPreviousBlockClientId,l=c.getNextBlockClientId,u=c.getBlock,d=c.isAncestorMultiSelected,p=c.isBlockMultiSelected,b=c.isFirstMultiSelectedBlock,f=c.isMultiSelecting,h=c.isTyping,m=c.isCaretWithinFormattedText,v=c.getBlockIndex,O=c.getEditedPostAttribute,g=c.getBlockMode,j=c.isSelectionEnabled,y=c.getSelectedBlocksInitialCaretPosition,k=c.getEditorSettings,_=c.hasSelectedInnerBlock,S=c.getTemplateLock,E=a(n),C=k(),w=C.hasFixedToolbar,T=C.focusMode,P=u(n),I=s(n),B=u(I),x=S(r),L=_(n,!0);return{nextBlockClientId:l(n),isPartOfMultiSelection:p(n)||d(n),isFirstMultiSelected:b(n),isMultiSelecting:f(),isTypingWithinBlock:(E||L)&&h(),isCaretWithinFormattedText:m(),order:v(n,r),meta:O("meta"),mode:g(n),isSelectionEnabled:j(),initialPosition:y(),isEmptyDefaultBlock:P&&Object(i.isUnmodifiedDefaultBlock)(P),isPreviousBlockADefaultEmptyBlock:B&&Object(i.isUnmodifiedDefaultBlock)(B),isMovable:"all"!==x,isLocked:!!x,isFocusMode:T&&o,hasFixedToolbar:w&&o,previousBlockClientId:I,block:P,isSelected:E,isParentOfSelectedBlock:L}}),$i=Object(s.withDispatch)(function(e,t){var n=e("core/editor"),r=n.updateBlockAttributes,o=n.selectBlock,i=n.insertBlocks,c=n.insertDefaultBlock,a=n.removeBlock,s=n.mergeBlocks,l=n.replaceBlocks,u=n.editPost,d=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;i(e,n,r)},onInsertDefaultBlockAfter:function(){var e=t.order,n=t.rootClientId;c({},n,e+1)},onRemove:function(e){a(e)},onMerge:function(){s.apply(void 0,arguments)},onReplace:function(e){l([t.clientId],e)},onMetaChange:function(e){u({meta:e})},toggleSelection:function(e){d(e)}}}),Xi=Object(Dr.compose)(Object(a.withViewportMatch)({isLargeViewport:"medium"}),Yi,$i,Object(Wr.withFilters)("editor.BlockListBlock"),Wi)(Gi),Qi=n(50);var Zi=Object(Dr.compose)(Object(s.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockCount,o=n.getBlock,c=n.getEditorSettings,a=n.getTemplateLock,s=!r(t.rootClientId),l=o(t.lastBlockClientId),u=Object(v.get)(l,["name"])===Object(i.getDefaultBlockName)(),d=Object(v.get)(l,["isValid"]),p=c().bodyPlaceholder;return{isVisible:s||!u||!d,showPrompt:s,isLocked:!!a(t.rootClientId),placeholder:p}}),Object(s.withDispatch)(function(e,t){var n=e("core/editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}}))(function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,i=e.placeholder,c=e.rootClientId;if(t||!n)return null;var a=Object(Qi.decodeEntities)(i)||Object(y.__)("Write your story");return Object(Ar.createElement)("div",{"data-root-client-id":c||"",className:"wp-block editor-default-block-appender"},Object(Ar.createElement)(ti,{rootClientId:c}),Object(Ar.createElement)("input",{role:"button","aria-label":Object(y.__)("Add block"),className:"editor-default-block-appender__content",type:"text",readOnly:!0,onFocus:r,value:o?a:""}),Object(Ar.createElement)(zi,{rootClientId:c}),Object(Ar.createElement)(Mi,{position:"top right"}))});var Ji=Object(s.withSelect)(function(e,t){var n=t.rootClientId,r=e("core/editor"),o=r.getBlockOrder,c=r.canInsertBlockType;return{isLocked:!!(0,r.getTemplateLock)(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(i.getDefaultBlockName)(),n)}})(function(e){var t=e.blockClientIds,n=e.rootClientId,r=e.canInsertDefaultBlock;return e.isLocked?null:r?Object(Ar.createElement)(Ki,{childHandledEvents:["onFocus","onClick","onKeyDown"]},Object(Ar.createElement)(Zi,{rootClientId:n,lastBlockClientId:Object(v.last)(t)})):Object(Ar.createElement)("div",{className:"block-list-appender"},Object(Ar.createElement)(Mi,{rootClientId:n,renderToggle:function(e){var t=e.onToggle,n=e.disabled,r=e.isOpen;return Object(Ar.createElement)(Wr.Button,{"aria-label":Object(y.__)("Add block"),onClick:t,className:"block-list-appender__toggle","aria-haspopup":"true","aria-expanded":r,disabled:n},Object(Ar.createElement)(Wr.Dashicon,{icon:"insert"}))}}))}),ec=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).call(this,e))).onSelectionStart=n.onSelectionStart.bind(Object(zr.a)(Object(zr.a)(n))),n.onSelectionEnd=n.onSelectionEnd.bind(Object(zr.a)(Object(zr.a)(n))),n.onShiftSelection=n.onShiftSelection.bind(Object(zr.a)(Object(zr.a)(n))),n.setBlockRef=n.setBlockRef.bind(Object(zr.a)(Object(zr.a)(n))),n.setLastClientY=n.setLastClientY.bind(Object(zr.a)(Object(zr.a)(n))),n.onPointerMove=Object(v.throttle)(n.onPointerMove.bind(Object(zr.a)(Object(zr.a)(n))),100),n.onScroll=function(){return n.onPointerMove({clientY:n.lastClientY})},n.lastClientY=0,n.nodes={},n}return Object(Kr.a)(t,e),Object(Ur.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(u.a)({},this.nodes,Object(b.a)({},t,e))}},{key:"onPointerMove",value:function(e){var t=e.clientY;this.props.isMultiSelecting||this.props.onStartMultiSelect();var n=t-this.nodes[this.selectionAtStart].getBoundingClientRect().top,r=Object(v.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(v.mapValues)(this.nodes,function(e){return e.getBoundingClientRect().top-t.top});this.coordMap=Object(v.invert)(n),this.coordMapKeys=Object(v.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=this,t=this.props,n=t.blockClientIds,r=t.rootClientId,o=t.isDraggable;return Object(Ar.createElement)("div",{className:"editor-block-list__layout"},Object(v.map)(n,function(t,i){return Object(Ar.createElement)(Xi,{key:"block-"+t,index:i,clientId:t,blockRef:e.setBlockRef,onSelectionStart:e.onSelectionStart,onShiftSelection:e.onShiftSelection,rootClientId:r,isFirst:0===i,isLast:i===n.length-1,isDraggable:o})}),Object(Ar.createElement)(Ji,{rootClientId:r}))}}]),t}(Ar.Component),tc=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlockOrder,o=n.isSelectionEnabled,i=n.isMultiSelecting,c=n.getMultiSelectedBlocksStartClientId,a=n.getMultiSelectedBlocksEndClientId,s=n.getBlockSelectionStart;return{blockClientIds:r(t.rootClientId),selectionStart:c(),selectionEnd:a(),selectionStartClientId:s(),isSelectionEnabled:o(),isMultiSelecting:i()}}),Object(s.withDispatch)(function(e){var t=e("core/editor");return{onStartMultiSelect:t.startMultiSelect,onStopMultiSelect:t.stopMultiSelect,onMultiSelect:t.multiSelect,onSelect:t.selectBlock}})])(ec),nc=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).updateNestedSettings(),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"getTemplateLock",value:function(){var e=this.props,t=e.templateLock,n=e.parentLock;return void 0===t?n:t}},{key:"componentDidMount",value:function(){if(0===this.props.block.innerBlocks.length||"all"===this.getTemplateLock())return this.synchronizeBlocksWithTemplate()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.template,r=t.block.innerBlocks;(this.updateNestedSettings(),0===r.length||"all"===this.getTemplateLock())&&(!Object(v.isEqual)(n,e.template)&&this.synchronizeBlocksWithTemplate())}},{key:"synchronizeBlocksWithTemplate",value:function(){var e=this.props,t=e.template,n=e.block,r=e.replaceInnerBlocks,o=n.innerBlocks,c=Object(i.synchronizeBlocksWithTemplate)(o,t);Object(v.isEqual)(c,o)||r(c)}},{key:"updateNestedSettings",value:function(){var e=this.props,t=e.blockListSettings,n=e.allowedBlocks,r=e.updateNestedSettings,o={allowedBlocks:n,templateLock:this.getTemplateLock()};zo()(t,o)||r(o)}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.allowedBlocks,r=e.templateLock,o=e.template,i=e.isSmallScreen,c=e.isSelectedBlockInRoot,a=Rr()("editor-inner-blocks",{"has-overlay":i&&!c});return Object(Ar.createElement)("div",{className:a},Object(Ar.createElement)(tc,Object(Lr.a)({rootClientId:t},{allowedBlocks:n,templateLock:r,template:o})))}}]),t}(Ar.Component);(nc=Object(Dr.compose)([$r(function(e){return Object(v.pick)(e,["clientId"])}),Object(a.withViewportMatch)({isSmallScreen:"< medium"}),Object(s.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(s.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(v.map)(c.innerBlocks,"clientId");t.length?r(t,e):o(e,void 0,a)},updateNestedSettings:function(t){e(i(a,t))}}})])(nc)).Content=Object(i.withBlockContentContext)(function(e){var t=e.BlockContent;return Object(Ar.createElement)(t,null)});var rc=nc,oc=Object(Wr.createSlotFill)("InspectorAdvancedControls"),ic=oc.Fill,cc=oc.Slot,ac=Xr(ic);ac.Slot=cc;var sc=ac,lc=Object(Wr.createSlotFill)("InspectorControls"),uc=lc.Fill,dc=lc.Slot,pc=Xr(uc);pc.Slot=dc;var bc=pc;var fc=Object(Dr.compose)([Po,Object(Dr.ifCondition)(function(e){return e.hasColorsToChoose})])(function(e){var t=e.colors,n=e.title,r=e.colorValue,o=e.initialOpen,i=Object(d.a)(e,["colors","title","colorValue","initialOpen"]);U()("wp.editor.PanelColor",{version:"4.3",alternative:"wp.editor.PanelColorSettings",plugin:"Gutenberg"});var c=Ao(t,r),a=c&&c.name;return Object(Ar.createElement)(Wr.PanelColor,{title:n,colorName:a,colorValue:r,initialOpen:o},Object(Ar.createElement)(Io,Object(Lr.a)({value:r},Object(v.omit)(i,["disableCustomColors"]))))}),hc=Object(y.__)("(current %s: %s)");var mc=Object(Dr.compose)([Po,Object(Dr.ifCondition)(function(e){return e.hasColorsToChoose})])(function(e){var t=e.colors,n=e.disableCustomColors,r=e.label,o=e.onChange,i=e.value,c=Ao(t,i),a=c&&c.name,s=Object(y.sprintf)(hc,r.toLowerCase(),a||i),l=Object(Ar.createElement)(Ar.Fragment,null,r,i&&Object(Ar.createElement)(Wr.ColorIndicator,{colorValue:i,"aria-label":s}));return Object(Ar.createElement)(Wr.BaseControl,{className:"editor-color-palette-control",label:l},Object(Ar.createElement)(Io,Object(Lr.a)({className:"editor-color-palette-control__color-palette",value:i,onChange:o},{colors:t,disableCustomColors:n})))}),vc=Object(y.__)("(%s: %s)"),Oc=Object(Dr.ifCondition)(function(e){var t=e.colors,n=e.disableCustomColors,r=e.colorSettings;return Object(v.some)(r,function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return!function(e,t){return void 0!==t.disableCustomColors?t.disableCustomColors:e}(t,n)||(n.colors||e).length>0}(t,n,e)})})(function(e){var t=e.children,n=e.colors,r=e.colorSettings,o=e.disableCustomColors,i=e.title,c=Object(d.a)(e,["children","colors","colorSettings","disableCustomColors","title"]),a=Object(Ar.createElement)("span",{className:"".concat("editor-panel-color-settings","__panel-title")},i,function(e,t){return e.map(function(e,n){var r=e.value,o=e.label,i=e.colors;if(!r)return null;var c=Ao(i||t,r),a=c&&c.name,s=Object(y.sprintf)(vc,o.toLowerCase(),a||r);return Object(Ar.createElement)(Wr.ColorIndicator,{key:n,colorValue:r,"aria-label":s})})}(r,n));return Object(Ar.createElement)(Wr.PanelBody,Object(Lr.a)({className:"editor-panel-color-settings",title:a},c),r.map(function(e,t){return Object(Ar.createElement)(mc,Object(Lr.a)({key:t},Object(u.a)({colors:n,disableCustomColors:o},e)))}),t)}),gc=Po(Oc);var jc=function(e){var t=e.onChange,n=e.className,r=Object(d.a)(e,["onChange","className"]);return Object(Ar.createElement)(bi.a,Object(Lr.a)({className:Rr()("editor-plain-text",n),onChange:function(e){return t(e.target.value)}},r))},yc=n(51),kc=n.n(yc),_c=n(31),Sc=n(21);function Ec(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,i=Object(d.a)(e,["name","shortcutType","shortcutCharacter"]),c="RichText.ToolbarControls";return n&&(c+=".".concat(n)),r&&o&&(t=So.displayShortcut[r](o)),Object(Ar.createElement)(Wr.Fill,{name:c},Object(Ar.createElement)(Wr.ToolbarButton,Object(Lr.a)({},i,{shortcut:t})))}function Cc(e){return Object(Ar.createElement)(Wr.Fill,{name:"Inserter.InlineElements"},function(t){var n=t.filterValue;return n&&!function(e,t){var n=e.title,r=e.keywords,o=void 0===r?[]:r,i=Ai(t),c=function(e){return-1!==Ai(e).indexOf(i)};return c(n)||o.some(c)}(e,n)?null:Object(Ar.createElement)(Pi,Object(Lr.a)({},e,{icon:Object(i.normalizeIconObject)(e.icon)}))})}var wc=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onUse=e.onUse.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"onUse",value:function(){return this.props.onUse(),!1}},{key:"render",value:function(){var e=this.props,t=e.character,n=e.type;return Object(Ar.createElement)(Wr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},So.rawShortcut[n](t),this.onUse)})}}]),t}(Ar.Component),Tc=function(e){var t=e.onChange,n=e.value;return Object(Ar.createElement)(Ar.Fragment,null,Object(Sc.getFormatTypes)().map(function(e){var r=e.name,o=e.edit,i=e.keywords;if(!o)return null;var c=Object(Sc.getActiveFormat)(n,r),a=void 0!==c,s=a&&c.attributes||{};return Object(Ar.createElement)(o,{key:r,isActive:a,activeAttributes:s,value:n,onChange:t,ToolbarButton:Ec,InserterListItem:function(e){return Object(Ar.createElement)(Cc,Object(Lr.a)({keywords:i},e))},Shortcut:wc})}))},Pc=function(e){var t=e.controls;return Object(Ar.createElement)("div",{className:"editor-format-toolbar"},Object(Ar.createElement)(Wr.Toolbar,null,t.map(function(e){return Object(Ar.createElement)(Wr.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})}),Object(Ar.createElement)(Wr.Slot,{name:"RichText.ToolbarControls"})))},Ic=n(190),Bc=n.n(Ic),xc=function(e){return Object(v.pickBy)(e,function(e,t){return n=t,Object(v.startsWith)(n,"aria-")&&!Object(v.isNil)(e);var n})};var Lc=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).call(this))).bindEditorNode=e.bindEditorNode.bind(Object(zr.a)(Object(zr.a)(e))),e.onFocus=e.onFocus.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"onFocus",value:function(){this.initialize()}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.configureIsPlaceholderVisible(e.isPlaceholderVisible),Object(v.isEqual)(this.props.style,e.style)||(this.editorNode.setAttribute("style",""),Object.assign(this.editorNode.style,e.style)),Object(v.isEqual)(this.props.className,e.className)||(this.editorNode.className=Rr()(e.className,"editor-rich-text__tinymce"));var n=function(e,t){var n=Object(v.keys)(xc(e)),r=Object(v.keys)(xc(t));return{removedKeys:Object(v.difference)(n,r),updatedKeys:r.filter(function(n){return!Object(v.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,verify_html:!1,inline_boundaries_selector:"a[href],code,b,i,strong,em,del,ins,sup,sub",plugins:[]});Bc.a.init(Object(u.a)({},t,{target:this.editorNode,setup:function(t){var n;e.editor=t,e.props.onSetup(t),t.on("preinit",function(){n=t.dom.setHTML,t.dom.setHTML=function(){}}),t.on("init",function(){["b","i","u"].forEach(function(e){t.shortcuts.remove("meta+".concat(e))}),[1,2,3,4,5,6,7,8,9].forEach(function(e){t.shortcuts.remove("access+".concat(e))}),t.dom.setHTML=n})}}))}},{key:"bindEditorNode",value:function(e){this.editorNode=e,this.props.setRef&&this.props.setRef(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((So.BACKSPACE===r||So.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=xc(this.props),n=this.props,r=n.tagName,o=void 0===r?"div":r,c=n.style,a=n.defaultValue,s=n.className,l=n.isPlaceholderVisible,d=n.onPaste,p=n.onInput,f=n.multilineTag,h=n.multilineWrapperTags;"table"!==o&&(t.role="textbox",t["aria-multiline"]=!0);var m=a;return null===a?m="":Array.isArray(a)?m=i.children.toHTML(a):"string"!=typeof a&&(m=Object(Sc.toHTMLString)({value:a,multilineTag:f,multilineWrapperTags:h})),""===m&&(m='<br data-mce-bogus="1">'),Object(Ar.createElement)(o,Object(u.a)({},t,(e={className:Rr()(s,"editor-rich-text__tinymce"),contentEditable:!0},Object(b.a)(e,"data-is-placeholder-visible",l),Object(b.a)(e,"ref",this.bindEditorNode),Object(b.a)(e,"style",c),Object(b.a)(e,"suppressContentEditableWarning",!0),Object(b.a)(e,"dangerouslySetInnerHTML",{__html:m}),Object(b.a)(e,"onPaste",d),Object(b.a)(e,"onInput",p),Object(b.a)(e,"onFocus",this.onFocus),e)))}}]),t}(Ar.Component);var Ac=window,Nc=Ac.Node,Rc=Ac.getSelection,Dc=function(e){function t(e){var n,r=e.value,o=e.onReplace,c=e.multiline;return Object(Mr.a)(this,t),n=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments)),!0!==c&&"p"!==c&&"li"!==c||(n.multilineTag=!0===c?"p":c),"li"===n.multilineTag&&(n.multilineWrapperTags=["ul","ol"]),n.onInit=n.onInit.bind(Object(zr.a)(Object(zr.a)(n))),n.getSettings=n.getSettings.bind(Object(zr.a)(Object(zr.a)(n))),n.onSetup=n.onSetup.bind(Object(zr.a)(Object(zr.a)(n))),n.onFocus=n.onFocus.bind(Object(zr.a)(Object(zr.a)(n))),n.onChange=n.onChange.bind(Object(zr.a)(Object(zr.a)(n))),n.onNodeChange=n.onNodeChange.bind(Object(zr.a)(Object(zr.a)(n))),n.onDeleteKeyDown=n.onDeleteKeyDown.bind(Object(zr.a)(Object(zr.a)(n))),n.onHorizontalNavigationKeyDown=n.onHorizontalNavigationKeyDown.bind(Object(zr.a)(Object(zr.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(zr.a)(Object(zr.a)(n))),n.onKeyUp=n.onKeyUp.bind(Object(zr.a)(Object(zr.a)(n))),n.onPropagateUndo=n.onPropagateUndo.bind(Object(zr.a)(Object(zr.a)(n))),n.onPaste=n.onPaste.bind(Object(zr.a)(Object(zr.a)(n))),n.onCreateUndoLevel=n.onCreateUndoLevel.bind(Object(zr.a)(Object(zr.a)(n))),n.setFocusedElement=n.setFocusedElement.bind(Object(zr.a)(Object(zr.a)(n))),n.onInput=n.onInput.bind(Object(zr.a)(Object(zr.a)(n))),n.onSelectionChange=n.onSelectionChange.bind(Object(zr.a)(Object(zr.a)(n))),n.getRecord=n.getRecord.bind(Object(zr.a)(Object(zr.a)(n))),n.createRecord=n.createRecord.bind(Object(zr.a)(Object(zr.a)(n))),n.applyRecord=n.applyRecord.bind(Object(zr.a)(Object(zr.a)(n))),n.isEmpty=n.isEmpty.bind(Object(zr.a)(Object(zr.a)(n))),n.valueToFormat=n.valueToFormat.bind(Object(zr.a)(Object(zr.a)(n))),n.setRef=n.setRef.bind(Object(zr.a)(Object(zr.a)(n))),n.isActive=n.isActive.bind(Object(zr.a)(Object(zr.a)(n))),n.formatToValue=kc()(n.formatToValue.bind(Object(zr.a)(Object(zr.a)(n))),{size:1}),n.savedContent=r,n.containerRef=Object(Ar.createRef)(),n.patterns=function(e){var t=e.onReplace,n=e.multiline,r=e.valueToFormat,o=Object(v.filter)(Object(i.getBlockTransforms)("from"),function(e){var t=e.type,n=e.trigger;return"pattern"===t&&void 0===n});return[function(e){if(!t)return e;var n=Object(Sc.getTextContent)(e),c=Object(i.findTransform)(o,function(e){return e.regExp.test(n)});if(!c)return e;var a=n.match(c.regExp),s=c.transform({content:r(Object(Sc.remove)(e,0,a[0].length)),match:a});return t([s]),e},function(e){if(n)return e;var t=Object(Sc.getTextContent)(e);if(-1===t.indexOf("`"))return e;var r=t.match(/`([^`]+)`/);if(!r)return e;var o=r.index,i=o+r[1].length;return e=Object(Sc.remove)(e,o,o+1),e=Object(Sc.remove)(e,i,i+1),e=Object(Sc.applyFormat)(e,{type:"code"},o,i)}]}({onReplace:o,multilineTag:n.multilineTag,valueToFormat:n.valueToFormat}),n.enterPatterns=Object(i.getBlockTransforms)("from").filter(function(e){var t=e.type,n=e.trigger;return"pattern"===t&&"enter"===n}),n.state={},n.usedDeprecatedChildrenSource=Array.isArray(r),n}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidMount",value:function(){document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"setRef",value:function(e){this.editableRef=e}},{key:"isActive",value:function(){return this.editableRef===document.activeElement}},{key:"getSettings",value:function(e){e=Object(u.a)({},e,{forced_root_block:this.multilineTag||!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("change",this.onCreateUndoLevel);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(){this.editor.shortcuts.add(So.rawShortcut.primary("z"),"","Undo"),this.editor.shortcuts.add(So.rawShortcut.primaryShift("z"),"","Redo"),this.editor.shortcuts.remove("meta+y","","Redo")}},{key:"onPropagateUndo",value:function(e){var t=this.props,n=t.onUndo,r=t.onRedo,o=e.command;"Undo"===o&&n&&(Object(v.defer)(n),e.preventDefault()),"Redo"===o&&r&&(Object(v.defer)(r),e.preventDefault())}},{key:"getRecord",value:function(){var e=this.formatToValue(this.props.value),t=e.formats,n=e.text,r=this.state;return{formats:t,text:n,start:r.start,end:r.end}}},{key:"createRecord",value:function(){var e=window.getSelection().getRangeAt(0);return Object(Sc.create)({element:this.editableRef,range:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,removeNode:function(e){return"all"===e.getAttribute("data-mce-bogus")},unwrapNode:function(e){return!!e.getAttribute("data-mce-bogus")},removeAttribute:function(e){return 0===e.indexOf("data-mce-")},filterString:function(e){return e.replace("\ufeff","")}})}},{key:"applyRecord",value:function(e){Object(Sc.apply)({value:e,current:this.editableRef,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags,createLinePadding:function(e){var t=e.createElement("br");return t.setAttribute("data-mce-bogus","1"),t}})}},{key:"isEmpty",value:function(){return Object(Sc.isEmpty)(this.formatToValue(this.props.value))}},{key:"onPaste",value:function(e){var t=this,n=e.clipboardData,r=n.items,o=n.files;r=Object(v.isNil)(r)?[]:r,o=Object(v.isNil)(o)?[]:o;var c=Object(v.find)(Object(p.a)(r).concat(Object(p.a)(o)),function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}),a="",s="";try{a=n.getData("text/plain"),s=n.getData("text/html")}catch(e){try{s=n.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",s),window.console.log("Received plain text:\n\n",a),c&&!s){var l=c.getAsFile?c.getAsFile():c,u=Object(i.rawHandler)({HTML:'<img src="'.concat(Object(_c.createBlobURL)(l),'">'),mode:"BLOCKS",tagName:this.props.tagName}),d=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",l),void(d?this.props.setTimeout(function(){return t.props.onReplace(u)}):this.props.onSplit&&this.props.setTimeout(function(){return t.splitContent(u)}))}if(!this.editor.selection.isCollapsed()){var b=(s||a).replace(/<[^>]+>/g,"").trim();if(Object(kr.isURL)(b))return this.onChange(Object(Sc.applyFormat)(this.getRecord(),{type:"a",attributes:{href:Object(Qi.decodeEntities)(b)}})),void window.console.log("Created link:\n\n",b)}var f=this.props.onReplace&&this.isEmpty(),h="INLINE";f?h="BLOCKS":this.props.onSplit&&(h="AUTO");var m=Object(i.rawHandler)({HTML:s,plainText:a,mode:h,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof m){var O=Object(Sc.create)({html:m});this.onChange(Object(Sc.insert)(this.getRecord(),O))}else if(this.props.onSplit){if(!m.length)return;f?this.props.onReplace(m):this.splitContent(m,{paste:!0})}}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e()}},{key:"onInput",value:function(){var e=this.createRecord(),t=this.patterns.reduce(function(e,t){return t(e)},e);this.onChange(t,e===t)}},{key:"onSelectionChange",value:function(){if(this.isActive()){var e=this.createRecord(),t=e.start,n=e.end,r=e.formats;if(t!==this.state.start||n!==this.state.end){var o=this.props.isCaretWithinFormattedText;!o&&r[t]?this.props.onEnterFormattedText():o&&!r[t]&&this.props.onExitFormattedText(),this.setState({start:t,end:n})}}}},{key:"onChange",value:function(e,t){t||this.applyRecord(e);var n=e.start,r=e.end;this.savedContent=this.valueToFormat(e),this.props.onChange(this.savedContent),this.setState({start:n,end:r})}},{key:"onCreateUndoLevel",value:function(e){e&&null===e.lastLevel||(e&&e.originalEvent&&"blur"===e.originalEvent.type||this.onChange(this.createRecord(),!0),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===So.BACKSPACE;if(Rc().isCollapsed){var i=this.isEmpty();(i||Object(Wo.isHorizontalEdge)(this.editableRef,o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault(),e.stopImmediatePropagation())}}}},{key:"onHorizontalNavigationKeyDown",value:function(e){var t=Rc().focusNode,n=t.nodeType,r=t.nodeValue;n===Nc.TEXT_NODE&&(1===r.length&&"\ufeff"===r[0]&&(t[e.keyCode===So.LEFT?"previousSibling":"nextSibling"]||(e.preventDefault=v.noop)))}},{key:"onKeyDown",value:function(e){var t=e.keyCode;if((t===So.LEFT||t===So.RIGHT)&&this.onHorizontalNavigationKeyDown(e),t===So.DELETE||t===So.BACKSPACE){if(this.multilineTag){var n,r=this.createRecord(),o=Object(Sc.getSelectionStart)(r),c=Object(Sc.getSelectionEnd)(r);t===So.BACKSPACE?Object(Sc.charAt)(r,o-1)===Sc.LINE_SEPARATOR&&(n=Object(Sc.remove)(r,Object(Sc.isCollapsed)(r)?o-1:o,c)):Object(Sc.charAt)(r,c)===Sc.LINE_SEPARATOR&&(n=Object(Sc.remove)(r,o,Object(Sc.isCollapsed)(r)?c+1:c)),n&&(this.onChange(n),e.preventDefault(),e.stopImmediatePropagation())}this.onDeleteKeyDown(e)}if(t===So.ENTER){e.preventDefault(),e.stopImmediatePropagation();var a,s=this.createRecord();if(this.props.onReplace){var l=Object(Sc.getTextContent)(s),u=Object(i.findTransform)(this.enterPatterns,function(e){return e.regExp.test(l)});if(u)return void this.props.onReplace([u.transform({content:l})])}if(this.multilineTag)if(this.props.onSplit&&Object(Sc.isEmptyLine)(s))(a=this.props).onSplit.apply(a,Object(p.a)(Object(Sc.split)(s).map(this.valueToFormat)));else this.onChange(Object(Sc.insertLineSeparator)(s));else if(e.shiftKey||!this.props.onSplit){var d=Object(Sc.getTextContent)(s),b=d.length,f="\n";s.end!==b||"\n"===d.charAt(b-1)&&0!==b||(f="\n\n"),this.onChange(Object(Sc.insert)(s,f))}else this.splitContent()}}},{key:"onKeyUp",value:function(e){var t=e.keyCode;t===So.BACKSPACE&&this.onChange(this.createRecord(),!0),this.props.isViewportSmall&&t!==So.BACKSPACE&&t!==So.ENTER&&this.scrollToRect(Object(Wo.getRectangleFromRange)(this.editor.selection.getRng()))}},{key:"scrollToRect",value:function(e){var t=e.top,n=Object(Wo.getScrollContainer)(this.editableRef);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,r=this.createRecord();if(n){var o=Object(Sc.split)(r),i=Object(l.a)(o,2),c=i[0],a=i[1];Object(Sc.isEmpty)(a)?c=r:Object(Sc.isEmpty)(c)&&(a=r),t.paste&&(c=Object(Sc.isEmpty)(c)?null:c,a=Object(Sc.isEmpty)(a)?null:a),c&&(c=this.valueToFormat(c)),a&&(a=this.valueToFormat(a)),n.apply(void 0,[c,a].concat(Object(p.a)(e)))}}},{key:"onNodeChange",value:function(e){var t=e.parents;if(this.isActive()&&this.props.isViewportSmall){var n,r=Object(v.find)(t,function(e){return"A"===e.tagName});n=r?r.getBoundingClientRect():Object(Wo.getRectangleFromRange)(this.editor.selection.getRng()),this.scrollToRect(n)}}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.tagName,r=t.value;if(n===e.tagName&&r!==e.value&&r!==this.savedContent){if(Array.isArray(r)&&Object(v.isEqual)(r,this.savedContent))return;var o=this.formatToValue(r);if(this.isActive()){var i=this.formatToValue(e.value),c=Object(Sc.getTextContent)(i).length;o.start=c,o.end=c}this.applyRecord(o),this.savedContent=r}}},{key:"formatToValue",value:function(e){return Array.isArray(e)?Object(Sc.create)({html:i.children.toHTML(e),multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):"string"===this.props.format?Object(Sc.create)({html:e,multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):null===e?Object(Sc.create)():e}},{key:"valueToFormat",value:function(e){var t=e.formats,n=e.text;return this.usedDeprecatedChildrenSource?i.children.fromDOM(Object(Sc.unstableToDom)({value:{formats:t,text:n},multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}).body.childNodes):"string"===this.props.format?Object(Sc.toHTMLString)({value:{formats:t,text:n},multilineTag:this.multilineTag,multilineWrapperTags:this.multilineWrapperTags}):{formats:t,text:n}}},{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.keepPlaceholderOnFocus,b=void 0!==p&&p,f=t.isSelected,h=t.autocompleters,m=this.multilineTag,v=xc(this.props),O=["editor",r].join(),g=d&&(!f||b)&&this.isEmpty(),j=Rr()(c,"editor-rich-text"),y=this.getRecord();return Object(Ar.createElement)("div",{className:j,ref:this.containerRef,onFocus:this.setFocusedElement},f&&!l&&Object(Ar.createElement)(_o,null,Object(Ar.createElement)(Pc,{controls:u})),f&&l&&Object(Ar.createElement)("div",{className:"editor-rich-text__inline-toolbar"},Object(Ar.createElement)(Pc,{controls:u})),Object(Ar.createElement)(Zr,{onReplace:this.props.onReplace,completers:h,record:y,onChange:this.onChange},function(t){var n=t.isExpanded,c=t.listBoxId,s=t.activeId;return Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(Lc,Object(Lr.a)({tagName:r,getSettings:e.getSettings,onSetup:e.onSetup,style:o,defaultValue:i,isPlaceholderVisible:g,"aria-label":d,"aria-autocomplete":"list","aria-expanded":n,"aria-owns":c,"aria-activedescendant":s},v,{className:a,key:O,onPaste:e.onPaste,onInput:e.onInput,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,setRef:e.setRef})),g&&Object(Ar.createElement)(r,{className:Rr()("editor-rich-text__tinymce",a),style:o},m?Object(Ar.createElement)(m,null,d):d),f&&Object(Ar.createElement)(Tc,{value:y,onChange:e.onChange}))}))}}]),t}(Ar.Component);Dc.defaultProps={formattingControls:["bold","italic","link","strikethrough"],format:"string",value:""};var Fc=Object(Dr.compose)([Dr.withInstanceId,$r(function(e,t){return!1===t.isSelected?{}:!0===t.isSelected?{isSelected:e.isSelected}:{isSelected:e.isSelected&&e.focusedElement===t.instanceId,setFocusedElement:e.setFocusedElement}}),Object(s.withSelect)(function(e){var t=e("core/viewport").isViewportMatch,n=e("core/editor"),r=n.canUserUseUnfilteredHTML,o=n.isCaretWithinFormattedText;return{isViewportSmall:t("< small"),canUserUseUnfilteredHTML:r(),isCaretWithinFormattedText:o()}}),Object(s.withDispatch)(function(e){var t=e("core/editor");return{onCreateUndoLevel:t.createUndoLevel,onRedo:t.redo,onUndo:t.undo,onEnterFormattedText:t.enterFormattedText,onExitFormattedText:t.exitFormattedText}}),Dr.withSafeTimeout])(Dc);Fc.Content=function(e){var t,n=e.value,r=e.tagName,o=e.multiline,c=Object(d.a)(e,["value","tagName","multiline"]),a=n;!0!==o&&"p"!==o&&"li"!==o||(t=!0===o?"p":o),Array.isArray(n)&&(a=i.children.toHTML(n)),!a&&t&&(a="<".concat(t,"></").concat(t,">"));var s=Object(Ar.createElement)(Ar.RawHTML,null,a);return r?Object(Ar.createElement)(r,Object(v.omit)(c,["format"]),s):s},Fc.isEmpty=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.isArray(e)&&!e||0===e.length},Fc.Content.defaultProps={format:"string",value:""};var Mc=Fc,Uc=function(e){var t=e.urlQueryArgs,n=void 0===t?{}:t,r=Object(d.a)(e,["urlQueryArgs"]),o=Object(s.select)("core/editor").getCurrentPostId;return n=Object(u.a)({post_id:o()},n),Object(Ar.createElement)(Wr.ServerSideRender,Object(Lr.a)({urlQueryArgs:n},r))},Hc=Object(Wr.withFilters)("editor.MediaUpload")(function(){return null}),Vc=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(zr.a)(Object(zr.a)(e))),e.state={isSettingsExpanded:!1},e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.renderSettings,r=e.onClose,o=e.onClickOutside,i=e.position,c=void 0===i?"bottom center":i,a=e.focusOnMount,s=void 0===a?"firstElement":a,l=this.state.isSettingsExpanded,u=!!n&&l;return Object(Ar.createElement)(Wr.Popover,{className:"editor-url-popover",focusOnMount:s,position:c,onClose:r,onClickOutside:o},Object(Ar.createElement)("div",{className:"editor-url-popover__row"},t,!!n&&Object(Ar.createElement)(Wr.IconButton,{className:"editor-url-popover__settings-toggle",icon:"ellipsis",label:Object(y.__)("Link Settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":l})),u&&Object(Ar.createElement)("div",{className:"editor-url-popover__row editor-url-popover__settings"},n()))}}]),t}(Ar.Component);function Kc(e){var t,n=e.allowedTypes,r=e.additionalData,o=void 0===r?{}:r,i=e.filesList,c=e.maxUploadFileSize,a=e.onError,s=void 0===a?v.noop:a,d=e.onFileChange,b=e.wpAllowedMimeTypes,f=void 0===b?null:b,h=Object(p.a)(i),m=[],O=function(e,t){Object(_c.revokeBlobURL)(Object(v.get)(m,[e,"url"])),m[e]=t,d(Object(v.compact)(m))},g=(t=f)?Object(v.flatMap)(t,function(e,t){var n=e.split("/"),r=Object(l.a)(n,1)[0],o=t.split("|");return[e].concat(Object(p.a)(Object(v.map)(o,function(e){return"".concat(r,"/").concat(e)})))}):t,j=function(e){e.message=[Object(Ar.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],s(e)};h.forEach(function(e,t){var r;if(!g||(r=e.type,Object(v.includes)(g,r)))if(function(e){return!n||Object(v.some)(n,function(t){return Object(v.includes)(t,"/")?t===e:Object(v.startsWith)(e,"".concat(t,"/"))})}(e.type))if(c&&e.size>c)j({code:"SIZE_ABOVE_LIMIT",message:Object(y.__)("This file exceeds the maximum upload size for this site."),file:e});else{if(!(e.size<=0))return m.push({url:Object(_c.createBlobURL)(e)}),d(m),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(v.forEach)(t,function(e,t){return n.append(t,e)}),vr()({path:"/wp/v2/media",body:n,method:"POST"})}(e,o).then(function(e){var n=Object(u.a)({},Object(v.omit)(e,["alt_text","source_url"]),{alt:e.alt_text,caption:Object(v.get)(e,["caption","raw"],""),title:e.title.raw,url:e.source_url});O(t,n)}).catch(function(n){var r;O(t,null),r=Object(v.has)(n,["message"])?Object(v.get)(n,["message"]):Object(y.sprintf)(Object(y.__)("Error while uploading file %s to the media library."),e.name),s({code:"GENERAL",message:r,file:e})});j({code:"EMPTY_FILE",message:Object(y.__)("This file is empty."),file:e})}else j({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(y.__)("Sorry, this file type is not supported here."),file:e});else j({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(y.__)("Sorry, this file type is not permitted for security reasons."),file:e})})}var zc=function(e){var t=e.allowedTypes,n=e.filesList,r=e.maxUploadFileSize,o=e.onError,i=void 0===o?v.noop:o,c=e.onFileChange,a=Object(s.select)("core/editor"),l=a.getCurrentPostId,u=a.getEditorSettings,d=u().allowedMimeTypes;r=r||u().maxUploadFileSize,Kc({allowedTypes:t,filesList:n,onFileChange:c,additionalData:{post:l()},maxUploadFileSize:r,onError:function(e){var t=e.message;return i(t)},wpAllowedMimeTypes:d})},Wc=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(Ar.createElement)(Vc,{onClose:o},Object(Ar.createElement)("form",{className:"editor-media-placeholder__url-input-form",onSubmit:r},Object(Ar.createElement)("input",{className:"editor-media-placeholder__url-input-field",type:"url","aria-label":Object(y.__)("URL"),placeholder:Object(y.__)("Paste or type URL"),onChange:n,value:t}),Object(Ar.createElement)(Wr.IconButton,{className:"editor-media-placeholder__url-input-submit-button",icon:"editor-break",label:Object(y.__)("Apply"),type:"submit"})))},qc=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(zr.a)(Object(zr.a)(e))),e.onSubmitSrc=e.onSubmitSrc.bind(Object(zr.a)(Object(zr.a)(e))),e.onUpload=e.onUpload.bind(Object(zr.a)(Object(zr.a)(e))),e.onFilesUpload=e.onFilesUpload.bind(Object(zr.a)(Object(zr.a)(e))),e.openURLInput=e.openURLInput.bind(Object(zr.a)(Object(zr.a)(e))),e.closeURLInput=e.closeURLInput.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(v.every)(e,function(e){return"image"===e||Object(v.startsWith)(e,"image/")})}},{key:"componentDidMount",value:function(){this.setState({src:Object(v.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(v.get)(e.value,["src"],"")!==Object(v.get)(this.props.value,["src"],"")&&this.setState({src:Object(v.get)(this.props.value,["src"],"")})}},{key:"onChangeSrc",value:function(e){this.setState({src:e.target.value})}},{key:"onSubmitSrc",value:function(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t=this.props,n=t.onSelect,r=t.multiple,o=t.onError,i=t.allowedTypes;zc({allowedTypes:i,filesList:e,onFileChange:r?n:function(e){var t=Object(l.a)(e,1)[0];return n(t)},onError:o})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.icon,r=e.className,o=e.labels,i=void 0===o?{}:o,c=e.onSelect,a=e.value,s=void 0===a?{}:a,l=e.onSelectURL,u=e.onHTMLDrop,d=void 0===u?v.noop:u,p=e.multiple,b=void 0!==p&&p,f=e.notices,h=e.allowedTypes,m=this.state,O=m.isURLInputVisible,g=m.src,j=i.instructions||"",k=i.title||"";if(!j||!k){var _=1===h.length,S=_&&"audio"===h[0],E=_&&"image"===h[0],C=_&&"video"===h[0];j||(j=Object(y.__)("Drag a media file, upload a new one or select a file from your library."),S?j=Object(y.__)("Drag an audio, upload a new one or select a file from your library."):E?j=Object(y.__)("Drag an image, upload a new one or select a file from your library."):C&&(j=Object(y.__)("Drag a video, upload a new one or select a file from your library."))),k||(k=Object(y.__)("Media"),S?k=Object(y.__)("Audio"):E?k=Object(y.__)("Image"):C&&(k=Object(y.__)("Video")))}return Object(Ar.createElement)(Wr.Placeholder,{icon:n,label:k,instructions:j,className:Rr()("editor-media-placeholder",r),notices:f},Object(Ar.createElement)(Wr.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:d}),Object(Ar.createElement)(Wr.FormFileUpload,{isLarge:!0,className:"editor-media-placeholder__button",onChange:this.onUpload,accept:t,multiple:b},Object(y.__)("Upload")),Object(Ar.createElement)(Hc,{gallery:b&&this.onlyAllowsImages(),multiple:b,onSelect:c,allowedTypes:h,value:s.id,render:function(e){var t=e.open;return Object(Ar.createElement)(Wr.Button,{isLarge:!0,className:"editor-media-placeholder__button",onClick:t},Object(y.__)("Media Library"))}}),l&&Object(Ar.createElement)("div",{className:"editor-media-placeholder__url-input-container"},Object(Ar.createElement)(Wr.Button,{className:"editor-media-placeholder__button",onClick:this.openURLInput,isToggled:O,isLarge:!0},Object(y.__)("Insert from URL")),O&&Object(Ar.createElement)(Wc,{src:g,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput})))}}]),t}(Ar.Component),Gc=Object(Wr.withFilters)("editor.MediaPlaceholder")(qc),Yc=function(e){return e.stopPropagation()},$c=function(e){function t(e){var n,r=e.autocompleteRef;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=n.onChange.bind(Object(zr.a)(Object(zr.a)(n))),n.onKeyDown=n.onKeyDown.bind(Object(zr.a)(Object(zr.a)(n))),n.autocompleteRef=r||Object(Ar.createRef)(),n.updateSuggestions=Object(v.throttle)(n.updateSuggestions.bind(Object(zr.a)(Object(zr.a)(n))),200),n.suggestionNodes=[],n.state={posts:[],showSuggestions:!1,selectedSuggestion:null},n}return Object(Kr.a)(t,e),Object(Ur.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,Ci()(this.suggestionNodes[r],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),setTimeout(function(){e.scrollingIntoView=!1},100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"updateSuggestions",value:function(e){var t=this;if(e.length<2||/^https?:/.test(e))this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});else{this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0});var n=vr()({path:Object(kr.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,type:"post"})});n.then(function(e){t.suggestionsRequest===n&&(t.setState({posts:e,loading:!1}),e.length?t.props.debouncedSpeak(Object(y.sprintf)(Object(y._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(y.__)("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 So.UP:e.stopPropagation(),e.preventDefault();var c=r?r-1:o.length-1;this.setState({selectedSuggestion:c});break;case So.DOWN:e.stopPropagation(),e.preventDefault();var a=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:a});break;case So.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(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)("div",{className:"editor-url-input"},Object(Ar.createElement)("input",{autoFocus:i,type:"text","aria-label":Object(y.__)("URL"),required:!0,value:r,onChange:this.onChange,onInput:Yc,placeholder:Object(y.__)("Paste URL or type to search"),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(Ar.createElement)(Wr.Spinner,null)),s&&!!l.length&&Object(Ar.createElement)(Wr.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(Ar.createElement)("div",{className:"editor-url-input__suggestions",id:"editor-url-input-suggestions-".concat(c),ref:this.autocompleteRef,role:"listbox"},l.map(function(t,n){return Object(Ar.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"editor-url-input-suggestion-".concat(c,"-").concat(n),ref:e.bindSuggestionNode(n),className:Rr()("editor-url-input__suggestion",{"is-selected":n===u}),onClick:function(){return e.selectLink(t)},"aria-selected":n===u},Object(Qi.decodeEntities)(t.title)||Object(y.__)("(no title)"))}))))}}]),t}(Ar.Component),Xc=Object(Wr.withSpokenMessages)(Object(Dr.withInstanceId)($c)),Qc=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).toggle=e.toggle.bind(Object(zr.a)(Object(zr.a)(e))),e.submitLink=e.submitLink.bind(Object(zr.a)(Object(zr.a)(e))),e.state={expanded:!1},e}return Object(Kr.a)(t,e),Object(Ur.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(y.__)("Edit Link"):Object(y.__)("Insert Link");return Object(Ar.createElement)("div",{className:"editor-url-input__button"},Object(Ar.createElement)(Wr.IconButton,{icon:"admin-links",label:o,onClick:this.toggle,className:Rr()("components-toolbar__control",{"is-active":t})}),r&&Object(Ar.createElement)("form",{className:"editor-url-input__button-modal",onSubmit:this.submitLink},Object(Ar.createElement)("div",{className:"editor-url-input__button-modal-line"},Object(Ar.createElement)(Wr.IconButton,{className:"editor-url-input__back",icon:"arrow-left-alt",label:Object(y.__)("Close"),onClick:this.toggle}),Object(Ar.createElement)(Xc,{value:t||"",onChange:n}),Object(Ar.createElement)(Wr.IconButton,{icon:"editor-break",label:Object(y.__)("Submit"),type:"submit"}))))}}]),t}(Ar.Component),Zc=function(e){function t(){return Object(Mr.a)(this,t),Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))}return Object(Kr.a)(t,e),Object(Ur.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}(Ar.Component),Jc=Object(Dr.compose)([Object(s.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(s.withDispatch)(function(e){return{autosave:e("core/editor").autosave}})])(Zc),ea=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(Ar.createElement)("li",{className:Rr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(Ar.createElement)("button",{className:"document-outline__button",onClick:o},Object(Ar.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map(function(e,t){var n=e.clientId;return Object(Ar.createElement)("strong",{key:t,className:"document-outline__level"},Object(Ar.createElement)(mi,{clientId:n}))}),Object(Ar.createElement)("strong",{className:"document-outline__level"},r),Object(Ar.createElement)("span",{className:"document-outline__item-content"},t),Object(Ar.createElement)("span",{className:"screen-reader-text"},Object(y.__)("(Click to focus this heading)"))))},ta=Object(Ar.createElement)("em",null,Object(y.__)("(Empty heading)")),na=[Object(Ar.createElement)("br",{key:"incorrect-break"}),Object(Ar.createElement)("em",{key:"incorrect-message"},Object(y.__)("(Incorrect heading level)"))],ra=[Object(Ar.createElement)("br",{key:"incorrect-break-h1"}),Object(Ar.createElement)("em",{key:"incorrect-message-h1"},Object(y.__)("(Your theme may already use a H1 for the post title)"))],oa=[Object(Ar.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(Ar.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(y.__)("(Multiple H1 headings are not recommended)"))],ia=function(e){return!e.attributes.content||0===e.attributes.content.length},ca=Object(Dr.compose)(Object(s.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(v.get)(o,["supports","title"],!1)}}),Object(s.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(v.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(u.a)({},t,{path:n,level:t.attributes.level,isEmpty:ia(t)}):e(t.innerBlocks,Object(p.a)(n).concat([t]))})}(n);if(c.length<1)return null;var a=1,s=i&&r,l=Object(v.countBy)(c,"level")[1]>1;return Object(Ar.createElement)("div",{className:"document-outline"},Object(Ar.createElement)("ul",null,s&&Object(Ar.createElement)(ea,{level:Object(y.__)("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(Ar.createElement)(ea,{key:t,level:"H".concat(e.level),isValid:r,onClick:function(){return t=e.clientId,o(t);var t},path:e.path},e.isEmpty?ta:Object(Ar.createElement)(Mc.Content,{tagName:"span",value:e.attributes.content}),n&&na,1===e.level&&l&&oa,s&&1===e.level&&!l&&ra)})))});var aa=Object(s.withSelect)(function(e){return{blocks:e("core/editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n});var sa=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=e("core/editor"),r=n.getBlocksByClientId,o=n.getBlockIndex,c=n.getTemplateLock,a=n.getBlockRootClientId,s=r(t.clientIds),l=Object(v.every)(s,function(e){return!!e&&Object(i.hasBlockSupport)(e.name,"multiple",!0)}),u=a(t.clientIds[0]);return{firstSelectedIndex:o(Object(v.first)(Object(v.castArray)(t.clientIds)),u),lastSelectedIndex:o(Object(v.last)(Object(v.castArray)(t.clientIds)),u),isLocked:!!c(u),blocks:s,canDuplicate:l,rootClientId:u,extraProps:t}}),Object(s.withDispatch)(function(e,t){var n=t.clientIds,r=t.rootClientId,o=t.blocks,c=t.firstSelectedIndex,a=t.lastSelectedIndex,s=t.isLocked,l=t.canDuplicate,u=e("core/editor"),d=u.insertBlocks,p=u.multiSelect,b=u.removeBlocks,f=u.insertDefaultBlock;return{onDuplicate:function(){if(!s&&l){var e=o.map(function(e){return Object(i.cloneBlock)(e)});d(e,a+1,r),e.length>1&&p(Object(v.first)(e).clientId,Object(v.last)(e).clientId)}},onRemove:function(){s||b(n)},onInsertBefore:function(){s||f({},r,c)},onInsertAfter:function(){s||f({},r,a+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})}),la=function(e){return e.preventDefault(),e},ua={duplicate:{raw:So.rawShortcut.primaryShift("d"),display:So.displayShortcut.primaryShift("d")},removeBlock:{raw:So.rawShortcut.access("z"),display:So.displayShortcut.access("z")},insertBefore:{raw:So.rawShortcut.primaryAlt("t"),display:So.displayShortcut.primaryAlt("t")},insertAfter:{raw:So.rawShortcut.primaryAlt("y"),display:So.displayShortcut.primaryAlt("y")}},da=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).selectAll=e.selectAll.bind(Object(zr.a)(Object(zr.a)(e))),e.undoOrRedo=e.undoOrRedo.bind(Object(zr.a)(Object(zr.a)(e))),e.save=e.save.bind(Object(zr.a)(Object(zr.a)(e))),e.deleteSelectedBlocks=e.deleteSelectedBlocks.bind(Object(zr.a)(Object(zr.a)(e))),e.clearMultiSelection=e.clearMultiSelection.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"selectAll",value:function(e){var t=this.props,n=t.rootBlocksClientIds,r=t.onMultiSelect;e.preventDefault(),r(Object(v.first)(n),Object(v.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(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(Wr.KeyboardShortcuts,{shortcuts:(e={},Object(b.a)(e,So.rawShortcut.primary("a"),this.selectAll),Object(b.a)(e,So.rawShortcut.primary("z"),this.undoOrRedo),Object(b.a)(e,So.rawShortcut.primaryShift("z"),this.undoOrRedo),Object(b.a)(e,"backspace",this.deleteSelectedBlocks),Object(b.a)(e,"del",this.deleteSelectedBlocks),Object(b.a)(e,"escape",this.clearMultiSelection),e)}),Object(Ar.createElement)(Wr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(b.a)({},So.rawShortcut.primary("s"),this.save)}),t.length>0&&Object(Ar.createElement)(sa,{clientIds:t},function(e){var t,n=e.onDuplicate,r=e.onRemove,o=e.onInsertAfter,i=e.onInsertBefore;return Object(Ar.createElement)(Wr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(t={},Object(b.a)(t,ua.duplicate.raw,Object(v.flow)(la,n)),Object(b.a)(t,ua.removeBlock.raw,Object(v.flow)(la,r)),Object(b.a)(t,ua.insertBefore.raw,Object(v.flow)(la,i)),Object(b.a)(t,ua.insertAfter.raw,Object(v.flow)(la,o)),t)})}))}}]),t}(Ar.Component),pa=Object(Dr.compose)([Object(s.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(v.some)(l,function(e){return!!a(c(e))}),isDirty:i(),selectedBlockClientIds:l}}),Object(s.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}})])(da);var ba=Object(Dr.compose)([Object(s.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(s.withDispatch)(function(e){return{redo:function(){return e("core/editor").redo()}}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(Ar.createElement)(Wr.IconButton,{icon:"redo",label:Object(y.__)("Redo"),shortcut:So.displayShortcut.primaryShift("z"),disabled:!t,onClick:n,className:"editor-history__redo"})});var fa=Object(Dr.compose)([Object(s.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(s.withDispatch)(function(e){return{undo:function(){return e("core/editor").undo()}}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(Ar.createElement)(Wr.IconButton,{icon:"undo",label:Object(y.__)("Undo"),shortcut:So.displayShortcut.primary("z"),disabled:!t,onClick:n,className:"editor-history__undo"})});var ha=Object(Dr.compose)([Object(s.withSelect)(function(e){return{isValid:e("core/editor").isValidTemplate()}}),Object(s.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(d.a)(e,["isValid"]);return t?null:Object(Ar.createElement)(Wr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Ar.createElement)("p",null,Object(y.__)("The content of your post doesnt match the template assigned to your post type.")),Object(Ar.createElement)("div",null,Object(Ar.createElement)(Wr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(y.__)("Keep it as is")),Object(Ar.createElement)(Wr.Button,{onClick:function(){window.confirm(Object(y.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(y.__)("Reset the template"))))});var ma=Object(Dr.compose)([Object(s.withSelect)(function(e){return{notices:e("core/notices").getNotices()}}),Object(s.withDispatch)(function(e){return{onRemove:e("core/notices").removeNotice}})])(function(e){return Object(Ar.createElement)(Wr.NoticeList,e,Object(Ar.createElement)(ha,null))});var va=Object(s.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(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r});var Oa=Object(s.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(v.some)(Object(v.castArray)(r),function(e){return!!t.supports[e]})),o?n:null}),ga=Object(Dr.withState)({orderInput:null})(function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,c=null===o?r:o;return Object(Ar.createElement)(Wr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(y.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})});var ja=Object(Dr.compose)([Object(s.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(s.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}})])(function(e){return Object(Ar.createElement)(Oa,{supportKeys:"page-attributes"},Object(Ar.createElement)(ga,e))});function ya(e){var t=Object(v.groupBy)(e,"parent");return function e(n){return n.map(function(n){var r=t[n.id];return Object(u.a)({},n,{children:r&&r.length?e(r):[]})})}(t[0]||[])}var ka=Object(s.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(),u=Object(v.get)(s,["hierarchical"],!1),d={per_page:-1,exclude:l,parent_exclude:l,orderby:"menu_order",order:"asc"};return{parent:c("parent"),items:u?r("postType",a,d):[],postType:s}}),_a=Object(s.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),Sa=Object(Dr.compose)([ka,_a])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),c=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=ya(a.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(y.__)("no title"),")")}}));return Object(Ar.createElement)(Wr.TreeSelect,{label:c,noOptionLabel:"(".concat(Object(y.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})});var Ea=Object(Dr.compose)(Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(s.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(v.isEmpty)(t)?null:Object(Ar.createElement)(Wr.SelectControl,{label:Object(y.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(t,function(e,t){return{value:t,label:e}})})});var Ca=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}}),Dr.withInstanceId])(function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(Ar.createElement)(Oa,{supportKeys:"author"},r)}),wa=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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(Ar.createElement)(Ca,null,Object(Ar.createElement)("label",{htmlFor:o},Object(y.__)("Author")),Object(Ar.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(Ar.createElement)("option",{key:e.id,value:e.id},e.name)})))}}]),t}(Ar.Component),Ta=Object(Dr.compose)([Object(s.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(s.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),Dr.withInstanceId])(wa);var Pa=Object(Dr.compose)([Object(s.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(s.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(d.a)(e,["commentStatus"]);return Object(Ar.createElement)(Wr.CheckboxControl,{label:Object(y.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Ia=Object(Dr.compose)([Object(s.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(s.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(Ar.createElement)("div",{className:"editor-post-excerpt"},Object(Ar.createElement)(Wr.TextareaControl,{label:Object(y.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(Ar.createElement)(Wr.ExternalLink,{href:"https://codex.wordpress.org/Excerpt"},Object(y.__)("Learn more about manual excerpts")))});var Ba=function(e){return Object(Ar.createElement)(Oa,Object(Lr.a)({},e,{supportKeys:"excerpt"}))};var xa=Object(s.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(v.some)(Object(v.castArray)(o),function(e){var n=Object(v.get)(t,[e],!1);return"post-thumbnails"===e&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var La=function(e){return Object(Ar.createElement)(xa,{supportKeys:"post-thumbnails"},Object(Ar.createElement)(Oa,Object(Lr.a)({},e,{supportKeys:"thumbnail"})))},Aa=["image"],Na=Object(y.__)("Featured Image"),Ra=Object(y.__)("Set featured image"),Da=Object(y.__)("Remove image");var Fa=Object(s.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}}),Ma=Object(s.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),Ua=Object(Dr.compose)(Fa,Ma,Object(Wr.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,u=Object(v.get)(l,["labels"],{});if(s){var d=Object(Fr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",s.id,o);Object(v.has)(s,["media_details","sizes",d])?(t=s.media_details.sizes[d].width,n=s.media_details.sizes[d].height,r=s.media_details.sizes[d].source_url):(t=s.media_details.width,n=s.media_details.height,r=s.source_url)}return Object(Ar.createElement)(La,null,Object(Ar.createElement)("div",{className:"editor-post-featured-image"},!!i&&Object(Ar.createElement)(Hc,{title:u.featured_image||Na,onSelect:c,allowedTypes:Aa,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(Ar.createElement)(Wr.Button,{className:"editor-post-featured-image__preview",onClick:o,"aria-label":Object(y.__)("Edit or update the image")},s&&Object(Ar.createElement)(Wr.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(Ar.createElement)("img",{src:r,alt:""})),!s&&Object(Ar.createElement)(Wr.Spinner,null))},value:i}),!!i&&s&&!s.isLoading&&Object(Ar.createElement)(Hc,{title:u.featured_image||Na,onSelect:c,allowedTypes:Aa,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Ar.createElement)(Wr.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(y.__)("Replace image"))}}),!i&&Object(Ar.createElement)("div",null,Object(Ar.createElement)(Hc,{title:u.featured_image||Na,onSelect:c,allowedTypes:Aa,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Ar.createElement)(Wr.Button,{className:"editor-post-featured-image__toggle",onClick:t},u.set_featured_image||Ra)}})),!!i&&Object(Ar.createElement)(Wr.Button,{onClick:a,isLink:!0,isDestructive:!0},u.remove_featured_image||Da)))});var Ha=Object(s.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(d.a)(e,["disablePostFormats"]);return!t&&Object(Ar.createElement)(Oa,Object(Lr.a)({},n,{supportKeys:"post-formats"}))}),Va=[{id:"aside",caption:Object(y.__)("Aside")},{id:"gallery",caption:Object(y.__)("Gallery")},{id:"link",caption:Object(y.__)("Link")},{id:"image",caption:Object(y.__)("Image")},{id:"quote",caption:Object(y.__)("Quote")},{id:"standard",caption:Object(y.__)("Standard")},{id:"status",caption:Object(y.__)("Status")},{id:"video",caption:Object(y.__)("Video")},{id:"audio",caption:Object(y.__)("Audio")},{id:"chat",caption:Object(y.__)("Chat")}];var Ka=Object(Dr.compose)([Object(s.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(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(s.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Dr.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=Va.filter(function(e){return Object(v.includes)(o,e.id)}),s=Object(v.find)(a,function(e){return e.id===i});return Object(Ar.createElement)(Ha,null,Object(Ar.createElement)("div",{className:"editor-post-format"},Object(Ar.createElement)("div",{className:"editor-post-format__content"},Object(Ar.createElement)("label",{htmlFor:c},Object(y.__)("Post Format")),Object(Ar.createElement)(Wr.SelectControl,{value:r,onChange:function(e){return t(e)},id:c,options:a.map(function(e){return{label:e.caption,value:e.id}})})),s&&s.id!==r&&Object(Ar.createElement)("div",{className:"editor-post-format__suggestion"},Object(y.__)("Suggestion:")," ",Object(Ar.createElement)(Wr.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))});var za=Object(s.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(Ar.createElement)(Oa,{supportKeys:"revisions"},r)});function Wa(e,t){return Object(kr.addQueryArgs)(e,t)}var qa=Object(s.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(Ar.createElement)(za,null,Object(Ar.createElement)(Wr.IconButton,{href:Wa("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(y.sprintf)(Object(y._n)("%d Revision","%d Revisions",n),n)))}),Ga=n(96),Ya=n.n(Ga),$a=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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();var o=Object(Ar.renderToString)(Object(Ar.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Ar.createElement)(Wr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Ar.createElement)(Wr.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(Ar.createElement)(Wr.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(Ar.createElement)("p",null,Object(y.__)("Generating preview…"))));o+='\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\t@-webkit-keyframes paint {\n\t\t\t\t\t0% {\n\t\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@-moz-keyframes paint {\n\t\t\t\t\t0% {\n\t\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@-o-keyframes paint {\n\t\t\t\t\t0% {\n\t\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@keyframes paint {\n\t\t\t\t\t0% {\n\t\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\t\twidth: 192px;\n\t\t\t\t\theight: 192px;\n\t\t\t\t\tstroke: #555d66;\n\t\t\t\t\tstroke-width: 0.75;\n\t\t\t\t}\n\t\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\t\tstroke-dasharray: 280;\n\t\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t\tanimation: paint 1.5s ease infinite alternate;\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.write(o),this.previewWindow.document.close()}else this.setPreviewWindowLink(n);else this.setPreviewWindowLink(r)}},{key:"render",value:function(){var e=this.props.isSaveable;return Object(Ar.createElement)(Wr.Button,{className:"editor-post-preview",isLarge:!0,onClick:this.openPreviewWindow,disabled:!e},Object(y._x)("Preview","imperative verb"),Object(Ar.createElement)(c.DotTip,{tipId:"core/editor.preview"},Object(y.__)("Click “Preview” to load a preview of this page, so you can make sure youre happy with your blocks.")))}}]),t}(Ar.Component),Xa=Object(Dr.compose)([Object(s.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,u=(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(v.get)(u,["viewable"],!1)}}),Object(s.withDispatch)(function(e){return{autosave:e("core/editor").autosave}}),Object(Dr.ifCondition)(function(e){return e.isViewable})])($a),Qa=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(zr.a)(Object(zr.a)(e))),e.receivePostLock=e.receivePostLock.bind(Object(zr.a)(Object(zr.a)(e))),e.releasePostLock=e.releasePostLock.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidMount",value:function(){Ya()(document).on("heartbeat-send.refresh-lock",this.sendPostLock).on("heartbeat-tick.refresh-lock",this.receivePostLock)}},{key:"componentWillUnmount",value:function(){Ya()(document).off("heartbeat-send.refresh-lock",this.sendPostLock).off("heartbeat-tick.refresh-lock",this.receivePostLock)}},{key:"sendPostLock",value:function(e,t){var n=this.props,r=n.isLocked,o=n.activePostLock,i=n.postId;r||(t["wp-refresh-post-lock"]={lock:o,post_id:i})}},{key:"receivePostLock",value:function(e,t){if(t["wp-refresh-post-lock"]){var n=this.props,r=n.autosave,o=n.updatePostLock,i=t["wp-refresh-post-lock"];i.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{avatar:i.lock_error.avatar_src}})):i.new_lock&&o({isLocked:!1,activePostLock:i.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i={action:"wp-remove-post-lock",_wpnonce:r.unlockNonce,post_ID:o,active_post_lock:n};Ya.a.post({async:!1,url:r.ajaxUrl,data:i})}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils;if(!r)return null;var c=t.name,a=t.avatar,s=Object(kr.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Wa("edit.php");return Object(Ar.createElement)(Wr.Modal,{title:o?Object(y.__)("Someone else has taken over this post."):Object(y.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!a&&Object(Ar.createElement)("img",{src:a,alt:Object(y.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Ar.createElement)("div",null,Object(Ar.createElement)("div",null,c?Object(y.sprintf)(Object(y.__)("%s now has editing control of this post. Don't worry, your changes up to this moment have been saved"),c):Object(y.__)("Another user now has editing control of this post. Don't worry, your changes up to this moment have been saved")),Object(Ar.createElement)("p",null,Object(Ar.createElement)("a",{href:l},Object(y.__)("View all posts")))),!o&&Object(Ar.createElement)("div",null,Object(Ar.createElement)("div",null,c?Object(y.sprintf)(Object(y.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),c):Object(y.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Ar.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Ar.createElement)(Wr.Button,{isDefault:!0,isLarge:!0,href:l},Object(y.__)("All Posts")),Object(Ar.createElement)(Xa,null),Object(Ar.createElement)(Wr.Button,{isPrimary:!0,isLarge:!0,href:s},Object(y.__)("Take Over")))))}}]),t}(Ar.Component),Za=Object(Dr.compose)(Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getEditorSettings,r=t.isPostLocked,o=t.isPostLockTakeover,i=t.getPostLockUser,c=t.getCurrentPostId,a=t.getActivePostLock;return{isLocked:r(),isTakeover:o(),user:i(),postId:c(),postLockUtils:n().postLockUtils,activePostLock:a()}}),Object(s.withDispatch)(function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}}),Object(Dr.withGlobalEvents)({beforeunload:"releasePostLock"}))(Qa);var Ja=Object(Dr.compose)(Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(v.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 es=Object(Dr.compose)(Object(s.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(s.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(Ar.createElement)(Ja,null,Object(Ar.createElement)(Wr.CheckboxControl,{label:Object(y.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var ts=Object(Dr.compose)([Object(s.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(s.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(d.a)(e,["pingStatus"]);return Object(Ar.createElement)(Wr.CheckboxControl,{label:Object(y.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var ns=Object(Dr.compose)([Object(s.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,u=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:a(),hasPublishAction:Object(v.get)(s(),["_links","wp:action-publish"],!1),postType:l(),isAutosaving:u()}})])(function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving;return o?Object(y.__)("Publishing…"):t&&r&&!c?Object(y.__)("Updating…"):n&&r&&!c?Object(y.__)("Scheduling…"):i?t?Object(y.__)("Update"):n?Object(y.__)("Schedule"):Object(y.__)("Publish"):Object(y.__)("Submit for Review")}),rs=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).call(this,e))).buttonNode=Object(Ar.createRef)(),n}return Object(Kr.a)(t,e),Object(Ur.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,u=t.onSubmit,d=void 0===u?v.noop:u,p=t.forceIsSaving,b=a&&s;e=l?i?"future":"private"===c?"private":"publish":"pending";return Object(Ar.createElement)(Wr.Button,{ref:this.buttonNode,className:"editor-post-publish-button",isPrimary:!0,isLarge:!0,onClick:function(){d(),r(e),o()},disabled:!b,isBusy:n},Object(Ar.createElement)(ns,{forceIsSaving:p}))}}]),t}(Ar.Component),os=Object(Dr.compose)([Object(s.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,u=o.isPostSavingLocked,d=o.getCurrentPost,p=o.getCurrentPostType;return{isSaving:n||i(),isBeingScheduled:c(),visibility:a(),isSaveable:s()&&!u(),isPublishable:r||l(),hasPublishAction:Object(v.get)(d(),["_links","wp:action-publish"],!1),postType:p()}}),Object(s.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(rs),is=[{value:"public",label:Object(y.__)("Public"),info:Object(y.__)("Visible to everyone.")},{value:"private",label:Object(y.__)("Private"),info:Object(y.__)("Only visible to site admins and editors.")},{value:"password",label:Object(y.__)("Password Protected"),info:Object(y.__)("Protected with a password you choose. Only those with the password can view this post.")}],cs=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(zr.a)(Object(zr.a)(n))),n.setPrivate=n.setPrivate.bind(Object(zr.a)(Object(zr.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(zr.a)(Object(zr.a)(n))),n.updatePassword=n.updatePassword.bind(Object(zr.a)(Object(zr.a)(n))),n.state={hasPassword:!!e.password},n}return Object(Kr.a)(t,e),Object(Ur.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(y.__)("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;n("private"===t?"draft":r,e.password||""),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(Ar.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Ar.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(y.__)("Post Visibility")),is.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(Ar.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(Ar.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(Ar.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Ar.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(Ar.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Ar.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(y.__)("Create password")),Object(Ar.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(y.__)("Use a secure password")}))]}}]),t}(Ar.Component),as=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(s.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})}}}),Dr.withInstanceId])(cs);var ss=Object(s.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(v.find)(is,{value:t}).label});var ls=Object(Dr.compose)([Object(s.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(s.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(ct.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Ar.createElement)(Wr.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,locale:r.l10n.locale,is12Hour:o})});var us=Object(s.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}})(function(e){var t=e.date,n=e.isFloating,r=Object(ct.__experimentalGetSettings)();return t&&!n?Object(ct.dateI18n)(r.formats.datetimeAbbreviated,t):Object(y.__)("Immediately")}),ds={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},ps=function(e,t){return e.toLowerCase()===t.toLowerCase()},bs=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(zr.a)(Object(zr.a)(e))),e.searchTerms=Object(v.throttle)(e.searchTerms.bind(Object(zr.a)(Object(zr.a)(e))),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(zr.a)(Object(zr.a)(e))),e.state={loading:!1,availableTerms:[],selectedTerms:[]},e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.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})}))}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.initRequest,["abort"]),Object(v.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(u.a)({},ds,t),o=vr()({path:Object(kr.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(v.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(v.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 vr()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:e}}).catch(function(r){return"term_exists"===r.code?(t.addRequest=vr()({path:Object(kr.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(u.a)({},ds,{search:e}))}),t.addRequest.then(function(t){return Object(v.find)(t,function(t){return ps(t.name,e)})})):Promise.reject(r)})}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(v.find)(t.state.availableTerms,function(t){return ps(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(v.find)(t,function(t){return ps(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(v.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(v.get)(n,["data","labels","add_new_item"],"post_tag"===t?Object(y.__)("Add New Tag"):Object(y.__)("Add New Term")),l=Object(v.get)(n,["data","labels","singular_name"],"post_tag"===t?Object(y.__)("Tag"):Object(y.__)("Term")),u=Object(y.sprintf)(Object(y._x)("%s added","term"),l),d=Object(y.sprintf)(Object(y._x)("%s removed","term"),l),p=Object(y.sprintf)(Object(y._x)("Remove %s","term"),l);return Object(Ar.createElement)(Wr.FormTokenField,{value:c,displayTransform:v.unescape,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:u,removed:d,remove:p}})}}]),t}(Ar.Component),fs=Object(Dr.compose)(Object(s.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(s.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(b.a)({},n,t))}}}),Object(Wr.withFilters)("editor.PostTaxonomyType"))(bs),hs=function(){var e=[Object(y.__)("Suggestion:"),Object(Ar.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(y.__)("Add tags"))];return Object(Ar.createElement)(Wr.PanelBody,{initialOpen:!1,title:e},Object(Ar.createElement)("p",null,Object(y.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Ar.createElement)(fs,{slug:"post_tag"}))},ms=function(e){function t(e){var n;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Ar.createElement)(hs,null)}}]),t}(Ar.Component),vs=Object(Dr.compose)(Object(s.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(v.some)(n.types,function(e){return e===t}),hasTags:r&&r.length}}),Object(Dr.ifCondition)(function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t}))(ms),Os=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(Ar.createElement)(Wr.Button,{isLink:!0,onClick:function(){return r(t)}},n)},gs=function(e,t){var n=Va.filter(function(t){return Object(v.includes)(e,t.id)});return Object(v.find)(n,function(e){return e.id===t})},js=Object(Dr.compose)(Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:gs(o,r())}}),Object(s.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Object(Dr.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(y.__)("Suggestion:"),Object(Ar.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(y.__)("Use a post format"))];return Object(Ar.createElement)(Wr.PanelBody,{initialOpen:!1,title:r},Object(Ar.createElement)("p",null,Object(y.__)("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(Ar.createElement)("p",null,Object(Ar.createElement)(Os,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(y.sprintf)(Object(y.__)('Apply the "%1$s" format.'),t.caption)})))});var ys=Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(y.__)("Are you ready to schedule?"),n=Object(y.__)("Your work will be published at the specified date and time.")):(t=Object(y.__)("Are you ready to publish?"),n=Object(y.__)("Double-check your settings before publishing.")):(t=Object(y.__)("Are you ready to submit for review?"),n=Object(y.__)("When youre ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Ar.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Ar.createElement)("div",null,Object(Ar.createElement)("strong",null,t)),Object(Ar.createElement)("p",null,n),r&&Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(Wr.PanelBody,{initialOpen:!1,title:[Object(y.__)("Visibility:"),Object(Ar.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Ar.createElement)(ss,null))]},Object(Ar.createElement)(as,null)),Object(Ar.createElement)(Wr.PanelBody,{initialOpen:!1,title:[Object(y.__)("Publish:"),Object(Ar.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Ar.createElement)(us,null))]},Object(Ar.createElement)(ls,null)),Object(Ar.createElement)(js,null),Object(Ar.createElement)(vs,null),i))}),ks=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(zr.a)(Object(zr.a)(e))),e.onSelectInput=e.onSelectInput.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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(v.get)(o,["labels","singular_name"]),c=Object(v.get)(o,["labels","view_item"]),a=n?Object(Ar.createElement)(Ar.Fragment,null,Object(y.__)("is now scheduled. It will go live on")," ",Object(Ar.createElement)(us,null),"."):Object(y.__)("is now live.");return Object(Ar.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Ar.createElement)(Wr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Ar.createElement)("a",{href:r.link},r.title||Object(y.__)("(no title)"))," ",a),Object(Ar.createElement)(Wr.PanelBody,null,Object(Ar.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Ar.createElement)("strong",null,Object(y.__)("Whats next?"))),Object(Ar.createElement)(Wr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(y.sprintf)(Object(y.__)("%s address"),i),value:r.link,onFocus:this.onSelectInput}),Object(Ar.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Ar.createElement)(Wr.Button,{isDefault:!0,href:r.link},c),Object(Ar.createElement)(Wr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(y.__)("Copied!"):Object(y.__)("Copy Link")))),t)}}]),t}(Ar.Component),_s=Object(s.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()}})(ks),Ss=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,c=e.isScheduled,a=e.isSaving,s=e.onClose,l=e.onTogglePublishSidebar,u=e.PostPublishExtension,p=e.PrePublishExtension,b=Object(d.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),f=o||c&&r,h=Object(v.omit)(b,["hasPublishAction","isDirty"]);return Object(Ar.createElement)("div",Object(Lr.a)({className:"editor-post-publish-panel"},h),Object(Ar.createElement)("div",{className:"editor-post-publish-panel__header"},f&&!a?Object(Ar.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(y.__)("Scheduled"):Object(y.__)("Published")):Object(Ar.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Ar.createElement)(os,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n}),Object(Ar.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(Ar.createElement)(Wr.IconButton,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(y.__)("Close panel")})),Object(Ar.createElement)("div",{className:"editor-post-publish-panel__content"},!a&&!f&&Object(Ar.createElement)(ys,null,p&&Object(Ar.createElement)(p,null)),!a&&f&&Object(Ar.createElement)(_s,null,u&&Object(Ar.createElement)(u,null)),a&&Object(Ar.createElement)(Wr.Spinner,null)),Object(Ar.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Ar.createElement)(Wr.CheckboxControl,{label:Object(y.__)("Always show pre-publish checks."),checked:i,onChange:l})))}}]),t}(Ar.Component),Es=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled,i=t.isEditedPostBeingScheduled,c=t.isEditedPostDirty,a=t.isSavingPost,s=e("core/editor").isPublishSidebarEnabled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:i(),isDirty:c(),isPublished:r(),isPublishSidebarEnabled:s(),isSaving:a(),isScheduled:o()}}),Object(s.withDispatch)(function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}})])(Ss);var Cs=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostSaveable,o=t.isEditedPostPublishable,i=t.isCurrentPostPublished,c=t.isEditedPostBeingScheduled;return{isSaving:n(),isSaveable:r(),isPublishable:o(),isPublished:i(),isBeingScheduled:c()}})])(function(e){var t=e.isSaving,n=e.isPublishable,r=e.isSaveable,o=e.isPublished,i=e.isBeingScheduled,a=e.onToggle,s=e.isOpen,l=e.forceIsSaving,u=!t&&!l&&n&&r||o;return Object(Ar.createElement)(Wr.Button,{className:"editor-post-publish-panel__toggle",isPrimary:!0,onClick:a,"aria-expanded":s,disabled:!u,isBusy:t&&o},i?Object(y.__)("Schedule…"):Object(y.__)("Publish…"),Object(Ar.createElement)(c.DotTip,{tipId:"core/editor.publish"},Object(y.__)("Finished writing? Thats great, lets get this published right now. Just click “Publish” and youre good to go.")))});var ws=Object(Dr.compose)([Object(s.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(s.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(Ar.createElement)(Wr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(y.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(y.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},Object(y.__)("Switch to Draft")):null}),Ts=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(Kr.a)(t,e),Object(Ur.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.post,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,c=e.isSaving,a=e.isSaveable,s=e.onSave,l=e.isAutosaving,u=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage,b=Object(v.get)(t,["_links","wp:action-publish"],!1);if(c){var f=Rr()("editor-post-saved-state","is-saving",{"is-autosaving":l});return Object(Ar.createElement)("span",{className:f},Object(Ar.createElement)(Wr.Dashicon,{icon:"cloud"}),l?Object(y.__)("Autosaving"):Object(y.__)("Saving"))}if(o||r)return Object(Ar.createElement)(ws,null);if(!a)return null;if(p||!n&&!i)return Object(Ar.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Ar.createElement)(Wr.Dashicon,{icon:"saved"}),Object(y.__)("Saved"));if(!b&&u)return null;var h=u?Object(y.__)("Save as Pending"):Object(y.__)("Save Draft");return d?Object(Ar.createElement)(Wr.Button,{className:"editor-post-save-draft",onClick:s,shortcut:So.displayShortcut.primary("s"),isTertiary:!0},h):Object(Ar.createElement)(Wr.IconButton,{className:"editor-post-save-draft",label:h,onClick:s,shortcut:So.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(Ar.Component),Ps=Object(Dr.compose)([Object(s.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,b=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:c(),isScheduled:a(),isDirty:n||s(),isSaving:r||l(),isSaveable:u(),isAutosaving:p(),isPending:"pending"===b("status")}}),Object(s.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),Dr.withSafeTimeout,Object(a.withViewportMatch)({isLargeViewport:"medium"})])(Ts);var Is=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var Bs=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.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 xs=Object(Dr.compose)([Object(s.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(s.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(Ar.createElement)(Bs,null,Object(Ar.createElement)(Wr.CheckboxControl,{label:Object(y.__)("Stick to the Front Page"),checked:r,onChange:function(){return t(!r)}}))}),Ls={per_page:-1,orderby:"name",order:"asc"},As=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(zr.a)(Object(zr.a)(e))),e.onChange=e.onChange.bind(Object(zr.a)(Object(zr.a)(e))),e.onChangeFormName=e.onChangeFormName.bind(Object(zr.a)(Object(zr.a)(e))),e.onChangeFormParent=e.onChangeFormParent.bind(Object(zr.a)(Object(zr.a)(e))),e.onAddTerm=e.onAddTerm.bind(Object(zr.a)(Object(zr.a)(e))),e.onToggleForm=e.onToggleForm.bind(Object(zr.a)(Object(zr.a)(e))),e.setFilterValue=e.setFilterValue.bind(Object(zr.a)(Object(zr.a)(e))),e.state={formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=parseInt(e.target.value,10);n(-1!==o.indexOf(i)?Object(v.without)(o,i):Object(p.a)(o).concat([i]))}},{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(v.find)(e,function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(e){e.preventDefault();var t=this.props,n=t.onUpdateTerms,r=t.addTermToEditedPost,o=t.terms,i=t.availableTerms,c=this.state,a=c.formName,s=c.formParent;if(""!==a){var l=this.findTerm(i,s,a);if(l)return Object(v.some)(o,function(e){return e===l.id})||n(Object(p.a)(o).concat([l.id])),void this.setState({formName:"",formParent:""});r({name:a,parent:s||void 0}),this.setState({formName:"",formParent:""})}}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter(function(e){return e}).length>0)};return e.sort(function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0}),e}},{key:"setFilterValue",value:function(e){var t=this.props.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter(function(e){return e});this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r<t.length;r++)n++,void 0!==t[r].children&&(n+=e(t[r].children));return n}(r),i=Object(y.sprintf)(Object(y._n)("%d result found.","%d results found.",o),o);this.props.debouncedSpeak(i,"assertive")}},{key:"getFilterMatcher",value:function(e){return function t(n){if(""===e)return n;var r=Object(u.a)({},n);return r.children.length>0&&(r.children=r.children.map(t).filter(function(e){return e})),(-1!==r.name.toLowerCase().indexOf(e)||r.children.length>0)&&r}}},{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(Ar.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Ar.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(Ar.createElement)("label",{htmlFor:n},Object(v.unescape)(e.name)),!!e.children.length&&Object(Ar.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,i=e.hasAssignAction,c=e.availableTermsTree,a=e.availableTerms;if(!i)return null;var s=this.state,l=s.filteredTermsTree,u=s.formName,d=s.formParent,p=s.isRequestingTerms,b=s.showForm,f=s.filterValue,h=function(e,r,o){return Object(v.get)(n,["data","labels",e],"category"===t?r:o)},m=h("add_new_item",Object(y.__)("Add new category"),Object(y.__)("Add new term")),O=h("new_item_name",Object(y.__)("Add new category"),Object(y.__)("Add new term")),g=h("parent_item",Object(y.__)("Parent Category"),Object(y.__)("Parent Term")),j="— ".concat(g," —"),k=m,_="editor-post-taxonomies__hierarchical-terms-input-".concat(r),S="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),E=Object(y.sprintf)(Object(y._x)("Search %s","term"),Object(v.get)(this.props.taxonomy,["name"],"category"===t?Object(y.__)("Categories"):Object(y.__)("Terms"))),C=Object(y.sprintf)(Object(y._x)("Available %s","term"),Object(v.get)(this.props.taxonomy,["name"],"category"===t?Object(y.__)("Categories"):Object(y.__)("Terms"))),w=a&&a.length>=8;return[w&&Object(Ar.createElement)("label",{key:"filter-label",htmlFor:S},E),w&&Object(Ar.createElement)("input",{type:"search",id:S,value:f,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Ar.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":C},this.renderTerms(""!==f?l:this.sortBySelected(c))),!p&&o&&Object(Ar.createElement)(Wr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":b,isLink:!0},m),b&&Object(Ar.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Ar.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},O),Object(Ar.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Ar.createElement)(Wr.TreeSelect,{label:g,noOptionLabel:j,onChange:this.onChangeFormParent,selectedId:d,tree:c}),Object(Ar.createElement)(Wr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},k))]}}]),t}(Ar.Component),Ns=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=e("core"),i=o.getTaxonomy,c=o.getEntityRecords,a=e("core/data").isResolving,s=i(n),l=c("taxonomy",n,Ls),u=ya(l);return{hasCreateAction:!!s&&Object(v.get)(r(),["_links","wp:action-create-"+s.rest_base],!1),hasAssignAction:!!s&&Object(v.get)(r(),["_links","wp:action-assign-"+s.rest_base],!1),terms:s?e("core/editor").getEditedPostAttribute(s.rest_base):[],isRequestingTerms:a("core","getEntityRecords",["taxonomy",n,Ls]),taxonomy:s,availableTerms:l,availableTermsTree:u}}),Object(s.withDispatch)(function(e,t){var n=t.slug,r=t.taxonomy;return{onUpdateTerms:function(t){e("core/editor").editPost(Object(b.a)({},r.rest_base,t))},addTermToEditedPost:function(t){return e("core/editor").addTermToEditedPost(n,t)}}}),Wr.withSpokenMessages,Dr.withInstanceId,Object(Wr.withFilters)("editor.PostTaxonomyType")])(As);var Rs=Object(Dr.compose)([Object(s.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?v.identity:r,i=Object(v.filter)(n,function(e){return Object(v.includes)(e.types,t)});return Object(v.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?Ns:fs;return Object(Ar.createElement)(Ar.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(Ar.createElement)(t,{slug:e.slug}),e))})});var Ds=Object(Dr.compose)([Object(s.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(v.some)(n,function(e){return Object(v.includes)(e.types,t)})?r:null}),Fs=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(zr.a)(Object(zr.a)(e))),e.stopEditing=e.stopEditing.bind(Object(zr.a)(Object(zr.a)(e))),e.state={},e}return Object(Kr.a)(t,e),Object(Ur.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(Qi.decodeEntities)(n);return Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)("label",{htmlFor:"post-content-".concat(r),className:"screen-reader-text"},o||Object(y.__)("Write your story")),Object(Ar.createElement)(bi.a,{autoComplete:"off",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(r),placeholder:o||Object(y.__)("Write your story")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(Ar.Component),Ms=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostContent,r=(0,t.getEditorSettings)().bodyPlaceholder;return{value:n(),placeholder:r}}),Object(s.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.resetBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){r(Object(i.parse)(e))}}}),Dr.withInstanceId])(Fs),Us=function(e){function t(e){var n,r=e.permalinkParts;return Object(Mr.a)(this,t),(n=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={editedPostName:r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(zr.a)(Object(zr.a)(n))),n}return Object(Kr.a)(t,e),Object(Ur.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(Ar.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Ar.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Ar.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Ar.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(y.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(Ar.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),""),Object(Ar.createElement)(Wr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(y.__)("Save")))}}]),t}(Ar.Component),Hs=Object(Dr.compose)([Object(s.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(s.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(Us),Vs=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(zr.a)(Object(zr.a)(e))),e.onVisibilityChange=e.onVisibilityChange.bind(Object(zr.a)(Object(zr.a)(e))),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(Kr.a)(t,e),Object(Ur.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(y.__)("Permalink copied"):Object(y.__)("Copy the permalink");return n||!r?null:Object(Ar.createElement)("div",{className:"editor-post-permalink"},Object(Ar.createElement)(Wr.ClipboardButton,{className:Rr()("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(Ar.createElement)("span",{className:"editor-post-permalink__label"},Object(y.__)("Permalink:")),!l&&Object(Ar.createElement)(Wr.ExternalLink,{className:"editor-post-permalink__link",href:c?i:r,target:"_blank",ref:function(t){return e.linkElement=t}},Object(kr.safeDecodeURI)(i),""),l&&Object(Ar.createElement)(Hs,{onSave:function(){return e.setState({isEditingPermalink:!1})}}),o&&!l&&Object(Ar.createElement)(Wr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(y.__)("Edit")),!o&&Object(Ar.createElement)(Wr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Wa("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(y.__)("Change Permalinks")))}}]),t}(Ar.Component),Ks=Object(Dr.compose)([Object(s.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(s.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(Vs),zs=/[\r\n]+/g,Ws=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(zr.a)(Object(zr.a)(e))),e.onSelect=e.onSelect.bind(Object(zr.a)(Object(zr.a)(e))),e.onUnselect=e.onUnselect.bind(Object(zr.a)(Object(zr.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(zr.a)(Object(zr.a)(e))),e.redirectHistory=e.redirectHistory.bind(Object(zr.a)(Object(zr.a)(e))),e.state={isSelected:!1},e}return Object(Kr.a)(t,e),Object(Ur.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(zs," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===So.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=Rr()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),u=Object(Qi.decodeEntities)(c);return Object(Ar.createElement)(Oa,{supportKeys:"title"},Object(Ar.createElement)("div",{className:"editor-post-title"},Object(Ar.createElement)("div",{className:l},Object(Ar.createElement)(Wr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(Ar.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},u||Object(y.__)("Add title")),Object(Ar.createElement)(bi.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:u||Object(y.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),s&&o&&Object(Ar.createElement)(Ks,null))))}}]),t}(Ar.Component),qs=Object(s.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(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:l}}),Gs=Object(s.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}}),Ys=Object(Dr.compose)(qs,Gs,Dr.withInstanceId,Wr.withFocusOutside)(Ws);var $s=Object(Dr.compose)([Object(s.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(s.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(d.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(Ar.createElement)(Wr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(y.__)("Move to trash"))});var Xs=Object(s.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 Qs=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),Zs=n(191);var Js=Object(s.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content;return Object(Ar.createElement)("span",{className:"word-count"},Object(Zs.count)(t,"words"))});var el=Object(s.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(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(y.__)("Document Statistics"),tabIndex:"0"},Object(Ar.createElement)("div",{className:"table-of-contents__count"},Object(y.__)("Words"),Object(Ar.createElement)(Js,null)),Object(Ar.createElement)("div",{className:"table-of-contents__count"},Object(y.__)("Headings"),Object(Ar.createElement)("span",{className:"table-of-contents__number"},t)),Object(Ar.createElement)("div",{className:"table-of-contents__count"},Object(y.__)("Paragraphs"),Object(Ar.createElement)("span",{className:"table-of-contents__number"},n)),Object(Ar.createElement)("div",{className:"table-of-contents__count"},Object(y.__)("Blocks"),Object(Ar.createElement)("span",{className:"table-of-contents__number"},r))),t>0&&Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)("hr",null),Object(Ar.createElement)("span",{className:"table-of-contents__title"},Object(y.__)("Document Outline")),Object(Ar.createElement)(ca,null)))});var tl=Object(s.withSelect)(function(e){return{hasBlocks:!!e("core/editor").getBlockCount()}})(function(e){var t=e.hasBlocks;return Object(Ar.createElement)(Wr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Ar.createElement)(Wr.IconButton,{onClick:r,icon:"info-outline","aria-expanded":n,label:Object(y.__)("Content structure"),disabled:!t})},renderContent:function(){return Object(Ar.createElement)(el,null)}})}),nl=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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){if(this.props.isDirty)return e.returnValue=Object(y.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(Ar.Component),rl=Object(s.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(nl),ol=Object(s.withSelect)(function(e){return{selectedBlockClientId:e("core/editor").getBlockSelectionStart()}})(function(e){var t=e.selectedBlockClientId;return t&&Object(Ar.createElement)(Wr.Button,{isDefault:!0,type:"button",className:"editor-skip-to-selected-block",onClick:function(){qi(t).closest(".editor-block-list__block").focus()}},Object(y.__)("Skip to the selected block"))}),il=n(123),cl=n.n(il);function al(e,t,n){var r=new cl.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}var sl=Object(Dr.compose)([Object(s.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(v.get)(Object(i.getBlockType)(r.name),["styles"])}}),Object(s.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=void 0===c?v.noop:c,s=e.onHoverClassName,l=void 0===s?v.noop:s;if(!t)return null;var d=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,c=new cl.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(v.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(v.find)(e,"isDefault")}(t,n);function p(e){var t=al(n,d,e);r(t),a()}return Object(Ar.createElement)("div",{className:"editor-block-styles"},t.map(function(e){var t=al(n,d,e);return Object(Ar.createElement)("div",{key:e.name,className:Rr()("editor-block-styles__item",{"is-active":d===e}),onClick:function(){return p(e)},onKeyDown:function(t){So.ENTER!==t.keyCode&&So.SPACE!==t.keyCode||(t.preventDefault(),p(e))},onMouseEnter:function(){return l(t)},onMouseLeave:function(){return l(null)},role:"button",tabIndex:"0","aria-label":e.label||e.name},Object(Ar.createElement)("div",{className:"editor-block-styles__item-preview"},Object(Ar.createElement)(wi,{name:o,attributes:Object(u.a)({},i,{className:t})})),Object(Ar.createElement)("div",{className:"editor-block-styles__item-label"},e.label||e.name))}))}),ll=Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.getSelectedBlock,r=t.getSelectedBlockCount,o=n();return{selectedBlock:o,blockType:o&&Object(i.getBlockType)(o.name),count:r()}})(function(e){var t=e.selectedBlock,n=e.blockType;if(e.count>1)return Object(Ar.createElement)("span",{className:"editor-block-inspector__multi-blocks"},Object(y.__)("Coming Soon"));var r=!!t&&t.name===Object(i.getUnregisteredTypeHandlerName)();return!t||r?Object(Ar.createElement)("span",{className:"editor-block-inspector__no-blocks"},Object(y.__)("No block selected.")):Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)("div",{className:"editor-block-inspector__card"},Object(Ar.createElement)(Jr,{icon:n.icon,showColors:!0}),Object(Ar.createElement)("div",{className:"editor-block-inspector__card-content"},Object(Ar.createElement)("div",{className:"editor-block-inspector__card-title"},n.title),Object(Ar.createElement)("div",{className:"editor-block-inspector__card-description"},n.description))),!!n.styles&&Object(Ar.createElement)("div",null,Object(Ar.createElement)(Wr.PanelBody,{title:Object(y.__)("Styles"),initialOpen:!1},Object(Ar.createElement)(sl,{clientId:t.clientId}))),Object(Ar.createElement)("div",null,Object(Ar.createElement)(bc.Slot,null)),Object(Ar.createElement)("div",null,Object(Ar.createElement)(sc.Slot,null,function(e){return!Object(v.isEmpty)(e)&&Object(Ar.createElement)(Wr.PanelBody,{className:"editor-block-inspector__advanced",title:Object(y.__)("Advanced"),initialOpen:!1},e)})),Object(Ar.createElement)(ol,{key:"back"}))}),ul=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).bindContainer=e.bindContainer.bind(Object(zr.a)(Object(zr.a)(e))),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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(Ar.createElement)("div",Object(Lr.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(v.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),t}(Ar.Component),dl=Object(Dr.compose)([Object(s.withSelect)(function(e){var t=e("core/editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}}),Object(s.withDispatch)(function(e){return{clearSelectedBlock:e("core/editor").clearSelectedBlock}})])(ul);var pl=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,c=r.getBlockMode,a=o(n);return{mode:c(n),blockType:a?Object(i.getBlockType)(a.name):null}}),Object(s.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?v.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,c=void 0!==o&&o;if(!Object(i.hasBlockSupport)(t,"html",!0))return null;var a="visual"===n?Object(y.__)("Edit as HTML"):Object(y.__)("Edit visually");return Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"html",label:c?a:void 0},!c&&a)});var bl=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlock,c=r.canInsertBlockType,a=r.__experimentalGetReusableBlock,s=e("core/blocks"),l=s.getFreeformFallbackBlockName,u=s.getUnregisteredFallbackBlockName,d=Object(v.map)(n,function(e){return o(e)}),p=Object(v.every)(d,function(e){return!!e})&&c("core/block")&&(1!==d.length||d[0].name!==l()&&d[0].name!==u());return{isVisible:p,isStaticBlock:p&&(1!==d.length||!Object(i.isReusableBlock)(d[0])||!a(d[0].attributes.ref))}}),Object(s.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.noop:r,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;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(Ar.createElement)(Ar.Fragment,null,n&&Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(y.__)("Add to Reusable Blocks")),!n&&Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(y.__)("Convert to Regular Block"))):null});var fl=Object(Dr.compose)([Object(s.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.getBlock,c=r.__experimentalGetReusableBlock,a=o(n);return{reusableBlock:a&&Object(i.isReusableBlock)(a)?c(a.attributes.ref):null}}),Object(s.withDispatch)(function(e,t){var n=t.onToggle,r=void 0===n?v.noop:n,o=e("core/editor").__experimentalDeleteReusableBlock;return{onDelete:function(e){window.confirm(Object(y.__)("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(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",icon:"no",disabled:t.isTemporary,onClick:function(){return n(t.id)}},Object(y.__)("Remove from Reusable Blocks")):null});function hl(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(y.__)("Convert to Blocks");return Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",onClick:n,icon:"screenoptions",label:r?o:void 0},!r&&o)}var ml=Object(Dr.compose)(Object(s.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(s.withDispatch)(function(e,t){var n=t.block,r=t.canUserUseUnfilteredHTML;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.getBlockContent)(n),mode:"BLOCKS",canUserUseUnfilteredHTML:r}))}}}))(hl),vl=Object(Dr.compose)(Object(s.withSelect)(function(e,t){var n=t.clientId,r=e("core/editor"),o=r.canUserUseUnfilteredHTML,c=(0,r.getBlock)(n);return{block:c,canUserUseUnfilteredHTML:o(),shouldRender:c&&c.name===Object(i.getFreeformContentHandlerName)()}}),Object(s.withDispatch)(function(e,t){var n=t.block,r=t.canUserUseUnfilteredHTML;return{onClick:function(){return e("core/editor").replaceBlocks(n.clientId,Object(i.rawHandler)({HTML:Object(i.serialize)(n),mode:"BLOCKS",canUserUseUnfilteredHTML:r}))}}}))(hl),Ol=Object(Wr.createSlotFill)("_BlockSettingsMenuFirstItem"),gl=Ol.Fill,jl=Ol.Slot;gl.Slot=jl;var yl=gl,kl=Object(Wr.createSlotFill)("_BlockSettingsMenuPluginsExtension"),_l=kl.Fill,Sl=kl.Slot;_l.Slot=Sl;var El=_l;var Cl=Object(s.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(v.castArray)(t),o=r.length,i=r[0];return Object(Ar.createElement)(sa,{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(Ar.createElement)(Wr.Dropdown,{contentClassName:"editor-block-settings-menu__popover",position:"bottom right",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,c=Rr()("editor-block-settings-menu__toggle",{"is-opened":r}),a=r?Object(y.__)("Hide options"):Object(y.__)("More options");return Object(Ar.createElement)(Wr.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(Ar.createElement)(Wr.NavigableMenu,{className:"editor-block-settings-menu__content"},Object(Ar.createElement)(yl.Slot,{fillProps:{onClose:n}}),1===o&&Object(Ar.createElement)(vl,{clientId:i}),1===o&&Object(Ar.createElement)(ml,{clientId:i}),!u&&l&&Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",onClick:r,icon:"admin-page",shortcut:ua.duplicate.display},Object(y.__)("Duplicate")),!u&&Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",onClick:s,icon:"insert-before",shortcut:ua.insertBefore.display},Object(y.__)("Insert Before")),Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",onClick:a,icon:"insert-after",shortcut:ua.insertAfter.display},Object(y.__)("Insert After"))),1===o&&Object(Ar.createElement)(pl,{clientId:i,onToggle:n}),Object(Ar.createElement)(bl,{clientIds:t,onToggle:n}),Object(Ar.createElement)(El.Slot,{fillProps:{clientIds:t,onClose:n}}),Object(Ar.createElement)("div",{className:"editor-block-settings-menu__separator"}),1===o&&Object(Ar.createElement)(fl,{clientId:i,onToggle:n}),!u&&Object(Ar.createElement)(Wr.MenuItem,{className:"editor-block-settings-menu__control",onClick:c,icon:"trash",shortcut:ua.removeBlock.display},Object(y.__)("Remove Block")))}})})}),wl=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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,c=this.state.hoveredClassName;if(!n||!n.length)return null;var a=Object(v.mapKeys)(o,function(e){return e.name}),s=Object(v.orderBy)(Object(v.filter)(Object(i.getPossibleBlockTransformations)(n),function(e){return!!a[e.name]}),function(e){return a[e.name].frecency},"desc"),l=n[0].name,d=Object(i.getBlockType)(l),p=1===n.length&&0!==Object(v.get)(d,["styles"],[]).length;return p||s.length?Object(Ar.createElement)(Wr.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(y.__)("Change block type"):Object(y.sprintf)(Object(y._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(Ar.createElement)(Wr.Toolbar,null,Object(Ar.createElement)(Wr.IconButton,{className:"editor-block-switcher__toggle",onClick:t,"aria-haspopup":"true","aria-expanded":r,label:o,tooltip:o,onKeyDown:function(e){r||e.keyCode!==So.DOWN||(e.preventDefault(),e.stopPropagation(),t())}},Object(Ar.createElement)(Jr,{icon:d.icon,showColors:!0}),Object(Ar.createElement)(Wr.SVG,{className:"editor-block-switcher__transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(Ar.createElement)(Wr.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(Ar.createElement)(Ar.Fragment,null,p&&Object(Ar.createElement)(Wr.PanelBody,{title:Object(y.__)("Block Styles"),initialOpen:!0},Object(Ar.createElement)(sl,{clientId:n[0].clientId,onSwitch:o,onHoverClassName:e.onHoverClassName})),0!==s.length&&Object(Ar.createElement)(Wr.PanelBody,{title:Object(y.__)("Transform To:"),initialOpen:!0},Object(Ar.createElement)(Ii,{items:s.map(function(e){return{id:e.name,icon:e.icon,title:e.title,hasChildBlocksWithInserterSupport:Object(i.hasChildBlocksWithInserterSupport)(e.name)}}),onSelect:function(e){r(n,e.id),o()}})),null!==c&&Object(Ar.createElement)(Ti,{name:n[0].name,attributes:Object(u.a)({},n[0].attributes,{className:c})}))}}):null}}]),t}(Ar.Component),Tl=Object(Dr.compose)(Object(s.withSelect)(function(e,t){var n=t.clientIds,r=e("core/editor"),o=r.getBlocksByClientId,i=r.getBlockRootClientId,c=r.getInserterItems,a=i(Object(v.first)(Object(v.castArray)(n)));return{blocks:o(n),inserterItems:c(a)}}),Object(s.withDispatch)(function(e,t){return{onTransform:function(n,r){e("core/editor").replaceBlocks(t.clientIds,Object(i.switchToBlockType)(n,r))}}}))(wl);var Pl=Object(s.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(Ar.createElement)(Tl,{key:"switcher",clientIds:n}):null});var Il=Object(s.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}})(function(e){var t=e.blockClientIds,n=e.isValid,r=e.mode;return 0===t.length?null:t.length>1?Object(Ar.createElement)("div",{className:"editor-block-toolbar"},Object(Ar.createElement)(Pl,null),Object(Ar.createElement)(Cl,{clientIds:t})):Object(Ar.createElement)("div",{className:"editor-block-toolbar"},"visual"===r&&n&&Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(Tl,{clientIds:t}),Object(Ar.createElement)(mo.Slot,null),Object(Ar.createElement)(_o.Slot,null)),Object(Ar.createElement)(Cl,{clientIds:t}))}),Bl=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onCopy=e.onCopy.bind(Object(zr.a)(Object(zr.a)(e))),e.onCut=e.onCut.bind(Object(zr.a)(Object(zr.a)(e))),e}return Object(Kr.a)(t,e),Object(Ur.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(Wo.documentHasSelection)())){var o=Object(i.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}(Ar.Component),xl=Object(Dr.compose)([Object(s.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(s.withDispatch)(function(e){return{onRemove:e("core/editor").removeBlocks}})])(Bl),Ll=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(zr.a)(Object(zr.a)(e))),e.getContent=e.getContent.bind(Object(zr.a)(Object(zr.a)(e))),e.state={error:null},e}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(s.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(Ar.createElement)(ni,{className:"editor-error-boundary",actions:[Object(Ar.createElement)(Wr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(y.__)("Attempt Recovery")),Object(Ar.createElement)(Wr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(y.__)("Copy Post Text")),Object(Ar.createElement)(Wr.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(y.__)("Copy Error"))]},Object(y.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(Ar.Component),Al=function(e){function t(){return Object(Mr.a)(this,t),Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidUpdate",value:function(){this.scrollIntoView()}},{key:"scrollIntoView",value:function(){var e=this.props.extentClientId;if(e){var t=qi(e);if(t){var n=Object(Wo.getScrollContainer)(t);n&&Ci()(t,n,{onlyScrollIfNeeded:!0})}}}},{key:"render",value:function(){return null}}]),t}(Ar.Component),Nl=Object(s.withSelect)(function(e){return{extentClientId:(0,e("core/editor").getLastMultiSelectedBlockClientId)()}})(Al),Rl=[So.UP,So.RIGHT,So.DOWN,So.LEFT,So.ENTER,So.BACKSPACE];var Dl=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).stopTypingOnSelectionUncollapse=e.stopTypingOnSelectionUncollapse.bind(Object(zr.a)(Object(zr.a)(e))),e.stopTypingOnMouseMove=e.stopTypingOnMouseMove.bind(Object(zr.a)(Object(zr.a)(e))),e.startTypingInTextField=e.startTypingInTextField.bind(Object(zr.a)(Object(zr.a)(e))),e.stopTypingOnNonTextField=e.stopTypingOnNonTextField.bind(Object(zr.a)(Object(zr.a)(e))),e.stopTypingOnEscapeKey=e.stopTypingOnEscapeKey.bind(Object(zr.a)(Object(zr.a)(e))),e.onKeyDown=Object(v.over)([e.startTypingInTextField,e.stopTypingOnEscapeKey]),e.lastMouseMove=null,e}return Object(Kr.a)(t,e),Object(Ur.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:"stopTypingOnEscapeKey",value:function(e){this.props.isTyping&&e.keyCode===So.ESCAPE&&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(Wo.isTextField)(i)||i.closest(".editor-block-toolbar")||("keydown"!==o||function(e){var t=e.keyCode;return!e.shiftKey&&Object(v.includes)(Rl,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(Wo.isTextField)(i)&&o()})}},{key:"render",value:function(){var e=this.props.children;return Object(Ar.createElement)("div",{onFocus:this.stopTypingOnNonTextField,onKeyPress:this.startTypingInTextField,onKeyDown:this.onKeyDown},e)}}]),t}(Ar.Component),Fl=Object(Dr.compose)([Object(s.withSelect)(function(e){return{isTyping:(0,e("core/editor").isTyping)()}}),Object(s.withDispatch)(function(e){var t=e("core/editor");return{onStartTyping:t.startTyping,onStopTyping:t.stopTyping}}),Dr.withSafeTimeout])(Dl),Ml=function(e){function t(){return Object(Mr.a)(this,t),Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))}return Object(Kr.a)(t,e),Object(Ur.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=qi(e);return t?t.getBoundingClientRect().top:null}},{key:"restorePreviousOffset",value:function(e){var t=qi(this.props.selectionStart);if(t){var n=Object(Wo.getScrollContainer)(t);n&&(n.scrollTop=n.scrollTop+t.getBoundingClientRect().top-e)}}},{key:"render",value:function(){return null}}]),t}(Ar.Component),Ul=Object(s.withSelect)(function(e){return{blockOrder:e("core/editor").getBlockOrder(),selectionStart:e("core/editor").getBlockSelectionStart()}})(Ml),Hl=window.getSelection,Vl=Object(v.overEvery)([Wo.isTextField,Wo.focus.tabbable.isTabbableIndex]);var Kl=function(e){function t(){var e;return Object(Mr.a)(this,t),(e=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onKeyDown=e.onKeyDown.bind(Object(zr.a)(Object(zr.a)(e))),e.bindContainer=e.bindContainer.bind(Object(zr.a)(Object(zr.a)(e))),e.clearVerticalRect=e.clearVerticalRect.bind(Object(zr.a)(Object(zr.a)(e))),e.focusLastTextField=e.focusLastTextField.bind(Object(zr.a)(Object(zr.a)(e))),e.verticalRect=null,e}return Object(Kr.a)(t,e),Object(Ur.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=Wo.focus.focusable.find(this.container);return t&&(n=Object(v.reverse)(n)),n=n.slice(n.indexOf(e)+1),Object(v.find)(n,function t(n,r,o){if(!Wo.focus.tabbable.isTabbableIndex(n))return!1;if(Object(Wo.isTextField)(n))return!0;if(!n.classList.contains("editor-block-list__block"))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,r,o=this.getClosestTabbable(e,t);return!(o&&(n=e,r=o,n.closest("[data-block]")===r.closest("[data-block]")))}},{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===So.UP,s=i===So.DOWN,l=i===So.LEFT,u=i===So.RIGHT,d=a||l,p=l||u,b=a||s,f=p||b,h=e.shiftKey,m=h||e.ctrlKey||e.altKey||e.metaKey,O=b?Wo.isVerticalEdge:Wo.isHorizontalEdge;if(!f)return So.isKeyboardEvent.primary(e)&&(this.isEntirelySelected=Object(Wo.isEntirelySelected)(c)),void(So.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?this.isEntirelySelected:Object(Wo.isEntirelySelected)(c))&&(r(Object(v.first)(o),Object(v.last)(o)),e.preventDefault()),this.isEntirelySelected=Object(Wo.isEntirelySelected)(c)));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===So.UP||t===So.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,i,m))if(b?this.verticalRect||(this.verticalRect=Object(Wo.computeCaretRect)(c)):this.verticalRect=null,h&&(n||this.isTabbableEdge(c,d)&&O(c,d)))this.expandSelection(d),e.preventDefault();else if(n)this.moveSelection(d),e.preventDefault();else if(b&&Object(Wo.isVerticalEdge)(c,d)){var g=this.getClosestTabbable(c,d);g&&(Object(Wo.placeCaretAtVerticalEdge)(g,d,this.verticalRect),e.preventDefault())}else if(p&&Hl().isCollapsed&&Object(Wo.isHorizontalEdge)(c,d)){var j=this.getClosestTabbable(c,d);Object(Wo.placeCaretAtHorizontalEdge)(j,d),e.preventDefault()}}},{key:"focusLastTextField",value:function(){var e=Wo.focus.focusable.find(this.container),t=Object(v.findLast)(e,Vl);t&&Object(Wo.placeCaretAtHorizontalEdge)(t,!0)}},{key:"render",value:function(){var e=this.props.children;return Object(Ar.createElement)("div",{className:"editor-writing-flow"},Object(Ar.createElement)("div",{ref:this.bindContainer,onKeyDown:this.onKeyDown,onMouseDown:this.clearVerticalRect},e),Object(Ar.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:this.focusLastTextField,className:"wp-block editor-writing-flow__click-redirect"}))}}]),t}(Ar.Component),zl=Object(Dr.compose)([Object(s.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(),b=o();return{selectedBlockClientId:d,selectionStartClientId:p,selectionBeforeEndClientId:i(b||d),selectionAfterEndClientId:c(b||d),selectedFirstClientId:a(),selectedLastClientId:s(),hasMultiSelection:l(),blocks:u()}}),Object(s.withDispatch)(function(e){var t=e("core/editor");return{onMultiSelect:t.multiSelect,onSelectBlock:t.selectBlock}})])(Kl),Wl=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,ql=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),b(),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(b(),h(n);e.length&&"}"!==e.charAt(0)&&(t=C()||w());)!1!==t&&(n.push(t),h(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 b(){p(/^\s*/)}function h(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){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 v(){var e=p(/^([^{]+)/);if(e)return Gl(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=Gl(t[0]),!p(/^:\s*/))return s("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Wl,""),value:n?Gl(n[0]).replace(Wl,""):""});return p(/^[;\s]*/),r}}function g(){var e,t=[];if(!l())return s("missing '{'");for(h(t);e=O();)!1!==e&&(t.push(e),h(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,k=E("import"),_=E("charset"),S=E("namespace");function E(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 C(){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=h();r=j();)c.push(r),c=c.concat(h());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=Gl(t[1]);if(!l())return s("@media missing '{'");var r=h().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:Gl(t[1]),media:Gl(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=Gl(t[1]);if(!l())return s("@supports missing '{'");var r=h().concat(d());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}}()||k()||_()||S()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Gl(t[1]),r=Gl(t[2]);if(!l())return s("@document missing '{'");var o=h().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=v()||[];if(!l())return s("@page missing '{'");for(var n,r=h();n=O();)r.push(n),r=r.concat(h());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=h().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=h();t=O();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}}()}function w(){var e=i(),t=v();return t?(h(),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(f.a)(c)&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((y=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:a}}))};function Gl(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Yl=n(95),$l=n.n(Yl),Xl=Ql;function Ql(e){this.options=e||{}}Ql.prototype.emit=function(e){return e},Ql.prototype.visit=function(e){return this[e.type](e)},Ql.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 Zl=Jl;function Jl(e){Xl.call(this,e)}$l()(Jl,Xl),Jl.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Jl.prototype.comment=function(e){return this.emit("",e.position)},Jl.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Jl.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Jl.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("}")},Jl.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Jl.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Jl.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Jl.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Jl.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Jl.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("}")},Jl.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Jl.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Jl.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Jl.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("}"):""},Jl.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var eu=tu;function tu(e){e=e||{},Xl.call(this,e),this.indentation=e.indent}$l()(tu,Xl),tu.prototype.compile=function(e){return this.stylesheet(e)},tu.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},tu.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},tu.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},tu.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}")},tu.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}")},tu.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},tu.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},tu.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}")},tu.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)+"}")},tu.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")},tu.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}")},tu.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}")},tu.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}")},tu.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},tu.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()+"}"):""},tu.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},tu.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var nu=function(e,t){return((t=t||{}).compress?new Zl(t):new eu(t)).compile(e)},ru=n(192),ou=n.n(ru);var iu=function(e,t){try{var n=ql(e),r=ou.a.map(n,function(e){if(!e)return e;var n=t(e);return this.update(n)});return nu(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}},cu=n(75);function au(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function su(e){return function(t){var n=function(e,t){var n=Object(cu.parse)(e).pathname;return Object(cu.resolve)(t,n)}(t.value,e);return Object(u.a)({},t,{newUrl:"url("+t.before+t.quote+n+t.quote+t.after+")"})}}var lu=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]};au(o)&&r.push(o)}return r}(t.value).map(su(e));return Object(u.a)({},t,{value:(r=t.value,o=n,o.forEach(function(e){r=r.replace(e.source,e.newUrl)}),r)})}var r,o;return t}},uu=/^(body|html).*$/,du=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(u.a)({},n,{selectors:n.selectors.map(function(n){return Object(v.includes)(t,n.trim())?n:n.match(uu)?n.replace(/^(body|html)/,e):e+" "+n})}):n}},pu=function(e){function t(e){var n;return Object(Mr.a)(this,t),n=Object(Hr.a)(this,Object(Vr.a)(t).apply(this,arguments)),e.recovery?Object(Hr.a)(n):(e.updateEditorSettings(e.settings),e.updatePostLock(e.settings.postLock),e.setupEditor(e.post),e.settings.autosave&&e.createWarningNotice(Object(y.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(y.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(Kr.a)(t,e),Object(Ur.a)(t,[{key:"componentDidMount",value:function(){this.props.settings.styles&&Object(v.map)(this.props.settings.styles,function(e){var t=e.css,n=e.baseURL,r=[du(".editor-styles-wrapper")];n&&r.push(lu(n));var o=iu(t,Object(Dr.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.children,t=[[Wr.SlotFillProvider],[Wr.DropZoneProvider]];return Object(v.flow)(t.map(function(e){var t=Object(l.a)(e,2),n=t[0],r=t[1];return function(e){return Object(Ar.createElement)(n,r,e)}}))(e)}}]),t}(Ar.Component),bu=Object(s.withDispatch)(function(e){var t=e("core/editor");return{setupEditor:t.setupEditor,updateEditorSettings:t.updateEditorSettings,updatePostLock:t.updatePostLock,createWarningNotice:e("core/notices").createWarningNotice}})(pu);function fu(e){var t=Object(i.getBlockSupport)(e,"align");if(Array.isArray(t))return t;var n=[];return!0===t&&(n.push("left","center","right"),Object(i.hasBlockSupport)(e,"alignWide",!0)&&n.push("wide","full")),n}var hu=Object(Dr.createHigherOrderComponent)(function(e){return function(t){var n=fu(t.name);return[n.length>0&&t.isSelected&&Object(Ar.createElement)(mo,{key:"align-controls"},Object(Ar.createElement)(uo,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(i.getBlockType)(t.name);Object(v.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:n})),Object(Ar.createElement)(e,Object(Lr.a)({key:"edit"},t))]}},"withToolbarControls"),mu=Object(Dr.createHigherOrderComponent)(function(e){return function(t){var n=t.block.attributes.align,r=fu(t.block.name),o=t.wrapperProps;return Object(v.includes)(r,n)&&(o=Object(u.a)({},o,{"data-align":n})),Object(Ar.createElement)(e,Object(Lr.a)({},t,{wrapperProps:o}))}},"withDataAlign");Object(Fr.addFilter)("blocks.registerBlockType","core/align/addAttribute",function(e){return Object(v.has)(e.attributes,["align","type"])?e:(Object(i.hasBlockSupport)(e,"align")&&(e.attributes=Object(v.assign)(e.attributes,{align:{type:"string"}})),e)}),Object(Fr.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",mu),Object(Fr.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",hu),Object(Fr.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",function(e,t,n){var r=n.align;return Object(v.includes)(fu(t),r)&&(e.className=Rr()("align".concat(r),e.className)),e});var vu=/[\s#]/g;var Ou=Object(Dr.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(e,t),Object(Ar.createElement)(sc,null,Object(Ar.createElement)(Wr.TextControl,{label:Object(y.__)("HTML Anchor"),help:Object(y.__)("Anchors lets you link directly to a section on a page."),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(vu,"-"),t.setAttributes({anchor:e})}}))):Object(Ar.createElement)(e,t)}},"withInspectorControl");Object(Fr.addFilter)("blocks.registerBlockType","core/anchor/attribute",function(e){return Object(i.hasBlockSupport)(e,"anchor")&&(e.attributes=Object(v.assign)(e.attributes,{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e}),Object(Fr.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Ou),Object(Fr.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"anchor")&&(e.id=n.anchor),e});var gu=Object(Dr.createHigherOrderComponent)(function(e){return function(t){return Object(i.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(Ar.createElement)(Ar.Fragment,null,Object(Ar.createElement)(e,t),Object(Ar.createElement)(sc,null,Object(Ar.createElement)(Wr.TextControl,{label:Object(y.__)("Additional CSS Class"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:e})}}))):Object(Ar.createElement)(e,t)}},"withInspectorControl");function ju(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(i.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(Fr.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e){return Object(i.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=Object(v.assign)(e.attributes,{className:{type:"string"}})),e}),Object(Fr.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",gu),Object(Fr.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",function(e,t,n){return Object(i.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=Rr()(e.className,n.className)),e}),Object(Fr.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",function(e,t,n){if(Object(i.hasBlockSupport)(t,"customClassName",!0)){var r=Object(v.omit)(e,["className"]),o=Object(i.getSaveContent)(t,r),c=ju(o),a=ju(n),s=Object(v.difference)(a,c);s.length?e.className=s.join(" "):o&&delete e.className}return e});var yu=[oo],ku=Object(v.once)(function(){return Object(s.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(Fr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=yu.map(v.clone),t===Object(i.getDefaultBlockName)()&&(e.push(Object(v.clone)(ro)),ku())),e}),Object(Fr.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",function(e,t){return Object(i.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(v.uniq)([Object(i.getBlockDefaultClassName)(t.name)].concat(Object(p.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(i.getBlockDefaultClassName)(t.name)),e}),n.d(t,"Autocomplete",function(){return Zr}),n.d(t,"AlignmentToolbar",function(){return co}),n.d(t,"BlockAlignmentToolbar",function(){return uo}),n.d(t,"BlockControls",function(){return mo}),n.d(t,"BlockEdit",function(){return Oo}),n.d(t,"BlockFormatControls",function(){return _o}),n.d(t,"BlockNavigationDropdown",function(){return To}),n.d(t,"BlockIcon",function(){return Jr}),n.d(t,"ColorPalette",function(){return Io}),n.d(t,"withColorContext",function(){return Po}),n.d(t,"ContrastChecker",function(){return Fo}),n.d(t,"InnerBlocks",function(){return rc}),n.d(t,"InspectorAdvancedControls",function(){return sc}),n.d(t,"InspectorControls",function(){return bc}),n.d(t,"PanelColor",function(){return fc}),n.d(t,"PanelColorSettings",function(){return gc}),n.d(t,"PlainText",function(){return jc}),n.d(t,"RichText",function(){return Mc}),n.d(t,"ServerSideRender",function(){return Uc}),n.d(t,"MediaPlaceholder",function(){return Gc}),n.d(t,"MediaUpload",function(){return Hc}),n.d(t,"URLInput",function(){return Xc}),n.d(t,"URLInputButton",function(){return Qc}),n.d(t,"URLPopover",function(){return Vc}),n.d(t,"AutosaveMonitor",function(){return Jc}),n.d(t,"DocumentOutline",function(){return ca}),n.d(t,"DocumentOutlineCheck",function(){return aa}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return pa}),n.d(t,"EditorHistoryRedo",function(){return ba}),n.d(t,"EditorHistoryUndo",function(){return fa}),n.d(t,"EditorNotices",function(){return ma}),n.d(t,"PageAttributesCheck",function(){return va}),n.d(t,"PageAttributesOrder",function(){return ja}),n.d(t,"PageAttributesParent",function(){return Sa}),n.d(t,"PageTemplate",function(){return Ea}),n.d(t,"PostAuthor",function(){return Ta}),n.d(t,"PostAuthorCheck",function(){return Ca}),n.d(t,"PostComments",function(){return Pa}),n.d(t,"PostExcerpt",function(){return Ia}),n.d(t,"PostExcerptCheck",function(){return Ba}),n.d(t,"PostFeaturedImage",function(){return Ua}),n.d(t,"PostFeaturedImageCheck",function(){return La}),n.d(t,"PostFormat",function(){return Ka}),n.d(t,"PostFormatCheck",function(){return Ha}),n.d(t,"PostLastRevision",function(){return qa}),n.d(t,"PostLastRevisionCheck",function(){return za}),n.d(t,"PostLockedModal",function(){return Za}),n.d(t,"PostPendingStatus",function(){return es}),n.d(t,"PostPendingStatusCheck",function(){return Ja}),n.d(t,"PostPingbacks",function(){return ts}),n.d(t,"PostPreviewButton",function(){return Xa}),n.d(t,"PostPublishButton",function(){return os}),n.d(t,"PostPublishButtonLabel",function(){return ns}),n.d(t,"PostPublishPanel",function(){return Es}),n.d(t,"PostPublishPanelToggle",function(){return Cs}),n.d(t,"PostSavedState",function(){return Ps}),n.d(t,"PostSchedule",function(){return ls}),n.d(t,"PostScheduleCheck",function(){return Is}),n.d(t,"PostScheduleLabel",function(){return us}),n.d(t,"PostSticky",function(){return xs}),n.d(t,"PostStickyCheck",function(){return Bs}),n.d(t,"PostSwitchToDraftButton",function(){return ws}),n.d(t,"PostTaxonomies",function(){return Rs}),n.d(t,"PostTaxonomiesCheck",function(){return Ds}),n.d(t,"PostTextEditor",function(){return Ms}),n.d(t,"PostTitle",function(){return Ys}),n.d(t,"PostTrash",function(){return $s}),n.d(t,"PostTrashCheck",function(){return Xs}),n.d(t,"PostTypeSupportCheck",function(){return Oa}),n.d(t,"PostVisibility",function(){return as}),n.d(t,"PostVisibilityLabel",function(){return ss}),n.d(t,"PostVisibilityCheck",function(){return Qs}),n.d(t,"TableOfContents",function(){return tl}),n.d(t,"UnsavedChangesWarning",function(){return rl}),n.d(t,"WordCount",function(){return Js}),n.d(t,"BlockInspector",function(){return ll}),n.d(t,"BlockList",function(){return tc}),n.d(t,"BlockMover",function(){return Jo}),n.d(t,"BlockSelectionClearer",function(){return dl}),n.d(t,"BlockSettingsMenu",function(){return Cl}),n.d(t,"_BlockSettingsMenuFirstItem",function(){return yl}),n.d(t,"_BlockSettingsMenuPluginsExtension",function(){return El}),n.d(t,"BlockTitle",function(){return mi}),n.d(t,"BlockToolbar",function(){return Il}),n.d(t,"CopyHandler",function(){return xl}),n.d(t,"DefaultBlockAppender",function(){return Zi}),n.d(t,"ErrorBoundary",function(){return Ll}),n.d(t,"Inserter",function(){return Mi}),n.d(t,"MultiBlocksSwitcher",function(){return Pl}),n.d(t,"MultiSelectScrollIntoView",function(){return Nl}),n.d(t,"NavigableToolbar",function(){return ki}),n.d(t,"ObserveTyping",function(){return Fl}),n.d(t,"PreserveScrollInReorder",function(){return Ul}),n.d(t,"SkipToSelectedBlock",function(){return ol}),n.d(t,"Warning",function(){return ni}),n.d(t,"WritingFlow",function(){return zl}),n.d(t,"EditorProvider",function(){return bu}),n.d(t,"blockAutocompleter",function(){return ro}),n.d(t,"userAutocompleter",function(){return oo}),n.d(t,"getColorClassName",function(){return No}),n.d(t,"getColorObjectByAttributeValues",function(){return Lo}),n.d(t,"getColorObjectByColorValue",function(){return Ao}),n.d(t,"withColors",function(){return Do}),n.d(t,"getFontSize",function(){return Mo}),n.d(t,"getFontSizeClass",function(){return Uo}),n.d(t,"FontSizePicker",function(){return Ho}),n.d(t,"withFontSizes",function(){return Vo}),n.d(t,"mediaUpload",function(){return zc})}]);